diff --git a/Assets/AssetCaches.asset b/Assets/AssetCaches.asset index 0e718599f..c31873b3b 100644 --- a/Assets/AssetCaches.asset +++ b/Assets/AssetCaches.asset @@ -18613,6 +18613,36 @@ MonoBehaviour: - {fileID: 102900000, guid: aa3f5467c0c153642ac320466aee0ec1, type: 3} FilterEnum: 0 Filter: '*' + - Path: Assets/ResRaw/Prefabs/Line/RopeSegment_1.asset + Address: Plyaer/RopeSegment_1 + Type: ObiRopeBlueprint + Bundle: main/plyaer.bundle + Tags: + Group: + Name: Plyaer + Enable: 1 + BundleMode: 0 + AddressMode: 2 + Tags: + Collectors: + - {fileID: 102900000, guid: aa3f5467c0c153642ac320466aee0ec1, type: 3} + FilterEnum: 0 + Filter: '*' + - Path: Assets/ResRaw/Prefabs/Line/RopeSegment_2.asset + Address: Plyaer/RopeSegment_2 + Type: ObiRopeBlueprint + Bundle: main/plyaer.bundle + Tags: + Group: + Name: Plyaer + Enable: 1 + BundleMode: 0 + AddressMode: 2 + Tags: + Collectors: + - {fileID: 102900000, guid: aa3f5467c0c153642ac320466aee0ec1, type: 3} + FilterEnum: 0 + Filter: '*' - Path: Assets/ResRaw/Prefabs/Line/Spool.mat Address: Plyaer/Spool Type: Material diff --git a/Assets/Enviro 3 - Sky and Weather/Profiles/Configurations/Default Enviro Configuration 3_3_1.asset b/Assets/Enviro 3 - Sky and Weather/Profiles/Configurations/Default Enviro Configuration 3_3_1.asset index f39cfb3a5..aeff2f529 100644 --- a/Assets/Enviro 3 - Sky and Weather/Profiles/Configurations/Default Enviro Configuration 3_3_1.asset +++ b/Assets/Enviro 3 - Sky and Weather/Profiles/Configurations/Default Enviro Configuration 3_3_1.asset @@ -48,6 +48,7 @@ MonoBehaviour: atime6: 0 atime7: 0 m_Mode: 0 + m_ColorSpace: -1 m_NumColorKeys: 5 m_NumAlphaKeys: 2 cirrusCloudsWindIntensity: 0.5 @@ -81,6 +82,7 @@ MonoBehaviour: atime6: 0 atime7: 0 m_Mode: 0 + m_ColorSpace: -1 m_NumColorKeys: 5 m_NumAlphaKeys: 2 flatCloudsAmbientColor: @@ -110,6 +112,7 @@ MonoBehaviour: atime6: 0 atime7: 0 m_Mode: 0 + m_ColorSpace: -1 m_NumColorKeys: 4 m_NumAlphaKeys: 2 flatCloudsLightIntensity: 1.014 @@ -128,9 +131,9 @@ MonoBehaviour: preset: {fileID: 11400000, guid: 0fcdd472bd6a8ec429fc1e9bc978c4fa, type: 2} showCirrusCloudsControls: 0 show2DCloudsControls: 0 - cloudFlatBaseAnim: {x: -0.45774108, y: -0.35202405} - cloudFlatDetailAnim: {x: -0.5011771, y: 0.7554102} - cirrusAnim: {x: 0.61211836, y: 0.95929813} + cloudFlatBaseAnim: {x: -0.19295175, y: -0.61681175} + cloudFlatDetailAnim: {x: 0.8227671, y: -0.5685335} + cirrusAnim: {x: 0.74451214, y: 0.82690436} --- !u!114 &-6613759932185320841 MonoBehaviour: m_ObjectHideFlags: 0 @@ -211,7 +214,7 @@ MonoBehaviour: audioTransitionSpeed: 1 preset: {fileID: 11400000, guid: 8c4e279017d5e44458e3e4663b6ab460, type: 2} targetWeatherType: {fileID: 11400000, guid: 6c589d06d1746d04a864437f71d0cc30, type: 2} - weatherBlendProgress: 0 + weatherBlendProgress: 1 globalAutoWeatherChange: 1 triggerCollider: {fileID: 0} triggerRB: {fileID: 0} @@ -264,6 +267,7 @@ MonoBehaviour: atime6: 0 atime7: 0 m_Mode: 0 + m_ColorSpace: -1 m_NumColorKeys: 3 m_NumAlphaKeys: 2 frontColorGradient1: @@ -293,6 +297,7 @@ MonoBehaviour: atime6: 0 atime7: 0 m_Mode: 0 + m_ColorSpace: -1 m_NumColorKeys: 6 m_NumAlphaKeys: 2 frontColorGradient2: @@ -322,6 +327,7 @@ MonoBehaviour: atime6: 0 atime7: 0 m_Mode: 0 + m_ColorSpace: -1 m_NumColorKeys: 6 m_NumAlphaKeys: 2 frontColorGradient3: @@ -351,6 +357,7 @@ MonoBehaviour: atime6: 0 atime7: 0 m_Mode: 0 + m_ColorSpace: -1 m_NumColorKeys: 6 m_NumAlphaKeys: 2 frontColorGradient4: @@ -380,6 +387,7 @@ MonoBehaviour: atime6: 0 atime7: 0 m_Mode: 0 + m_ColorSpace: -1 m_NumColorKeys: 6 m_NumAlphaKeys: 2 frontColorGradient5: @@ -409,6 +417,7 @@ MonoBehaviour: atime6: 0 atime7: 0 m_Mode: 0 + m_ColorSpace: -1 m_NumColorKeys: 6 m_NumAlphaKeys: 2 backColorGradient0: @@ -438,6 +447,7 @@ MonoBehaviour: atime6: 0 atime7: 0 m_Mode: 0 + m_ColorSpace: -1 m_NumColorKeys: 3 m_NumAlphaKeys: 2 backColorGradient1: @@ -467,6 +477,7 @@ MonoBehaviour: atime6: 0 atime7: 0 m_Mode: 0 + m_ColorSpace: -1 m_NumColorKeys: 6 m_NumAlphaKeys: 2 backColorGradient2: @@ -496,6 +507,7 @@ MonoBehaviour: atime6: 0 atime7: 0 m_Mode: 0 + m_ColorSpace: -1 m_NumColorKeys: 6 m_NumAlphaKeys: 2 backColorGradient3: @@ -525,6 +537,7 @@ MonoBehaviour: atime6: 0 atime7: 0 m_Mode: 0 + m_ColorSpace: -1 m_NumColorKeys: 6 m_NumAlphaKeys: 2 backColorGradient4: @@ -554,6 +567,7 @@ MonoBehaviour: atime6: 0 atime7: 0 m_Mode: 0 + m_ColorSpace: -1 m_NumColorKeys: 6 m_NumAlphaKeys: 2 backColorGradient5: @@ -583,6 +597,7 @@ MonoBehaviour: atime6: 0 atime7: 0 m_Mode: 0 + m_ColorSpace: -1 m_NumColorKeys: 6 m_NumAlphaKeys: 2 sunDiscColorGradient: @@ -612,6 +627,7 @@ MonoBehaviour: atime6: 0 atime7: 0 m_Mode: 0 + m_ColorSpace: -1 m_NumColorKeys: 5 m_NumAlphaKeys: 2 moonColorGradient: @@ -641,6 +657,7 @@ MonoBehaviour: atime6: 0 atime7: 0 m_Mode: 0 + m_ColorSpace: -1 m_NumColorKeys: 3 m_NumAlphaKeys: 2 moonGlowColorGradient: @@ -670,6 +687,7 @@ MonoBehaviour: atime6: 0 atime7: 0 m_Mode: 0 + m_ColorSpace: -1 m_NumColorKeys: 2 m_NumAlphaKeys: 2 starsTex: {fileID: 8900000, guid: b5a7175da0f133b4d951c19c9c2cebfc, type: 3} @@ -920,7 +938,7 @@ MonoBehaviour: lightingModule: {fileID: 1121697361819163703} reflectionsModule: {fileID: 3003072118128753163} Sky: {fileID: -1033463005042072443} - fogModule: {fileID: 6137975383063632260} + fogModule: {fileID: 0} volumetricCloudModule: {fileID: 3171557369469055653} flatCloudModule: {fileID: -6856645797116724545} Weather: {fileID: -2780709178333184838} @@ -1060,6 +1078,7 @@ MonoBehaviour: atime6: 0 atime7: 0 m_Mode: 0 + m_ColorSpace: -1 m_NumColorKeys: 5 m_NumAlphaKeys: 2 moonColorGradient: @@ -1089,6 +1108,7 @@ MonoBehaviour: atime6: 0 atime7: 0 m_Mode: 0 + m_ColorSpace: -1 m_NumColorKeys: 4 m_NumAlphaKeys: 2 sunIntensityCurveHDRP: @@ -1271,6 +1291,7 @@ MonoBehaviour: atime6: 0 atime7: 0 m_Mode: 0 + m_ColorSpace: -1 m_NumColorKeys: 2 m_NumAlphaKeys: 2 lightIntensityHDRP: 350 @@ -1378,6 +1399,7 @@ MonoBehaviour: atime6: 0 atime7: 0 m_Mode: 0 + m_ColorSpace: -1 m_NumColorKeys: 5 m_NumAlphaKeys: 2 ambientEquatorColorGradient: @@ -1407,6 +1429,7 @@ MonoBehaviour: atime6: 0 atime7: 0 m_Mode: 0 + m_ColorSpace: -1 m_NumColorKeys: 5 m_NumAlphaKeys: 2 ambientGroundColorGradient: @@ -1436,6 +1459,7 @@ MonoBehaviour: atime6: 0 atime7: 0 m_Mode: 0 + m_ColorSpace: -1 m_NumColorKeys: 5 m_NumAlphaKeys: 2 ambientIntensityCurve: @@ -1667,7 +1691,7 @@ MonoBehaviour: m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 - temperature: 3.2010436 + temperature: 3.1911154 temperatureWeatherMod: 0 temperatureCustomMod: 0 temperatureChangingSpeed: 0.1 @@ -1701,11 +1725,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 456bf221b186fde4096dcf2c1841b35a, type: 3} m_Name: Quality Module m_EditorClassIdentifier: - showModuleInspector: 1 + showModuleInspector: 0 showSaveLoad: 0 active: 1 Settings: - defaultQuality: {fileID: 11400000, guid: 60e887b1524da0a4a8f1318ef102e22a, type: 2} + defaultQuality: {fileID: 11400000, guid: 2e0aaa075bca92245a9e8300b7eace9c, type: 2} Qualities: - {fileID: 11400000, guid: a002704085c17f1439758fcee25df529, type: 2} - {fileID: 11400000, guid: 2e0aaa075bca92245a9e8300b7eace9c, type: 2} @@ -2097,6 +2121,7 @@ MonoBehaviour: atime6: 0 atime7: 0 m_Mode: 0 + m_ColorSpace: -1 m_NumColorKeys: 5 m_NumAlphaKeys: 2 moonLightColorGradient: @@ -2126,6 +2151,7 @@ MonoBehaviour: atime6: 0 atime7: 0 m_Mode: 0 + m_ColorSpace: -1 m_NumColorKeys: 3 m_NumAlphaKeys: 2 ambientColorGradient: @@ -2155,6 +2181,7 @@ MonoBehaviour: atime6: 0 atime7: 0 m_Mode: 0 + m_ColorSpace: -1 m_NumColorKeys: 5 m_NumAlphaKeys: 2 sunLightColor: {r: 0, g: 0, b: 0, a: 0} @@ -2179,12 +2206,12 @@ MonoBehaviour: volumetricClouds: 1 lightningSupport: 1 variableBottomNoise: 0 - downsampling: 2 + downsampling: 3 stepsLayer1: 128 stepsLayer2: 64 blueNoiseIntensity: 2 reprojectionBlendTime: 2 - lodDistance: 0.6 + lodDistance: 0.7 preset: {fileID: 11400000, guid: 4b3879673bba3ff488a4b539b4de69b7, type: 2} showGlobalControls: 1 showVolumeSettings: 0 @@ -2193,9 +2220,9 @@ MonoBehaviour: showDensityControls: 0 showTextureControls: 0 showWindControls: 0 - cloudAnimLayer1: {x: -0.15238605, y: -0.75173455, z: 0.5870752} + cloudAnimLayer1: {x: -0.82855153, y: -0.07499668, z: -0.7368688} cloudAnimLayer2: {x: -0.4793451, y: 0.47841242, z: 0.015471124} - cloudAnimNonScaledLayer1: {x: -0.31603515, y: -2.1525373, z: -66.53769} + cloudAnimNonScaledLayer1: {x: -0.3054432, y: -2.1631308, z: -66.58966} cloudAnimNonScaledLayer2: {x: -0.001515836, y: 0.0009908647, z: -0.28406617} weatherMap: {fileID: 0} --- !u!114 &4011421771873438716 @@ -2264,616 +2291,6 @@ MonoBehaviour: aurora_colorshift: {fileID: 2800000, guid: f99b7b1866c1ab3489d848a4ef3dd81b, type: 3} preset: {fileID: 11400000, guid: 278933d28004c6b40ace276968b45b9e, type: 2} showAuroraControls: 0 ---- !u!114 &6137975383063632260 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4eacb969ef7bfec4ba69d66b0a873f2f, type: 3} - m_Name: Fog Module - m_EditorClassIdentifier: - showModuleInspector: 0 - showSaveLoad: 1 - active: 1 - Settings: - volumetrics: 1 - steps: 32 - quality: 1 - scattering: 0.28 - scatteringMultiplier: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 8 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0 - outWeight: 0 - - serializedVersion: 3 - time: 0.29862836 - value: 7.1266994 - inSlope: -7.9367094 - outSlope: -7.9367094 - tangentMode: 0 - weightedMode: 0 - inWeight: 0.1494251 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 0.41374835 - value: 1.9498584 - inSlope: -5.9926996 - outSlope: -5.9926996 - tangentMode: 0 - weightedMode: 0 - inWeight: 0.515421 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 1 - value: 1 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0 - outWeight: 0 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - extinction: 0.02 - anistropy: 0.19 - maxRange: 1000 - maxRangePointSpot: 100 - noiseIntensity: 0 - noiseScale: 0 - windDirection: {x: 3.9, y: 0, z: 0} - noise: {fileID: 0} - ditheringTex: {fileID: 2800000, guid: 711e788cbc742bb439b3c7cad60651e3, type: 3} - fog: 1 - fogQualityMode: 0 - floatingPointOriginMod: {x: 0, y: 0, z: 0} - globalFogHeight: 0 - fogDensity: 0.015 - fogHeightFalloff: 0.0121 - fogHeight: 0 - fogDensity2: 0.412 - fogHeightFalloff2: 0.0388 - fogHeight2: 0 - fogMaxOpacity: 1 - startDistance: 0.01 - fogColorBlend: 0.5 - fogColorMod: {r: 1, g: 1, b: 1, a: 1} - blockScattering: 1 - ambientColorGradient: - serializedVersion: 2 - key0: {r: 0.23549305, g: 0.2427107, b: 0.7924528, a: 1} - key1: {r: 0.16073336, g: 0.22812635, b: 0.7924528, a: 1} - key2: {r: 0.35590956, g: 0.44551674, b: 0.5849056, a: 0} - key3: {r: 2.5796902, g: 2.651018, b: 2.8293376, a: 0} - key4: {r: 2.5796902, g: 2.651018, b: 2.8293376, a: 0} - key5: {r: 0, g: 0, b: 0, a: 0} - key6: {r: 0, g: 0, b: 0, a: 0} - key7: {r: 0, g: 0, b: 0, a: 0} - ctime0: 0 - ctime1: 29491 - ctime2: 33539 - ctime3: 65535 - ctime4: 65535 - ctime5: 0 - ctime6: 0 - ctime7: 0 - atime0: 0 - atime1: 65535 - atime2: 0 - atime3: 0 - atime4: 0 - atime5: 0 - atime6: 0 - atime7: 0 - m_Mode: 0 - m_NumColorKeys: 4 - m_NumAlphaKeys: 2 - unityFog: 0 - unityFogMode: 2 - unityFogDensity: 0.002 - unityFogStartDistance: 0 - unityFogEndDistance: 1000 - unityFogColor: - serializedVersion: 2 - key0: {r: 0, g: 0, b: 0, a: 1} - key1: {r: 0.0146404365, g: 0.019780159, b: 0.066037714, a: 1} - key2: {r: 0.12589, g: 0.15198022, b: 0.38679248, a: 0} - key3: {r: 0.6415094, g: 0.39747813, b: 0.26326096, a: 0} - key4: {r: 0.53266287, g: 0.63567483, b: 0.8490566, a: 0} - key5: {r: 0.82702917, g: 0.8807278, b: 0.990566, a: 0} - key6: {r: 0, g: 0, b: 0, a: 0} - key7: {r: 0, g: 0, b: 0, a: 0} - ctime0: 0 - ctime1: 9830 - ctime2: 23130 - ctime3: 32768 - ctime4: 36430 - ctime5: 65535 - ctime6: 0 - ctime7: 0 - atime0: 0 - atime1: 65535 - atime2: 0 - atime3: 0 - atime4: 0 - atime5: 0 - atime6: 0 - atime7: 0 - m_Mode: 0 - m_NumColorKeys: 6 - m_NumAlphaKeys: 2 - preset: {fileID: 11400000, guid: 6625884995235d049bd7f2f1de182577, type: 2} - showFogControls: 1 - showVolumetricsControls: 1 - showUnityFogControls: 0 - fogLights: - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - customFogDensityModifer: 1 - fogMat: {fileID: 0} - volumetricsMat: {fileID: 0} - blurMat: {fileID: 0} - blurMat2: {fileID: 0} - volumetricsRenderTexture: {fileID: 0} --- !u!114 &8141577898218642580 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/KriptoFX/WaterSystem2/WaterQualitySettings/Resources/WaterQualitySettings.asset b/Assets/KriptoFX/WaterSystem2/WaterQualitySettings/Resources/WaterQualitySettings.asset index ee85f9932..5052de771 100644 --- a/Assets/KriptoFX/WaterSystem2/WaterQualitySettings/Resources/WaterQualitySettings.asset +++ b/Assets/KriptoFX/WaterSystem2/WaterQualitySettings/Resources/WaterQualitySettings.asset @@ -22,7 +22,7 @@ MonoBehaviour: UseScreenSpaceReflectionSky: 1 ScreenSpaceBordersStretching: 0.025 UsePlanarReflection: 0 - PlanarCullingMask: -1 + PlanarCullingMask: 4513583 PlanarReflectionResolutionQuality: 368 ReflectionClipPlaneOffset: 0.0005 RenderPlanarShadows: 0 @@ -39,7 +39,7 @@ MonoBehaviour: VolumetricLightIteration: 8 VolumetricLightCausticMode: 0 UseCausticEffect: 1 - OceanCausticTextureResolutionQuality: 768 + OceanCausticTextureResolutionQuality: 256 UseOceanCausticHighQualityFiltering: 1 UseOceanCausticDispersion: 1 UseUnderwaterEffect: 1 @@ -52,29 +52,29 @@ MonoBehaviour: levelName: Medium UseDynamicWaves: 1 UseDynamicWavesWetEffect: 1 - UseScreenSpaceReflection: 1 + UseScreenSpaceReflection: 0 ScreenSpaceReflectionResolutionQuality: 35 UseScreenSpaceReflectionSky: 1 ScreenSpaceBordersStretching: 0.025 - UsePlanarReflection: 0 - PlanarCullingMask: -1 - PlanarReflectionResolutionQuality: 368 + UsePlanarReflection: 1 + PlanarCullingMask: 4513583 + PlanarReflectionResolutionQuality: 256 ReflectionClipPlaneOffset: 0.0005 RenderPlanarShadows: 0 RenderPlanarVolumetricsAndFog: 0 RenderPlanarClouds: 0 UseAnisotropicReflections: 1 AnisotropicReflectionsHighQuality: 0 - RefractionResolution: 50 + RefractionResolution: 25 UseRefractionDispersion: 1 UseOceanFoam: 1 UseWetEffect: 1 - UseVolumetricLight: 1 - VolumetricLightResolutionQuality: 30 - VolumetricLightIteration: 8 + UseVolumetricLight: 0 + VolumetricLightResolutionQuality: 15 + VolumetricLightIteration: 2 VolumetricLightCausticMode: 0 UseCausticEffect: 1 - OceanCausticTextureResolutionQuality: 768 + OceanCausticTextureResolutionQuality: 256 UseOceanCausticHighQualityFiltering: 1 UseOceanCausticDispersion: 1 UseUnderwaterEffect: 1 @@ -87,13 +87,13 @@ MonoBehaviour: levelName: High UseDynamicWaves: 1 UseDynamicWavesWetEffect: 1 - UseScreenSpaceReflection: 1 + UseScreenSpaceReflection: 0 ScreenSpaceReflectionResolutionQuality: 35 - UseScreenSpaceReflectionSky: 0 + UseScreenSpaceReflectionSky: 1 ScreenSpaceBordersStretching: 0.018 - UsePlanarReflection: 0 + UsePlanarReflection: 1 PlanarCullingMask: 4513583 - PlanarReflectionResolutionQuality: 768 + PlanarReflectionResolutionQuality: 256 ReflectionClipPlaneOffset: 0 RenderPlanarShadows: 1 RenderPlanarVolumetricsAndFog: 1 @@ -104,17 +104,17 @@ MonoBehaviour: UseRefractionDispersion: 0 UseOceanFoam: 1 UseWetEffect: 1 - UseVolumetricLight: 1 - VolumetricLightResolutionQuality: 40 + UseVolumetricLight: 0 + VolumetricLightResolutionQuality: 15 VolumetricLightIteration: 8 - VolumetricLightCausticMode: 0 + VolumetricLightCausticMode: 1 UseCausticEffect: 1 - OceanCausticTextureResolutionQuality: 768 + OceanCausticTextureResolutionQuality: 128 UseOceanCausticHighQualityFiltering: 1 UseOceanCausticDispersion: 1 UseUnderwaterEffect: 1 MeshDetailingFarDistance: 2000 - WaterMeshDetailing: 0 + WaterMeshDetailing: 2 WaterTransparentSortingPriority: -1 DrawToPosteffectsDepth: 0 WideAngleCameraRenderingMode: 0 @@ -161,7 +161,7 @@ MonoBehaviour: ShowVolumetricLightSettings: 1 ShowCausticEffectSettings: 1 ShowUnderwaterEffectSettings: 1 - ShowMeshSettings: 1 + ShowMeshSettings: 0 ShowRendering: 1 SelectedThirdPartyFogMethod: 0 IsThirdPartyFogAvailable: 1 diff --git a/Assets/Obi/CHANGELOG_rope.txt b/Assets/Obi/CHANGELOG_rope.txt index 97384c8fa..8183430e4 100644 --- a/Assets/Obi/CHANGELOG_rope.txt +++ b/Assets/Obi/CHANGELOG_rope.txt @@ -1,77 +1,22 @@ # Change Log All notable changes to “Obi - Advanced ropes for Unity” will be documented in this file. -## [7.1] +## [6.5.4] -### Added -- ObiBone now exposes one particle group per bone in the hierarchy, allowing to easily use attachments. -- New ObiBoneOverride component that allows to override curve-driven properties for a specific sub-hierarchy. -- Solvers can now optionally enforce boundary limits, so that particles can't go outside those limits. This is often more convenient than manually placing invisible colliders for the same purpose. -- Dynamic ObiParticleAttachments now have a "projection" boolean, when enabled it forces the rendered position/orientation of the attached particles to match that of the attachment location, even if the constraint doesn't fully converge. This is useful to avoid visual gaps under extreme conditions. -- Actors now have a "mass scale" parameter, that multiplies the mass of all particles in the blueprinyt at the time of loading it into the solver. This is handy to create actors of different masses without the need to create a new blueprint. -- ObiForceZones now have a "color" parameter, that can be used to change the color of particles entering the zone. +### Fixed +- Workaround for kinematic rigidbody velocities not writable in Unity 2022.1 and above. + +## [6.5.3] ### Changed -- Improved performance for large amounts of static colliders: they're not processed at all during ObiSolver.Update(). +- Updated UnsafeList with its generic version for supporting newer versions of the Collections package. -### Fixed -- Null reference exception when using a ObiRopeExtrudedRenderer that doesn't reference a section asset. - -## [7.0.5] - -### Added -- New pinhole constraint type and ObiPinhole component, that allows to constrain ropes to a point in space while allowing it to slide trough it. Supports two-way rigidbody coupling and can be motor driven. - -### Fixed -- Erratic bend/twist constraint behavior when darboux vector is close to identity. -- Crash when attempting to bake ObiRopeExtrudedRenderer paired with an ObiPathSmoother that uses a non-zero decimation factor. -- IndexOutOfRangeError when having ropes using multiple different section assets and disabling all rope instances using one of them. -- InvalidOperationException in Burst backend when having simulateWhenInvisible = false and solver not seen by any camera. - -## [7.0.4] - -### Fixed -- Bug that caused inactive particles to still be rendered by ObiInstancedParticleRenderer. -- Bug that preventing pin constraints' break threshold from working when using the Compute backend. - -## [7.0.3] - -### Added -- Object layer support for all renderers. -- New "Synchronous Fixed" solver synchronization mode, similar to Obi 6, offers tighter integration with rigidbody physics. -- New "Tangled Ropes" sample scene. - -## [7.0.2] - -### Fixed -- Solvers not placed at the scene origin would result in actors having incorrect motion blur in HDRP. -- Fixed issue when disabling all solvers and colliders simultaneously: ipon re-enabling them, the colliders would be ignored. -- Issue withe ElectricalSparks sample scene, ObiRopePrefabPlugger sample component may sometimes thorw an exception dependin on Unity's OnEnable call order. -- Rope would sometimes disappear when using aerodynamic constraints with zero wind in Burst, due to a math.project returning NaN. Replaced with math.projectsafe. - -## [7.0.1] - -### Added -- BakeMesh functionality to ObiRopeChainRenderer, you can now export baked chain meshes. -- Render layer mask support to all rope renderers and particle renderers. - -### Fixed -- Sceneview mouse lookaround in flytrough mode (right click + drag) didn't work in the path editor in Windows. -- Having a ObiParticleRenderer with no material applied resulted in a exception in builds due GetInstanceID() returning 0 in editor but raising a nullref exception in the build. - -## [7.0] - -### Added -- Compute shader based GPU solver backend. -- More efficient solver update cycle, that also removes the need to have ObiUpdater components. -- Aerodynamic constraint support for ObiRope, ObiRod and ObiBone. +## [6.5.2] ### Changed -- Rendering system is now fully multithreaded, integrated with the solver backend. - -### Removed -- Native library based 'Oni' solver backend. -- ObiUpdater and all derived classes have been removed. +- Slightly improved overall performance by only updating collision material references during OnValidate() +- Exposed solver.activeParticles and solver.colors as a ObiNativeIntList instead of int[], which allows to use them directly in jobs. +- Updated for compatibility with newest Collections package. ## [6.5.1] diff --git a/Assets/Obi/Editor/Common/Blueprints/BlueprintEditorTools/ObiPaintBrushEditorTool.cs b/Assets/Obi/Editor/Common/Blueprints/BlueprintEditorTools/ObiPaintBrushEditorTool.cs index c2c9e1233..0676df0d8 100644 --- a/Assets/Obi/Editor/Common/Blueprints/BlueprintEditorTools/ObiPaintBrushEditorTool.cs +++ b/Assets/Obi/Editor/Common/Blueprints/BlueprintEditorTools/ObiPaintBrushEditorTool.cs @@ -85,7 +85,7 @@ namespace Obi EditorGUI.BeginChangeCheck(); meshBasedEditor.particleCulling = (ObiMeshBasedActorBlueprintEditor.ParticleCulling)EditorGUILayout.EnumPopup("Culling", meshBasedEditor.particleCulling); - if (ObiActorBlueprintEditor.selectedCount == 0) + if (editor.selectedCount == 0) { EditorGUILayout.HelpBox("Select at least one particle to use selection mask.", MessageType.Info); selectionMask = false; @@ -111,16 +111,13 @@ namespace Obi public override bool Editable(int index) { - return editor.visible[index] && (!selectionMask || ObiActorBlueprintEditor.selectionStatus[index]); + return editor.visible[index] && (!selectionMask || editor.selectionStatus[index]); } public override void OnSceneGUI(SceneView view) { if (Camera.current != null) { - var blueprint = meshBasedEditor.blueprint as ObiMeshBasedActorBlueprint; - paintBrush.raycastTransform = blueprint != null ? Matrix4x4.TRS(Vector3.zero, blueprint.rotation, blueprint.scale) : Matrix4x4.identity; - paintBrush.raycastTarget = meshBasedEditor.sourceMesh; paintBrush.DoBrush(editor.blueprint.positions); } diff --git a/Assets/Obi/Editor/Common/Blueprints/BlueprintEditorTools/ObiParticleSelectionEditorTool.cs b/Assets/Obi/Editor/Common/Blueprints/BlueprintEditorTools/ObiParticleSelectionEditorTool.cs index 6a21eb662..99ff3bcdc 100644 --- a/Assets/Obi/Editor/Common/Blueprints/BlueprintEditorTools/ObiParticleSelectionEditorTool.cs +++ b/Assets/Obi/Editor/Common/Blueprints/BlueprintEditorTools/ObiParticleSelectionEditorTool.cs @@ -32,8 +32,8 @@ namespace Obi public override string GetHelpString() { - if (ObiActorBlueprintEditor.selectedCount > 0) - return "" + ObiActorBlueprintEditor.selectedCount + " selected particles."; + if (editor.selectedCount > 0) + return "" + editor.selectedCount + " selected particles."; else return "No particles selected. Click and drag over particles to select them."; } @@ -65,12 +65,12 @@ namespace Obi { if ((Event.current.modifiers & EventModifiers.Shift) == 0) { - for (int p = 0; p < ObiActorBlueprintEditor.selectionStatus.Length; p++) - ObiActorBlueprintEditor.selectionStatus[p] = false; + for (int p = 0; p < editor.selectionStatus.Length; p++) + editor.selectionStatus[p] = false; } foreach (int p in group.particleIndices) - ObiActorBlueprintEditor.selectionStatus[p] = true; + editor.selectionStatus[p] = true; UpdateSelection(); } @@ -78,9 +78,9 @@ namespace Obi if (GUI.Button(new Rect(rect.x + rect.width * 0.5f, rect.y, rect.width * 0.5f, EditorGUIUtility.singleLineHeight), "Set", EditorStyles.miniButtonRight)) { group.particleIndices.Clear(); - for (int p = 0; p < ObiActorBlueprintEditor.selectionStatus.Length; p++) + for (int p = 0; p < editor.selectionStatus.Length; p++) { - if (ObiActorBlueprintEditor.selectionStatus[p]) + if (editor.selectionStatus[p]) group.particleIndices.Add(p); } } @@ -95,9 +95,9 @@ namespace Obi var group = editor.blueprint.AppendNewParticleGroup("new group"); - for (int i = 0; i < ObiActorBlueprintEditor.selectionStatus.Length; i++) + for (int i = 0; i < editor.selectionStatus.Length; i++) { - if (ObiActorBlueprintEditor.selectionStatus[i]) + if (editor.selectionStatus[i]) group.particleIndices.Add(i); } @@ -116,33 +116,33 @@ namespace Obi GUILayout.FlexibleSpace(); if (GUILayout.Button(new GUIContent(Resources.Load("InvertButton"), "Invert selection"), GUILayout.MaxHeight(24), GUILayout.MaxWidth(48))) { - for (int i = 0; i < ObiActorBlueprintEditor.selectionStatus.Length; i++) + for (int i = 0; i < editor.selectionStatus.Length; i++) { if (editor.blueprint.IsParticleActive(i)) - ObiActorBlueprintEditor.selectionStatus[i] = !ObiActorBlueprintEditor.selectionStatus[i]; + editor.selectionStatus[i] = !editor.selectionStatus[i]; } UpdateSelection(); } - GUI.enabled = ObiActorBlueprintEditor.selectedCount > 0; + GUI.enabled = editor.selectedCount > 0; if (GUILayout.Button(new GUIContent(Resources.Load("ClearButton"), "Clear selection"), GUILayout.MaxHeight(24), GUILayout.MaxWidth(48))) { - for (int i = 0; i < ObiActorBlueprintEditor.selectionStatus.Length; i++) - ObiActorBlueprintEditor.selectionStatus[i] = false; + for (int i = 0; i < editor.selectionStatus.Length; i++) + editor.selectionStatus[i] = false; UpdateSelection(); } if (GUILayout.Button(new GUIContent(Resources.Load("OptimizeButton"), "Optimize selected"), GUILayout.MaxHeight(24), GUILayout.MaxWidth(48))) { Undo.RecordObject(editor.blueprint, "Optimize particles away"); - editor.blueprint.RemoveSelectedParticles(ref ObiActorBlueprintEditor.selectionStatus); + editor.blueprint.RemoveSelectedParticles(ref editor.selectionStatus); editor.Refresh(); } if (GUILayout.Button(new GUIContent(Resources.Load("RemoveButton"), "Remove selected"), GUILayout.MaxHeight(24), GUILayout.MaxWidth(48))) { Undo.RecordObject(editor.blueprint, "Remove particles"); - editor.blueprint.RemoveSelectedParticles(ref ObiActorBlueprintEditor.selectionStatus, false); + editor.blueprint.RemoveSelectedParticles(ref editor.selectionStatus, false); editor.Refresh(); } GUI.enabled = true; @@ -175,12 +175,12 @@ namespace Obi maxSelectionValue = EditorGUILayout.FloatField("Maximum " + property.name, maxSelectionValue); if (EditorGUI.EndChangeCheck()) { - for (int i = 0; i < ObiActorBlueprintEditor.selectionStatus.Length; i++) + for (int i = 0; i < editor.selectionStatus.Length; i++) { if (editor.blueprint.IsParticleActive(i)) { var value = property.Get(i); - ObiActorBlueprintEditor.selectionStatus[i] = value >= minSelectionValue && value <= maxSelectionValue; + editor.selectionStatus[i] = value >= minSelectionValue && value <= maxSelectionValue; } } UpdateSelection(); @@ -244,9 +244,9 @@ namespace Obi if (EditorGUI.EndChangeCheck()) { Undo.RecordObject(editor.blueprint, "Set particle property"); - for (int i = 0; i < ObiActorBlueprintEditor.selectionStatus.Length; i++) + for (int i = 0; i < editor.selectionStatus.Length; i++) { - if (!ObiActorBlueprintEditor.selectionStatus[i]) continue; + if (!editor.selectionStatus[i]) continue; editor.currentProperty.SetDefaultToIndex(i); } editor.Refresh(); @@ -287,7 +287,7 @@ namespace Obi EditorGUILayout.BeginVertical(EditorStyles.inspectorDefaultMargins); editor.RenderModeSelector(); - ObiActorBlueprintEditor.dotRadiusScale = EditorGUILayout.Slider(new GUIContent("Particle dot size"), ObiActorBlueprintEditor.dotRadiusScale, 0, 5); + editor.dotRadiusScale = EditorGUILayout.Slider(new GUIContent("Particle dot size"), editor.dotRadiusScale, 0, 5); editor.currentProperty.VisualizationOptions(); EditorGUILayout.EndVertical(); @@ -301,31 +301,31 @@ namespace Obi protected void UpdateSelection() { - ObiActorBlueprintEditor.selectedCount = 0; + editor.selectedCount = 0; mixedPropertyValue = false; // Find out how many selected particles we have, and whether they all have the same value for the current property: - for (int i = 0; i < ObiActorBlueprintEditor.selectionStatus.Length; i++) + for (int i = 0; i < editor.selectionStatus.Length; i++) { - if (editor.blueprint.IsParticleActive(i) && ObiActorBlueprintEditor.selectionStatus[i]) + if (editor.blueprint.IsParticleActive(i) && editor.selectionStatus[i]) { - ObiActorBlueprintEditor.selectedCount++; + editor.selectedCount++; - if (ObiActorBlueprintEditor.activeParticle >= 0) + if (editor.activeParticle >= 0) { - if (!editor.currentProperty.Equals(ObiActorBlueprintEditor.activeParticle, i)) + if (!editor.currentProperty.Equals(editor.activeParticle, i)) mixedPropertyValue = true; } else - ObiActorBlueprintEditor.activeParticle = i; + editor.activeParticle = i; } - else if (ObiActorBlueprintEditor.activeParticle == i) - ObiActorBlueprintEditor.activeParticle = -1; + else if (editor.activeParticle == i) + editor.activeParticle = -1; } // Set initial property value: - if (!mixedPropertyValue && ObiActorBlueprintEditor.activeParticle >= 0) - editor.currentProperty.GetDefaultFromIndex(ObiActorBlueprintEditor.activeParticle); + if (!mixedPropertyValue && editor.activeParticle >= 0) + editor.currentProperty.GetDefaultFromIndex(editor.activeParticle); editor.Repaint(); SceneView.RepaintAll(); diff --git a/Assets/Obi/Editor/Common/Blueprints/BlueprintEditorTools/ObiPropertyTextureEditorTool.cs b/Assets/Obi/Editor/Common/Blueprints/BlueprintEditorTools/ObiPropertyTextureEditorTool.cs index 8ceee4b05..2eb81ee9d 100644 --- a/Assets/Obi/Editor/Common/Blueprints/BlueprintEditorTools/ObiPropertyTextureEditorTool.cs +++ b/Assets/Obi/Editor/Common/Blueprints/BlueprintEditorTools/ObiPropertyTextureEditorTool.cs @@ -52,7 +52,7 @@ namespace Obi private void FloatFromTexture(int i, Color color) { - if (!selectionMask || ObiActorBlueprintEditor.selectionStatus[i]) + if (!selectionMask || editor.selectionStatus[i]) { float value = minPropertyValue + color[(int)textureChannel] * (maxPropertyValue - minPropertyValue); floatProperty.Set(i, value); @@ -61,7 +61,7 @@ namespace Obi private void ColorFromTexture(int i, Color color) { - if (!selectionMask || ObiActorBlueprintEditor.selectionStatus[i]) + if (!selectionMask || editor.selectionStatus[i]) colorProperty.Set(i, color); } diff --git a/Assets/Obi/Editor/Common/Blueprints/BlueprintEditorTools/ObiTethersTool.cs b/Assets/Obi/Editor/Common/Blueprints/BlueprintEditorTools/ObiTethersTool.cs index a1e4d29fe..f89078b36 100644 --- a/Assets/Obi/Editor/Common/Blueprints/BlueprintEditorTools/ObiTethersTool.cs +++ b/Assets/Obi/Editor/Common/Blueprints/BlueprintEditorTools/ObiTethersTool.cs @@ -57,20 +57,20 @@ namespace Obi if (GUILayout.Button("Generate tethers",GUILayout.MinHeight(32))) { // Select all particles in the tethered groups: - for (int i = 0; i < ObiActorBlueprintEditor.selectionStatus.Length; ++i) + for (int i = 0; i < editor.selectionStatus.Length; ++i) { - ObiActorBlueprintEditor.selectionStatus[i] = false; + editor.selectionStatus[i] = false; for (int j = 0; j < tetheredGroups.Length; ++j) { if (tetheredGroups[j] && editor.blueprint.groups[j].ContainsParticle(i)) { - ObiActorBlueprintEditor.selectionStatus[i] = true; + editor.selectionStatus[i] = true; break; } } } - editor.blueprint.GenerateTethers(ObiActorBlueprintEditor.selectionStatus); + editor.blueprint.GenerateTethers(editor.selectionStatus); editor.Refresh(); } diff --git a/Assets/Obi/Editor/Common/Blueprints/Brushes/ObiScreenSpaceBrush.cs b/Assets/Obi/Editor/Common/Blueprints/Brushes/ObiScreenSpaceBrush.cs index 341b491bb..953b3220d 100644 --- a/Assets/Obi/Editor/Common/Blueprints/Brushes/ObiScreenSpaceBrush.cs +++ b/Assets/Obi/Editor/Common/Blueprints/Brushes/ObiScreenSpaceBrush.cs @@ -17,7 +17,7 @@ namespace Obi protected override float WeightFromDistance(float distance) { // anything outside the brush should have zero weight: - if (distance * EditorGUIUtility.pixelsPerPoint > radius) + if (distance > radius) return 0; return 1; } diff --git a/Assets/Obi/Editor/Common/Blueprints/ObiActorBlueprintEditor.cs b/Assets/Obi/Editor/Common/Blueprints/ObiActorBlueprintEditor.cs index 0e819c697..490c584b5 100644 --- a/Assets/Obi/Editor/Common/Blueprints/ObiActorBlueprintEditor.cs +++ b/Assets/Obi/Editor/Common/Blueprints/ObiActorBlueprintEditor.cs @@ -14,27 +14,29 @@ namespace Obi [CustomEditor(typeof(ObiActorBlueprint), true)] public class ObiActorBlueprintEditor : Editor, IObiSelectableParticleProvider { + protected IEnumerator routine; + public List tools = new List(); public int currentToolIndex = 0; - public List properties = new List(); + protected List properties = new List(); public int currentPropertyIndex = 0; - public List renderModes = new List(); + protected List renderModes = new List(); public int renderModeFlags = 0; BooleanPreference showRenderModes; - public bool autoGenerate = false; public bool editMode = false; public bool isEditing = false; + protected List m_SceneStates; + protected SceneSetup[] oldSetup; protected UnityEngine.Object oldSelection; //Additional status info for all particles: - public static float dotRadiusScale = 1; - public static int selectedCount = 0; - public static int activeParticle = -1; - public static bool[] selectionStatus = new bool[0]; - + public float dotRadiusScale = 1; + public int selectedCount = 0; + public int activeParticle = -1; + public bool[] selectionStatus = new bool[0]; public bool[] visible = new bool[0]; public Color[] tint = new Color[0]; protected float[] sqrDistanceToCamera = new float[0]; @@ -76,10 +78,6 @@ namespace Obi public virtual void OnEnable() { - properties.Clear(); - renderModes.Clear(); - tools.Clear(); - properties.Add(new ObiBlueprintMass(this)); properties.Add(new ObiBlueprintRadius(this)); properties.Add(new ObiBlueprintFilterCategory(this)); @@ -90,12 +88,11 @@ namespace Obi #if (UNITY_2019_1_OR_NEWER) renderCallback = new System.Action((cntxt, cam) => { DrawWithCamera(cam); }); + RenderPipelineManager.beginCameraRendering -= renderCallback; RenderPipelineManager.beginCameraRendering += renderCallback; #endif + Camera.onPreCull -= DrawWithCamera; Camera.onPreCull += DrawWithCamera; - SceneView.duringSceneGui += OnSceneGUI; - - EditorApplication.playModeStateChanged += OnPlayModeStateChanged; } public virtual void OnDisable() @@ -106,8 +103,8 @@ namespace Obi RenderPipelineManager.beginCameraRendering -= renderCallback; #endif Camera.onPreCull -= DrawWithCamera; - SceneView.duringSceneGui -= OnSceneGUI; - EditorApplication.playModeStateChanged -= OnPlayModeStateChanged; + + ObiParticleEditorDrawing.DestroyParticlesMesh(); foreach (var tool in tools) { @@ -119,77 +116,51 @@ namespace Obi { renderMode.OnDestroy(); } + + properties.Clear(); + renderModes.Clear(); } - void OnPlayModeStateChanged(PlayModeStateChange playmodeState) + protected void Generate() { - if (playmodeState == PlayModeStateChange.ExitingEditMode) - { - if (StageUtility.GetCurrentStage() is ObiActorBlueprintEditorStage) - StageUtility.GoToMainStage(); - } - } - - protected bool Generate() - { - if (!blueprint.edited) + if (blueprint.empty) { EditorUtility.SetDirty(target); CoroutineJob job = new CoroutineJob(); - IEnumerator routine = job.Start(blueprint.Generate()); - EditorCoroutine.ShowCoroutineProgressBar("Generating blueprint...", routine); + routine = job.Start(blueprint.Generate()); + EditorCoroutine.ShowCoroutineProgressBar("Generating blueprint...", ref routine); Refresh(); EditorGUIUtility.ExitGUI(); } else { - if (EditorUtility.DisplayDialog("Blueprint generation", "This blueprint contains manually edited data. If you regenerate the blueprint, these changes will be lost. Are you sure you want to proceed?", "Ok", "Cancel")) + if (EditorUtility.DisplayDialog("Blueprint generation", "This blueprint already contains data. Are you sure you want to re-generate this blueprint from scratch?", "Ok", "Cancel")) { EditorUtility.SetDirty(target); CoroutineJob job = new CoroutineJob(); - IEnumerator routine = job.Start(blueprint.Generate()); - EditorCoroutine.ShowCoroutineProgressBar("Generating blueprint...", routine); + routine = job.Start(blueprint.Generate()); + EditorCoroutine.ShowCoroutineProgressBar("Generating blueprint...", ref routine); Refresh(); EditorGUIUtility.ExitGUI(); } - else return false; } - return true; } protected virtual bool ValidateBlueprint() { return true; } - private void DrawGenerationControls() - { - GUILayout.BeginHorizontal(); - - float originalLabelWidth = EditorGUIUtility.labelWidth; - EditorGUIUtility.labelWidth = 72; - autoGenerate = EditorGUILayout.ToggleLeft("Auto Generate", autoGenerate, GUILayout.ExpandWidth(false)); - EditorGUIUtility.labelWidth = originalLabelWidth; - - GUI.enabled = !autoGenerate; - if (GUILayout.Button("Generate", GUI.skin.FindStyle("LargeButton"), GUILayout.Height(32))) - Generate(); - - GUILayout.EndHorizontal(); - } - public override void OnInspectorGUI() { + serializedObject.UpdateIfRequiredOrScript(); EditorGUILayout.BeginVertical(EditorStyles.inspectorDefaultMargins); - EditorGUI.BeginChangeCheck(); DrawBlueprintProperties(); - bool blueprintPropertiesChanged = EditorGUI.EndChangeCheck(); - bool blueprintValid = ValidateBlueprint(); GUILayout.Space(10); - - GUI.enabled = blueprintValid; - DrawGenerationControls(); + GUI.enabled = ValidateBlueprint(); + if (GUILayout.Button("Generate", GUI.skin.FindStyle("LargeButton"), GUILayout.Height(32))) + Generate(); GUI.enabled = (blueprint != null && !blueprint.empty && !Application.isPlaying); EditorGUI.BeginChangeCheck(); @@ -209,10 +180,7 @@ namespace Obi if (GUI.changed) { - serializedObject.ApplyModifiedPropertiesWithoutUndo(); - - if (autoGenerate && blueprintValid && blueprintPropertiesChanged) - blueprint.GenerateImmediate(); + serializedObject.ApplyModifiedProperties(); // There might be blueprint editing operations that have no undo entry, so do this to // ensure changes are serialized to disk by Unity. @@ -238,17 +206,51 @@ namespace Obi } } + + [System.Serializable] + protected class SceneStateCache + { + public SceneView view; + public SceneView.SceneViewState state; + } + void EnterBlueprintEditMode() { if (!isEditing) { - ActiveEditorTracker.sharedTracker.isLocked = true; +#if (UNITY_2019_1_OR_NEWER) + SceneView.duringSceneGui -= this.OnSceneGUI; + SceneView.duringSceneGui += this.OnSceneGUI; +#else + SceneView.onSceneGUIDelegate -= this.OnSceneGUI; + SceneView.onSceneGUIDelegate += this.OnSceneGUI; +#endif - string assetPath = AssetDatabase.GetAssetPath(blueprint); - ObiActorBlueprintEditorStage stage = ObiActorBlueprintEditorStage.CreateStage(assetPath, this); - StageUtility.GoToStage(stage, true); + oldSelection = Selection.activeObject; + if (EditorSceneManager.SaveCurrentModifiedScenesIfUserWantsTo()) + { + ActiveEditorTracker.sharedTracker.isLocked = true; - isEditing = true; + oldSetup = EditorSceneManager.GetSceneManagerSetup(); + EditorSceneManager.NewScene(NewSceneSetup.EmptyScene); + + // Set properties for all scene views: + m_SceneStates = new List(); + foreach (SceneView s in SceneView.sceneViews) + { + m_SceneStates.Add(new SceneStateCache { state = new SceneView.SceneViewState(s.sceneViewState), view = s }); + s.sceneViewState.showFlares = false; + s.sceneViewState.alwaysRefresh = false; + s.sceneViewState.showFog = false; + s.sceneViewState.showSkybox = false; + s.sceneViewState.showImageEffects = false; + s.sceneViewState.showParticleSystems = false; + s.Frame(blueprint.bounds); + } + + isEditing = true; + Repaint(); + } } } @@ -256,16 +258,50 @@ namespace Obi { if (isEditing) { - isEditing = false; - AssetDatabase.SaveAssets(); - StageUtility.GoToMainStage(); - } - } - public void CleanupEditor() - { - ActiveEditorTracker.sharedTracker.isLocked = false; - ObiParticleEditorDrawing.DestroyParticlesMesh(); + isEditing = false; + + AssetDatabase.SaveAssets(); + + // Reset all scene views: + foreach (var state in m_SceneStates) + { + if (state.view == null) + continue; + + state.view.sceneViewState.showFog = state.state.showFog; + state.view.sceneViewState.showFlares = state.state.showFlares; + state.view.sceneViewState.alwaysRefresh = state.state.alwaysRefresh; + state.view.sceneViewState.showSkybox = state.state.showSkybox; + state.view.sceneViewState.showImageEffects = state.state.showImageEffects; + state.view.sceneViewState.showParticleSystems = state.state.showParticleSystems; + } + + ActiveEditorTracker.sharedTracker.isLocked = false; + + if (SceneManager.GetActiveScene().path.Length <= 0) + { + if (oldSetup != null && oldSetup.Length > 0) + { + EditorSceneManager.RestoreSceneManagerSetup(oldSetup); + oldSetup = null; + } + else + { + EditorSceneManager.NewScene(NewSceneSetup.DefaultGameObjects); + } + } + + Selection.activeObject = oldSelection; + +#if (UNITY_2019_1_OR_NEWER) + SceneView.duringSceneGui -= this.OnSceneGUI; +#else + SceneView.onSceneGUIDelegate -= this.OnSceneGUI; +#endif + + Repaint(); + } } public virtual void OnSceneGUI(SceneView sceneView) @@ -282,7 +318,7 @@ namespace Obi { // Update camera facing status and world space positions array: - UpdateParticleVisibility(sceneView.camera); + UpdateParticleVisibility(); // Generate sorted indices for back-to-front rendering: for (int i = 0; i < sortedIndices.Length; i++) @@ -303,7 +339,7 @@ namespace Obi UpdateTintColor(); // Draw particle handles: - ObiParticleEditorDrawing.DrawParticles(sceneView.camera, blueprint, visible, tint, sortedIndices, dotRadiusScale); + ObiParticleEditorDrawing.DrawParticles(sceneView.camera, blueprint, activeParticle, visible, tint, sortedIndices, dotRadiusScale); } @@ -334,7 +370,6 @@ namespace Obi { if (blueprint.positions != null) { - activeParticle = Mathf.Min(activeParticle, blueprint.positions.Length - 1); Array.Resize(ref selectionStatus, blueprint.positions.Length); Array.Resize(ref visible, blueprint.positions.Length); Array.Resize(ref tint, blueprint.positions.Length); @@ -378,9 +413,7 @@ namespace Obi public void Refresh() { - // currentProperty might be null after reloading editor during - // asset saving. - currentProperty?.RecalculateMinMax(); + currentProperty.RecalculateMinMax(); // refresh render modes: for (int i = 0; i < renderModes.Count; ++i) @@ -392,7 +425,7 @@ namespace Obi SceneView.RepaintAll(); } - public virtual void UpdateParticleVisibility(Camera cam) + public virtual void UpdateParticleVisibility() { for (int i = 0; i < blueprint.positions.Length; i++) @@ -403,7 +436,7 @@ namespace Obi if (Camera.current != null) { - Vector3 camToParticle = cam.transform.position - blueprint.positions[i]; + Vector3 camToParticle = Camera.current.transform.position - blueprint.positions[i]; sqrDistanceToCamera[i] = camToParticle.sqrMagnitude; } } diff --git a/Assets/Obi/Editor/Common/Blueprints/ObiActorBlueprintEditorStage.cs b/Assets/Obi/Editor/Common/Blueprints/ObiActorBlueprintEditorStage.cs deleted file mode 100644 index 561ee8976..000000000 --- a/Assets/Obi/Editor/Common/Blueprints/ObiActorBlueprintEditorStage.cs +++ /dev/null @@ -1,72 +0,0 @@ -using System; -using System.IO; -using UnityEditor; -using UnityEditor.SceneManagement; -using UnityEngine; - -namespace Obi -{ - [Serializable] - class ObiActorBlueprintEditorStage : PreviewSceneStage - { - ObiActorBlueprintEditor m_BlueprintEditor; - - string m_AssetPath; - public override string assetPath { get { return m_AssetPath; } } - - internal static ObiActorBlueprintEditorStage CreateStage(string assetPath, ObiActorBlueprintEditor avatarEditor) - { - ObiActorBlueprintEditorStage stage = CreateInstance(); - stage.Init(assetPath, avatarEditor); - return stage; - } - - private void Init(string modelAssetPath, ObiActorBlueprintEditor avatarEditor) - { - m_AssetPath = modelAssetPath; - m_BlueprintEditor = avatarEditor; - } - - protected override bool OnOpenStage() - { - base.OnOpenStage(); - - if (!File.Exists(assetPath)) - { - Debug.LogError("ActivateStage called on BlueprintStage with an invalid path: Blueprint file not found " + assetPath); - return false; - } - - return true; - } - - protected override void OnCloseStage() - { - m_BlueprintEditor.CleanupEditor(); - - base.OnCloseStage(); - } - - protected override void OnFirstTimeOpenStageInSceneView(SceneView sceneView) - { - // Frame in scene view - sceneView.Frame(m_BlueprintEditor.blueprint.bounds); - - // Setup Scene view state - sceneView.sceneViewState.showFlares = false; - sceneView.sceneViewState.alwaysRefresh = false; - sceneView.sceneViewState.showFog = false; - sceneView.sceneViewState.showSkybox = false; - sceneView.sceneViewState.showImageEffects = false; - sceneView.sceneViewState.showParticleSystems = false; - sceneView.sceneLighting = true; - } - - protected override GUIContent CreateHeaderContent() - { - return new GUIContent( - "Blueprint Editor", - Resources.Load("Icons/ObiActorBlueprint Icon")); - } - } -} \ No newline at end of file diff --git a/Assets/Obi/Editor/Common/Blueprints/ObiMeshBasedActorBlueprintEditor.cs b/Assets/Obi/Editor/Common/Blueprints/ObiMeshBasedActorBlueprintEditor.cs index 98630677a..2bedb1c7a 100644 --- a/Assets/Obi/Editor/Common/Blueprints/ObiMeshBasedActorBlueprintEditor.cs +++ b/Assets/Obi/Editor/Common/Blueprints/ObiMeshBasedActorBlueprintEditor.cs @@ -18,7 +18,6 @@ namespace Obi } protected Mesh visualizationMesh; - protected Mesh visualizationWireMesh; public ParticleCulling particleCulling = ParticleCulling.Back; protected Material gradientMaterial; @@ -76,50 +75,46 @@ namespace Obi public abstract int VertexToParticle(int vertexIndex); - public override void UpdateParticleVisibility(Camera cam) + public override void UpdateParticleVisibility() { - if (cam != null) + if (sourceMesh != null && Camera.current != null) { - for (int i = 0; i < blueprint.positions.Length; i++) + Vector3[] meshNormals = sourceMesh.normals; + for (int i = 0; i < sourceMesh.vertexCount; i++) { - if (blueprint.IsParticleActive(i)) - { - Vector3 camToParticle = cam.transform.position - blueprint.positions[i]; - sqrDistanceToCamera[i] = camToParticle.sqrMagnitude; + int particle = VertexToParticle(i); - Vector3 normal; + if (particle >= 0 && particle < blueprint.positions.Length) + { + Vector3 camToParticle = Camera.current.transform.position - blueprint.positions[particle]; + + sqrDistanceToCamera[particle] = camToParticle.sqrMagnitude; switch (particleCulling) { case ParticleCulling.Off: - visible[i] = true; + visible[particle] = true; break; case ParticleCulling.Back: - normal = blueprint.restOrientations[i] * Vector3.forward; - visible[i] = Vector3.Dot(normal, camToParticle) > 0; + visible[particle] = Vector3.Dot(meshNormals[i], camToParticle) > 0; break; case ParticleCulling.Front: - normal = blueprint.restOrientations[i] * Vector3.forward; - visible[i] = Vector3.Dot(normal, camToParticle) <= 0; + visible[particle] = Vector3.Dot(meshNormals[i], camToParticle) <= 0; break; } } + } if ((renderModeFlags & 1) != 0) Refresh(); } + } public void DrawGradientMesh(float[] vertexWeights = null, float[] wireframeWeights = null) { - // Due to this Unity bug: https://issuetracker.unity3d.com/issues/drawmeshnow-is-not-drawing-mesh-immediately-dx12 - // we need to create two meshes insteaf of one :( - if (sourceMesh == null) - return; - visualizationMesh = GameObject.Instantiate(sourceMesh); - visualizationWireMesh = GameObject.Instantiate(sourceMesh); if (gradientMaterial.SetPass(0)) { @@ -162,16 +157,15 @@ namespace Obi colors[i] = Color.gray; } - visualizationWireMesh.colors = colors; + visualizationMesh.colors = colors; GL.wireframe = true; - Graphics.DrawMeshNow(visualizationWireMesh, matrix); + Graphics.DrawMeshNow(visualizationMesh, matrix); GL.wireframe = false; } } GameObject.DestroyImmediate(visualizationMesh); - GameObject.DestroyImmediate(visualizationWireMesh); } @@ -229,8 +223,7 @@ namespace Obi RenderTexture.active = tempRT; GL.PushMatrix(); - - var proj = Matrix4x4.Ortho(0, 1, 0, 1, -1, 1); if (Camera.current != null) proj = proj * Camera.current.worldToCameraMatrix.inverse; GL.LoadProjectionMatrix(proj); + GL.LoadProjectionMatrix(Matrix4x4.Ortho(0, 1, 0, 1, -1, 1)); Color[] colors = new Color[sourceMesh.vertexCount]; for (int i = 0; i < colors.Length; i++) diff --git a/Assets/Obi/Editor/Common/Blueprints/ObiParticleEditorDrawing.cs b/Assets/Obi/Editor/Common/Blueprints/ObiParticleEditorDrawing.cs index b3af4d4a8..37cc9734a 100644 --- a/Assets/Obi/Editor/Common/Blueprints/ObiParticleEditorDrawing.cs +++ b/Assets/Obi/Editor/Common/Blueprints/ObiParticleEditorDrawing.cs @@ -32,7 +32,7 @@ namespace Obi GameObject.DestroyImmediate(particlesMesh); } - public static void DrawParticles(Camera cam, ObiActorBlueprint blueprint, bool[] visible, Color[] baseColor, int[] sortedIndices, float radiusScale = 1) + public static void DrawParticles(Camera cam, ObiActorBlueprint blueprint, int activeParticle, bool[] visible, Color[] baseColor, int[] sortedIndices, float radiusScale = 1) { CreateParticlesMesh(); CreateParticleMaterials(); diff --git a/Assets/Obi/Editor/Common/Blueprints/Properties/ObiBlueprintColor.cs b/Assets/Obi/Editor/Common/Blueprints/Properties/ObiBlueprintColor.cs index 83d73b9fd..dfa50af4c 100644 --- a/Assets/Obi/Editor/Common/Blueprints/Properties/ObiBlueprintColor.cs +++ b/Assets/Obi/Editor/Common/Blueprints/Properties/ObiBlueprintColor.cs @@ -22,7 +22,6 @@ namespace Obi public override void Set(int index, Color value) { editor.blueprint.colors[index] = value; - editor.blueprint.edited = true; } public override bool Masked(int index) { diff --git a/Assets/Obi/Editor/Common/Blueprints/Properties/ObiBlueprintFilterCategory.cs b/Assets/Obi/Editor/Common/Blueprints/Properties/ObiBlueprintFilterCategory.cs index acd53eef4..6441902ee 100644 --- a/Assets/Obi/Editor/Common/Blueprints/Properties/ObiBlueprintFilterCategory.cs +++ b/Assets/Obi/Editor/Common/Blueprints/Properties/ObiBlueprintFilterCategory.cs @@ -22,7 +22,6 @@ namespace Obi public override void Set(int index, int value) { editor.blueprint.filters[index] = ObiUtils.MakeFilter(ObiUtils.GetMaskFromFilter(editor.blueprint.filters[index]), value); - editor.blueprint.edited = true; } public override bool Masked(int index) { diff --git a/Assets/Obi/Editor/Common/Blueprints/Properties/ObiBlueprintFilterMask.cs b/Assets/Obi/Editor/Common/Blueprints/Properties/ObiBlueprintFilterMask.cs index 6c2d57b57..42dcc76f4 100644 --- a/Assets/Obi/Editor/Common/Blueprints/Properties/ObiBlueprintFilterMask.cs +++ b/Assets/Obi/Editor/Common/Blueprints/Properties/ObiBlueprintFilterMask.cs @@ -22,7 +22,6 @@ public override void Set(int index, int value) { editor.blueprint.filters[index] = ObiUtils.MakeFilter(value,ObiUtils.GetCategoryFromFilter(editor.blueprint.filters[index])); - editor.blueprint.edited = true; } public override bool Masked(int index) { diff --git a/Assets/Obi/Editor/Common/Blueprints/Properties/ObiBlueprintMass.cs b/Assets/Obi/Editor/Common/Blueprints/Properties/ObiBlueprintMass.cs index 32b0e3dd6..f45dcc2eb 100644 --- a/Assets/Obi/Editor/Common/Blueprints/Properties/ObiBlueprintMass.cs +++ b/Assets/Obi/Editor/Common/Blueprints/Properties/ObiBlueprintMass.cs @@ -23,7 +23,6 @@ namespace Obi public override void Set(int index, float value) { editor.blueprint.invMasses[index] = ObiUtils.MassToInvMass(value); - editor.blueprint.edited = true; } public override bool Masked(int index) { diff --git a/Assets/Obi/Editor/Common/Blueprints/Properties/ObiBlueprintRadius.cs b/Assets/Obi/Editor/Common/Blueprints/Properties/ObiBlueprintRadius.cs index 21f8d384e..2c41466bb 100644 --- a/Assets/Obi/Editor/Common/Blueprints/Properties/ObiBlueprintRadius.cs +++ b/Assets/Obi/Editor/Common/Blueprints/Properties/ObiBlueprintRadius.cs @@ -27,7 +27,6 @@ namespace Obi value = Mathf.Max(0.0000001f, value); float ratio = value / Get(index); editor.blueprint.principalRadii[index] = editor.blueprint.principalRadii[index] * ratio; - editor.blueprint.edited = true; } public override bool Masked(int index) { diff --git a/Assets/Obi/Editor/Common/Blueprints/RenderModes/ObiBlueprintRenderModeMesh.cs b/Assets/Obi/Editor/Common/Blueprints/RenderModes/ObiBlueprintRenderModeMesh.cs index 2f3473b9d..634c56b95 100644 --- a/Assets/Obi/Editor/Common/Blueprints/RenderModes/ObiBlueprintRenderModeMesh.cs +++ b/Assets/Obi/Editor/Common/Blueprints/RenderModes/ObiBlueprintRenderModeMesh.cs @@ -24,10 +24,10 @@ namespace Obi { ObiPaintBrushEditorTool paintTool = (ObiPaintBrushEditorTool)meshBasedEditor.currentTool; - float[] weights = new float[ObiActorBlueprintEditor.selectionStatus.Length]; + float[] weights = new float[editor.selectionStatus.Length]; for (int i = 0; i < weights.Length; i++) { - if (paintTool.selectionMask && !ObiActorBlueprintEditor.selectionStatus[i]) + if (paintTool.selectionMask && !editor.selectionStatus[i]) weights[i] = 0; else weights[i] = 1; diff --git a/Assets/Obi/Editor/Common/Blueprints/RenderModes/ObiBlueprintRenderModeParticles.cs b/Assets/Obi/Editor/Common/Blueprints/RenderModes/ObiBlueprintRenderModeParticles.cs index 47135af02..4465ebfe3 100644 --- a/Assets/Obi/Editor/Common/Blueprints/RenderModes/ObiBlueprintRenderModeParticles.cs +++ b/Assets/Obi/Editor/Common/Blueprints/RenderModes/ObiBlueprintRenderModeParticles.cs @@ -13,13 +13,11 @@ namespace Obi private Shader shader; private Material material; private ParticleImpostorRendering impostorDrawer; - private MaterialPropertyBlock mpb; public ObiBlueprintRenderModeParticles(ObiActorBlueprintEditor editor) :base(editor) { impostorDrawer = new ParticleImpostorRendering(); impostorDrawer.UpdateMeshes(editor.blueprint); - mpb = new MaterialPropertyBlock(); } void CreateMaterialIfNeeded() @@ -45,10 +43,8 @@ namespace Obi public override void DrawWithCamera(Camera camera) { CreateMaterialIfNeeded(); - mpb.SetFloat("_RadiusScale", 1); - mpb.SetColor("_ParticleColor", Color.white); foreach (Mesh mesh in impostorDrawer.Meshes) - Graphics.DrawMesh(mesh, Matrix4x4.identity, material, 0, camera, 0, mpb); + Graphics.DrawMesh(mesh, Matrix4x4.identity, material, 0, camera); } public override void Refresh() diff --git a/Assets/Obi/Editor/Common/Collisions/ObiColliderEditor.cs b/Assets/Obi/Editor/Common/Collisions/ObiColliderEditor.cs index 548574a92..310bbddb8 100644 --- a/Assets/Obi/Editor/Common/Collisions/ObiColliderEditor.cs +++ b/Assets/Obi/Editor/Common/Collisions/ObiColliderEditor.cs @@ -1,12 +1,11 @@ using UnityEditor; using UnityEngine; -namespace Obi -{ - - [CustomEditor(typeof(ObiColliderBase), true), CanEditMultipleObjects] - public class ObiColliderEditor : Editor - { +namespace Obi{ + + [CustomEditor(typeof(ObiColliderBase), true), CanEditMultipleObjects] + public class ObiColliderEditor : Editor + { ObiColliderBase collider; SerializedProperty collisionFilter; @@ -17,42 +16,11 @@ namespace Obi collisionFilter = serializedObject.FindProperty("filter"); } - protected void NonReadableMeshWarning(Mesh mesh) - { - EditorGUILayout.BeginVertical(EditorStyles.helpBox); - Texture2D icon = EditorGUIUtility.Load("icons/console.erroricon.png") as Texture2D; - EditorGUILayout.LabelField(new GUIContent("The input mesh is not readable. Read/Write must be enabled in the mesh import settings.", icon), EditorStyles.wordWrappedMiniLabel); - - EditorGUILayout.BeginHorizontal(); - GUILayout.FlexibleSpace(); - if (GUILayout.Button("Fix now", GUILayout.MaxWidth(100), GUILayout.MinHeight(32))) - { - string assetPath = AssetDatabase.GetAssetPath(mesh); - ModelImporter modelImporter = AssetImporter.GetAtPath(assetPath) as ModelImporter; - if (modelImporter != null) - { - modelImporter.isReadable = true; - } - modelImporter.SaveAndReimport(); - } - EditorGUILayout.EndHorizontal(); - EditorGUILayout.EndVertical(); - } - public override void OnInspectorGUI() { serializedObject.UpdateIfRequiredOrScript(); - foreach (ObiColliderBase t in targets) - { - ObiMeshShapeTracker meshTracker = t.Tracker as ObiMeshShapeTracker; - if (meshTracker != null) - { - if (meshTracker.targetMesh != null && !meshTracker.targetMesh.isReadable) - NonReadableMeshWarning(meshTracker.targetMesh); - } - } var rect = EditorGUILayout.GetControlRect(); var label = EditorGUI.BeginProperty(rect, new GUIContent("Collision category"), collisionFilter); @@ -88,13 +56,8 @@ namespace Obi } EditorGUI.EndProperty(); - DrawPropertiesExcluding(serializedObject, "m_Script", "CollisionMaterial", "filter", "Thickness", "Inverted"); - foreach (ObiColliderBase t in targets) - { - if (!t.gameObject.isStatic) - t.ForceUpdate(); - } + DrawPropertiesExcluding(serializedObject, "m_Script", "CollisionMaterial", "filter", "Thickness"); // Apply changes to the serializedProperty if (GUI.changed) diff --git a/Assets/Obi/Editor/Common/Collisions/ObiDistanceFieldEditor.cs b/Assets/Obi/Editor/Common/Collisions/ObiDistanceFieldEditor.cs index 1ca4989cb..2e205425e 100644 --- a/Assets/Obi/Editor/Common/Collisions/ObiDistanceFieldEditor.cs +++ b/Assets/Obi/Editor/Common/Collisions/ObiDistanceFieldEditor.cs @@ -68,7 +68,7 @@ namespace Obi{ EditorUtility.SetDirty(target); CoroutineJob job = new CoroutineJob(); routine = job.Start( distanceField.Generate()); - EditorCoroutine.ShowCoroutineProgressBar("Generating distance field", routine); + EditorCoroutine.ShowCoroutineProgressBar("Generating distance field",ref routine); UpdatePreview(); EditorGUIUtility.ExitGUI(); } diff --git a/Assets/Obi/Editor/Common/Collisions/ObiForceZoneEditor.cs b/Assets/Obi/Editor/Common/Collisions/ObiForceZoneEditor.cs deleted file mode 100644 index 884ac4c0e..000000000 --- a/Assets/Obi/Editor/Common/Collisions/ObiForceZoneEditor.cs +++ /dev/null @@ -1,30 +0,0 @@ -using UnityEditor; -using UnityEngine; - -namespace Obi -{ - - /** - * Custom inspector for ObiForceZone component. - */ - - [CustomEditor(typeof(ObiForceZone)), CanEditMultipleObjects] - public class ObiForceZoneEditor : Editor - { - - public override void OnInspectorGUI() - { - - serializedObject.UpdateIfRequiredOrScript(); - - DrawPropertiesExcluding(serializedObject, "m_Script"); - - // Apply changes to the serializedProperty - if (GUI.changed) - serializedObject.ApplyModifiedProperties(); - } - - } - -} - diff --git a/Assets/Obi/Editor/Common/Constraints/ObiConstraintParametersDrawer.cs b/Assets/Obi/Editor/Common/Constraints/ObiConstraintParametersDrawer.cs index 579843b35..65fb7e83f 100644 --- a/Assets/Obi/Editor/Common/Constraints/ObiConstraintParametersDrawer.cs +++ b/Assets/Obi/Editor/Common/Constraints/ObiConstraintParametersDrawer.cs @@ -24,20 +24,10 @@ namespace Obi GUI.Box(position,"",ObiEditorUtils.GetToggleablePropertyGroupStyle()); GUI.enabled = true; - // Draw main constraint toggle: - EditorGUI.BeginProperty(position, label, enabled); - EditorGUI.BeginChangeCheck(); - var newEnabled = EditorGUI.ToggleLeft(contRect, label.text, enabled.boolValue, EditorStyles.boldLabel); - // Only assign the value back if it was actually changed by the user. - // Otherwise a single value will be assigned to all objects when multi-object editing, - // even when the user didn't touch the control. - if (EditorGUI.EndChangeCheck()) - { - enabled.boolValue = newEnabled; - } - EditorGUI.EndProperty(); + // Draw main constraint toggle: + enabled.boolValue = EditorGUI.ToggleLeft(contRect, label.text, enabled.boolValue, EditorStyles.boldLabel); - if (enabled.boolValue){ + if (enabled.boolValue){ Rect evalRect = new Rect(position.x+padding, position.y+propHeight+padding, position.width-padding*2, propHeight); Rect iterRect = new Rect(position.x+padding, position.y+propHeight*2+padding, position.width-padding*2, propHeight); diff --git a/Assets/Obi/Scripts/Common/ObiEditorSettings.cs b/Assets/Obi/Editor/Common/ObiEditorSettings.cs similarity index 86% rename from Assets/Obi/Scripts/Common/ObiEditorSettings.cs rename to Assets/Obi/Editor/Common/ObiEditorSettings.cs index 1a48a23fb..94d9ce99d 100644 --- a/Assets/Obi/Scripts/Common/ObiEditorSettings.cs +++ b/Assets/Obi/Editor/Common/ObiEditorSettings.cs @@ -1,12 +1,10 @@ using UnityEngine; - -#if UNITY_EDITOR using UnityEditor; -#endif +using System.Collections; namespace Obi { - public class ObiEditorSettings : ScriptableObject + class ObiEditorSettings : ScriptableObject { public const string m_ObiEditorSettingsPath = "Assets/ObiEditorSettings.asset"; @@ -16,7 +14,6 @@ namespace Obi [SerializeField] private Color m_SelectedParticle; [SerializeField] private Color m_ActiveParticle; [SerializeField] private Gradient m_PropertyGradient; - [SerializeField] private bool m_ParticlePicking; public Color brushColor { @@ -42,13 +39,8 @@ namespace Obi { get { return m_PropertyGradient; } } - public bool sceneViewParticlePicking - { - get { return m_ParticlePicking; } - } -#if UNITY_EDITOR - public static ObiEditorSettings GetOrCreateSettings() + internal static ObiEditorSettings GetOrCreateSettings() { var settings = AssetDatabase.LoadAssetAtPath(m_ObiEditorSettingsPath); if (settings == null) @@ -60,7 +52,6 @@ namespace Obi settings.m_SelectedParticle = new Color32(243, 77, 43, 255); settings.m_ActiveParticle = new Color32(243, 243, 43, 255); settings.m_PropertyGradient = new Gradient(); - settings.m_ParticlePicking = true; // Populate the color keys at the relative time 0 and 1 (0 and 100%) var colorKey = new GradientColorKey[2]; @@ -84,11 +75,9 @@ namespace Obi return settings; } - - public static SerializedObject GetSerializedSettings() + internal static SerializedObject GetSerializedSettings() { return new SerializedObject(GetOrCreateSettings()); } -#endif } } \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/ObiEditorSettings.cs.meta b/Assets/Obi/Editor/Common/ObiEditorSettings.cs.meta similarity index 100% rename from Assets/Obi/Scripts/Common/ObiEditorSettings.cs.meta rename to Assets/Obi/Editor/Common/ObiEditorSettings.cs.meta diff --git a/Assets/Obi/Editor/Common/ObiOniInitialize.cs b/Assets/Obi/Editor/Common/ObiOniInitialize.cs new file mode 100644 index 000000000..49c1e0fb0 --- /dev/null +++ b/Assets/Obi/Editor/Common/ObiOniInitialize.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using UnityEditor; + +namespace Obi +{ + [InitializeOnLoad] + public class ObiOniInitialize + { + private static BuildTargetGroup[] supportedBuildTargetGroups = + { + BuildTargetGroup.Standalone, + BuildTargetGroup.Android, + BuildTargetGroup.iOS + }; + + static ObiOniInitialize() + { + + foreach(var group in supportedBuildTargetGroups) + { + var defines = GetDefinesList(group); + if (!defines.Contains("OBI_ONI_SUPPORTED")) + { + defines.Add("OBI_ONI_SUPPORTED"); + PlayerSettings.SetScriptingDefineSymbolsForGroup(group, string.Join(";", defines.ToArray())); + } + } + } + + private static List GetDefinesList(BuildTargetGroup group) + { + return new List(PlayerSettings.GetScriptingDefineSymbolsForGroup(group).Split(';')); + } + } +} diff --git a/Assets/Obi/Editor/Common/Utils/ObiFoamGeneratorEditor.cs.meta b/Assets/Obi/Editor/Common/ObiOniInitialize.cs.meta similarity index 83% rename from Assets/Obi/Editor/Common/Utils/ObiFoamGeneratorEditor.cs.meta rename to Assets/Obi/Editor/Common/ObiOniInitialize.cs.meta index baab18072..6551e37e3 100644 --- a/Assets/Obi/Editor/Common/Utils/ObiFoamGeneratorEditor.cs.meta +++ b/Assets/Obi/Editor/Common/ObiOniInitialize.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: b9656e2c54d9e4c478c74ca6d97428f8 +guid: e97d151316d5f4d16ac5ae6e68acccb6 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Obi/Editor/Common/ObiSettingsProvider.cs b/Assets/Obi/Editor/Common/ObiSettingsProvider.cs index a03cb52b5..168c3046e 100644 --- a/Assets/Obi/Editor/Common/ObiSettingsProvider.cs +++ b/Assets/Obi/Editor/Common/ObiSettingsProvider.cs @@ -15,9 +15,7 @@ namespace Obi public static GUIContent brushWireframe = new GUIContent("Brush wireframe"); public static GUIContent particle = new GUIContent("Particle"); public static GUIContent selectedParticle = new GUIContent("Selected particle"); - public static GUIContent activeParticle = new GUIContent("Active particle"); public static GUIContent propertyGradient = new GUIContent("Property gradient"); - public static GUIContent particlePicking = new GUIContent("Particle GO picking"); } const string m_ObiEditorSettingsPath = "Assets/ObiEditorSettings.asset"; @@ -54,11 +52,7 @@ namespace Obi EditorGUILayout.PropertyField(m_ObiSettings.FindProperty("m_BrushWireframe"),Styles.brushWireframe); EditorGUILayout.PropertyField(m_ObiSettings.FindProperty("m_Particle"),Styles.particle); EditorGUILayout.PropertyField(m_ObiSettings.FindProperty("m_SelectedParticle"),Styles.selectedParticle); - EditorGUILayout.PropertyField(m_ObiSettings.FindProperty("m_ActiveParticle"), Styles.activeParticle); EditorGUILayout.PropertyField(m_ObiSettings.FindProperty("m_PropertyGradient"), Styles.propertyGradient); - - EditorGUILayout.LabelField("Scene view", EditorStyles.boldLabel); - EditorGUILayout.PropertyField(m_ObiSettings.FindProperty("m_ParticlePicking"), Styles.particlePicking); } // Register the SettingsProvider diff --git a/Assets/Obi/Editor/Common/Solver/ObiSolverEditor.cs b/Assets/Obi/Editor/Common/Solver/ObiSolverEditor.cs index bf3eebebb..1c9e190b7 100644 --- a/Assets/Obi/Editor/Common/Solver/ObiSolverEditor.cs +++ b/Assets/Obi/Editor/Common/Solver/ObiSolverEditor.cs @@ -1,6 +1,5 @@ using UnityEditor; using UnityEngine; -using UnityEditor.IMGUI.Controls; using UnityEditorInternal; using System; using System.Collections; @@ -41,34 +40,13 @@ namespace Obi ObiSolver solver; SerializedProperty backend; - SerializedProperty substeps; - SerializedProperty maxStepsPerFrame; - SerializedProperty synchronization; SerializedProperty simulateWhenInvisible; SerializedProperty parameters; SerializedProperty gravity; SerializedProperty gravitySpace; - SerializedProperty ambientWind; - SerializedProperty windSpace; - SerializedProperty useLimits; - SerializedProperty boundaryLimits; - SerializedProperty killOffLimitsParticles; SerializedProperty worldLinearInertiaScale; SerializedProperty worldAngularInertiaScale; - SerializedProperty foamSubsteps; - SerializedProperty foamMinNeighbors; - SerializedProperty foamCollisions; - SerializedProperty foamRadiusScale; - SerializedProperty foamVolumeDensity; - SerializedProperty foamAmbientDensity; - SerializedProperty foamScatterColor; - SerializedProperty foamAmbientColor; - SerializedProperty maxFoamVelocityStretch; - SerializedProperty foamFade; - SerializedProperty foamAccelAgingRange; - SerializedProperty foamAccelAging; - SerializedProperty distanceConstraintParameters; SerializedProperty bendingConstraintParameters; SerializedProperty particleCollisionConstraintParameters; @@ -80,72 +58,37 @@ namespace Obi SerializedProperty shapeMatchingConstraintParameters; SerializedProperty tetherConstraintParameters; SerializedProperty pinConstraintParameters; - SerializedProperty pinholeConstraintParameters; SerializedProperty stitchConstraintParameters; SerializedProperty densityConstraintParameters; SerializedProperty stretchShearConstraintParameters; SerializedProperty bendTwistConstraintParameters; SerializedProperty chainConstraintParameters; - SerializedProperty maxSurfaceChunks; - SerializedProperty maxQueryResults; - SerializedProperty maxFoamParticles; - SerializedProperty maxParticleNeighbors; - SerializedProperty maxParticleContacts; - BooleanPreference solverFoldout; BooleanPreference simulationFoldout; - BooleanPreference advectionFoldout; BooleanPreference collisionsFoldout; BooleanPreference constraintsFoldout; - BooleanPreference memoryFoldout; GUIContent constraintLabelContent; - BoxBoundsHandle limitsBoxHandle; - public void OnEnable() { solver = (ObiSolver)target; constraintLabelContent = new GUIContent(); - limitsBoxHandle = new BoxBoundsHandle(); solverFoldout = new BooleanPreference($"{target.GetType()}.solverFoldout", true); simulationFoldout = new BooleanPreference($"{target.GetType()}.simulationFoldout", false); - advectionFoldout = new BooleanPreference($"{target.GetType()}.advectionFoldout", false); collisionsFoldout = new BooleanPreference($"{target.GetType()}.collisionsFoldout", false); constraintsFoldout = new BooleanPreference($"{target.GetType()}.constraintsFoldout", false); - memoryFoldout = new BooleanPreference($"{target.GetType()}.memoryFoldout", false); backend = serializedObject.FindProperty("m_Backend"); - substeps = serializedObject.FindProperty("substeps"); - maxStepsPerFrame = serializedObject.FindProperty("maxStepsPerFrame"); - synchronization = serializedObject.FindProperty("synchronization"); simulateWhenInvisible = serializedObject.FindProperty("simulateWhenInvisible"); parameters = serializedObject.FindProperty("parameters"); gravity = serializedObject.FindProperty("gravity"); gravitySpace = serializedObject.FindProperty("gravitySpace"); - ambientWind = serializedObject.FindProperty("ambientWind"); - windSpace = serializedObject.FindProperty("windSpace"); - useLimits = serializedObject.FindProperty("useLimits"); - boundaryLimits = serializedObject.FindProperty("boundaryLimits"); - killOffLimitsParticles = serializedObject.FindProperty("killOffLimitsParticles"); worldLinearInertiaScale = serializedObject.FindProperty("worldLinearInertiaScale"); worldAngularInertiaScale = serializedObject.FindProperty("worldAngularInertiaScale"); - foamSubsteps = serializedObject.FindProperty("foamSubsteps"); - foamMinNeighbors = serializedObject.FindProperty("foamMinNeighbors"); - foamCollisions = serializedObject.FindProperty("foamCollisions"); - foamRadiusScale = serializedObject.FindProperty("foamRadiusScale"); - foamVolumeDensity = serializedObject.FindProperty("foamVolumeDensity"); - foamAmbientDensity = serializedObject.FindProperty("foamAmbientDensity"); - foamScatterColor = serializedObject.FindProperty("foamScatterColor"); - foamAmbientColor = serializedObject.FindProperty("foamAmbientColor"); - maxFoamVelocityStretch = serializedObject.FindProperty("maxFoamVelocityStretch"); - foamFade = serializedObject.FindProperty("foamFade"); - foamAccelAgingRange = serializedObject.FindProperty("foamAccelAgingRange"); - foamAccelAging = serializedObject.FindProperty("foamAccelAging"); - distanceConstraintParameters = serializedObject.FindProperty("distanceConstraintParameters"); bendingConstraintParameters = serializedObject.FindProperty("bendingConstraintParameters"); particleCollisionConstraintParameters = serializedObject.FindProperty("particleCollisionConstraintParameters"); @@ -157,45 +100,19 @@ namespace Obi shapeMatchingConstraintParameters = serializedObject.FindProperty("shapeMatchingConstraintParameters"); tetherConstraintParameters = serializedObject.FindProperty("tetherConstraintParameters"); pinConstraintParameters = serializedObject.FindProperty("pinConstraintParameters"); - pinholeConstraintParameters = serializedObject.FindProperty("pinholeConstraintParameters"); stitchConstraintParameters = serializedObject.FindProperty("stitchConstraintParameters"); densityConstraintParameters = serializedObject.FindProperty("densityConstraintParameters"); stretchShearConstraintParameters = serializedObject.FindProperty("stretchShearConstraintParameters"); bendTwistConstraintParameters = serializedObject.FindProperty("bendTwistConstraintParameters"); chainConstraintParameters = serializedObject.FindProperty("chainConstraintParameters"); - - maxSurfaceChunks = serializedObject.FindProperty("m_MaxSurfaceChunks"); - maxQueryResults = serializedObject.FindProperty("maxQueryResults"); - maxFoamParticles = serializedObject.FindProperty("maxFoamParticles"); - maxParticleNeighbors = serializedObject.FindProperty("maxParticleNeighbors"); - maxParticleContacts = serializedObject.FindProperty("maxParticleContacts"); - } - - public void OnSceneGUI() - { - if (solver.useLimits) - { - using (new Handles.DrawingScope(Color.red, solver.transform.localToWorldMatrix)) - { - limitsBoxHandle.center = solver.boundaryLimits.center; - limitsBoxHandle.size = solver.boundaryLimits.size; - - EditorGUI.BeginChangeCheck(); - limitsBoxHandle.DrawHandle(); - if (EditorGUI.EndChangeCheck()) - { - solver.boundaryLimits = new Bounds(limitsBoxHandle.center, limitsBoxHandle.size); - EditorUtility.SetDirty(target); - } - } - } } public override void OnInspectorGUI() { + serializedObject.UpdateIfRequiredOrScript(); - EditorGUILayout.HelpBox("Particles:" + solver.allocParticleCount + "\n" + - "Simplices:" + solver.simplexCounts.simplexCount + "\n" + + EditorGUILayout.HelpBox("Particles:" + solver.allocParticleCount +"\n"+ + "Simplices:" + solver.simplexCounts.simplexCount+"\n" + "Contacts:" + solver.contactCount + "\n" + "Simplex contacts:" + solver.particleContactCount, MessageType.None); @@ -206,14 +123,13 @@ namespace Obi EditorGUILayout.PropertyField(backend); #if !(OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) - if (backend.enumValueIndex == (int)ObiSolver.BackendType.Burst) - EditorGUILayout.HelpBox("The Burst backend depends on the following packages: Mathematics, Collections, Jobs and Burst. Please install the required dependencies. The solver will try to fall back to the Compute backend instead.", MessageType.Warning); + if (backend.enumValueIndex == (int)ObiSolver.BackendType.Burst) + EditorGUILayout.HelpBox("The Burst backend depends on the following packages: Mathematics, Collections, Jobs and Burst. The default backend (Oni) will be used instead, if possible.", MessageType.Warning); +#endif +#if !(OBI_ONI_SUPPORTED) + if (backend.enumValueIndex == (int)ObiSolver.BackendType.Oni) + EditorGUILayout.HelpBox("The Oni backend is not compatible with the target platform. Please switch to a compatible platform, or use the Burst backend instead.", MessageType.Warning); #endif - if (!SystemInfo.supportsComputeShaders) - { - EditorGUILayout.HelpBox("This platform doesn't support compute shaders. Please switch to the Burst backend.", MessageType.Error); - } - if (EditorGUI.EndChangeCheck()) { @@ -222,11 +138,9 @@ namespace Obi (t as ObiSolver).UpdateBackend(); } + EditorGUILayout.PropertyField(parameters.FindPropertyRelative("mode")); EditorGUILayout.PropertyField(parameters.FindPropertyRelative("interpolation")); - EditorGUILayout.PropertyField(synchronization); - EditorGUILayout.PropertyField(substeps); - EditorGUILayout.PropertyField(maxStepsPerFrame); } EditorGUILayout.EndFoldoutHeaderGroup(); @@ -235,57 +149,24 @@ namespace Obi { EditorGUILayout.PropertyField(gravitySpace); EditorGUILayout.PropertyField(gravity); - EditorGUILayout.PropertyField(windSpace); - EditorGUILayout.PropertyField(ambientWind); EditorGUILayout.PropertyField(parameters.FindPropertyRelative("sleepThreshold")); - EditorGUILayout.PropertyField(parameters.FindPropertyRelative("maxVelocity")); - EditorGUILayout.PropertyField(parameters.FindPropertyRelative("maxAngularVelocity")); EditorGUILayout.PropertyField(parameters.FindPropertyRelative("damping")); EditorGUILayout.PropertyField(worldLinearInertiaScale); EditorGUILayout.PropertyField(worldAngularInertiaScale); EditorGUILayout.PropertyField(parameters.FindPropertyRelative("maxAnisotropy")); EditorGUILayout.PropertyField(simulateWhenInvisible); - EditorGUILayout.PropertyField(useLimits); - if (useLimits.boolValue) - { - EditorGUI.indentLevel++; - EditorGUILayout.PropertyField(killOffLimitsParticles); - EditorGUILayout.PropertyField(boundaryLimits); - EditorGUI.indentLevel--; - } - } - EditorGUILayout.EndFoldoutHeaderGroup(); - - advectionFoldout.value = EditorGUILayout.BeginFoldoutHeaderGroup(advectionFoldout, "Foam settings"); - if (advectionFoldout) - { - EditorGUILayout.PropertyField(foamSubsteps); - EditorGUILayout.PropertyField(foamMinNeighbors); - EditorGUILayout.PropertyField(foamCollisions, new GUIContent("Foam Collisions (Compute only)")); - EditorGUILayout.PropertyField(foamRadiusScale); - EditorGUILayout.PropertyField(foamVolumeDensity); - EditorGUILayout.PropertyField(foamAmbientDensity); - EditorGUILayout.PropertyField(foamScatterColor); - EditorGUILayout.PropertyField(foamAmbientColor); - EditorGUILayout.PropertyField(maxFoamVelocityStretch); - EditorGUILayout.PropertyField(parameters.FindPropertyRelative("foamGravityScale")); - EditorGUILayout.PropertyField(foamFade); - EditorGUILayout.PropertyField(foamAccelAgingRange); - EditorGUILayout.PropertyField(foamAccelAging); } EditorGUILayout.EndFoldoutHeaderGroup(); collisionsFoldout.value = EditorGUILayout.BeginFoldoutHeaderGroup(collisionsFoldout, "Collision settings"); if (collisionsFoldout) { - EditorGUILayout.PropertyField(parameters.FindPropertyRelative("colliderCCD")); - EditorGUILayout.PropertyField(parameters.FindPropertyRelative("particleCCD")); + EditorGUILayout.PropertyField(parameters.FindPropertyRelative("continuousCollisionDetection")); EditorGUILayout.PropertyField(parameters.FindPropertyRelative("collisionMargin")); EditorGUILayout.PropertyField(parameters.FindPropertyRelative("maxDepenetration")); EditorGUILayout.PropertyField(parameters.FindPropertyRelative("shockPropagation")); EditorGUILayout.PropertyField(parameters.FindPropertyRelative("surfaceCollisionIterations")); EditorGUILayout.PropertyField(parameters.FindPropertyRelative("surfaceCollisionTolerance")); - EditorGUILayout.PropertyField(parameters.FindPropertyRelative("diffusionMask")); } EditorGUILayout.EndFoldoutHeaderGroup(); @@ -325,9 +206,6 @@ namespace Obi constraintLabelContent.text = "Pin"; EditorGUILayout.PropertyField(pinConstraintParameters, constraintLabelContent); - constraintLabelContent.text = "Pinhole"; - EditorGUILayout.PropertyField(pinholeConstraintParameters, constraintLabelContent); - constraintLabelContent.text = "Stitch"; EditorGUILayout.PropertyField(stitchConstraintParameters, constraintLabelContent); @@ -345,46 +223,13 @@ namespace Obi } EditorGUILayout.EndFoldoutHeaderGroup(); - memoryFoldout.value = EditorGUILayout.BeginFoldoutHeaderGroup(memoryFoldout, "Memory budget"); - if (memoryFoldout) - { - EditorGUILayout.PropertyField(maxQueryResults); - EditorGUILayout.PropertyField(maxFoamParticles); - - EditorGUI.BeginChangeCheck(); - EditorGUILayout.PropertyField(maxSurfaceChunks); - if (EditorGUI.EndChangeCheck()) - { - serializedObject.ApplyModifiedProperties(); - foreach (var t in targets) - (t as ObiSolver).dirtyRendering |= (int)Oni.RenderingSystemType.Fluid; - } - - EditorGUILayout.PropertyField(maxParticleNeighbors); - EditorGUILayout.PropertyField(maxParticleContacts); - - uint usedChunks = solver.usedSurfaceChunks; - float usagePercentage = usedChunks / (float)maxSurfaceChunks.intValue; - uint foamParticles = solver.initialized ? solver.implementation.activeFoamParticleCount : 0; - - // memory consumption per chunk: - // (8 + 12 + 64*4 + 64*6*4 + 64*16) = 2836 bytes - EditorGUILayout.HelpBox("Active foam particles: " + foamParticles + "/" + maxFoamParticles.intValue + "\n"+ - "Surface memory (Mb): " + string.Format("{0:N2}", maxSurfaceChunks.intValue * 0.002836f)+ "\n"+ - "Used surface chunks: "+ usedChunks + "/"+ maxSurfaceChunks.intValue + ", hashtable usage "+ string.Format("{0:N1}", usagePercentage * 100) + "%", MessageType.None); - - if (usagePercentage >= 0.5f) - { - EditorGUILayout.HelpBox("Hashtable usage should be below 50% for best performance. Increase max surface chunks if % is too high.", MessageType.Warning); - } - } - EditorGUILayout.EndFoldoutHeaderGroup(); - // Apply changes to the serializedProperty if (GUI.changed) { + serializedObject.ApplyModifiedProperties(); solver.PushSolverParameters(); + } } @@ -392,12 +237,15 @@ namespace Obi [DrawGizmo(GizmoType.InSelectionHierarchy | GizmoType.Selected)] static void DrawGizmoForSolver(ObiSolver solver, GizmoType gizmoType) { + if ((gizmoType & GizmoType.InSelectionHierarchy) != 0) { + Gizmos.color = new Color(1, 1, 1, 0.5f); - var bounds = solver.bounds; + Bounds bounds = solver.Bounds; Gizmos.DrawWireCube(bounds.center, bounds.size); } + } } diff --git a/Assets/Obi/Editor/Common/Utils/ObiEditorUtils.cs b/Assets/Obi/Editor/Common/Utils/ObiEditorUtils.cs index be05d5a30..c3e8d2b15 100644 --- a/Assets/Obi/Editor/Common/Utils/ObiEditorUtils.cs +++ b/Assets/Obi/Editor/Common/Utils/ObiEditorUtils.cs @@ -4,7 +4,6 @@ using UnityEngine.SceneManagement; using UnityEditor; using UnityEditor.SceneManagement; using System.IO; -using UnityEngine.Rendering; namespace Obi{ @@ -128,7 +127,17 @@ namespace Obi{ public static GameObject CreateNewSolver() { // Root for the actors. - var root = new GameObject("Obi Solver", typeof(ObiSolver)); + var root = new GameObject("Obi Solver"); + ObiSolver solver = root.AddComponent(); + + // Try to find a fixed updater in the scene (though other kinds of updaters can exist, updating in FixedUpdate is the preferred option). + ObiFixedUpdater updater = StageUtility.GetCurrentStageHandle().FindComponentOfType(); + // If we could not find an fixed updater in the scene, add one to the solver object. + if (updater == null) + updater = root.AddComponent(); + + // Add the solver to the updater: + updater.solvers.Add(solver); // Works for all stages. StageUtility.PlaceGameObjectInCurrentStage(root); @@ -221,34 +230,7 @@ namespace Obi{ // Return the currently selected item's index return selected; } - - public static void DrawArrowHandle(Vector3 posA, Vector3 posB, float headAngle = 30, float headLength = 0.18f) { - Handles.DrawLine(posA, posB); - - var look = Quaternion.LookRotation(posA - posB, Camera.current.transform.forward); - var one = look * Quaternion.Euler(0, 180 + headAngle, 0) * new Vector3(0, 0, 1); - var two = look * Quaternion.Euler(0, 180 - headAngle, 0) * new Vector3(0, 0, 1); - - var sizeA = HandleUtility.GetHandleSize(posA) * headLength; - Handles.DrawLine(posA, posA + one * sizeA); - Handles.DrawLine(posA, posA + two * sizeA); - - var sizeB = HandleUtility.GetHandleSize(posB) * headLength; - Handles.DrawLine(posB, posB - one * sizeB); - Handles.DrawLine(posB, posB - two * sizeB); } - - public static Material GetDefaultMaterial() - { - if (GraphicsSettings.defaultRenderPipeline != null) - { - return GraphicsSettings.defaultRenderPipeline.defaultMaterial; - } - else - { - return AssetDatabase.GetBuiltinExtraResource("Default-Diffuse.mat"); - } - } - } + } } diff --git a/Assets/Obi/Editor/Common/Utils/ObiFoamGeneratorEditor.cs b/Assets/Obi/Editor/Common/Utils/ObiFoamGeneratorEditor.cs deleted file mode 100644 index 42d4e21df..000000000 --- a/Assets/Obi/Editor/Common/Utils/ObiFoamGeneratorEditor.cs +++ /dev/null @@ -1,24 +0,0 @@ -using UnityEditor; -using UnityEngine; - -namespace Obi -{ - - [CustomEditor(typeof(ObiFoamGenerator)), CanEditMultipleObjects] - public class ObiFoamGeneratorEditor : Editor - { - public override void OnInspectorGUI() - { - serializedObject.UpdateIfRequiredOrScript(); - - DrawPropertiesExcluding(serializedObject, "m_Script"); - - // Apply changes to the serializedProperty - if (GUI.changed) - serializedObject.ApplyModifiedProperties(); - } - - } - -} - diff --git a/Assets/Obi/Editor/Common/Utils/ObiParticleAttachmentEditor.cs b/Assets/Obi/Editor/Common/Utils/ObiParticleAttachmentEditor.cs index b9f0bf988..5b34b8eca 100644 --- a/Assets/Obi/Editor/Common/Utils/ObiParticleAttachmentEditor.cs +++ b/Assets/Obi/Editor/Common/Utils/ObiParticleAttachmentEditor.cs @@ -15,7 +15,6 @@ namespace Obi SerializedProperty targetTransform; SerializedProperty particleGroup; SerializedProperty attachmentType; - SerializedProperty projectPosition; SerializedProperty constrainOrientation; SerializedProperty compliance; SerializedProperty breakThreshold; @@ -29,10 +28,9 @@ namespace Obi targetTransform = serializedObject.FindProperty("m_Target"); particleGroup = serializedObject.FindProperty("m_ParticleGroup"); attachmentType = serializedObject.FindProperty("m_AttachmentType"); - projectPosition = serializedObject.FindProperty("m_Projection"); constrainOrientation = serializedObject.FindProperty("m_ConstrainOrientation"); compliance = serializedObject.FindProperty("m_Compliance"); - breakThreshold = serializedObject.FindProperty("breakThreshold"); + breakThreshold = serializedObject.FindProperty("m_BreakThreshold"); } public override void OnInspectorGUI() @@ -57,16 +55,7 @@ namespace Obi } } - EditorGUI.BeginChangeCheck(); - Transform trget = EditorGUILayout.ObjectField("Target", attachment.target, typeof(Transform), true) as Transform; - if (EditorGUI.EndChangeCheck()) - { - Undo.RecordObject(attachment, "Set target"); - attachment.target = trget; - PrefabUtility.RecordPrefabInstancePropertyModifications(attachment); - } - - + EditorGUILayout.PropertyField(targetTransform, new GUIContent("Target")); var blueprint = attachment.actor.sourceBlueprint; if (blueprint != null) @@ -100,7 +89,6 @@ namespace Obi if (attachment.attachmentType == ObiParticleAttachment.AttachmentType.Dynamic) { - EditorGUILayout.PropertyField(projectPosition, new GUIContent("Projection")); EditorGUILayout.PropertyField(compliance, new GUIContent("Compliance")); EditorGUILayout.PropertyField(breakThreshold, new GUIContent("Break threshold")); } diff --git a/Assets/Obi/Editor/ObiStitcherEditor.cs b/Assets/Obi/Editor/ObiStitcherEditor.cs index 0c4b395ba..79af13d72 100644 --- a/Assets/Obi/Editor/ObiStitcherEditor.cs +++ b/Assets/Obi/Editor/ObiStitcherEditor.cs @@ -42,9 +42,6 @@ namespace Obi{ if (EditorGUI.EndChangeCheck()){ Undo.RecordObject(stitcher, "Set first actor"); stitcher.Actor1 = actor1; - if (actor1 != null) - sewingToolHandle1 = actor1.transform.position; - PrefabUtility.RecordPrefabInstancePropertyModifications(stitcher); } EditorGUI.BeginChangeCheck(); @@ -52,10 +49,7 @@ namespace Obi{ if (EditorGUI.EndChangeCheck()){ Undo.RecordObject(stitcher, "Set second actor"); stitcher.Actor2 = actor2; - if (actor2 != null) - sewingToolHandle2 = actor2.transform.position; - PrefabUtility.RecordPrefabInstancePropertyModifications(stitcher); - } + } if (stitcher.Actor1 != null && stitcher.Actor2 != null && stitcher.Actor1.solver != stitcher.Actor2.solver){ EditorGUILayout.HelpBox("Both actors must be managed by the same solver.",MessageType.Error); @@ -69,13 +63,14 @@ namespace Obi{ if (editing){ + EditorGUILayout.HelpBox("Remember that when working with the sewing tool, you can use Unity's snap to vertex feature by pressing 'V' in your keyboard.",MessageType.Info); + // Clear all stitches if (GUILayout.Button("Clear all stitches")){ if (EditorUtility.DisplayDialog("Clearing stitches","Are you sure you want to remove all stitches?","Ok","Cancel")){ Undo.RecordObject(stitcher, "Clear all stitches"); stitcher.Clear(); - PrefabUtility.RecordPrefabInstancePropertyModifications(stitcher); - } + } } // Remove selected stitches @@ -98,22 +93,19 @@ namespace Obi{ foreach(int i in removedStitches.OrderByDescending(i => i)){ stitcher.RemoveStitch(i); } - PrefabUtility.RecordPrefabInstancePropertyModifications(stitcher); - } + } } // Add stitch: - if (GUILayout.Button("Add Stitch")) - { - FindClosestParticles(out int particle1, out int particle2); + if (GUILayout.Button("Add Stitch")){ + Undo.RecordObject(stitcher, "Add stitch"); - if (particle1 >= 0 && particle2 >= 0) - { - Undo.RecordObject(stitcher, "Add stitch"); - stitcher.AddStitch(particle1, particle2); - PrefabUtility.RecordPrefabInstancePropertyModifications(stitcher); - } - } + int particle1 = 0; + int particle2 = 0; + UseSewingTool(ref particle1, ref particle2); + + stitcher.AddStitch(particle1,particle2); + } } GUI.enabled = true; @@ -128,28 +120,16 @@ namespace Obi{ } - public void FindClosestParticles(out int particle1, out int particle2) - { - particle1 = -1; - particle2 = -1; - float minDistance = float.MaxValue; + public void UseSewingTool(ref int particle1, ref int particle2){ - if (stitcher.Actor1 == null || stitcher.Actor2 == null) - return; + float minDistance = float.MaxValue; - var handle1 = HandleUtility.WorldToGUIPointWithDepth(sewingToolHandle1); - var handle2 = HandleUtility.WorldToGUIPointWithDepth(sewingToolHandle2); - - if (stitcher.Actor1 == stitcher.Actor2) - { + if (stitcher.Actor1 == stitcher.Actor2){ float minDistance2 = float.MaxValue; - for (int i = 0; i < stitcher.Actor1.activeParticleCount;++i) - { + for (int i = 0; i < stitcher.Actor1.particleCount;++i){ Vector3 pos = stitcher.Actor1.GetParticlePosition(stitcher.Actor1.solverIndices[i]); - pos = HandleUtility.WorldToGUIPointWithDepth(pos); - - float distance1 = (pos - handle1).sqrMagnitude; - float distance2 = (pos - handle2).sqrMagnitude; + float distance1 = (pos - sewingToolHandle1).sqrMagnitude; + float distance2 = (pos - sewingToolHandle2).sqrMagnitude; if (distance1 < minDistance){ minDistance = distance1; particle1 = i; @@ -162,28 +142,24 @@ namespace Obi{ }else{ // find closest particle to each end of the sewing tool: - for (int i = 0; i < stitcher.Actor1.activeParticleCount; ++i) - { + for (int i = 0; i < stitcher.Actor1.particleCount;++i){ Vector3 pos = stitcher.Actor1.GetParticlePosition(stitcher.Actor1.solverIndices[i]); - pos = HandleUtility.WorldToGUIPointWithDepth(pos); - - float min = (pos - handle1).sqrMagnitude; - if (min < minDistance) - { + float distance1 = (pos - sewingToolHandle1).sqrMagnitude; + float distance2 = (pos - sewingToolHandle2).sqrMagnitude; + float min = Mathf.Min(distance1,distance2); + if (min < minDistance){ minDistance = min; particle1 = i; } } minDistance = float.MaxValue; - for (int i = 0; i < stitcher.Actor2.activeParticleCount; ++i) - { + for (int i = 0; i < stitcher.Actor2.particleCount;++i){ Vector3 pos = stitcher.Actor2.GetParticlePosition(stitcher.Actor2.solverIndices[i]); - pos = HandleUtility.WorldToGUIPointWithDepth(pos); - - float min = (pos - handle2).sqrMagnitude; - if (min < minDistance) - { + float distance1 = (pos - sewingToolHandle1).sqrMagnitude; + float distance2 = (pos - sewingToolHandle2).sqrMagnitude; + float min = Mathf.Min(distance1,distance2); + if (min < minDistance){ minDistance = min; particle2 = i; } @@ -191,32 +167,10 @@ namespace Obi{ } } - public void DrawSewingTool() - { - - FindClosestParticles(out int particle1, out int particle2); - - if (particle1 >= 0 && particle2 >= 0) - { - sewingToolHandle1 = stitcher.Actor1.GetParticlePosition(stitcher.Actor1.solverIndices[particle1]); - sewingToolHandle2 = stitcher.Actor2.GetParticlePosition(stitcher.Actor2.solverIndices[particle2]); - - float radius1 = stitcher.Actor1.GetParticleMaxRadius(stitcher.Actor1.solverIndices[particle1]); - float radius2 = stitcher.Actor2.GetParticleMaxRadius(stitcher.Actor2.solverIndices[particle2]); - - Handles.color = Color.white; -#if (UNITY_2022_1_OR_NEWER) - sewingToolHandle1 = Handles.FreeMoveHandle(sewingToolHandle1, radius1 * 2, new Vector3(.5f,.5f,.5f),Handles.SphereHandleCap); - sewingToolHandle2 = Handles.FreeMoveHandle(sewingToolHandle2, radius2 * 2, new Vector3(.5f,.5f,.5f),Handles.SphereHandleCap); -#else - sewingToolHandle1 = Handles.FreeMoveHandle(sewingToolHandle1, Quaternion.identity, radius1 * 2, new Vector3(.5f, .5f, .5f), Handles.SphereHandleCap); - sewingToolHandle2 = Handles.FreeMoveHandle(sewingToolHandle2, Quaternion.identity, radius2 * 2, new Vector3(.5f, .5f, .5f), Handles.SphereHandleCap); -#endif - - Vector3 direction = Vector3.Normalize(sewingToolHandle2 - sewingToolHandle1); - Handles.color = Color.yellow; - ObiEditorUtils.DrawArrowHandle(sewingToolHandle1 + direction*(radius1 + 0.05f), sewingToolHandle2 - direction*(radius2+0.05f)); - } + public void DrawSewingTool(){ + var fmh_171_72_639027316145683117 = Quaternion.identity; sewingToolHandle1 = Handles.FreeMoveHandle(sewingToolHandle1,HandleUtility.GetHandleSize(sewingToolHandle1)*0.05f,new Vector3(.5f,.5f,.5f),Handles.RectangleHandleCap); + var fmh_172_66_639027316145718628 = Quaternion.identity; sewingToolHandle2 = Handles.FreeMoveHandle(sewingToolHandle2,HandleUtility.GetHandleSize(sewingToolHandle2)*0.05f,new Vector3(.5f,.5f,.5f),Handles.RectangleHandleCap); + Handles.DrawDottedLine(sewingToolHandle1,sewingToolHandle2,2); } /** @@ -267,7 +221,7 @@ namespace Obi{ } break; case EventType.Repaint: - Handles.color = selectionStatus[i]?Color.red:Color.cyan; + Handles.color = selectionStatus[i]?Color.red:Color.green; Handles.DrawDottedLine(pos1,pos2,2); break; } diff --git a/Assets/Obi/Editor/Resources/DistanceFieldPreview.mat b/Assets/Obi/Editor/Resources/DistanceFieldPreview.mat index 8c7ff52c5..7be81869b 100644 --- a/Assets/Obi/Editor/Resources/DistanceFieldPreview.mat +++ b/Assets/Obi/Editor/Resources/DistanceFieldPreview.mat @@ -81,8 +81,8 @@ Material: - _UVSec: 0 - _ZWrite: 1 m_Colors: - - _AABBMax: {r: 1.1746451, g: 1.1746451, b: 1.1746451, a: 0} - - _AABBMin: {r: -1.1746451, g: -1.1746451, b: -1.1746451, a: 0} + - _AABBMax: {r: 1.3624613, g: 1.3624613, b: 1.3624613, a: 0} + - _AABBMin: {r: -1.3624613, g: -1.3624613, b: -1.3624613, a: 0} - _Color: {r: 1, g: 1, b: 1, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _InsideColor: {r: 1, g: 1, b: 1, a: 1} diff --git a/Assets/Obi/Editor/Resources/EditorParticleShader.shader b/Assets/Obi/Editor/Resources/EditorParticleShader.shader index 5db70c755..74670cb63 100644 --- a/Assets/Obi/Editor/Resources/EditorParticleShader.shader +++ b/Assets/Obi/Editor/Resources/EditorParticleShader.shader @@ -18,8 +18,8 @@ #pragma fragment frag #pragma fragmentoption ARB_precision_hint_fastest - #include "../../Resources/ObiMaterials/Common/ObiEllipsoids.cginc" - #include "../../Resources/ObiMaterials/Common/ObiUtils.cginc" + #include "../../Resources/ObiMaterials/ObiEllipsoids.cginc" + #include "../../Resources/ObiMaterials/ObiUtils.cginc" fixed4 _Color; @@ -42,7 +42,6 @@ float3 lightDir : TEXCOORD2; float3 a2 : TEXCOORD3; float3 a3 : TEXCOORD4; - //float3x3 P : TEXCOORD5; }; struct fout @@ -66,7 +65,6 @@ o.mapping = float4(v.corner.xy,1/length(eye),radius); // A[1] o.viewRay = mul((float3x3)UNITY_MATRIX_V,view); // A[0] o.color = v.color * _Color; - //o.P = float3x3(v.t0.xyz,v.t1.xyz,v.t2.xyz); BuildAuxiliaryNormalVectors(v.vertex,worldPos,view,P,IP,o.a2,o.a3); @@ -88,19 +86,6 @@ // clip space position: float4 pos = mul(UNITY_MATRIX_P,float4(p,1.0)); - // local space normal, use to calculate UVs - /*float3 ln = mul(mul((float3x3)i.P,UNITY_MATRIX_I_V) ,n); - - float2 uv = float2( - // atan returns a value between -pi and pi - // so we divide by pi * 2 to get -0.5 to 0.5 - atan2(ln.x, ln.y) / (3.1415 * 2.0), - // acos returns 0.0 at the top, pi at the bottom - // so we flip the y to align with Unity's OpenGL style - // texture UVs so 0.0 is at the bottom - acos(-ln.z) / 3.1415 - );*/ - // simple lighting: ambient float3 modelUp = mul (UNITY_MATRIX_IT_MV,float3(0,1,0)); float vecHemi = dot(n, modelUp) * 0.5f + 0.5f; diff --git a/Assets/Obi/Editor/Resources/Icons/ObiAmbientForceZone Icon.png b/Assets/Obi/Editor/Resources/Icons/ObiAmbientForceZone Icon.png new file mode 100644 index 000000000..15f7dc06f Binary files /dev/null and b/Assets/Obi/Editor/Resources/Icons/ObiAmbientForceZone Icon.png differ diff --git a/Assets/Obi/Editor/Resources/Icons/ObiAmbientForceZone Icon.png.meta b/Assets/Obi/Editor/Resources/Icons/ObiAmbientForceZone Icon.png.meta new file mode 100644 index 000000000..9764026ac --- /dev/null +++ b/Assets/Obi/Editor/Resources/Icons/ObiAmbientForceZone Icon.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 092f06332c018434b8c8ea86164ef4fd +timeCreated: 1482503923 +licenseType: Store +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: iPhone + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Android + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Editor/Resources/Icons/ObiClothProxy Icon.png b/Assets/Obi/Editor/Resources/Icons/ObiClothProxy Icon.png new file mode 100644 index 000000000..484acebfa Binary files /dev/null and b/Assets/Obi/Editor/Resources/Icons/ObiClothProxy Icon.png differ diff --git a/Assets/Obi/Editor/Resources/Icons/ObiClothProxy Icon.png.meta b/Assets/Obi/Editor/Resources/Icons/ObiClothProxy Icon.png.meta new file mode 100644 index 000000000..f7d2521b7 --- /dev/null +++ b/Assets/Obi/Editor/Resources/Icons/ObiClothProxy Icon.png.meta @@ -0,0 +1,92 @@ +fileFormatVersion: 2 +guid: 7b6e7fb3568d24300be305b5d1d7554d +timeCreated: 1454660299 +licenseType: Store +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 0 + linearTexture: 1 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: iPhone + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Android + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Editor/Resources/Icons/ObiFoamGenerator Icon.png b/Assets/Obi/Editor/Resources/Icons/ObiFoamGenerator Icon.png deleted file mode 100644 index 4a6c6a697..000000000 Binary files a/Assets/Obi/Editor/Resources/Icons/ObiFoamGenerator Icon.png and /dev/null differ diff --git a/Assets/Obi/Editor/Resources/Icons/ObiPathSmoother Icon.png b/Assets/Obi/Editor/Resources/Icons/ObiPathSmoother Icon.png deleted file mode 100644 index 939d32095..000000000 Binary files a/Assets/Obi/Editor/Resources/Icons/ObiPathSmoother Icon.png and /dev/null differ diff --git a/Assets/Obi/Editor/Resources/Icons/ObiPinhole Icon.png b/Assets/Obi/Editor/Resources/Icons/ObiPinhole Icon.png deleted file mode 100644 index da8dbd83b..000000000 Binary files a/Assets/Obi/Editor/Resources/Icons/ObiPinhole Icon.png and /dev/null differ diff --git a/Assets/Obi/Editor/Resources/Icons/ObiRod Icon.png b/Assets/Obi/Editor/Resources/Icons/ObiRod Icon.png index b16bd502b..61bdff8b7 100644 Binary files a/Assets/Obi/Editor/Resources/Icons/ObiRod Icon.png and b/Assets/Obi/Editor/Resources/Icons/ObiRod Icon.png differ diff --git a/Assets/Obi/Editor/Resources/Icons/ObiForceZone Icon.png b/Assets/Obi/Editor/Resources/Icons/ObiSphericalForceZone Icon.png similarity index 100% rename from Assets/Obi/Editor/Resources/Icons/ObiForceZone Icon.png rename to Assets/Obi/Editor/Resources/Icons/ObiSphericalForceZone Icon.png diff --git a/Assets/Obi/Editor/Resources/Icons/ObiForceZone Icon.png.meta b/Assets/Obi/Editor/Resources/Icons/ObiSphericalForceZone Icon.png.meta similarity index 100% rename from Assets/Obi/Editor/Resources/Icons/ObiForceZone Icon.png.meta rename to Assets/Obi/Editor/Resources/Icons/ObiSphericalForceZone Icon.png.meta diff --git a/Assets/Obi/Editor/Resources/Icons/ObiUpdater Icon.png b/Assets/Obi/Editor/Resources/Icons/ObiUpdater Icon.png new file mode 100644 index 000000000..dc74d4fca Binary files /dev/null and b/Assets/Obi/Editor/Resources/Icons/ObiUpdater Icon.png differ diff --git a/Assets/Obi/Editor/Resources/Icons/ObiUpdater Icon.png.meta b/Assets/Obi/Editor/Resources/Icons/ObiUpdater Icon.png.meta new file mode 100644 index 000000000..777fbae73 --- /dev/null +++ b/Assets/Obi/Editor/Resources/Icons/ObiUpdater Icon.png.meta @@ -0,0 +1,117 @@ +fileFormatVersion: 2 +guid: 4e2c952f509ae40bdaf836136058d487 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapU: 1 + wrapV: 1 + wrapW: -1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Editor/Resources/Icons/ObiVoidZone Icon.png b/Assets/Obi/Editor/Resources/Icons/ObiVoidZone Icon.png deleted file mode 100644 index 595b09c88..000000000 Binary files a/Assets/Obi/Editor/Resources/Icons/ObiVoidZone Icon.png and /dev/null differ diff --git a/Assets/Obi/Editor/Resources/PropertyGradientMaterial.shader b/Assets/Obi/Editor/Resources/PropertyGradientMaterial.shader index 73c3cebd5..e3f56cf78 100644 --- a/Assets/Obi/Editor/Resources/PropertyGradientMaterial.shader +++ b/Assets/Obi/Editor/Resources/PropertyGradientMaterial.shader @@ -8,8 +8,8 @@ Pass { - Offset -0.5, -0.5 - Cull Back + Offset 0, -50 + Cull Back Fog { Mode Off } CGPROGRAM @@ -49,7 +49,7 @@ Pass { - Offset -1, -1 + Offset 0, -100 Cull Back ZWrite Off Blend SrcAlpha OneMinusSrcAlpha diff --git a/Assets/Obi/Editor/Resources/TextureIcon.psd.meta b/Assets/Obi/Editor/Resources/TextureIcon.psd.meta index 0821ef678..63fa7b668 100644 --- a/Assets/Obi/Editor/Resources/TextureIcon.psd.meta +++ b/Assets/Obi/Editor/Resources/TextureIcon.psd.meta @@ -1,18 +1,17 @@ fileFormatVersion: 2 guid: 931c48569a82e4dae84d4702bf6da199 +timeCreated: 1478802054 +licenseType: Store TextureImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 11 + fileIDToRecycleName: {} + serializedVersion: 2 mipmaps: mipMapMode: 0 enableMipMap: 0 - sRGBTexture: 1 linearTexture: 1 + correctGamma: 0 fadeOut: 0 borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 mipMapFadeDistanceStart: 1 mipMapFadeDistanceEnd: 3 bumpmap: @@ -21,78 +20,40 @@ TextureImporter: heightScale: 0.25 normalMapFilter: 0 isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - vTOnly: 0 - ignoreMasterTextureLimit: 0 grayScaleToAlpha: 0 - generateCubemap: 6 + generateCubemap: 0 cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 seamlessCubemap: 0 textureFormat: -1 maxTextureSize: 2048 textureSettings: - serializedVersion: 2 - filterMode: 1 + filterMode: -1 aniso: 1 - mipBias: 0 - wrapU: 1 - wrapV: 1 - wrapW: 1 + mipBias: -1 + wrapMode: 1 nPOTScale: 0 lightmap: 0 + rGBM: 0 compressionQuality: 50 + allowsAlphaSplitting: 0 spriteMode: 0 spriteExtrude: 1 spriteMeshType: 1 alignment: 0 spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 + spritePixelsToUnits: 100 alphaIsTransparency: 1 spriteTessellationDetail: -1 textureType: 2 - textureShape: 1 - singleChannelComponent: 0 - flipbookRows: 1 - flipbookColumns: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - ignorePngGamma: 0 - applyGammaDecoding: 1 - platformSettings: - - serializedVersion: 3 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 + buildTargetSettings: [] spriteSheet: serializedVersion: 2 sprites: [] outline: [] - physicsShape: [] - bones: [] - spriteID: - internalID: 0 - vertices: [] - indices: - edges: [] - weights: [] - secondaryTextures: [] - nameFileIdTable: {} spritePackingTag: - pSDRemoveMatte: 1 - pSDShowRemoveMatteOption: 1 userData: assetBundleName: assetBundleVariant: diff --git a/Assets/Obi/Editor/RopeAndRod/ObiBoneEditor.cs b/Assets/Obi/Editor/RopeAndRod/ObiBoneEditor.cs index 0aedd61e2..adf371436 100644 --- a/Assets/Obi/Editor/RopeAndRod/ObiBoneEditor.cs +++ b/Assets/Obi/Editor/RopeAndRod/ObiBoneEditor.cs @@ -33,10 +33,6 @@ namespace Obi SerializedProperty plasticYield; SerializedProperty plasticCreep; - SerializedProperty aerodynamicsEnabled; - SerializedProperty drag; - SerializedProperty lift; - SerializedProperty fixRoot; SerializedProperty stretchBones; SerializedProperty ignored; @@ -73,9 +69,6 @@ namespace Obi plasticYield = serializedObject.FindProperty("_plasticYield"); plasticCreep = serializedObject.FindProperty("_plasticCreep"); - aerodynamicsEnabled = serializedObject.FindProperty("_aerodynamicsEnabled"); - drag = serializedObject.FindProperty("_drag"); - lift = serializedObject.FindProperty("_lift"); } public void OnDisable() @@ -151,12 +144,6 @@ namespace Obi EditorGUILayout.PropertyField(plasticCreep, new GUIContent("Plastic creep")); }); - ObiEditorUtils.DoToggleablePropertyGroup(aerodynamicsEnabled, new GUIContent("Aerodynamics", Resources.Load("Icons/ObiAerodynamicConstraints Icon")), - () => { - EditorGUILayout.PropertyField(drag, new GUIContent("Drag")); - EditorGUILayout.PropertyField(lift, new GUIContent("Lift")); - }); - if (GUI.changed) serializedObject.ApplyModifiedProperties(); diff --git a/Assets/Obi/Editor/RopeAndRod/ObiPathEditor.cs b/Assets/Obi/Editor/RopeAndRod/ObiPathEditor.cs index 7056a44e6..df630acf4 100644 --- a/Assets/Obi/Editor/RopeAndRod/ObiPathEditor.cs +++ b/Assets/Obi/Editor/RopeAndRod/ObiPathEditor.cs @@ -2,38 +2,12 @@ using UnityEngine; using UnityEditor; using UnityEditor.EditorTools; using System; -using UnityEditor.Overlays; -using UnityEngine.UIElements; namespace Obi { [EditorTool("Obi Path Editor Tool",typeof(ObiRopeBase))] public class ObiPathEditor : EditorTool { - - [Overlay(typeof(SceneView), "Obi Path Editor", "Obi Path Editor", "Obi Path Editor", true)] - [Icon("Assets/Obi/Editor/Resources/EditCurves.psd")] - class PathEditorOverlay : Overlay, ITransientOverlay - { - public static ObiPathEditor editor; - - public override VisualElement CreatePanelContent() - { - var root = new VisualElement(); - root.Add(new IMGUIContainer(editor.DrawToolPanel)); - return root; - } - - // Use the visible property to hide or show this instance from within the class. - public bool visible - { - get - { - return ToolManager.activeToolType == typeof(ObiPathEditor); - } - } - } - enum PathEditorTool { TranslatePoints, @@ -90,7 +64,6 @@ namespace Obi { this.useOrientation = target is ObiRod; selectedStatus = new bool[0]; - PathEditorOverlay.editor = this; } public void ResizeCPArrays() @@ -98,6 +71,7 @@ namespace Obi Array.Resize(ref selectedStatus, path.ControlPointCount); } + int windowId; public override void OnToolGUI(EditorWindow window) { needsRepaint = false; @@ -108,7 +82,11 @@ namespace Obi ResizeCPArrays(); - HandleUtility.AddDefaultControl(GUIUtility.GetControlID("PathEditor".GetHashCode(), FocusType.Passive)); + HandleUtility.AddDefaultControl(GUIUtility.GetControlID(FocusType.Passive)); + + // get a window ID: + if (Event.current.type != EventType.Used) + windowId = GUIUtility.GetControlID(FocusType.Passive); Matrix4x4 prevMatrix = Handles.matrix; Handles.matrix = matrix; @@ -120,6 +98,9 @@ namespace Obi needsRepaint |= DrawControlPoint(i); } + // Control point selection handle: + needsRepaint |= ObiPathHandles.SplineCPSelector(path, selectedStatus); + // Count selected and calculate average position: selectionAverage = GetControlPointAverage(out lastSelected, out selectedCount); @@ -129,8 +110,10 @@ namespace Obi if (showThicknessHandles) needsRepaint |= DoThicknessHandles(thicknessScale); - // Control point selection handle: - needsRepaint |= ObiPathHandles.SplineCPSelector(path, selectedStatus); + // Sceneview GUI: + Handles.BeginGUI(); + GUILayout.Window(windowId, new Rect(10, 28, 0, 0), DrawUIWindow, "Path editor"); + Handles.EndGUI(); Handles.matrix = prevMatrix; @@ -562,7 +545,7 @@ namespace Obi return false; } - public void DrawToolPanel() + public void DrawUIWindow(int windowID) { DrawToolButtons(); @@ -1073,7 +1056,7 @@ namespace Obi } EditorGUI.BeginChangeCheck(); - color = EditorGUILayout.ColorField(new GUIContent("Color"), color, true, true, true, GUILayout.MinWidth(94)); + color = EditorGUILayout.ColorField("Color", color, GUILayout.MinWidth(94)); EditorGUI.showMixedValue = false; if (EditorGUI.EndChangeCheck()) { @@ -1170,7 +1153,7 @@ namespace Obi for (int index = 0; index < 4; ++index) { - int controlId = GUIUtility.GetControlID("ObiPathThicknessHandle".GetHashCode(), FocusType.Passive); + int controlId = GUIUtility.GetControlID("ObiPathThicknessHandle".GetHashCode(), FocusType.Keyboard); Vector3 position1 = position + radius * vector3Array[index]; bool changed = GUI.changed; GUI.changed = false; @@ -1214,7 +1197,7 @@ namespace Obi Vector2 currentPoint = HandleUtility.WorldToGUIPoint(path.m_Points.Evaluate(_p, p, p_, p__, i * step)); float mu; - float distance = Vector2.SqrMagnitude((Vector2)ObiUtils.ProjectPointLine(lastPoint, currentPoint, screenPoint, out mu) - screenPoint); + float distance = Vector2.SqrMagnitude((Vector2)ObiUtils.ProjectPointLine(screenPoint, lastPoint, currentPoint, out mu) - screenPoint); if (distance < minDistance) { diff --git a/Assets/Obi/Editor/RopeAndRod/ObiPathHandles.cs b/Assets/Obi/Editor/RopeAndRod/ObiPathHandles.cs index 2a0bc1b67..9e47ccaca 100644 --- a/Assets/Obi/Editor/RopeAndRod/ObiPathHandles.cs +++ b/Assets/Obi/Editor/RopeAndRod/ObiPathHandles.cs @@ -28,9 +28,27 @@ namespace Obi // select vertex on mouse click: switch (Event.current.GetTypeForControl(controlID)) { - case EventType.Layout: - case EventType.MouseMove: - + + case EventType.MouseDown: + { + + if ((Event.current.modifiers & EventModifiers.Control) == 0 && + (HandleUtility.nearestControl != controlID || Event.current.button != 0)) break; + + startPos = Event.current.mousePosition; + marquee.Set(0, 0, 0, 0); + + // If the user is pressing shift, accumulate selection. + if ((Event.current.modifiers & EventModifiers.Shift) == 0 && (Event.current.modifiers & EventModifiers.Alt) == 0) + { + for (int i = 0; i < selectionStatus.Length; i++) + selectionStatus[i] = false; + } + + // If the user is holding down control, dont allow selection of other objects and use marquee tool. + if ((Event.current.modifiers & EventModifiers.Control) != 0) + GUIUtility.hotControl = controlID; + float minSqrDistance = System.Single.MaxValue; float sqrMinSelectionDistance = minSelectionDistance * minSelectionDistance; @@ -41,94 +59,50 @@ namespace Obi Vector2 pos = HandleUtility.WorldToGUIPoint(path.points[i].position); // get distance from mouse position to particle position: - float sqrDistance = Vector2.SqrMagnitude(Event.current.mousePosition - pos); + float sqrDistance = Vector2.SqrMagnitude(startPos - pos); // check if this control point is closer to the cursor that any previously considered point. if (sqrDistance < sqrMinSelectionDistance && sqrDistance < minSqrDistance) - { + { minSqrDistance = sqrDistance; + selectedCPIndex = i; } } - HandleUtility.AddControl(controlID, Mathf.Sqrt(minSqrDistance)); - - break; - case EventType.MouseDown: - - marquee.Set(0, 0, 0, 0); - startPos = Event.current.mousePosition; + if (selectedCPIndex >= 0) + { // toggle particle selection status. - if (Event.current.button == 0) - { + selectionStatus[selectedCPIndex] = !selectionStatus[selectedCPIndex]; + selectionStatusChanged = true; - if (HandleUtility.nearestControl == controlID) - { - GUIUtility.hotControl = controlID; + // Prevent spline deselection if we have selected a particle: + GUIUtility.hotControl = controlID; + Event.current.Use(); - // If the user is pressing shift or ctrl, accumulate selection. - if ((Event.current.modifiers & (EventModifiers.Shift | EventModifiers.Control)) == 0 && (Event.current.modifiers & EventModifiers.Alt) == 0) - { - for (int i = 0; i < selectionStatus.Length; i++) - selectionStatus[i] = false; - - selectionStatusChanged = true; - } - - minSqrDistance = System.Single.MaxValue; - sqrMinSelectionDistance = minSelectionDistance * minSelectionDistance; - - for (int i = 0; i < path.ControlPointCount; i++) - { - - // get particle position in gui space: - Vector2 pos = HandleUtility.WorldToGUIPoint(path.points[i].position); - - // get distance from mouse position to particle position: - float sqrDistance = Vector2.SqrMagnitude(startPos - pos); - - // check if this control point is closer to the cursor that any previously considered point. - if (sqrDistance < sqrMinSelectionDistance && sqrDistance < minSqrDistance) - { - minSqrDistance = sqrDistance; - selectedCPIndex = i; - } - - } - - if (selectedCPIndex >= 0) - { // toggle particle selection status. - - selectionStatus[selectedCPIndex] = !selectionStatus[selectedCPIndex]; - selectionStatusChanged = true; - - // Prevent spline deselection if we have selected a particle: - Event.current.Use(); - - } - } - else if ((Event.current.modifiers & (EventModifiers.Shift | EventModifiers.Control)) == 0 && (Event.current.modifiers & EventModifiers.Alt) == 0) - { - for (int i = 0; i < selectionStatus.Length; i++) - selectionStatus[i] = false; - - selectionStatusChanged = true; - } } - + else if (Event.current.modifiers == EventModifiers.None) + { // deselect all particles: + for (int i = 0; i < selectionStatus.Length; i++) + selectionStatus[i] = false; + + selectionStatusChanged = true; + } + + } break; case EventType.MouseDrag: - if (Event.current.button == 0 && (Event.current.modifiers & EventModifiers.Alt) == 0) + if (GUIUtility.hotControl == controlID) { + currentPos = Event.current.mousePosition; if (!dragging && Vector2.Distance(startPos, currentPos) > 5) { dragging = true; } - - if (dragging) + else { GUIUtility.hotControl = controlID; Event.current.Use(); @@ -187,6 +161,34 @@ namespace Obi break; + + case EventType.Layout: + { + + float minSqrDistance = System.Single.MaxValue; + float sqrMinSelectionDistance = minSelectionDistance * minSelectionDistance; + + for (int i = 0; i < path.ControlPointCount; i++) + { + + // get particle position in gui space: + Vector2 pos = HandleUtility.WorldToGUIPoint(path.points[i].position); + + // get distance from mouse position to particle position: + float sqrDistance = Vector2.SqrMagnitude(Event.current.mousePosition - pos); + + // check if this control point is closer to the cursor that any previously considered point. + if (sqrDistance < sqrMinSelectionDistance && sqrDistance < minSqrDistance) + { //magic number 900 = 30*30, where 30 is min distance in pixels to select a particle. + minSqrDistance = sqrDistance; + } + + } + + HandleUtility.AddControl(controlID, Mathf.Sqrt(minSqrDistance)); + } + break; + } return selectionStatusChanged; diff --git a/Assets/Obi/Editor/RopeAndRod/ObiRodEditor.cs b/Assets/Obi/Editor/RopeAndRod/ObiRodEditor.cs index cb807468f..dd519a094 100644 --- a/Assets/Obi/Editor/RopeAndRod/ObiRodEditor.cs +++ b/Assets/Obi/Editor/RopeAndRod/ObiRodEditor.cs @@ -17,8 +17,6 @@ namespace Obi static void CreateObiRod(MenuCommand menuCommand) { GameObject go = new GameObject("Obi Rod", typeof(ObiRod), typeof(ObiRopeExtrudedRenderer)); - var renderer = go.GetComponent(); - renderer.material = ObiEditorUtils.GetDefaultMaterial(); ObiEditorUtils.PlaceActorRoot(go, menuCommand); } @@ -28,8 +26,7 @@ namespace Obi SerializedProperty collisionMaterial; SerializedProperty selfCollisions; - SerializedProperty surfaceCollisions; - SerializedProperty massScale; + SerializedProperty surfaceCollisions; SerializedProperty stretchShearConstraintsEnabled; SerializedProperty stretchCompliance; @@ -43,10 +40,6 @@ namespace Obi SerializedProperty plasticYield; SerializedProperty plasticCreep; - SerializedProperty aerodynamicsEnabled; - SerializedProperty drag; - SerializedProperty lift; - SerializedProperty chainConstraintsEnabled; SerializedProperty tightness; @@ -61,7 +54,6 @@ namespace Obi collisionMaterial = serializedObject.FindProperty("m_CollisionMaterial"); selfCollisions = serializedObject.FindProperty("m_SelfCollisions"); surfaceCollisions = serializedObject.FindProperty("m_SurfaceCollisions"); - massScale = serializedObject.FindProperty("m_MassScale"); stretchShearConstraintsEnabled = serializedObject.FindProperty("_stretchShearConstraintsEnabled"); stretchCompliance = serializedObject.FindProperty("_stretchCompliance"); @@ -75,10 +67,6 @@ namespace Obi plasticYield = serializedObject.FindProperty("_plasticYield"); plasticCreep = serializedObject.FindProperty("_plasticCreep"); - aerodynamicsEnabled = serializedObject.FindProperty("_aerodynamicsEnabled"); - drag = serializedObject.FindProperty("_drag"); - lift = serializedObject.FindProperty("_lift"); - chainConstraintsEnabled = serializedObject.FindProperty("_chainConstraintsEnabled"); tightness = serializedObject.FindProperty("_tightness"); } @@ -122,30 +110,8 @@ namespace Obi using (new EditorGUI.DisabledScope(ToolManager.activeToolType == typeof(ObiPathEditor))) { - GUILayout.BeginHorizontal(); - EditorGUI.BeginChangeCheck(); - EditorGUILayout.PropertyField(rodBlueprint, new GUIContent("Blueprint")); - - if (actor.rodBlueprint == null) - { - if (GUILayout.Button("Create", EditorStyles.miniButton, GUILayout.MaxWidth(80))) - { - string path = EditorUtility.SaveFilePanel("Save blueprint", "Assets/", "RodBlueprint", "asset"); - if (!string.IsNullOrEmpty(path)) - { - path = FileUtil.GetProjectRelativePath(path); - ObiRodBlueprint asset = ScriptableObject.CreateInstance(); - - AssetDatabase.CreateAsset(asset, path); - AssetDatabase.SaveAssets(); - - actor.rodBlueprint = asset; - } - } - } - if (EditorGUI.EndChangeCheck()) { foreach (var t in targets) @@ -157,12 +123,8 @@ namespace Obi foreach (var t in targets) (t as ObiRod).AddToSolver(); } - - GUILayout.EndHorizontal(); } - EditorGUILayout.PropertyField(massScale, new GUIContent("m_MassScale")); - DoEditButton(); EditorGUILayout.Space(); @@ -188,12 +150,6 @@ namespace Obi EditorGUILayout.PropertyField(plasticCreep, new GUIContent("Plastic creep")); }); - ObiEditorUtils.DoToggleablePropertyGroup(aerodynamicsEnabled, new GUIContent("Aerodynamics", Resources.Load("Icons/ObiAerodynamicConstraints Icon")), - () => { - EditorGUILayout.PropertyField(drag, new GUIContent("Drag")); - EditorGUILayout.PropertyField(lift, new GUIContent("Lift")); - }); - ObiEditorUtils.DoToggleablePropertyGroup(chainConstraintsEnabled, new GUIContent("Chain Constraints", Resources.Load("Icons/ObiChainConstraints Icon")), () => { EditorGUILayout.PropertyField(tightness, new GUIContent("Tightness")); diff --git a/Assets/Obi/Editor/RopeAndRod/ObiRopeChainRendererEditor.cs b/Assets/Obi/Editor/RopeAndRod/ObiRopeChainRendererEditor.cs index 76570ef57..cace6a09d 100644 --- a/Assets/Obi/Editor/RopeAndRod/ObiRopeChainRendererEditor.cs +++ b/Assets/Obi/Editor/RopeAndRod/ObiRopeChainRendererEditor.cs @@ -15,27 +15,8 @@ namespace Obi{ public void OnEnable(){ renderer = (ObiRopeChainRenderer)target; } - - [MenuItem("CONTEXT/ObiRopeChainRenderer/Bake mesh")] - static void Bake(MenuCommand command) - { - ObiRopeChainRenderer renderer = (ObiRopeChainRenderer)command.context; - - if (renderer.actor.isLoaded) - { - var system = renderer.actor.solver.GetRenderSystem() as ObiChainRopeRenderSystem; - - if (system != null) - { - var mesh = new Mesh(); - system.BakeMesh(renderer, ref mesh, true); - ObiEditorUtils.SaveMesh(mesh, "Save chain mesh", "chain mesh"); - GameObject.DestroyImmediate(mesh); - } - } - } - - public override void OnInspectorGUI() { + + public override void OnInspectorGUI() { serializedObject.UpdateIfRequiredOrScript(); @@ -44,7 +25,12 @@ namespace Obi{ // Apply changes to the serializedProperty if (GUI.changed){ - serializedObject.ApplyModifiedProperties(); + serializedObject.ApplyModifiedProperties(); + + renderer.ClearChainLinkInstances(); + renderer.CreateChainLinkInstances(renderer.GetComponent()); + renderer.UpdateRenderer(renderer.GetComponent()); + } } diff --git a/Assets/Obi/Editor/RopeAndRod/ObiRopeCursorEditor.cs b/Assets/Obi/Editor/RopeAndRod/ObiRopeCursorEditor.cs index f902539de..18d81009f 100644 --- a/Assets/Obi/Editor/RopeAndRod/ObiRopeCursorEditor.cs +++ b/Assets/Obi/Editor/RopeAndRod/ObiRopeCursorEditor.cs @@ -65,19 +65,17 @@ namespace Obi private static void DrawGizmos(ObiRopeCursor cursor, GizmoType gizmoType) { var rope = cursor.GetComponent(); - if (rope.isLoaded) + if (rope.solver != null) { - Handles.matrix = rope.solver.transform.localToWorldMatrix; - Handles.color = new Color(1, 0.5f, 0.2f, 1); + Gizmos.color = new Color(1, 0.5f, 0, 0.75f); // draw source particle: int sourceIndex = cursor.sourceParticleIndex; if (sourceIndex >= 0 && rope.IsParticleActive(rope.solver.particleToActor[sourceIndex].indexInActor)) { - Vector3 pos = rope.solver.positions[sourceIndex]; - float size = HandleUtility.GetHandleSize(pos) * 0.15f; - Handles.SphereHandleCap(0, pos, Quaternion.identity, size, EventType.Repaint); + Vector3 pos = rope.GetParticlePosition(sourceIndex); + Gizmos.DrawWireSphere(pos, HandleUtility.GetHandleSize(pos) * 0.4f); } // draw cursor: @@ -85,12 +83,13 @@ namespace Obi if (element != null && element.particle1 != element.particle2) { - Vector3 pos = rope.solver.positions[cursor.direction ? element.particle1 : element.particle2]; - Vector3 pos2 = rope.solver.positions[cursor.direction ? element.particle2 : element.particle1]; + Vector3 pos = rope.GetParticlePosition(cursor.direction ? element.particle1 : element.particle2); + Vector3 pos2 = rope.GetParticlePosition(cursor.direction ? element.particle2 : element.particle1); Vector3 direction = pos2 - pos; - float size = HandleUtility.GetHandleSize(pos) * 0.25f; - Handles.ConeHandleCap(0, pos + Vector3.Normalize(direction)*size*0.5f, Quaternion.LookRotation(direction), size, EventType.Repaint); + float size = HandleUtility.GetHandleSize(pos) * 0.4f; + Gizmos.matrix = Matrix4x4.TRS(pos, Quaternion.LookRotation(direction), Vector3.one * size); + DrawArrow(); } } } diff --git a/Assets/Obi/Editor/RopeAndRod/ObiRopeEditor.cs b/Assets/Obi/Editor/RopeAndRod/ObiRopeEditor.cs index 9d18998bb..6dc04ad7f 100644 --- a/Assets/Obi/Editor/RopeAndRod/ObiRopeEditor.cs +++ b/Assets/Obi/Editor/RopeAndRod/ObiRopeEditor.cs @@ -1,6 +1,11 @@ using UnityEditor; using UnityEditor.EditorTools; +using UnityEditorInternal; using UnityEngine; +using System; +using System.Collections.Generic; +using System.Linq; + namespace Obi { @@ -13,8 +18,6 @@ namespace Obi static void CreateObiRope(MenuCommand menuCommand) { GameObject go = new GameObject("Obi Rope", typeof(ObiRope), typeof(ObiRopeExtrudedRenderer)); - var renderer = go.GetComponent(); - renderer.material = ObiEditorUtils.GetDefaultMaterial(); ObiEditorUtils.PlaceActorRoot(go, menuCommand); } @@ -25,7 +28,6 @@ namespace Obi SerializedProperty collisionMaterial; SerializedProperty selfCollisions; SerializedProperty surfaceCollisions; - SerializedProperty massScale; SerializedProperty distanceConstraintsEnabled; SerializedProperty stretchingScale; @@ -38,10 +40,6 @@ namespace Obi SerializedProperty plasticYield; SerializedProperty plasticCreep; - SerializedProperty aerodynamicsEnabled; - SerializedProperty drag; - SerializedProperty lift; - SerializedProperty tearingEnabled; SerializedProperty tearResistanceMultiplier; SerializedProperty tearRate; @@ -57,7 +55,6 @@ namespace Obi collisionMaterial = serializedObject.FindProperty("m_CollisionMaterial"); selfCollisions = serializedObject.FindProperty("m_SelfCollisions"); surfaceCollisions = serializedObject.FindProperty("m_SurfaceCollisions"); - massScale = serializedObject.FindProperty("m_MassScale"); distanceConstraintsEnabled = serializedObject.FindProperty("_distanceConstraintsEnabled"); stretchingScale = serializedObject.FindProperty("_stretchingScale"); @@ -70,10 +67,6 @@ namespace Obi plasticYield = serializedObject.FindProperty("_plasticYield"); plasticCreep = serializedObject.FindProperty("_plasticCreep"); - aerodynamicsEnabled = serializedObject.FindProperty("_aerodynamicsEnabled"); - drag = serializedObject.FindProperty("_drag"); - lift = serializedObject.FindProperty("_lift"); - tearingEnabled = serializedObject.FindProperty("tearingEnabled"); tearResistanceMultiplier = serializedObject.FindProperty("tearResistanceMultiplier"); tearRate = serializedObject.FindProperty("tearRate"); @@ -119,29 +112,8 @@ namespace Obi using (new EditorGUI.DisabledScope(ToolManager.activeToolType == typeof(ObiPathEditor))) { - GUILayout.BeginHorizontal(); EditorGUI.BeginChangeCheck(); - EditorGUILayout.PropertyField(ropeBlueprint, new GUIContent("Blueprint")); - - if (actor.ropeBlueprint == null) - { - if (GUILayout.Button("Create", EditorStyles.miniButton, GUILayout.MaxWidth(80))) - { - string path = EditorUtility.SaveFilePanel("Save blueprint", "Assets/", "RopeBlueprint", "asset"); - if (!string.IsNullOrEmpty(path)) - { - path = FileUtil.GetProjectRelativePath(path); - ObiRopeBlueprint asset = ScriptableObject.CreateInstance(); - - AssetDatabase.CreateAsset(asset, path); - AssetDatabase.SaveAssets(); - - actor.ropeBlueprint = asset; - } - } - } - if (EditorGUI.EndChangeCheck()) { foreach (var t in targets) @@ -153,14 +125,8 @@ namespace Obi foreach (var t in targets) (t as ObiRope).AddToSolver(); } - - GUILayout.EndHorizontal(); } - GUI.enabled = !Application.isPlaying; - EditorGUILayout.PropertyField(massScale, new GUIContent("Mass scale")); - GUI.enabled = true; - DoEditButton(); EditorGUILayout.Space(); @@ -193,11 +159,6 @@ namespace Obi EditorGUILayout.PropertyField(plasticCreep, new GUIContent("Plastic creep")); }); - ObiEditorUtils.DoToggleablePropertyGroup(aerodynamicsEnabled, new GUIContent("Aerodynamics", Resources.Load("Icons/ObiAerodynamicConstraints Icon")), - () => { - EditorGUILayout.PropertyField(drag, new GUIContent("Drag")); - EditorGUILayout.PropertyField(lift, new GUIContent("Lift")); - }); if (GUI.changed) serializedObject.ApplyModifiedProperties(); diff --git a/Assets/Obi/Editor/RopeAndRod/ObiRopeExtrudedRendererEditor.cs b/Assets/Obi/Editor/RopeAndRod/ObiRopeExtrudedRendererEditor.cs index 02a4983f0..de1b48fbc 100644 --- a/Assets/Obi/Editor/RopeAndRod/ObiRopeExtrudedRendererEditor.cs +++ b/Assets/Obi/Editor/RopeAndRod/ObiRopeExtrudedRendererEditor.cs @@ -16,28 +16,22 @@ namespace Obi{ renderer = (ObiRopeExtrudedRenderer)target; } - [MenuItem("CONTEXT/ObiRopeExtrudedRenderer/Bake mesh")] - static void Bake(MenuCommand command) + private void BakeMesh() { - ObiRopeExtrudedRenderer renderer = (ObiRopeExtrudedRenderer)command.context; - - if (renderer.actor.isLoaded) + if (renderer != null && renderer.extrudedMesh != null) { - var system = renderer.actor.solver.GetRenderSystem() as ObiExtrudedRopeRenderSystem; - - if (system != null) - { - var mesh = new Mesh(); - system.BakeMesh(renderer, ref mesh, true); - ObiEditorUtils.SaveMesh(mesh, "Save rope mesh", "rope mesh"); - GameObject.DestroyImmediate(mesh); - } + ObiEditorUtils.SaveMesh(renderer.extrudedMesh, "Save extruded mesh", "rope mesh"); } } public override void OnInspectorGUI() { serializedObject.UpdateIfRequiredOrScript(); + + if (GUILayout.Button("BakeMesh")) + { + BakeMesh(); + } Editor.DrawPropertiesExcluding(serializedObject,"m_Script"); @@ -46,6 +40,8 @@ namespace Obi{ serializedObject.ApplyModifiedProperties(); + renderer.UpdateRenderer(renderer.GetComponent()); + } } diff --git a/Assets/Obi/Editor/RopeAndRod/ObiRopeLineRendererEditor.cs b/Assets/Obi/Editor/RopeAndRod/ObiRopeLineRendererEditor.cs index 586d69b18..4e21bf8ce 100644 --- a/Assets/Obi/Editor/RopeAndRod/ObiRopeLineRendererEditor.cs +++ b/Assets/Obi/Editor/RopeAndRod/ObiRopeLineRendererEditor.cs @@ -27,7 +27,7 @@ namespace Obi{ serializedObject.ApplyModifiedProperties(); - //renderer.UpdateRenderer(null); + renderer.UpdateRenderer(null); } diff --git a/Assets/Obi/Editor/RopeAndRod/ObiRopeMeshRendererEditor.cs b/Assets/Obi/Editor/RopeAndRod/ObiRopeMeshRendererEditor.cs index 2d110592d..8263a50a6 100644 --- a/Assets/Obi/Editor/RopeAndRod/ObiRopeMeshRendererEditor.cs +++ b/Assets/Obi/Editor/RopeAndRod/ObiRopeMeshRendererEditor.cs @@ -1,5 +1,8 @@ using UnityEditor; using UnityEngine; +using System; +using System.Collections; +using System.Collections.Generic; namespace Obi{ @@ -8,34 +11,28 @@ namespace Obi{ { ObiRopeMeshRenderer renderer; - - [MenuItem("CONTEXT/ObiRopeMeshRenderer/Bake mesh")] - static void Bake(MenuCommand command) - { - ObiRopeMeshRenderer renderer = (ObiRopeMeshRenderer)command.context; - - if (renderer.actor.isLoaded) - { - var system = renderer.actor.solver.GetRenderSystem() as ObiMeshRopeRenderSystem; - - if (system != null) - { - var mesh = new Mesh(); - system.BakeMesh(renderer, ref mesh, true); - ObiEditorUtils.SaveMesh(mesh, "Save rope mesh", "rope mesh"); - GameObject.DestroyImmediate(mesh); - } - } - } - - public void OnEnable(){ + + public void OnEnable(){ renderer = (ObiRopeMeshRenderer)target; } + private void BakeMesh() + { + if (renderer != null && renderer.deformedMesh != null) + { + ObiEditorUtils.SaveMesh(renderer.deformedMesh, "Save deformed mesh", "rope mesh"); + } + } + public override void OnInspectorGUI() { serializedObject.UpdateIfRequiredOrScript(); + if (GUILayout.Button("BakeMesh")) + { + BakeMesh(); + } + Editor.DrawPropertiesExcluding(serializedObject,"m_Script"); // Apply changes to the serializedProperty @@ -43,6 +40,8 @@ namespace Obi{ serializedObject.ApplyModifiedProperties(); + renderer.UpdateRenderer(renderer.GetComponent()); + } } diff --git a/Assets/Obi/Editor/RopeAndRod/Utils/ObiPinholeEditor.cs b/Assets/Obi/Editor/RopeAndRod/Utils/ObiPinholeEditor.cs deleted file mode 100644 index f2380581a..000000000 --- a/Assets/Obi/Editor/RopeAndRod/Utils/ObiPinholeEditor.cs +++ /dev/null @@ -1,169 +0,0 @@ -using UnityEditor; -using UnityEditorInternal; -using UnityEngine; -using System.Collections.Generic; -using System.Linq; - - -namespace Obi -{ - - [CustomEditor(typeof(ObiPinhole))] - public class ObiPinholeEditor : Editor - { - - SerializedProperty targetTransform; - SerializedProperty position; - SerializedProperty limitRange; - SerializedProperty range; - SerializedProperty compliance; - SerializedProperty friction; - SerializedProperty motorSpeed; - SerializedProperty motorForce; - SerializedProperty clamp; - SerializedProperty breakThreshold; - - ObiPinhole pinhole; - - public void OnEnable() - { - - pinhole = target as ObiPinhole; - targetTransform = serializedObject.FindProperty("m_Target"); - position = serializedObject.FindProperty("m_Position"); - limitRange = serializedObject.FindProperty("m_LimitRange"); - range = serializedObject.FindProperty("m_Range"); - friction = serializedObject.FindProperty("m_Friction"); - motorSpeed = serializedObject.FindProperty("m_MotorSpeed"); - motorForce = serializedObject.FindProperty("m_MotorForce"); - compliance = serializedObject.FindProperty("m_Compliance"); - clamp = serializedObject.FindProperty("m_ClampAtEnds"); - breakThreshold = serializedObject.FindProperty("breakThreshold"); - } - - public override void OnInspectorGUI() - { - - serializedObject.UpdateIfRequiredOrScript(); - - // warn about incorrect setups: - if (!targetTransform.hasMultipleDifferentValues) - { - var targetValue = targetTransform.objectReferenceValue as UnityEngine.Component; - if (targetValue != null) - { - var collider = targetValue.GetComponent(); - if (collider == null) - { - EditorGUILayout.HelpBox("Pinholes require the target object to have a ObiCollider component. Please add one.", MessageType.Warning); - } - } - } - - EditorGUI.BeginChangeCheck(); - Transform trget = EditorGUILayout.ObjectField("Target", pinhole.target, typeof(Transform), true) as Transform; - if (EditorGUI.EndChangeCheck()) - { - Undo.RecordObject(pinhole, "Set target"); - pinhole.target = trget; - PrefabUtility.RecordPrefabInstancePropertyModifications(pinhole); - } - - EditorGUI.BeginChangeCheck(); - EditorGUILayout.PropertyField(position, new GUIContent("Position")); - if (EditorGUI.EndChangeCheck()) - { - serializedObject.ApplyModifiedProperties(); - pinhole.CalculateMu(); - } - - EditorGUI.BeginChangeCheck(); - EditorGUILayout.PropertyField(limitRange, new GUIContent("Limit Range")); - if (EditorGUI.EndChangeCheck()) - { - serializedObject.ApplyModifiedProperties(); - pinhole.CalculateRange(); - } - - if (limitRange.boolValue) - { - EditorGUI.indentLevel++; - EditorGUI.BeginChangeCheck(); - EditorGUILayout.PropertyField(range, new GUIContent("Range")); - if (EditorGUI.EndChangeCheck()) - { - serializedObject.ApplyModifiedProperties(); - pinhole.CalculateRange(); - } - EditorGUI.indentLevel--; - } - EditorGUILayout.PropertyField(clamp, new GUIContent("Clamp at ends")); - EditorGUILayout.PropertyField(friction, new GUIContent("Friction")); - EditorGUILayout.PropertyField(motorSpeed, new GUIContent("Motor Target Speed")); - EditorGUILayout.PropertyField(motorForce, new GUIContent("Motor Max Force")); - EditorGUILayout.PropertyField(compliance, new GUIContent("Compliance")); - EditorGUILayout.PropertyField(breakThreshold, new GUIContent("Break threshold")); - - if (GUI.changed) - serializedObject.ApplyModifiedProperties(); - - } - - [DrawGizmo(GizmoType.Selected)] - private static void DrawGizmos(ObiPinhole pinhole, GizmoType gizmoType) - { - var rope = pinhole.GetComponent(); - - var ropeBlueprint = rope.sharedBlueprint as ObiRopeBlueprintBase; - if (rope.isLoaded && ropeBlueprint != null && ropeBlueprint.deformableEdges != null) - { - Handles.color = new Color(1, 0.5f, 0.2f, 1); - Handles.matrix = rope.solver.transform.localToWorldMatrix; - - // draw limits: - if (pinhole.limitRange) - { - for (int i = pinhole.firstEdge.edgeIndex; i <= pinhole.lastEdge.edgeIndex; ++i) - { - if (i >= 0 && i < ropeBlueprint.deformableEdges.Length) - { - int p1 = ropeBlueprint.deformableEdges[i * 2]; - int p2 = ropeBlueprint.deformableEdges[i * 2 + 1]; - var pos1 = rope.solver.positions[rope.solverIndices[p1]]; - var pos2 = rope.solver.positions[rope.solverIndices[p2]]; - - if (i == pinhole.firstEdge.edgeIndex) - { - pos1 = Vector4.Lerp(pos1, pos2, pinhole.firstEdge.coordinate); - Handles.DrawSolidDisc(pos1, pos2 - pos1, HandleUtility.GetHandleSize(pos1) * 0.05f); - } - if (i == pinhole.lastEdge.edgeIndex) - { - pos2 = Vector4.Lerp(pos1, pos2, pinhole.lastEdge.coordinate); - Handles.DrawSolidDisc(pos2, pos1 - pos2, HandleUtility.GetHandleSize(pos2) * 0.05f); - } - - Handles.DrawLine(pos1, pos2, 2); - } - } - } - - // draw source particle: - int edgeIndex = pinhole.edgeIndex; - - if (edgeIndex >= 0 && edgeIndex < ropeBlueprint.deformableEdges.Length) - { - int p1 = ropeBlueprint.deformableEdges[edgeIndex * 2]; - int p2 = ropeBlueprint.deformableEdges[edgeIndex * 2 + 1]; - var pos1 = rope.solver.positions[rope.solverIndices[p1]]; - var pos2 = rope.solver.positions[rope.solverIndices[p2]]; - Vector4 pos = Vector4.Lerp(pos1, pos2, pinhole.edgeCoordinate); - Handles.DrawWireDisc(pos, pos1 - pos2, HandleUtility.GetHandleSize(pos) * 0.1f, 2); - } - } - } - } - -} - - diff --git a/Assets/Obi/Plugins.meta b/Assets/Obi/Plugins.meta new file mode 100644 index 000000000..536d60324 --- /dev/null +++ b/Assets/Obi/Plugins.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 8e4e86215c462421ab9ce3fb2940e67e +folderAsset: yes +timeCreated: 1453095262 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Plugins/Android.meta b/Assets/Obi/Plugins/Android.meta new file mode 100644 index 000000000..ef9a766ef --- /dev/null +++ b/Assets/Obi/Plugins/Android.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: bd54dd4041414433090806277fe28ec5 +folderAsset: yes +timeCreated: 1469612501 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute.meta b/Assets/Obi/Plugins/Android/arm64-v8a.meta similarity index 77% rename from Assets/Obi/Resources/Compute.meta rename to Assets/Obi/Plugins/Android/arm64-v8a.meta index 054ac1346..847d43cea 100644 --- a/Assets/Obi/Resources/Compute.meta +++ b/Assets/Obi/Plugins/Android/arm64-v8a.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 55c2294f77a2c4783b788be18cc01798 +guid: d31cde6706d1446b7a73b166ec0b560b folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Obi/Plugins/Android/arm64-v8a/libOni.so b/Assets/Obi/Plugins/Android/arm64-v8a/libOni.so new file mode 100644 index 000000000..dcd581275 Binary files /dev/null and b/Assets/Obi/Plugins/Android/arm64-v8a/libOni.so differ diff --git a/Assets/Obi/Plugins/Android/arm64-v8a/libOni.so.meta b/Assets/Obi/Plugins/Android/arm64-v8a/libOni.so.meta new file mode 100644 index 000000000..fc75de83a --- /dev/null +++ b/Assets/Obi/Plugins/Android/arm64-v8a/libOni.so.meta @@ -0,0 +1,102 @@ +fileFormatVersion: 2 +guid: ec20d84f513be4ff68f6efc457203d9c +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + - first: + '': Any + second: + enabled: 0 + settings: + Exclude Android: 0 + Exclude Editor: 1 + Exclude Linux: 1 + Exclude Linux64: 1 + Exclude LinuxUniversal: 1 + Exclude OSXUniversal: 1 + Exclude Win: 1 + Exclude Win64: 1 + Exclude iOS: 1 + - first: + Android: Android + second: + enabled: 1 + settings: + CPU: ARM64 + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + - first: + Facebook: Win + second: + enabled: 0 + settings: + CPU: None + - first: + Facebook: Win64 + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: Linux + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: Linux64 + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: LinuxUniversal + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: OSXUniversal + second: + enabled: 0 + settings: + CPU: x86 + - first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: None + - first: + iPhone: iOS + second: + enabled: 0 + settings: + AddToEmbeddedBinaries: false + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Plugins/Android/arm64-v8a/libc++_shared.so b/Assets/Obi/Plugins/Android/arm64-v8a/libc++_shared.so new file mode 100644 index 000000000..ecc95fabe Binary files /dev/null and b/Assets/Obi/Plugins/Android/arm64-v8a/libc++_shared.so differ diff --git a/Assets/Obi/Plugins/Android/arm64-v8a/libc++_shared.so.meta b/Assets/Obi/Plugins/Android/arm64-v8a/libc++_shared.so.meta new file mode 100644 index 000000000..46671340c --- /dev/null +++ b/Assets/Obi/Plugins/Android/arm64-v8a/libc++_shared.so.meta @@ -0,0 +1,102 @@ +fileFormatVersion: 2 +guid: 2246ddc641dff4615884b65bd5612954 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + - first: + '': Any + second: + enabled: 0 + settings: + Exclude Android: 0 + Exclude Editor: 1 + Exclude Linux: 1 + Exclude Linux64: 1 + Exclude LinuxUniversal: 1 + Exclude OSXUniversal: 1 + Exclude Win: 1 + Exclude Win64: 1 + Exclude iOS: 1 + - first: + Android: Android + second: + enabled: 1 + settings: + CPU: ARM64 + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + - first: + Facebook: Win + second: + enabled: 0 + settings: + CPU: None + - first: + Facebook: Win64 + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: Linux + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: Linux64 + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: LinuxUniversal + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: OSXUniversal + second: + enabled: 0 + settings: + CPU: x86 + - first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: None + - first: + iPhone: iOS + second: + enabled: 0 + settings: + AddToEmbeddedBinaries: false + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Plugins/Android/armeabi-v7a.meta b/Assets/Obi/Plugins/Android/armeabi-v7a.meta new file mode 100644 index 000000000..db7cbb8b7 --- /dev/null +++ b/Assets/Obi/Plugins/Android/armeabi-v7a.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ef39573ee97374cefb6e9a4b7bd78901 +folderAsset: yes +timeCreated: 1469720436 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Plugins/Android/armeabi-v7a/libOni.so b/Assets/Obi/Plugins/Android/armeabi-v7a/libOni.so new file mode 100644 index 000000000..705dc68ea Binary files /dev/null and b/Assets/Obi/Plugins/Android/armeabi-v7a/libOni.so differ diff --git a/Assets/Obi/Plugins/Android/armeabi-v7a/libOni.so.meta b/Assets/Obi/Plugins/Android/armeabi-v7a/libOni.so.meta new file mode 100644 index 000000000..4f5bc1551 --- /dev/null +++ b/Assets/Obi/Plugins/Android/armeabi-v7a/libOni.so.meta @@ -0,0 +1,90 @@ +fileFormatVersion: 2 +guid: 17ee7dcf8e257477b93c077d54c798fb +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + '': Linux + second: + enabled: 0 + settings: + CPU: x86 + - first: + '': OSXIntel + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + '': OSXIntel64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Android: Android + second: + enabled: 1 + settings: + CPU: ARMv7 + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + - first: + Facebook: Win + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Facebook: Win64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: Linux64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + iPhone: iOS + second: + enabled: 0 + settings: + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Plugins/Android/armeabi-v7a/libc++_shared.so b/Assets/Obi/Plugins/Android/armeabi-v7a/libc++_shared.so new file mode 100644 index 000000000..d50142c3c Binary files /dev/null and b/Assets/Obi/Plugins/Android/armeabi-v7a/libc++_shared.so differ diff --git a/Assets/Obi/Plugins/Android/armeabi-v7a/libc++_shared.so.meta b/Assets/Obi/Plugins/Android/armeabi-v7a/libc++_shared.so.meta new file mode 100644 index 000000000..674acf2df --- /dev/null +++ b/Assets/Obi/Plugins/Android/armeabi-v7a/libc++_shared.so.meta @@ -0,0 +1,90 @@ +fileFormatVersion: 2 +guid: ba970f948815f4d80931d2e0de373138 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + '': Linux + second: + enabled: 0 + settings: + CPU: x86 + - first: + '': OSXIntel + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + '': OSXIntel64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Android: Android + second: + enabled: 1 + settings: + CPU: ARMv7 + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + - first: + Facebook: Win + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Facebook: Win64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: Linux64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + iPhone: iOS + second: + enabled: 0 + settings: + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Plugins/Android/x86.meta b/Assets/Obi/Plugins/Android/x86.meta new file mode 100644 index 000000000..dcb60d9f5 --- /dev/null +++ b/Assets/Obi/Plugins/Android/x86.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 4f17988a3533442abbe3f5731bcbee89 +folderAsset: yes +timeCreated: 1469720436 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Plugins/Android/x86/libOni.so b/Assets/Obi/Plugins/Android/x86/libOni.so new file mode 100644 index 000000000..6e089dea7 Binary files /dev/null and b/Assets/Obi/Plugins/Android/x86/libOni.so differ diff --git a/Assets/Obi/Plugins/Android/x86/libOni.so.meta b/Assets/Obi/Plugins/Android/x86/libOni.so.meta new file mode 100644 index 000000000..5749e8927 --- /dev/null +++ b/Assets/Obi/Plugins/Android/x86/libOni.so.meta @@ -0,0 +1,90 @@ +fileFormatVersion: 2 +guid: 6a8150ad1b7c140b98640eab40a1c2b0 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + '': Linux + second: + enabled: 0 + settings: + CPU: x86 + - first: + '': OSXIntel + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + '': OSXIntel64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Android: Android + second: + enabled: 1 + settings: + CPU: x86 + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + - first: + Facebook: Win + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Facebook: Win64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: Linux64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + iPhone: iOS + second: + enabled: 0 + settings: + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Plugins/Android/x86/libc++_shared.so b/Assets/Obi/Plugins/Android/x86/libc++_shared.so new file mode 100644 index 000000000..0cf61f3bb Binary files /dev/null and b/Assets/Obi/Plugins/Android/x86/libc++_shared.so differ diff --git a/Assets/Obi/Plugins/Android/x86/libc++_shared.so.meta b/Assets/Obi/Plugins/Android/x86/libc++_shared.so.meta new file mode 100644 index 000000000..a5052712b --- /dev/null +++ b/Assets/Obi/Plugins/Android/x86/libc++_shared.so.meta @@ -0,0 +1,90 @@ +fileFormatVersion: 2 +guid: a91ed7ff7ee034fc891e4b665a3dfbff +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + '': Linux + second: + enabled: 0 + settings: + CPU: x86 + - first: + '': OSXIntel + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + '': OSXIntel64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Android: Android + second: + enabled: 1 + settings: + CPU: x86 + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + - first: + Facebook: Win + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Facebook: Win64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: Linux64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + iPhone: iOS + second: + enabled: 0 + settings: + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Plugins/iOS.meta b/Assets/Obi/Plugins/iOS.meta new file mode 100644 index 000000000..83ba6e5b8 --- /dev/null +++ b/Assets/Obi/Plugins/iOS.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ac2c20e2696d84b29a8bb41e98e72009 +folderAsset: yes +timeCreated: 1454285704 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Plugins/iOS/Oni.h b/Assets/Obi/Plugins/iOS/Oni.h new file mode 100644 index 000000000..4927e7747 --- /dev/null +++ b/Assets/Obi/Plugins/iOS/Oni.h @@ -0,0 +1,435 @@ +/* + * Oni.h + * Oni + * + * Created by José María Méndez González on 21/9/15. + * Copyright (c) 2015 ArK. All rights reserved. + * + */ + +#ifndef Oni_ +#define Oni_ + +#include "Solver.h" +#include "HalfEdgeMesh.h" +#include "ParticleGrid.h" +#include "ColliderGrid.h" + +#if defined(__APPLE__) || defined(ANDROID) || defined(__linux__) + #define EXPORT __attribute__((visibility("default"))) +#else + #define EXPORT __declspec(dllexport) +#endif + +namespace Oni +{ + + struct ConstraintGroupParameters; + class ConstraintBatchBase; + struct Collider; + struct Rigidbody; + class TriangleSkinMap; + class DistanceField; + struct CollisionMaterial; + struct ProfileInfo; + struct DFNode; + struct TriangleMeshHeader; + struct EdgeMeshHeader; + struct BIHNode; + struct Triangle; + struct Edge; + + template + struct ObjHandle + { + std::shared_ptr ptr; + + ObjHandle(T* obj):ptr(std::shared_ptr(obj)){} + + ObjHandle(std::shared_ptr obj):ptr(obj){} + + std::shared_ptr operator->() const{ + return ptr; + } + }; + + extern "C" + { + + typedef ObjHandle ConstraintBatchHandle; + typedef ObjHandle ColliderHandle; + typedef ObjHandle RigidbodyHandle; + typedef ObjHandle CollisionMaterialHandle; + typedef ObjHandle DistanceFieldHandle; + typedef ObjHandle TaskHandle; + + // Colliders ********************: + EXPORT void UpdateColliderGrid(float dt); + + EXPORT void SetColliders(Collider* shapes, Bounds* bounds, Transform* transforms, int count); + + EXPORT void SetRigidbodies(Rigidbody* rigidbodies); + + EXPORT void SetCollisionMaterials(CollisionMaterial* materials); + + EXPORT void SetTriangleMeshData(TriangleMeshHeader* headers, BIHNode* nodes, Triangle* triangles, Eigen::Vector3f* vertices); + EXPORT void SetEdgeMeshData(EdgeMeshHeader* headers, BIHNode* nodes, Edge* edges, Eigen::Vector2f* vertices); + EXPORT void SetDistanceFieldData(DistanceFieldHeader* headers, DFNode* nodes); + EXPORT void SetHeightFieldData(HeightFieldHeader* hf_headers, float* hf_samples); + + // Distance fields ********************: + + EXPORT DistanceFieldHandle* CreateDistanceField(); + EXPORT void DestroyDistanceField(DistanceFieldHandle* df); + + EXPORT void StartBuildingDistanceField(DistanceFieldHandle* df,float max_error, + int max_depth, + Eigen::Vector3f* vertex_positions, + int* triangle_indices_, + int num_vertices, + int num_triangles); + + EXPORT bool ContinueBuildingDistanceField(DistanceFieldHandle* df); + + EXPORT float SampleDistanceField(DistanceFieldHandle* df, float x, float y, float z); + + EXPORT int GetDistanceFieldNodeCount(DistanceFieldHandle* df); + EXPORT void GetDistanceFieldNodes(DistanceFieldHandle* df, DFNode* nodes); + EXPORT void SetDistanceFieldNodes(DistanceFieldHandle* df, const DFNode* nodes, int num); + + // Collision materials *****************: + + EXPORT CollisionMaterialHandle* CreateCollisionMaterial(); + EXPORT void UpdateCollisionMaterial(CollisionMaterialHandle* material, const CollisionMaterial& adaptor); + EXPORT void DestroyCollisionMaterial(CollisionMaterialHandle* collider); + + // Solver ********************: + + EXPORT Solver* CreateSolver(int capacity); + EXPORT void DestroySolver(Solver* solver); + + EXPORT void SetCapacity(Solver* solver,int capacity); + EXPORT void InitializeFrame(Solver* solver,const Vector4fUnaligned& position, const Vector4fUnaligned& scale, const QuaternionfUnaligned& rotation); + EXPORT void UpdateFrame(Solver* solver,const Vector4fUnaligned& position, const Vector4fUnaligned& scale, const QuaternionfUnaligned& rotation, float dt); + EXPORT void ApplyFrame(Solver* solver, float linear_velocity_scale, float angular_velocity_scale, float linear_inertia_scale,float angular_inertia_scale, float dt); + + EXPORT void GetBounds(Solver* solver, Eigen::Vector3f& min, Eigen::Vector3f& max); + EXPORT int GetParticleGridSize(Solver* solver); + EXPORT void GetParticleGrid(Solver* solver, Bounds* cells); + + EXPORT void SetSolverParameters(Solver* solver, const SolverParameters* parameters); + EXPORT void GetSolverParameters(Solver* solver, SolverParameters* parameters); + + EXPORT TaskHandle* CollisionDetection(Solver* solver, float step_time); + EXPORT TaskHandle* Step(Solver* solver, float step_time, float substep_time, int substeps); + + EXPORT int SpatialQuery(Solver* solver, QueryShape* shapes, Transform* transforms, int shape_count); + EXPORT void GetQueryResults(Solver* solver, QueryResult* results, int num); + + EXPORT void ApplyPositionInterpolation(Solver* solver, + Eigen::Vector4f* start_positions, + Eigen::Quaternionf* start_orientations, + float step_time, + float unsimulated_time); + + EXPORT void UpdateSkeletalAnimation(Solver* solver); + + EXPORT void RecalculateInertiaTensors(Solver* solver); + + EXPORT void ResetForces(Solver* solver); + + EXPORT void SetRigidbodyLinearDeltas(Solver* solver, Eigen::Vector4f* linear_deltas); + EXPORT void SetRigidbodyAngularDeltas(Solver* solver, Eigen::Vector4f* angular_deltas); + + + EXPORT int GetConstraintCount(Solver* solver, const Solver::ConstraintType type); + + EXPORT int SetActiveParticles(Solver* solver, const int* active, int num); + + EXPORT void SetParticleCollisionMaterials(Solver* solver, int* material_indices); + + EXPORT void SetParticlePhases(Solver* solver, int* phases); + + EXPORT void SetParticleFilters(Solver* solver, int* filters); + + EXPORT void SetParticlePositions(Solver* solver, Eigen::Vector4f* positions); + + EXPORT void SetParticlePreviousPositions(Solver* solver, Eigen::Vector4f* prev_positions); + + EXPORT void SetParticleOrientations(Solver* solver,Eigen::Quaternionf* orientations); + + EXPORT void SetParticlePreviousOrientations(Solver* solver, Eigen::Quaternionf* prev_orientations); + + EXPORT void SetRenderableParticleOrientations(Solver* solver, Eigen::Quaternionf* orientations); + + EXPORT void SetRenderableParticlePositions(Solver* solver, Eigen::Vector4f* positions); + + EXPORT void SetParticleInverseMasses(Solver* solver, float* inv_masses); + + EXPORT void SetParticleInverseRotationalMasses(Solver* solver, float* inv_rot_masses); + + EXPORT void SetParticlePrincipalRadii(Solver* solver, Eigen::Vector4f* radii); + + EXPORT void SetParticleVelocities(Solver* solver, Eigen::Vector4f* velocities); + + EXPORT void SetParticleAngularVelocities(Solver* solver, Eigen::Vector4f* velocities); + + EXPORT void SetParticleExternalForces(Solver* solver, Eigen::Vector4f* forces); + + EXPORT void SetParticleExternalTorques(Solver* solver, Eigen::Vector4f* torques); + + EXPORT void SetParticleWinds(Solver* solver, Eigen::Vector4f* wind); + + EXPORT void SetParticlePositionDeltas(Solver* solver, Eigen::Vector4f* deltas); + + EXPORT void SetParticleOrientationDeltas(Solver* solver, Eigen::Quaternionf* deltas); + + EXPORT void SetParticlePositionConstraintCounts(Solver* solver, int* counts); + + EXPORT void SetParticleOrientationConstraintCounts(Solver* solver, int* counts); + + EXPORT void SetParticleNormals(Solver* solver, Eigen::Vector4f* normals); + + EXPORT void SetParticleInverseInertiaTensors(Solver* solver, Eigen::Vector4f* tensors); + + EXPORT int SetSimplices(Solver* solver, const int* simplices, int point_count, int edge_count, int triangle_count); + + + EXPORT int GetDeformableTriangleCount(Solver* solver); + + EXPORT void SetDeformableTriangles(Solver* solver, const int* indices, int num, int dest_offset); + + EXPORT int RemoveDeformableTriangles(Solver* solver, int num, int source_offset); + + + // Fluid ********************: + + EXPORT void SetParticleSmoothingRadii(Solver* solver,float* radii); + + EXPORT void SetParticleBuoyancy(Solver* solver,float* buoyancy); + + EXPORT void SetParticleRestDensities(Solver* solver,float* rest_densities); + + EXPORT void SetParticleViscosities(Solver* solver,float* viscosities); + + EXPORT void SetParticleSurfaceTension(Solver* solver,float* surf_tension); + + EXPORT void SetParticleVorticityConfinement(Solver* solver,float* vort_confinement); + + EXPORT void SetParticleAtmosphericDragPressure(Solver* solver,float* atmospheric_drag, float* atmospheric_pressure); + + EXPORT void SetParticleDiffusion(Solver* solver,float* diffusion); + + + EXPORT void SetParticleVorticities(Solver* solver, Eigen::Vector4f* vorticities); + + EXPORT void SetParticleFluidData(Solver* solver, Eigen::Vector4f* fluid_data); + + EXPORT void SetParticleUserData(Solver* solver, Eigen::Vector4f* user_data); + + EXPORT void SetParticleAnisotropies(Solver* solver, Eigen::Vector4f* anisotropies); + + + + EXPORT void SetConstraintGroupParameters(Solver* solver, const Solver::ConstraintType type, const ConstraintGroupParameters* parameters); + + EXPORT void GetConstraintGroupParameters(Solver* solver, const Solver::ConstraintType type, ConstraintGroupParameters* parameters); + + EXPORT void SetRestPositions(Solver* solver, Eigen::Vector4f* rest_positions); + + EXPORT void SetRestOrientations(Solver* solver, Eigen::Quaternionf* rest_orientations); + + + // Batches ********************: + + EXPORT ConstraintBatchHandle* CreateBatch(const Solver::ConstraintType type); + + EXPORT void DestroyBatch(ConstraintBatchHandle* batch); + + EXPORT void AddBatch(Solver* solver, ConstraintBatchHandle* batch); + + EXPORT void RemoveBatch(Solver* solver, ConstraintBatchHandle* batch); + + EXPORT void EnableBatch(ConstraintBatchHandle* batch, bool enabled); + + EXPORT int GetBatchConstraintForces(ConstraintBatchHandle* batch, float* forces, int num, int source_offset); + + // Constraints ********************: + + EXPORT void SetBatchConstraintCount(ConstraintBatchHandle* batch, int num); + + EXPORT int GetBatchConstraintCount(ConstraintBatchHandle* batch); + + EXPORT void SetDistanceConstraints(ConstraintBatchHandle* batch, + int* indices, + float* restLengths, + float* stiffnesses, + float* lambdas, + int num); + + EXPORT void SetBendingConstraints(ConstraintBatchHandle* batch, + int* indices, + float* rest_bends, + float* bending_stiffnesses, + float* plasticity, + float* lambdas, + int num); + + EXPORT void SetSkinConstraints(ConstraintBatchHandle* batch, + int* indices, + Eigen::Vector4f* skin_points, + Eigen::Vector4f* skin_normals, + float* radii_backstops, + float* stiffnesses, + float* lambdas, + int num); + + EXPORT void SetAerodynamicConstraints(ConstraintBatchHandle* batch, + int* triangle_indices, + float* aerodynamic_coeffs, + int num); + + EXPORT void SetVolumeConstraints(ConstraintBatchHandle* batch, + int* triangle_indices, + int* first_triangle, + int* num_triangles, + float* rest_volumes, + float* pressure_stiffnesses, + float* lambdas, + int num); + + EXPORT void SetShapeMatchingConstraints(ConstraintBatchHandle* batch, + int* shape_indices, + int* first_index, + int* num_indices, + int* explicit_group, + float* shape_material_parameters, + Eigen::Vector4f* rest_coms, + Eigen::Vector4f* coms, + Eigen::Quaternionf* orientations, + Eigen::Matrix4f* linear_transforms, + Eigen::Matrix4f* plastic_deformations, + int num); + + EXPORT void CalculateRestShapeMatching(Solver* solver, ConstraintBatchHandle* batch); + + EXPORT void SetStretchShearConstraints(ConstraintBatchHandle* batch, + int* particle_indices, + int* orientation_indices, + float* rest_lengths, + Eigen::Quaternionf* rest_orientations, + Eigen::Vector3f* stiffnesses, + Eigen::Vector3f* lambdas, + int num); + + EXPORT void SetBendTwistConstraints(ConstraintBatchHandle* batch, + int* orientation_indices, + Eigen::Quaternionf* rest_darboux, + Eigen::Vector3f* stiffnesses, + float* plasticity, + Eigen::Vector3f* lambdas, + int num); + + EXPORT void SetTetherConstraints(ConstraintBatchHandle* batch, + int* indices, + float* max_lenght_scales, + float* stiffnesses, + float* lambdas, + int num); + + EXPORT void SetPinConstraints(ConstraintBatchHandle* batch, + int* indices, + Vector4f* pin_offsets, + Quaternionf* rest_darboux, + int* colliders, + float* stiffnesses, + Eigen::Vector4f* lambdas, + int num); + + EXPORT void SetStitchConstraints(ConstraintBatchHandle* batch, + int* indices, + float* stiffnesses, + float* lambdas, + int num); + + EXPORT void SetChainConstraints(ConstraintBatchHandle* batch, + int* indices, + float* rest_lengths, + int* first_index, + int* num_indices, + int num); + + // Collision data ********************: + + EXPORT void GetCollisionContacts(Solver* solver,Contact* contacts, int num); + + EXPORT void GetParticleCollisionContacts(Solver* solver,Contact* contacts, int num); + + // Diffuse particles ********************: + + EXPORT void InterpolateDiffuseParticles(Solver* solver, + const Eigen::Vector4f* properties, + const Eigen::Vector4f* diffuse_positions, + Eigen::Vector4f* diffuse_properties, + int* neighbour_count, + int count); + + // Skin maps ********************: + + EXPORT TriangleSkinMap* CreateTriangleSkinMap(); + + EXPORT void DestroyTriangleSkinMap(TriangleSkinMap* map); + + EXPORT void Bind(TriangleSkinMap* map, Mesh* source, Mesh* target, + const unsigned int* source_master_flags, + const unsigned int* target_slave_flags); + + EXPORT int GetSkinnedVertexCount(TriangleSkinMap* map); + + EXPORT void GetSkinInfo(TriangleSkinMap* map, + int* skin_indices, + int* source_tri_indices, + Eigen::Vector3f* bary_pos, + Eigen::Vector3f* bary_nrm, + Eigen::Vector3f* bary_tan); + + EXPORT void SetSkinInfo(TriangleSkinMap* map, + const int* skin_indices, + const int* source_tri_indices, + const Eigen::Vector3f* bary_pos, + const Eigen::Vector3f* bary_nrm, + const Eigen::Vector3f* bary_tan, + int num); + + // Tasks ********************: + + EXPORT void CompleteAll(); + + EXPORT void Complete(TaskHandle* task); + + EXPORT TaskHandle* CreateEmpty(); + + EXPORT void Schedule(TaskHandle* task); + + EXPORT void AddChild(TaskHandle* task, TaskHandle* child); + + // Profiling ****************: + + EXPORT int GetMaxSystemConcurrency(); + + EXPORT void ClearProfiler(); + + EXPORT void EnableProfiler(bool enabled); + + EXPORT void BeginSample(const char* name, unsigned char type); + + EXPORT void EndSample(); + + EXPORT int GetProfilingInfoCount(); + + EXPORT void GetProfilingInfo(ProfileInfo* info, int count); + } + +} + +#endif diff --git a/Assets/Obi/Plugins/iOS/Oni.h.meta b/Assets/Obi/Plugins/iOS/Oni.h.meta new file mode 100644 index 000000000..9f03bca3f --- /dev/null +++ b/Assets/Obi/Plugins/iOS/Oni.h.meta @@ -0,0 +1,90 @@ +fileFormatVersion: 2 +guid: 03646faf401f74c9e8e73b6365c17f63 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + '': Linux + second: + enabled: 0 + settings: + CPU: x86 + - first: + '': OSXIntel + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + '': OSXIntel64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Android: Android + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + - first: + Facebook: Win + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Facebook: Win64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: Linux64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + iPhone: iOS + second: + enabled: 1 + settings: + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Plugins/iOS/OniHelpers.h b/Assets/Obi/Plugins/iOS/OniHelpers.h new file mode 100644 index 000000000..7b98e3ed4 --- /dev/null +++ b/Assets/Obi/Plugins/iOS/OniHelpers.h @@ -0,0 +1,72 @@ +/* + * OniHelpers.h + * Oni + * + * Created by José María Méndez González on 21/9/15. + * Copyright (c) 2015 ArK. All rights reserved. + * + */ + +#ifndef OniHelpers_ +#define OniHelpers_ + +#include "Dense" +#include "HalfEdgeMesh.h" + +#if defined(__APPLE__) || defined(ANDROID) || defined(__linux__) + #define EXPORT __attribute__((visibility("default"))) +#else + #define EXPORT __declspec(dllexport) +#endif + +namespace Oni +{ + extern "C" + { + + EXPORT int MakePhase(int group, int flags); + EXPORT int GetGroupFromPhase(int phase); + + /** + * Calculates the rest bend factor for a bending constraint between 3 particles. + * @param coordinates an array of 9 floats: x,y,z of the first particle, x,y,z of the second particle, x,y,z of the third (central) particle. + */ + EXPORT float BendingConstraintRest(float* coordinates); + + EXPORT HalfEdgeMesh* CreateHalfEdgeMesh(); + + EXPORT void DestroyHalfEdgeMesh(HalfEdgeMesh* mesh); + EXPORT void GetHalfEdgeMeshInfo(HalfEdgeMesh* mesh, HalfEdgeMesh::MeshInformation* mesh_info); + + EXPORT void CalculatePrimitiveCounts(HalfEdgeMesh* mesh, + Eigen::Vector3f* vertices, + int* triangles, + int vertex_count, + int triangle_count); + + EXPORT void Generate(HalfEdgeMesh* mesh, + Eigen::Vector3f* vertices, + int* triangles, + int vertex_count, + int triangle_count, + float* scale); + + EXPORT void SetHalfEdges(HalfEdgeMesh* mesh,HalfEdgeMesh::HalfEdge* half_edges, int count); + EXPORT void SetVertices(HalfEdgeMesh* mesh,HalfEdgeMesh::Vertex* vertices, int count); + EXPORT void SetFaces(HalfEdgeMesh* mesh,HalfEdgeMesh::Face* faces, int count); + + EXPORT void SetNormals(HalfEdgeMesh* mesh,Eigen::Vector3f* normals); + EXPORT void SetTangents(HalfEdgeMesh* mesh,Vector4fUnaligned* tangents); + EXPORT void SetInverseOrientations(HalfEdgeMesh* mesh,QuaternionfUnaligned* orientations); + EXPORT void SetVisualMap(HalfEdgeMesh* mesh,int* map); + + EXPORT int GetHalfEdgeCount(HalfEdgeMesh* mesh); + EXPORT int GetVertexCount(HalfEdgeMesh* mesh); + EXPORT int GetFaceCount(HalfEdgeMesh* mesh); + + EXPORT void GetPointCloudAnisotropy(Eigen::Vector3f* points,int count,float max_anisotropy,float radius, const Eigen::Vector3f& hint_normal, Eigen::Vector3f& centroid, QuaternionfUnaligned& orientation,Eigen::Vector3f& principal_values); + } + +} + +#endif diff --git a/Assets/Obi/Plugins/iOS/OniHelpers.h.meta b/Assets/Obi/Plugins/iOS/OniHelpers.h.meta new file mode 100644 index 000000000..5675557e1 --- /dev/null +++ b/Assets/Obi/Plugins/iOS/OniHelpers.h.meta @@ -0,0 +1,90 @@ +fileFormatVersion: 2 +guid: 4f88b733d928048638365465e86b8f3b +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + '': Linux + second: + enabled: 0 + settings: + CPU: x86 + - first: + '': OSXIntel + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + '': OSXIntel64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Android: Android + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + - first: + Facebook: Win + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Facebook: Win64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: Linux64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + iPhone: iOS + second: + enabled: 1 + settings: + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Plugins/iOS/libOni.a b/Assets/Obi/Plugins/iOS/libOni.a new file mode 100644 index 000000000..bc6079fbd Binary files /dev/null and b/Assets/Obi/Plugins/iOS/libOni.a differ diff --git a/Assets/Obi/Plugins/iOS/libOni.a.meta b/Assets/Obi/Plugins/iOS/libOni.a.meta new file mode 100644 index 000000000..d532c806e --- /dev/null +++ b/Assets/Obi/Plugins/iOS/libOni.a.meta @@ -0,0 +1,105 @@ +fileFormatVersion: 2 +guid: 480286a2338ca4cb6a36110dcd0614f4 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + '': Any + second: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 1 + Exclude Linux: 1 + Exclude Linux64: 1 + Exclude LinuxUniversal: 1 + Exclude OSXUniversal: 1 + Exclude Win: 1 + Exclude Win64: 1 + Exclude iOS: 0 + - first: + Android: Android + second: + enabled: 0 + settings: + CPU: ARMv7 + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + - first: + Facebook: Win + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Facebook: Win64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: Linux + second: + enabled: 0 + settings: + CPU: x86 + - first: + Standalone: Linux64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: LinuxUniversal + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: OSXUniversal + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + iPhone: iOS + second: + enabled: 1 + settings: + AddToEmbeddedBinaries: false + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Plugins/libOni.bundle.meta b/Assets/Obi/Plugins/libOni.bundle.meta new file mode 100644 index 000000000..ba94bc967 --- /dev/null +++ b/Assets/Obi/Plugins/libOni.bundle.meta @@ -0,0 +1,40 @@ +fileFormatVersion: 2 +guid: 2882732abb8524a2dad5a38e94bea1fc +folderAsset: yes +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + - first: + '': OSXIntel + second: + enabled: 1 + settings: {} + - first: + '': OSXIntel64 + second: + enabled: 1 + settings: {} + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 1 + settings: + DefaultValueInitialized: true + - first: + Standalone: OSXUniversal + second: + enabled: 1 + settings: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Resources/ObiMaterials/BuiltInStandardBackfaces.meta b/Assets/Obi/Plugins/libOni.bundle/Contents.meta similarity index 77% rename from Assets/Obi/Resources/ObiMaterials/BuiltInStandardBackfaces.meta rename to Assets/Obi/Plugins/libOni.bundle/Contents.meta index 4f530cfdd..8bdbdc030 100644 --- a/Assets/Obi/Resources/ObiMaterials/BuiltInStandardBackfaces.meta +++ b/Assets/Obi/Plugins/libOni.bundle/Contents.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 63dbef444f58449a5b4786567ee38655 +guid: b0f57a84cadd44090a54d60174a2e7e9 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Obi/Plugins/libOni.bundle/Contents/Info.plist b/Assets/Obi/Plugins/libOni.bundle/Contents/Info.plist new file mode 100644 index 000000000..cfc875948 --- /dev/null +++ b/Assets/Obi/Plugins/libOni.bundle/Contents/Info.plist @@ -0,0 +1,50 @@ + + + + + BuildMachineOSBuild + 19E266 + CFBundleDevelopmentRegion + en + CFBundleExecutable + Oni + CFBundleIdentifier + com.Ark.Oni + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + Oni + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleSupportedPlatforms + + MacOSX + + CFBundleVersion + 1 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 12D4e + DTPlatformName + macosx + DTPlatformVersion + 11.1 + DTSDKBuild + 20C63 + DTSDKName + macosx11.1 + DTXcode + 1240 + DTXcodeBuild + 12D4e + LSMinimumSystemVersion + 10.11 + NSHumanReadableCopyright + Copyright © 2016 Ark. All rights reserved. + + diff --git a/Assets/Obi/Editor/RopeAndRod/Utils.meta b/Assets/Obi/Plugins/libOni.bundle/Contents/MacOS.meta similarity index 77% rename from Assets/Obi/Editor/RopeAndRod/Utils.meta rename to Assets/Obi/Plugins/libOni.bundle/Contents/MacOS.meta index 9115ebae6..1354871a0 100644 --- a/Assets/Obi/Editor/RopeAndRod/Utils.meta +++ b/Assets/Obi/Plugins/libOni.bundle/Contents/MacOS.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 72e3dd3ad91bf485099095b5e59ff81b +guid: 9571d0925c2004cd38ac86f7d85b061f folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Obi/Plugins/libOni.bundle/Contents/MacOS/Oni b/Assets/Obi/Plugins/libOni.bundle/Contents/MacOS/Oni new file mode 100644 index 000000000..86f77bea8 Binary files /dev/null and b/Assets/Obi/Plugins/libOni.bundle/Contents/MacOS/Oni differ diff --git a/Assets/Obi/Resources/ObiMaterials/Common.meta b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources.meta similarity index 77% rename from Assets/Obi/Resources/ObiMaterials/Common.meta rename to Assets/Obi/Plugins/libOni.bundle/Contents/Resources.meta index dd79e2da0..22b2f5c7b 100644 --- a/Assets/Obi/Resources/ObiMaterials/Common.meta +++ b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: f31685c4cf95048ceb543a69d4f84ff4 +guid: 99a8462e7396040d782ca6004afd63e8 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/CMakeLists.txt b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/CMakeLists.txt new file mode 100644 index 000000000..9eb502b79 --- /dev/null +++ b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/CMakeLists.txt @@ -0,0 +1,19 @@ +include(RegexUtils) +test_escape_string_as_regex() + +file(GLOB Eigen_directory_files "*") + +escape_string_as_regex(ESCAPED_CMAKE_CURRENT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}") + +foreach(f ${Eigen_directory_files}) + if(NOT f MATCHES "\\.txt" AND NOT f MATCHES "${ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/[.].+" AND NOT f MATCHES "${ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/src") + list(APPEND Eigen_directory_files_to_install ${f}) + endif() +endforeach(f ${Eigen_directory_files}) + +install(FILES + ${Eigen_directory_files_to_install} + DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen COMPONENT Devel + ) + +install(DIRECTORY src DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen COMPONENT Devel FILES_MATCHING PATTERN "*.h") diff --git a/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/Cholesky b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/Cholesky new file mode 100644 index 000000000..1332b540d --- /dev/null +++ b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/Cholesky @@ -0,0 +1,46 @@ +// This file is part of Eigen, a lightweight C++ template library +// for linear algebra. +// +// This Source Code Form is subject to the terms of the Mozilla +// Public License v. 2.0. If a copy of the MPL was not distributed +// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. + +#ifndef EIGEN_CHOLESKY_MODULE_H +#define EIGEN_CHOLESKY_MODULE_H + +#include "Core" +#include "Jacobi" + +#include "src/Core/util/DisableStupidWarnings.h" + +/** \defgroup Cholesky_Module Cholesky module + * + * + * + * This module provides two variants of the Cholesky decomposition for selfadjoint (hermitian) matrices. + * Those decompositions are also accessible via the following methods: + * - MatrixBase::llt() + * - MatrixBase::ldlt() + * - SelfAdjointView::llt() + * - SelfAdjointView::ldlt() + * + * \code + * #include + * \endcode + */ + +#include "src/Cholesky/LLT.h" +#include "src/Cholesky/LDLT.h" +#ifdef EIGEN_USE_LAPACKE +#ifdef EIGEN_USE_MKL +#include "mkl_lapacke.h" +#else +#include "src/misc/lapacke.h" +#endif +#include "src/Cholesky/LLT_LAPACKE.h" +#endif + +#include "src/Core/util/ReenableStupidWarnings.h" + +#endif // EIGEN_CHOLESKY_MODULE_H +/* vim: set filetype=cpp et sw=2 ts=2 ai: */ diff --git a/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/CholmodSupport b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/CholmodSupport new file mode 100644 index 000000000..bed8924d3 --- /dev/null +++ b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/CholmodSupport @@ -0,0 +1,48 @@ +// This file is part of Eigen, a lightweight C++ template library +// for linear algebra. +// +// This Source Code Form is subject to the terms of the Mozilla +// Public License v. 2.0. If a copy of the MPL was not distributed +// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. + +#ifndef EIGEN_CHOLMODSUPPORT_MODULE_H +#define EIGEN_CHOLMODSUPPORT_MODULE_H + +#include "SparseCore" + +#include "src/Core/util/DisableStupidWarnings.h" + +extern "C" { + #include +} + +/** \ingroup Support_modules + * \defgroup CholmodSupport_Module CholmodSupport module + * + * This module provides an interface to the Cholmod library which is part of the suitesparse package. + * It provides the two following main factorization classes: + * - class CholmodSupernodalLLT: a supernodal LLT Cholesky factorization. + * - class CholmodDecomposiiton: a general L(D)LT Cholesky factorization with automatic or explicit runtime selection of the underlying factorization method (supernodal or simplicial). + * + * For the sake of completeness, this module also propose the two following classes: + * - class CholmodSimplicialLLT + * - class CholmodSimplicialLDLT + * Note that these classes does not bring any particular advantage compared to the built-in + * SimplicialLLT and SimplicialLDLT factorization classes. + * + * \code + * #include + * \endcode + * + * In order to use this module, the cholmod headers must be accessible from the include paths, and your binary must be linked to the cholmod library and its dependencies. + * The dependencies depend on how cholmod has been compiled. + * For a cmake based project, you can use our FindCholmod.cmake module to help you in this task. + * + */ + +#include "src/CholmodSupport/CholmodSupport.h" + +#include "src/Core/util/ReenableStupidWarnings.h" + +#endif // EIGEN_CHOLMODSUPPORT_MODULE_H + diff --git a/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/Core b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/Core new file mode 100644 index 000000000..b923b8c00 --- /dev/null +++ b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/Core @@ -0,0 +1,537 @@ +// This file is part of Eigen, a lightweight C++ template library +// for linear algebra. +// +// Copyright (C) 2008 Gael Guennebaud +// Copyright (C) 2007-2011 Benoit Jacob +// +// This Source Code Form is subject to the terms of the Mozilla +// Public License v. 2.0. If a copy of the MPL was not distributed +// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. + +#ifndef EIGEN_CORE_H +#define EIGEN_CORE_H + +// first thing Eigen does: stop the compiler from committing suicide +#include "src/Core/util/DisableStupidWarnings.h" + +#if defined(__CUDACC__) && !defined(EIGEN_NO_CUDA) + #define EIGEN_CUDACC __CUDACC__ +#endif + +#if defined(__CUDA_ARCH__) && !defined(EIGEN_NO_CUDA) + #define EIGEN_CUDA_ARCH __CUDA_ARCH__ +#endif + +#if defined(__CUDACC_VER_MAJOR__) && (__CUDACC_VER_MAJOR__ >= 9) +#define EIGEN_CUDACC_VER ((__CUDACC_VER_MAJOR__ * 10000) + (__CUDACC_VER_MINOR__ * 100)) +#elif defined(__CUDACC_VER__) +#define EIGEN_CUDACC_VER __CUDACC_VER__ +#else +#define EIGEN_CUDACC_VER 0 +#endif + +// Handle NVCC/CUDA/SYCL +#if defined(__CUDACC__) || defined(__SYCL_DEVICE_ONLY__) + // Do not try asserts on CUDA and SYCL! + #ifndef EIGEN_NO_DEBUG + #define EIGEN_NO_DEBUG + #endif + + #ifdef EIGEN_INTERNAL_DEBUGGING + #undef EIGEN_INTERNAL_DEBUGGING + #endif + + #ifdef EIGEN_EXCEPTIONS + #undef EIGEN_EXCEPTIONS + #endif + + // All functions callable from CUDA code must be qualified with __device__ + #ifdef __CUDACC__ + // Do not try to vectorize on CUDA and SYCL! + #ifndef EIGEN_DONT_VECTORIZE + #define EIGEN_DONT_VECTORIZE + #endif + + #define EIGEN_DEVICE_FUNC __host__ __device__ + // We need cuda_runtime.h to ensure that that EIGEN_USING_STD_MATH macro + // works properly on the device side + #include + #else + #define EIGEN_DEVICE_FUNC + #endif + +#else + #define EIGEN_DEVICE_FUNC + +#endif + +// When compiling CUDA device code with NVCC, pull in math functions from the +// global namespace. In host mode, and when device doee with clang, use the +// std versions. +#if defined(__CUDA_ARCH__) && defined(__NVCC__) + #define EIGEN_USING_STD_MATH(FUNC) using ::FUNC; +#else + #define EIGEN_USING_STD_MATH(FUNC) using std::FUNC; +#endif + +#if (defined(_CPPUNWIND) || defined(__EXCEPTIONS)) && !defined(__CUDA_ARCH__) && !defined(EIGEN_EXCEPTIONS) && !defined(EIGEN_USE_SYCL) + #define EIGEN_EXCEPTIONS +#endif + +#ifdef EIGEN_EXCEPTIONS + #include +#endif + +// then include this file where all our macros are defined. It's really important to do it first because +// it's where we do all the alignment settings (platform detection and honoring the user's will if he +// defined e.g. EIGEN_DONT_ALIGN) so it needs to be done before we do anything with vectorization. +#include "src/Core/util/Macros.h" + +// Disable the ipa-cp-clone optimization flag with MinGW 6.x or newer (enabled by default with -O3) +// See http://eigen.tuxfamily.org/bz/show_bug.cgi?id=556 for details. +#if EIGEN_COMP_MINGW && EIGEN_GNUC_AT_LEAST(4,6) + #pragma GCC optimize ("-fno-ipa-cp-clone") +#endif + +#include + +// this include file manages BLAS and MKL related macros +// and inclusion of their respective header files +#include "src/Core/util/MKL_support.h" + +// if alignment is disabled, then disable vectorization. Note: EIGEN_MAX_ALIGN_BYTES is the proper check, it takes into +// account both the user's will (EIGEN_MAX_ALIGN_BYTES,EIGEN_DONT_ALIGN) and our own platform checks +#if EIGEN_MAX_ALIGN_BYTES==0 + #ifndef EIGEN_DONT_VECTORIZE + #define EIGEN_DONT_VECTORIZE + #endif +#endif + +#if EIGEN_COMP_MSVC + #include // for _aligned_malloc -- need it regardless of whether vectorization is enabled + #if (EIGEN_COMP_MSVC >= 1500) // 2008 or later + // Remember that usage of defined() in a #define is undefined by the standard. + // a user reported that in 64-bit mode, MSVC doesn't care to define _M_IX86_FP. + #if (defined(_M_IX86_FP) && (_M_IX86_FP >= 2)) || EIGEN_ARCH_x86_64 + #define EIGEN_SSE2_ON_MSVC_2008_OR_LATER + #endif + #endif +#else + // Remember that usage of defined() in a #define is undefined by the standard + #if (defined __SSE2__) && ( (!EIGEN_COMP_GNUC) || EIGEN_COMP_ICC || EIGEN_GNUC_AT_LEAST(4,2) ) + #define EIGEN_SSE2_ON_NON_MSVC_BUT_NOT_OLD_GCC + #endif +#endif + +#ifndef EIGEN_DONT_VECTORIZE + + #if defined (EIGEN_SSE2_ON_NON_MSVC_BUT_NOT_OLD_GCC) || defined(EIGEN_SSE2_ON_MSVC_2008_OR_LATER) + + // Defines symbols for compile-time detection of which instructions are + // used. + // EIGEN_VECTORIZE_YY is defined if and only if the instruction set YY is used + #define EIGEN_VECTORIZE + #define EIGEN_VECTORIZE_SSE + #define EIGEN_VECTORIZE_SSE2 + + // Detect sse3/ssse3/sse4: + // gcc and icc defines __SSE3__, ... + // there is no way to know about this on msvc. You can define EIGEN_VECTORIZE_SSE* if you + // want to force the use of those instructions with msvc. + #ifdef __SSE3__ + #define EIGEN_VECTORIZE_SSE3 + #endif + #ifdef __SSSE3__ + #define EIGEN_VECTORIZE_SSSE3 + #endif + #ifdef __SSE4_1__ + #define EIGEN_VECTORIZE_SSE4_1 + #endif + #ifdef __SSE4_2__ + #define EIGEN_VECTORIZE_SSE4_2 + #endif + #ifdef __AVX__ + #define EIGEN_VECTORIZE_AVX + #define EIGEN_VECTORIZE_SSE3 + #define EIGEN_VECTORIZE_SSSE3 + #define EIGEN_VECTORIZE_SSE4_1 + #define EIGEN_VECTORIZE_SSE4_2 + #endif + #ifdef __AVX2__ + #define EIGEN_VECTORIZE_AVX2 + #endif + #ifdef __FMA__ + #define EIGEN_VECTORIZE_FMA + #endif + #if defined(__AVX512F__) && defined(EIGEN_ENABLE_AVX512) + #define EIGEN_VECTORIZE_AVX512 + #define EIGEN_VECTORIZE_AVX2 + #define EIGEN_VECTORIZE_AVX + #define EIGEN_VECTORIZE_FMA + #ifdef __AVX512DQ__ + #define EIGEN_VECTORIZE_AVX512DQ + #endif + #ifdef __AVX512ER__ + #define EIGEN_VECTORIZE_AVX512ER + #endif + #endif + + // include files + + // This extern "C" works around a MINGW-w64 compilation issue + // https://sourceforge.net/tracker/index.php?func=detail&aid=3018394&group_id=202880&atid=983354 + // In essence, intrin.h is included by windows.h and also declares intrinsics (just as emmintrin.h etc. below do). + // However, intrin.h uses an extern "C" declaration, and g++ thus complains of duplicate declarations + // with conflicting linkage. The linkage for intrinsics doesn't matter, but at that stage the compiler doesn't know; + // so, to avoid compile errors when windows.h is included after Eigen/Core, ensure intrinsics are extern "C" here too. + // notice that since these are C headers, the extern "C" is theoretically needed anyways. + extern "C" { + // In theory we should only include immintrin.h and not the other *mmintrin.h header files directly. + // Doing so triggers some issues with ICC. However old gcc versions seems to not have this file, thus: + #if EIGEN_COMP_ICC >= 1110 + #include + #else + #include + #include + #include + #ifdef EIGEN_VECTORIZE_SSE3 + #include + #endif + #ifdef EIGEN_VECTORIZE_SSSE3 + #include + #endif + #ifdef EIGEN_VECTORIZE_SSE4_1 + #include + #endif + #ifdef EIGEN_VECTORIZE_SSE4_2 + #include + #endif + #if defined(EIGEN_VECTORIZE_AVX) || defined(EIGEN_VECTORIZE_AVX512) + #include + #endif + #endif + } // end extern "C" + #elif defined __VSX__ + #define EIGEN_VECTORIZE + #define EIGEN_VECTORIZE_VSX + #include + // We need to #undef all these ugly tokens defined in + // => use __vector instead of vector + #undef bool + #undef vector + #undef pixel + #elif defined __ALTIVEC__ + #define EIGEN_VECTORIZE + #define EIGEN_VECTORIZE_ALTIVEC + #include + // We need to #undef all these ugly tokens defined in + // => use __vector instead of vector + #undef bool + #undef vector + #undef pixel + #elif (defined __ARM_NEON) || (defined __ARM_NEON__) + #define EIGEN_VECTORIZE + #define EIGEN_VECTORIZE_NEON + #include + #elif (defined __s390x__ && defined __VEC__) + #define EIGEN_VECTORIZE + #define EIGEN_VECTORIZE_ZVECTOR + #include + #endif +#endif + +#if defined(__F16C__) && !defined(EIGEN_COMP_CLANG) + // We can use the optimized fp16 to float and float to fp16 conversion routines + #define EIGEN_HAS_FP16_C +#endif + +#if defined __CUDACC__ + #define EIGEN_VECTORIZE_CUDA + #include + #if EIGEN_CUDACC_VER >= 70500 + #define EIGEN_HAS_CUDA_FP16 + #endif +#endif + +#if defined EIGEN_HAS_CUDA_FP16 + #include + #include +#endif + +#if (defined _OPENMP) && (!defined EIGEN_DONT_PARALLELIZE) + #define EIGEN_HAS_OPENMP +#endif + +#ifdef EIGEN_HAS_OPENMP +#include +#endif + +// MSVC for windows mobile does not have the errno.h file +#if !(EIGEN_COMP_MSVC && EIGEN_OS_WINCE) && !EIGEN_COMP_ARM +#define EIGEN_HAS_ERRNO +#endif + +#ifdef EIGEN_HAS_ERRNO +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // for CHAR_BIT +// for min/max: +#include + +// for std::is_nothrow_move_assignable +#ifdef EIGEN_INCLUDE_TYPE_TRAITS +#include +#endif + +// for outputting debug info +#ifdef EIGEN_DEBUG_ASSIGN +#include +#endif + +// required for __cpuid, needs to be included after cmath +#if EIGEN_COMP_MSVC && EIGEN_ARCH_i386_OR_x86_64 && !EIGEN_OS_WINCE + #include +#endif + +/** \brief Namespace containing all symbols from the %Eigen library. */ +namespace Eigen { + +inline static const char *SimdInstructionSetsInUse(void) { +#if defined(EIGEN_VECTORIZE_AVX512) + return "AVX512, FMA, AVX2, AVX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2"; +#elif defined(EIGEN_VECTORIZE_AVX) + return "AVX SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2"; +#elif defined(EIGEN_VECTORIZE_SSE4_2) + return "SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2"; +#elif defined(EIGEN_VECTORIZE_SSE4_1) + return "SSE, SSE2, SSE3, SSSE3, SSE4.1"; +#elif defined(EIGEN_VECTORIZE_SSSE3) + return "SSE, SSE2, SSE3, SSSE3"; +#elif defined(EIGEN_VECTORIZE_SSE3) + return "SSE, SSE2, SSE3"; +#elif defined(EIGEN_VECTORIZE_SSE2) + return "SSE, SSE2"; +#elif defined(EIGEN_VECTORIZE_ALTIVEC) + return "AltiVec"; +#elif defined(EIGEN_VECTORIZE_VSX) + return "VSX"; +#elif defined(EIGEN_VECTORIZE_NEON) + return "ARM NEON"; +#elif defined(EIGEN_VECTORIZE_ZVECTOR) + return "S390X ZVECTOR"; +#else + return "None"; +#endif +} + +} // end namespace Eigen + +#if defined EIGEN2_SUPPORT_STAGE40_FULL_EIGEN3_STRICTNESS || defined EIGEN2_SUPPORT_STAGE30_FULL_EIGEN3_API || defined EIGEN2_SUPPORT_STAGE20_RESOLVE_API_CONFLICTS || defined EIGEN2_SUPPORT_STAGE10_FULL_EIGEN2_API || defined EIGEN2_SUPPORT +// This will generate an error message: +#error Eigen2-support is only available up to version 3.2. Please go to "http://eigen.tuxfamily.org/index.php?title=Eigen2" for further information +#endif + +namespace Eigen { + +// we use size_t frequently and we'll never remember to prepend it with std:: everytime just to +// ensure QNX/QCC support +using std::size_t; +// gcc 4.6.0 wants std:: for ptrdiff_t +using std::ptrdiff_t; + +} + +/** \defgroup Core_Module Core module + * This is the main module of Eigen providing dense matrix and vector support + * (both fixed and dynamic size) with all the features corresponding to a BLAS library + * and much more... + * + * \code + * #include + * \endcode + */ + +#include "src/Core/util/Constants.h" +#include "src/Core/util/Meta.h" +#include "src/Core/util/ForwardDeclarations.h" +#include "src/Core/util/StaticAssert.h" +#include "src/Core/util/XprHelper.h" +#include "src/Core/util/Memory.h" + +#include "src/Core/NumTraits.h" +#include "src/Core/MathFunctions.h" +#include "src/Core/GenericPacketMath.h" +#include "src/Core/MathFunctionsImpl.h" +#include "src/Core/arch/Default/ConjHelper.h" + +#if defined EIGEN_VECTORIZE_AVX512 + #include "src/Core/arch/SSE/PacketMath.h" + #include "src/Core/arch/AVX/PacketMath.h" + #include "src/Core/arch/AVX512/PacketMath.h" + #include "src/Core/arch/AVX512/MathFunctions.h" +#elif defined EIGEN_VECTORIZE_AVX + // Use AVX for floats and doubles, SSE for integers + #include "src/Core/arch/SSE/PacketMath.h" + #include "src/Core/arch/SSE/Complex.h" + #include "src/Core/arch/SSE/MathFunctions.h" + #include "src/Core/arch/AVX/PacketMath.h" + #include "src/Core/arch/AVX/MathFunctions.h" + #include "src/Core/arch/AVX/Complex.h" + #include "src/Core/arch/AVX/TypeCasting.h" + #include "src/Core/arch/SSE/TypeCasting.h" +#elif defined EIGEN_VECTORIZE_SSE + #include "src/Core/arch/SSE/PacketMath.h" + #include "src/Core/arch/SSE/MathFunctions.h" + #include "src/Core/arch/SSE/Complex.h" + #include "src/Core/arch/SSE/TypeCasting.h" +#elif defined(EIGEN_VECTORIZE_ALTIVEC) || defined(EIGEN_VECTORIZE_VSX) + #include "src/Core/arch/AltiVec/PacketMath.h" + #include "src/Core/arch/AltiVec/MathFunctions.h" + #include "src/Core/arch/AltiVec/Complex.h" +#elif defined EIGEN_VECTORIZE_NEON + #include "src/Core/arch/NEON/PacketMath.h" + #include "src/Core/arch/NEON/MathFunctions.h" + #include "src/Core/arch/NEON/Complex.h" +#elif defined EIGEN_VECTORIZE_ZVECTOR + #include "src/Core/arch/ZVector/PacketMath.h" + #include "src/Core/arch/ZVector/MathFunctions.h" + #include "src/Core/arch/ZVector/Complex.h" +#endif + +// Half float support +#include "src/Core/arch/CUDA/Half.h" +#include "src/Core/arch/CUDA/PacketMathHalf.h" +#include "src/Core/arch/CUDA/TypeCasting.h" + +#if defined EIGEN_VECTORIZE_CUDA + #include "src/Core/arch/CUDA/PacketMath.h" + #include "src/Core/arch/CUDA/MathFunctions.h" +#endif + +#include "src/Core/arch/Default/Settings.h" + +#include "src/Core/functors/TernaryFunctors.h" +#include "src/Core/functors/BinaryFunctors.h" +#include "src/Core/functors/UnaryFunctors.h" +#include "src/Core/functors/NullaryFunctors.h" +#include "src/Core/functors/StlFunctors.h" +#include "src/Core/functors/AssignmentFunctors.h" + +// Specialized functors to enable the processing of complex numbers +// on CUDA devices +#include "src/Core/arch/CUDA/Complex.h" + +#include "src/Core/IO.h" +#include "src/Core/DenseCoeffsBase.h" +#include "src/Core/DenseBase.h" +#include "src/Core/MatrixBase.h" +#include "src/Core/EigenBase.h" + +#include "src/Core/Product.h" +#include "src/Core/CoreEvaluators.h" +#include "src/Core/AssignEvaluator.h" + +#ifndef EIGEN_PARSED_BY_DOXYGEN // work around Doxygen bug triggered by Assign.h r814874 + // at least confirmed with Doxygen 1.5.5 and 1.5.6 + #include "src/Core/Assign.h" +#endif + +#include "src/Core/ArrayBase.h" +#include "src/Core/util/BlasUtil.h" +#include "src/Core/DenseStorage.h" +#include "src/Core/NestByValue.h" + +// #include "src/Core/ForceAlignedAccess.h" + +#include "src/Core/ReturnByValue.h" +#include "src/Core/NoAlias.h" +#include "src/Core/PlainObjectBase.h" +#include "src/Core/Matrix.h" +#include "src/Core/Array.h" +#include "src/Core/CwiseTernaryOp.h" +#include "src/Core/CwiseBinaryOp.h" +#include "src/Core/CwiseUnaryOp.h" +#include "src/Core/CwiseNullaryOp.h" +#include "src/Core/CwiseUnaryView.h" +#include "src/Core/SelfCwiseBinaryOp.h" +#include "src/Core/Dot.h" +#include "src/Core/StableNorm.h" +#include "src/Core/Stride.h" +#include "src/Core/MapBase.h" +#include "src/Core/Map.h" +#include "src/Core/Ref.h" +#include "src/Core/Block.h" +#include "src/Core/VectorBlock.h" +#include "src/Core/Transpose.h" +#include "src/Core/DiagonalMatrix.h" +#include "src/Core/Diagonal.h" +#include "src/Core/DiagonalProduct.h" +#include "src/Core/Redux.h" +#include "src/Core/Visitor.h" +#include "src/Core/Fuzzy.h" +#include "src/Core/Swap.h" +#include "src/Core/CommaInitializer.h" +#include "src/Core/GeneralProduct.h" +#include "src/Core/Solve.h" +#include "src/Core/Inverse.h" +#include "src/Core/SolverBase.h" +#include "src/Core/PermutationMatrix.h" +#include "src/Core/Transpositions.h" +#include "src/Core/TriangularMatrix.h" +#include "src/Core/SelfAdjointView.h" +#include "src/Core/products/GeneralBlockPanelKernel.h" +#include "src/Core/products/Parallelizer.h" +#include "src/Core/ProductEvaluators.h" +#include "src/Core/products/GeneralMatrixVector.h" +#include "src/Core/products/GeneralMatrixMatrix.h" +#include "src/Core/SolveTriangular.h" +#include "src/Core/products/GeneralMatrixMatrixTriangular.h" +#include "src/Core/products/SelfadjointMatrixVector.h" +#include "src/Core/products/SelfadjointMatrixMatrix.h" +#include "src/Core/products/SelfadjointProduct.h" +#include "src/Core/products/SelfadjointRank2Update.h" +#include "src/Core/products/TriangularMatrixVector.h" +#include "src/Core/products/TriangularMatrixMatrix.h" +#include "src/Core/products/TriangularSolverMatrix.h" +#include "src/Core/products/TriangularSolverVector.h" +#include "src/Core/BandMatrix.h" +#include "src/Core/CoreIterators.h" +#include "src/Core/ConditionEstimator.h" + +#include "src/Core/BooleanRedux.h" +#include "src/Core/Select.h" +#include "src/Core/VectorwiseOp.h" +#include "src/Core/Random.h" +#include "src/Core/Replicate.h" +#include "src/Core/Reverse.h" +#include "src/Core/ArrayWrapper.h" + +#ifdef EIGEN_USE_BLAS +#include "src/Core/products/GeneralMatrixMatrix_BLAS.h" +#include "src/Core/products/GeneralMatrixVector_BLAS.h" +#include "src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h" +#include "src/Core/products/SelfadjointMatrixMatrix_BLAS.h" +#include "src/Core/products/SelfadjointMatrixVector_BLAS.h" +#include "src/Core/products/TriangularMatrixMatrix_BLAS.h" +#include "src/Core/products/TriangularMatrixVector_BLAS.h" +#include "src/Core/products/TriangularSolverMatrix_BLAS.h" +#endif // EIGEN_USE_BLAS + +#ifdef EIGEN_USE_MKL_VML +#include "src/Core/Assign_MKL.h" +#endif + +#include "src/Core/GlobalFunctions.h" + +#include "src/Core/util/ReenableStupidWarnings.h" + +#endif // EIGEN_CORE_H diff --git a/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/Dense b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/Dense new file mode 100644 index 000000000..5768910bd --- /dev/null +++ b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/Dense @@ -0,0 +1,7 @@ +#include "Core" +#include "LU" +#include "Cholesky" +#include "QR" +#include "SVD" +#include "Geometry" +#include "Eigenvalues" diff --git a/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/Eigen b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/Eigen new file mode 100644 index 000000000..654c8dc63 --- /dev/null +++ b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/Eigen @@ -0,0 +1,2 @@ +#include "Dense" +#include "Sparse" diff --git a/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/Eigenvalues b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/Eigenvalues new file mode 100644 index 000000000..f3f661b07 --- /dev/null +++ b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/Eigenvalues @@ -0,0 +1,61 @@ +// This file is part of Eigen, a lightweight C++ template library +// for linear algebra. +// +// This Source Code Form is subject to the terms of the Mozilla +// Public License v. 2.0. If a copy of the MPL was not distributed +// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. + +#ifndef EIGEN_EIGENVALUES_MODULE_H +#define EIGEN_EIGENVALUES_MODULE_H + +#include "Core" + +#include "src/Core/util/DisableStupidWarnings.h" + +#include "Cholesky" +#include "Jacobi" +#include "Householder" +#include "LU" +#include "Geometry" + +/** \defgroup Eigenvalues_Module Eigenvalues module + * + * + * + * This module mainly provides various eigenvalue solvers. + * This module also provides some MatrixBase methods, including: + * - MatrixBase::eigenvalues(), + * - MatrixBase::operatorNorm() + * + * \code + * #include + * \endcode + */ + +#include "src/misc/RealSvd2x2.h" +#include "src/Eigenvalues/Tridiagonalization.h" +#include "src/Eigenvalues/RealSchur.h" +#include "src/Eigenvalues/EigenSolver.h" +#include "src/Eigenvalues/SelfAdjointEigenSolver.h" +#include "src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h" +#include "src/Eigenvalues/HessenbergDecomposition.h" +#include "src/Eigenvalues/ComplexSchur.h" +#include "src/Eigenvalues/ComplexEigenSolver.h" +#include "src/Eigenvalues/RealQZ.h" +#include "src/Eigenvalues/GeneralizedEigenSolver.h" +#include "src/Eigenvalues/MatrixBaseEigenvalues.h" +#ifdef EIGEN_USE_LAPACKE +#ifdef EIGEN_USE_MKL +#include "mkl_lapacke.h" +#else +#include "src/misc/lapacke.h" +#endif +#include "src/Eigenvalues/RealSchur_LAPACKE.h" +#include "src/Eigenvalues/ComplexSchur_LAPACKE.h" +#include "src/Eigenvalues/SelfAdjointEigenSolver_LAPACKE.h" +#endif + +#include "src/Core/util/ReenableStupidWarnings.h" + +#endif // EIGEN_EIGENVALUES_MODULE_H +/* vim: set filetype=cpp et sw=2 ts=2 ai: */ diff --git a/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/Geometry b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/Geometry new file mode 100644 index 000000000..716d52952 --- /dev/null +++ b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/Geometry @@ -0,0 +1,62 @@ +// This file is part of Eigen, a lightweight C++ template library +// for linear algebra. +// +// This Source Code Form is subject to the terms of the Mozilla +// Public License v. 2.0. If a copy of the MPL was not distributed +// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. + +#ifndef EIGEN_GEOMETRY_MODULE_H +#define EIGEN_GEOMETRY_MODULE_H + +#include "Core" + +#include "src/Core/util/DisableStupidWarnings.h" + +#include "SVD" +#include "LU" +#include + +/** \defgroup Geometry_Module Geometry module + * + * This module provides support for: + * - fixed-size homogeneous transformations + * - translation, scaling, 2D and 3D rotations + * - \link Quaternion quaternions \endlink + * - cross products (\ref MatrixBase::cross, \ref MatrixBase::cross3) + * - orthognal vector generation (\ref MatrixBase::unitOrthogonal) + * - some linear components: \link ParametrizedLine parametrized-lines \endlink and \link Hyperplane hyperplanes \endlink + * - \link AlignedBox axis aligned bounding boxes \endlink + * - \link umeyama least-square transformation fitting \endlink + * + * \code + * #include + * \endcode + */ + +#include "src/Geometry/OrthoMethods.h" +#include "src/Geometry/EulerAngles.h" + +#include "src/Geometry/Homogeneous.h" +#include "src/Geometry/RotationBase.h" +#include "src/Geometry/Rotation2D.h" +#include "src/Geometry/Quaternion.h" +#include "src/Geometry/AngleAxis.h" +#include "src/Geometry/Transform.h" +#include "src/Geometry/Translation.h" +#include "src/Geometry/Scaling.h" +#include "src/Geometry/Hyperplane.h" +#include "src/Geometry/ParametrizedLine.h" +#include "src/Geometry/AlignedBox.h" +#include "src/Geometry/Umeyama.h" + +// Use the SSE optimized version whenever possible. At the moment the +// SSE version doesn't compile when AVX is enabled +#if defined EIGEN_VECTORIZE_SSE && !defined EIGEN_VECTORIZE_AVX +#include "src/Geometry/arch/Geometry_SSE.h" +#endif + +#include "src/Core/util/ReenableStupidWarnings.h" + +#endif // EIGEN_GEOMETRY_MODULE_H +/* vim: set filetype=cpp et sw=2 ts=2 ai: */ + diff --git a/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/Householder b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/Householder new file mode 100644 index 000000000..89cd81b1a --- /dev/null +++ b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/Householder @@ -0,0 +1,30 @@ +// This file is part of Eigen, a lightweight C++ template library +// for linear algebra. +// +// This Source Code Form is subject to the terms of the Mozilla +// Public License v. 2.0. If a copy of the MPL was not distributed +// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. + +#ifndef EIGEN_HOUSEHOLDER_MODULE_H +#define EIGEN_HOUSEHOLDER_MODULE_H + +#include "Core" + +#include "src/Core/util/DisableStupidWarnings.h" + +/** \defgroup Householder_Module Householder module + * This module provides Householder transformations. + * + * \code + * #include + * \endcode + */ + +#include "src/Householder/Householder.h" +#include "src/Householder/HouseholderSequence.h" +#include "src/Householder/BlockHouseholder.h" + +#include "src/Core/util/ReenableStupidWarnings.h" + +#endif // EIGEN_HOUSEHOLDER_MODULE_H +/* vim: set filetype=cpp et sw=2 ts=2 ai: */ diff --git a/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/IterativeLinearSolvers b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/IterativeLinearSolvers new file mode 100644 index 000000000..957d5750b --- /dev/null +++ b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/IterativeLinearSolvers @@ -0,0 +1,48 @@ +// This file is part of Eigen, a lightweight C++ template library +// for linear algebra. +// +// This Source Code Form is subject to the terms of the Mozilla +// Public License v. 2.0. If a copy of the MPL was not distributed +// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. + +#ifndef EIGEN_ITERATIVELINEARSOLVERS_MODULE_H +#define EIGEN_ITERATIVELINEARSOLVERS_MODULE_H + +#include "SparseCore" +#include "OrderingMethods" + +#include "src/Core/util/DisableStupidWarnings.h" + +/** + * \defgroup IterativeLinearSolvers_Module IterativeLinearSolvers module + * + * This module currently provides iterative methods to solve problems of the form \c A \c x = \c b, where \c A is a squared matrix, usually very large and sparse. + * Those solvers are accessible via the following classes: + * - ConjugateGradient for selfadjoint (hermitian) matrices, + * - LeastSquaresConjugateGradient for rectangular least-square problems, + * - BiCGSTAB for general square matrices. + * + * These iterative solvers are associated with some preconditioners: + * - IdentityPreconditioner - not really useful + * - DiagonalPreconditioner - also called Jacobi preconditioner, work very well on diagonal dominant matrices. + * - IncompleteLUT - incomplete LU factorization with dual thresholding + * + * Such problems can also be solved using the direct sparse decomposition modules: SparseCholesky, CholmodSupport, UmfPackSupport, SuperLUSupport. + * + \code + #include + \endcode + */ + +#include "src/IterativeLinearSolvers/SolveWithGuess.h" +#include "src/IterativeLinearSolvers/IterativeSolverBase.h" +#include "src/IterativeLinearSolvers/BasicPreconditioners.h" +#include "src/IterativeLinearSolvers/ConjugateGradient.h" +#include "src/IterativeLinearSolvers/LeastSquareConjugateGradient.h" +#include "src/IterativeLinearSolvers/BiCGSTAB.h" +#include "src/IterativeLinearSolvers/IncompleteLUT.h" +#include "src/IterativeLinearSolvers/IncompleteCholesky.h" + +#include "src/Core/util/ReenableStupidWarnings.h" + +#endif // EIGEN_ITERATIVELINEARSOLVERS_MODULE_H diff --git a/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/Jacobi b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/Jacobi new file mode 100644 index 000000000..17c1d785a --- /dev/null +++ b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/Jacobi @@ -0,0 +1,33 @@ +// This file is part of Eigen, a lightweight C++ template library +// for linear algebra. +// +// This Source Code Form is subject to the terms of the Mozilla +// Public License v. 2.0. If a copy of the MPL was not distributed +// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. + +#ifndef EIGEN_JACOBI_MODULE_H +#define EIGEN_JACOBI_MODULE_H + +#include "Core" + +#include "src/Core/util/DisableStupidWarnings.h" + +/** \defgroup Jacobi_Module Jacobi module + * This module provides Jacobi and Givens rotations. + * + * \code + * #include + * \endcode + * + * In addition to listed classes, it defines the two following MatrixBase methods to apply a Jacobi or Givens rotation: + * - MatrixBase::applyOnTheLeft() + * - MatrixBase::applyOnTheRight(). + */ + +#include "src/Jacobi/Jacobi.h" + +#include "src/Core/util/ReenableStupidWarnings.h" + +#endif // EIGEN_JACOBI_MODULE_H +/* vim: set filetype=cpp et sw=2 ts=2 ai: */ + diff --git a/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/LU b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/LU new file mode 100644 index 000000000..6418a86e1 --- /dev/null +++ b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/LU @@ -0,0 +1,50 @@ +// This file is part of Eigen, a lightweight C++ template library +// for linear algebra. +// +// This Source Code Form is subject to the terms of the Mozilla +// Public License v. 2.0. If a copy of the MPL was not distributed +// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. + +#ifndef EIGEN_LU_MODULE_H +#define EIGEN_LU_MODULE_H + +#include "Core" + +#include "src/Core/util/DisableStupidWarnings.h" + +/** \defgroup LU_Module LU module + * This module includes %LU decomposition and related notions such as matrix inversion and determinant. + * This module defines the following MatrixBase methods: + * - MatrixBase::inverse() + * - MatrixBase::determinant() + * + * \code + * #include + * \endcode + */ + +#include "src/misc/Kernel.h" +#include "src/misc/Image.h" +#include "src/LU/FullPivLU.h" +#include "src/LU/PartialPivLU.h" +#ifdef EIGEN_USE_LAPACKE +#ifdef EIGEN_USE_MKL +#include "mkl_lapacke.h" +#else +#include "src/misc/lapacke.h" +#endif +#include "src/LU/PartialPivLU_LAPACKE.h" +#endif +#include "src/LU/Determinant.h" +#include "src/LU/InverseImpl.h" + +// Use the SSE optimized version whenever possible. At the moment the +// SSE version doesn't compile when AVX is enabled +#if defined EIGEN_VECTORIZE_SSE && !defined EIGEN_VECTORIZE_AVX + #include "src/LU/arch/Inverse_SSE.h" +#endif + +#include "src/Core/util/ReenableStupidWarnings.h" + +#endif // EIGEN_LU_MODULE_H +/* vim: set filetype=cpp et sw=2 ts=2 ai: */ diff --git a/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/MetisSupport b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/MetisSupport new file mode 100644 index 000000000..85c41bf34 --- /dev/null +++ b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/MetisSupport @@ -0,0 +1,35 @@ +// This file is part of Eigen, a lightweight C++ template library +// for linear algebra. +// +// This Source Code Form is subject to the terms of the Mozilla +// Public License v. 2.0. If a copy of the MPL was not distributed +// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. + +#ifndef EIGEN_METISSUPPORT_MODULE_H +#define EIGEN_METISSUPPORT_MODULE_H + +#include "SparseCore" + +#include "src/Core/util/DisableStupidWarnings.h" + +extern "C" { +#include +} + + +/** \ingroup Support_modules + * \defgroup MetisSupport_Module MetisSupport module + * + * \code + * #include + * \endcode + * This module defines an interface to the METIS reordering package (http://glaros.dtc.umn.edu/gkhome/views/metis). + * It can be used just as any other built-in method as explained in \link OrderingMethods_Module here. \endlink + */ + + +#include "src/MetisSupport/MetisSupport.h" + +#include "src/Core/util/ReenableStupidWarnings.h" + +#endif // EIGEN_METISSUPPORT_MODULE_H diff --git a/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/OrderingMethods b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/OrderingMethods new file mode 100644 index 000000000..d8ea36193 --- /dev/null +++ b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/OrderingMethods @@ -0,0 +1,73 @@ +// This file is part of Eigen, a lightweight C++ template library +// for linear algebra. +// +// This Source Code Form is subject to the terms of the Mozilla +// Public License v. 2.0. If a copy of the MPL was not distributed +// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. + +#ifndef EIGEN_ORDERINGMETHODS_MODULE_H +#define EIGEN_ORDERINGMETHODS_MODULE_H + +#include "SparseCore" + +#include "src/Core/util/DisableStupidWarnings.h" + +/** + * \defgroup OrderingMethods_Module OrderingMethods module + * + * This module is currently for internal use only + * + * It defines various built-in and external ordering methods for sparse matrices. + * They are typically used to reduce the number of elements during + * the sparse matrix decomposition (LLT, LU, QR). + * Precisely, in a preprocessing step, a permutation matrix P is computed using + * those ordering methods and applied to the columns of the matrix. + * Using for instance the sparse Cholesky decomposition, it is expected that + * the nonzeros elements in LLT(A*P) will be much smaller than that in LLT(A). + * + * + * Usage : + * \code + * #include + * \endcode + * + * A simple usage is as a template parameter in the sparse decomposition classes : + * + * \code + * SparseLU > solver; + * \endcode + * + * \code + * SparseQR > solver; + * \endcode + * + * It is possible as well to call directly a particular ordering method for your own purpose, + * \code + * AMDOrdering ordering; + * PermutationMatrix perm; + * SparseMatrix A; + * //Fill the matrix ... + * + * ordering(A, perm); // Call AMD + * \endcode + * + * \note Some of these methods (like AMD or METIS), need the sparsity pattern + * of the input matrix to be symmetric. When the matrix is structurally unsymmetric, + * Eigen computes internally the pattern of \f$A^T*A\f$ before calling the method. + * If your matrix is already symmetric (at leat in structure), you can avoid that + * by calling the method with a SelfAdjointView type. + * + * \code + * // Call the ordering on the pattern of the lower triangular matrix A + * ordering(A.selfadjointView(), perm); + * \endcode + */ + +#ifndef EIGEN_MPL2_ONLY +#include "src/OrderingMethods/Amd.h" +#endif + +#include "src/OrderingMethods/Ordering.h" +#include "src/Core/util/ReenableStupidWarnings.h" + +#endif // EIGEN_ORDERINGMETHODS_MODULE_H diff --git a/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/PaStiXSupport b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/PaStiXSupport new file mode 100644 index 000000000..de3a63b4d --- /dev/null +++ b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/PaStiXSupport @@ -0,0 +1,48 @@ +// This file is part of Eigen, a lightweight C++ template library +// for linear algebra. +// +// This Source Code Form is subject to the terms of the Mozilla +// Public License v. 2.0. If a copy of the MPL was not distributed +// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. + +#ifndef EIGEN_PASTIXSUPPORT_MODULE_H +#define EIGEN_PASTIXSUPPORT_MODULE_H + +#include "SparseCore" + +#include "src/Core/util/DisableStupidWarnings.h" + +extern "C" { +#include +#include +} + +#ifdef complex +#undef complex +#endif + +/** \ingroup Support_modules + * \defgroup PaStiXSupport_Module PaStiXSupport module + * + * This module provides an interface to the PaSTiX library. + * PaSTiX is a general \b supernodal, \b parallel and \b opensource sparse solver. + * It provides the two following main factorization classes: + * - class PastixLLT : a supernodal, parallel LLt Cholesky factorization. + * - class PastixLDLT: a supernodal, parallel LDLt Cholesky factorization. + * - class PastixLU : a supernodal, parallel LU factorization (optimized for a symmetric pattern). + * + * \code + * #include + * \endcode + * + * In order to use this module, the PaSTiX headers must be accessible from the include paths, and your binary must be linked to the PaSTiX library and its dependencies. + * The dependencies depend on how PaSTiX has been compiled. + * For a cmake based project, you can use our FindPaSTiX.cmake module to help you in this task. + * + */ + +#include "src/PaStiXSupport/PaStiXSupport.h" + +#include "src/Core/util/ReenableStupidWarnings.h" + +#endif // EIGEN_PASTIXSUPPORT_MODULE_H diff --git a/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/PardisoSupport b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/PardisoSupport new file mode 100644 index 000000000..340edf51f --- /dev/null +++ b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/PardisoSupport @@ -0,0 +1,35 @@ +// This file is part of Eigen, a lightweight C++ template library +// for linear algebra. +// +// This Source Code Form is subject to the terms of the Mozilla +// Public License v. 2.0. If a copy of the MPL was not distributed +// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. + +#ifndef EIGEN_PARDISOSUPPORT_MODULE_H +#define EIGEN_PARDISOSUPPORT_MODULE_H + +#include "SparseCore" + +#include "src/Core/util/DisableStupidWarnings.h" + +#include + +/** \ingroup Support_modules + * \defgroup PardisoSupport_Module PardisoSupport module + * + * This module brings support for the Intel(R) MKL PARDISO direct sparse solvers. + * + * \code + * #include + * \endcode + * + * In order to use this module, the MKL headers must be accessible from the include paths, and your binary must be linked to the MKL library and its dependencies. + * See this \ref TopicUsingIntelMKL "page" for more information on MKL-Eigen integration. + * + */ + +#include "src/PardisoSupport/PardisoSupport.h" + +#include "src/Core/util/ReenableStupidWarnings.h" + +#endif // EIGEN_PARDISOSUPPORT_MODULE_H diff --git a/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/QR b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/QR new file mode 100644 index 000000000..c7e914469 --- /dev/null +++ b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/QR @@ -0,0 +1,51 @@ +// This file is part of Eigen, a lightweight C++ template library +// for linear algebra. +// +// This Source Code Form is subject to the terms of the Mozilla +// Public License v. 2.0. If a copy of the MPL was not distributed +// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. + +#ifndef EIGEN_QR_MODULE_H +#define EIGEN_QR_MODULE_H + +#include "Core" + +#include "src/Core/util/DisableStupidWarnings.h" + +#include "Cholesky" +#include "Jacobi" +#include "Householder" + +/** \defgroup QR_Module QR module + * + * + * + * This module provides various QR decompositions + * This module also provides some MatrixBase methods, including: + * - MatrixBase::householderQr() + * - MatrixBase::colPivHouseholderQr() + * - MatrixBase::fullPivHouseholderQr() + * + * \code + * #include + * \endcode + */ + +#include "src/QR/HouseholderQR.h" +#include "src/QR/FullPivHouseholderQR.h" +#include "src/QR/ColPivHouseholderQR.h" +#include "src/QR/CompleteOrthogonalDecomposition.h" +#ifdef EIGEN_USE_LAPACKE +#ifdef EIGEN_USE_MKL +#include "mkl_lapacke.h" +#else +#include "src/misc/lapacke.h" +#endif +#include "src/QR/HouseholderQR_LAPACKE.h" +#include "src/QR/ColPivHouseholderQR_LAPACKE.h" +#endif + +#include "src/Core/util/ReenableStupidWarnings.h" + +#endif // EIGEN_QR_MODULE_H +/* vim: set filetype=cpp et sw=2 ts=2 ai: */ diff --git a/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/QtAlignedMalloc b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/QtAlignedMalloc new file mode 100644 index 000000000..4f07df02a --- /dev/null +++ b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/QtAlignedMalloc @@ -0,0 +1,40 @@ +// This file is part of Eigen, a lightweight C++ template library +// for linear algebra. +// +// This Source Code Form is subject to the terms of the Mozilla +// Public License v. 2.0. If a copy of the MPL was not distributed +// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. + +#ifndef EIGEN_QTMALLOC_MODULE_H +#define EIGEN_QTMALLOC_MODULE_H + +#include "Core" + +#if (!EIGEN_MALLOC_ALREADY_ALIGNED) + +#include "src/Core/util/DisableStupidWarnings.h" + +void *qMalloc(std::size_t size) +{ + return Eigen::internal::aligned_malloc(size); +} + +void qFree(void *ptr) +{ + Eigen::internal::aligned_free(ptr); +} + +void *qRealloc(void *ptr, std::size_t size) +{ + void* newPtr = Eigen::internal::aligned_malloc(size); + std::memcpy(newPtr, ptr, size); + Eigen::internal::aligned_free(ptr); + return newPtr; +} + +#include "src/Core/util/ReenableStupidWarnings.h" + +#endif + +#endif // EIGEN_QTMALLOC_MODULE_H +/* vim: set filetype=cpp et sw=2 ts=2 ai: */ diff --git a/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/SPQRSupport b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/SPQRSupport new file mode 100644 index 000000000..f70390c17 --- /dev/null +++ b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/SPQRSupport @@ -0,0 +1,34 @@ +// This file is part of Eigen, a lightweight C++ template library +// for linear algebra. +// +// This Source Code Form is subject to the terms of the Mozilla +// Public License v. 2.0. If a copy of the MPL was not distributed +// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. + +#ifndef EIGEN_SPQRSUPPORT_MODULE_H +#define EIGEN_SPQRSUPPORT_MODULE_H + +#include "SparseCore" + +#include "src/Core/util/DisableStupidWarnings.h" + +#include "SuiteSparseQR.hpp" + +/** \ingroup Support_modules + * \defgroup SPQRSupport_Module SuiteSparseQR module + * + * This module provides an interface to the SPQR library, which is part of the suitesparse package. + * + * \code + * #include + * \endcode + * + * In order to use this module, the SPQR headers must be accessible from the include paths, and your binary must be linked to the SPQR library and its dependencies (Cholmod, AMD, COLAMD,...). + * For a cmake based project, you can use our FindSPQR.cmake and FindCholmod.Cmake modules + * + */ + +#include "src/CholmodSupport/CholmodSupport.h" +#include "src/SPQRSupport/SuiteSparseQRSupport.h" + +#endif diff --git a/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/SVD b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/SVD new file mode 100644 index 000000000..5d0e75f7f --- /dev/null +++ b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/SVD @@ -0,0 +1,51 @@ +// This file is part of Eigen, a lightweight C++ template library +// for linear algebra. +// +// This Source Code Form is subject to the terms of the Mozilla +// Public License v. 2.0. If a copy of the MPL was not distributed +// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. + +#ifndef EIGEN_SVD_MODULE_H +#define EIGEN_SVD_MODULE_H + +#include "QR" +#include "Householder" +#include "Jacobi" + +#include "src/Core/util/DisableStupidWarnings.h" + +/** \defgroup SVD_Module SVD module + * + * + * + * This module provides SVD decomposition for matrices (both real and complex). + * Two decomposition algorithms are provided: + * - JacobiSVD implementing two-sided Jacobi iterations is numerically very accurate, fast for small matrices, but very slow for larger ones. + * - BDCSVD implementing a recursive divide & conquer strategy on top of an upper-bidiagonalization which remains fast for large problems. + * These decompositions are accessible via the respective classes and following MatrixBase methods: + * - MatrixBase::jacobiSvd() + * - MatrixBase::bdcSvd() + * + * \code + * #include + * \endcode + */ + +#include "src/misc/RealSvd2x2.h" +#include "src/SVD/UpperBidiagonalization.h" +#include "src/SVD/SVDBase.h" +#include "src/SVD/JacobiSVD.h" +#include "src/SVD/BDCSVD.h" +#if defined(EIGEN_USE_LAPACKE) && !defined(EIGEN_USE_LAPACKE_STRICT) +#ifdef EIGEN_USE_MKL +#include "mkl_lapacke.h" +#else +#include "src/misc/lapacke.h" +#endif +#include "src/SVD/JacobiSVD_LAPACKE.h" +#endif + +#include "src/Core/util/ReenableStupidWarnings.h" + +#endif // EIGEN_SVD_MODULE_H +/* vim: set filetype=cpp et sw=2 ts=2 ai: */ diff --git a/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/Sparse b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/Sparse new file mode 100644 index 000000000..136e681a1 --- /dev/null +++ b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/Sparse @@ -0,0 +1,36 @@ +// This file is part of Eigen, a lightweight C++ template library +// for linear algebra. +// +// This Source Code Form is subject to the terms of the Mozilla +// Public License v. 2.0. If a copy of the MPL was not distributed +// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. + +#ifndef EIGEN_SPARSE_MODULE_H +#define EIGEN_SPARSE_MODULE_H + +/** \defgroup Sparse_Module Sparse meta-module + * + * Meta-module including all related modules: + * - \ref SparseCore_Module + * - \ref OrderingMethods_Module + * - \ref SparseCholesky_Module + * - \ref SparseLU_Module + * - \ref SparseQR_Module + * - \ref IterativeLinearSolvers_Module + * + \code + #include + \endcode + */ + +#include "SparseCore" +#include "OrderingMethods" +#ifndef EIGEN_MPL2_ONLY +#include "SparseCholesky" +#endif +#include "SparseLU" +#include "SparseQR" +#include "IterativeLinearSolvers" + +#endif // EIGEN_SPARSE_MODULE_H + diff --git a/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/SparseCholesky b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/SparseCholesky new file mode 100644 index 000000000..b6a320c40 --- /dev/null +++ b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/SparseCholesky @@ -0,0 +1,45 @@ +// This file is part of Eigen, a lightweight C++ template library +// for linear algebra. +// +// Copyright (C) 2008-2013 Gael Guennebaud +// +// This Source Code Form is subject to the terms of the Mozilla +// Public License v. 2.0. If a copy of the MPL was not distributed +// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. + +#ifndef EIGEN_SPARSECHOLESKY_MODULE_H +#define EIGEN_SPARSECHOLESKY_MODULE_H + +#include "SparseCore" +#include "OrderingMethods" + +#include "src/Core/util/DisableStupidWarnings.h" + +/** + * \defgroup SparseCholesky_Module SparseCholesky module + * + * This module currently provides two variants of the direct sparse Cholesky decomposition for selfadjoint (hermitian) matrices. + * Those decompositions are accessible via the following classes: + * - SimplicialLLt, + * - SimplicialLDLt + * + * Such problems can also be solved using the ConjugateGradient solver from the IterativeLinearSolvers module. + * + * \code + * #include + * \endcode + */ + +#ifdef EIGEN_MPL2_ONLY +#error The SparseCholesky module has nothing to offer in MPL2 only mode +#endif + +#include "src/SparseCholesky/SimplicialCholesky.h" + +#ifndef EIGEN_MPL2_ONLY +#include "src/SparseCholesky/SimplicialCholesky_impl.h" +#endif + +#include "src/Core/util/ReenableStupidWarnings.h" + +#endif // EIGEN_SPARSECHOLESKY_MODULE_H diff --git a/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/SparseCore b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/SparseCore new file mode 100644 index 000000000..76966c4c4 --- /dev/null +++ b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/SparseCore @@ -0,0 +1,69 @@ +// This file is part of Eigen, a lightweight C++ template library +// for linear algebra. +// +// This Source Code Form is subject to the terms of the Mozilla +// Public License v. 2.0. If a copy of the MPL was not distributed +// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. + +#ifndef EIGEN_SPARSECORE_MODULE_H +#define EIGEN_SPARSECORE_MODULE_H + +#include "Core" + +#include "src/Core/util/DisableStupidWarnings.h" + +#include +#include +#include +#include +#include + +/** + * \defgroup SparseCore_Module SparseCore module + * + * This module provides a sparse matrix representation, and basic associated matrix manipulations + * and operations. + * + * See the \ref TutorialSparse "Sparse tutorial" + * + * \code + * #include + * \endcode + * + * This module depends on: Core. + */ + +#include "src/SparseCore/SparseUtil.h" +#include "src/SparseCore/SparseMatrixBase.h" +#include "src/SparseCore/SparseAssign.h" +#include "src/SparseCore/CompressedStorage.h" +#include "src/SparseCore/AmbiVector.h" +#include "src/SparseCore/SparseCompressedBase.h" +#include "src/SparseCore/SparseMatrix.h" +#include "src/SparseCore/SparseMap.h" +#include "src/SparseCore/MappedSparseMatrix.h" +#include "src/SparseCore/SparseVector.h" +#include "src/SparseCore/SparseRef.h" +#include "src/SparseCore/SparseCwiseUnaryOp.h" +#include "src/SparseCore/SparseCwiseBinaryOp.h" +#include "src/SparseCore/SparseTranspose.h" +#include "src/SparseCore/SparseBlock.h" +#include "src/SparseCore/SparseDot.h" +#include "src/SparseCore/SparseRedux.h" +#include "src/SparseCore/SparseView.h" +#include "src/SparseCore/SparseDiagonalProduct.h" +#include "src/SparseCore/ConservativeSparseSparseProduct.h" +#include "src/SparseCore/SparseSparseProductWithPruning.h" +#include "src/SparseCore/SparseProduct.h" +#include "src/SparseCore/SparseDenseProduct.h" +#include "src/SparseCore/SparseSelfAdjointView.h" +#include "src/SparseCore/SparseTriangularView.h" +#include "src/SparseCore/TriangularSolver.h" +#include "src/SparseCore/SparsePermutation.h" +#include "src/SparseCore/SparseFuzzy.h" +#include "src/SparseCore/SparseSolverBase.h" + +#include "src/Core/util/ReenableStupidWarnings.h" + +#endif // EIGEN_SPARSECORE_MODULE_H + diff --git a/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/SparseLU b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/SparseLU new file mode 100644 index 000000000..38b38b531 --- /dev/null +++ b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/SparseLU @@ -0,0 +1,46 @@ +// This file is part of Eigen, a lightweight C++ template library +// for linear algebra. +// +// Copyright (C) 2012 Désiré Nuentsa-Wakam +// Copyright (C) 2012 Gael Guennebaud +// +// This Source Code Form is subject to the terms of the Mozilla +// Public License v. 2.0. If a copy of the MPL was not distributed +// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. + +#ifndef EIGEN_SPARSELU_MODULE_H +#define EIGEN_SPARSELU_MODULE_H + +#include "SparseCore" + +/** + * \defgroup SparseLU_Module SparseLU module + * This module defines a supernodal factorization of general sparse matrices. + * The code is fully optimized for supernode-panel updates with specialized kernels. + * Please, see the documentation of the SparseLU class for more details. + */ + +// Ordering interface +#include "OrderingMethods" + +#include "src/SparseLU/SparseLU_gemm_kernel.h" + +#include "src/SparseLU/SparseLU_Structs.h" +#include "src/SparseLU/SparseLU_SupernodalMatrix.h" +#include "src/SparseLU/SparseLUImpl.h" +#include "src/SparseCore/SparseColEtree.h" +#include "src/SparseLU/SparseLU_Memory.h" +#include "src/SparseLU/SparseLU_heap_relax_snode.h" +#include "src/SparseLU/SparseLU_relax_snode.h" +#include "src/SparseLU/SparseLU_pivotL.h" +#include "src/SparseLU/SparseLU_panel_dfs.h" +#include "src/SparseLU/SparseLU_kernel_bmod.h" +#include "src/SparseLU/SparseLU_panel_bmod.h" +#include "src/SparseLU/SparseLU_column_dfs.h" +#include "src/SparseLU/SparseLU_column_bmod.h" +#include "src/SparseLU/SparseLU_copy_to_ucol.h" +#include "src/SparseLU/SparseLU_pruneL.h" +#include "src/SparseLU/SparseLU_Utils.h" +#include "src/SparseLU/SparseLU.h" + +#endif // EIGEN_SPARSELU_MODULE_H diff --git a/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/SparseQR b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/SparseQR new file mode 100644 index 000000000..a6f3b7f7d --- /dev/null +++ b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/SparseQR @@ -0,0 +1,37 @@ +// This file is part of Eigen, a lightweight C++ template library +// for linear algebra. +// +// This Source Code Form is subject to the terms of the Mozilla +// Public License v. 2.0. If a copy of the MPL was not distributed +// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. + +#ifndef EIGEN_SPARSEQR_MODULE_H +#define EIGEN_SPARSEQR_MODULE_H + +#include "SparseCore" +#include "OrderingMethods" +#include "src/Core/util/DisableStupidWarnings.h" + +/** \defgroup SparseQR_Module SparseQR module + * \brief Provides QR decomposition for sparse matrices + * + * This module provides a simplicial version of the left-looking Sparse QR decomposition. + * The columns of the input matrix should be reordered to limit the fill-in during the + * decomposition. Built-in methods (COLAMD, AMD) or external methods (METIS) can be used to this end. + * See the \link OrderingMethods_Module OrderingMethods\endlink module for the list + * of built-in and external ordering methods. + * + * \code + * #include + * \endcode + * + * + */ + +#include "OrderingMethods" +#include "src/SparseCore/SparseColEtree.h" +#include "src/SparseQR/SparseQR.h" + +#include "src/Core/util/ReenableStupidWarnings.h" + +#endif diff --git a/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/StdDeque b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/StdDeque new file mode 100644 index 000000000..bc68397be --- /dev/null +++ b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/StdDeque @@ -0,0 +1,27 @@ +// This file is part of Eigen, a lightweight C++ template library +// for linear algebra. +// +// Copyright (C) 2009 Gael Guennebaud +// Copyright (C) 2009 Hauke Heibel +// +// This Source Code Form is subject to the terms of the Mozilla +// Public License v. 2.0. If a copy of the MPL was not distributed +// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. + +#ifndef EIGEN_STDDEQUE_MODULE_H +#define EIGEN_STDDEQUE_MODULE_H + +#include "Core" +#include + +#if EIGEN_COMP_MSVC && EIGEN_OS_WIN64 && (EIGEN_MAX_STATIC_ALIGN_BYTES<=16) /* MSVC auto aligns up to 16 bytes in 64 bit builds */ + +#define EIGEN_DEFINE_STL_DEQUE_SPECIALIZATION(...) + +#else + +#include "src/StlSupport/StdDeque.h" + +#endif + +#endif // EIGEN_STDDEQUE_MODULE_H diff --git a/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/StdList b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/StdList new file mode 100644 index 000000000..4c6262c08 --- /dev/null +++ b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/StdList @@ -0,0 +1,26 @@ +// This file is part of Eigen, a lightweight C++ template library +// for linear algebra. +// +// Copyright (C) 2009 Hauke Heibel +// +// This Source Code Form is subject to the terms of the Mozilla +// Public License v. 2.0. If a copy of the MPL was not distributed +// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. + +#ifndef EIGEN_STDLIST_MODULE_H +#define EIGEN_STDLIST_MODULE_H + +#include "Core" +#include + +#if EIGEN_COMP_MSVC && EIGEN_OS_WIN64 && (EIGEN_MAX_STATIC_ALIGN_BYTES<=16) /* MSVC auto aligns up to 16 bytes in 64 bit builds */ + +#define EIGEN_DEFINE_STL_LIST_SPECIALIZATION(...) + +#else + +#include "src/StlSupport/StdList.h" + +#endif + +#endif // EIGEN_STDLIST_MODULE_H diff --git a/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/StdVector b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/StdVector new file mode 100644 index 000000000..0c4697ad5 --- /dev/null +++ b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/StdVector @@ -0,0 +1,27 @@ +// This file is part of Eigen, a lightweight C++ template library +// for linear algebra. +// +// Copyright (C) 2009 Gael Guennebaud +// Copyright (C) 2009 Hauke Heibel +// +// This Source Code Form is subject to the terms of the Mozilla +// Public License v. 2.0. If a copy of the MPL was not distributed +// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. + +#ifndef EIGEN_STDVECTOR_MODULE_H +#define EIGEN_STDVECTOR_MODULE_H + +#include "Core" +#include + +#if EIGEN_COMP_MSVC && EIGEN_OS_WIN64 && (EIGEN_MAX_STATIC_ALIGN_BYTES<=16) /* MSVC auto aligns up to 16 bytes in 64 bit builds */ + +#define EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(...) + +#else + +#include "src/StlSupport/StdVector.h" + +#endif + +#endif // EIGEN_STDVECTOR_MODULE_H diff --git a/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/SuperLUSupport b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/SuperLUSupport new file mode 100644 index 000000000..59312a82d --- /dev/null +++ b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/SuperLUSupport @@ -0,0 +1,64 @@ +// This file is part of Eigen, a lightweight C++ template library +// for linear algebra. +// +// This Source Code Form is subject to the terms of the Mozilla +// Public License v. 2.0. If a copy of the MPL was not distributed +// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. + +#ifndef EIGEN_SUPERLUSUPPORT_MODULE_H +#define EIGEN_SUPERLUSUPPORT_MODULE_H + +#include "SparseCore" + +#include "src/Core/util/DisableStupidWarnings.h" + +#ifdef EMPTY +#define EIGEN_EMPTY_WAS_ALREADY_DEFINED +#endif + +typedef int int_t; +#include +#include +#include + +// slu_util.h defines a preprocessor token named EMPTY which is really polluting, +// so we remove it in favor of a SUPERLU_EMPTY token. +// If EMPTY was already defined then we don't undef it. + +#if defined(EIGEN_EMPTY_WAS_ALREADY_DEFINED) +# undef EIGEN_EMPTY_WAS_ALREADY_DEFINED +#elif defined(EMPTY) +# undef EMPTY +#endif + +#define SUPERLU_EMPTY (-1) + +namespace Eigen { struct SluMatrix; } + +/** \ingroup Support_modules + * \defgroup SuperLUSupport_Module SuperLUSupport module + * + * This module provides an interface to the SuperLU library. + * It provides the following factorization class: + * - class SuperLU: a supernodal sequential LU factorization. + * - class SuperILU: a supernodal sequential incomplete LU factorization (to be used as a preconditioner for iterative methods). + * + * \warning This wrapper requires at least versions 4.0 of SuperLU. The 3.x versions are not supported. + * + * \warning When including this module, you have to use SUPERLU_EMPTY instead of EMPTY which is no longer defined because it is too polluting. + * + * \code + * #include + * \endcode + * + * In order to use this module, the superlu headers must be accessible from the include paths, and your binary must be linked to the superlu library and its dependencies. + * The dependencies depend on how superlu has been compiled. + * For a cmake based project, you can use our FindSuperLU.cmake module to help you in this task. + * + */ + +#include "src/SuperLUSupport/SuperLUSupport.h" + +#include "src/Core/util/ReenableStupidWarnings.h" + +#endif // EIGEN_SUPERLUSUPPORT_MODULE_H diff --git a/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/UmfPackSupport b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/UmfPackSupport new file mode 100644 index 000000000..00eec8087 --- /dev/null +++ b/Assets/Obi/Plugins/libOni.bundle/Contents/Resources/UmfPackSupport @@ -0,0 +1,40 @@ +// This file is part of Eigen, a lightweight C++ template library +// for linear algebra. +// +// This Source Code Form is subject to the terms of the Mozilla +// Public License v. 2.0. If a copy of the MPL was not distributed +// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. + +#ifndef EIGEN_UMFPACKSUPPORT_MODULE_H +#define EIGEN_UMFPACKSUPPORT_MODULE_H + +#include "SparseCore" + +#include "src/Core/util/DisableStupidWarnings.h" + +extern "C" { +#include +} + +/** \ingroup Support_modules + * \defgroup UmfPackSupport_Module UmfPackSupport module + * + * This module provides an interface to the UmfPack library which is part of the suitesparse package. + * It provides the following factorization class: + * - class UmfPackLU: a multifrontal sequential LU factorization. + * + * \code + * #include + * \endcode + * + * In order to use this module, the umfpack headers must be accessible from the include paths, and your binary must be linked to the umfpack library and its dependencies. + * The dependencies depend on how umfpack has been compiled. + * For a cmake based project, you can use our FindUmfPack.cmake module to help you in this task. + * + */ + +#include "src/UmfPackSupport/UmfPackSupport.h" + +#include "src/Core/util/ReenableStupidWarnings.h" + +#endif // EIGEN_UMFPACKSUPPORT_MODULE_H diff --git a/Assets/Obi/Plugins/libOni.bundle/Contents/_CodeSignature.meta b/Assets/Obi/Plugins/libOni.bundle/Contents/_CodeSignature.meta new file mode 100644 index 000000000..7a8ec8e65 --- /dev/null +++ b/Assets/Obi/Plugins/libOni.bundle/Contents/_CodeSignature.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 41100ab29033f4c358fbfed418551bc0 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Plugins/libOni.bundle/Contents/_CodeSignature/CodeResources b/Assets/Obi/Plugins/libOni.bundle/Contents/_CodeSignature/CodeResources new file mode 100644 index 000000000..578027da5 --- /dev/null +++ b/Assets/Obi/Plugins/libOni.bundle/Contents/_CodeSignature/CodeResources @@ -0,0 +1,567 @@ + + + + + files + + Resources/CMakeLists.txt + + cOtLXxofm3lG1qCCrIvrwNXC1XA= + + Resources/Cholesky + + rbUhwzsxHGtY4Odila0J8dDsV7k= + + Resources/CholmodSupport + + JcYHIXmbeMaeHAwwYAmP0vUX5r0= + + Resources/Core + + 1e57zXoa4MfI2FfPzMoxe9qkZFM= + + Resources/Dense + + l6aicKxqX1+TG9mrHj2EXaWnn/I= + + Resources/Eigen + + T4sCLK+7QbphwVpDFbY6bkR8w24= + + Resources/Eigenvalues + + QxGMXYy3HLNE6th4DJ2CZNO5+Gg= + + Resources/Geometry + + 6bH+dsNAF2978gZVJzjyBQemqdw= + + Resources/Householder + + 9lmBF6j1KedsAiS56htztnuZTWw= + + Resources/IterativeLinearSolvers + + 605Q7NK74EEQXA5Z4zmB+EBlFk8= + + Resources/Jacobi + + Me3Qwr2J524HN3kmNL2jw6Oyrco= + + Resources/LU + + B2LyoXHxqVkjJiOGrnjWbagyjjs= + + Resources/MetisSupport + + N0SrA+L+jFsTerjHBpj1FQwUko0= + + Resources/OrderingMethods + + 13PUHtslb3Pl8BZZPML035HSo+s= + + Resources/PaStiXSupport + + f3z7K4pYDhKZF4jZ12qik6ViZNE= + + Resources/PardisoSupport + + u0iXf0ZsM2IbFXXzJgrB/ytE1Cg= + + Resources/QR + + QXKl7/7DIw2i7Apx3qN5GA3GuhY= + + Resources/QtAlignedMalloc + + rpLY5WInNGmI/WRfJUQPjO3wpxA= + + Resources/SPQRSupport + + PhbG0vB6FuoQqcTZcXTmaSvBA5s= + + Resources/SVD + + v/sdbqyMvo2FJojRWaYGrVNQfCY= + + Resources/Sparse + + HRDaPlp1w8nkb6ljJjDbZwK8CDg= + + Resources/SparseCholesky + + ekL4dP8xYzHzS4CgaMScIxwyqLc= + + Resources/SparseCore + + kxsvRhvb2pV54xnktT8W/qGgMSA= + + Resources/SparseLU + + lK/U4MqbwhmtHbKWdoE5YfxrPLI= + + Resources/SparseQR + + wcjlNfy9k2yMG1ItF6ig+6EJme0= + + Resources/StdDeque + + IoY/3GB4PujtiSHyQua86fal3B0= + + Resources/StdList + + MNRej3tS60Pw58N2+MRA59U9mFs= + + Resources/StdVector + + +ZDwOyhJ5VynkBV0pM3nEgn13Ho= + + Resources/SuperLUSupport + + RwjfZ7P3MquMRVRW2ETZptE1GUU= + + Resources/UmfPackSupport + + M8QOb2WmVgN/4pnOv9+urwokZUw= + + + files2 + + Resources/CMakeLists.txt + + hash + + cOtLXxofm3lG1qCCrIvrwNXC1XA= + + hash2 + + 6Z3rtsJEI2ZM9hDVP6sJLuqx7CMHa5Zkdt3+c68SAgI= + + + Resources/Cholesky + + hash + + rbUhwzsxHGtY4Odila0J8dDsV7k= + + hash2 + + ZiWSB5ItbHNVDzQN7dEjKix/S9k64PnC8ekY5ivWPiY= + + + Resources/CholmodSupport + + hash + + JcYHIXmbeMaeHAwwYAmP0vUX5r0= + + hash2 + + JvDRvQZ3eFOU8fTrLN33Y0I/cDwJQbPlg3PpVbATAyc= + + + Resources/Core + + hash + + 1e57zXoa4MfI2FfPzMoxe9qkZFM= + + hash2 + + XZUAlmhc6e7fCZqjpfARdPxo7EHD8MMBHig0y3kz+m0= + + + Resources/Dense + + hash + + l6aicKxqX1+TG9mrHj2EXaWnn/I= + + hash2 + + UyXJ1NaT5QTuASxSda1LELE1pwHL2HwURm0uoh6iLuU= + + + Resources/Eigen + + hash + + T4sCLK+7QbphwVpDFbY6bkR8w24= + + hash2 + + sEc7XXwM2TEdSpBUgWLozxYJBEdocff7dJ6WJOmz39E= + + + Resources/Eigenvalues + + hash + + QxGMXYy3HLNE6th4DJ2CZNO5+Gg= + + hash2 + + FK3msK6JiMFj0GpeJfpW6N3dEF0AdcjQc4vzPWfTN4w= + + + Resources/Geometry + + hash + + 6bH+dsNAF2978gZVJzjyBQemqdw= + + hash2 + + MelWZv7cjgpCH1wOIT0JFuroXKS0J1Eu4SSg1xdnGkk= + + + Resources/Householder + + hash + + 9lmBF6j1KedsAiS56htztnuZTWw= + + hash2 + + +uLEXDVHKaNzk09RBGAkWNuziztuYfWO9bFWt7q6t0k= + + + Resources/IterativeLinearSolvers + + hash + + 605Q7NK74EEQXA5Z4zmB+EBlFk8= + + hash2 + + hP+jisHvO+AFv/UAt4tSnB4WT8UGN4Nv+GSP6hJ7dPc= + + + Resources/Jacobi + + hash + + Me3Qwr2J524HN3kmNL2jw6Oyrco= + + hash2 + + xIpgdOLmWzZI3YZxV0p0zuJT2OK5SGb1QQ8SSlVYkjI= + + + Resources/LU + + hash + + B2LyoXHxqVkjJiOGrnjWbagyjjs= + + hash2 + + i4A6iQsITpNuynj68eNhunZpcYHS66XWgQ9gInPvlZU= + + + Resources/MetisSupport + + hash + + N0SrA+L+jFsTerjHBpj1FQwUko0= + + hash2 + + 5G1R0wZZYkCKQDSA8snK1OfWH7UJweSmlSdHUSdJaaI= + + + Resources/OrderingMethods + + hash + + 13PUHtslb3Pl8BZZPML035HSo+s= + + hash2 + + mimHU/G8AMZZHPPY+vIFOsmwyNNi5xuiE2UEyoy9jZ4= + + + Resources/PaStiXSupport + + hash + + f3z7K4pYDhKZF4jZ12qik6ViZNE= + + hash2 + + EUhTmIWLVP/BlcxR0xVD/GX+p5qM2QHvldpAXOeQ43A= + + + Resources/PardisoSupport + + hash + + u0iXf0ZsM2IbFXXzJgrB/ytE1Cg= + + hash2 + + UOxQA985n6v1GGIOIg9xxxf/OgOnIYuGUKl03DrQaxU= + + + Resources/QR + + hash + + QXKl7/7DIw2i7Apx3qN5GA3GuhY= + + hash2 + + STU0Hi8NgBNq1S6zT5VVYZC2Y93WOOZKqf/P6YrGXAM= + + + Resources/QtAlignedMalloc + + hash + + rpLY5WInNGmI/WRfJUQPjO3wpxA= + + hash2 + + m6XbWPwuNmqDPQpH5ljceOyJBE6gvFddQA131+KVZoM= + + + Resources/SPQRSupport + + hash + + PhbG0vB6FuoQqcTZcXTmaSvBA5s= + + hash2 + + T6LXO5mMB5RoLWPf+//3lb6kGn0YZlhAscNX5m/xyJ0= + + + Resources/SVD + + hash + + v/sdbqyMvo2FJojRWaYGrVNQfCY= + + hash2 + + gK7oqjJo1vSqYB1grNVgYk6Y7UfQtEDMGfNUzoaM3vY= + + + Resources/Sparse + + hash + + HRDaPlp1w8nkb6ljJjDbZwK8CDg= + + hash2 + + +5LkscC4XT6SktBksbFwC/HUiNSQXGSqI7nkD+2nVHg= + + + Resources/SparseCholesky + + hash + + ekL4dP8xYzHzS4CgaMScIxwyqLc= + + hash2 + + f+/W9qpxQFLRpn759ZjUe9+i4h8jfIIMTA430BO0kik= + + + Resources/SparseCore + + hash + + kxsvRhvb2pV54xnktT8W/qGgMSA= + + hash2 + + IyPB4xed/Gq/NIFht4wb9ezQyqj0UscMrKmhzf3Wpq4= + + + Resources/SparseLU + + hash + + lK/U4MqbwhmtHbKWdoE5YfxrPLI= + + hash2 + + z5KW+7PH1oMpAT/cdGTh1pbRrq6cd42eBtNw0Qj62aI= + + + Resources/SparseQR + + hash + + wcjlNfy9k2yMG1ItF6ig+6EJme0= + + hash2 + + l1a62EFnSRtE2ZkGE+ouiJhX7rVP/KUNWQQQhG9cZ9I= + + + Resources/StdDeque + + hash + + IoY/3GB4PujtiSHyQua86fal3B0= + + hash2 + + wYhRZ6RHglq3w1VzQiw++iPexi9bYwrDIv/mWODuUkI= + + + Resources/StdList + + hash + + MNRej3tS60Pw58N2+MRA59U9mFs= + + hash2 + + A1QOKXrpbtA+go2aQzu39aXpOqg8b1CmwnHHj5KD1mc= + + + Resources/StdVector + + hash + + +ZDwOyhJ5VynkBV0pM3nEgn13Ho= + + hash2 + + fosQYHV6EUApj/OQXfcO21mtEIP1BWgd8w3J3Jlj2Ks= + + + Resources/SuperLUSupport + + hash + + RwjfZ7P3MquMRVRW2ETZptE1GUU= + + hash2 + + iqYB8/oea/wDt5lma/OevELUSRel+yqqSJvq/WOQH3I= + + + Resources/UmfPackSupport + + hash + + M8QOb2WmVgN/4pnOv9+urwokZUw= + + hash2 + + AD1B+gjN5oscRphJn6m/nIA867J650hhWFFRn0LcVqw= + + + + rules + + ^Resources/ + + ^Resources/.*\.lproj/ + + optional + + weight + 1000 + + ^Resources/.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Resources/Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ + + nested + + weight + 10 + + ^.* + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^Resources/ + + weight + 20 + + ^Resources/.*\.lproj/ + + optional + + weight + 1000 + + ^Resources/.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Resources/Base\.lproj/ + + weight + 1010 + + ^[^/]+$ + + nested + + weight + 10 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/Assets/Obi/Plugins/x86.meta b/Assets/Obi/Plugins/x86.meta new file mode 100644 index 000000000..80893acc7 --- /dev/null +++ b/Assets/Obi/Plugins/x86.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 80456217692874029bfa8535cab5e715 +folderAsset: yes +timeCreated: 1453064755 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Plugins/x86/libOni.dll b/Assets/Obi/Plugins/x86/libOni.dll new file mode 100644 index 000000000..d719e3473 Binary files /dev/null and b/Assets/Obi/Plugins/x86/libOni.dll differ diff --git a/Assets/Obi/Plugins/x86/libOni.dll.meta b/Assets/Obi/Plugins/x86/libOni.dll.meta new file mode 100644 index 000000000..ec348d700 --- /dev/null +++ b/Assets/Obi/Plugins/x86/libOni.dll.meta @@ -0,0 +1,107 @@ +fileFormatVersion: 2 +guid: eb02e369b26e142719b77dde09868e40 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + : Linux + second: + enabled: 1 + settings: + CPU: x86 + - first: + : LinuxUniversal + second: + enabled: 0 + settings: + CPU: x86 + - first: + : OSXIntel + second: + enabled: 1 + settings: + CPU: AnyCPU + - first: + : OSXIntel64 + second: + enabled: 0 + settings: + CPU: None + - first: + Android: Android + second: + enabled: 0 + settings: + CPU: ARMv7 + - first: + Any: + second: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 0 + Exclude Linux: 0 + Exclude Linux64: 1 + Exclude LinuxUniversal: 1 + Exclude OSXIntel: 0 + Exclude OSXIntel64: 1 + Exclude OSXUniversal: 1 + Exclude WebGL: 0 + Exclude Win: 0 + Exclude Win64: 1 + Exclude iOS: 1 + - first: + Editor: Editor + second: + enabled: 1 + settings: + CPU: x86 + DefaultValueInitialized: true + OS: Windows + - first: + Standalone: Linux64 + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: OSXUniversal + second: + enabled: 0 + settings: + CPU: x86 + - first: + Standalone: Win + second: + enabled: 1 + settings: + CPU: AnyCPU + - first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: None + - first: + WebGL: WebGL + second: + enabled: 1 + settings: {} + - first: + iPhone: iOS + second: + enabled: 0 + settings: + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Plugins/x86/libOni.so b/Assets/Obi/Plugins/x86/libOni.so new file mode 100644 index 000000000..13ec9d910 Binary files /dev/null and b/Assets/Obi/Plugins/x86/libOni.so differ diff --git a/Assets/Obi/Plugins/x86/libOni.so.meta b/Assets/Obi/Plugins/x86/libOni.so.meta new file mode 100644 index 000000000..e3d3c5195 --- /dev/null +++ b/Assets/Obi/Plugins/x86/libOni.so.meta @@ -0,0 +1,138 @@ +fileFormatVersion: 2 +guid: 88448b11249634f08b945b0d34e3844e +timeCreated: 1528194247 +licenseType: Store +PluginImporter: + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + data: + first: + '': Any + second: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 0 + Exclude Linux: 0 + Exclude Linux64: 1 + Exclude LinuxUniversal: 0 + Exclude OSXIntel: 1 + Exclude OSXIntel64: 1 + Exclude OSXUniversal: 1 + Exclude Win: 0 + Exclude Win64: 0 + Exclude iOS: 1 + data: + first: + '': Editor + second: + enabled: 0 + settings: + CPU: x86 + OS: Linux + data: + first: + Android: Android + second: + enabled: 0 + settings: + CPU: ARMv7 + data: + first: + Any: + second: + enabled: 0 + settings: {} + data: + first: + Editor: Editor + second: + enabled: 1 + settings: + CPU: x86 + DefaultValueInitialized: true + data: + first: + Facebook: Win + second: + enabled: 1 + settings: + CPU: AnyCPU + data: + first: + Facebook: Win64 + second: + enabled: 0 + settings: + CPU: None + data: + first: + Standalone: Linux + second: + enabled: 1 + settings: + CPU: x86 + data: + first: + Standalone: Linux64 + second: + enabled: 0 + settings: + CPU: None + data: + first: + Standalone: LinuxUniversal + second: + enabled: 1 + settings: + CPU: x86 + data: + first: + Standalone: OSXIntel + second: + enabled: 0 + settings: + CPU: None + data: + first: + Standalone: OSXIntel64 + second: + enabled: 0 + settings: + CPU: None + data: + first: + Standalone: OSXUniversal + second: + enabled: 0 + settings: + CPU: None + data: + first: + Standalone: Win + second: + enabled: 1 + settings: + CPU: AnyCPU + data: + first: + Standalone: Win64 + second: + enabled: 1 + settings: + CPU: None + data: + first: + iPhone: iOS + second: + enabled: 0 + settings: + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Plugins/x86_64.meta b/Assets/Obi/Plugins/x86_64.meta new file mode 100644 index 000000000..7891529ea --- /dev/null +++ b/Assets/Obi/Plugins/x86_64.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 6f417b5d0f496433da26e1498dc0f91f +folderAsset: yes +timeCreated: 1453064763 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Plugins/x86_64/libOni.dll b/Assets/Obi/Plugins/x86_64/libOni.dll new file mode 100644 index 000000000..3e7fb7754 Binary files /dev/null and b/Assets/Obi/Plugins/x86_64/libOni.dll differ diff --git a/Assets/Obi/Plugins/x86_64/libOni.dll.meta b/Assets/Obi/Plugins/x86_64/libOni.dll.meta new file mode 100644 index 000000000..9652706b1 --- /dev/null +++ b/Assets/Obi/Plugins/x86_64/libOni.dll.meta @@ -0,0 +1,124 @@ +fileFormatVersion: 2 +guid: e2c2ebd4a8d9a4f9c962e342f097d0f2 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + '': Linux + second: + enabled: 0 + settings: + CPU: None + - first: + '': LinuxUniversal + second: + enabled: 0 + settings: + CPU: x86_64 + - first: + '': OSXIntel + second: + enabled: 0 + settings: + CPU: None + - first: + '': OSXIntel64 + second: + enabled: 1 + settings: + CPU: AnyCPU + - first: + Android: Android + second: + enabled: 0 + settings: + CPU: ARMv7 + - first: + Any: + second: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 0 + Exclude Linux: 1 + Exclude Linux64: 0 + Exclude LinuxUniversal: 1 + Exclude OSXIntel: 1 + Exclude OSXIntel64: 0 + Exclude OSXUniversal: 1 + Exclude WebGL: 1 + Exclude Win: 1 + Exclude Win64: 0 + Exclude iOS: 1 + - first: + Editor: Editor + second: + enabled: 1 + settings: + CPU: x86_64 + DefaultValueInitialized: true + OS: Windows + - first: + Facebook: WebGL + second: + enabled: 0 + settings: {} + - first: + Facebook: Win + second: + enabled: 0 + settings: + CPU: None + - first: + Facebook: Win64 + second: + enabled: 1 + settings: + CPU: AnyCPU + - first: + Standalone: Linux64 + second: + enabled: 1 + settings: + CPU: AnyCPU + - first: + Standalone: OSXUniversal + second: + enabled: 0 + settings: + CPU: x86_64 + - first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: Win64 + second: + enabled: 1 + settings: + CPU: AnyCPU + - first: + WebGL: WebGL + second: + enabled: 0 + settings: {} + - first: + iPhone: iOS + second: + enabled: 0 + settings: + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Plugins/x86_64/libOni.so b/Assets/Obi/Plugins/x86_64/libOni.so new file mode 100644 index 000000000..43b547979 Binary files /dev/null and b/Assets/Obi/Plugins/x86_64/libOni.so differ diff --git a/Assets/Obi/Plugins/x86_64/libOni.so.meta b/Assets/Obi/Plugins/x86_64/libOni.so.meta new file mode 100644 index 000000000..b537bd73e --- /dev/null +++ b/Assets/Obi/Plugins/x86_64/libOni.so.meta @@ -0,0 +1,124 @@ +fileFormatVersion: 2 +guid: bd7704a5aa9874f209b6e16cd06c6c63 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + '': Any + second: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 0 + Exclude Linux: 1 + Exclude Linux64: 0 + Exclude LinuxUniversal: 0 + Exclude OSXIntel: 1 + Exclude OSXIntel64: 1 + Exclude OSXUniversal: 1 + Exclude Win: 0 + Exclude Win64: 0 + Exclude iOS: 1 + - first: + '': Editor + second: + enabled: 0 + settings: + CPU: x86_64 + OS: Linux + - first: + Android: Android + second: + enabled: 0 + settings: + CPU: ARMv7 + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 1 + settings: + CPU: x86_64 + DefaultValueInitialized: true + - first: + Facebook: Win + second: + enabled: 0 + settings: + CPU: None + - first: + Facebook: Win64 + second: + enabled: 1 + settings: + CPU: AnyCPU + - first: + Standalone: Linux + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: Linux64 + second: + enabled: 1 + settings: + CPU: AnyCPU + - first: + Standalone: LinuxUniversal + second: + enabled: 1 + settings: + CPU: x86_64 + - first: + Standalone: OSXIntel + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: OSXIntel64 + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: OSXUniversal + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: Win + second: + enabled: 1 + settings: + CPU: None + - first: + Standalone: Win64 + second: + enabled: 1 + settings: + CPU: AnyCPU + - first: + iPhone: iOS + second: + enabled: 0 + settings: + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/QuickstartGuide_rope.pdf b/Assets/Obi/QuickstartGuide_rope.pdf index d2071e966..f20127ec4 100644 Binary files a/Assets/Obi/QuickstartGuide_rope.pdf and b/Assets/Obi/QuickstartGuide_rope.pdf differ diff --git a/Assets/Obi/Resources/Compute/AerodynamicConstraints.compute b/Assets/Obi/Resources/Compute/AerodynamicConstraints.compute deleted file mode 100644 index d51c3c4b9..000000000 --- a/Assets/Obi/Resources/Compute/AerodynamicConstraints.compute +++ /dev/null @@ -1,61 +0,0 @@ -#pragma kernel Project - -#include "MathUtils.cginc" -#include "AtomicDeltas.cginc" - -StructuredBuffer particleIndices; -StructuredBuffer aerodynamicCoeffs; - -StructuredBuffer positions; -StructuredBuffer normals; -StructuredBuffer wind; -StructuredBuffer invMasses; - -RWStructuredBuffer velocities; - -// Variables set from the CPU -uint activeConstraintCount; -float deltaTime; - -[numthreads(128, 1, 1)] -void Project (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= activeConstraintCount) return; - - int p = particleIndices[i]; - - float area = aerodynamicCoeffs[i * 3]; - float dragCoeff = aerodynamicCoeffs[i * 3 + 1]; - float liftCoeff = aerodynamicCoeffs[i * 3 + 2]; - - if (invMasses[p] > 0) - { - float4 relVelocity = velocities[p] - wind[p]; - float rvSqrMag = dot(relVelocity, relVelocity); - - if (rvSqrMag < EPSILON) - return; - - float4 rvNorm = relVelocity / sqrt(rvSqrMag); - - // calculate surface normal (always facing wind) - float4 surfNormal = asfloat(normals[p]) * sign(dot(asfloat(normals[p]), rvNorm)); - - // aerodynamic_factor was originally multiplied by air_density. The density is now premultiplied in lift and drag. - float aerodynamicFactor = 0.5f * rvSqrMag * area; - float attackAngle = dot(surfNormal,rvNorm); - - float3 liftDirection = normalizesafe(cross(cross(surfNormal.xyz, rvNorm.xyz), rvNorm.xyz)); - - //drag: - velocities[p] += (-dragCoeff * rvNorm + - - // lift: - liftCoeff * float4(liftDirection.xyz,0)) * - - // scale - attackAngle * min(aerodynamicFactor * invMasses[p] * deltaTime, 1000); - } -} \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/AtomicDeltas.cginc b/Assets/Obi/Resources/Compute/AtomicDeltas.cginc deleted file mode 100644 index 8f8eaa66d..000000000 --- a/Assets/Obi/Resources/Compute/AtomicDeltas.cginc +++ /dev/null @@ -1,90 +0,0 @@ -#ifndef ATOMICDELTAS_INCLUDE -#define ATOMICDELTAS_INCLUDE - -#include "InterlockedUtils.cginc" - -RWStructuredBuffer deltasAsInt; -RWStructuredBuffer positionConstraintCounts; - -RWStructuredBuffer orientationDeltasAsInt; -RWStructuredBuffer orientationConstraintCounts; - -// atomic delta add: -void AtomicAddPositionDelta(in int index, in float4 delta) -{ - InterlockedAddFloat(deltasAsInt, index, 0, delta.x); - InterlockedAddFloat(deltasAsInt, index, 1, delta.y); - InterlockedAddFloat(deltasAsInt, index, 2, delta.z); - InterlockedAdd(positionConstraintCounts[index], 1); -} - -void AtomicAddOrientationDelta(in int index, in quaternion delta) -{ - InterlockedAddFloat(orientationDeltasAsInt, index, 0, delta.x); - InterlockedAddFloat(orientationDeltasAsInt, index, 1, delta.y); - InterlockedAddFloat(orientationDeltasAsInt, index, 2, delta.z); - InterlockedAddFloat(orientationDeltasAsInt, index, 3, delta.w); - InterlockedAdd(orientationConstraintCounts[index], 1); -} - -// non-atomic versions: -void AddPositionDelta(in int index, in float4 delta) -{ - deltasAsInt[index] = asuint(delta + asfloat(deltasAsInt[index])); - positionConstraintCounts[index]++; -} - -void AddOrientationDelta(in int index, in quaternion delta) -{ - orientationDeltasAsInt[index] = asuint(delta + asfloat(orientationDeltasAsInt[index])); - orientationConstraintCounts[index]++; -} - -// applying deltas: -void ApplyPositionDelta(RWStructuredBuffer positions, in int index, in float SOR) -{ - int count = positionConstraintCounts[index]; - if (count > 0) - { - positions[index].xyz += float3(asfloat(deltasAsInt[index].x), - asfloat(deltasAsInt[index].y), - asfloat(deltasAsInt[index].z)) * SOR / count; - - deltasAsInt[index] = uint4(0, 0, 0, 0); - positionConstraintCounts[index] = 0; - } -} - -void ApplyOrientationDelta(RWStructuredBuffer orientations, in int index, in float SOR) -{ - int count = orientationConstraintCounts[index]; - if (count > 0) - { - orientations[index] += quaternion(asfloat(orientationDeltasAsInt[index].x), - asfloat(orientationDeltasAsInt[index].y), - asfloat(orientationDeltasAsInt[index].z), - asfloat(orientationDeltasAsInt[index].w)) * SOR / count; - - orientations[index] = normalize(orientations[index]); - - orientationDeltasAsInt[index] = uint4(0, 0, 0, 0); - orientationConstraintCounts[index] = 0; - } -} - -void ApplyUserDataDelta(RWStructuredBuffer userData, in int index) -{ - int count = orientationConstraintCounts[index]; - if (count > 0) - { - userData[index] += float4(asfloat(orientationDeltasAsInt[index].x), - asfloat(orientationDeltasAsInt[index].y), - asfloat(orientationDeltasAsInt[index].z), - asfloat(orientationDeltasAsInt[index].w)); - - orientationDeltasAsInt[index] = uint4(0, 0, 0, 0); - orientationConstraintCounts[index] = 0; - } -} - -#endif \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/BendConstraints.compute b/Assets/Obi/Resources/Compute/BendConstraints.compute deleted file mode 100644 index 5652e39c2..000000000 --- a/Assets/Obi/Resources/Compute/BendConstraints.compute +++ /dev/null @@ -1,83 +0,0 @@ -#pragma kernel Project -#pragma kernel Apply - -#include "MathUtils.cginc" -#include "AtomicDeltas.cginc" - -StructuredBuffer particleIndices; -StructuredBuffer restBends; -StructuredBuffer stiffnesses; -RWStructuredBuffer lambdas; - -RWStructuredBuffer positions; -StructuredBuffer invMasses; - -// Variables set from the CPU -uint activeConstraintCount; -float deltaTime; -float sorFactor; - -[numthreads(128, 1, 1)] -void Project (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= activeConstraintCount) return; - - int p1 = particleIndices[i * 3]; - int p2 = particleIndices[i * 3 + 1]; - int p3 = particleIndices[i * 3 + 2]; - - float w1 = invMasses[p1]; - float w2 = invMasses[p2]; - float w3 = invMasses[p3]; - - float wsum = w1 + w2 + 2 * w3; - if (wsum > 0) - { - float4 bendVector = positions[p3] - (positions[p1] + positions[p2] + positions[p3]) / 3.0f; - float bend = length(bendVector); - - if (bend > 0) - { - float constraint = 1.0f - (stiffnesses[i].x + restBends[i]) / bend; - - // remove this to force a certain curvature. - if (constraint >= 0) - { - // calculate time adjusted compliance - float compliance = stiffnesses[i].y / (deltaTime * deltaTime); - - // since the third particle moves twice the amount of the other 2, the modulus of its gradient is 2: - float dlambda = (-constraint - compliance * lambdas[i]) / (wsum + compliance + EPSILON); - float4 correction = dlambda * bendVector; - - lambdas[i] += dlambda; - - float4 delta1 = -correction * 2 * w1; - float4 delta2 = -correction * 2 * w2; - float4 delta3 = correction * 4 * w3; - - AddPositionDelta(p1, delta1); - AddPositionDelta(p2, delta2); - AddPositionDelta(p3, delta3); - } - } - } -} - -[numthreads(128, 1, 1)] -void Apply (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= activeConstraintCount) return; - - int p1 = particleIndices[i * 3]; - int p2 = particleIndices[i * 3 + 1]; - int p3 = particleIndices[i * 3 + 2]; - - ApplyPositionDelta(positions, p1, sorFactor); - ApplyPositionDelta(positions, p2, sorFactor); - ApplyPositionDelta(positions, p3, sorFactor); -} \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/BendTwistConstraints.compute b/Assets/Obi/Resources/Compute/BendTwistConstraints.compute deleted file mode 100644 index a35375778..000000000 --- a/Assets/Obi/Resources/Compute/BendTwistConstraints.compute +++ /dev/null @@ -1,78 +0,0 @@ -#pragma kernel Project -#pragma kernel Apply - -#include "MathUtils.cginc" -#include "AtomicDeltas.cginc" - -StructuredBuffer orientationIndices; -StructuredBuffer stiffnesses; -StructuredBuffer plasticity; -RWStructuredBuffer restDarboux; -RWStructuredBuffer lambdas; - -RWStructuredBuffer orientations; -StructuredBuffer invRotationalMasses; - -// Variables set from the CPU -uint activeConstraintCount; -float deltaTime; -float sorFactor; - -[numthreads(128, 1, 1)] -void Project (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= activeConstraintCount) return; - - int q1 = orientationIndices[i * 2]; - int q2 = orientationIndices[i * 2 + 1]; - - float w1 = invRotationalMasses[q1]; - float w2 = invRotationalMasses[q2]; - - // calculate time adjusted compliance - float3 compliances = stiffnesses[i] / (deltaTime * deltaTime); - - // rest and current darboux vectors - quaternion rest = restDarboux[i]; - quaternion omega = qmul(q_conj(orientations[q1]), orientations[q2]); - - quaternion omega_plus; - omega_plus = omega + rest; //delta Omega with - omega_0 - omega -= rest; //delta Omega with + omega_0 - - if (dot(omega,omega) > dot(omega_plus,omega_plus)) - omega = omega_plus; - - // plasticity - if (dot(omega.xyz, omega.xyz) > plasticity[i].x * plasticity[i].x) - { - rest += omega * plasticity[i].y * deltaTime; - restDarboux[i] = rest; - } - - float3 dlambda = (omega.xyz - compliances * lambdas[i]) / (compliances + w1 + w2 + EPSILON); - - //discrete Darboux vector does not have vanishing scalar part - quaternion dlambdaQ = quaternion(dlambda[0], dlambda[1], dlambda[2],0); - - AddOrientationDelta(q1, qmul(orientations[q2], dlambdaQ) * w1); - AddOrientationDelta(q2,-qmul(orientations[q1], dlambdaQ) * w2); - - lambdas[i] += dlambda; -} - -[numthreads(128, 1, 1)] -void Apply (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= activeConstraintCount) return; - - int q1 = orientationIndices[i * 2]; - int q2 = orientationIndices[i * 2 + 1]; - - ApplyOrientationDelta(orientations, q1, sorFactor); - ApplyOrientationDelta(orientations, q2, sorFactor); -} \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/BitonicSort.compute b/Assets/Obi/Resources/Compute/BitonicSort.compute deleted file mode 100644 index 1929395f7..000000000 --- a/Assets/Obi/Resources/Compute/BitonicSort.compute +++ /dev/null @@ -1,39 +0,0 @@ -#pragma kernel BitonicSort - -const uint numEntries; -const uint groupWidth; -const uint groupHeight; -const uint stepIndex; - -RWStructuredBuffer Keys; -RWStructuredBuffer Values; - -[numthreads(128,1,1)] -void BitonicSort(uint3 id : SV_DispatchThreadID) -{ - uint i = id.x; - - uint hIndex = i & (groupWidth - 1); - uint indexLeft = hIndex + (groupHeight + 1) * (i / groupWidth); - uint rightStepSize = stepIndex == 0 ? groupHeight - 2 * hIndex : (groupHeight + 1) / 2; - uint indexRight = indexLeft + rightStepSize; - - // Exit if out of bounds (for non-power of 2 input sizes) - if (indexRight >= numEntries) return; - - float keyLeft = Keys[indexLeft]; - float keyRight = Keys[indexRight]; - - float valueLeft = Values[indexLeft]; - float valueRight = Values[indexRight]; - - // Swap entries if value is descending - if (valueLeft > valueRight) - { - Keys[indexLeft] = keyRight; - Keys[indexRight] = keyLeft; - - Values[indexLeft] = valueRight; - Values[indexRight] = valueLeft; - } -} \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/Bounds.cginc b/Assets/Obi/Resources/Compute/Bounds.cginc deleted file mode 100644 index 2549b5187..000000000 --- a/Assets/Obi/Resources/Compute/Bounds.cginc +++ /dev/null @@ -1,127 +0,0 @@ -#ifndef BOUNDS_INCLUDE -#define BOUNDS_INCLUDE - -#include "Transform.cginc" -#include "Matrix.cginc" - -struct aabb -{ - float4 min_; - float4 max_; - - void FromTriangle(float4 v1, float4 v2, float4 v3, float4 margin) - { - min_ = min(min(v1, v2), v3) - margin; - max_ = max(max(v1, v2), v3) + margin; - } - - void FromEdge(float4 v1, float4 v2, float4 radius) - { - min_ = min(v2 - radius, v1 - radius); - max_ = max(v2 + radius, v1 + radius); - } - - void FromParticle(float4 v1, float radius) - { - min_ = v1 - radius; - max_ = v1 + radius; - } - - bool IntersectsAabb(in aabb b, bool in2D = false) - { - if (in2D) - { - return (min_[0] <= b.max_[0] && max_[0] >= b.min_[0]) && - (min_[1] <= b.max_[1] && max_[1] >= b.min_[1]); - } - else - { - return (min_[0] <= b.max_[0] && max_[0] >= b.min_[0]) && - (min_[1] <= b.max_[1] && max_[1] >= b.min_[1]) && - (min_[2] <= b.max_[2] && max_[2] >= b.min_[2]); - } - } - - float AverageAxisLength() - { - float4 d = max_ - min_; - return (d.x + d.y + d.z) * 0.33f; - } - - float MaxAxisLength() - { - float4 d = max_ - min_; - return max(max(d.x,d.y),d.z); - } - - void EncapsulateParticle(in float4 position, float radius) - { - min_ = min(min(min_, position - radius), position - radius); - max_ = max(max(max_, position + radius), position + radius); - } - - void EncapsulateParticle(in float4 previousPosition, in float4 position, float radius) - { - min_ = min(min(min_, position - radius), previousPosition - radius); - max_ = max(max(max_, position + radius), previousPosition + radius); - } - - void EncapsulateBounds(in aabb bounds) - { - min_ = min(min_,bounds.min_); - max_ = max(max_,bounds.max_); - } - - void Expand(float4 amount) - { - min_ -= amount; - max_ += amount; - } - - void Sweep(float4 velocity) - { - min_ = min(min_, min_ + velocity); - max_ = max(max_, max_ + velocity); - } - - float4 Center() - { - return (min_ + (max_ - min_) * 0.5f); - } - - void Transform(in float4x4 transform) - { - float3 xa = transform._m00_m10_m20 * min_.x; - float3 xb = transform._m00_m10_m20 * max_.x; - - float3 ya = transform._m01_m11_m21 * min_.y; - float3 yb = transform._m01_m11_m21 * max_.y; - - float3 za = transform._m02_m12_m22 * min_.z; - float3 zb = transform._m02_m12_m22 * max_.z; - - min_ = float4(min(xa, xb) + min(ya, yb) + min(za, zb) + transform._m03_m13_m23, 0); - max_ = float4(max(xa, xb) + max(ya, yb) + max(za, zb) + transform._m03_m13_m23, 0); - } - - void Transform(in transform transform) - { - Transform(TRS(transform.translation.xyz, transform.rotation, transform.scale.xyz)); - } - - aabb Transformed(in float4x4 trfm) - { - aabb cpy = this; - cpy.Transform(trfm); - return cpy; - } - - aabb Transformed(in transform trfm) - { - aabb cpy = this; - cpy.Transform(trfm); - return cpy; - } -}; - -#endif \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/BoundsReduction.compute b/Assets/Obi/Resources/Compute/BoundsReduction.compute deleted file mode 100644 index 7e11f4537..000000000 --- a/Assets/Obi/Resources/Compute/BoundsReduction.compute +++ /dev/null @@ -1,94 +0,0 @@ -#pragma kernel RuntimeSimplexBounds SIMPLEX_BOUNDS=RuntimeSimplexBounds USE_COLLISION_MAT -#pragma kernel EditSimplexBounds SIMPLEX_BOUNDS=EditSimplexBounds -#pragma kernel Reduce - -#include "Simplex.cginc" -#include "Bounds.cginc" -#include "CollisionMaterial.cginc" -#include "MathUtils.cginc" -#include "Integration.cginc" -#include "SolverParameters.cginc" - -StructuredBuffer simplices; -StructuredBuffer positions; -StructuredBuffer velocities; -StructuredBuffer principalRadii; -StructuredBuffer fluidMaterials; - -RWStructuredBuffer simplexBounds; -RWStructuredBuffer reducedBounds; - -float deltaTime; - -groupshared aabb sdata[128]; - -[numthreads(256, 1, 1)] -void SIMPLEX_BOUNDS (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - if (i >= pointCount + edgeCount + triangleCount) - { - reducedBounds[i].min_ = float4(FLT_MAX,FLT_MAX,FLT_MAX,0); - reducedBounds[i].max_ = -float4(FLT_MAX,FLT_MAX,FLT_MAX,0); - return; - } - - int simplexSize; - int simplexStart = GetSimplexStartAndSize(i, simplexSize); - - aabb sxBounds, soBounds; - sxBounds.min_ = soBounds.min_ = float4(FLT_MAX,FLT_MAX,FLT_MAX,0); - sxBounds.max_ = soBounds.max_ = float4(-FLT_MAX,-FLT_MAX,-FLT_MAX,0); - - for (int j = 0; j < simplexSize; ++j) - { - int p = simplices[simplexStart + j]; - - #if USE_COLLISION_MAT - int m = collisionMaterialIndices[p]; - float solidRadius = principalRadii[p].x + (m >= 0 ? collisionMaterials[m].stickDistance : 0); - #else - float solidRadius = principalRadii[p].x; - #endif - - // Expand simplex bounds, using both the particle's original position and its velocity. - // Add collision margin for both fluid neighborhood too (prevents explosions at high pressures due to neighborhood deficiency) - sxBounds.EncapsulateParticle(positions[p], - IntegrateLinear(positions[p], velocities[p], deltaTime * particleCCD), - max(solidRadius, fluidMaterials[p].x * 0.5f) + collisionMargin); - - soBounds.EncapsulateParticle(positions[p], - IntegrateLinear(positions[p], velocities[p], deltaTime), - solidRadius); - - } - - simplexBounds[i] = sxBounds; - reducedBounds[i] = soBounds; -} - -[numthreads( 256, 1, 1)] -void Reduce( uint3 threadIdx : SV_GroupThreadID, uint3 groupIdx : SV_GroupID) -{ - // each thread loads two elements from global to shared mem and combines them: - unsigned int tid = threadIdx.x; - unsigned int i = groupIdx.x * 256 + tid; - sdata[tid] = reducedBounds[i]; - sdata[tid].EncapsulateBounds(reducedBounds[i + 128]); - - GroupMemoryBarrierWithGroupSync(); - - // do reduction in shared mem - for (unsigned int s = 64; s > 0; s >>= 1) - { - if (tid < s) - { - sdata[tid].EncapsulateBounds(sdata[tid + s]); - } - GroupMemoryBarrierWithGroupSync(); - } - - // write result for this group to global mem - if (tid == 0) - reducedBounds[groupIdx.x] = sdata[0]; -} \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/BoundsReduction.compute.meta b/Assets/Obi/Resources/Compute/BoundsReduction.compute.meta deleted file mode 100644 index 5959ca43b..000000000 --- a/Assets/Obi/Resources/Compute/BoundsReduction.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 4eaa80a9c435f42fa9837a3594766a1f -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 65536 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/BoxShape.compute b/Assets/Obi/Resources/Compute/BoxShape.compute deleted file mode 100644 index 58f34504c..000000000 --- a/Assets/Obi/Resources/Compute/BoxShape.compute +++ /dev/null @@ -1,73 +0,0 @@ -#include "ColliderDefinitions.cginc" -#include "ContactHandling.cginc" -#include "DistanceFunctions.cginc" -#include "Simplex.cginc" -#include "Bounds.cginc" -#include "SolverParameters.cginc" -#include "Optimization.cginc" - -#pragma kernel GenerateContacts - -StructuredBuffer positions; -StructuredBuffer orientations; -StructuredBuffer principalRadii; -StructuredBuffer velocities; - -StructuredBuffer simplices; - -StructuredBuffer transforms; -StructuredBuffer shapes; - -StructuredBuffer contactPairs; -StructuredBuffer contactOffsetsPerType; - -RWStructuredBuffer contacts; -RWStructuredBuffer dispatchBuffer; - -StructuredBuffer worldToSolver; - -uint maxContacts; - - -[numthreads(128, 1, 1)] -void GenerateContacts (uint3 id : SV_DispatchThreadID) -{ - uint i = id.x; - - // entry #11 in the dispatch buffer is the amount of pairs for the first shape type. - if (i >= dispatchBuffer[11 + 4*BOX_SHAPE]) return; - - uint count = contacts.IncrementCounter(); - if (count < maxContacts) - { - int firstPair = contactOffsetsPerType[BOX_SHAPE]; - int simplexIndex = contactPairs[firstPair + i].x; - int colliderIndex = contactPairs[firstPair + i].y; - - contact c = (contact)0; - - Box boxShape; - boxShape.colliderToSolver = worldToSolver[0].Multiply(transforms[colliderIndex]); - boxShape.s = shapes[colliderIndex]; - - int simplexSize; - int simplexStart = GetSimplexStartAndSize(simplexIndex, simplexSize); - - float4 simplexBary = BarycenterForSimplexOfSize(simplexSize); - float4 simplexPoint; - - SurfacePoint surfacePoint = Optimize(boxShape, positions, orientations, principalRadii, - simplices, simplexStart, simplexSize, simplexBary, simplexPoint, surfaceCollisionIterations, surfaceCollisionTolerance); - - c.pointB = surfacePoint.pos; - c.normal = surfacePoint.normal * boxShape.s.isInverted(); - c.pointA = simplexBary; - c.bodyA = simplexIndex; - c.bodyB = colliderIndex; - - contacts[count] = c; - - InterlockedMax(dispatchBuffer[0],(count + 1) / 128 + 1); - InterlockedMax(dispatchBuffer[3], count + 1); - } -} \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/BoxShape.compute.meta b/Assets/Obi/Resources/Compute/BoxShape.compute.meta deleted file mode 100644 index 6928e9b19..000000000 --- a/Assets/Obi/Resources/Compute/BoxShape.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 9df6755bffe0b4dc5a30f4715e8a503c -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 65536 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/BoxShapeQuery.compute b/Assets/Obi/Resources/Compute/BoxShapeQuery.compute deleted file mode 100644 index 034373c31..000000000 --- a/Assets/Obi/Resources/Compute/BoxShapeQuery.compute +++ /dev/null @@ -1,136 +0,0 @@ -#include "ColliderDefinitions.cginc" -#include "QueryDefinitions.cginc" -#include "ContactHandling.cginc" -#include "Transform.cginc" -#include "Simplex.cginc" -#include "Bounds.cginc" -#include "SolverParameters.cginc" -#include "Optimization.cginc" - -#pragma kernel GenerateResults - -StructuredBuffer positions; -StructuredBuffer orientations; -StructuredBuffer principalRadii; -StructuredBuffer simplices; - -StructuredBuffer transforms; -StructuredBuffer shapes; - -StructuredBuffer contactPairs; -StructuredBuffer contactOffsetsPerType; - -RWStructuredBuffer results; -RWStructuredBuffer dispatchBuffer; - -StructuredBuffer worldToSolver; - -uint maxContacts; - -struct Box : IDistanceFunction -{ - queryShape s; - transform colliderToSolver; - - void Evaluate(in float4 pos, in float4 radii, in quaternion orientation, inout SurfacePoint projectedPoint) - { - float4 center = s.center * colliderToSolver.scale; - float4 size = s.size * colliderToSolver.scale * 0.5f; - - // clamp the point to the surface of the box: - float4 pnt = colliderToSolver.InverseTransformPointUnscaled(pos) - center; - - // get minimum distance for each axis: - float4 distances = size - abs(pnt); - - if (distances.x >= 0 && distances.y >= 0 && distances.z >= 0) - { - projectedPoint.normal = float4(0,0,0,0); - projectedPoint.pos = pnt; - - // find minimum distance in all three axes and the axis index: - if (distances.y < distances.x && distances.y < distances.z) - { - projectedPoint.normal[1] = sign(pnt[1]); - projectedPoint.pos[1] = size[1] * projectedPoint.normal[1]; - } - else if (distances.z < distances.x && distances.z < distances.y) - { - projectedPoint.normal[2] = sign(pnt[2]); - projectedPoint.pos[2] = size[2] * projectedPoint.normal[2]; - } - else - { - projectedPoint.normal[0] = sign(pnt[0]); - projectedPoint.pos[0] = size[0] * projectedPoint.normal[0]; - } - } - else - { - projectedPoint.pos = clamp(pnt, -size, size); - projectedPoint.normal = normalizesafe(pnt - projectedPoint.pos); - } - - projectedPoint.pos = colliderToSolver.TransformPointUnscaled(projectedPoint.pos + center + projectedPoint.normal * s.contactOffset); - projectedPoint.normal = colliderToSolver.TransformDirection(projectedPoint.normal); - projectedPoint.bary = float4(1,0,0,0); - } -}; - -[numthreads(128, 1, 1)] -void GenerateResults (uint3 id : SV_DispatchThreadID) -{ - uint i = id.x; - - // entry #11 in the dispatch buffer is the amount of pairs for the first shape type. - if (i >= dispatchBuffer[11 + 4*BOX_QUERY]) return; - - int firstPair = contactOffsetsPerType[BOX_QUERY]; - int simplexIndex = contactPairs[firstPair + i].x; - int queryIndex = contactPairs[firstPair + i].y; - - queryResult c = (queryResult)0; - - Box boxShape; - boxShape.colliderToSolver = worldToSolver[0].Multiply(transforms[queryIndex]); - boxShape.s = shapes[queryIndex]; - - int simplexSize; - int simplexStart = GetSimplexStartAndSize(simplexIndex, simplexSize); - - float4 simplexBary = BarycenterForSimplexOfSize(simplexSize); - float4 simplexPoint; - - SurfacePoint surfacePoint = Optimize(boxShape, positions, orientations, principalRadii, - simplices, simplexStart, simplexSize, simplexBary, simplexPoint, surfaceCollisionIterations, surfaceCollisionTolerance); - - - float4 simplexPrevPosition = FLOAT4_ZERO; - float simplexRadius = 0; - for (int j = 0; j < simplexSize; ++j) - { - int particleIndex = simplices[simplexStart + j]; - simplexPrevPosition += positions[particleIndex] * simplexBary[j]; - simplexRadius += EllipsoidRadius(surfacePoint.normal, orientations[particleIndex], principalRadii[particleIndex].xyz) * simplexBary[j]; - } - - c.queryPoint = surfacePoint.pos; - c.normal = surfacePoint.normal; - c.simplexBary = simplexBary; - c.simplexIndex = simplexIndex; - c.queryIndex = queryIndex; - c.dist = dot(simplexPrevPosition - surfacePoint.pos,surfacePoint.normal) - simplexRadius; - - if (c.dist <= boxShape.s.maxDistance) - { - uint count = results.IncrementCounter(); - if (count < maxContacts) - { - results[count] = c; - - InterlockedMax(dispatchBuffer[0],(count + 1) / 128 + 1); - InterlockedMax(dispatchBuffer[3], count + 1); - } - } - -} \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/BoxShapeQuery.compute.meta b/Assets/Obi/Resources/Compute/BoxShapeQuery.compute.meta deleted file mode 100644 index 4b6e8ed46..000000000 --- a/Assets/Obi/Resources/Compute/BoxShapeQuery.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 409c5f7d65dd84df9853de82bd3fbf46 -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 65536 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/CapsuleShape.compute b/Assets/Obi/Resources/Compute/CapsuleShape.compute deleted file mode 100644 index 0afb94a41..000000000 --- a/Assets/Obi/Resources/Compute/CapsuleShape.compute +++ /dev/null @@ -1,72 +0,0 @@ -#include "ColliderDefinitions.cginc" -#include "ContactHandling.cginc" -#include "DistanceFunctions.cginc" -#include "Simplex.cginc" -#include "Bounds.cginc" -#include "SolverParameters.cginc" -#include "Optimization.cginc" - -#pragma kernel GenerateContacts - -StructuredBuffer positions; -StructuredBuffer orientations; -StructuredBuffer principalRadii; -StructuredBuffer velocities; - -StructuredBuffer simplices; - -StructuredBuffer transforms; -StructuredBuffer shapes; - -StructuredBuffer contactPairs; -StructuredBuffer contactOffsetsPerType; - -RWStructuredBuffer contacts; -RWStructuredBuffer dispatchBuffer; - -StructuredBuffer worldToSolver; - -uint maxContacts; - -[numthreads(128, 1, 1)] -void GenerateContacts (uint3 id : SV_DispatchThreadID) -{ - uint i = id.x; - - // entry #11 in the dispatch buffer is the amount of pairs for the first shape type. - if (i >= dispatchBuffer[11 + 4*CAPSULE_SHAPE]) return; - - uint count = contacts.IncrementCounter(); - if (count < maxContacts) - { - int firstPair = contactOffsetsPerType[CAPSULE_SHAPE]; - int simplexIndex = contactPairs[firstPair + i].x; - int colliderIndex = contactPairs[firstPair + i].y; - - contact c = (contact)0; - - Capsule capsuleShape; - capsuleShape.colliderToSolver = worldToSolver[0].Multiply(transforms[colliderIndex]); - capsuleShape.s = shapes[colliderIndex]; - - int simplexSize; - int simplexStart = GetSimplexStartAndSize(simplexIndex, simplexSize); - - float4 simplexBary = BarycenterForSimplexOfSize(simplexSize); - float4 simplexPoint; - - SurfacePoint surfacePoint = Optimize(capsuleShape, positions, orientations, principalRadii, - simplices, simplexStart, simplexSize, simplexBary, simplexPoint, surfaceCollisionIterations, surfaceCollisionTolerance); - - c.pointB = surfacePoint.pos; - c.normal = surfacePoint.normal * capsuleShape.s.isInverted(); - c.pointA = simplexBary; - c.bodyA = simplexIndex; - c.bodyB = colliderIndex; - - contacts[count] = c; - - InterlockedMax(dispatchBuffer[0],(count + 1) / 128 + 1); - InterlockedMax(dispatchBuffer[3], count + 1); - } -} \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/CapsuleShape.compute.meta b/Assets/Obi/Resources/Compute/CapsuleShape.compute.meta deleted file mode 100644 index 0295bcb28..000000000 --- a/Assets/Obi/Resources/Compute/CapsuleShape.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: bd92ed8a5b1bc404c9b114747495f080 -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 65536 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/ChainConstraints.compute b/Assets/Obi/Resources/Compute/ChainConstraints.compute deleted file mode 100644 index 62c8c1a44..000000000 --- a/Assets/Obi/Resources/Compute/ChainConstraints.compute +++ /dev/null @@ -1,159 +0,0 @@ -#pragma kernel Project -#pragma kernel Apply - -#include "MathUtils.cginc" -#include "AtomicDeltas.cginc" - -StructuredBuffer particleIndices; -StructuredBuffer firstIndex; -StructuredBuffer numIndices; -StructuredBuffer restLengths; - -RWStructuredBuffer ni; // (ni:constraint gradient, di:desired lenght) -RWStructuredBuffer diagonals; // (subdiagonals), bi (diagonals) and ci (superdiagonals): - -RWStructuredBuffer positions; -StructuredBuffer invMasses; - -// Variables set from the CPU -uint activeConstraintCount; -float deltaTime; -float sorFactor; - -[numthreads(128, 1, 1)] -void Project (uint3 id : SV_DispatchThreadID) -{ - unsigned int c = id.x; - - if (c >= activeConstraintCount) return; - - int numEdges = numIndices[c] - 1; - int first = firstIndex[c]; - float minLength = restLengths[c].x; - float maxLength = restLengths[c].y; - - int i; - for (i = 0; i < numEdges; ++i) - { - int edge = first + i; - - float4 p1 = positions[particleIndices[edge]]; - float4 p2 = positions[particleIndices[edge+1]]; - float4 diff = p1 - p2; - - float dist = length(diff); - ni[edge] = float4(diff/(dist + EPSILON)); - } - - // calculate ai, bi and ci - for (i = 0; i < numEdges; ++i) - { - int edge = first + i; - - float w_i_ = invMasses[particleIndices[edge]]; - float w__i = invMasses[particleIndices[edge+1]]; - - float4 ni__ = FLOAT4_ZERO; - if (i > 0) ni__ = ni[edge - 1]; - - float4 n__i = FLOAT4_ZERO; - if (i < numEdges - 1) n__i = ni[edge + 1]; - - diagonals[edge] = float3(-w_i_ * dot(ni[edge], ni__), // ai - w_i_ + w__i, // bi - -w__i * dot(ni[edge], n__i));// ci - } - - // solve step #1, forward sweep: - // reuse diagonals.xy to store sweep results ci_ and di_: - for (i = 0; i < numEdges; ++i) - { - int edge = first + i; - float4 p1 = positions[particleIndices[edge]]; - float4 p2 = positions[particleIndices[edge + 1]]; - - float cip_ = 0; - float dip_ = 0; - - if (i > 0) - { - cip_ = diagonals[edge - 1].x; - dip_ = diagonals[edge - 1].y; - } - - float3 d = diagonals[edge]; - float den = d.y - cip_ * d.x; - - if (abs(den) > EPSILON) - { - float dist = distance(p1, p2); - float correction = 0; - - if (dist >= maxLength) - correction = dist - maxLength; - else if (dist <= minLength) - correction = dist - minLength; - - d.xy = float2(d.z / den, (correction - dip_ * d.x) / den); - - } - else - d.xy = float2(0,0); - - diagonals[edge] = d; - } - - // solve step #2, backward sweep. reuse diagonals.z to store solution xi: - for (i = numEdges - 1; i >= 0; --i) - { - int edge = first + i; - - float xi_ = (i < numEdges - 1) ? diagonals[edge + 1].z : 0; - - float3 d = diagonals[edge]; - d.z = d.y - d.x * xi_; - diagonals[edge] = d; - } - - // calculate deltas: - for (i = 0; i < numIndices[c]; ++i) - { - int index = first + i; - - float4 ni__ = FLOAT4_ZERO; - float xi_ = 0; - - if (i > 0) - { - ni__ = ni[index - 1]; - xi_ = diagonals[index - 1].z; - } - - float4 n_i_ = FLOAT4_ZERO; - float nxi = 0; - - if (i < numIndices[c] - 1) - { - n_i_ = ni[index]; - nxi = diagonals[index].z; - } - - int p = particleIndices[index]; - - AddPositionDelta(p, invMasses[p] * (ni__ * xi_ - n_i_ * nxi)); - } -} - -[numthreads(128, 1, 1)] -void Apply (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= activeConstraintCount) return; - - int first = firstIndex[i]; - int last = first + numIndices[i]; - - for (int k = first; k < last; ++k) - ApplyPositionDelta(positions, particleIndices[k], sorFactor); -} \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/ChainConstraints.compute.meta b/Assets/Obi/Resources/Compute/ChainConstraints.compute.meta deleted file mode 100644 index 561afa199..000000000 --- a/Assets/Obi/Resources/Compute/ChainConstraints.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 2a5f3e8f1330846819f1abe7a6181c51 -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 65536 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/ClothRendering.compute b/Assets/Obi/Resources/Compute/ClothRendering.compute deleted file mode 100644 index 069c59904..000000000 --- a/Assets/Obi/Resources/Compute/ClothRendering.compute +++ /dev/null @@ -1,180 +0,0 @@ -#pragma kernel UpdateSkinConstraints -#pragma kernel UpdateClothMesh - -#include "MathUtils.cginc" - -struct Influence -{ - int index; - float weight; -}; - -struct SkinmapData -{ - int firstInfluence; - int firstInfNumber; - int firstParticleBindPose; - - int firstSkinWeight; - int firstSkinWeightNumber; - int firstBoneBindPose; - - int bindPoseCount; -}; - -struct SkeletonData -{ - int firstBone; - int boneCount; -}; - -struct MeshData -{ - int firstVertex; - int vertexCount; - - int firstTriangle; - int triangleCount; -}; - -StructuredBuffer particleIndices; -StructuredBuffer rendererIndices; // for each vertex/particle, index of its renderer. - -StructuredBuffer renderablePositions; -StructuredBuffer renderableOrientations; -StructuredBuffer colors; - -StructuredBuffer restPositions; -StructuredBuffer restOrientations; - -StructuredBuffer skinConstraintOffsets; - -StructuredBuffer skinmapIndices; // for each renderer, index of its skinmap. -StructuredBuffer meshIndices; // for each renderer, index of its mesh. -StructuredBuffer skeletonIndices; // for each renderer, index of its skeleton. - -StructuredBuffer particleOffsets; // for each renderer, index of its first particle in the batch. -StructuredBuffer vertexOffsets; // for each renderer, index of its first vertex in the batch. - -StructuredBuffer skinData; -StructuredBuffer influences; -StructuredBuffer influenceOffsets; -StructuredBuffer particleBindMatrices; -StructuredBuffer boneBindMatrices; - -StructuredBuffer skeletonData; -StructuredBuffer bonePos; -StructuredBuffer boneRot; -StructuredBuffer boneScl; - -StructuredBuffer meshData; -StructuredBuffer positions; -StructuredBuffer normals; -StructuredBuffer tangents; - -RWStructuredBuffer skinConstraintPoints; -RWStructuredBuffer skinConstraintNormals; -RWByteAddressBuffer vertices; - -// Variables set from the CPU -uint vertexCount; -uint constraintCount; -float4x4 world2Solver; - -[numthreads(128, 1, 1)] -void UpdateSkinConstraints (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= constraintCount) return; - - int rendererIndex = rendererIndices[i]; - - // get skin map and mesh data: - SkinmapData skin = skinData[skinmapIndices[rendererIndex]]; - SkeletonData skel = skeletonData[skeletonIndices[rendererIndex]]; - - // invalid skeleton: - if (skel.boneCount <= 0) - return; - - // get index of this particle in its original actor: - int originalParticleIndex = i - particleOffsets[rendererIndex]; - - // get first influence and amount of influences for this particle: - int influenceStart = influenceOffsets[skin.firstSkinWeightNumber + originalParticleIndex]; - int influenceCount = influenceOffsets[skin.firstSkinWeightNumber + originalParticleIndex + 1] - influenceStart; - - float4 pos = FLOAT4_ZERO; - float4 norm = FLOAT4_ZERO; - - for (int k = influenceStart; k < influenceStart + influenceCount; ++k) - { - Influence inf = influences[skin.firstSkinWeight + k]; - - float4x4 bind = boneBindMatrices[skin.firstBoneBindPose + inf.index]; - - int boneIndex = skel.firstBone + inf.index; - float4x4 deform = TRS(bonePos[boneIndex], boneRot[boneIndex], boneScl[boneIndex]); - float4x4 trfm = mul(world2Solver, mul(deform, bind)); - - pos.xyz += mul(trfm, float4(restPositions[particleIndices[i]].xyz, 1)).xyz * inf.weight; - norm.xyz += mul(trfm, float4(rotate_vector(restOrientations[particleIndices[i]], float3(0, 0, 1)), 0)).xyz * inf.weight; - } - - int constraintIndex = skinConstraintOffsets[rendererIndex] + originalParticleIndex; - skinConstraintPoints[constraintIndex] = pos; - skinConstraintNormals[constraintIndex] = norm; - -} - -[numthreads(128, 1, 1)] -void UpdateClothMesh (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= vertexCount) return; - - int rendererIndex = rendererIndices[i]; - - // get skin map and mesh data: - SkinmapData skin = skinData[skinmapIndices[rendererIndex]]; - MeshData mesh = meshData[meshIndices[rendererIndex]]; - - // get index of this vertex in its original mesh: - int originalVertexIndex = i - vertexOffsets[rendererIndex]; - - // get index of the vertex in the mesh batch: - int batchedVertexIndex = mesh.firstVertex + originalVertexIndex; - - // get first influence and amount of influences for this vertex: - int influenceStart = influenceOffsets[skin.firstInfNumber + originalVertexIndex]; - int influenceCount = influenceOffsets[skin.firstInfNumber + originalVertexIndex + 1] - influenceStart; - - float3 position = float3(0,0,0); - float3 normal = float3(0,0,0); - float4 tangent = FLOAT4_ZERO; - float4 color = FLOAT4_ZERO; - - for (int k = influenceStart; k < influenceStart + influenceCount; ++k) - { - Influence inf = influences[skin.firstInfluence + k]; - - int p = particleIndices[particleOffsets[rendererIndex] + inf.index]; - - float4x4 deform = mul(m_translate(FLOAT4X4_IDENTITY,renderablePositions[p].xyz), q_toMatrix(renderableOrientations[p])); - float4x4 trfm = mul(deform, particleBindMatrices[skin.firstParticleBindPose + inf.index]); - - // update vertex/normal/tangent: - position += mul(trfm, float4(positions[batchedVertexIndex], 1)).xyz * inf.weight; - normal += mul(trfm, float4(normals[batchedVertexIndex], 0)).xyz * inf.weight; - tangent += float4(mul(trfm, float4(tangents[batchedVertexIndex].xyz, 0)).xyz, tangents[batchedVertexIndex].w) * inf.weight; - color += colors[p] * inf.weight; - } - - int base = i * 14; - vertices.Store3( base<<2, asuint(position)); - vertices.Store3((base + 3)<<2, asuint(normal)); - vertices.Store4((base + 6)<<2, asuint(tangent)); - vertices.Store4((base + 10)<<2, asuint(color)); -} \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/ClothRendering.compute.meta b/Assets/Obi/Resources/Compute/ClothRendering.compute.meta deleted file mode 100644 index 5b2b24c93..000000000 --- a/Assets/Obi/Resources/Compute/ClothRendering.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7620e03e082f448828570f6659b73301 -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 65536 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/ColliderCollisionConstraints.compute b/Assets/Obi/Resources/Compute/ColliderCollisionConstraints.compute deleted file mode 100644 index 9fd3f0c58..000000000 --- a/Assets/Obi/Resources/Compute/ColliderCollisionConstraints.compute +++ /dev/null @@ -1,219 +0,0 @@ -#include "ContactHandling.cginc" -#include "ColliderDefinitions.cginc" -#include "Rigidbody.cginc" -#include "Simplex.cginc" -#include "CollisionMaterial.cginc" -#include "AtomicDeltas.cginc" - -#pragma kernel Clear -#pragma kernel Initialize -#pragma kernel Project -#pragma kernel Apply - -StructuredBuffer particleIndices; - -StructuredBuffer simplices; -StructuredBuffer invMasses; -StructuredBuffer invRotationalMasses; -StructuredBuffer prevPositions; -StructuredBuffer prevOrientations; -StructuredBuffer principalRadii; -StructuredBuffer velocities; - -StructuredBuffer transforms; -StructuredBuffer shapes; -RWStructuredBuffer RW_rigidbodies; - -RWStructuredBuffer positions; -RWStructuredBuffer orientations; -RWStructuredBuffer deltas; - -RWStructuredBuffer contacts; -RWStructuredBuffer effectiveMasses; -StructuredBuffer dispatchBuffer; - -StructuredBuffer inertialSolverFrame; - -// Variables set from the CPU -uint particleCount; -float maxDepenetration; -float substepTime; -float stepTime; -int steps; -float timeLeft; -float sorFactor; - -[numthreads(128, 1, 1)] -void Clear (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= dispatchBuffer[3]) return; - - int rigidbodyIndex = shapes[contacts[i].bodyB].rigidbodyIndex; - if (rigidbodyIndex >= 0) - { - int orig; - InterlockedExchange(RW_rigidbodies[rigidbodyIndex].constraintCount, 0, orig); - } -} - -[numthreads(128, 1, 1)] -void Initialize (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= dispatchBuffer[3]) return; - - int simplexSizeA; - int simplexStartA = GetSimplexStartAndSize(contacts[i].bodyA, simplexSizeA); - - // get the material from the first particle in the simplex: - int aMaterialIndex = collisionMaterialIndices[simplices[simplexStartA]]; - bool rollingContacts = aMaterialIndex >= 0 ? collisionMaterials[aMaterialIndex].rollingContacts > 0 : false; - - float4 relativeVelocity = FLOAT4_ZERO; - float4 simplexPrevPosition = FLOAT4_ZERO; - quaternion simplexPrevOrientation = quaternion(0, 0, 0, 0); - float simplexRadius = 0; - float simplexInvMass = 0; - float simplexInvRotationalMass = 0; - - for (int j = 0; j < simplexSizeA; ++j) - { - int particleIndex = simplices[simplexStartA + j]; - relativeVelocity += velocities[particleIndex] * contacts[i].pointA[j]; - simplexPrevPosition += prevPositions[particleIndex] * contacts[i].pointA[j]; - simplexPrevOrientation += prevOrientations[particleIndex] * contacts[i].pointA[j]; - simplexInvMass += invMasses[particleIndex] * contacts[i].pointA[j]; - simplexInvRotationalMass += invRotationalMasses[particleIndex] * contacts[i].pointA[j]; - simplexRadius += EllipsoidRadius(contacts[i].normal, prevOrientations[particleIndex], principalRadii[particleIndex].xyz) * contacts[i].pointA[j]; - } - - // if there's a rigidbody present, subtract its velocity from the relative velocity: - int rigidbodyIndex = shapes[contacts[i].bodyB].rigidbodyIndex; - if (rigidbodyIndex >= 0) - { - // Note: unlike rA, that is expressed in solver space, rB is expressed in world space. - relativeVelocity -= GetRigidbodyVelocityAtPoint(RW_rigidbodies[rigidbodyIndex], contacts[i].pointB, - asfloat(linearDeltasAsInt[rigidbodyIndex]), - asfloat(angularDeltasAsInt[rigidbodyIndex]), inertialSolverFrame[0]); - - int bMaterialIndex = shapes[contacts[i].bodyB].materialIndex; - rollingContacts = rollingContacts | (bMaterialIndex >= 0 ? collisionMaterials[bMaterialIndex].rollingContacts > 0 : false); - } - - // update contact distance - contacts[i].dist = dot(simplexPrevPosition - contacts[i].pointB, contacts[i].normal) - simplexRadius; - - // calculate contact point in A's surface: - float4 contactPoint = contacts[i].pointB + contacts[i].normal * contacts[i].dist; - - // update contact basis: - CalculateBasis(relativeVelocity, contacts[i].normal, contacts[i].tangent); - - // calculate A's contact mass. - float4 invInertiaTensor = 1.0/(GetParticleInertiaTensor(simplexRadius, simplexInvRotationalMass) + FLOAT4_EPSILON); - CalculateContactMassesA(simplexInvMass, invInertiaTensor, simplexPrevPosition, simplexPrevOrientation, contactPoint, rollingContacts, contacts[i].normal, contacts[i].tangent, GetBitangent(contacts[i]), effectiveMasses[i].normalInvMassA, effectiveMasses[i].tangentInvMassA, effectiveMasses[i].bitangentInvMassA); - - // clear B's contact mass. - if (rigidbodyIndex >= 0) - { - CalculateContactMassesB(RW_rigidbodies[rigidbodyIndex], inertialSolverFrame[0].frame, contacts[i].pointB, contacts[i].normal, contacts[i].tangent, GetBitangent(contacts[i]), effectiveMasses[i].normalInvMassB, effectiveMasses[i].tangentInvMassB, effectiveMasses[i].bitangentInvMassB); - InterlockedAdd(RW_rigidbodies[rigidbodyIndex].constraintCount, 1); - } - else - { - ClearContactMasses(effectiveMasses[i].normalInvMassB, effectiveMasses[i].tangentInvMassB, effectiveMasses[i].bitangentInvMassB); - } -} - -[numthreads(128, 1, 1)] -void Project (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= dispatchBuffer[3]) return; - - // Skip contacts involving triggers: - if (shapes[contacts[i].bodyB].isTrigger()) - return; - - int simplexSize; - int simplexStart = GetSimplexStartAndSize(contacts[i].bodyA, simplexSize); - int colliderIndex = contacts[i].bodyB; - - // Get the rigidbody index (might be < 0, in that case there's no rigidbody present) - int rigidbodyIndex = shapes[colliderIndex].rigidbodyIndex; - - float frameEnd = stepTime * steps; - float substepsToEnd = timeLeft / substepTime; - - // Combine collision materials (use material from first particle in simplex) - collisionMaterial material = CombineCollisionMaterials(collisionMaterialIndices[simplices[simplexStart]], shapes[colliderIndex].materialIndex); - - // Get relative velocity at contact point. - // As we do not consider true ellipses for collision detection, particle contact points are never off-axis. - // So particle angular velocity does not contribute to normal impulses, and we can skip it. - float4 simplexPosition = FLOAT4_ZERO; - float4 simplexPrevPosition = FLOAT4_ZERO; - float simplexRadius = 0; - - for (int j = 0; j < simplexSize; ++j) - { - int particleIndex = simplices[simplexStart + j]; - simplexPosition += positions[particleIndex] * contacts[i].pointA[j]; - simplexPrevPosition += prevPositions[particleIndex] * contacts[i].pointA[j]; - simplexRadius += EllipsoidRadius(contacts[i].normal, orientations[particleIndex], principalRadii[particleIndex].xyz) * contacts[i].pointA[j]; - } - - // project position to the end of the full step: - float4 posA = lerp(simplexPrevPosition, simplexPosition, substepsToEnd); - posA += -contacts[i].normal * simplexRadius; - - float4 posB = contacts[i].pointB; - int rbContacts = 1; - if (rigidbodyIndex >= 0) - { - posB += GetRigidbodyVelocityAtPoint(rigidbodies[rigidbodyIndex], contacts[i].pointB, - asfloat(linearDeltasAsInt[rigidbodyIndex]), - asfloat(angularDeltasAsInt[rigidbodyIndex]), inertialSolverFrame[0]) * frameEnd; - rbContacts = rigidbodies[rigidbodyIndex].constraintCount; - } - - float normalInvMass = effectiveMasses[i].normalInvMassA + effectiveMasses[i].normalInvMassB * rbContacts; - float lambda = SolveAdhesion(contacts[i], normalInvMass, posA, posB, material.stickDistance, material.stickiness, stepTime); - - lambda += SolvePenetration(contacts[i], normalInvMass, posA, posB, maxDepenetration * stepTime); - - if (abs(lambda) > EPSILON) - { - float4 delta = lambda * contacts[i].normal * BaryScale(contacts[i].pointA) / substepsToEnd; - for (int j = 0; j < simplexSize; ++j) - { - int particleIndex = simplices[simplexStart + j]; - float4 delta1 = delta * invMasses[particleIndex] * contacts[i].pointA[j]; - - AtomicAddPositionDelta(particleIndex, delta1); - } - - if (rigidbodyIndex >= 0) - { - ApplyImpulse(rigidbodyIndex, -lambda / frameEnd * contacts[i].normal, contacts[i].pointB, inertialSolverFrame[0].frame); - } - } -} - -[numthreads(128, 1, 1)] -void Apply (uint3 id : SV_DispatchThreadID) -{ - unsigned int threadIndex = id.x; - - if (threadIndex >= particleCount) return; - - int p = particleIndices[threadIndex]; - - ApplyPositionDelta(positions, p, sorFactor); -} - - diff --git a/Assets/Obi/Resources/Compute/ColliderCollisionConstraints.compute.meta b/Assets/Obi/Resources/Compute/ColliderCollisionConstraints.compute.meta deleted file mode 100644 index c8cd80576..000000000 --- a/Assets/Obi/Resources/Compute/ColliderCollisionConstraints.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: ff4c3e041ffef4a5c91cf275735a7ecc -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 65536 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/ColliderDefinitions.cginc b/Assets/Obi/Resources/Compute/ColliderDefinitions.cginc deleted file mode 100644 index 3fb6ef96c..000000000 --- a/Assets/Obi/Resources/Compute/ColliderDefinitions.cginc +++ /dev/null @@ -1,81 +0,0 @@ -#ifndef COLLIDERDEFS_INCLUDE -#define COLLIDERDEFS_INCLUDE - -#define SPHERE_SHAPE 0 -#define BOX_SHAPE 1 -#define CAPSULE_SHAPE 2 -#define HEIGHTMAP_SHAPE 3 -#define TRIANGLE_MESH_SHAPE 4 -#define EDGE_MESH_SHAPE 5 -#define SDF_SHAPE 6 - -#define FORCEMODE_FORCE 0 -#define FORCEMODE_ACCEL 1 -#define FORCEMODE_WIND 2 - -#define DAMPDIR_ALL 0 -#define DAMPDIR_FORCE 1 -#define DAMPDIR_SURFACE 2 - -#define ZONETYPE_DIRECTIONAL 0 -#define ZONETYPE_RADIAL 1 -#define ZONETYPE_VORTEX 2 -#define ZONETYPE_VOID 3 - -struct shape -{ - float4 center; - float4 size; /**< box: size of the box in each axis. - sphere: radius of sphere (x,y,z), - capsule: radius (x), height(y), direction (z, can be 0, 1 or 2). - heightmap: width (x axis), height (y axis) and depth (z axis) in world units.*/ - uint type; /**< Sphere = 0, - Box = 1, - Capsule = 2, - Heightmap = 3, - TriangleMesh = 4, - EdgeMesh = 5, - SignedDistanceField = 6*/ - - float contactOffset; - int dataIndex; - int rigidbodyIndex; // index of the associated rigidbody in the collision world. - int materialIndex; // index of the associated material in the collision world. - int forceZoneIndex; // index of the associated force zone in the collision world. - int phase; - int flags; // first bit whether the collider is 2D (1) or 3D (0), second bit whether it's a trigger (1) or regular collider (0). - // third bit determines whether shape is inverted or not. - - bool is2D() - { - return (flags & 1) != 0; - } - - bool isTrigger() - { - // TODO: using bools doesn't work... why? - int a = (flags & 1 << 1) != 0; - int b = forceZoneIndex >= 0; - return a || b; - } - - float isInverted() - { - return (flags & 1 << 2) != 0 ? -1 : 1; - } -}; - -struct forceZone -{ - float4 color; - uint type; - uint mode; - uint dampingDir; - float intensity; - float minDistance; - float maxDistance; - float falloffPower; - float damping; -}; - -#endif \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/ColliderFrictionConstraints.compute b/Assets/Obi/Resources/Compute/ColliderFrictionConstraints.compute deleted file mode 100644 index 980908925..000000000 --- a/Assets/Obi/Resources/Compute/ColliderFrictionConstraints.compute +++ /dev/null @@ -1,193 +0,0 @@ -#include "ContactHandling.cginc" -#include "ColliderDefinitions.cginc" -#include "Rigidbody.cginc" -#include "Simplex.cginc" -#include "CollisionMaterial.cginc" -#include "Integration.cginc" -#include "AtomicDeltas.cginc" -#include "FluidKernels.cginc" - -#pragma kernel Project -#pragma kernel Apply - -StructuredBuffer particleIndices; -StructuredBuffer simplices; -StructuredBuffer invMasses; -StructuredBuffer invRotationalMasses; -StructuredBuffer positions; -StructuredBuffer orientations; -StructuredBuffer prevPositions; -StructuredBuffer prevOrientations; -StructuredBuffer principalRadii; - -StructuredBuffer transforms; -StructuredBuffer shapes; - -RWStructuredBuffer RW_positions; -RWStructuredBuffer RW_orientations; - -RWStructuredBuffer contacts; -RWStructuredBuffer effectiveMasses; -StructuredBuffer dispatchBuffer; - -StructuredBuffer solverToWorld; -StructuredBuffer inertialSolverFrame; - -// Variables set from the CPU -uint particleCount; -float substepTime; -float stepTime; -float sorFactor; - -[numthreads(128, 1, 1)] -void Project (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= dispatchBuffer[3]) return; - - // Skip contacts involving triggers: - if (shapes[contacts[i].bodyB].isTrigger()) - return; - - int simplexSize; - int simplexStart = GetSimplexStartAndSize(contacts[i].bodyA, simplexSize); - int colliderIndex = contacts[i].bodyB; - - int rigidbodyIndex = shapes[colliderIndex].rigidbodyIndex; - - // Combine collision materials (use material from first particle in simplex) - collisionMaterial material = CombineCollisionMaterials(collisionMaterialIndices[simplices[simplexStart]], shapes[colliderIndex].materialIndex); - - // Calculate relative velocity: - float4 rA = float4(0,0,0,0), rB = float4(0,0,0,0); - - float4 prevPositionA = float4(0,0,0,0); - float4 linearVelocityA = float4(0,0,0,0); - float4 angularVelocityA = float4(0,0,0,0); - float invRotationalMassA = 0; - quaternion orientationA = quaternion(0, 0, 0, 0); - float simplexRadiusA = 0; - - int j = 0; - for (j = 0; j < simplexSize; ++j) - { - int particleIndex = simplices[simplexStart + j]; - prevPositionA += prevPositions[particleIndex] * contacts[i].pointA[j]; - linearVelocityA += DifferentiateLinear(positions[particleIndex], prevPositions[particleIndex], substepTime) * contacts[i].pointA[j]; - angularVelocityA += DifferentiateAngular(orientations[particleIndex], prevOrientations[particleIndex], substepTime) * contacts[i].pointA[j]; - invRotationalMassA += invRotationalMasses[particleIndex] * contacts[i].pointA[j]; - orientationA += orientations[particleIndex] * contacts[i].pointA[j]; - simplexRadiusA += EllipsoidRadius(contacts[i].normal, prevOrientations[particleIndex], principalRadii[particleIndex].xyz) * contacts[i].pointA[j]; - } - - float4 relativeVelocity = linearVelocityA; - - // Add particle angular velocity if rolling contacts are enabled: - if (material.rollingContacts > 0) - { - rA = -contacts[i].normal * simplexRadiusA; // for fluid particles: - relativeVelocity += float4(cross(angularVelocityA.xyz, rA.xyz), 0); //* (Poly6(contacts[i].dist,simplexRadiusA*6) / Poly6(0,simplexRadiusA*6)); - } - - // Subtract rigidbody velocity: - int rbContacts = 1; - if (rigidbodyIndex >= 0) - { - // Note: unlike rA, that is expressed in solver space, rB is expressed in world space. - rB = solverToWorld[0].TransformPoint(contacts[i].pointB) - rigidbodies[rigidbodyIndex].com; - - relativeVelocity -= GetRigidbodyVelocityAtPoint(rigidbodies[rigidbodyIndex], contacts[i].pointB, - asfloat(linearDeltasAsInt[rigidbodyIndex]), - asfloat(angularDeltasAsInt[rigidbodyIndex]), inertialSolverFrame[0]); - - rbContacts = rigidbodies[rigidbodyIndex].constraintCount; - } - - // Determine impulse magnitude: - float tangentMass = effectiveMasses[i].tangentInvMassA + effectiveMasses[i].tangentInvMassB * rbContacts; - float bitangentMass = effectiveMasses[i].bitangentInvMassA + effectiveMasses[i].bitangentInvMassB * rbContacts; - float2 impulses = SolveFriction(contacts[i], tangentMass, bitangentMass, relativeVelocity, material.staticFriction, material.dynamicFriction, stepTime); - - if (abs(impulses.x) > EPSILON || abs(impulses.y) > EPSILON) - { - float4 tangentImpulse = impulses.x * contacts[i].tangent; - float4 bitangentImpulse = impulses.y * GetBitangent(contacts[i]); - float4 totalImpulse = tangentImpulse + bitangentImpulse; - - float baryScale = BaryScale(contacts[i].pointA); - for (j = 0; j < simplexSize; ++j) - { - int particleIndex = simplices[simplexStart + j]; - float4 delta1 = (tangentImpulse * effectiveMasses[i].tangentInvMassA + bitangentImpulse * effectiveMasses[i].bitangentInvMassA) * substepTime * contacts[i].pointA[j] * baryScale; - AtomicAddPositionDelta(particleIndex, delta1); - } - - if (rigidbodyIndex >= 0) - { - ApplyImpulse(rigidbodyIndex, -totalImpulse, contacts[i].pointB, inertialSolverFrame[0].frame); - } - - // Rolling contacts: - if (material.rollingContacts > 0) - { - // Calculate angular velocity deltas due to friction impulse: - float4 invInertiaTensor = 1.0/(GetParticleInertiaTensor(simplexRadiusA, invRotationalMassA) + FLOAT4_EPSILON); - float4x4 solverInertiaA = TransformInertiaTensor(invInertiaTensor, orientationA); - - float4 angVelDeltaA = mul(solverInertiaA, float4(cross(rA.xyz, totalImpulse.xyz), 0)); - float4 angVelDeltaB = FLOAT4_ZERO; - - // Final angular velocities, after adding the deltas: - angularVelocityA += angVelDeltaA; - float4 angularVelocityB = FLOAT4_ZERO; - - // Calculate weights (inverse masses): - float invMassA = length(mul(solverInertiaA, normalizesafe(angularVelocityA))); - float invMassB = 0; - - if (rigidbodyIndex >= 0) - { - angVelDeltaB = mul(-rigidbodies[rigidbodyIndex].inverseInertiaTensor, float4(cross(rB.xyz, totalImpulse.xyz), 0)); - angularVelocityB = rigidbodies[rigidbodyIndex].angularVelocity + angVelDeltaB; - invMassB = length(mul(rigidbodies[rigidbodyIndex].inverseInertiaTensor, normalizesafe(angularVelocityB))) * rbContacts; - } - - // Calculate rolling axis and angular velocity deltas: - float4 rollAxis = FLOAT4_ZERO; - float rollingImpulse = SolveRollingFriction(contacts[i], angularVelocityA, angularVelocityB, material.rollingFriction, invMassA, invMassB, rollAxis); - angVelDeltaA += rollAxis * rollingImpulse * invMassA; - angVelDeltaB -= rollAxis * rollingImpulse * invMassB; - - // Apply orientation delta to particles: - quaternion orientationDelta = AngularVelocityToSpinQuaternion(orientationA, angVelDeltaA, substepTime); - - for (j = 0; j < simplexSize; ++j) - { - int particleIndex = simplices[simplexStart + j]; - AtomicAddOrientationDelta(particleIndex, orientationDelta); - } - - // Apply angular velocity delta to rigidbody: - if (rigidbodyIndex >= 0) - { - AtomicAddAngularDelta(rigidbodyIndex, angVelDeltaB); - } - } - } -} - -[numthreads(128, 1, 1)] -void Apply (uint3 id : SV_DispatchThreadID) -{ - unsigned int threadIndex = id.x; - - if (threadIndex >= particleCount) return; - - int p = particleIndices[threadIndex]; - - ApplyPositionDelta(RW_positions, p, sorFactor); - ApplyOrientationDelta(RW_orientations, p, sorFactor); -} - - diff --git a/Assets/Obi/Resources/Compute/ColliderFrictionConstraints.compute.meta b/Assets/Obi/Resources/Compute/ColliderFrictionConstraints.compute.meta deleted file mode 100644 index e3e3d701b..000000000 --- a/Assets/Obi/Resources/Compute/ColliderFrictionConstraints.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: ec52fd9d30c594294a7c2f0f50cc6096 -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 65536 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/ColliderGrid.compute b/Assets/Obi/Resources/Compute/ColliderGrid.compute deleted file mode 100644 index 1369769ac..000000000 --- a/Assets/Obi/Resources/Compute/ColliderGrid.compute +++ /dev/null @@ -1,478 +0,0 @@ -#include "GridUtils.cginc" -#include "CollisionMaterial.cginc" -#include "ContactHandling.cginc" -#include "ColliderDefinitions.cginc" -#include "Rigidbody.cginc" -#include "Simplex.cginc" -#include "Bounds.cginc" -#include "SolverParameters.cginc" -#include "AtomicDeltas.cginc" -#include "Phases.cginc" - -#define MAX_CONTACTS_PER_SIMPLEX 64 - -#pragma kernel Clear -#pragma kernel BuildUnsortedList -#pragma kernel FindPopulatedLevels -#pragma kernel SortList -#pragma kernel BuildContactList -#pragma kernel PrefixSumColliderCounts -#pragma kernel SortContactPairs -#pragma kernel ApplyForceZones -#pragma kernel WriteForceZoneResults - -StructuredBuffer positions; -StructuredBuffer orientations; -StructuredBuffer principalRadii; -StructuredBuffer invMasses; -StructuredBuffer velocities; -RWStructuredBuffer externalForces; -RWStructuredBuffer wind; -RWStructuredBuffer colors; -RWStructuredBuffer life; - -StructuredBuffer activeParticles; -StructuredBuffer simplices; -StructuredBuffer filters; -RWStructuredBuffer simplexBounds; // bounding box of each simplex. - -StructuredBuffer aabbs; -StructuredBuffer transforms; -StructuredBuffer shapes; -StructuredBuffer forceZones; -RWStructuredBuffer sortedColliderIndices; - -RWStructuredBuffer colliderTypeCounts; -RWStructuredBuffer contactOffsetsPerType; -RWStructuredBuffer unsortedContactPairs; - -RWStructuredBuffer cellIndices; -RWStructuredBuffer cellOffsets; - -RWStructuredBuffer cellCounts; -RWStructuredBuffer offsetInCells; - -RWStructuredBuffer contacts; -RWStructuredBuffer contactPairs; -RWStructuredBuffer dispatchBuffer; - -StructuredBuffer solverToWorld; -StructuredBuffer worldToSolver; - -uint maxContacts; -uint colliderCount; // amount of colliders in the grid. -uint cellsPerCollider; // max amount of cells a collider can be inserted into. Typically this is 8. -int shapeTypeCount; // number of different collider shapes, ie: box, sphere, sdf, etc. -uint particleCount; -float deltaTime; - -[numthreads(128, 1, 1)] -void Clear (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i == 0) - { - for (int l = 0; l <= GRID_LEVELS; ++l) - levelPopulation[l] = 0; - } - - // clear all cell offsets to invalid, so that we can later use atomic minimum to calculate the offset. - if (i < maxCells) - { - cellOffsets[i] = INVALID; - cellCounts[i] = 0; - } - - // clear all cell indices to invalid. - if (i < colliderCount) - { - for (uint j = 0; j < cellsPerCollider; ++j) - cellIndices[i*cellsPerCollider+j] = INVALID; - } -} - -[numthreads(128, 1, 1)] -void BuildUnsortedList (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - if (i >= colliderCount) return; - - aabb bounds = aabbs[i]; - int rb = shapes[i].rigidbodyIndex; - - // Expand bounds by rigidbody's linear velocity - // (check against out of bounds rigidbody access, can happen when a destroyed collider references a rigidbody that has just been destroyed too) - if (rb >= 0)// && rb < rigidbodies.Length) - bounds.Sweep(rigidbodies[rb].velocity * deltaTime); - - // Expand bounds by collision material's stick distance: - if (shapes[i].materialIndex >= 0) - bounds.Expand(collisionMaterials[shapes[i].materialIndex].stickDistance); - - // calculate bounds size, grid level and cell size: - float4 size = bounds.max_ - bounds.min_; - float maxSize = max(max (size.x, size.y), size.z); - int level = GridLevelForSize(maxSize); - float cellSize = CellSizeOfLevel(level); - - // calculate max and min cell coordinates (force 4th component to zero, might not be after expanding) - int4 minCell = floor(bounds.min_ / cellSize); - int4 maxCell = floor(bounds.max_ / cellSize); - minCell[3] = 0; - maxCell[3] = 0; - - // if the collider is 2D, project it to the z = 0 cells. - if (shapes[i].is2D()) - { - minCell[2] = 0; - maxCell[2] = 0; - } - - int4 cellSpan = maxCell - minCell; - - // insert collider in cells: - for (int x = 0; x <= cellSpan[0]; ++x) - { - for (int y = 0; y <= cellSpan[1]; ++y) - { - for (int z = 0; z <= cellSpan[2]; ++z) - { - int cellIndex = GridHash(minCell + int4(x, y, z, level)); - - // calculate flat index of this cell into arrays: - int k = x + y*2 + z*4 + i*cellsPerCollider; - - cellIndices[k] = cellIndex; - InterlockedAdd(cellCounts[cellIndex],1,offsetInCells[k]); - } - } - } - - // atomically increase this level's population by one: - InterlockedAdd(levelPopulation[1 + level],1); -} - -[numthreads(128, 1, 1)] -void SortList (uint3 id : SV_DispatchThreadID) -{ - uint i = id.x; - if (i >= colliderCount * cellsPerCollider) return; - - uint cellIndex = cellIndices[i]; - - if (cellIndex != INVALID) - { - // write collider to its sorted index: - uint sortedIndex = cellOffsets[cellIndex] + offsetInCells[i]; - sortedColliderIndices[sortedIndex] = i; - } -} - -[numthreads(128, 1, 1)] -void BuildContactList (uint3 id : SV_DispatchThreadID) -{ - unsigned int threadIndex = id.x; - - if (threadIndex >= pointCount + edgeCount + triangleCount) return; - - uint cellCount = colliderCount * cellsPerCollider; - int candidateCount = 0; - uint candidates[MAX_CONTACTS_PER_SIMPLEX]; - - int simplexSize; - int simplexStart = GetSimplexStartAndSize(threadIndex, simplexSize); - - aabb b = simplexBounds[threadIndex].Transformed(solverToWorld[0]); - - // max size of the particle bounds in cells: - int4 maxSize = int4(10,10,10,10); - - // build a list of candidate colliders: - for (uint m = 1; m <= levelPopulation[0]; ++m) - { - uint l = levelPopulation[m]; - float cellSize = CellSizeOfLevel(l); - - int4 minCell = floor(b.min_ / cellSize); - int4 maxCell = floor(b.max_ / cellSize); - maxCell = minCell + min(maxCell - minCell, maxSize); - - for (int x = minCell[0]; x <= maxCell[0]; ++x) - { - for (int y = minCell[1]; y <= maxCell[1]; ++y) - { - // for 2D mode, project each cell at z == 0 and check them too. This way we ensure 2D colliders - // (which are inserted in cells with z == 0) are accounted for in the broadphase. - if (mode == 1) - { - uint flatCellIndex = GridHash(int4(x,y,0,l)); - uint cellStart = cellOffsets[flatCellIndex]; - uint cellCount = cellCounts[flatCellIndex]; - - // iterate through colliders in the neighbour cell - for (uint n = cellStart; n < cellStart + cellCount; ++n) - { - // sorted insert into the candidates list: - if (candidateCount < MAX_CONTACTS_PER_SIMPLEX) - candidates[candidateCount++] = sortedColliderIndices[n] / cellsPerCollider; - } - } - - for (int z = minCell[2]; z <= maxCell[2]; ++z) - { - uint flatCellIndex = GridHash(int4(x,y,z,l)); - uint cellStart = cellOffsets[flatCellIndex]; - uint cellCount = cellCounts[flatCellIndex]; - - // iterate through colliders in the neighbour cell - for (uint n = cellStart; n < cellStart + cellCount; ++n) - { - if (candidateCount < MAX_CONTACTS_PER_SIMPLEX) - candidates[candidateCount++] = sortedColliderIndices[n] / cellsPerCollider; - } - - } - } - } - } - - //evaluate candidates and create contacts: - if (candidateCount > 0) - { - // insert sort: - for (int k = 1; k < candidateCount; ++k) - { - uint key = candidates[k]; - int j = k - 1; - - while (j >= 0 && candidates[j] > key) - candidates[j + 1] = candidates[j--]; - - candidates[j + 1] = key; - } - - // make sure each candidate only shows up once in the list: - int first = 0, contactCount = 0; - while(++first != candidateCount) - { - if (candidates[contactCount] != candidates[first]) - candidates[++contactCount] = candidates[first]; - } - contactCount++; - - // append contacts: - for (int i = 0; i < contactCount; i++) - { - int c = candidates[i]; - - aabb colliderBoundsWS = aabbs[c]; - int rb = shapes[c].rigidbodyIndex; - - // Expand bounds by rigidbody's linear velocity: - if (rb >= 0) - colliderBoundsWS.Sweep(rigidbodies[rb].velocity * deltaTime); - - // Expand bounds by collision material's stick distance: - if (shapes[c].materialIndex >= 0) - colliderBoundsWS.Expand(collisionMaterials[shapes[c].materialIndex].stickDistance); - - // check if any simplex particle and the collider should collide: - bool shouldCollide = false; - int colliderCategory = shapes[c].phase & CategoryMask; - int colliderMask = (shapes[c].phase & MaskMask) >> 16; - for (int j = 0; j < simplexSize; ++j) - { - int simplexCategory = filters[simplices[simplexStart + j]] & CategoryMask; - int simplexMask = (filters[simplices[simplexStart + j]] & MaskMask) >> 16; - shouldCollide = shouldCollide || ((simplexCategory & colliderMask) != 0 && (simplexMask & colliderCategory) != 0); - } - - if (shouldCollide && b.IntersectsAabb(colliderBoundsWS, mode == 1)) - { - uint count; - InterlockedAdd(dispatchBuffer[7], 1, count); - - // technically incorrect, as number of pairs != number of contacts but - // we will ignore either excess pairs or contacts. - if (count < maxContacts) - { - // increment the amount of contacts for this shape type: - InterlockedAdd(colliderTypeCounts[shapes[c].type],1); - - // enqueue a new contact pair: - unsortedContactPairs[count] = uint2(threadIndex,c); - - InterlockedMax(dispatchBuffer[4],(count + 1) / 128 + 1); - } - } - } - } -} - -[numthreads(1, 1, 1)] -void PrefixSumColliderCounts (uint3 id : SV_DispatchThreadID) -{ - contactOffsetsPerType[0] = 0; - int i; - - for (i = 0; i < shapeTypeCount; ++i) - { - contactOffsetsPerType[i+1] = contactOffsetsPerType[i] + colliderTypeCounts[i]; - - // write amount of pairs per collider type in the dispatch buffer: - dispatchBuffer[8 + i*4] = colliderTypeCounts[i] / 128 + 1; - dispatchBuffer[8 + i*4 + 3] = colliderTypeCounts[i]; - } -} - -[numthreads(128, 1, 1)] -void SortContactPairs (uint3 id : SV_DispatchThreadID) -{ - uint i = id.x; - if (i >= dispatchBuffer[7] || i >= maxContacts) return; - - uint2 pair = unsortedContactPairs[i]; - int shapeType = (int)shapes[pair.y].type; - - // decrement amount of pairs for the given collider type: - uint count; - InterlockedAdd(colliderTypeCounts[shapeType],-1, count); - - // write the pair directly at its position in the sorted array: - contactPairs[contactOffsetsPerType[shapeType] + count - 1] = pair; -} - -void AtomicAddExternalForceDelta(in int index, in float4 delta) -{ - InterlockedAddFloat(deltasAsInt, index, 0, delta.x); - InterlockedAddFloat(deltasAsInt, index, 1, delta.y); - InterlockedAddFloat(deltasAsInt, index, 2, delta.z); -} - -void AtomicAddWindDelta(in int index, in float4 delta) -{ - InterlockedAddFloat(orientationDeltasAsInt, index, 0, delta.x); - InterlockedAddFloat(orientationDeltasAsInt, index, 1, delta.y); - InterlockedAddFloat(orientationDeltasAsInt, index, 2, delta.z); -} - -void AtomicAddLifeDelta(in int index, in float delta) -{ - InterlockedAddFloat(deltasAsInt, index, 3, delta); -} - -[numthreads(128, 1, 1)] -void ApplyForceZones (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - if (i >= dispatchBuffer[3]) return; - - int forceZoneIndex = shapes[contacts[i].bodyB].forceZoneIndex; - - if (forceZoneIndex >= 0) - { - int simplexSize; - int simplexStart = GetSimplexStartAndSize(contacts[i].bodyA, simplexSize); - - for (int j = 0; j < simplexSize; ++j) - { - int particleIndex = simplices[simplexStart + j]; - - float dist = -dot(positions[particleIndex] - contacts[i].pointB, contacts[i].normal); - if (dist < 0) continue; - - float4 axis = worldToSolver[0].Multiply(transforms[contacts[i].bodyB]).TransformDirection(float4(0, 0, 1, 0)); - - // calculate falloff region based on min/max distances: - float falloff = 1; - float range = forceZones[forceZoneIndex].maxDistance - forceZones[forceZoneIndex].minDistance; - if (abs(range) > EPSILON) - falloff = pow(saturate((dist - forceZones[forceZoneIndex].minDistance) / range), forceZones[forceZoneIndex].falloffPower); - - float forceIntensity = forceZones[forceZoneIndex].intensity * falloff; - float dampIntensity = forceZones[forceZoneIndex].damping * falloff; - - // tint particles: - float mix = pow(1 - saturate(forceZones[forceZoneIndex].color.a * falloff),deltaTime); - colors[particleIndex] = lerp(forceZones[forceZoneIndex].color, colors[particleIndex], mix); - - // calculate force direction, depending on the type of the force field: - float4 result = FLOAT4_ZERO; - switch (forceZones[forceZoneIndex].type) - { - case ZONETYPE_RADIAL: - result = contacts[i].normal * forceIntensity; - break; - case ZONETYPE_VORTEX: - result = float4(cross(axis.xyz * forceIntensity, contacts[i].normal.xyz),0); - break; - case ZONETYPE_DIRECTIONAL: - result = axis * forceIntensity; - break; - default: - AtomicAddLifeDelta(particleIndex, -forceIntensity * deltaTime); - return; - } - - // calculate damping along force direction: - float4 dampingDir; - switch (forceZones[forceZoneIndex].dampingDir) - { - case DAMPDIR_FORCE: - { - float4 forceDir = normalizesafe(result); - result -= forceDir * dot(velocities[particleIndex], forceDir) * dampIntensity; - } - break; - case DAMPDIR_SURFACE: - result -= contacts[i].normal * dot(velocities[particleIndex], contacts[i].normal) * dampIntensity; - break; - default: - result -= velocities[particleIndex] * dampIntensity; - break; - } - - if (invMasses[particleIndex] > 0) - { - // here we reuse position and orientation delta buffers as velocity and wind buffers for atomic writes: - switch (forceZones[forceZoneIndex].mode) - { - case FORCEMODE_ACCEL: - AtomicAddExternalForceDelta(particleIndex, result / simplexSize / invMasses[particleIndex]); - break; - case FORCEMODE_FORCE: - AtomicAddExternalForceDelta(particleIndex, result / simplexSize); - break; - case FORCEMODE_WIND: - AtomicAddWindDelta(particleIndex, result / simplexSize); - break; - } - } - } - } -} - -[numthreads(128, 1, 1)] -void WriteForceZoneResults (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - if (i >= particleCount) return; - - int p = activeParticles[i]; - - externalForces[p].xyz += float3(asfloat(deltasAsInt[p].x), - asfloat(deltasAsInt[p].y), - asfloat(deltasAsInt[p].z)); - - wind[p].xyz += float3(asfloat(orientationDeltasAsInt[p].x), - asfloat(orientationDeltasAsInt[p].y), - asfloat(orientationDeltasAsInt[p].z)); - - life[p] += asfloat(deltasAsInt[p].w); - - deltasAsInt[p] = uint4(0, 0, 0, 0); - orientationDeltasAsInt[p] = uint4(0, 0, 0, 0); -} - - diff --git a/Assets/Obi/Resources/Compute/ColliderGrid.compute.meta b/Assets/Obi/Resources/Compute/ColliderGrid.compute.meta deleted file mode 100644 index 6dbc21852..000000000 --- a/Assets/Obi/Resources/Compute/ColliderGrid.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: df152b65921c34856a1ea566d782acc1 -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 65536 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/CollisionMaterial.cginc b/Assets/Obi/Resources/Compute/CollisionMaterial.cginc deleted file mode 100644 index 5bfaa8564..000000000 --- a/Assets/Obi/Resources/Compute/CollisionMaterial.cginc +++ /dev/null @@ -1,109 +0,0 @@ -#ifndef COLLISIONMATERIAL_INCLUDE -#define COLLISIONMATERIAL_INCLUDE - -struct collisionMaterial -{ - float dynamicFriction; - float staticFriction; - float rollingFriction; - float stickiness; - float stickDistance; - int frictionCombine; - int stickinessCombine; - int rollingContacts; -}; - -StructuredBuffer collisionMaterialIndices; -StructuredBuffer collisionMaterials; - -collisionMaterial EmptyCollisionMaterial() -{ - collisionMaterial m; - m.dynamicFriction = 0; - m.staticFriction = 0; - m.rollingFriction = 0; - m.stickiness = 0; - m.stickDistance = 0; - m.frictionCombine = 0; - m.stickinessCombine = 0; - m.rollingContacts = 0; - return m; -} - -collisionMaterial CombineWith(collisionMaterial a, collisionMaterial b) -{ - collisionMaterial result; - int frictionCombineMode = max(a.frictionCombine, b.frictionCombine); - int stickCombineMode = max(a.stickinessCombine, b.stickinessCombine); - - switch (frictionCombineMode) - { - case 0: - default: - result.dynamicFriction = (a.dynamicFriction + b.dynamicFriction) * 0.5f; - result.staticFriction = (a.staticFriction + b.staticFriction) * 0.5f; - result.rollingFriction = (a.rollingFriction + b.rollingFriction) * 0.5f; - break; - - case 1: - result.dynamicFriction = min(a.dynamicFriction, b.dynamicFriction); - result.staticFriction = min(a.staticFriction, b.staticFriction); - result.rollingFriction = min(a.rollingFriction, b.rollingFriction); - break; - - case 2: - result.dynamicFriction = a.dynamicFriction * b.dynamicFriction; - result.staticFriction = a.staticFriction * b.staticFriction; - result.rollingFriction = a.rollingFriction * b.rollingFriction; - break; - - case 3: - result.dynamicFriction = max(a.dynamicFriction, b.dynamicFriction); - result.staticFriction = max(a.staticFriction, b.staticFriction); - result.rollingFriction = max(a.rollingFriction, b.rollingFriction); - break; - } - - switch (stickCombineMode) - { - case 0: - default: - result.stickiness = (a.stickiness + b.stickiness) * 0.5f; - break; - - case 1: - result.stickiness = min(a.stickiness, b.stickiness); - break; - - case 2: - result.stickiness = a.stickiness * b.stickiness; - break; - - case 3: - result.stickiness = max(a.stickiness, b.stickiness); - break; - } - - result.stickDistance = max(a.stickDistance, b.stickDistance); - result.rollingContacts = a.rollingContacts | b.rollingContacts; - return result; -} - -collisionMaterial CombineCollisionMaterials(int materialA, int materialB) -{ - // Combine collision materials: - collisionMaterial combined; - - if (materialA >= 0 && materialB >= 0) - combined = CombineWith(collisionMaterials[materialA], collisionMaterials[materialB]); - else if (materialA >= 0) - combined = collisionMaterials[materialA]; - else if (materialB >= 0) - combined = collisionMaterials[materialB]; - else - combined = EmptyCollisionMaterial(); - - return combined; -} - -#endif \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/ContactHandling.cginc b/Assets/Obi/Resources/Compute/ContactHandling.cginc deleted file mode 100644 index 1ffbd7fbc..000000000 --- a/Assets/Obi/Resources/Compute/ContactHandling.cginc +++ /dev/null @@ -1,228 +0,0 @@ -#ifndef CONTACTHANDLING_INCLUDE -#define CONTACTHANDLING_INCLUDE - -#include "MathUtils.cginc" -#include "Transform.cginc" - -struct contact // 96 bytes -{ - float4 pointA; // point A, expressed as simplex barycentric coords for simplices, as a solver-space position for colliders. - float4 pointB; // point B, expressed as simplex barycentric coords for simplices, as a solver-space position for colliders. - float4 normal; /**< Normal direction. */ - float4 tangent; /**< Tangent direction. */ - - float dist; /** distance between both colliding entities at the beginning of the timestep.*/ - - float normalLambda; - float tangentLambda; - float bitangentLambda; - float stickLambda; - float rollingFrictionImpulse; - - int bodyA; - int bodyB; -}; - -// 24 bytes -struct contactMasses -{ - float normalInvMassA; - float tangentInvMassA; - float bitangentInvMassA; - - float normalInvMassB; - float tangentInvMassB; - float bitangentInvMassB; -}; - -float4 GetBitangent(in contact c) -{ - return normalizesafe(float4(cross(c.normal.xyz,c.tangent.xyz),0)); -} - -void CalculateBasis(in float4 relativeVelocity, in float4 normal, out float4 tangent) -{ - tangent = normalizesafe(relativeVelocity - dot(relativeVelocity, normal) * normal); -} - -void CalculateContactMassesA(float invMass, - float4 inverseInertiaTensor, - float4 position, - quaternion orientation, - float4 contactPoint, - bool rollingContacts, - float4 normal, - float4 bitangent, - float4 tangent, - out float normalInvMassA, - out float tangentInvMassA, - out float bitangentInvMassA) -{ - // initialize inverse linear masses: - normalInvMassA = tangentInvMassA = bitangentInvMassA = invMass; - - if (rollingContacts) - { - float4 rA = contactPoint - position; - float4x4 solverInertiaA = TransformInertiaTensor(inverseInertiaTensor, orientation); - - normalInvMassA += RotationalInvMass(solverInertiaA, rA, normal); - tangentInvMassA += RotationalInvMass(solverInertiaA, rA, tangent); - bitangentInvMassA += RotationalInvMass(solverInertiaA, rA, bitangent); - } -} - -void CalculateContactMassesB(float invMass, - float4 inverseInertiaTensor, - float4 position, - quaternion orientation, - float4 contactPoint, - bool rollingContacts, - float4 normal, - float4 bitangent, - float4 tangent, - out float normalInvMassB, - out float tangentInvMassB, - out float bitangentInvMassB) -{ - // initialize inverse linear masses: - normalInvMassB = tangentInvMassB = bitangentInvMassB = invMass; - - if (rollingContacts) - { - float4 rB = contactPoint - position; - float4x4 solverInertiaB = TransformInertiaTensor(inverseInertiaTensor, orientation); - - normalInvMassB += RotationalInvMass(solverInertiaB, rB, normal); - tangentInvMassB += RotationalInvMass(solverInertiaB, rB, tangent); - bitangentInvMassB += RotationalInvMass(solverInertiaB, rB, bitangent); - } -} - -void ClearContactMasses(out float normalInvMass, - out float tangentInvMass, - out float bitangentInvMass) -{ - normalInvMass = tangentInvMass = bitangentInvMass = 0; -} - -float SolveAdhesion(inout contact c, float normalMass, float4 posA, float4 posB, float stickDistance, float stickiness, float dt) -{ - float lambdaChange = 0; - - if (normalMass > 0 && stickDistance > 0 && stickiness > 0 && dt > 0) - { - c.dist = dot(posA - posB, c.normal); - - // calculate stickiness position correction: - float constraint = stickiness * (1 - max(c.dist / stickDistance, 0)) * dt; - - // calculate lambda multiplier: - float dlambda = -constraint / normalMass; - - // accumulate lambda: - float newStickinessLambda = min(c.stickLambda + dlambda, 0); - - // calculate lambda change and update accumulated lambda: - lambdaChange = newStickinessLambda - c.stickLambda; - c.stickLambda = newStickinessLambda; - } - - return lambdaChange; -} - -float SolvePenetration(inout contact c, float normalMass, float4 posA, float4 posB, float maxDepenetrationDelta) -{ - float lambdaChange = 0; - - if (normalMass > 0) - { - //project position delta to normal vector: - c.dist = dot(posA - posB, c.normal); - - // calculate max projection distance based on depenetration velocity: - float maxProjection = max(-c.dist - maxDepenetrationDelta, 0); - - // calculate lambda multiplier: - float dlambda = -(c.dist + maxProjection) / normalMass; - - // accumulate lambda: - float newLambda = max(c.normalLambda + dlambda, 0); - - // calculate lambda change and update accumulated lambda: - lambdaChange = newLambda - c.normalLambda; - c.normalLambda = newLambda; - } - - return lambdaChange; -} - -float2 SolveFriction(inout contact c, float tangentMass, float bitangentMass, float4 relativeVelocity, float staticFriction, float dynamicFriction, float dt) -{ - float2 lambdaChange = float2(0,0); - - if (tangentMass > 0 && bitangentMass > 0 && - (dynamicFriction > 0 || staticFriction > 0) && (c.normalLambda > 0 /*|| stickLambda > 0*/)) - { - // calculate delta projection on both friction axis: - float tangentPosDelta = dot(relativeVelocity, c.tangent); - float bitangentPosDelta = dot(relativeVelocity, GetBitangent(c)); - - // calculate friction pyramid limit: - float dynamicFrictionCone = c.normalLambda / dt * dynamicFriction; - float staticFrictionCone = c.normalLambda / dt * staticFriction; - - // tangent impulse: - float tangentLambdaDelta = -tangentPosDelta / tangentMass; - float newTangentLambda = c.tangentLambda + tangentLambdaDelta; - - if (abs(newTangentLambda) > staticFrictionCone) - newTangentLambda = clamp(newTangentLambda, -dynamicFrictionCone, dynamicFrictionCone); - - lambdaChange[0] = newTangentLambda - c.tangentLambda; - c.tangentLambda = newTangentLambda; - - // bitangent impulse: - float bitangentLambdaDelta = -bitangentPosDelta / bitangentMass; - float newBitangentLambda = c.bitangentLambda + bitangentLambdaDelta; - - if (abs(newBitangentLambda) > staticFrictionCone) - newBitangentLambda = clamp(newBitangentLambda, -dynamicFrictionCone, dynamicFrictionCone); - - lambdaChange[1] = newBitangentLambda - c.bitangentLambda; - c.bitangentLambda = newBitangentLambda; - } - - return lambdaChange; -} - -float SolveRollingFriction(inout contact c, - float4 angularVelocityA, - float4 angularVelocityB, - float rollingFriction, - float invMassA, - float invMassB, - inout float4 rolling_axis) -{ - float rolling_impulse_change = 0; - float totalInvMass = invMassA + invMassB; - - if (totalInvMass > 0) - { - rolling_axis = normalizesafe(angularVelocityA - angularVelocityB); - - float vel1 = dot(angularVelocityA,rolling_axis); - float vel2 = dot(angularVelocityB,rolling_axis); - - float relativeVelocity = vel1 - vel2; - - float maxImpulse = c.normalLambda * rollingFriction; - float newRollingImpulse = clamp(c.rollingFrictionImpulse - relativeVelocity / totalInvMass, -maxImpulse, maxImpulse); - rolling_impulse_change = newRollingImpulse - c.rollingFrictionImpulse; - c.rollingFrictionImpulse = newRollingImpulse; - } - - return rolling_impulse_change; -} - -#endif \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/ContactHandling.cginc.meta b/Assets/Obi/Resources/Compute/ContactHandling.cginc.meta deleted file mode 100644 index 0cf2726cf..000000000 --- a/Assets/Obi/Resources/Compute/ContactHandling.cginc.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 28492658e279e4adaab298f430af09a2 -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/DeformableTriangles.compute b/Assets/Obi/Resources/Compute/DeformableTriangles.compute deleted file mode 100644 index d26219066..000000000 --- a/Assets/Obi/Resources/Compute/DeformableTriangles.compute +++ /dev/null @@ -1,143 +0,0 @@ -#pragma kernel ResetNormals -#pragma kernel UpdateNormals -#pragma kernel UpdateEdgeNormals -#pragma kernel OrientationFromNormals - -#include "InterlockedUtils.cginc" -#include "MathUtils.cginc" - -StructuredBuffer deformableTriangles; -StructuredBuffer deformableTriangleUVs; - -StructuredBuffer deformableEdges; - -StructuredBuffer renderablePositions; -StructuredBuffer velocities; -StructuredBuffer wind; -StructuredBuffer phases; - -RWStructuredBuffer normals; - -RWStructuredBuffer normalsInt; -RWStructuredBuffer tangentsInt; -RWStructuredBuffer renderableOrientations; - -// Variables set from the CPU -uint normalsCount; -uint triangleCount; -uint edgeCount; - -void AccumulateNormal(in int index, in float4 delta) -{ - InterlockedAddFloat(normalsInt, index, 0, delta.x); - InterlockedAddFloat(normalsInt, index, 1, delta.y); - InterlockedAddFloat(normalsInt, index, 2, delta.z); -} - -void AccumulateTangent(in int index, in float4 delta) -{ - InterlockedAddFloat(tangentsInt, index, 0, delta.x); - InterlockedAddFloat(tangentsInt, index, 1, delta.y); - InterlockedAddFloat(tangentsInt, index, 2, delta.z); - InterlockedAddFloat(tangentsInt, index, 3, delta.w); -} - -[numthreads(128, 1, 1)] -void ResetNormals (uint3 id : SV_DispatchThreadID) -{ - uint i = id.x; - if (i >= normalsCount) return; - - // leave fluid and softbody normalsInt intact. - if ((phases[i] & (int)PHASE_FLUID) == 0 && normals[i].w >= 0) - { - normals[i] = FLOAT4_ZERO; - tangentsInt[i] = asuint(FLOAT4_ZERO); - } -} - -[numthreads(128, 1, 1)] -void UpdateNormals (uint3 id : SV_DispatchThreadID) -{ - uint i = id.x; - if (i >= triangleCount) return; - - int p1 = deformableTriangles[i*3]; - int p2 = deformableTriangles[i*3 + 1]; - int p3 = deformableTriangles[i*3 + 2]; - - float2 w1 = deformableTriangleUVs[i*3]; - float2 w2 = deformableTriangleUVs[i*3 + 1]; - float2 w3 = deformableTriangleUVs[i*3 + 2]; - - float4 v1 = renderablePositions[p1]; - float4 v2 = renderablePositions[p2]; - float4 v3 = renderablePositions[p3]; - - float3 m1 = (v2 - v1).xyz; - float3 m2 = (v3 - v1).xyz; - - float2 s = w2 - w1; - float2 t = w3 - w1; - - float4 normal = float4(cross(m1, m2), 0); - float4 tangent = FLOAT4_ZERO; - - float area = s.x * t.y - t.x * s.y; - - if (abs(area) > EPSILON) - { - tangent = float4(t.y * m1.x - s.y * m2.x, - t.y * m1.y - s.y * m2.y, - t.y * m1.z - s.y * m2.z, 0) / area; - } - - AccumulateNormal(p1,normal); - AccumulateNormal(p2,normal); - AccumulateNormal(p3,normal); - - AccumulateTangent(p1,tangent); - AccumulateTangent(p2,tangent); - AccumulateTangent(p3,tangent); -} - -[numthreads(128, 1, 1)] -void UpdateEdgeNormals (uint3 id : SV_DispatchThreadID) -{ - uint i = id.x; - if (i >= edgeCount) return; - - int p1 = deformableEdges[i * 2]; - int p2 = deformableEdges[i * 2 + 1]; - - float4 edge = renderablePositions[p2] - renderablePositions[p1]; - float4 avgWind = (velocities[p1] + velocities[p2]) * 0.5f - (wind[p1] + wind[p2]) * 0.5f; - float denom = dot(edge, edge); - float4 normal = avgWind - (denom < EPSILON ? FLOAT4_ZERO : edge * dot(avgWind, edge) / denom); - - AccumulateNormal(p1,normal); - AccumulateNormal(p2,normal); -} - -[numthreads(128, 1, 1)] -void OrientationFromNormals (uint3 id : SV_DispatchThreadID) -{ - uint i = id.x; - if (i >= normalsCount) return; - - if ((phases[i] & (int)PHASE_FLUID) == 0 && normals[i].w >= 0) // not fluid or softbody (no SDF stored)) - { - float4 normal = normals[i]; - float4 tangent = asfloat(tangentsInt[i]); - - if (dot(normal, normal) > EPSILON && - dot(tangent, tangent) > EPSILON) - { - normals[i] = normalizesafe(normal); - tangentsInt[i] = asuint(normalizesafe(tangent)); - - // particle orientation from normal/tangent: - renderableOrientations[i] = q_look_at(normals[i].xyz, asfloat(tangentsInt[i]).xyz); - } - } -} diff --git a/Assets/Obi/Resources/Compute/DeformableTriangles.compute.meta b/Assets/Obi/Resources/Compute/DeformableTriangles.compute.meta deleted file mode 100644 index 6175b9dae..000000000 --- a/Assets/Obi/Resources/Compute/DeformableTriangles.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 2444094f2fb2c43cfb9c90b5949f39ec -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 65536 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/DensityConstraints.compute b/Assets/Obi/Resources/Compute/DensityConstraints.compute deleted file mode 100644 index cf39aa6a4..000000000 --- a/Assets/Obi/Resources/Compute/DensityConstraints.compute +++ /dev/null @@ -1,430 +0,0 @@ -#pragma kernel UpdateDensities -#pragma kernel Apply -#pragma kernel ApplyPositionDeltas - -#pragma kernel CalculateAtmosphere -#pragma kernel ApplyAtmosphere - -#pragma kernel AccumulateSmoothPositions -#pragma kernel AccumulateAnisotropy -#pragma kernel AverageAnisotropy - -#include "MathUtils.cginc" -#include "Quaternion.cginc" -#include "AtomicDeltas.cginc" -#include "FluidKernels.cginc" - -StructuredBuffer neighbors; -StructuredBuffer neighborCounts; - -StructuredBuffer sortedToOriginal; - -StructuredBuffer sortedPositions; -StructuredBuffer sortedPrevPositions; -StructuredBuffer sortedFluidMaterials; -StructuredBuffer sortedFluidInterface; -StructuredBuffer sortedPrincipalRadii; -StructuredBuffer sortedUserData; -StructuredBuffer sortedFluidData_RO; -RWStructuredBuffer sortedFluidData; - -StructuredBuffer prevOrientations; - -StructuredBuffer wind; - -StructuredBuffer fluidMaterials2; -RWStructuredBuffer fluidData; -RWStructuredBuffer positions; -RWStructuredBuffer prevPositions; -RWStructuredBuffer orientations; -RWStructuredBuffer velocities; -RWStructuredBuffer angularVelocities; -RWStructuredBuffer userData; -RWStructuredBuffer normals; - -RWStructuredBuffer massCenters; -RWStructuredBuffer prevMassCenters; - -RWStructuredBuffer vorticity; -RWStructuredBuffer vorticityAccelerations; -RWStructuredBuffer linearAccelerations; -RWStructuredBuffer linearFromAngular; -RWStructuredBuffer angularDiffusion; - -StructuredBuffer normals_RO; -StructuredBuffer fluidData_RO; -StructuredBuffer vorticity_RO; -StructuredBuffer velocities_RO; -StructuredBuffer angularVelocities_RO; -StructuredBuffer linearFromAngular_RO; - -RWStructuredBuffer renderablePositions; -RWStructuredBuffer renderableOrientations; -RWStructuredBuffer renderableRadii; -StructuredBuffer life; - -RWStructuredBuffer anisotropies; -StructuredBuffer dispatchBuffer; - -// Variables set from the CPU -uint maxNeighbors; -float deltaTime; - -[numthreads(128, 1, 1)] -void UpdateDensities (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - if (i >= dispatchBuffer[3]) return; - - float4 positionA = sortedPositions[i]; - float4 fluidMaterialA = sortedFluidMaterials[i]; - - // self-contribution: - float avgKernel = Poly6(0,fluidMaterialA.x); - float restVolumeA = pow(abs(sortedPrincipalRadii[i].x * 2),3-mode); // in 2D, mode == 1 so amount of dimensions is 2. - float grad = restVolumeA * Spiky(0,fluidMaterialA.x); - - float4 fluidDataA = float4(avgKernel,0,grad,grad*grad); - float4 massCenterA = float4(positionA.xyz, 1) / positionA.w; - float4 prevMassCenterA = float4(sortedPrevPositions[i].xyz, 1) / positionA.w; - float4x4 anisotropyA = (multrnsp4(positionA, sortedPrevPositions[i]) + FLOAT4X4_IDENTITY * 0.001 * sortedPrincipalRadii[i].x * sortedPrincipalRadii[i].x) / positionA.w; - - float4 fluidMaterialB; - float4 positionB; - - // iterate over neighborhood, calculate density and gradient. - uint count = min(maxNeighbors, neighborCounts[i]); - for (uint j = 0; j < count; ++j) - { - int n = neighbors[maxNeighbors * i + j]; - - fluidMaterialB = sortedFluidMaterials[n]; - positionB = sortedPositions[n]; - float dist = length((positionA - positionB).xyz); - - float avgKernel = (Poly6(dist,fluidMaterialA.x) + Poly6(dist,fluidMaterialB.x)) * 0.5f; - - float restVolumeB = pow(abs(sortedPrincipalRadii[n].x * 2),3-mode); - float grad = restVolumeB * Spiky(dist,fluidMaterialA.x); - fluidDataA += float4(restVolumeB / restVolumeA * avgKernel,0,grad,grad*grad); - - // accumulate masses for COMs and moment matrices: - massCenterA += float4(positionB.xyz, 1) / positionB.w; - prevMassCenterA += float4(sortedPrevPositions[n].xyz, 1) / positionB.w; - anisotropyA += (multrnsp4(positionB, sortedPrevPositions[n]) + FLOAT4X4_IDENTITY * 0.001 * sortedPrincipalRadii[n].x * sortedPrincipalRadii[n].x) / positionB.w; - } - - // self particle contribution to density and gradient: - fluidDataA[3] += fluidDataA[2] * fluidDataA[2]; - - // usually, we'd weight density by mass (density contrast formulation) by dividing by invMass. Then, multiply by invMass when - // calculating the state equation (density / restDensity - 1, restDensity = mass / volume, so density * invMass * restVolume - 1 - // We end up with density / invMass * invMass * restVolume - 1, invMass cancels out. - float constraint = max(0, fluidDataA[0] * restVolumeA - 1) * fluidMaterialA.w; - - // calculate lambda: - fluidDataA[1] = -constraint / (positionA.w * fluidDataA[3] + EPSILON); - - // get total neighborhood mass: - float M = massCenterA[3]; - massCenterA /= massCenterA[3]; - prevMassCenterA /= prevMassCenterA[3]; - - // update moment: - anisotropyA -= M * multrnsp4(massCenterA, prevMassCenterA); - - // extract neighborhood orientation delta: - renderableOrientations[i] = ExtractRotation(anisotropyA, QUATERNION_IDENTITY, 5); - - sortedFluidData[i] = fluidDataA; - massCenters[i] = massCenterA; - prevMassCenters[i] = prevMassCenterA; -} - -[numthreads(128, 1, 1)] -void Apply (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - if (i >= dispatchBuffer[3]) return; - - float restVolumeA = pow(abs(sortedPrincipalRadii[i].x * 2),3-mode); - float4 fluidMaterialA = sortedFluidMaterials[i]; - float4 positionA = sortedPositions[i]; - float4 prevPositionA = sortedPrevPositions[i]; - float4 massCenterA = massCenters[i]; - float lambdaA = sortedFluidData[i][1]; - - float4 fluidMaterialB; - float4 fluidInterfaceB; - float4 massCenterB; - float4 positionB; - - float4 pressureDelta = FLOAT4_ZERO; - float4 viscVortDelta = FLOAT4_ZERO; - - uint count = min(maxNeighbors, neighborCounts[i]); - for (uint j = 0; j < count; ++j) - { - int n = neighbors[maxNeighbors * i + j]; - - fluidMaterialB = sortedFluidMaterials[n]; - massCenterB = massCenters[n]; - positionB = sortedPositions[n]; - - float4 normal = float4((positionA - positionB).xyz,0); - float dist = length(normal); - - float restVolumeB = pow(abs(sortedPrincipalRadii[n].x * 2),3-mode); - - // calculate lambda correction due to polarity (cohesion): - float cAvg = (Cohesion(dist,fluidMaterialA.x * 1.4) + Cohesion(dist,fluidMaterialB.x * 1.4)) * 0.5; - float st = 0.2 * cAvg * (1 - saturate(abs(fluidMaterialA.y - fluidMaterialB.y))) * (fluidMaterialA.y + fluidMaterialB.y) * 0.5; - float scorrA = -st / (positionA.w * sortedFluidData[i][3] + EPSILON); - float scorrB = -st / (positionB.w * sortedFluidData[n][3] + EPSILON); - - float avgGradient = (Spiky(dist,fluidMaterialA.x) + Spiky(dist,fluidMaterialB.x)) * 0.5; - pressureDelta += normal / (dist + EPSILON) * avgGradient * ((lambdaA + scorrA) * restVolumeB + (sortedFluidData[n][1] + scorrB) * restVolumeA); - - // viscosity: - float4 viscGoal = float4(massCenterB.xyz + rotate_vector(renderableOrientations[n], (prevPositionA - prevMassCenters[n]).xyz), 0); - viscVortDelta += (viscGoal - positionA) * min(fluidMaterialB.z, fluidMaterialA.z); - } - - // viscosity: - float4 viscGoal = float4(massCenterA.xyz + rotate_vector(renderableOrientations[i], (prevPositionA - prevMassCenters[i]).xyz), 0); - viscVortDelta += (viscGoal - positionA) * fluidMaterialA.z; - - AddPositionDelta(sortedToOriginal[i], pressureDelta * positionA.w + viscVortDelta / (neighborCounts[i] + 1)); -} - -[numthreads(128, 1, 1)] -void ApplyPositionDeltas (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - if (i >= dispatchBuffer[3]) return; - - int p = sortedToOriginal[i]; - ApplyPositionDelta(positions, p, 1); - - renderableOrientations[p] = FLOAT4_ZERO; - fluidData[p] = sortedFluidData[i]; -} - -[numthreads(128, 1, 1)] -void CalculateAtmosphere (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - if (i >= dispatchBuffer[3]) return; - - int originalIndex = sortedToOriginal[i]; - - float4 normal = FLOAT4_ZERO; - float4 linearVel = FLOAT4_ZERO; - - float4 curl = FLOAT4_ZERO; - float4 angularCurl = FLOAT4_ZERO; - - float4 vorticityDiff = FLOAT4_ZERO; - float4 baroclinityDiff = FLOAT4_ZERO; - float velDiff = 0; - - float restVolumeA = pow(abs(sortedPrincipalRadii[i].x * 2),3 - mode); - float4 velocityA = velocities_RO[originalIndex]; - float4 angularVelocityA = angularVelocities_RO[originalIndex]; - float4 positionA = sortedPositions[i]; - float radiiA = sortedFluidMaterials[i].x; - float4 userDataA = sortedUserData[i]; - float invDensityA = positionA.w / sortedFluidData_RO[i].x; // density contrast * mass; - - float radiiB; - float4 positionB; - float4 velocityB; - float4 angularVelocityB; - - uint count = min(maxNeighbors, neighborCounts[i]); - for (uint j = 0; j < count; ++j) - { - int n = neighbors[maxNeighbors * i + j]; - - float restVolumeB = pow(abs(sortedPrincipalRadii[n].x * 2),3 - mode); - radiiB = sortedFluidMaterials[n].x; - positionB = sortedPositions[n]; - - // Can't sort velocities as these are calculated *after* constraint projection. - // maybe a pre-sort step before velocity postprocess? - angularVelocityB = angularVelocities_RO[sortedToOriginal[n]]; - velocityB = velocities_RO[sortedToOriginal[n]]; - - float3 relVort = vorticity_RO[originalIndex].xyz - vorticity_RO[sortedToOriginal[n]].xyz; - float3 relAng = angularVelocityA.xyz - angularVelocityB.xyz; - float3 relVel = velocityA.xyz - velocityB.xyz; - float4 d = float4((positionA - positionB).xyz,0); - float dist = length(d); - - float avgGradient = (Spiky(dist,radiiA) + Spiky(dist,radiiB)) * 0.5f; - float avgKernel = (Poly6(dist,radiiA) + Poly6(dist,radiiB)) * 0.5f; - float avgNorm = (Poly6(0,radiiA) + Poly6(0,radiiB)) * 0.5; - - // property diffusion: - float diffusionSpeed = (sortedFluidInterface[i].w + sortedFluidInterface[n].w) * avgKernel * deltaTime; - float4 userDelta = (sortedUserData[n] - userDataA) * diffusionMask * diffusionSpeed; - userDataA += restVolumeB / restVolumeA * userDelta; - - // calculate color field normal: - float radius = (radiiA + radiiB) * 0.5f; - float4 normGrad = d / (dist + EPSILON); - float4 vgrad = normGrad * avgGradient; - normal += vgrad * radius * restVolumeB; - - // measure relative velocity for foam generation: - float relVelMag = length(relVel) + EPSILON; - velDiff += relVelMag * (1 - dot(relVel / relVelMag, normGrad.xyz)) * (1 - min(1,dist/(radius + EPSILON))); - - // linear vel due to angular velocity: - linearVel += float4(cross(angularVelocityB.xyz, d.xyz) * avgKernel / avgNorm,0); - - // micropolar vorticity curls: - curl += float4(cross(relVel, vgrad.xyz) / positionB.w * invDensityA,0); - angularCurl += float4(cross(relVort, vgrad.xyz) / positionB.w * invDensityA,0); - - // baroclinity and vorticity diffusion: - baroclinityDiff += float4(relAng * avgKernel / positionB.w * invDensityA, 0); - vorticityDiff += float4(relVort * avgKernel / positionB.w * invDensityA, 0); - } - - linearAccelerations[originalIndex] = angularCurl; - vorticityAccelerations[originalIndex] = curl; - linearFromAngular[originalIndex] = linearVel; - - angularDiffusion[originalIndex]._m00_m10_m20_m30 = baroclinityDiff; - angularDiffusion[originalIndex]._m01_m11_m21_m31 = vorticityDiff; - - fluidData[originalIndex].z = velDiff; - normals[originalIndex] = normal; - userData[originalIndex] = userDataA; -} - -[numthreads(128, 1, 1)] -void ApplyAtmosphere (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - if (i >= dispatchBuffer[3]) return; - - int originalIndex = sortedToOriginal[i]; - - float restVolume = pow(abs(sortedPrincipalRadii[i].x * 2),3 - mode); - - // particles near the surface should experience drag: - float4 velocityDiff = float4((velocities[originalIndex] - wind[originalIndex]).xyz,0); - velocities[originalIndex] -= sortedFluidInterface[i].x * velocityDiff * max(0, 1 - fluidData_RO[originalIndex].x * restVolume) * deltaTime; - - // external ambient pressure along normal: - velocities[originalIndex] += sortedFluidInterface[i].y * normals_RO[originalIndex] * deltaTime; - - // angular acceleration due to baroclinity: - angularVelocities[originalIndex] += float4(fluidMaterials2[originalIndex].z * cross(-normals_RO[originalIndex].xyz, -velocityDiff.xyz),0) * deltaTime; - angularVelocities[originalIndex] -= fluidMaterials2[originalIndex].w * angularDiffusion[originalIndex]._m00_m10_m20_m30; - - // micropolar vorticity: - velocities[originalIndex] += fluidMaterials2[originalIndex].x * linearAccelerations[originalIndex] * deltaTime; - vorticity[originalIndex] += fluidMaterials2[originalIndex].x * (vorticityAccelerations[originalIndex] * 0.5 - vorticity[originalIndex]) * deltaTime; - vorticity[originalIndex] -= fluidMaterials2[originalIndex].y * angularDiffusion[originalIndex]._m01_m11_m21_m31; - - linearAccelerations[originalIndex] = FLOAT4_ZERO; - vorticityAccelerations[originalIndex] = FLOAT4_ZERO; - angularDiffusion[originalIndex] = FLOAT4X4_ZERO; - - // we want to add together linear and angular velocity fields and use result to advect particles without modifying either field: - positions[originalIndex] += linearFromAngular_RO[originalIndex] * deltaTime; - prevPositions[originalIndex] += linearFromAngular_RO[originalIndex] * deltaTime; -} - -[numthreads(128, 1, 1)] -void AccumulateSmoothPositions (uint3 id : SV_DispatchThreadID) -{ - unsigned int p1 = id.x; - if (p1 >= dispatchBuffer[3]) return; - - anisotropies[p1] = FLOAT4X4_ZERO; - float4 renderablePositionA = renderablePositions[p1]; - float radiiA = sortedFluidMaterials[p1].x; - float4 avgPosition = float4(renderablePositionA.xyz, 1);//FLOAT4_ZERO; - - uint count = min(maxNeighbors, neighborCounts[p1]); - for (uint j = 0; j < count; ++j) - { - int p2 = neighbors[maxNeighbors * p1 + j]; - float4 renderablePositionB = renderablePositions[p2]; - - float dist = length((renderablePositionA - renderablePositionB).xyz); - - float avgKernel = (Poly6(dist,radiiA) + Poly6(dist,sortedFluidMaterials[p2].x)) * 0.5; - avgPosition += float4(renderablePositionB.xyz,1) * avgKernel; - } - - anisotropies[p1]._m03_m13_m23_m33 = avgPosition / avgPosition.w; -} - -[numthreads(128, 1, 1)] -void AccumulateAnisotropy (uint3 id : SV_DispatchThreadID) -{ - unsigned int p1 = id.x; - if (p1 >= dispatchBuffer[3]) return; - - float4x4 anisotropyA = anisotropies[p1]; - float4 renderablePositionA = renderablePositions[p1]; - float radiiA = sortedFluidMaterials[p1].x; - - uint count = min(maxNeighbors, neighborCounts[p1]); - for (uint j = 0; j < count; ++j) - { - int p2 = neighbors[maxNeighbors * p1 + j]; - float4 renderablePositionB = renderablePositions[p2]; - - float dist = length((renderablePositionA - renderablePositionB).xyz); - - float avgKernel = (Poly6(dist,radiiA) + Poly6(dist,sortedFluidMaterials[p2].x)) * 0.5; - - float4 r = (renderablePositionB - anisotropyA._m03_m13_m23_m33) * avgKernel; - anisotropyA += multrnsp4(r, r); - } - - anisotropies[p1] = anisotropyA; -} - -[numthreads(128, 1, 1)] -void AverageAnisotropy (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - if (i >= dispatchBuffer[3]) return; - - int o = sortedToOriginal[i]; - - if (anisotropies[i]._m00 + anisotropies[i]._m11 + anisotropies[i]._m22 > 0.01f) - { - float3 singularValues; - float3x3 u; - EigenSolve((float3x3)anisotropies[i], singularValues, u); - - float maxVal = singularValues[0]; - float3 s = max(singularValues, maxVal / maxAnisotropy) / maxVal * sortedPrincipalRadii[i].x; - - renderableOrientations[o] = q_look_at(u._m02_m12_m22,u._m01_m11_m21); - renderableRadii[o] = float4(s.xyz,1); - } - else - { - float radius = sortedPrincipalRadii[i].x / maxAnisotropy; - renderableOrientations[o] = QUATERNION_IDENTITY; - renderableRadii[o] = float4(radius,radius,radius,1); - fluidData[o].x = 1 / pow(abs(radius * 2),3-mode); // normal volume of an isolated particle. - } - - renderablePositions[o] = lerp(renderablePositions[o],anisotropies[i]._m03_m13_m23_m33,min((maxAnisotropy - 1)/3.0f,1)); - - // inactive particles have radii.w == 0, set it right away for particles killed during this frame - // to keep them from being rendered during this frame instead of waiting for the CPU to do it at the start of next sim step: - float4 radii = renderableRadii[o]; - radii.w = life[o] <= 0 ? 0: radii.w; - renderableRadii[o] = radii; -} diff --git a/Assets/Obi/Resources/Compute/DensityConstraints.compute.meta b/Assets/Obi/Resources/Compute/DensityConstraints.compute.meta deleted file mode 100644 index d170b648b..000000000 --- a/Assets/Obi/Resources/Compute/DensityConstraints.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 80856d7c741a940a7bbf0d7d4f472e1d -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 65536 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/DistanceConstraints.compute b/Assets/Obi/Resources/Compute/DistanceConstraints.compute deleted file mode 100644 index bf507f613..000000000 --- a/Assets/Obi/Resources/Compute/DistanceConstraints.compute +++ /dev/null @@ -1,69 +0,0 @@ -#pragma kernel Project -#pragma kernel Apply - -#include "MathUtils.cginc" -#include "AtomicDeltas.cginc" - -StructuredBuffer particleIndices; -StructuredBuffer restLengths; -StructuredBuffer stiffnesses; -RWStructuredBuffer lambdas; - -RWStructuredBuffer positions; -StructuredBuffer invMasses; - -// Variables set from the CPU -uint activeConstraintCount; -float deltaTime; -float sorFactor; - -[numthreads(128, 1, 1)] -void Project (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= activeConstraintCount) return; - - int p1 = particleIndices[i * 2]; - int p2 = particleIndices[i * 2 + 1]; - - float w1 = invMasses[p1]; - float w2 = invMasses[p2]; - - // calculate time adjusted compliance - float compliance = stiffnesses[i].x / (deltaTime * deltaTime); - - // calculate position and lambda deltas: - float4 dist = positions[p1] - positions[p2]; - float d = length(dist); - - // calculate constraint value: - float constraint = d - restLengths[i]; - constraint -= max(min(constraint, 0), -stiffnesses[i].y); - - // calculate lambda and position deltas: - float dlambda = (-constraint - compliance * lambdas[i]) / (w1 + w2 + compliance + EPSILON); - float4 delta = dlambda * dist / (d + EPSILON); - - lambdas[i] += dlambda; - - float4 delta1 = delta * w1; - float4 delta2 = -delta * w2; - - AddPositionDelta(p1, delta1); - AddPositionDelta(p2, delta2); -} - -[numthreads(128, 1, 1)] -void Apply (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= activeConstraintCount) return; - - int p1 = particleIndices[i * 2]; - int p2 = particleIndices[i * 2 + 1]; - - ApplyPositionDelta(positions, p1, sorFactor); - ApplyPositionDelta(positions, p2, sorFactor); -} \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/DistanceConstraints.compute.meta b/Assets/Obi/Resources/Compute/DistanceConstraints.compute.meta deleted file mode 100644 index 8d55c47ce..000000000 --- a/Assets/Obi/Resources/Compute/DistanceConstraints.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 4883886c2cc7740e18f906dcf663c1f1 -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 65536 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/DistanceFieldShape.compute b/Assets/Obi/Resources/Compute/DistanceFieldShape.compute deleted file mode 100644 index a101fb5e8..000000000 --- a/Assets/Obi/Resources/Compute/DistanceFieldShape.compute +++ /dev/null @@ -1,101 +0,0 @@ -#include "ColliderDefinitions.cginc" -#include "ContactHandling.cginc" -#include "DistanceFunctions.cginc" -#include "Simplex.cginc" -#include "Bounds.cginc" -#include "SolverParameters.cginc" -#include "Optimization.cginc" - -#pragma kernel GenerateContacts - -StructuredBuffer positions; -StructuredBuffer orientations; -StructuredBuffer principalRadii; -StructuredBuffer velocities; - -StructuredBuffer simplices; - -StructuredBuffer transforms; -StructuredBuffer shapes; - -// distance field data: -StructuredBuffer distanceFieldHeaders; -StructuredBuffer dfNodes; - -StructuredBuffer contactPairs; -StructuredBuffer contactOffsetsPerType; - -RWStructuredBuffer contacts; -RWStructuredBuffer dispatchBuffer; - -StructuredBuffer worldToSolver; - -uint maxContacts; -float deltaTime; - -[numthreads(128, 1, 1)] -void GenerateContacts (uint3 id : SV_DispatchThreadID) -{ - uint i = id.x; - - // entry #11 in the dispatch buffer is the amount of pairs for the first shape type. - if (i >= dispatchBuffer[11 + 4 * SDF_SHAPE]) return; - - int firstPair = contactOffsetsPerType[SDF_SHAPE]; - int simplexIndex = contactPairs[firstPair + i].x; - int colliderIndex = contactPairs[firstPair + i].y; - shape s = shapes[colliderIndex]; - - if (s.dataIndex < 0) return; - - DistanceField dfShape; - dfShape.colliderToSolver = worldToSolver[0].Multiply(transforms[colliderIndex]); - dfShape.s = s; - dfShape.distanceFieldHeaders = distanceFieldHeaders; - dfShape.dfNodes = dfNodes; - - int simplexSize; - int simplexStart = GetSimplexStartAndSize(simplexIndex, simplexSize); - - float4 simplexBary = BarycenterForSimplexOfSize(simplexSize); - float4 simplexPoint; - - SurfacePoint colliderPoint = Optimize(dfShape, positions, orientations, principalRadii, - simplices, simplexStart, simplexSize, simplexBary, simplexPoint, surfaceCollisionIterations, surfaceCollisionTolerance); - - float4 velocity = FLOAT4_ZERO; - float simplexRadius = 0; - for (int j = 0; j < simplexSize; ++j) - { - int particleIndex = simplices[simplexStart + j]; - simplexRadius += principalRadii[particleIndex].x * simplexBary[j]; - velocity += velocities[particleIndex] * simplexBary[j]; - } - - /*float4 rbVelocity = float4.zero; - if (rigidbodyIndex >= 0) - rbVelocity = BurstMath.GetRigidbodyVelocityAtPoint(rigidbodyIndex, colliderPoint.point, rigidbodies, solverToWorld);*/ - - //float dAB = dot(simplexPoint - colliderPoint.pos, colliderPoint.normal); - //float vel = dot(velocity /*- rbVelocity*/, colliderPoint.normal); - - //if (vel * deltaTime + dAB <= simplexRadius + s.contactOffset + collisionMargin) - { - uint count = contacts.IncrementCounter(); - if (count < maxContacts) - { - contact c = (contact)0; - - c.pointB = colliderPoint.pos; - c.normal = colliderPoint.normal * dfShape.s.isInverted(); - c.pointA = simplexBary; - c.bodyA = simplexIndex; - c.bodyB = colliderIndex; - - contacts[count] = c; - - InterlockedMax(dispatchBuffer[0],(count + 1) / 128 + 1); - InterlockedMax(dispatchBuffer[3], count + 1); - } - } -} \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/DistanceFieldShape.compute.meta b/Assets/Obi/Resources/Compute/DistanceFieldShape.compute.meta deleted file mode 100644 index 0f2a1664c..000000000 --- a/Assets/Obi/Resources/Compute/DistanceFieldShape.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 2391a8c719b4c4193a8be38dcf83e8fd -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 65536 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/DistanceFunctions.cginc b/Assets/Obi/Resources/Compute/DistanceFunctions.cginc deleted file mode 100644 index e7835bc84..000000000 --- a/Assets/Obi/Resources/Compute/DistanceFunctions.cginc +++ /dev/null @@ -1,374 +0,0 @@ -#ifndef DISTANCEFUNCTIONS_INCLUDE -#define DISTANCEFUNCTIONS_INCLUDE - -#include "SurfacePoint.cginc" -#include "Transform.cginc" -#include "Bounds.cginc" - -struct Sphere : IDistanceFunction -{ - shape s; - transform colliderToSolver; - - void Evaluate(in float4 pos, in float4 radii, in quaternion orientation, inout SurfacePoint projectedPoint) - { - float4 center = s.center * colliderToSolver.scale; - float4 pnt = colliderToSolver.InverseTransformPointUnscaled(pos) - center; - - if (s.is2D()) - pnt[2] = 0; - - float radius = s.size.x * cmax(colliderToSolver.scale.xyz); - float distanceToCenter = length(pnt); - - float4 normal = pnt / (distanceToCenter + EPSILON); - - projectedPoint.pos = colliderToSolver.TransformPointUnscaled(center + normal * (radius + s.contactOffset)); - projectedPoint.normal = colliderToSolver.TransformDirection(normal); - projectedPoint.bary = float4(1,0,0,0); - } -}; - -struct Box : IDistanceFunction -{ - shape s; - transform colliderToSolver; - - void Evaluate(in float4 pos, in float4 radii, in quaternion orientation, inout SurfacePoint projectedPoint) - { - float4 center = s.center * colliderToSolver.scale; - float4 size = s.size * colliderToSolver.scale * 0.5f; - - // clamp the point to the surface of the box: - float4 pnt = colliderToSolver.InverseTransformPointUnscaled(pos) - center; - - if (s.is2D()) - pnt[2] = 0; - - // get minimum distance for each axis: - float4 distances = size - abs(pnt); - - if (distances.x >= 0 && distances.y >= 0 && distances.z >= 0) - { - projectedPoint.normal = float4(0,0,0,0); - projectedPoint.pos = pnt; - - // find minimum distance in all three axes and the axis index: - if (distances.y < distances.x && distances.y < distances.z) - { - projectedPoint.normal[1] = sign(pnt[1]); - projectedPoint.pos[1] = size[1] * projectedPoint.normal[1]; - } - else if (distances.z < distances.x && distances.z < distances.y) - { - projectedPoint.normal[2] = sign(pnt[2]); - projectedPoint.pos[2] = size[2] * projectedPoint.normal[2]; - } - else - { - projectedPoint.normal[0] = sign(pnt[0]); - projectedPoint.pos[0] = size[0] * projectedPoint.normal[0]; - } - } - else - { - projectedPoint.pos = clamp(pnt, -size, size); - projectedPoint.normal = normalizesafe(pnt - projectedPoint.pos); - } - - projectedPoint.pos = colliderToSolver.TransformPointUnscaled(projectedPoint.pos + center + projectedPoint.normal * s.contactOffset); - projectedPoint.normal = colliderToSolver.TransformDirection(projectedPoint.normal); - projectedPoint.bary = float4(1,0,0,0); - } -}; - -struct Capsule : IDistanceFunction -{ - shape s; - transform colliderToSolver; - - void Evaluate(in float4 pos, in float4 radii, in quaternion orientation, inout SurfacePoint projectedPoint) - { - float4 center = s.center * colliderToSolver.scale; - float4 pnt = colliderToSolver.InverseTransformPointUnscaled(pos) - center; - - if (s.is2D()) - pnt[2] = 0; - - int direction = (int)s.size.z; - float height; - float radius; - float4 halfVector = float4(0,0,0,0); - - if (direction == 0) - { - radius = s.size.x * max(colliderToSolver.scale[1], colliderToSolver.scale[2]); - height = max(radius, s.size.y * 0.5f * colliderToSolver.scale[0]); - halfVector[0] = height - radius; - } - else if (direction == 1) - { - radius = s.size.x * max(colliderToSolver.scale[2], colliderToSolver.scale[0]); - height = max(radius, s.size.y * 0.5f * colliderToSolver.scale[1]); - halfVector[1] = height - radius; - } - else - { - radius = s.size.x * max(colliderToSolver.scale[0], colliderToSolver.scale[1]); - height = max(radius, s.size.y * 0.5f * colliderToSolver.scale[2]); - halfVector[2] = height - radius; - } - - float mu; - float4 centerLine = NearestPointOnEdge(-halfVector, halfVector, pnt, mu); - float4 centerToPoint = pnt - centerLine; - float distanceToCenter = length(centerToPoint); - - float4 normal = centerToPoint / (distanceToCenter + EPSILON); - - projectedPoint.pos = colliderToSolver.TransformPointUnscaled(center + centerLine + normal * (radius + s.contactOffset)); - projectedPoint.normal = colliderToSolver.TransformDirection(normal); - projectedPoint.bary = float4(1,0,0,0); - } -}; - -struct BIHNode -{ - int firstChild; /**< index of the first child node. The second one is right after the first.*/ - int start; /**< index of the first element in this node.*/ - int count; /**< amount of elements in this node.*/ - - int axis; /**< axis of the split plane (0,1,2 = x,y,z)*/ - float min_; /**< minimum split plane*/ - float max_; /**< maximum split plane*/ -}; - -struct TriangleMeshHeader -{ - int firstNode; - int nodeCount; - int firstTriangle; - int triangleCount; - int firstVertex; - int vertexCount; -}; - -struct Triangle -{ - int i1; - int i2; - int i3; - aabb b; -}; - -struct TriangleMesh : IDistanceFunction -{ - shape s; - transform colliderToSolver; - - CachedTri tri; - - void Evaluate(in float4 pos, in float4 radii, in quaternion orientation, inout SurfacePoint projectedPoint) - { - float4 pnt = colliderToSolver.InverseTransformPointUnscaled(pos); - - if (s.is2D()) - pnt[2] = 0; - - float4 bary = FLOAT4_ZERO; - float4 nearestPoint = NearestPointOnTri(tri, pnt, bary); - float4 normal = normalizesafe(pnt - nearestPoint); - - projectedPoint.pos = colliderToSolver.TransformPointUnscaled(nearestPoint + normal * s.contactOffset); - projectedPoint.normal = colliderToSolver.TransformDirection(normal); - projectedPoint.bary = float4(1,0,0,0); - } - -}; - -struct HeightFieldHeader -{ - int firstSample; - int sampleCount; -}; - -struct Heightfield : IDistanceFunction -{ - shape s; - transform colliderToSolver; - - CachedTri tri; - float4 triNormal; - - void Evaluate(in float4 pos, in float4 radii, in quaternion orientation, inout SurfacePoint projectedPoint) - { - float4 pnt = colliderToSolver.InverseTransformPoint(pos); - - float4 bary; - float4 nearestPoint = NearestPointOnTri(tri, pnt, bary); - float4 normal = normalizesafe(pnt - nearestPoint); - - // flip the contact normal if it points below ground: (doesn't work with holes) - //OneSidedNormal(triNormal, normal); - - projectedPoint.pos = colliderToSolver.TransformPoint(nearestPoint + normal * s.contactOffset); - projectedPoint.normal = colliderToSolver.TransformDirection(normal); - projectedPoint.bary = float4(1,0,0,0); - } - -}; - -struct DistanceFieldHeader -{ - int firstNode; - int nodeCount; -}; - -struct DFNode -{ - float4 distancesA; - float4 distancesB; - float4 center; - int firstChild; - - // add 12 bytes of padding to ensure correct memory alignment: - int pad0; - int pad1; - int pad2; - - float4 GetNormalizedPos(float4 position) - { - float4 corner = center - float4(center[3],center[3],center[3],center[3]); - return (position - corner) / (center[3] * 2); - } - - float4 SampleWithGradient(float4 position) - { - float4 nPos = GetNormalizedPos(position); - - // trilinear interpolation of distance: - float4 x = distancesA + (distancesB - distancesA) * nPos[0]; - float2 y = x.xy + (x.zw - x.xy) * nPos[1]; - float dist = y[0] + (y[1] - y[0]) * nPos[2]; - - // gradient estimation: - // x == 0 - float2 a = distancesA.xy + (distancesA.zw - distancesA.xy) * nPos[1]; - float x0 = a[0] + (a[1] - a[0]) * nPos[2]; - - // x == 1 - a = distancesB.xy + (distancesB.zw - distancesB.xy) * nPos[1]; - float x1 = a[0] + (a[1] - a[0]) * nPos[2]; - - // y == 0 - float y0 = x[0] + (x[1] - x[0]) * nPos[2]; - - // y == 1 - float y1 = x[2] + (x[3] - x[2]) * nPos[2]; - - return float4(x1 - x0, y1 - y0, y[1] - y[0], dist); - - } - - int GetOctant(float4 position) - { - int index = 0; - if (position[0] > center[0]) index |= 4; - if (position[1] > center[1]) index |= 2; - if (position[2] > center[2]) index |= 1; - return index; - } -}; - -struct DistanceField : IDistanceFunction -{ - shape s; - transform colliderToSolver; - - StructuredBuffer distanceFieldHeaders; - StructuredBuffer dfNodes; - - float4 DFTraverse(float4 particlePosition, - in DistanceFieldHeader header) - { - int stack[12]; - int stackTop = 0; - - stack[stackTop++] = 0; - - while (stackTop > 0) - { - // pop node index from the stack: - int nodeIndex = stack[--stackTop]; - DFNode node = dfNodes[header.firstNode + nodeIndex]; - - // if the child node exists, recurse down the df octree: - if (node.firstChild >= 0) - stack[stackTop++] = node.firstChild + node.GetOctant(particlePosition); - else - return node.SampleWithGradient(particlePosition); - } - return FLOAT4_ZERO; - } - - void Evaluate(in float4 pos, in float4 radii, in quaternion orientation, inout SurfacePoint projectedPoint) - { - float4 pnt = colliderToSolver.InverseTransformPoint(pos); - - if (s.is2D()) - pnt[2] = 0; - - float4 sample = DFTraverse(pnt, distanceFieldHeaders[s.dataIndex]); - float4 normal = float4(normalize(sample.xyz), 0); - - projectedPoint.pos = colliderToSolver.TransformPoint(pnt - normal * (sample[3] - s.contactOffset)); - projectedPoint.normal = colliderToSolver.TransformDirection(normal); - projectedPoint.bary = float4(1,0,0,0); - } -}; - -struct EdgeMeshHeader -{ - int firstNode; - int nodeCount; - int firstEdge; - int edgeCount; - int firstVertex; - int vertexCount; -}; - -struct Edge -{ - int i1; - int i2; - aabb b; -}; - -struct EdgeMesh : IDistanceFunction -{ - shape s; - transform colliderToSolver; - int dataOffset; - - CachedEdge edge; - - void Evaluate(in float4 pos, in float4 radii, in quaternion orientation, inout SurfacePoint projectedPoint) - { - float4 pnt = colliderToSolver.InverseTransformPointUnscaled(pos); - - if (s.is2D()) - pnt[2] = 0; - - float mu = 0; - float4 nearestPoint = NearestPointOnEdge(edge, pnt, mu); - float4 normal = normalizesafe(pnt - nearestPoint); - - projectedPoint.pos = colliderToSolver.TransformPointUnscaled(nearestPoint + normal * s.contactOffset); - projectedPoint.normal = colliderToSolver.TransformDirection(normal); - projectedPoint.bary = float4(1,0,0,0); - } - -}; - - -#endif \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/EdgeMeshShape.compute b/Assets/Obi/Resources/Compute/EdgeMeshShape.compute deleted file mode 100644 index da31d3464..000000000 --- a/Assets/Obi/Resources/Compute/EdgeMeshShape.compute +++ /dev/null @@ -1,147 +0,0 @@ -#include "ColliderDefinitions.cginc" -#include "ContactHandling.cginc" -#include "DistanceFunctions.cginc" -#include "Simplex.cginc" -#include "Bounds.cginc" -#include "SolverParameters.cginc" -#include "Optimization.cginc" - -#pragma kernel GenerateContacts - -StructuredBuffer positions; -StructuredBuffer orientations; -StructuredBuffer principalRadii; -StructuredBuffer velocities; - -StructuredBuffer simplices; -StructuredBuffer simplexBounds; // bounding box of each simplex. - -StructuredBuffer transforms; -StructuredBuffer shapes; - -// edge mesh data: -StructuredBuffer edgeMeshHeaders; -StructuredBuffer edgeBihNodes; -StructuredBuffer edges; -StructuredBuffer edgeVertices; - -StructuredBuffer contactPairs; -StructuredBuffer contactOffsetsPerType; - -RWStructuredBuffer contacts; -RWStructuredBuffer dispatchBuffer; - -StructuredBuffer worldToSolver; - -uint maxContacts; -float deltaTime; - -[numthreads(128, 1, 1)] -void GenerateContacts (uint3 id : SV_DispatchThreadID) -{ - uint i = id.x; - - // entry #11 in the dispatch buffer is the amount of pairs for the first shape type. - if (i >= dispatchBuffer[11 + 4 * EDGE_MESH_SHAPE]) return; - - int firstPair = contactOffsetsPerType[EDGE_MESH_SHAPE]; - int simplexIndex = contactPairs[firstPair + i].x; - int colliderIndex = contactPairs[firstPair + i].y; - shape s = shapes[colliderIndex]; - - if (s.dataIndex < 0) return; - - EdgeMeshHeader header = edgeMeshHeaders[s.dataIndex]; - - EdgeMesh meshShape; - meshShape.colliderToSolver = worldToSolver[0].Multiply(transforms[colliderIndex]); - meshShape.s = s; - - // invert a full matrix here to accurately represent collider bounds scale. - float4x4 solverToCollider = Inverse(TRS(meshShape.colliderToSolver.translation.xyz, meshShape.colliderToSolver.rotation, meshShape.colliderToSolver.scale.xyz)); - aabb simplexBound = simplexBounds[simplexIndex].Transformed(solverToCollider); - - float4 marginCS = float4((s.contactOffset + collisionMargin) / meshShape.colliderToSolver.scale.xyz, 0); - - int simplexSize; - int simplexStart = GetSimplexStartAndSize(simplexIndex, simplexSize); - - int stack[12]; - int stackTop = 0; - - stack[stackTop++] = 0; - - while (stackTop > 0) - { - // pop node index from the stack: - int nodeIndex = stack[--stackTop]; - BIHNode node = edgeBihNodes[header.firstNode + nodeIndex]; - - // leaf node: - if (node.firstChild < 0) - { - // check for contact against all triangles: - for (int dataOffset = node.start; dataOffset < node.start + node.count; ++dataOffset) - { - Edge t = edges[header.firstEdge + dataOffset]; - float4 v1 = float4(edgeVertices[header.firstVertex + t.i1],0,0) + s.center; - float4 v2 = float4(edgeVertices[header.firstVertex + t.i2],0,0) + s.center; - aabb edgeBounds; - edgeBounds.FromEdge(v1, v2, marginCS); - - if (edgeBounds.IntersectsAabb(simplexBound, s.is2D())) - { - float4 simplexBary = BarycenterForSimplexOfSize(simplexSize); - float4 simplexPoint; - - meshShape.edge.Cache(v1 * meshShape.colliderToSolver.scale, v2 * meshShape.colliderToSolver.scale); - - SurfacePoint surfacePoint = Optimize(meshShape, positions, orientations, principalRadii, - simplices, simplexStart, simplexSize, simplexBary, simplexPoint, surfaceCollisionIterations, surfaceCollisionTolerance); - - float4 velocity = FLOAT4_ZERO; - float simplexRadius = 0; - for (int j = 0; j < simplexSize; ++j) - { - int particleIndex = simplices[simplexStart + j]; - simplexRadius += principalRadii[particleIndex].x * simplexBary[j]; - velocity += velocities[particleIndex] * simplexBary[j]; - } - - float dAB = dot(simplexPoint - surfacePoint.pos, surfacePoint.normal); - float vel = dot(velocity, surfacePoint.normal); - - if (vel * deltaTime + dAB <= simplexRadius + s.contactOffset + collisionMargin) - { - uint count = contacts.IncrementCounter(); - if (count < maxContacts) - { - contact c = (contact)0; - - c.pointB = surfacePoint.pos; - c.normal = surfacePoint.normal * meshShape.s.isInverted(); - c.pointA = simplexBary; - c.bodyA = simplexIndex; - c.bodyB = colliderIndex; - - contacts[count] = c; - - InterlockedMax(dispatchBuffer[0],(count + 1) / 128 + 1); - InterlockedMax(dispatchBuffer[3], count + 1); - } - } - } - } - } - else // check min and/or max children: - { - // visit min node: - if (simplexBound.min_[node.axis] <= node.min_) - stack[stackTop++] = node.firstChild; - - // visit max node: - if (simplexBound.max_[node.axis] >= node.max_) - stack[stackTop++] = node.firstChild + 1; - } - } -} \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/EdgeMeshShape.compute.meta b/Assets/Obi/Resources/Compute/EdgeMeshShape.compute.meta deleted file mode 100644 index 3f9c16b5b..000000000 --- a/Assets/Obi/Resources/Compute/EdgeMeshShape.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 229868ae412914f11bbfa8c3ab9474c8 -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 65536 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/FluidChunkDefs.cginc b/Assets/Obi/Resources/Compute/FluidChunkDefs.cginc deleted file mode 100644 index 24d1528e7..000000000 --- a/Assets/Obi/Resources/Compute/FluidChunkDefs.cginc +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef FLUIDCHUNKDEFS_INCLUDE -#define FLUIDCHUNKDEFS_INCLUDE - -#define chunkResolution 4u // amount of voxels in width/height/depth - -struct keyvalue -{ - uint key; - uint handle; -}; - -uint3 chunkGridResolution; // height/width/depth of chunk grid -float3 chunkGridOrigin; -float voxelSize; - -uint maxChunks; - -uint VoxelID(uint3 coords) -{ - return coords.x + coords.y * chunkGridResolution.x + coords.z * chunkGridResolution.x * chunkGridResolution.y; -} - -uint hash(uint k) -{ - k ^= k >> 16; - k *= 0x85ebca6b; - k ^= k >> 13; - k *= 0xc2b2ae35; - k ^= k >> 16; - return k % maxChunks; -} - -#endif \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/FluidChunkDefs.cginc.meta b/Assets/Obi/Resources/Compute/FluidChunkDefs.cginc.meta deleted file mode 100644 index 2f088fd35..000000000 --- a/Assets/Obi/Resources/Compute/FluidChunkDefs.cginc.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: bc0e240276e8a42a2ac5a11368e4f7fa -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/FluidFoam.compute b/Assets/Obi/Resources/Compute/FluidFoam.compute deleted file mode 100644 index c81a59b3f..000000000 --- a/Assets/Obi/Resources/Compute/FluidFoam.compute +++ /dev/null @@ -1,482 +0,0 @@ -#pragma kernel SortFluidData - -#pragma kernel Emit -#pragma kernel EmitShape -#pragma kernel CopyAliveCount -#pragma kernel Update -#pragma kernel Integrate -#pragma kernel Copy - -#pragma kernel Sort -#pragma kernel ClearMesh -#pragma kernel BuildMesh - -#include "InterlockedUtils.cginc" -#include "MathUtils.cginc" -#include "GridUtils.cginc" -#include "Simplex.cginc" -#include "Bounds.cginc" -#include "SolverParameters.cginc" -#include "FluidKernels.cginc" - -StructuredBuffer sortedToOriginal; -RWStructuredBuffer sortedPositions; -RWStructuredBuffer sortedVelocities; -RWStructuredBuffer sortedAngularVelocities; -RWStructuredBuffer sortedOrientations; -RWStructuredBuffer sortedRadii; - -StructuredBuffer cellOffsets; // start of each cell in the sorted item array. -StructuredBuffer cellCounts; // number of item in each cell. -StructuredBuffer gridHashToSortedIndex; -StructuredBuffer solverBounds; - -StructuredBuffer fluidSimplices; -StructuredBuffer activeParticles; -StructuredBuffer positions; -StructuredBuffer orientations; -StructuredBuffer velocities; -RWStructuredBuffer angularVelocities; -StructuredBuffer principalRadii; -StructuredBuffer fluidMaterial; -StructuredBuffer fluidData; - -StructuredBuffer inputPositions; // w component is distance traveled inside volume (approximate volumetric lighting). -StructuredBuffer inputVelocities; // w component is buoyancy -StructuredBuffer inputColors; // rgba diffuse color -StructuredBuffer inputAttributes; // currentlifetime, maxlifetime, size, drag - -RWStructuredBuffer outputPositions; -RWStructuredBuffer outputVelocities; -RWStructuredBuffer outputColors; -RWStructuredBuffer outputAttributes; - -RWStructuredBuffer dispatch; -RWByteAddressBuffer vertices; -RWByteAddressBuffer indices; - -// Variables set from the CPU -uint activeParticleCount; -uint maxFoamParticles; -uint particlesToEmit; - -uint emitterShape; -float4 emitterPosition; -quaternion emitterRotation; -float4 emitterSize; - -uint minFluidNeighbors; -float2 vorticityRange; -float2 velocityRange; -float foamGenerationRate; -float potentialIncrease; -float potentialDiffusion; - -float advectionRadius; -float lifetime; -float lifetimeRandom; -float particleSize; -float buoyancy; -float drag; -float airDrag; -float sizeRandom; -float isosurface; -float airAging; -float3 agingOverPopulation; -float4 foamColor; -float4 sortAxis; - -const uint groupWidth; -const uint groupHeight; -const uint stepIndex; - -float deltaTime; -float randomSeed; - -static const int4 quadrantOffsets[] = -{ - int4(0, 0, 0, 1), - int4(1, 0, 0, 1), - int4(0, 1, 0, 1), - int4(1, 1, 0, 1), - int4(0, 0, 1, 1), - int4(1, 0, 1, 1), - int4(0, 1, 1, 1), - int4(1, 1, 1, 1) -}; - -void RandomInCylinder(float seed, float4 pos, float4 dir, float len, float radius, out float4 position, out float3 velocity) -{ - float3 rand = hash31(seed); - - float3 b1 = dir.xyz; - float3 b2 = normalizesafe(cross(b1, float3(1,0,0))); - float3 b3 = cross(b2, b1); - - float theta = rand.y * 2 * PI; - float2 disc = radius * sqrt(rand.x) * float2(cos(theta),sin(theta)); - - velocity = b2 * disc.x + b3 * disc.y; - position = float4(pos.xyz + b1 * len * rand.z + velocity,0); -} - -void RandomInBox(float seed, float4 center, float4 size, out float4 position, out float3 velocity) -{ - float3 rand = hash31(seed); - velocity = (rand - float3(0.5,0.5,0.5)) * size.xyz; - position = float4(center.xyz + velocity,0); -} - -[numthreads(128, 1, 1)] -void SortFluidData (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - if (i >= dispatch[3]) return; - - int original = sortedToOriginal[i]; - sortedPositions[i] = positions[original]; - sortedVelocities[i] = velocities[original]; - sortedAngularVelocities[i] = float4(angularVelocities[original].xyz,0); - sortedOrientations[i] = orientations[original]; - sortedRadii[i] = principalRadii[original]; -} - -[numthreads(128, 1, 1)] -void EmitShape (uint3 id : SV_DispatchThreadID) -{ - uint i = id.x; - if (i >= particlesToEmit) return; - - // atomically increment alive particle counter: - uint count; - InterlockedAdd(dispatch[3], 1, count); - - if (count < maxFoamParticles) - { - // initialize foam particle in a random position inside the cylinder spawned by fluid particle: - float3 radialVelocity = float3(0,0,0); - - if (emitterShape == 0) - RandomInCylinder(randomSeed + i, -float4(0,1,0,0)*emitterSize.y*0.5, float4(0,1,0,0), emitterSize.y, max(emitterSize.x, emitterSize.z) * 0.5, outputPositions[count], radialVelocity); - else - RandomInBox(randomSeed + i, FLOAT4_ZERO, emitterSize, outputPositions[count], radialVelocity); - - float2 random = hash21(randomSeed - i); - - // calculate initial life/size/color: - float initialLife = max(0, lifetime - lifetime * random.x * lifetimeRandom); - float initialSize = particleSize - particleSize * random.y * sizeRandom; - - outputPositions[count] = float4(emitterPosition.xyz + rotate_vector(emitterRotation, outputPositions[count].xyz),0); - outputVelocities[count] = float4(0,0,0, buoyancy); - outputColors[count] = foamColor; - outputAttributes[count] = float4(1, 1/initialLife,initialSize,PackFloatRGBA(float4(airAging / 50.0, airDrag, drag, isosurface))); - } -} - -[numthreads(128, 1, 1)] -void Emit (uint3 id : SV_DispatchThreadID) -{ - uint i = id.x; - if (i >= activeParticleCount) return; - - int p = activeParticles[i]; - - float4 angVel = angularVelocities[p]; - float2 potential = UnpackFloatRG(angVel.w); - - // calculate fluid potential for foam generation: - float vorticityPotential = Remap01(fluidData[p].z, vorticityRange.x, vorticityRange.y); - float velocityPotential = Remap01(length(velocities[p]), velocityRange.x, velocityRange.y); - float potentialDelta = velocityPotential * vorticityPotential * deltaTime * potentialIncrease; - - // update foam potential: - potential.y = saturate(potential.y * potentialDiffusion + potentialDelta); - - // calculate amount of emitted particles - potential.x += foamGenerationRate * potential.y * deltaTime; - int emitCount = (int)potential.x; - potential.x -= emitCount; - - for (int j = 0; j < emitCount; ++j) - { - // atomically increment alive particle counter: - uint count; - InterlockedAdd(dispatch[3], 1, count); - - if (count < maxFoamParticles) - { - // initialize foam particle in a random position inside the cylinder spawned by fluid particle: - float3 radialVelocity; - RandomInCylinder(randomSeed + p + j, positions[p], normalizesafe(velocities[p]), length(velocities[p]) * deltaTime, principalRadii[p].x, outputPositions[count], radialVelocity); - - // calculate initial life/size/color: - float2 random = hash21(randomSeed - p - j); - float initialLife = max(0, potential.y * (lifetime - lifetime * random.x * lifetimeRandom)); - float initialSize = particleSize - particleSize * random.y * sizeRandom; - - outputVelocities[count] = velocities[p] + float4(radialVelocity, buoyancy); - outputColors[count] = foamColor; - outputAttributes[count] = float4(1, 1/initialLife,initialSize,PackFloatRGBA(float4(airAging / 50.0, airDrag, drag, isosurface))); - } - } - - angVel.w = PackFloatRG(potential); - angularVelocities[p] = angVel; -} - -[numthreads(1, 1, 1)] -void CopyAliveCount (uint3 id : SV_DispatchThreadID) -{ - dispatch[0] = dispatch[3] / 128 + 1; - dispatch[8] = dispatch[3]; - dispatch[4] = dispatch[7] = 0; -} - -[numthreads(128, 1, 1)] -void Update (uint3 id : SV_DispatchThreadID) -{ - uint i = id.x; - if (i >= dispatch[8]) return; - - uint count; - InterlockedAdd(dispatch[3], -1, count); - count--; - - if (count < maxFoamParticles && inputAttributes[count].x > 0) - { - uint aliveCount; - InterlockedAdd(dispatch[7], 1, aliveCount); - InterlockedMax(dispatch[4],(aliveCount + 1) / 128 + 1); - - float4 attributes = inputAttributes[count]; - float4 packedData = UnpackFloatRGBA(attributes.w); - - int offsetCount = (mode == 1) ? 4 : 8; - float4 advectedVelocity = FLOAT4_ZERO; - float4 advectedAngVelocity = FLOAT4_ZERO; - float kernelSum = -packedData.w; - uint neighbourCount = 0; - - float4 diffusePos = inputPositions[count]; - - for (uint m = 1; m <= levelPopulation[0]; ++m) - { - uint l = levelPopulation[m]; - float radius = CellSizeOfLevel(l); - float interactionDist = radius * 0.5; - - float4 cellCoords = floor((diffusePos - solverBounds[0].min_) / radius); - - cellCoords[3] = 0; - if (mode == 1) - cellCoords[2] = 0; - - float4 posInCell = diffusePos - (solverBounds[0].min_ + cellCoords * radius + float4(interactionDist,interactionDist,interactionDist,0)); - int4 quadrant = (int4)sign(posInCell); - quadrant[3] = l; - - for (int j = 0; j < offsetCount; ++j) - { - int4 neighborCoord = (int4)cellCoords + quadrantOffsets[j] * quadrant; - int cellIndex = gridHashToSortedIndex[GridHash(neighborCoord)]; - uint n = cellOffsets[cellIndex]; - uint end = n + cellCounts[cellIndex]; - - for (;n < end; ++n) - { - uint p = fluidSimplices[n]; - - int4 particleCoord = int4(floor((positions[p].xyz - solverBounds[0].min_.xyz)/ radius).xyz,l); - if (any (particleCoord - neighborCoord)) - continue; - - float4 normal = diffusePos - positions[p]; - normal[3] = 0; - if (mode == 1) - normal[2] = 0; - - float d = length(normal); - if (d <= interactionDist) - { - float3 radii = fluidMaterial[p].x * (principalRadii[p].xyz / principalRadii[p].x); - - float4 angVel = float4(cross(angularVelocities[p].xyz, normal.xyz),0); - advectedAngVelocity += angVel * Poly6(d, radii.x) / Poly6(0, radii.x); - - normal.xyz = rotate_vector(q_conj(orientations[p]), normal.xyz) / radii; - d = length(normal.xyz) * radii.x; - - // scale by volume (* 1 / normalized density) - float w = Poly6(d, radii.x) / fluidData[p].x; - - kernelSum += w; - advectedVelocity += float4(velocities[p].xyz,0) * w; - neighbourCount++; - } - } - } - } - - float4 forces = FLOAT4_ZERO; - float velocityScale = 1; - float agingScale = 1 + Remap01(dispatch[8] / (float)maxFoamParticles,agingOverPopulation.x,agingOverPopulation.y) * (agingOverPopulation.z - 1); - - // foam/bubble particle: - if (kernelSum > EPSILON && neighbourCount >= minFluidNeighbors) - { - // advection: - forces = packedData.z / deltaTime * (advectedVelocity / (kernelSum + packedData.w) + advectedAngVelocity - inputVelocities[count]); - - // buoyancy: - forces -= float4(gravity,0) * inputVelocities[count].w * saturate(kernelSum); // TODO: larger particles should rise faster. - - } - else // spray: - { - // gravity: - forces += float4(gravity,0); - - // atmospheric drag/aging: - velocityScale = packedData.y; - agingScale *= packedData.x * 50; - } - - // don't change 4th component, as its used to store buoyancy control parameter. - forces[3] = 0; - - // update particle data: - attributes.x -= attributes.y * deltaTime * agingScale; - //attributes.z += (attributes.y * deltaTime * agingScale) * 0.02; // increase size with age. TODO: maybe do in render shader? - outputAttributes[aliveCount] = attributes; - outputColors[aliveCount] = inputColors[count]; - - // add forces to velocity: - outputPositions[aliveCount] = inputPositions[count]; - outputVelocities[aliveCount] = (inputVelocities[count] + forces * deltaTime) * velocityScale; - } -} - -[numthreads(128, 1, 1)] -void Integrate (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - if (i >= dispatch[3]) return; - - outputPositions[i].xyz += outputVelocities[i].xyz * deltaTime; -} - -[numthreads(128, 1, 1)] -void Copy (uint3 id : SV_DispatchThreadID) -{ - uint i = id.x; - - if (i == 0) - { - dispatch[0] = dispatch[4]; - dispatch[3] = dispatch[7]; - } - - if (i >= dispatch[7]) return; - - outputPositions[i] = inputPositions[i]; - outputVelocities[i] = inputVelocities[i]; - outputColors[i] = inputColors[i]; - outputAttributes[i] = inputAttributes[i]; -} - -[numthreads(128,1,1)] -void Sort(uint3 id : SV_DispatchThreadID) -{ - uint i = id.x; - - uint hIndex = i & (groupWidth - 1); - uint indexLeft = hIndex + (groupHeight + 1) * (i / groupWidth); - uint rightStepSize = stepIndex == 0 ? groupHeight - 2 * hIndex : (groupHeight + 1) / 2; - uint indexRight = indexLeft + rightStepSize; - - // Exit if out of bounds - if (indexRight >= dispatch[3]) return; - - float4 posLeft = outputPositions[indexLeft]; - float4 posRight = outputPositions[indexRight]; - float4 velLeft = outputVelocities[indexLeft]; - float4 velRight = outputVelocities[indexRight]; - float4 colorLeft = outputColors[indexLeft]; - float4 colorRight = outputColors[indexRight]; - float4 attrLeft = outputAttributes[indexLeft]; - float4 attrRight = outputAttributes[indexRight]; - - // calculate distance to camera: - float distLeft = dot(posLeft.xyz, sortAxis.xyz); - float distRight = dot(posRight.xyz, sortAxis.xyz); - - // Swap entries if order is incorrect - if (distLeft < distRight) - { - outputPositions[indexLeft] = posRight; - outputPositions[indexRight] = posLeft; - outputVelocities[indexLeft] = velRight; - outputVelocities[indexRight] = velLeft; - outputColors[indexLeft] = colorRight; - outputColors[indexRight] = colorLeft; - outputAttributes[indexLeft] = attrRight; - outputAttributes[indexRight] = attrLeft; - } -} - -[numthreads(128, 1, 1)] -void ClearMesh (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - if (i >= maxFoamParticles) return; - - indices.Store((i*6)<<2, 0); - indices.Store((i*6+1)<<2, 0); - indices.Store((i*6+2)<<2, 0); - - indices.Store((i*6+3)<<2, 0); - indices.Store((i*6+4)<<2, 0); - indices.Store((i*6+5)<<2, 0); -} - -[numthreads(128, 1, 1)] -void BuildMesh (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - if (i >= dispatch[3]) return; - - // <<2 = multiply by 4 to get byte address, since a float/int is 4 bytes in size. - - // particle data is the same for all 4 vertices: - for (uint v = i*4; v < i*4 + 4; ++v) - { - int base = v*19; - - // pos - vertices.Store4(base<<2, asuint(float4(inputPositions[i].xyz, 1))); - - // color: - vertices.Store4((base+7)<<2, asuint( inputColors[i] )); - - // velocity and attributes - vertices.Store4((base+11)<<2, asuint( float4(inputVelocities[i].xyz, inputPositions[i].w))); - vertices.Store4((base+15)<<2, asuint( inputAttributes[i] )); - } - - //different offset for each vertex: - int base = i*4; - vertices.Store3((base*19 + 4)<<2, asuint(float3(1,1,0))); - vertices.Store3(((base+1)*19 + 4)<<2, asuint(float3(-1,1,0))); - vertices.Store3(((base+2)*19 + 4)<<2, asuint(float3(-1,-1,0))); - vertices.Store3(((base+3)*19 + 4)<<2, asuint(float3(1,-1,0))); - - // indices: - indices.Store((i*6)<<2, asuint(i*4+2)); - indices.Store((i*6+1)<<2, asuint(i*4+1)); - indices.Store((i*6+2)<<2, asuint(i*4)); - - indices.Store((i*6+3)<<2, asuint(i*4+3)); - indices.Store((i*6+4)<<2, asuint(i*4+2)); - indices.Store((i*6+5)<<2, asuint(i*4)); -} diff --git a/Assets/Obi/Resources/Compute/FluidFoam.compute.meta b/Assets/Obi/Resources/Compute/FluidFoam.compute.meta deleted file mode 100644 index 2fcb5eafe..000000000 --- a/Assets/Obi/Resources/Compute/FluidFoam.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: a8c6735ba651f4c808f068c3b99bca04 -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 65536 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/FluidFoamCollisions.compute b/Assets/Obi/Resources/Compute/FluidFoamCollisions.compute deleted file mode 100644 index b41a5773c..000000000 --- a/Assets/Obi/Resources/Compute/FluidFoamCollisions.compute +++ /dev/null @@ -1,467 +0,0 @@ -#pragma kernel SolveDiffuseContacts - -#include "GridUtils.cginc" -#include "CollisionMaterial.cginc" -#include "ContactHandling.cginc" -#include "ColliderDefinitions.cginc" -#include "Rigidbody.cginc" -#include "Simplex.cginc" -#include "MathUtils.cginc" -#include "Bounds.cginc" -#include "SolverParameters.cginc" -#include "Optimization.cginc" -#include "DistanceFunctions.cginc" - -#define MAX_CONTACTS_PER_DIFFUSE 32 - -StructuredBuffer inputPositions; -StructuredBuffer inputAttributes; -RWStructuredBuffer inputVelocities; - -StructuredBuffer aabbs; -StructuredBuffer transforms; -StructuredBuffer shapes; - -StructuredBuffer sortedColliderIndices; -StructuredBuffer cellOffsets; -StructuredBuffer cellCounts; - -// triangle mesh data: -StructuredBuffer triangleMeshHeaders; -StructuredBuffer bihNodes; -StructuredBuffer triangles; -StructuredBuffer vertices; - -// edge mesh data: -StructuredBuffer edgeMeshHeaders; -StructuredBuffer edgeBihNodes; -StructuredBuffer edges; -StructuredBuffer edgeVertices; - -// heightfield data: -StructuredBuffer heightFieldHeaders; -StructuredBuffer heightFieldSamples; - -// distance field data: -StructuredBuffer distanceFieldHeaders; -StructuredBuffer dfNodes; - -StructuredBuffer solverToWorld; -StructuredBuffer worldToSolver; - -StructuredBuffer dispatch; - -float radiusScale; -uint colliderCount; // amount of colliders in the grid. -uint cellsPerCollider; // max amount of cells a collider can be inserted into. Typically this is 8. -int shapeTypeCount; // number of different collider shapes, ie: box, sphere, sdf, etc. -float deltaTime; - - -void CollideMesh(int colliderIndex, int threadIndex, aabb particleBounds, inout float4 pos, float radius) -{ - shape s = shapes[colliderIndex]; - if (s.dataIndex < 0) return; - - TriangleMeshHeader header = triangleMeshHeaders[s.dataIndex]; - - TriangleMesh meshShape; - meshShape.colliderToSolver = worldToSolver[0].Multiply(transforms[colliderIndex]); - meshShape.s = shapes[colliderIndex]; - - // invert a full matrix here to accurately represent collider bounds scale. - float4x4 solverToCollider = Inverse(TRS(meshShape.colliderToSolver.translation.xyz, meshShape.colliderToSolver.rotation, meshShape.colliderToSolver.scale.xyz)); - aabb simplexBound = particleBounds.Transformed(solverToCollider); // TODO: this is wrong, passed bounds are in world space! - - float4 marginCS = float4((s.contactOffset + collisionMargin) / meshShape.colliderToSolver.scale.xyz, 0); - - int stack[12]; - int stackTop = 0; - - stack[stackTop++] = 0; - - while (stackTop > 0) - { - // pop node index from the stack: - int nodeIndex = stack[--stackTop]; - BIHNode node = bihNodes[header.firstNode + nodeIndex]; - - // leaf node: - if (node.firstChild < 0) - { - // check for contact against all triangles: - for (int dataOffset = node.start; dataOffset < node.start + node.count; ++dataOffset) - { - Triangle t = triangles[header.firstTriangle + dataOffset]; - float4 v1 = float4(vertices[header.firstVertex + t.i1], 0); - float4 v2 = float4(vertices[header.firstVertex + t.i2], 0); - float4 v3 = float4(vertices[header.firstVertex + t.i3], 0); - aabb triangleBounds; - triangleBounds.FromTriangle(v1, v2, v3, marginCS); - - if (triangleBounds.IntersectsAabb(simplexBound, s.is2D())) - { - meshShape.tri.Cache(v1 * meshShape.colliderToSolver.scale, v2 * meshShape.colliderToSolver.scale, v3 * meshShape.colliderToSolver.scale); - - SurfacePoint surf; - meshShape.Evaluate(pos, float4(radius, radius, radius, 0), QUATERNION_IDENTITY, surf); - - float dist = dot(pos - surf.pos, surf.normal) - radius; - if (dist < 0) - pos = surf.pos + surf.normal * radius; - } - } - } - else // check min and/or max children: - { - // visit min node: - if (simplexBound.min_[node.axis] <= node.min_) - stack[stackTop++] = node.firstChild; - - // visit max node: - if (simplexBound.max_[node.axis] >= node.max_) - stack[stackTop++] = node.firstChild + 1; - } - } -} - -void CollideEdgeMesh(int colliderIndex, int threadIndex, aabb particleBounds, inout float4 pos, float radius) -{ - shape s = shapes[colliderIndex]; - if (s.dataIndex < 0) return; - - EdgeMeshHeader header = edgeMeshHeaders[s.dataIndex]; - - EdgeMesh meshShape; - meshShape.colliderToSolver = worldToSolver[0].Multiply(transforms[colliderIndex]); - meshShape.s = shapes[colliderIndex]; - - // invert a full matrix here to accurately represent collider bounds scale. - float4x4 solverToCollider = Inverse(TRS(meshShape.colliderToSolver.translation.xyz, meshShape.colliderToSolver.rotation, meshShape.colliderToSolver.scale.xyz)); - aabb simplexBound = particleBounds.Transformed(solverToCollider); // TODO: this is wrong, passed bounds are in world space! - //simplexBound.Expand(0.02); - - float4 marginCS = float4((s.contactOffset + collisionMargin) / meshShape.colliderToSolver.scale.xyz, 0); - - int stack[12]; - int stackTop = 0; - - stack[stackTop++] = 0; - - while (stackTop > 0) - { - // pop node index from the stack: - int nodeIndex = stack[--stackTop]; - BIHNode node = edgeBihNodes[header.firstNode + nodeIndex]; - - // leaf node: - if (node.firstChild < 0) - { - // check for contact against all triangles: - for (int dataOffset = node.start; dataOffset < node.start + node.count; ++dataOffset) - { - Edge t = edges[header.firstEdge + dataOffset]; - float4 v1 = float4(edgeVertices[header.firstVertex + t.i1],0,0) + s.center; - float4 v2 = float4(edgeVertices[header.firstVertex + t.i2],0,0) + s.center; - aabb edgeBounds; - edgeBounds.FromEdge(v1, v2, marginCS); - - if (edgeBounds.IntersectsAabb(simplexBound, s.is2D())) - { - meshShape.edge.Cache(v1 * meshShape.colliderToSolver.scale, v2 * meshShape.colliderToSolver.scale); - - SurfacePoint surf; - meshShape.Evaluate(pos, float4(radius, radius, radius, 0), QUATERNION_IDENTITY, surf); - - float dist = dot(pos - surf.pos, surf.normal) - radius; - if (dist < 0) - pos = surf.pos + surf.normal * radius; - } - } - } - else // check min and/or max children: - { - // visit min node: - if (simplexBound.min_[node.axis] <= node.min_) - stack[stackTop++] = node.firstChild; - - // visit max node: - if (simplexBound.max_[node.axis] >= node.max_) - stack[stackTop++] = node.firstChild + 1; - } - } -} - -void CollideHeightmap(int colliderIndex, int threadIndex, aabb particleBounds, inout float4 pos, float radius) -{ - shape s = shapes[colliderIndex]; - if (s.dataIndex < 0) return; - - HeightFieldHeader header = heightFieldHeaders[s.dataIndex]; - - Heightfield fieldShape; - fieldShape.colliderToSolver = worldToSolver[0].Multiply(transforms[colliderIndex]); - fieldShape.s = s; - - // invert a full matrix here to accurately represent collider bounds scale. - float4x4 solverToCollider = Inverse(TRS(fieldShape.colliderToSolver.translation.xyz, fieldShape.colliderToSolver.rotation, fieldShape.colliderToSolver.scale.xyz)); - aabb simplexBound = particleBounds.Transformed(solverToCollider); - - int resolutionU = (int)s.center.x; - int resolutionV = (int)s.center.y; - - // calculate terrain cell size: - float cellWidth = s.size.x / (resolutionU - 1); - float cellHeight = s.size.z / (resolutionV - 1); - - // calculate particle bounds min/max cells: - int2 min_ = int2((int)floor(simplexBound.min_[0] / cellWidth), (int)floor(simplexBound.min_[2] / cellHeight)); - int2 max_ = int2((int)floor(simplexBound.max_[0] / cellWidth), (int)floor(simplexBound.max_[2] / cellHeight)); - - for (int su = min_[0]; su <= max_[0]; ++su) - { - if (su >= 0 && su < resolutionU - 1) - { - for (int sv = min_[1]; sv <= max_[1]; ++sv) - { - if (sv >= 0 && sv < resolutionV - 1) - { - // calculate neighbor sample indices: - int csu1 = clamp(su + 1, 0, resolutionU - 1); - int csv1 = clamp(sv + 1, 0, resolutionV - 1); - - // sample heights: - float h1 = heightFieldSamples[header.firstSample + sv * resolutionU + su] * s.size.y; - float h2 = heightFieldSamples[header.firstSample + sv * resolutionU + csu1] * s.size.y; - float h3 = heightFieldSamples[header.firstSample + csv1 * resolutionU + su] * s.size.y; - float h4 = heightFieldSamples[header.firstSample + csv1 * resolutionU + csu1] * s.size.y; - - if (h1 < 0) continue; - h1 = abs(h1); - h2 = abs(h2); - h3 = abs(h3); - h4 = abs(h4); - - float min_x = su * s.size.x / (resolutionU - 1); - float max_x = csu1 * s.size.x / (resolutionU - 1); - float min_z = sv * s.size.z / (resolutionV - 1); - float max_z = csv1 * s.size.z / (resolutionV - 1); - - // ------contact against the first triangle------: - float4 v1 = float4(min_x, h3, max_z, 0); - float4 v2 = float4(max_x, h4, max_z, 0); - float4 v3 = float4(min_x, h1, min_z, 0); - - fieldShape.tri.Cache(v1, v2, v3); - fieldShape.triNormal.xyz = normalizesafe(cross((v2 - v1).xyz, (v3 - v1).xyz)); - - SurfacePoint surf; - fieldShape.Evaluate(pos, float4(radius, radius, radius, 0), QUATERNION_IDENTITY, surf); - - float dist = dot(pos - surf.pos, surf.normal) - radius; - if (dist < 0) - pos = surf.pos + surf.normal * radius; - - // ------contact against the second triangle------: - v1 = float4(min_x, h1, min_z, 0); - v2 = float4(max_x, h4, max_z, 0); - v3 = float4(max_x, h2, min_z, 0); - - fieldShape.tri.Cache(v1, v2, v3); - fieldShape.triNormal.xyz = normalizesafe(cross((v2 - v1).xyz, (v3 - v1).xyz)); - - fieldShape.Evaluate(pos, float4(radius, radius, radius, 0), QUATERNION_IDENTITY, surf); - - dist = dot(pos - surf.pos, surf.normal) - radius; - if (dist < 0) - pos = surf.pos + surf.normal * radius; - } - } - } - } -} - -[numthreads(128, 1, 1)] -void SolveDiffuseContacts (uint3 id : SV_DispatchThreadID) -{ - unsigned int threadIndex = id.x; - if (threadIndex >= dispatch[3]) return; - - uint cellCount = colliderCount * cellsPerCollider; - int candidateCount = 0; - uint candidates[MAX_CONTACTS_PER_DIFFUSE]; - - float4 predPos = inputPositions[threadIndex] + inputVelocities[threadIndex] * deltaTime; - float radius = inputAttributes[threadIndex].z * radiusScale; - - // max size of the particle bounds in cells: - int4 maxSize = int4(3,3,3,3); - - aabb b; - b.FromEdge(inputPositions[threadIndex], predPos, radius); - b.Transform(solverToWorld[0]); - - // build a list of candidate colliders: - for (uint m = 1; m <= levelPopulation[0]; ++m) - { - uint l = levelPopulation[m]; - float cellSize = CellSizeOfLevel(l); - - int4 minCell = floor(b.min_ / cellSize); - int4 maxCell = floor(b.max_ / cellSize); - maxCell = minCell + min(maxCell - minCell, maxSize); - - for (int x = minCell[0]; x <= maxCell[0]; ++x) - { - for (int y = minCell[1]; y <= maxCell[1]; ++y) - { - // for 2D mode, project each cell at z == 0 and check them too. This way we ensure 2D colliders - // (which are inserted in cells with z == 0) are accounted for in the broadphase. - if (mode == 1) - { - uint flatCellIndex = GridHash(int4(x,y,0,l)); - uint cellStart = cellOffsets[flatCellIndex]; - uint cellCount = cellCounts[flatCellIndex]; - - // iterate through colliders in the neighbour cell - for (uint n = cellStart; n < cellStart + cellCount; ++n) - { - // sorted insert into the candidates list: - if (candidateCount < MAX_CONTACTS_PER_DIFFUSE) - candidates[candidateCount++] = sortedColliderIndices[n] / cellsPerCollider; - } - } - - for (int z = minCell[2]; z <= maxCell[2]; ++z) - { - uint flatCellIndex = GridHash(int4(x,y,z,l)); - uint cellStart = cellOffsets[flatCellIndex]; - uint cellCount = cellCounts[flatCellIndex]; - - // iterate through colliders in the neighbour cell - for (uint n = cellStart; n < cellStart + cellCount; ++n) - { - if (candidateCount < MAX_CONTACTS_PER_DIFFUSE) - candidates[candidateCount++] = sortedColliderIndices[n] / cellsPerCollider; - } - - } - } - } - } - - //evaluate candidates and create contacts: - if (candidateCount > 0) - { - - // insert sort: - for (int k = 1; k < candidateCount; ++k) - { - uint key = candidates[k]; - int j = k - 1; - - while (j >= 0 && candidates[j] > key) - candidates[j + 1] = candidates[j--]; - - candidates[j + 1] = key; - } - - // make sure each candidate only shows up once in the list: - int first = 0, contactCount = 0; - while(++first != candidateCount) - { - if (candidates[contactCount] != candidates[first]) - candidates[++contactCount] = candidates[first]; - } - contactCount++; - - // solve contacts: - for (int i = 0; i < contactCount; i++) - { - int c = candidates[i]; - - aabb colliderBoundsWS = aabbs[c]; - - if (b.IntersectsAabb(colliderBoundsWS, mode == 1)) - { - - switch(shapes[c].type) - { - case SPHERE_SHAPE: - { - SurfacePoint surf; - Sphere sphereShape; - sphereShape.colliderToSolver = worldToSolver[0].Multiply(transforms[c]); - sphereShape.s = shapes[c]; - sphereShape.Evaluate(predPos, float4(radius, radius, radius, 0), QUATERNION_IDENTITY, surf); - - float dist = dot(predPos - surf.pos, surf.normal) - radius; - if (dist < 0) predPos = surf.pos + surf.normal * radius; - } - break; - - case BOX_SHAPE: - { - SurfacePoint surf; - Box boxShape; - boxShape.colliderToSolver = worldToSolver[0].Multiply(transforms[c]); - boxShape.s = shapes[c]; - boxShape.Evaluate(predPos, float4(radius, radius, radius, 0), QUATERNION_IDENTITY, surf); - - float dist = dot(predPos - surf.pos, surf.normal) - radius; - if (dist < 0) predPos = surf.pos + surf.normal * radius; - } - break; - - case CAPSULE_SHAPE: - { - SurfacePoint surf; - Capsule capShape; - capShape.colliderToSolver = worldToSolver[0].Multiply(transforms[c]); - capShape.s = shapes[c]; - capShape.Evaluate(predPos, float4(radius, radius, radius, 0), QUATERNION_IDENTITY, surf); - - float dist = dot(predPos - surf.pos, surf.normal) - radius; - if (dist < 0) predPos = surf.pos + surf.normal * radius; - } - break; - - case TRIANGLE_MESH_SHAPE: - { - CollideMesh(c, threadIndex, b, predPos, radius); - } - break; - - case EDGE_MESH_SHAPE: - { - CollideEdgeMesh(c, threadIndex, b, predPos, radius); - } - break; - - case HEIGHTMAP_SHAPE: - { - CollideHeightmap(c, threadIndex, b, predPos, radius); - } - break; - - case SDF_SHAPE: - { - SurfacePoint surf; - DistanceField dfShape; - dfShape.colliderToSolver = worldToSolver[0].Multiply(transforms[c]); - dfShape.s = shapes[c]; - dfShape.distanceFieldHeaders = distanceFieldHeaders; - dfShape.dfNodes = dfNodes; - dfShape.Evaluate(predPos, float4(radius, radius, radius, 0), QUATERNION_IDENTITY, surf); - - float dist = dot(predPos - surf.pos, surf.normal) - radius; - if (dist < 0) predPos = surf.pos + surf.normal * radius; - } - break; - } - } - } - } - - inputVelocities[threadIndex].xyz = (predPos.xyz - inputPositions[threadIndex].xyz) / deltaTime; -} \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/FluidFoamCollisions.compute.meta b/Assets/Obi/Resources/Compute/FluidFoamCollisions.compute.meta deleted file mode 100644 index f67b3366a..000000000 --- a/Assets/Obi/Resources/Compute/FluidFoamCollisions.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 62b650760f2294d0c9c68247f21c7009 -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 65536 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/FluidFoamDensity.compute b/Assets/Obi/Resources/Compute/FluidFoamDensity.compute deleted file mode 100644 index 9ff41c337..000000000 --- a/Assets/Obi/Resources/Compute/FluidFoamDensity.compute +++ /dev/null @@ -1,199 +0,0 @@ -#pragma kernel Clear -#pragma kernel InsertInGrid -#pragma kernel SortByGrid -#pragma kernel ComputeDensity -#pragma kernel ApplyDensity - -#include "InterlockedUtils.cginc" -#include "MathUtils.cginc" -#include "GridUtils.cginc" -#include "Simplex.cginc" -#include "Bounds.cginc" -#include "SolverParameters.cginc" -#include "FluidKernels.cginc" - -RWStructuredBuffer sortedToOriginal; - -RWStructuredBuffer offsetInCell; -RWStructuredBuffer cellStart; // start of each cell in the sorted item array. -RWStructuredBuffer cellCounts; // number of item in each cell. -StructuredBuffer solverBounds; - -RWStructuredBuffer inputPositions; -RWStructuredBuffer inputVelocities; -RWStructuredBuffer inputColors; -RWStructuredBuffer sortedPositions; -RWStructuredBuffer sortedVelocities; -RWStructuredBuffer fluidData; - -StructuredBuffer dispatch; - -// each emitter has its own global radius, not possible to have foam emitters interact with each other. -float particleRadius; -float smoothingRadius; -float surfaceTension; -float pressure; -float viscosity; -float4 volumeLightDirection; - -float deltaTime; - -[numthreads(128, 1, 1)] -void Clear (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - if (i >= maxCells) return; - - // clear all cell counts to zero, and cell offsets to invalid. - cellStart[i] = INVALID; - cellCounts[i] = 0; -} - -[numthreads(128, 1, 1)] -void InsertInGrid (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - if (i >= dispatch[3]) return; - - uint cellIndex = GridHash(floor(inputPositions[i] / smoothingRadius).xyz); - InterlockedAdd(cellCounts[cellIndex],1,offsetInCell[i]); -} - -[numthreads(128, 1, 1)] -void SortByGrid (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - if (i >= dispatch[3]) return; - - uint cellIndex = GridHash(floor(inputPositions[i] / smoothingRadius).xyz); - - uint sortedIndex = cellStart[cellIndex] + offsetInCell[i]; - sortedPositions[sortedIndex] = inputPositions[i]; - sortedVelocities[sortedIndex] = inputVelocities[i]; - sortedToOriginal[sortedIndex] = i; -} - -[numthreads(128, 1, 1)] -void ComputeDensity (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - if (i >= dispatch[3]) return; - - float4 positionA = inputPositions[i]; - - int3 cellCoords = floor(inputPositions[i] / smoothingRadius).xyz; - - // self-contribution: - float avgKernel = Poly6(0,smoothingRadius); - float restVolume = pow(abs(particleRadius * 2),3-mode); - float grad = restVolume * Spiky(0,smoothingRadius); - - float4 fluidDataA = float4(avgKernel,0,grad,grad*grad); - - float4 positionB; - - // iterate over neighborhood, calculate density and gradient. - for (int k = 0; k < 27; ++k) - { - int3 neighborCoords = cellCoords + cellNeighborhood[k].xyz; - uint cellIndex = GridHash(neighborCoords); - uint start = cellStart[cellIndex]; - - for (uint j = 0; j < cellCounts[cellIndex]; ++j) - { - positionB = sortedPositions[start + j]; - float3 r = (positionA - positionB).xyz; - - if (mode == 1) - r[2] = 0; - - float dist = length(r); - - if (dist > smoothingRadius || any(neighborCoords - floor(positionB / smoothingRadius).xyz)) continue; - - float grad = restVolume * Spiky(dist,smoothingRadius); - fluidDataA += float4(Poly6(dist,smoothingRadius),0,grad,grad*grad); - } - } - - // self particle contribution to density and gradient: - fluidDataA[3] += fluidDataA[2] * fluidDataA[2]; - - // usually, we'd weight density by mass (density contrast formulation) by dividing by invMass. Then, multiply by invMass when - // calculating the state equation (density / restDensity - 1, restDensity = mass / volume, so density * invMass * restVolume - 1 - // We end up with density / invMass * invMass * restVolume - 1, invMass cancels out. - float constraint = max(0, fluidDataA[0] * restVolume - 1); - - // calculate lambda: - fluidDataA[1] = -constraint / (fluidDataA[3] + EPSILON); - - fluidData[i] = fluidDataA; -} - -[numthreads(128, 1, 1)] -void ApplyDensity (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - if (i >= dispatch[3]) return; - - int3 cellCoords = floor(inputPositions[i] / smoothingRadius).xyz; - - float restVolume = pow(abs(particleRadius * 2),3-mode); - float neighborhoodVolume = pow(abs(smoothingRadius * 2),3-mode); - float4 positionA = inputPositions[i]; - float4 velocityA = inputVelocities[i]; - float4 fluidDataA = fluidData[i]; - - float4 fluidDataB; - float4 positionB; - float4 velocityB; - - float4 pressureDelta = FLOAT4_ZERO; - float4 viscAccel = FLOAT4_ZERO; - float AO = 0; - - for (int k = 0; k < 27; ++k) - { - int3 neighborCoords = cellCoords + cellNeighborhood[k].xyz; - uint cellIndex = GridHash(neighborCoords); - uint start = cellStart[cellIndex]; - - for (uint j = 0; j < cellCounts[cellIndex]; ++j) - { - positionB = sortedPositions[start + j]; - velocityB = sortedVelocities[start + j]; - fluidDataB = fluidData[sortedToOriginal[start + j]]; - - float4 r = float4((positionA - positionB).xyz,0); - - if (mode == 1) - r[2] = 0; - - float dist = length(r); - - - if (dist > smoothingRadius || any(neighborCoords - floor(positionB / smoothingRadius).xyz)) continue; - - float kern = Poly6(dist,smoothingRadius); - float cAvg = Cohesion(dist,smoothingRadius); - - // XSPH viscosity: - float4 relVel = float4((velocityB - velocityA).xyz,0); - viscAccel += viscosity * relVel * kern * restVolume; - - float st = 0.2 * cAvg * surfaceTension; - float scorrA = - st / (fluidDataA[3] + EPSILON); - float scorrB = - st / (fluidDataB[3] + EPSILON); - pressureDelta += r / (dist + EPSILON) * Spiky(dist,smoothingRadius) * ((fluidDataA[1] + scorrA) + (fluidDataB[1] + scorrB)) * restVolume; - - float4 v = r / (dist + EPSILON); - AO += max(0, dot (volumeLightDirection.xyz, v.xyz) ) / (1 + dist) * restVolume; - } - } - - float4 delta = pressure * pressureDelta; - - // modify position and velocity: - inputPositions[i] = float4((positionA + delta).rgb, 2*PI * AO.x / neighborhoodVolume); - inputVelocities[i] += float4(delta.xyz / deltaTime + viscAccel.xyz,0); -} \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/FluidFoamDensity.compute.meta b/Assets/Obi/Resources/Compute/FluidFoamDensity.compute.meta deleted file mode 100644 index 247a584ac..000000000 --- a/Assets/Obi/Resources/Compute/FluidFoamDensity.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 2332ee3ce70e9447d8d13b5b67ac8e6c -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 65536 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/FluidKernels.cginc b/Assets/Obi/Resources/Compute/FluidKernels.cginc deleted file mode 100644 index deac80421..000000000 --- a/Assets/Obi/Resources/Compute/FluidKernels.cginc +++ /dev/null @@ -1,40 +0,0 @@ -#ifndef FLUIDKERNELS_INCLUDE -#define FLUIDKERNELS_INCLUDE - -#include "SolverParameters.cginc" - -float Poly6(float r, float h) -{ - float h2 = h * h; - float h4 = h2 * h2; - float h8 = h4 * h4; - - float rl = min(r, h); - float hr = h2 - rl * rl; - - if (mode) - return 4.0f / PI / h8 * hr * hr * hr; - else - return 315.0f / (64.0 * PI) / (h8 * h) * hr * hr * hr; -} - -float Spiky(float r, float h) -{ - float h2 = h * h; - float h4 = h2 * h2; - - float rl = min(r, h); - float hr = h - rl; - - if (mode) - return -30.0f / PI / (h4 * h) * hr * hr; - else - return -45.0f / PI / (h4 * h2) * hr * hr; -} - -float Cohesion(float r, float h) -{ - return cos(min(r, h) * 3 * PI / (2 * h)); -} - -#endif \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/FluidKernels.cginc.meta b/Assets/Obi/Resources/Compute/FluidKernels.cginc.meta deleted file mode 100644 index 5915645b0..000000000 --- a/Assets/Obi/Resources/Compute/FluidKernels.cginc.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 53c4eeee7bd2141deb8d1179555a1920 -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/FluidMeshChunks.compute b/Assets/Obi/Resources/Compute/FluidMeshChunks.compute deleted file mode 100644 index da444b47b..000000000 --- a/Assets/Obi/Resources/Compute/FluidMeshChunks.compute +++ /dev/null @@ -1,205 +0,0 @@ -#pragma kernel ClearChunks -#pragma kernel ClearGrid -#pragma kernel InsertChunks -#pragma kernel SortParticles -#pragma kernel FindPopulatedLevels - -#include "MathUtils.cginc" -#include "Bounds.cginc" -#include "GridUtils.cginc" -#include "FluidChunkDefs.cginc" -#include "SolverParameters.cginc" - -// particle data: -StructuredBuffer particleIndices; -StructuredBuffer positions; -StructuredBuffer velocities; -StructuredBuffer angularVelocities; -StructuredBuffer principalRadii; -StructuredBuffer fluidMaterial; -StructuredBuffer fluidData; -StructuredBuffer orientations; -StructuredBuffer colors; -StructuredBuffer normals; - -RWStructuredBuffer sortedPositions; -RWStructuredBuffer sortedPrincipalRadii; -RWStructuredBuffer sortedVelocities; -RWStructuredBuffer sortedOrientations; -RWStructuredBuffer sortedColors; - -// particle grid data: -StructuredBuffer solverBounds; -StructuredBuffer gridHashToSortedIndex; -RWStructuredBuffer cellOffsets; // start of each cell in the sorted item array. -RWStructuredBuffer cellCounts; // number of item in each cell. -RWStructuredBuffer offsetInCell; // for each item, offset within its the cell. - -// voxel data: -RWStructuredBuffer chunkCoords; // for each chunk, spatial coordinates. -RWStructuredBuffer hashtable; // size: maxChunks entries. - -RWStructuredBuffer dispatchBuffer; - -uint firstParticle; -uint particleCount; -float isosurface; -float smoothing; - -uint AllocateChunk(uint3 coords) -{ - uint key = VoxelID(coords); - uint slot = hash(key); - - [allow_uav_condition] - for (uint i = 0; i < maxChunks; ++i) // at most, check the entire table. - { - uint prev; - InterlockedCompareExchange(hashtable[slot].key, INVALID, key, prev); - - // allocate new chunk: - if (prev == INVALID) - { - InterlockedAdd(dispatchBuffer[4],1,hashtable[slot].handle); - chunkCoords[hashtable[slot].handle] = coords; - return hashtable[slot].handle; - } - // could not allocate chunk, since it already exists. - else if (prev == key) - { - return INVALID; - } - // collision, try next slot. - else - slot = (slot + 1) % maxChunks; - } - return INVALID; // could not allocate chunk, not enough space. -} - -[numthreads(128, 1, 1)] -void ClearChunks (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= maxChunks) - return; - - // clear all chunks: - keyvalue k; - k.key = 0xffffffff; - k.handle = 0xffffffff; - hashtable[i] = k; -} - -[numthreads(128, 1, 1)] -void ClearGrid (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= maxCells) - return; - - if (i == 0) - { - for (int l = 0; l <= GRID_LEVELS; ++l) - levelPopulation[l] = 0; - } - - // clear all cell counts to zero, and cell offsets to invalid. - cellOffsets[i] = INVALID; - cellCounts[i] = 0; -} - -[numthreads(128, 1, 1)] -void InsertChunks (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - if (i >= particleCount) return; - - int p = particleIndices[firstParticle + i]; - - // ignore inactive particles: - if (principalRadii[p].w <= 0.5f) - return; - - // calculate particle cell index: - int level = GridLevelForSize(fluidMaterial[p].x); - float cellSize = CellSizeOfLevel(level); - int4 cellCoord = int4(floor((positions[p].xyz - solverBounds[0].min_.xyz) / cellSize),level); - - // if the solver is 2D, project to the z = 0 cell. - if (mode == 1) cellCoord[2] = 0; - - // since cell hashes are morton-sorted during collision detection, here we also get sorted cells - // as long as particle cellCoords are reasonably similar - // (won't be the exact same since we use renderable positions instead of positions) - uint cellIndex = gridHashToSortedIndex[GridHash(cellCoord)]; - - // insert simplex in cell: - InterlockedAdd(cellCounts[cellIndex],1, offsetInCell[p]); - - // atomically increase this level's population by one: - InterlockedAdd(levelPopulation[1 + level],1); - - //in 3D, only particles near the surface should spawn chunks: - //if (mode == 0 && dot(normals[p],normals[p]) < 0.0001f) - //return; - - // expand aabb by voxel size, since boundary voxels (at a chunks' 0 X/Y/Z) can't be triangulated. - float radius = fluidMaterial[p].x + voxelSize; - - // calculate particle chunk span. - float chunkSize = chunkResolution * voxelSize; - uint3 minCell = floor((positions[p].xyz - radius - chunkGridOrigin) / chunkSize); - uint3 maxCell = floor((positions[p].xyz + radius - chunkGridOrigin) / chunkSize); - - if (mode == 1) - minCell[2] = maxCell[2] = 0; - - for (uint x = minCell[0]; x <= maxCell[0]; ++x) - { - for (uint y = minCell[1]; y <= maxCell[1]; ++y) - { - for (uint z = minCell[2]; z <= maxCell[2]; ++z) - { - AllocateChunk(uint3(x, y, z)); - } - } - } -} - -[numthreads(128, 1, 1)] -void SortParticles (uint3 id : SV_DispatchThreadID) -{ - uint i = id.x; - if (i >= particleCount) return; - - int p = particleIndices[firstParticle + i]; - - // ignore inactive particles: - if (principalRadii[p].w <= 0.5f) - return; - - // calculate particle cell index: - int level = GridLevelForSize(fluidMaterial[p].x); - float cellSize = CellSizeOfLevel(level); - int4 cellCoord = int4(floor((positions[p].xyz - solverBounds[0].min_.xyz) / cellSize),level); - - // if the solver is 2D, project to the z = 0 cell. - if (mode == 1) cellCoord[2] = 0; - - uint cellIndex = gridHashToSortedIndex[GridHash(cellCoord)]; - - // find final sorted index: - uint gridIndex = cellOffsets[cellIndex] + offsetInCell[p]; - - // write particle data in sorted order: - sortedPositions[gridIndex] = float4(positions[p].xyz, 1 / fluidData[p].x); - sortedPrincipalRadii[gridIndex] = fluidMaterial[p].x * (principalRadii[p] / principalRadii[p].x); - sortedVelocities[gridIndex] = float4(velocities[p].xyz, (asuint(angularVelocities[p].w) & 0x0000ffff) / 65535.0); - sortedOrientations[gridIndex] = orientations[p]; - sortedColors[gridIndex] = colors[p]; -} - - - diff --git a/Assets/Obi/Resources/Compute/FluidMeshChunks.compute.meta b/Assets/Obi/Resources/Compute/FluidMeshChunks.compute.meta deleted file mode 100644 index e70344d36..000000000 --- a/Assets/Obi/Resources/Compute/FluidMeshChunks.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 745eb95f8ca884ea6830b3ca14ee05a0 -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 65536 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/FluidSurfaceMeshBuilding.compute b/Assets/Obi/Resources/Compute/FluidSurfaceMeshBuilding.compute deleted file mode 100644 index d4e04809e..000000000 --- a/Assets/Obi/Resources/Compute/FluidSurfaceMeshBuilding.compute +++ /dev/null @@ -1,604 +0,0 @@ -#pragma kernel SampleSDF -#pragma kernel CalculateSurface -#pragma kernel Triangulate -#pragma kernel Smoothing - -#pragma kernel FixArgsBuffer -#pragma kernel FillIndirectDrawBuffer - -#include "MathUtils.cginc" -#include "Bounds.cginc" -#include "GridUtils.cginc" -#include "FluidChunkDefs.cginc" -#include "FluidKernels.cginc" -#include "SolverParameters.cginc" -#include "NormalCompression.cginc" - -/* - * y z - * ^ / - * | - * 6----7 - * /| /| - * 2----3 | - * | 4--|-5 - * |/ |/ - * 0----1 --> x - * - */ - - /* - * static Vector2Int[] cubeEdges = - * { - * new Vector2Int(7,3), 0 - * new Vector2Int(7,5), 1 - * new Vector2Int(7,6), 2 - * - * new Vector2Int(6,4), 3 // x - * new Vector2Int(4,5), 4 - * new Vector2Int(5,1), 5 - * - * new Vector2Int(1,3), 6 // y - * new Vector2Int(3,2), 7 - * new Vector2Int(2,6), 8 - * - * new Vector2Int(4,0), 9 // z - * new Vector2Int(2,0), 10 - * new Vector2Int(1,0) 11 - * }; - */ - -static const int4 faceNeighborEdges[] = -{ - int4(0,1,5,6), - int4(0,2,7,8), - int4(4,5,9,11), - int4(3,8,9,10), - int4(6,7,10,11), - int4(1,2,3,4) -}; - -static const float3 corners[] = -{ - float3(0, 0, 0), // 0 - float3(1, 0, 0), // 1 - float3(0, 1, 0), // 2 - float3(1, 1, 0), // 3 - float3(0, 0, 1), // 4 - float3(1, 0, 1), // 5 - float3(0, 1, 1), // 6 - float3(1, 1, 1) // 7 -}; - -static const int3 quadNeighborIndices[] = -{ - int3(1, 3, 2), // x - int3(4, 5, 1), // y - int3(2, 6, 4), // z -}; - -static const int oppositeFaces[] = -{ - 7, //0 - 6, //1 - 5, //2 - 4, //3 - 3, //4 - 2, //5 - 1 //6 -}; - -static const int3 quadWindingOrder[] = { - int3(0, 1 ,2), - int3(2, 1 ,0) -}; - -struct indirectDrawIndexedArgs -{ - uint indexCountPerInstance; - uint instanceCount; - uint startIndex; - uint baseVertexIndex; - uint startInstance; -}; - -// particle grid data: -StructuredBuffer solverBounds; -StructuredBuffer cellOffsets; // start of each cell in the sorted item array. -StructuredBuffer cellCounts; // number of item in each cell. -StructuredBuffer gridHashToSortedIndex; - -StructuredBuffer sortedPositions; -StructuredBuffer sortedVelocities; -StructuredBuffer sortedPrincipalRadii; -StructuredBuffer sortedColors; -StructuredBuffer sortedOrientations; - -// voxel data: -StructuredBuffer chunkCoords; // for each chunk, spatial coordinates. -StructuredBuffer hashtable; // size: maxChunks entries. -RWStructuredBuffer voxelToVertex; // for each voxel, index into the vertices array in case the voxel spawns a vertex, INVALID otherwise. -RWStructuredBuffer vertexAdjacency; // indices of adjacent face voxels for each voxel. -RWStructuredBuffer voxelVelocities; // for each voxel, fluid velocity value. We are reusing the same ComputeBuffer used for vertexAdjacency. - -// edge LUTs -StructuredBuffer edges; -StructuredBuffer edgeTable; - -// mesh data: -RWStructuredBuffer verts; -RWStructuredBuffer outputVerts; -RWStructuredBuffer colors; -RWStructuredBuffer velocities; -RWStructuredBuffer quads; - -RWStructuredBuffer dispatchBuffer; -RWStructuredBuffer dispatchBuffer2; -RWStructuredBuffer indirectBuffer; - -uint currentBatch; - -float isosurface; -uint descentIterations; -float descentIsosurface; -float descentSpeed; -float smoothing; -float bevel; -uint dispatchMultiplier; -uint countMultiplier; -uint instanceCount; - -uint voxelCoordToOffset(int3 coord) -{ - if (mode == 1) - return (int)EncodeMorton2((uint2)coord.xy); - else return (int)EncodeMorton3((uint3)coord.xyz); -} - -uint LookupChunk(int3 coords) -{ - uint key = VoxelID(coords); - uint slot = hash(key); - - for (uint i = 0; i < maxChunks; ++i) // at most, check the entire table. - { - if (hashtable[slot].key == key) - { - return hashtable[slot].handle; - } - if (hashtable[slot].key == INVALID) - { - return INVALID; - } - - slot = (slot + 1) % maxChunks; - } - return INVALID; -} - -uint GetVoxelIndex(int3 chunkCoords, int3 voxelCoords, int voxelsInChunk) -{ - int3 mask = voxelCoords < 0 ? -1 : voxelCoords / chunkResolution; - uint chunk = LookupChunk(chunkCoords + mask); - - return chunk == INVALID ? INVALID : chunk * voxelsInChunk + voxelCoordToOffset(nfmod(voxelCoords, chunkResolution)); -} - -[numthreads(128, 1, 1)] -void SampleSDF (uint3 id : SV_DispatchThreadID) // one thread per voxel, -{ - uint i = id.x; - if (i >= dispatchBuffer[3]) return; - - int voxelsInChunk = (int)pow(chunkResolution, 3 - mode); // 64 voxels in 3D, 16 in 2D. - - // calculate chunk index: - int chunkIndex = i / voxelsInChunk; - - // get offset of voxel within chunk: - int cornerOffset = i - chunkIndex * voxelsInChunk; - int3 voxelCoords; - - if (mode == 1) - voxelCoords = (int3)DecodeMorton2((uint)cornerOffset); - else - voxelCoords = (int3)DecodeMorton3((uint)cornerOffset); - - int3 cornerCoords= chunkCoords[chunkIndex] * chunkResolution + voxelCoords; - - // calculate sampling position: - float3 samplePos = chunkGridOrigin + cornerCoords * voxelSize; - - float dist = isosurface; - float4 color = FLOAT4_ZERO; - float4 velocity = FLOAT4_ZERO; - - for (uint m = 1; m <= levelPopulation[0]; ++m) - { - uint l = levelPopulation[m]; - float cellSize = CellSizeOfLevel(l); - - int3 cell = floor((samplePos - solverBounds[0].min_.xyz) / cellSize); // TODO: not necessary to subtract solverBounds? - int3 minCell = cell - 1; - int3 maxCell = cell + 1; - - if (mode == 1) - minCell[2] = maxCell[2] = 0; - - for (int x = minCell[0]; x <= maxCell[0]; ++x) - { - for (int y = minCell[1]; y <= maxCell[1]; ++y) - { - for (int z = minCell[2]; z <= maxCell[2]; ++z) - { - int4 neighborCoord = int4(x, y, z, l); - int cellIndex = gridHashToSortedIndex[GridHash(neighborCoord)]; - uint n = cellOffsets[cellIndex]; - uint end = n + cellCounts[cellIndex]; - - for (;n < end; ++n) - { - float3 radii = sortedPrincipalRadii[n].xyz; - - // due to hash collisions, two neighboring cells might map to the same - // hash bucket, and we'll add the same set of particles twice to the neighbors list. - // So we only consider particles that have the same spatial coordinates as the cell. - uint level = GridLevelForSize(radii.x); - float cellSize = CellSizeOfLevel(level); - int4 particleCoord = int4(floor((sortedPositions[n].xyz - solverBounds[0].min_.xyz)/ cellSize).xyz,level); - - if (any (particleCoord - neighborCoord)) - continue; - - float3 normal = samplePos - sortedPositions[n].xyz; - if (mode == 1) - normal[2] = 0; - - // only update distance if within anisotropic kernel radius: - float maxDistance = radii.x + voxelSize * 1.42f; - float r = dot(normal, normal); - if (r <= maxDistance * maxDistance) - { - normal = rotate_vector(q_conj(sortedOrientations[n]), normal.xyz) / radii; - float d = length(normal) * radii.x; - - // sortedPositions.w is volume (1/normalized density): - float w = sortedPositions[n].w * Poly6(d,radii.x); - - dist -= w; - - // tigther smoothing kernel for color and velocities: - float w2 = 1-saturate(r / (radii.x * radii.x)); - color += float4(sortedColors[n].xyz * w2, w2); - velocity += sortedVelocities[n] * w2; // 4th component is length(angularVel), vorticity intensity. - } - - } - } - } - } - } - - verts[i].x = dist; - verts[i].y = PackFloatRGBA(color/color.w); - - voxelVelocities[i] = velocity / color.w; -} - -float EvaluateSDF (float4 distancesA, float4 distancesB, in float3 nPos, out float3 normal) -{ - // trilinear interpolation of distance: - float4 x = distancesA + (distancesB - distancesA) * nPos[0]; - float2 y = x.xy + (x.zw - x.xy) * nPos[1]; - - // gradient estimation: - // x == 0 - float2 a = distancesA.xy + (distancesA.zw - distancesA.xy) * nPos[1]; - float x0 = a[0] + (a[1] - a[0]) * nPos[2]; - - // x == 1 - a = distancesB.xy + (distancesB.zw - distancesB.xy) * nPos[1]; - float x1 = a[0] + (a[1] - a[0]) * nPos[2]; - - // y == 0 - float y0 = x[0] + (x[1] - x[0]) * nPos[2]; - - // y == 1 - float y1 = x[2] + (x[3] - x[2]) * nPos[2]; - - normal = normalize(float3(x1 - x0, y1 - y0, y[1] - y[0])); - return y[0] + (y[1] - y[0]) * nPos[2]; -} - -[numthreads(128, 1, 1)] -void CalculateSurface (uint3 id : SV_DispatchThreadID) // once per voxel. -{ - uint i = id.x; - if (i >= dispatchBuffer[3]) return; - - int voxelsInChunk = (int)pow(chunkResolution, 3 - mode); // 64 voxels in 3D, 16 in 2D. - int verticesPerVoxel = mode == 1 ? 4 : 8; // 8 vertices in 3D, 4 in 2D. - float3 dimensionMask = mode == 1 ? float3(1, 1, 0) : float3(1, 1, 1); - int edgeCount = mode == 1 ? 4 : 12; - - // initialize voxel with invalid vertex: - voxelToVertex[i] = INVALID; - - // calculate chunk index: - int chunkIndex = i / voxelsInChunk; - - // get offset of voxel within chunk: - int voxelOffset = i - chunkIndex * voxelsInChunk; - int3 voxelCoords; - - if (mode == 1) - voxelCoords = (int3)DecodeMorton2((uint)voxelOffset); - else - voxelCoords = (int3)DecodeMorton3((uint)voxelOffset); - - // get samples at voxel corners: - float samples[8]; - float4 vcolor[8]; - float4 vvelo[8]; - uint cornerMask = 0; - - // initialize all samples to zero (last 4 samples aren't written to in 2D). - int j = 0; - for (j = 0; j < 8; ++j) - samples[j] = 0; - - for (j = 0; j < verticesPerVoxel; ++j) - { - uint v = GetVoxelIndex(chunkCoords[chunkIndex], voxelCoords + corners[j], voxelsInChunk); - - if (v == INVALID) - return; - else - { - samples[j] = verts[v].x; - vcolor[j] = UnpackFloatRGBA(verts[v].y); - vvelo[j] = voxelVelocities[v]; - cornerMask |= samples[j] >= 0 ? (1 << j) : 0; - } - } - - // store cornerMask: - verts[i].z = asfloat(cornerMask); - - int edgeMask = edgeTable[cornerMask]; - - // if the voxel does not intersect the surface, return: - if ((mode == 1 && cornerMask == 0xf) || - (mode == 0 && edgeMask == 0)) - return; - - // calculate vertex position using edge crossings: - float3 normalizedPos = float3(0,0,0); - float4 velocity = FLOAT4_ZERO; - float4 color = FLOAT4_ZERO; - int intersections = 0; - - for (j = 0; j < edgeCount; ++j) - { - if((edgeMask & (1 << j)) == 0) - continue; - - int2 e = edges[j]; - float t = -samples[e.x] / (samples[e.y] - samples[e.x]); - - normalizedPos += lerp(corners[e.x],corners[e.y],t); - color += lerp(vcolor[e.x], vcolor[e.y], t); - velocity += lerp(vvelo[e.x], vvelo[e.y], t); - intersections++; - } - - // intersections will always be > 0 in 3D: - if (intersections > 0) - { - normalizedPos /= intersections; - color /= intersections; - velocity /= intersections; - } - else - { - normalizedPos = float3(0.5f, 0.5f, -bevel); - color = (vcolor[0] + vcolor[1] + vcolor[2] + vcolor[3]) * 0.25f; - velocity = (vvelo[0] + vvelo[1] + vvelo[2] + vvelo[3]) * 0.25f; - } - - float4 distancesA = float4(samples[0], samples[4], samples[2], samples[6]); - float4 distancesB = float4(samples[1], samples[5], samples[3], samples[7]); - - // gradient descent: - float3 normal; - for(uint k = 0; k < descentIterations; ++k) - { - float d = EvaluateSDF(distancesA, distancesB, normalizedPos, normal); - normalizedPos -= descentSpeed * normal * (d + isosurface + descentIsosurface); - } - - // final normal evaluation: - EvaluateSDF(distancesA, distancesB, normalizedPos, normal); - - // modify normal in 2D mode: - if (mode) - normal = lerp(float3(0,0,-1),float3(normal.xy,-normal.z),bevel); // no bevel, flat normals - - // Append vertex: - InterlockedAdd(dispatchBuffer[4],1,voxelToVertex[i]); - verts[voxelToVertex[i]].w = i; - - float3 voxelCorner = chunkGridOrigin + (float3)(chunkCoords[chunkIndex] * chunkResolution + voxelCoords) * voxelSize; - outputVerts[voxelToVertex[i]] = float4(voxelCorner * dimensionMask + normalizedPos * voxelSize, encode(normal)); - colors[voxelToVertex[i]] = color; - velocities[voxelToVertex[i]] = velocity; -} - -[numthreads(128, 1, 1)] -void Triangulate (uint3 id : SV_DispatchThreadID) -{ - uint v0 = id.x; - if (v0 >= dispatchBuffer[3]) return; - - int voxelsInChunk = (int)pow(chunkResolution, 3 - mode); // 64 voxels in 3D, 16 in 2D. - int quadCount = 3 - mode * 2; // 3 quads in 3D, 1 in 2D. - int adjacentCount = 6 - mode * 2; // 6 adjacent voxels in 3D, 4 in 2D. - - // get index of the voxel that spawned this vertex: - uint i = verts[v0].w; - - // calculate chunk index and look up coordinates: - int chunkIndex = i / voxelsInChunk; - - // get offset of voxel within chunk: - int voxelOffset = i - chunkIndex * voxelsInChunk; - int3 voxelCoords; - - if (mode == 1) - voxelCoords = (int3)DecodeMorton2((uint)voxelOffset); - else - voxelCoords = (int3)DecodeMorton3((uint)voxelOffset); - - uint cornerMask = asuint(verts[i].z); - int edgeMask = edgeTable[cornerMask]; - - // get winding order using last bit of cornermask, which indicates corner sign: - // in 2D, cornerMask >> 7 is always 0, so we get the second winding order. - int3 windingOrder = (cornerMask >> 7) ? quadWindingOrder[0] : quadWindingOrder[1]; - - // Retrieve adjacent voxels: - int j; - uint adjacent[6]; - for (j = 0; j < adjacentCount; ++j) - adjacent[j] = GetVoxelIndex(chunkCoords[chunkIndex], voxelCoords + corners[j + 1], voxelsInChunk); - - // Iterate over all potential quads, append those needed: - for (j = 0; j < quadCount; ++j) - { - // if the edge is not crossing the surface, skip it (3D only) - if (mode == 0 && (edgeMask & (1 << j)) == 0) - continue; - - // calculate final neighbor indices: - uint3 neighbors = uint3(quadNeighborIndices[j][windingOrder[0]]-1, - quadNeighborIndices[j][windingOrder[1]]-1, - quadNeighborIndices[j][windingOrder[2]]-1); - - // get vertex indices for all voxels involved: - uint v1 = voxelToVertex[adjacent[neighbors[0]]]; - uint v2 = voxelToVertex[adjacent[neighbors[1]]]; - uint v3 = voxelToVertex[adjacent[neighbors[2]]]; - - // if any of the vertices is invalid, skip the quad: - if (v1 == INVALID || v2 == INVALID || v3 == INVALID) - continue; - - // append a new quad: - uint baseIndex; - InterlockedAdd(dispatchBuffer2[4],1,baseIndex); - baseIndex *= 6; - - // flip edge if necessary, to always use the shortest diagonal: - float3 diag1 = outputVerts[v0].xyz - outputVerts[v2].xyz; - float3 diag2 = outputVerts[v1].xyz - outputVerts[v3].xyz; - if (dot(diag1,diag1) > dot(diag2,diag2) * 1.1) - { - quads[baseIndex] = v1; - quads[baseIndex+1] = v2; - quads[baseIndex+2] = v3; - - quads[baseIndex+3] = v0; - quads[baseIndex+4] = v1; - quads[baseIndex+5] = v3; - } - else - { - quads[baseIndex] = v0; - quads[baseIndex+1] = v1; - quads[baseIndex+2] = v2; - - quads[baseIndex+3] = v3; - quads[baseIndex+4] = v0; - quads[baseIndex+5] = v2; - } - } - - // Move adjacent voxel in Z axis to last position, so that 2D adjacent voxels are the first 4. - adjacent[5] = adjacent[3]; - adjacent[2] = GetVoxelIndex(chunkCoords[chunkIndex], voxelCoords + int3(0, -1, 0), voxelsInChunk); - adjacent[3] = GetVoxelIndex(chunkCoords[chunkIndex], voxelCoords + int3(-1, 0, 0), voxelsInChunk); - adjacent[4] = GetVoxelIndex(chunkCoords[chunkIndex], voxelCoords + int3(0, 0, -1), voxelsInChunk); - - // initialize vertex adjacency to INVALID. - for (j = 0; j < 6; ++j) - vertexAdjacency[v0*6 + j] = INVALID; - - // Determine adjacent surface voxels for smoothing: - bool isAdjacent; - for (j = 0; j < adjacentCount; ++j) - { - if (adjacent[j] != INVALID) - { - // adjacent if this does not intersect the surface or both intersect the surface. - isAdjacent = (edgeMask == 0 || edgeTable[asuint(verts[adjacent[j]].z)] != 0) && - - // in 3D mode, it should also intersect any of the face edges to be considered adjacent: - (mode == 1 || any(edgeMask & (1 << faceNeighborEdges[j]))); - - vertexAdjacency[v0 * 6 + j] = isAdjacent ? voxelToVertex[adjacent[j]] : INVALID; - } - } -} - -[numthreads(128, 1, 1)] -void Smoothing (uint3 id : SV_DispatchThreadID) -{ - uint thread = id.x; - if (thread >= dispatchBuffer[3]) return; - - float3 n = decode(verts[thread].w); - - float4 coord = float4(verts[thread].xyz,1); - float4 norm = float4(n,1); - - for (int j = 0; j < 6; ++j) - { - uint v = vertexAdjacency[thread*6 + j]; - if (v != INVALID) - { - coord += float4(verts[v].xyz,1); - norm += float4(decode(verts[v].w),1); - } - } - - coord.xyz /= coord.w; - norm.xyz /= norm.w; - - float3 v = lerp(verts[thread].xyz, coord.xyz, smoothing); - n = normalize(lerp(n,norm.xyz, smoothing)); - - outputVerts[thread] = float4(v, encode(n)); - -} - -[numthreads(1, 1, 1)] -void FixArgsBuffer (uint3 id : SV_DispatchThreadID) -{ - dispatchBuffer[3] = dispatchBuffer[4] * dispatchMultiplier; - dispatchBuffer[0] = dispatchBuffer[3] / 128 + 1; - dispatchBuffer[4] *= countMultiplier; // used to zero out fourth component if needed. -} - -[numthreads(1, 1, 1)] -void FillIndirectDrawBuffer (uint3 id : SV_DispatchThreadID) -{ - indirectDrawIndexedArgs a; - - a.indexCountPerInstance = dispatchBuffer[3] * 6; // number of quads * 6 - a.instanceCount = instanceCount; - a.startIndex = 0; - a.baseVertexIndex = 0; - a.startInstance = 0; - indirectBuffer[0] = a; -} - diff --git a/Assets/Obi/Resources/Compute/FluidSurfaceMeshBuilding.compute.meta b/Assets/Obi/Resources/Compute/FluidSurfaceMeshBuilding.compute.meta deleted file mode 100644 index 67121ca85..000000000 --- a/Assets/Obi/Resources/Compute/FluidSurfaceMeshBuilding.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 676e30b71ac3147969895b3f0ad6d2ec -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 65536 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/GridUtils.cginc b/Assets/Obi/Resources/Compute/GridUtils.cginc deleted file mode 100644 index c3ce3b12a..000000000 --- a/Assets/Obi/Resources/Compute/GridUtils.cginc +++ /dev/null @@ -1,166 +0,0 @@ -#ifndef GRIDUTILS_INCLUDE -#define GRIDUTILS_INCLUDE - -#define INVALID 0xFFFFFFFF -#define MIN_GRID_LEVEL -8 //-6 // minimum cell size is 0.004 meters, enough for very small colliders / particles (log(0.004) / log(2)) -#define MAX_GRID_LEVEL 15 // maximum cell size is 32768 meters, enough for gargantuan objects. -#define GRID_LEVELS (MAX_GRID_LEVEL - MIN_GRID_LEVEL + 1) - -RWStructuredBuffer levelPopulation; -uint maxCells; // maximum number of unique cells in the grid. - -static const float4 cellNeighborhood[27] = { -float4(-1,-1,-1, 0), -float4(-1,-1, 0, 0), -float4(-1,-1, 1, 0), -float4(-1, 0,-1, 0), -float4(-1, 0, 0, 0), -float4(-1, 0, 1, 0), -float4(-1, 1,-1, 0), -float4(-1, 1, 0, 0), -float4(-1, 1, 1, 0), -float4( 0,-1,-1, 0), -float4( 0,-1, 0, 0), -float4( 0,-1, 1, 0), -float4( 0, 0,-1, 0), -float4( 0, 0, 0, 0), -float4( 0, 0, 1, 0), -float4( 0, 1,-1, 0), -float4( 0, 1, 0, 0), -float4( 0, 1, 1, 0), -float4( 1,-1,-1, 0), -float4( 1,-1, 0, 0), -float4( 1,-1, 1, 0), -float4( 1, 0,-1, 0), -float4( 1, 0, 0, 0), -float4( 1, 0, 1, 0), -float4( 1, 1,-1, 0), -float4( 1, 1, 0, 0), -float4( 1, 1, 1, 0), -}; - -static const float4 aheadCellNeighborhood[13] = { -float4(1,0,0,0), // + , 0 , 0 ( 1) -float4(0,1,0,0), // 0 , + , 0 ( 3) -float4(1,1,0,0), // + , + , 0 ( 4) -float4(0,0,1,0), // 0 , 0 , + ( 9) -float4(1,0,1,0), // + , 0 , + (10) -float4(0,1,1,0), // 0 , + , + (12) -float4(1,1,1,0), // + , + , + (13) - -float4(-1,1,0,0), // - , + , 0 ( 2) -float4(-1,-1,1,0), // - , - , + ( 5) -float4(0,-1,1,0), // 0 , - , + ( 6) -float4(1,-1,1,0), // + , - , + ( 7) -float4(-1,0,1,0), // - , 0 , + ( 8) -float4(-1,1,1,0), // - , + , + (11) -}; - -[numthreads(1,1,1)] -void FindPopulatedLevels (uint3 id : SV_DispatchThreadID) -{ - for (int l = 1; l <= GRID_LEVELS; ++l) - { - if (levelPopulation[l] > 0) - levelPopulation[1 + levelPopulation[0]++] = l - 1; - } -} - -inline int GridLevelForSize(float size) -{ - // the magic number is 1/log(2), used because log_a(x) = log_b(x) / log_b(a) - // level is clamped between MIN_LEVEL and MAX_LEVEL, then remapped to (0, MAX_LEVEL - MIN_LEVEL) - // this allows us to avoid InterlockedMax issues on GPU, since it doesn't work on negative numbers on some APIs. - return clamp((int)ceil(log(size) * 1.44269504089), MIN_GRID_LEVEL, MAX_GRID_LEVEL) - MIN_GRID_LEVEL; -} - -inline float CellSizeOfLevel(int level) -{ - return exp2(level + MIN_GRID_LEVEL); -} - -inline int4 GetParentCellCoords(int4 cellCoords, uint level) -{ - float decimation = exp2(level - cellCoords[3]); - int4 cell = (int4)floor((float4)cellCoords / decimation); - cell[3] = level; - return cell; -} - -uint Part1By1(uint x) -{ - x &= 0x0000ffff; // x = ---- ---- ---- ---- fedc ba98 7654 3210 - x = (x ^ (x << 8)) & 0x00ff00ff; // x = ---- ---- fedc ba98 ---- ---- 7654 3210 - x = (x ^ (x << 4)) & 0x0f0f0f0f; // x = ---- fedc ---- ba98 ---- 7654 ---- 3210 - x = (x ^ (x << 2)) & 0x33333333; // x = --fe --dc --ba --98 --76 --54 --32 --10 - x = (x ^ (x << 1)) & 0x55555555; // x = -f-e -d-c -b-a -9-8 -7-6 -5-4 -3-2 -1-0 - return x; -} - -// "Insert" two 0 bits after each of the 10 low bits of x -uint Part1By2(uint x) -{ - x &= 0x000003ff; // x = ---- ---- ---- ---- ---- --98 7654 3210 - x = (x ^ (x << 16)) & 0xff0000ff; // x = ---- --98 ---- ---- ---- ---- 7654 3210 - x = (x ^ (x << 8)) & 0x0300f00f; // x = ---- --98 ---- ---- 7654 ---- ---- 3210 - x = (x ^ (x << 4)) & 0x030c30c3; // x = ---- --98 ---- 76-- --54 ---- 32-- --10 - x = (x ^ (x << 2)) & 0x09249249; // x = ---- 9--8 --7- -6-- 5--4 --3- -2-- 1--0 - return x; -} - -uint Compact1By1(uint x) -{ - x &= 0x55555555; // x = -f-e -d-c -b-a -9-8 -7-6 -5-4 -3-2 -1-0 - x = (x ^ (x >> 1)) & 0x33333333; // x = --fe --dc --ba --98 --76 --54 --32 --10 - x = (x ^ (x >> 2)) & 0x0f0f0f0f; // x = ---- fedc ---- ba98 ---- 7654 ---- 3210 - x = (x ^ (x >> 4)) & 0x00ff00ff; // x = ---- ---- fedc ba98 ---- ---- 7654 3210 - x = (x ^ (x >> 8)) & 0x0000ffff; // x = ---- ---- ---- ---- fedc ba98 7654 3210 - return x; -} - -uint Compact1By2(uint x) -{ - x &= 0x09249249; // x = ---- 9--8 --7- -6-- 5--4 --3- -2-- 1--0 - x = (x ^ (x >> 2)) & 0x030c30c3; // x = ---- --98 ---- 76-- --54 ---- 32-- --10 - x = (x ^ (x >> 4)) & 0x0300f00f; // x = ---- --98 ---- ---- 7654 ---- ---- 3210 - x = (x ^ (x >> 8)) & 0xff0000ff; // x = ---- --98 ---- ---- ---- ---- 7654 3210 - x = (x ^ (x >> 16)) & 0x000003ff; // x = ---- ---- ---- ---- ---- --98 7654 3210 - return x; -} - -inline uint EncodeMorton2(uint2 coords) -{ - return (Part1By1(coords.y) << 1) + Part1By1(coords.x); -} - -inline uint EncodeMorton3(uint3 coords) -{ - return (Part1By2(coords.z) << 2) + (Part1By2(coords.y) << 1) + Part1By2(coords.x); -} - -inline uint3 DecodeMorton2(uint code) -{ - return uint3(Compact1By1(code >> 0), Compact1By1(code >> 1), 0); -} - -inline uint3 DecodeMorton3(uint code) -{ - return uint3(Compact1By2(code >> 0), Compact1By2(code >> 1), Compact1By2(code >> 2)); -} - -inline uint GridHash(in int4 cellIndex) -{ - return (73856093*cellIndex.x ^ - 19349663*cellIndex.y ^ - 83492791*cellIndex.z ^ - 10380569*cellIndex.w) % maxCells; -} - -inline uint GridHash(in int3 cellIndex) -{ - return (73856093*cellIndex.x ^ - 19349663*cellIndex.y ^ - 83492791*cellIndex.z) % maxCells; -} - -#endif \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/GridUtils.cginc.meta b/Assets/Obi/Resources/Compute/GridUtils.cginc.meta deleted file mode 100644 index be067e289..000000000 --- a/Assets/Obi/Resources/Compute/GridUtils.cginc.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: b4dbf43981a3b419fbc2eaf5f2c05a6c -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/HeightfieldShape.compute b/Assets/Obi/Resources/Compute/HeightfieldShape.compute deleted file mode 100644 index 6b34be7b7..000000000 --- a/Assets/Obi/Resources/Compute/HeightfieldShape.compute +++ /dev/null @@ -1,198 +0,0 @@ -#include "ColliderDefinitions.cginc" -#include "ContactHandling.cginc" -#include "DistanceFunctions.cginc" -#include "Simplex.cginc" -#include "Bounds.cginc" -#include "SolverParameters.cginc" -#include "Optimization.cginc" - -#pragma kernel GenerateContacts - -StructuredBuffer positions; -StructuredBuffer orientations; -StructuredBuffer principalRadii; -StructuredBuffer velocities; - -StructuredBuffer simplices; -StructuredBuffer simplexBounds; // bounding box of each simplex. - -StructuredBuffer transforms; -StructuredBuffer shapes; - -// heightfield data: -StructuredBuffer heightFieldHeaders; -StructuredBuffer heightFieldSamples; - -StructuredBuffer contactPairs; -StructuredBuffer contactOffsetsPerType; - -RWStructuredBuffer contacts; -RWStructuredBuffer dispatchBuffer; - -StructuredBuffer worldToSolver; - -uint maxContacts; -float deltaTime; - -[numthreads(128, 1, 1)] -void GenerateContacts (uint3 id : SV_DispatchThreadID) -{ - uint i = id.x; - - // entry #11 in the dispatch buffer is the amount of pairs for the first shape type. - if (i >= dispatchBuffer[11 + 4 * HEIGHTMAP_SHAPE]) return; - - int firstPair = contactOffsetsPerType[HEIGHTMAP_SHAPE]; - int simplexIndex = contactPairs[firstPair + i].x; - int colliderIndex = contactPairs[firstPair + i].y; - shape s = shapes[colliderIndex]; - - if (s.dataIndex < 0) return; - - HeightFieldHeader header = heightFieldHeaders[s.dataIndex]; - - Heightfield fieldShape; - fieldShape.colliderToSolver = worldToSolver[0].Multiply(transforms[colliderIndex]); - fieldShape.s = s; - - // invert a full matrix here to accurately represent collider bounds scale. - float4x4 solverToCollider = Inverse(TRS(fieldShape.colliderToSolver.translation.xyz, fieldShape.colliderToSolver.rotation, fieldShape.colliderToSolver.scale.xyz)); - aabb simplexBound = simplexBounds[simplexIndex].Transformed(solverToCollider); - - int simplexSize; - int simplexStart = GetSimplexStartAndSize(simplexIndex, simplexSize); - - int resolutionU = (int)s.center.x; - int resolutionV = (int)s.center.y; - - // calculate terrain cell size: - float cellWidth = s.size.x / (resolutionU - 1); - float cellHeight = s.size.z / (resolutionV - 1); - - // calculate particle bounds min/max cells: - int2 min_ = int2((int)floor(simplexBound.min_[0] / cellWidth), (int)floor(simplexBound.min_[2] / cellHeight)); - int2 max_ = int2((int)floor(simplexBound.max_[0] / cellWidth), (int)floor(simplexBound.max_[2] / cellHeight)); - - for (int su = min_[0]; su <= max_[0]; ++su) - { - if (su >= 0 && su < resolutionU - 1) - { - for (int sv = min_[1]; sv <= max_[1]; ++sv) - { - if (sv >= 0 && sv < resolutionV - 1) - { - // calculate neighbor sample indices: - int csu1 = clamp(su + 1, 0, resolutionU - 1); - int csv1 = clamp(sv + 1, 0, resolutionV - 1); - - // sample heights: - float h1 = heightFieldSamples[header.firstSample + sv * resolutionU + su] * s.size.y; - float h2 = heightFieldSamples[header.firstSample + sv * resolutionU + csu1] * s.size.y; - float h3 = heightFieldSamples[header.firstSample + csv1 * resolutionU + su] * s.size.y; - float h4 = heightFieldSamples[header.firstSample + csv1 * resolutionU + csu1] * s.size.y; - - if (h1 < 0) continue; - h1 = abs(h1); - h2 = abs(h2); - h3 = abs(h3); - h4 = abs(h4); - - float min_x = su * s.size.x / (resolutionU - 1); - float max_x = csu1 * s.size.x / (resolutionU - 1); - float min_z = sv * s.size.z / (resolutionV - 1); - float max_z = csv1 * s.size.z / (resolutionV - 1); - - float4 convexPoint; - float4 simplexBary = BarycenterForSimplexOfSize(simplexSize); - - // ------contact against the first triangle------: - float4 v1 = float4(min_x, h3, max_z, 0); - float4 v2 = float4(max_x, h4, max_z, 0); - float4 v3 = float4(min_x, h1, min_z, 0); - - fieldShape.tri.Cache(v1, v2, v3); - fieldShape.triNormal.xyz = normalizesafe(cross((v2 - v1).xyz, (v3 - v1).xyz)); - - SurfacePoint colliderPoint = Optimize(fieldShape, positions, orientations, principalRadii, - simplices, simplexStart, simplexSize, simplexBary, convexPoint, surfaceCollisionIterations, surfaceCollisionTolerance); - - float4 velocity = FLOAT4_ZERO; - float simplexRadius = 0; - int j; - for (j = 0; j < simplexSize; ++j) - { - int particleIndex = simplices[simplexStart + j]; - simplexRadius += principalRadii[particleIndex].x * simplexBary[j]; - velocity += velocities[particleIndex] * simplexBary[j]; - } - - float dAB = dot(convexPoint - colliderPoint.pos, colliderPoint.normal); - float vel = dot(velocity, colliderPoint.normal); - - if (vel * deltaTime + dAB <= simplexRadius + s.contactOffset + collisionMargin) - { - uint count = contacts.IncrementCounter(); - if (count < maxContacts) - { - contact c = (contact)0; - - c.pointB = colliderPoint.pos; - c.normal = colliderPoint.normal * fieldShape.s.isInverted(); - c.pointA = simplexBary; - c.bodyA = simplexIndex; - c.bodyB = colliderIndex; - - contacts[count] = c; - - InterlockedMax(dispatchBuffer[0],(count + 1) / 128 + 1); - InterlockedMax(dispatchBuffer[3], count + 1); - } - } - - // ------contact against the second triangle------: - v1 = float4(min_x, h1, min_z, 0); - v2 = float4(max_x, h4, max_z, 0); - v3 = float4(max_x, h2, min_z, 0); - - fieldShape.tri.Cache(v1, v2, v3); - fieldShape.triNormal.xyz = normalizesafe(cross((v2 - v1).xyz, (v3 - v1).xyz)); - - colliderPoint = Optimize(fieldShape, positions, orientations, principalRadii, - simplices, simplexStart, simplexSize, simplexBary, convexPoint, surfaceCollisionIterations, surfaceCollisionTolerance); - - velocity = FLOAT4_ZERO; - simplexRadius = 0; - for (j = 0; j < simplexSize; ++j) - { - int particleIndex = simplices[simplexStart + j]; - simplexRadius += principalRadii[particleIndex].x * simplexBary[j]; - velocity += velocities[particleIndex] * simplexBary[j]; - } - - dAB = dot(convexPoint - colliderPoint.pos, colliderPoint.normal); - vel = dot(velocity, colliderPoint.normal); - - if (vel * deltaTime + dAB <= simplexRadius + s.contactOffset + collisionMargin) - { - uint count = contacts.IncrementCounter(); - if (count < maxContacts) - { - contact c = (contact)0; - - c.pointB = colliderPoint.pos; - c.normal = colliderPoint.normal * fieldShape.s.isInverted(); - c.pointA = simplexBary; - c.bodyA = simplexIndex; - c.bodyB = colliderIndex; - - contacts[count] = c; - - InterlockedMax(dispatchBuffer[0],(count + 1) / 128 + 1); - InterlockedMax(dispatchBuffer[3], count + 1); - } - } - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/HeightfieldShape.compute.meta b/Assets/Obi/Resources/Compute/HeightfieldShape.compute.meta deleted file mode 100644 index a04ea6262..000000000 --- a/Assets/Obi/Resources/Compute/HeightfieldShape.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d9efd384bb82b4ec0b0adf1fc349a89b -ComputeShaderImporter: - externalObjects: {} - preprocessorOverride: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/InertialFrame.cginc b/Assets/Obi/Resources/Compute/InertialFrame.cginc deleted file mode 100644 index fe1da60c9..000000000 --- a/Assets/Obi/Resources/Compute/InertialFrame.cginc +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef INERTIALFRAME_INCLUDE -#define INERTIALFRAME_INCLUDE - -#include "Transform.cginc" - -struct inertialFrame -{ - transform frame; - transform prevFrame; - - float4 velocity; - float4 angularVelocity; - - float4 acceleration; - float4 angularAcceleration; - - float4 velocityAtPoint(float4 pnt) - { - return velocity + float4(cross(angularVelocity.xyz, (pnt - prevFrame.translation).xyz), 0); - } -}; - -#endif \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/InertialFrame.cginc.meta b/Assets/Obi/Resources/Compute/InertialFrame.cginc.meta deleted file mode 100644 index ed4916d3e..000000000 --- a/Assets/Obi/Resources/Compute/InertialFrame.cginc.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 2d21eb1b3353a439eb5f6f6df05dd6d0 -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/InstancedParticleRendering.compute b/Assets/Obi/Resources/Compute/InstancedParticleRendering.compute deleted file mode 100644 index b07c7bc89..000000000 --- a/Assets/Obi/Resources/Compute/InstancedParticleRendering.compute +++ /dev/null @@ -1,44 +0,0 @@ -#pragma kernel UpdateParticleInstances - -#include "PathFrame.cginc" - -struct RendererData -{ - float4 color; - float radiusScale; -}; - -StructuredBuffer activeParticles; -StructuredBuffer rendererData; -StructuredBuffer rendererIndex; - -StructuredBuffer renderablePositions; -StructuredBuffer renderableOrientations; -StructuredBuffer renderableRadii; -StructuredBuffer colors; -float4x4 solverToWorld; - -RWStructuredBuffer instanceTransforms; -RWStructuredBuffer invInstanceTransforms; -RWStructuredBuffer instanceColors; - -uint particleCount; - -[numthreads(128, 1, 1)] -void UpdateParticleInstances (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - if (i >= particleCount) return; - - int p = activeParticles[i]; - - float4x4 tfrm = TRS(renderablePositions[p].xyz, - renderableOrientations[p], - renderableRadii[p].xyz * renderableRadii[p][3] * rendererData[rendererIndex[i]].radiusScale); - - instanceTransforms[i] = mul(solverToWorld, tfrm); - - instanceColors[i] = colors[p] * rendererData[rendererIndex[i]].color; - - invInstanceTransforms[i] = Inverse(instanceTransforms[i]); -} \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/InstancedParticleRendering.compute.meta b/Assets/Obi/Resources/Compute/InstancedParticleRendering.compute.meta deleted file mode 100644 index a82b45e18..000000000 --- a/Assets/Obi/Resources/Compute/InstancedParticleRendering.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d2b27c5c6c8154b6694d7e017468ccc0 -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 65536 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/Integration.cginc b/Assets/Obi/Resources/Compute/Integration.cginc deleted file mode 100644 index fc9edd611..000000000 --- a/Assets/Obi/Resources/Compute/Integration.cginc +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef INTEGRATION_INCLUDE -#define INTEGRATION_INCLUDE - -#include "Quaternion.cginc" - -float4 IntegrateLinear(float4 position, float4 velocity, float dt) -{ - return position + velocity * dt; -} - -float4 DifferentiateLinear(float4 position, float4 prevPosition, float dt) -{ - return (position - prevPosition) / dt; -} - -quaternion AngularVelocityToSpinQuaternion(quaternion rotation, float4 angularVelocity, float dt) -{ - quaternion delta = quaternion(angularVelocity.x, - angularVelocity.y, - angularVelocity.z, 0); - - return quaternion(0.5f * qmul(delta,rotation) * dt); -} - -quaternion IntegrateAngular(quaternion rotation, float4 angularVelocity, float dt) -{ - rotation += AngularVelocityToSpinQuaternion(rotation,angularVelocity, dt); - return normalize(rotation); -} - -float4 DifferentiateAngular(quaternion rotation, quaternion prevRotation, float dt) -{ - quaternion deltaq = qmul(rotation, q_conj(prevRotation)); - float s = deltaq.w >= 0 ? 1 : -1; - return float4(s * deltaq.xyz * 2.0f / dt, 0); -} - -#endif \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/Integration.cginc.meta b/Assets/Obi/Resources/Compute/Integration.cginc.meta deleted file mode 100644 index 7940d0152..000000000 --- a/Assets/Obi/Resources/Compute/Integration.cginc.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: d436b0155e8f943d59a26290140664cd -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/InterlockedUtils.cginc b/Assets/Obi/Resources/Compute/InterlockedUtils.cginc deleted file mode 100644 index 06f227295..000000000 --- a/Assets/Obi/Resources/Compute/InterlockedUtils.cginc +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef INTERLOCKEDUTILS_INCLUDE -#define INTERLOCKEDUTILS_INCLUDE - -void InterlockedAddFloat(RWStructuredBuffer buffer, int index, int axis, float value) -{ - uint i_val = asuint(value); - uint tmp0 = 0; - uint tmp1; - - [allow_uav_condition] - while (true) - { - InterlockedCompareExchange(buffer[index][axis], tmp0, i_val, tmp1); - - if (tmp1 == tmp0) - break; - - tmp0 = tmp1; - i_val = asuint(value + asfloat(tmp1)); - } - - return; -} - -void InterlockedAddFloat(RWStructuredBuffer buffer, int index, float value) -{ - uint i_val = asuint(value); - uint tmp0 = 0; - uint tmp1; - - [allow_uav_condition] - while (true) - { - InterlockedCompareExchange(buffer[index], tmp0, i_val, tmp1); - - if (tmp1 == tmp0) - break; - - tmp0 = tmp1; - i_val = asuint(value + asfloat(tmp1)); - } - - return; -} - -#endif \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/InterlockedUtils.cginc.meta b/Assets/Obi/Resources/Compute/InterlockedUtils.cginc.meta deleted file mode 100644 index c09fa844e..000000000 --- a/Assets/Obi/Resources/Compute/InterlockedUtils.cginc.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: bb532ce1395da4d13b47a4da3e1b4033 -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/MathUtils.cginc b/Assets/Obi/Resources/Compute/MathUtils.cginc deleted file mode 100644 index fd60de55d..000000000 --- a/Assets/Obi/Resources/Compute/MathUtils.cginc +++ /dev/null @@ -1,648 +0,0 @@ -#ifndef MATHUTILS_INCLUDE -#define MATHUTILS_INCLUDE - -#define PI 3.14159265359f -#define SQRT2 1.41421356237f -#define SQRT3 1.73205080757f -#define EPSILON 0.0000001f -#define FLT_MAX 3.402823466e+38 -#define FLT_MIN 1.175494351e-38 - -#define FLOAT4_ZERO float4(0, 0, 0, 0) -#define FLOAT4_EPSILON float4(EPSILON, EPSILON, EPSILON, EPSILON) - -#define zero 0 -#define one 1 - -#define PHASE_SELFCOLLIDE (1 << 24) -#define PHASE_FLUID (1 << 25) -#define PHASE_ONESIDED (1 << 26) -#define PHASE_ISOLATED (1 << 27) // particles that are not part of persistent constraints and can be deleted without ill effects: fluids and granulars - -#include "Quaternion.cginc" -#include "Matrix.cginc" - -// Based on Kubelka-Munk theory: https://vanity-ibex.xyz/blog/kubelka_munk_colormixing/ -float4 RGBToAbsorption(float4 rgb) -{ - // S (scattering) is assumed to be 1 for all channels - float4 k; - k.r = pow(1 - rgb.r, 2) / (2 * rgb.r + EPSILON); - k.g = pow(1 - rgb.g, 2) / (2 * rgb.g + EPSILON); - k.b = pow(1 - rgb.b, 2) / (2 * rgb.b + EPSILON); - k.a = rgb.a; - return k; -} - -// Based on Kubelka-Munk theory: https://vanity-ibex.xyz/blog/kubelka_munk_colormixing/ -float4 AbsorptionToRGB(float4 k) -{ - // Assuming S=1 for all channels - float4 rgb; - rgb.r = 1 + k.r - sqrt(k.r * (k.r + 2)); - rgb.g = 1 + k.g - sqrt(k.g * (k.g + 2)); - rgb.b = 1 + k.b - sqrt(k.b * (k.b + 2)); - rgb.a = k.a; - return rgb; -} - -//https://www.shadertoy.com/view/4djSRW -float3 hash33(float3 p3) -{ - p3 = frac(p3 * float3(.1031, .1030, .0973)); - p3 += dot(p3, p3.yxz+33.33); - return frac((p3.xxy + p3.yxx)*p3.zyx); -} - -float hash13(float3 p3) -{ - p3 = frac(p3 * .1031); - p3 += dot(p3, p3.zyx + 31.32); - return frac((p3.x + p3.y) * p3.z); -} - -float2 hash21(float p) -{ - float3 p3 = frac(float3(p,p,p) * float3(.1031, .1030, .0973)); - p3 += dot(p3, p3.yzx + 33.33); - return frac((p3.xx+p3.yz)*p3.zy); -} - -float3 hash31(float p) -{ - float3 p3 = frac(float3(p,p,p) * float3(.1031f, .1030f, .0973f)); - p3 += dot(p3, p3.yzx + 33.33f); - return frac((p3.xxy + p3.yzz) * p3.zyx); -} - -float4 normalizesafe(in float4 v, float4 def = float4(0,0,0,0)) -{ - float len = length(v); - return (len < EPSILON) ? def : v/len; -} - -float3 normalizesafe(in float3 v, float3 def = float3(0,0,0)) -{ - float len = length(v); - return (len < EPSILON) ? def : v/len; -} - -inline float cmax( in float3 v) -{ - return max(max(v.x,v.y),v.z); -} - -inline float3 nfmod(float3 a, float3 b) -{ - return a - b * floor(a / b); -} - -inline float BaryScale(float4 coords) -{ - return 1.0 / dot(coords, coords); -} - -float Remap01(float value, float min_, float max_) -{ - return (min(value, max_) - min(value, min_)) / (max_ - min_); -} - -float Remap(float value, float min_, float max_, float newmin_, float newmax_) -{ - return newmin_ + (value - min_) * (newmax_ - newmin_) / (max_ - min_); -} - -float EllipsoidRadius(float4 normSolverDirection, quaternion orientation, float3 radii) -{ - float3 localDir = rotate_vector(q_conj(orientation), normSolverDirection.xyz) / radii; - float sqrNorm = dot(localDir, localDir); - return sqrNorm > EPSILON ? sqrt(1 / sqrNorm) : radii.x; -} - -float4 Project(float4 v, float4 onto) -{ - float len = dot(onto,onto); - if (len < EPSILON) - return FLOAT4_ZERO; - return dot(onto, v) * onto / len; -} - -float3 Project(float3 v, float3 onto) -{ - float len = dot(onto,onto); - if (len < EPSILON) - return float3(0,0,0); - return dot(onto, v) * onto / len; -} - -inline void OneSidedNormal(float4 forward, inout float4 normal) -{ - float d = dot(normal.xyz, forward.xyz); - if (d < 0) normal -= 2 * d * forward; -} - -quaternion ExtractRotation(float3x3 m, quaternion rotation, int iterations) -{ - float4x4 R; - for (int i = 0; i < iterations; ++i) - { - R = q_toMatrix(rotation); - float3 omega = (cross(R._m00_m10_m20, m._m00_m10_m20) + cross(R._m01_m11_m21, m._m01_m11_m21) + cross(R._m02_m12_m22, m._m02_m12_m22)) / - (abs(dot(R._m00_m10_m20, m._m00_m10_m20) + dot(R._m01_m11_m21, m._m01_m11_m21) + dot(R._m02_m12_m22, m._m02_m12_m22)) + EPSILON); - - float w = length(omega); - if (w < EPSILON) - break; - - rotation = normalize(qmul(axis_angle((1.0f / w) * omega, w), rotation)); - } - return rotation; -} - -quaternion ExtractRotation(float4x4 m, quaternion rotation, int iterations) -{ - return ExtractRotation((float3x3) m, rotation, iterations); -} - -float4 GetParticleInertiaTensor(in float4 principalRadii, in float invRotationalMass) -{ - float4 sqrRadii = principalRadii * principalRadii; - return 0.2f / (invRotationalMass + EPSILON) * float4(sqrRadii[1] + sqrRadii[2], - sqrRadii[0] + sqrRadii[2], - sqrRadii[0] + sqrRadii[1], 0); -} - -float4x4 TransformInertiaTensor(float4 tensor, quaternion rotation) -{ - float4x4 rotMatrix = q_toMatrix(rotation); - return mul(rotMatrix, mul(AsDiagonal(tensor), transpose(rotMatrix))); -} - -float RotationalInvMass(float4x4 inverseInertiaTensor, float4 pos, float4 direction) -{ - float4 cr = mul(inverseInertiaTensor, float4(cross(pos.xyz, direction.xyz), 0)); - return dot(cross(cr.xyz, pos.xyz), direction.xyz); -} - -float RaySphereIntersection(float3 rayOrigin, float3 rayDirection, float3 center, float radius) -{ - float3 oc = rayOrigin - center; - - float a = dot(rayDirection, rayDirection); - float b = 2.0 * dot(oc, rayDirection); - float c = dot(oc, oc) - radius * radius; - float discriminant = b * b - 4 * a * c; - if (discriminant < 0){ - return -1.0f; - } - else{ - return (-b - sqrt(discriminant)) / (2.0f * a); - } -} - -struct CachedEdge -{ - float4 vertex; - float4 edge0; - float data; - - void Cache(in float4 v1, - in float4 v2) - { - vertex = v1; - vertex.w = 0; - edge0 = v2 - v1; - edge0.w = 0; - data = dot(edge0, edge0); - } -}; - -float4 NearestPointOnEdge(CachedEdge edge, float4 p, out float mu, bool clampToSegment = true) -{ - float4 ap = p - edge.vertex; - ap.w = 0; - - mu = dot(ap, edge.edge0) / (edge.data + EPSILON); - - if (clampToSegment) - mu = saturate(mu); - - float4 result = edge.vertex + edge.edge0 * mu; - result.w = 0; - return result; -} - -float4 NearestPointOnEdge(float4 a, float4 b, float4 p, out float mu, bool clampToSegment = true) -{ - float4 ap = p - a; - float4 ab = b - a; - ap.w = 0; - ab.w = 0; - - mu = dot(ap, ab) / (dot(ab, ab) + EPSILON); - - if (clampToSegment) - mu = saturate(mu); - - float4 result = a + ab * mu; - result.w = 0; - return result; -} - -float3 NearestPointOnEdge(float3 a, float3 b, float3 p, out float mu, bool clampToSegment = true) -{ - float3 ap = p - a; - float3 ab = b - a; - - mu = dot(ap, ab) / (dot(ab, ab) + EPSILON); - - if (clampToSegment) - mu = saturate(mu); - - float3 result = a + ab * mu; - return result; -} - -struct CachedTri -{ - float4 vertex; - float4 edge0; - float4 edge1; - float4 data; - - void Cache(in float4 v1, - in float4 v2, - in float4 v3) - { - vertex = v1; - edge0 = v2 - v1; - edge1 = v3 - v1; - data = float4(0,0,0,0); - data[0] = dot(edge0, edge0); - data[1] = dot(edge0, edge1); - data[2] = dot(edge1, edge1); - data[3] = data[0] * data[2] - data[1] * data[1]; - } -}; - -float4 NearestPointOnTri(in CachedTri tri, - in float4 p, - out float4 bary) -{ - float4 v0 = tri.vertex - p; - float b0 = dot(tri.edge0, v0); - float b1 = dot(tri.edge1, v0); - float t0 = tri.data[1] * b1 - tri.data[2] * b0; - float t1 = tri.data[1] * b0 - tri.data[0] * b1; - - if (t0 + t1 <= tri.data[3]) - { - if (t0 < zero) - { - if (t1 < zero) // region 4 - { - if (b0 < zero) - { - t1 = zero; - if (-b0 >= tri.data[0]) // V0 - t0 = one; - else // E01 - t0 = -b0 / tri.data[0]; - } - else - { - t0 = zero; - if (b1 >= zero) // V0 - t1 = zero; - else if (-b1 >= tri.data[2]) // V2 - t1 = one; - else // E20 - t1 = -b1 / tri.data[2]; - } - } - else // region 3 - { - t0 = zero; - if (b1 >= zero) // V0 - t1 = zero; - else if (-b1 >= tri.data[2]) // V2 - t1 = one; - else // E20 - t1 = -b1 / tri.data[2]; - } - } - else if (t1 < zero) // region 5 - { - t1 = zero; - if (b0 >= zero) // V0 - t0 = zero; - else if (-b0 >= tri.data[0]) // V1 - t0 = one; - else // E01 - t0 = -b0 / tri.data[0]; - } - else // region 0, interior - { - float invDet = one / tri.data[3]; - t0 *= invDet; - t1 *= invDet; - } - } - else - { - float tmp0, tmp1, numer, denom; - - if (t0 < zero) // region 2 - { - tmp0 = tri.data[1] + b0; - tmp1 = tri.data[2] + b1; - if (tmp1 > tmp0) - { - numer = tmp1 - tmp0; - denom = tri.data[0] - 2 * tri.data[1] + tri.data[2]; - if (numer >= denom) // V1 - { - t0 = one; - t1 = zero; - } - else // E12 - { - t0 = numer / denom; - t1 = one - t0; - } - } - else - { - t0 = zero; - if (tmp1 <= zero) // V2 - t1 = one; - else if (b1 >= zero) // V0 - t1 = zero; - else // E20 - t1 = -b1 / tri.data[2]; - } - } - else if (t1 < zero) // region 6 - { - tmp0 = tri.data[1] + b1; - tmp1 = tri.data[0] + b0; - if (tmp1 > tmp0) - { - numer = tmp1 - tmp0; - denom = tri.data[0] - 2 * tri.data[1] + tri.data[2]; - if (numer >= denom) // V2 - { - t1 = one; - t0 = zero; - } - else // E12 - { - t1 = numer / denom; - t0 = one - t1; - } - } - else - { - t1 = zero; - if (tmp1 <= zero) // V1 - t0 = one; - else if (b0 >= zero) // V0 - t0 = zero; - else // E01 - t0 = -b0 / tri.data[0]; - } - } - else // region 1 - { - numer = tri.data[2] + b1 - tri.data[1] - b0; - if (numer <= zero) // V2 - { - t0 = zero; - t1 = one; - } - else - { - denom = tri.data[0] - 2 * tri.data[1] + tri.data[2]; - if (numer >= denom) // V1 - { - t0 = one; - t1 = zero; - } - else // 12 - { - t0 = numer / denom; - t1 = one - t0; - } - } - } - } - - bary = float4(1 - (t0 + t1), t0, t1,0); - return tri.vertex + t0 * tri.edge0 + t1 * tri.edge1; -} - -float3 unitOrthogonal(float3 input) -{ - // Find a vector to cross() the input with. - if (!(input.x < input.z * EPSILON) - || !(input.y < input.z * EPSILON)) - { - float invnm = 1 / length(input.xy); - return float3(-input.y * invnm, input.x * invnm, 0); - } - else - { - float invnm = 1 / length(input.yz); - return float3(0, -input.z * invnm, input.y * invnm); - } -} - -// D is symmetric, S is an eigen value -float3 EigenVector(float3x3 D, float S) -{ - // Compute a cofactor matrix of D - sI. - float3 c0 = D._m00_m10_m20; c0[0] -= S; - float3 c1 = D._m01_m11_m21; c1[1] -= S; - float3 c2 = D._m02_m12_m22; c2[2] -= S; - - // Upper triangular matrix - float3 c0p = float3(c1[1] * c2[2] - c2[1] * c2[1], 0, 0); - float3 c1p = float3(c2[1] * c2[0] - c1[0] * c2[2], c0[0] * c2[2] - c2[0] * c2[0], 0); - float3 c2p = float3(c1[0] * c2[1] - c1[1] * c2[0], c1[0] * c2[0] - c0[0] * c2[1], c0[0] * c1[1] - c1[0] * c1[0]); - - // Get a column vector with a largest norm (non-zero). - float C01s = c1p[0] * c1p[0]; - float C02s = c2p[0] * c2p[0]; - float C12s = c2p[1] * c2p[1]; - float3 norm = float3(c0p[0] * c0p[0] + C01s + C02s, - C01s + c1p[1] * c1p[1] + C12s, - C02s + C12s + c2p[2] * c2p[2]); - - // index of largest: - int index = 0; - if (norm[0] > norm[1] && norm[0] > norm[2]) - index = 0; - else if (norm[1] > norm[0] && norm[1] > norm[2]) - index = 1; - else - index = 2; - - float3 V = float3(0,0,0); - - // special case - if (norm[index] < EPSILON) - { - V[0] = 1; return V; - } - else if (index == 0) - { - V[0] = c0p[0]; V[1] = c1p[0]; V[2] = c2p[0]; - return normalize(V); - } - else if (index == 1) - { - V[0] = c1p[0]; V[1] = c1p[1]; V[2] = c2p[1]; - return normalize(V); - } - else - { - V = c2p; - return normalize(V); - } -} - -static float3 EigenValues(float3x3 D) -{ - float one_third = 1 / 3.0f; - float one_sixth = 1 / 6.0f; - float three_sqrt = sqrt(3.0f); - - float3 c0 = D._m00_m10_m20; - float3 c1 = D._m01_m11_m21; - float3 c2 = D._m02_m12_m22; - - float m = one_third * (c0[0] + c1[1] + c2[2]); - - // K is D - I*diag(S) - float K00 = c0[0] - m; - float K11 = c1[1] - m; - float K22 = c2[2] - m; - - float K01s = c1[0] * c1[0]; - float K02s = c2[0] * c2[0]; - float K12s = c2[1] * c2[1]; - - float q = 0.5f * (K00 * (K11 * K22 - K12s) - K22 * K01s - K11 * K02s) + c1[0] * c2[1] * c0[2]; - float p = one_sixth * (K00 * K00 + K11 * K11 + K22 * K22 + 2 * (K01s + K02s + K12s)); - - float p_sqrt = sqrt(p); - - float tmp = p * p * p - q * q; - float phi = one_third * atan2(sqrt(max(0, tmp)), q); - float phi_c = cos(phi); - float phi_s = sin(phi); - float sqrt_p_c_phi = p_sqrt * phi_c; - float sqrt_p_3_s_phi = p_sqrt * three_sqrt * phi_s; - - float e0 = m + 2 * sqrt_p_c_phi; - float e1 = m - sqrt_p_c_phi - sqrt_p_3_s_phi; - float e2 = m - sqrt_p_c_phi + sqrt_p_3_s_phi; - - float aux; - if (e0 > e1) - { - aux = e0; - e0 = e1; - e1 = aux; - } - if (e0 > e2) - { - aux = e0; - e0 = e2; - e2 = aux; - } - if (e1 > e2) - { - aux = e1; - e1 = e2; - e2 = aux; - } - - return float3(e2, e1, e0); -} - -void EigenSolve(float3x3 D, out float3 S, out float3x3 V) -{ - // D is symmetric - // S is a vector whose elements are eigenvalues - // V is a matrix whose columns are eigenvectors - S = EigenValues(D); - float3 V0, V1, V2; - - if (S[0] - S[1] > S[1] - S[2]) - { - V0 = EigenVector(D, S[0]); - if (S[1] - S[2] < EPSILON) - { - V2 = unitOrthogonal(V0); - } - else - { - V2 = EigenVector(D, S[2]); V2 -= V0 * dot(V0, V2); V2 = normalize(V2); - } - V1 = cross(V2, V0); - } - else - { - V2 = EigenVector(D, S[2]); - if (S[0] - S[1] < EPSILON) - { - V1 = unitOrthogonal(V2); - } - else - { - V1 = EigenVector(D, S[1]); V1 -= V2 * dot(V2, V1); V1 = normalize(V1); - } - V0 = cross(V1, V2); - } - - V._m00_m10_m20 = V0; - V._m01_m11_m21 = V1; - V._m02_m12_m22 = V2; -} - -float4 UnpackFloatRGBA(float v) -{ - uint rgba = asuint(v); - float r = ((rgba & 0xff000000) >> 24) / 255.0; - float g = ((rgba & 0x00ff0000) >> 16) / 255.0; - float b = ((rgba & 0x0000ff00) >> 8) / 255.0; - float a = (rgba & 0x000000ff) / 255.0; - return float4(r, g, b, a); -} - -float PackFloatRGBA(float4 enc) -{ - uint rgba = ((uint)(enc.x * 255.0) << 24) + - ((uint)(enc.y * 255.0) << 16) + - ((uint)(enc.z * 255.0) << 8) + - (uint)(enc.w * 255.0); - return asfloat(rgba); -} - -float2 UnpackFloatRG(float v) -{ - uint rgba = asuint(v); - float r = ((rgba & 0xffff0000) >> 16) / 65535.0; - float g = (rgba & 0x0000ffff) / 65535.0; - return float2(r, g); -} - -float PackFloatRG(float2 enc) -{ - uint rgba = ((uint)(enc.x * 65535.0) << 16) + - (uint)(enc.y * 65535.0); - return asfloat(rgba); -} - -#endif \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/MathUtils.cginc.meta b/Assets/Obi/Resources/Compute/MathUtils.cginc.meta deleted file mode 100644 index 43b30e62e..000000000 --- a/Assets/Obi/Resources/Compute/MathUtils.cginc.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 729e4f240dd344abfa1b0972b2ceb0ea -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/Matrix.cginc b/Assets/Obi/Resources/Compute/Matrix.cginc deleted file mode 100644 index 5a1bf98e0..000000000 --- a/Assets/Obi/Resources/Compute/Matrix.cginc +++ /dev/null @@ -1,108 +0,0 @@ -#ifndef MATRIX_INCLUDE -#define MATRIX_INCLUDE - -#define FLOAT4X4_IDENTITY float4x4(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1) -#define FLOAT3X3_IDENTITY float3x3(1, 0, 0, 0, 1, 0, 0, 0, 1) -#define FLOAT4X4_ZERO float4x4(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) -#define FLOAT3X3_ZERO float3x3(0, 0, 0, 0, 0, 0, 0, 0, 0) - -#include "Quaternion.cginc" - -float4x4 Inverse(float4x4 m) -{ - float n11 = m[0][0], n12 = m[1][0], n13 = m[2][0], n14 = m[3][0]; - float n21 = m[0][1], n22 = m[1][1], n23 = m[2][1], n24 = m[3][1]; - float n31 = m[0][2], n32 = m[1][2], n33 = m[2][2], n34 = m[3][2]; - float n41 = m[0][3], n42 = m[1][3], n43 = m[2][3], n44 = m[3][3]; - - float t11 = n23 * n34 * n42 - n24 * n33 * n42 + n24 * n32 * n43 - n22 * n34 * n43 - n23 * n32 * n44 + n22 * n33 * n44; - float t12 = n14 * n33 * n42 - n13 * n34 * n42 - n14 * n32 * n43 + n12 * n34 * n43 + n13 * n32 * n44 - n12 * n33 * n44; - float t13 = n13 * n24 * n42 - n14 * n23 * n42 + n14 * n22 * n43 - n12 * n24 * n43 - n13 * n22 * n44 + n12 * n23 * n44; - float t14 = n14 * n23 * n32 - n13 * n24 * n32 - n14 * n22 * n33 + n12 * n24 * n33 + n13 * n22 * n34 - n12 * n23 * n34; - - float det = n11 * t11 + n21 * t12 + n31 * t13 + n41 * t14; - float idet = 1.0f / det; - - float4x4 ret; - - ret[0][0] = t11 * idet; - ret[0][1] = (n24 * n33 * n41 - n23 * n34 * n41 - n24 * n31 * n43 + n21 * n34 * n43 + n23 * n31 * n44 - n21 * n33 * n44) * idet; - ret[0][2] = (n22 * n34 * n41 - n24 * n32 * n41 + n24 * n31 * n42 - n21 * n34 * n42 - n22 * n31 * n44 + n21 * n32 * n44) * idet; - ret[0][3] = (n23 * n32 * n41 - n22 * n33 * n41 - n23 * n31 * n42 + n21 * n33 * n42 + n22 * n31 * n43 - n21 * n32 * n43) * idet; - - ret[1][0] = t12 * idet; - ret[1][1] = (n13 * n34 * n41 - n14 * n33 * n41 + n14 * n31 * n43 - n11 * n34 * n43 - n13 * n31 * n44 + n11 * n33 * n44) * idet; - ret[1][2] = (n14 * n32 * n41 - n12 * n34 * n41 - n14 * n31 * n42 + n11 * n34 * n42 + n12 * n31 * n44 - n11 * n32 * n44) * idet; - ret[1][3] = (n12 * n33 * n41 - n13 * n32 * n41 + n13 * n31 * n42 - n11 * n33 * n42 - n12 * n31 * n43 + n11 * n32 * n43) * idet; - - ret[2][0] = t13 * idet; - ret[2][1] = (n14 * n23 * n41 - n13 * n24 * n41 - n14 * n21 * n43 + n11 * n24 * n43 + n13 * n21 * n44 - n11 * n23 * n44) * idet; - ret[2][2] = (n12 * n24 * n41 - n14 * n22 * n41 + n14 * n21 * n42 - n11 * n24 * n42 - n12 * n21 * n44 + n11 * n22 * n44) * idet; - ret[2][3] = (n13 * n22 * n41 - n12 * n23 * n41 - n13 * n21 * n42 + n11 * n23 * n42 + n12 * n21 * n43 - n11 * n22 * n43) * idet; - - ret[3][0] = t14 * idet; - ret[3][1] = (n13 * n24 * n31 - n14 * n23 * n31 + n14 * n21 * n33 - n11 * n24 * n33 - n13 * n21 * n34 + n11 * n23 * n34) * idet; - ret[3][2] = (n14 * n22 * n31 - n12 * n24 * n31 - n14 * n21 * n32 + n11 * n24 * n32 + n12 * n21 * n34 - n11 * n22 * n34) * idet; - ret[3][3] = (n12 * n23 * n31 - n13 * n22 * n31 + n13 * n21 * n32 - n11 * n23 * n32 - n12 * n21 * n33 + n11 * n22 * n33) * idet; - - return ret; -} - -float4x4 m_scale(float4x4 m, float3 v) -{ - float x = v.x, y = v.y, z = v.z; - - m[0][0] *= x; m[1][0] *= y; m[2][0] *= z; - m[0][1] *= x; m[1][1] *= y; m[2][1] *= z; - m[0][2] *= x; m[1][2] *= y; m[2][2] *= z; - m[0][3] *= x; m[1][3] *= y; m[2][3] *= z; - - return m; -} - -float4x4 m_translate(float4x4 m, float3 v) -{ - float x = v.x, y = v.y, z = v.z; - m[0][3] = x; - m[1][3] = y; - m[2][3] = z; - return m; -} - -float4x4 TRS(float3 position, float4 quat, float3 scale) -{ - float4x4 m = q_toMatrix(quat); - return float4x4(m[0][0] * scale.x, m[0][1] * scale.y, m[0][2] * scale.z, position.x, - m[1][0] * scale.x, m[1][1] * scale.y, m[1][2] * scale.z, position.y, - m[2][0] * scale.x, m[2][1] * scale.y, m[2][2] * scale.z, position.z, - 0, 0, 0, 1); -} - -float4x4 AsDiagonal(in float4 v) -{ - return float4x4(v.x, 0, 0, 0, - 0, v.y, 0, 0, - 0, 0, v.z, 0, - 0, 0, 0, v.w); -} - -float3x3 multrnsp(in float4 column, in float4 row) -{ - return float3x3(row.xyz * column[0],row.xyz * column[1],row.xyz * column[2]); -} - -float4x4 multrnsp4(in float4 column, float4 row) -{ - row[3] = 0; - return float4x4(row * column[0],row * column[1],row * column[2], float4(0,0,0,0)); -} - -float FrobeniusNorm(in float4x4 m) -{ - return sqrt(dot(m._m00_m10_m20_m30,m._m00_m10_m20_m30) + - dot(m._m01_m11_m21_m31,m._m01_m11_m21_m31) + - dot(m._m02_m12_m22_m32,m._m02_m12_m22_m32) + - dot(m._m03_m13_m23_m33,m._m03_m13_m23_m33)); -} - -#endif \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/Matrix.cginc.meta b/Assets/Obi/Resources/Compute/Matrix.cginc.meta deleted file mode 100644 index d6fefdd94..000000000 --- a/Assets/Obi/Resources/Compute/Matrix.cginc.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 80cddbfae548f433a93a4e6e7a10b089 -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/NormalCompression.cginc b/Assets/Obi/Resources/Compute/NormalCompression.cginc deleted file mode 100644 index 4fcc93d03..000000000 --- a/Assets/Obi/Resources/Compute/NormalCompression.cginc +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef NORMALCOMPRESSION_INCLUDE -#define NORMALCOMPRESSION_INCLUDE - -float2 octWrap( float2 v ) -{ - return ( 1.0 - abs( v.yx ) ) * ( v.xy >= 0.0 ? 1.0 : -1.0 ); -} - -// use octahedral encoding to reduce to 2 coords, then pack them as two 16 bit values in a 32 bit float. -float encode( float3 n ) -{ - n /= ( abs( n.x ) + abs( n.y ) + abs( n.z ) ); - n.xy = n.z >= 0.0 ? n.xy : octWrap( n.xy ); - n.xy = n.xy * 0.5 + 0.5; - uint nx = (uint)(n.x * 0xffff); - uint ny = (uint)(n.y * 0xffff); - return asfloat((nx << 16) | (ny & 0xffff)); -} - -// unpack 32 bit float into two 16 bit ones, then use octahedral decoding. -float3 decode( float k ) -{ - uint d = asuint(k); - float2 f = float2((d >> 16) / 65535.0, (d & 0xffff) / 65535.0) * 2.0 - 1.0; - - float3 n = float3( f.x, f.y, 1.0 - abs( f.x ) - abs( f.y ) ); - float t = saturate( -n.z ); - n.xy += n.xy >= 0.0 ? -t : t; - return normalize( n ); -} - -#endif \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/NormalCompression.cginc.meta b/Assets/Obi/Resources/Compute/NormalCompression.cginc.meta deleted file mode 100644 index d98da8185..000000000 --- a/Assets/Obi/Resources/Compute/NormalCompression.cginc.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: d05e07f20b7784bac93ad5818826c787 -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/Optimization.cginc b/Assets/Obi/Resources/Compute/Optimization.cginc deleted file mode 100644 index dbc54cd9d..000000000 --- a/Assets/Obi/Resources/Compute/Optimization.cginc +++ /dev/null @@ -1,126 +0,0 @@ -#ifndef OPTIMIZATION_INCLUDE -#define OPTIMIZATION_INCLUDE - -#include "MathUtils.cginc" -#include "SurfacePoint.cginc" - -void GetInterpolatedSimplexData(in int simplexStart, - in int simplexSize, - StructuredBuffer simplices, - StructuredBuffer positions, - StructuredBuffer orientations, - StructuredBuffer radii, - float4 convexBary, - inout float4 convexPoint, - inout float4 convexRadii, - inout float4 convexOrientation) -{ - convexPoint = FLOAT4_ZERO; - convexRadii = FLOAT4_ZERO; - convexOrientation = quaternion(0, 0, 0, 0); - for (int j = 0; j < simplexSize; ++j) - { - int particle = simplices[simplexStart + j]; - convexPoint += positions[particle] * convexBary[j]; - convexRadii += radii[particle] * convexBary[j]; - convexOrientation += orientations[particle] * convexBary[j]; - } - convexPoint.w = 0; -} - -// Frank-Wolfe convex optimization algorithm. Returns closest point to a simplex in a signed distance function. -void FrankWolfe(in IDistanceFunction f, - in int simplexStart, - in int simplexSize, - StructuredBuffer positions, - StructuredBuffer orientations, - StructuredBuffer radii, - StructuredBuffer simplices, - inout float4 convexPoint, - inout float4 convexThickness, - inout quaternion convexOrientation, - inout float4 convexBary, - inout SurfacePoint pointInFunction, - int maxIterations, - float tolerance) -{ - for (int i = 0; i < maxIterations; ++i) - { - // sample target function: - f.Evaluate(convexPoint, convexThickness, convexOrientation, pointInFunction); - - // find descent direction: - int descent = 0; - float gap = FLT_MIN; - for (int j = 0; j < simplexSize; ++j) - { - int particle = simplices[simplexStart + j]; - float4 candidate = positions[particle] - convexPoint; - candidate.w = 0; - - // here, we adjust the candidate by projecting it to the engrosed simplex's surface: - candidate -= pointInFunction.normal * (radii[particle].x - convexThickness.x); - - float corr = dot(-pointInFunction.normal, candidate); - if (corr > gap) - { - descent = j; - gap = corr; - } - } - - // if the duality gap is below tolerance threshold, stop iterating. - if (gap < tolerance) - break; - - // update the barycentric coords using 2/(i+2) as the step factor - float stp = 0.3f * 2.0f / (i + 2); - convexBary *= 1 - stp; - switch(descent) - { - case 0: convexBary[0] += stp;break; - case 1: convexBary[1] += stp;break; - case 2: convexBary[2] += stp;break; - case 3: convexBary[3] += stp;break; - } - - // get cartesian coordinates of current solution: - GetInterpolatedSimplexData(simplexStart, simplexSize, simplices, positions, orientations, radii, convexBary, convexPoint, convexThickness, convexOrientation); - } -} - -SurfacePoint Optimize(in IDistanceFunction f, - StructuredBuffer positions, - StructuredBuffer orientations, - StructuredBuffer radii, - StructuredBuffer simplices, - in int simplexStart, - in int simplexSize, - inout float4 convexBary, - out float4 convexPoint, - in int maxIterations = 16, - in float tolerance = 0.004f) -{ - SurfacePoint pointInFunction; - - // get cartesian coordinates of the initial guess: - float4 convexThickness; - quaternion convexOrientation; - GetInterpolatedSimplexData(simplexStart, simplexSize, simplices, positions, orientations, radii, convexBary, convexPoint, convexThickness, convexOrientation); - - // for a 0-simplex (point), perform a single evaluation: - if (simplexSize == 1 || maxIterations < 1) - f.Evaluate(convexPoint, convexThickness, convexOrientation, pointInFunction); - - // for a 1-simplex (edge), perform golden ratio search: - //else if (simplexSize == 2) - // GoldenSearch(ref function, simplexStart, simplexSize, positions, orientations, radii, simplices, ref convexPoint, ref convexThickness, ref convexOrientation, ref convexBary, ref pointInFunction, maxIterations, tolerance * 10); - - // for higher-order simplices, use general Frank-Wolfe convex optimization: - else - FrankWolfe(f, simplexStart, simplexSize, positions, orientations, radii, simplices, convexPoint, convexThickness, convexOrientation, convexBary, pointInFunction, maxIterations, tolerance); - - return pointInFunction; -} - -#endif \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/Optimization.cginc.meta b/Assets/Obi/Resources/Compute/Optimization.cginc.meta deleted file mode 100644 index fe513de18..000000000 --- a/Assets/Obi/Resources/Compute/Optimization.cginc.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: e10fb000e4ce24365adc488a45bbe664 -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/ParticleCollisionConstraints.compute b/Assets/Obi/Resources/Compute/ParticleCollisionConstraints.compute deleted file mode 100644 index 64a99c0c2..000000000 --- a/Assets/Obi/Resources/Compute/ParticleCollisionConstraints.compute +++ /dev/null @@ -1,214 +0,0 @@ -#pragma kernel Initialize -#pragma kernel Project -#pragma kernel Apply - -#include "SolverParameters.cginc" -#include "ContactHandling.cginc" -#include "ColliderDefinitions.cginc" -#include "CollisionMaterial.cginc" -#include "Simplex.cginc" -#include "AtomicDeltas.cginc" - - -StructuredBuffer particleIndices; - -StructuredBuffer simplices; -StructuredBuffer invMasses; -StructuredBuffer invRotationalMasses; -StructuredBuffer principalRadii; -StructuredBuffer velocities; -StructuredBuffer prevPositions; -StructuredBuffer fluidInterface; -StructuredBuffer prevOrientations; -StructuredBuffer orientations; - -RWStructuredBuffer positions; -RWStructuredBuffer deltas; -RWStructuredBuffer userData; - -// Vulkan workaround: don't declare a RW array after a counter/append one (particleContacts) since the counter overlaps the first entry in the next array. -RWStructuredBuffer effectiveMasses; -RWStructuredBuffer particleContacts; -StructuredBuffer dispatchBuffer; - -// Variables set from the CPU -uint particleCount; -float substepTime; -float sorFactor; - -[numthreads(128, 1, 1)] -void Initialize (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= dispatchBuffer[3]) return; - - int simplexSizeA; - int simplexSizeB; - int simplexStartA = GetSimplexStartAndSize(particleContacts[i].bodyA, simplexSizeA); - int simplexStartB = GetSimplexStartAndSize(particleContacts[i].bodyB, simplexSizeB); - - float4 simplexVelocityA = float4(0,0,0,0); - float4 simplexPrevPositionA = float4(0,0,0,0); - quaternion simplexPrevOrientationA = quaternion(0, 0, 0, 0); - float simplexRadiusA = 0; - float simplexInvMassA = 0; - float simplexInvRotationalMassA = 0; - - float4 simplexVelocityB = float4(0,0,0,0); - float4 simplexPrevPositionB = float4(0,0,0,0); - quaternion simplexPrevOrientationB = quaternion(0, 0, 0, 0); - float simplexRadiusB = 0; - float simplexInvMassB = 0; - float simplexInvRotationalMassB = 0; - - int j = 0; - for (j = 0; j < simplexSizeA; ++j) - { - int particleIndex = simplices[simplexStartA + j]; - simplexVelocityA += velocities[particleIndex] * particleContacts[i].pointA[j]; - simplexPrevPositionA += prevPositions[particleIndex] * particleContacts[i].pointA[j]; - simplexPrevOrientationA += prevOrientations[particleIndex] * particleContacts[i].pointA[j]; - simplexInvMassA += invMasses[particleIndex] * particleContacts[i].pointA[j]; - simplexInvRotationalMassA += invRotationalMasses[particleIndex] * particleContacts[i].pointA[j]; - simplexRadiusA += EllipsoidRadius(particleContacts[i].normal, prevOrientations[particleIndex], principalRadii[particleIndex].xyz) * particleContacts[i].pointA[j]; - } - - for (j = 0; j < simplexSizeB; ++j) - { - int particleIndex = simplices[simplexStartB + j]; - simplexVelocityB += velocities[particleIndex] * particleContacts[i].pointB[j]; - simplexPrevPositionB += prevPositions[particleIndex] * particleContacts[i].pointB[j]; - simplexPrevOrientationB += prevOrientations[particleIndex] * particleContacts[i].pointB[j]; - simplexInvMassB += invMasses[particleIndex] * particleContacts[i].pointB[j]; - simplexInvRotationalMassB += invRotationalMasses[particleIndex] * particleContacts[i].pointB[j]; - simplexRadiusB += EllipsoidRadius(particleContacts[i].normal, prevOrientations[particleIndex], principalRadii[particleIndex].xyz) * particleContacts[i].pointB[j]; - } - - simplexPrevPositionA.w = 0; - simplexPrevPositionB.w = 0; - - // update contact distance - float4 contactPointA = simplexPrevPositionA - particleContacts[i].normal * simplexRadiusA; - float4 contactPointB = simplexPrevPositionB + particleContacts[i].normal * simplexRadiusB; - - particleContacts[i].dist = dot(contactPointA - contactPointB, particleContacts[i].normal); - - // update contact basis: - CalculateBasis(simplexVelocityA - simplexVelocityB, particleContacts[i].normal,particleContacts[i].tangent); - - // update contact masses: - int aMaterialIndex = collisionMaterialIndices[simplices[simplexStartA]]; - int bMaterialIndex = collisionMaterialIndices[simplices[simplexStartB]]; - bool rollingContacts = (aMaterialIndex >= 0 ? collisionMaterials[aMaterialIndex].rollingContacts > 0 : false) | - (bMaterialIndex >= 0 ? collisionMaterials[bMaterialIndex].rollingContacts > 0 : false); - - float4 invInertiaTensorA = 1.0/(GetParticleInertiaTensor(simplexRadiusA, simplexInvRotationalMassA) + FLOAT4_EPSILON); - float4 invInertiaTensorB = 1.0/(GetParticleInertiaTensor(simplexRadiusB, simplexInvRotationalMassB) + FLOAT4_EPSILON); - - float4 bitangent = GetBitangent(particleContacts[i]); - CalculateContactMassesA(simplexInvMassA, invInertiaTensorA, simplexPrevPositionA, simplexPrevOrientationA, contactPointA, rollingContacts, particleContacts[i].normal,particleContacts[i].tangent,bitangent, effectiveMasses[i].normalInvMassA, effectiveMasses[i].tangentInvMassA, effectiveMasses[i].bitangentInvMassA); - CalculateContactMassesB(simplexInvMassB, invInertiaTensorB, simplexPrevPositionB, simplexPrevOrientationB, contactPointB, rollingContacts, particleContacts[i].normal,particleContacts[i].tangent,bitangent, effectiveMasses[i].normalInvMassB, effectiveMasses[i].tangentInvMassB, effectiveMasses[i].bitangentInvMassB); -} - -[numthreads(128, 1, 1)] -void Project (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= dispatchBuffer[3]) return; - - int simplexSizeA; - int simplexSizeB; - int simplexStartA = GetSimplexStartAndSize(particleContacts[i].bodyA, simplexSizeA); - int simplexStartB = GetSimplexStartAndSize(particleContacts[i].bodyB, simplexSizeB); - - // Combine collision materials (use material from first particle in simplex) - collisionMaterial material = CombineCollisionMaterials(collisionMaterialIndices[simplices[simplexStartA]], collisionMaterialIndices[simplices[simplexStartB]]); - - float4 simplexPositionA = FLOAT4_ZERO, simplexPositionB = FLOAT4_ZERO; - float simplexRadiusA = 0, simplexRadiusB = 0; - float4 simplexUserDataA = FLOAT4_ZERO, simplexUserDataB = FLOAT4_ZERO; - float miscibility = 0; - - int j = 0; - for (j = 0; j < simplexSizeA; ++j) - { - int particleIndex = simplices[simplexStartA + j]; - simplexPositionA += positions[particleIndex] * particleContacts[i].pointA[j]; - simplexRadiusA += EllipsoidRadius(particleContacts[i].normal, orientations[particleIndex], principalRadii[particleIndex].xyz) * particleContacts[i].pointA[j]; - simplexUserDataA += userData[particleIndex] * particleContacts[i].pointA[j]; - miscibility += fluidInterface[particleIndex].w * particleContacts[i].pointA[j]; - } - for (j = 0; j < simplexSizeB; ++j) - { - int particleIndex = simplices[simplexStartB + j]; - simplexPositionB += positions[particleIndex] * particleContacts[i].pointB[j]; - simplexRadiusB += EllipsoidRadius(particleContacts[i].normal, orientations[particleIndex], principalRadii[particleIndex].xyz) * particleContacts[i].pointA[j]; - simplexUserDataB += userData[particleIndex] * particleContacts[i].pointB[j]; - miscibility += fluidInterface[particleIndex].w * particleContacts[i].pointB[j]; - } - - simplexPositionA.w = 0; - simplexPositionB.w = 0; - - float4 posA = simplexPositionA - particleContacts[i].normal * simplexRadiusA; - float4 posB = simplexPositionB + particleContacts[i].normal * simplexRadiusB; - - float normalInvMass = effectiveMasses[i].normalInvMassA + effectiveMasses[i].normalInvMassB; - - // adhesion: - float lambda = SolveAdhesion(particleContacts[i], normalInvMass, posA, posB, material.stickDistance, material.stickiness, substepTime); - - lambda += SolvePenetration(particleContacts[i], normalInvMass, posA, posB, maxDepenetration * substepTime); - - if (abs(lambda) > EPSILON) - { - float shock = shockPropagation * dot(particleContacts[i].normal.xyz, normalizesafe(gravity)); - float4 delta = lambda * particleContacts[i].normal; - - float baryScale = BaryScale(particleContacts[i].pointA); - for (j = 0; j < simplexSizeA; ++j) - { - int particleIndex = simplices[simplexStartA + j]; - float4 delta1 = delta * invMasses[particleIndex] * particleContacts[i].pointA[j] * baryScale * (1 - shock); - AtomicAddPositionDelta(particleIndex, delta1); - } - - baryScale = BaryScale(particleContacts[i].pointB); - for (j = 0; j < simplexSizeB; ++j) - { - int particleIndex = simplices[simplexStartB + j]; - float4 delta2 = -delta * invMasses[particleIndex] * particleContacts[i].pointB[j] * baryScale * (1 + shock); - AtomicAddPositionDelta(particleIndex, delta2); - } - } - - // property diffusion: - if (particleContacts[i].dist < collisionMargin) - { - float diffusionSpeed = miscibility * 0.5 * substepTime; - float4 userDelta = (simplexUserDataB - simplexUserDataA) * diffusionMask * diffusionSpeed; - - for (j = 0; j < simplexSizeA; ++j) - AtomicAddOrientationDelta(simplices[simplexStartA + j], userDelta * particleContacts[i].pointA[j]); - - for (j = 0; j < simplexSizeB; ++j) - AtomicAddOrientationDelta(simplices[simplexStartB + j], -userDelta * particleContacts[i].pointB[j]); - } -} - -[numthreads(128, 1, 1)] -void Apply (uint3 id : SV_DispatchThreadID) -{ - unsigned int threadIndex = id.x; - - if (threadIndex >= particleCount) return; - - int p = particleIndices[threadIndex]; - - ApplyPositionDelta(positions, p, sorFactor); - ApplyUserDataDelta(userData, p); -} - - diff --git a/Assets/Obi/Resources/Compute/ParticleCollisionConstraints.compute.meta b/Assets/Obi/Resources/Compute/ParticleCollisionConstraints.compute.meta deleted file mode 100644 index e53cfc746..000000000 --- a/Assets/Obi/Resources/Compute/ParticleCollisionConstraints.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 770004596b21f49118a60c5ad181940c -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 65536 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/ParticleFrictionConstraints.compute b/Assets/Obi/Resources/Compute/ParticleFrictionConstraints.compute deleted file mode 100644 index 13c92607f..000000000 --- a/Assets/Obi/Resources/Compute/ParticleFrictionConstraints.compute +++ /dev/null @@ -1,187 +0,0 @@ -#pragma kernel Project -#pragma kernel Apply - -#include "ContactHandling.cginc" -#include "Integration.cginc" -#include "CollisionMaterial.cginc" -#include "Simplex.cginc" -#include "AtomicDeltas.cginc" - -StructuredBuffer particleIndices; -StructuredBuffer simplices; -StructuredBuffer prevPositions; -StructuredBuffer prevOrientations; -StructuredBuffer invMasses; -StructuredBuffer invRotationalMasses; -StructuredBuffer principalRadii; - -RWStructuredBuffer positions; -RWStructuredBuffer orientations; -RWStructuredBuffer deltas; - -RWStructuredBuffer particleContacts; -RWStructuredBuffer effectiveMasses; -StructuredBuffer dispatchBuffer; - -// Variables set from the CPU -uint particleCount; -float substepTime; -float stepTime; -float sorFactor; - -[numthreads(128, 1, 1)] -void Project (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= dispatchBuffer[3]) return; - - int simplexSizeA; - int simplexSizeB; - int simplexStartA = GetSimplexStartAndSize(particleContacts[i].bodyA, simplexSizeA); - int simplexStartB = GetSimplexStartAndSize(particleContacts[i].bodyB, simplexSizeB); - - // Combine collision materials (use material from first particle in simplex) - collisionMaterial material = CombineCollisionMaterials(collisionMaterialIndices[simplices[simplexStartA]], - collisionMaterialIndices[simplices[simplexStartB]]); - - float4 prevPositionA = float4(0,0,0,0); - float4 linearVelocityA = float4(0,0,0,0); - float4 angularVelocityA = float4(0,0,0,0); - float invRotationalMassA = 0; - quaternion orientationA = quaternion(0, 0, 0, 0); - float simplexRadiusA = 0; - - float4 prevPositionB = float4(0,0,0,0); - float4 linearVelocityB = float4(0,0,0,0); - float4 angularVelocityB = float4(0,0,0,0); - float invRotationalMassB = 0; - quaternion orientationB = quaternion(0, 0, 0, 0); - float simplexRadiusB = 0; - - int j = 0; - for (j = 0; j < simplexSizeA; ++j) - { - int particleIndex = simplices[simplexStartA + j]; - prevPositionA += prevPositions[particleIndex] * particleContacts[i].pointA[j]; - linearVelocityA += DifferentiateLinear(positions[particleIndex], prevPositions[particleIndex], substepTime) * particleContacts[i].pointA[j]; - angularVelocityA += DifferentiateAngular(orientations[particleIndex], prevOrientations[particleIndex], substepTime) * particleContacts[i].pointA[j]; - invRotationalMassA += invRotationalMasses[particleIndex] * particleContacts[i].pointA[j]; - orientationA += orientations[particleIndex] * particleContacts[i].pointA[j]; - simplexRadiusA += EllipsoidRadius(particleContacts[i].normal, prevOrientations[particleIndex], principalRadii[particleIndex].xyz) * particleContacts[i].pointA[j]; - } - - for (j = 0; j < simplexSizeB; ++j) - { - int particleIndex = simplices[simplexStartB + j]; - prevPositionB += prevPositions[particleIndex] * particleContacts[i].pointB[j]; - linearVelocityB += DifferentiateLinear(positions[particleIndex], prevPositions[particleIndex], substepTime) * particleContacts[i].pointB[j]; - angularVelocityB += DifferentiateAngular(orientations[particleIndex], prevOrientations[particleIndex], substepTime) * particleContacts[i].pointB[j]; - invRotationalMassB += invRotationalMasses[particleIndex] * particleContacts[i].pointB[j]; - orientationB += orientations[particleIndex] * particleContacts[i].pointB[j]; - simplexRadiusB += EllipsoidRadius(particleContacts[i].normal, prevOrientations[particleIndex], principalRadii[particleIndex].xyz) * particleContacts[i].pointB[j]; - } - - float4 rA = FLOAT4_ZERO; - float4 rB = FLOAT4_ZERO; - - // Consider angular velocities if rolling contacts are enabled: - if (material.rollingContacts > 0) - { - rA = -particleContacts[i].normal * simplexRadiusA; - rB = particleContacts[i].normal * simplexRadiusB; - - linearVelocityA += float4(cross(angularVelocityA.xyz, rA.xyz), 0); - linearVelocityB += float4(cross(angularVelocityB.xyz, rB.xyz), 0); - } - - // Calculate relative velocity: - float4 relativeVelocity = linearVelocityA - linearVelocityB; - - // Determine impulse magnitude: - float tangentMass = effectiveMasses[i].tangentInvMassA + effectiveMasses[i].tangentInvMassB; - float bitangentMass = effectiveMasses[i].bitangentInvMassA + effectiveMasses[i].bitangentInvMassB; - float2 impulses = SolveFriction(particleContacts[i],tangentMass,bitangentMass,relativeVelocity, material.staticFriction, material.dynamicFriction, stepTime); - - if (abs(impulses.x) > EPSILON || abs(impulses.y) > EPSILON) - { - float4 tangentImpulse = impulses.x * particleContacts[i].tangent; - float4 bitangentImpulse = impulses.y * GetBitangent(particleContacts[i]); - float4 totalImpulse = tangentImpulse + bitangentImpulse; - - float baryScale = BaryScale(particleContacts[i].pointA); - for (j = 0; j < simplexSizeA; ++j) - { - int particleIndex = simplices[simplexStartA + j]; - float4 delta1 = (tangentImpulse * effectiveMasses[i].tangentInvMassA + bitangentImpulse * effectiveMasses[i].bitangentInvMassA) * substepTime * particleContacts[i].pointA[j] * baryScale; - AtomicAddPositionDelta(particleIndex, delta1); - } - - baryScale = BaryScale(particleContacts[i].pointB); - for (j = 0; j < simplexSizeB; ++j) - { - int particleIndex = simplices[simplexStartB + j]; - float4 delta2 = -(tangentImpulse * effectiveMasses[i].tangentInvMassB + bitangentImpulse * effectiveMasses[i].bitangentInvMassB) * substepTime * particleContacts[i].pointB[j] * baryScale; - AtomicAddPositionDelta(particleIndex, delta2); - } - - // Rolling contacts: - if (material.rollingContacts > 0) - { - float4 invInertiaTensorA = 1.0/(GetParticleInertiaTensor(simplexRadiusA, invRotationalMassA) + FLOAT4_EPSILON); - float4 invInertiaTensorB = 1.0/(GetParticleInertiaTensor(simplexRadiusB, invRotationalMassB) + FLOAT4_EPSILON); - - // Calculate angular velocity deltas due to friction impulse: - float4x4 solverInertiaA = TransformInertiaTensor(invInertiaTensorA, orientationA); - float4x4 solverInertiaB = TransformInertiaTensor(invInertiaTensorB, orientationB); - - float4 angVelDeltaA = mul(solverInertiaA, float4(cross(rA.xyz, totalImpulse.xyz), 0)); - float4 angVelDeltaB = -mul(solverInertiaB, float4(cross(rB.xyz, totalImpulse.xyz), 0)); - - // Final angular velocities, after adding the deltas: - angularVelocityA += angVelDeltaA; - angularVelocityB += angVelDeltaB; - - // Calculate weights (inverse masses): - float invMassA = length(mul(solverInertiaA, normalizesafe(angularVelocityA))); - float invMassB = length(mul(solverInertiaB, normalizesafe(angularVelocityB))); - - // Calculate rolling axis and angular velocity deltas: - float4 rollAxis = FLOAT4_ZERO; - float rollingImpulse = SolveRollingFriction(particleContacts[i],angularVelocityA, angularVelocityB, material.rollingFriction, invMassA, invMassB, rollAxis); - angVelDeltaA += rollAxis * rollingImpulse * invMassA; - angVelDeltaB -= rollAxis * rollingImpulse * invMassB; - - // Apply orientation deltas to particles: - quaternion orientationDeltaA = AngularVelocityToSpinQuaternion(orientationA, angVelDeltaA, substepTime); - quaternion orientationDeltaB = AngularVelocityToSpinQuaternion(orientationB, angVelDeltaB, substepTime); - - for (j = 0; j < simplexSizeA; ++j) - { - int particleIndex = simplices[simplexStartA + j]; - AtomicAddOrientationDelta(particleIndex, orientationDeltaA); - } - - for (j = 0; j < simplexSizeB; ++j) - { - int particleIndex = simplices[simplexStartB + j]; - AtomicAddOrientationDelta(particleIndex, orientationDeltaB); - } - } - } -} - -[numthreads(128, 1, 1)] -void Apply (uint3 id : SV_DispatchThreadID) -{ - unsigned int threadIndex = id.x; - - if (threadIndex >= particleCount) return; - - int p = particleIndices[threadIndex]; - - ApplyPositionDelta(positions, p, sorFactor); - ApplyOrientationDelta(orientations, p, sorFactor); -} - - diff --git a/Assets/Obi/Resources/Compute/ParticleFrictionConstraints.compute.meta b/Assets/Obi/Resources/Compute/ParticleFrictionConstraints.compute.meta deleted file mode 100644 index 48a2a4d33..000000000 --- a/Assets/Obi/Resources/Compute/ParticleFrictionConstraints.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: bd14011b19e9c47d1964f351a7ed4df7 -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 65536 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/ParticleGrid.compute b/Assets/Obi/Resources/Compute/ParticleGrid.compute deleted file mode 100644 index a2cc43eb2..000000000 --- a/Assets/Obi/Resources/Compute/ParticleGrid.compute +++ /dev/null @@ -1,626 +0,0 @@ -#include "GridUtils.cginc" -#include "CollisionMaterial.cginc" -#include "ColliderDefinitions.cginc" -#include "ContactHandling.cginc" -#include "SolverParameters.cginc" -#include "Simplex.cginc" -#include "Phases.cginc" -#include "Bounds.cginc" -#include "Simplex.cginc" - -#pragma kernel Clear -#pragma kernel InsertSimplices -#pragma kernel FindPopulatedLevels -#pragma kernel SortSimplices -#pragma kernel BuildFluidDispatch -#pragma kernel SortFluidSimplices -#pragma kernel BuildMortonIndices -#pragma kernel MortonSort -#pragma kernel FindFluidNeighborsInSameLevel -#pragma kernel FindFluidNeighborsInUpperLevels -#pragma kernel BuildContactList -#pragma kernel BuildFluidParticleIndexBuffer - -StructuredBuffer solverBounds; -StructuredBuffer simplexBounds; -StructuredBuffer simplices; // particle indices in each simplex. - -StructuredBuffer positions; -StructuredBuffer restPositions; -StructuredBuffer principalRadii; -StructuredBuffer fluidMaterials; -StructuredBuffer fluidInterface; -StructuredBuffer normals; - -StructuredBuffer orientations; -StructuredBuffer restOrientations; - -StructuredBuffer velocities; -StructuredBuffer invMasses; -StructuredBuffer phases; -StructuredBuffer filters; - -StructuredBuffer R_cellCoords; // for each item, its cell coordinates. -StructuredBuffer R_offsetInCell; // for each item, its offset within the cell. -StructuredBuffer R_cellOffsets; // start of each cell in the sorted item array. -StructuredBuffer R_cellCounts; // number of item in each cell. -StructuredBuffer R_levelPopulation; - -RWStructuredBuffer cellCoords; // for each item, its cell coordinates. -RWStructuredBuffer offsetInCell; // for each item, its offset within the cell. -RWStructuredBuffer cellOffsets; // start of each cell in the sorted item array. -RWStructuredBuffer cellCounts; // number of item in each cell. - -RWStructuredBuffer cellHashToMortonIndex; - -RWStructuredBuffer mortonSortedCellHashes; -RWStructuredBuffer sortedSimplexToFluid; // fluidSimplices -RWStructuredBuffer sortedFluidIndices; -RWStructuredBuffer sortedSimplexIndices; - -RWStructuredBuffer sortedPositions; -RWStructuredBuffer sortedFluidMaterials; -RWStructuredBuffer sortedFluidInterface; -RWStructuredBuffer sortedPrincipalRadii; - -RWStructuredBuffer neighbors; -RWStructuredBuffer neighborCounts; - -RWStructuredBuffer particleContacts; -RWStructuredBuffer contactPairs; - -RWStructuredBuffer fluidDispatchBuffer; -RWStructuredBuffer dispatchBuffer; - -RWStructuredBuffer colors; - -uint maxContacts; -uint maxNeighbors; -uint fluidParticleCount; -float deltaTime; - -const uint groupWidth; -const uint groupHeight; -const uint stepIndex; - -/** -For each cell, calculate coords and morton. This only works if there’s no collisions, so use the coord of one random particle that maps to that cell: - -For each simplex: -Determine cell coords (any particle in it will do) and hash, store in array per cell. Sort array by morton(coords), create array that maps from cell hash to morton index, then use as cellCounts[mortonIndex]. - -This way we have sorted particles and cells, and can use for fluid surface. Win win!! -*/ - -[numthreads(128, 1, 1)] -void Clear (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= maxCells) - return; - - if (i == 0) - { - for (int l = 0; l <= GRID_LEVELS; ++l) - levelPopulation[l] = 0; - } - - // clear all cell counts to zero, and cell offsets to invalid. - cellOffsets[i] = INVALID; - cellCounts[i] = 0; - mortonSortedCellHashes[i] = i; -} - -[numthreads(128, 1, 1)] -void InsertSimplices (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - if (i >= pointCount + edgeCount + triangleCount) return; - - // calculate simplex cell index: - int level = GridLevelForSize(simplexBounds[i].MaxAxisLength()); - float cellSize = CellSizeOfLevel(level); - int4 cellCoord = int4(floor((simplexBounds[i].Center() - solverBounds[0].min_)/ cellSize).xyz,level); - - // if the solver is 2D, project to the z = 0 cell. - if (mode == 1) cellCoord[2] = 0; - - // insert simplex in cell: - uint cellIndex = GridHash(cellCoord); - cellCoords[i] = cellCoord; - InterlockedAdd(cellCounts[cellIndex],1,offsetInCell[i]); - - // assign minimum morton code to cell - // (there may be hash collisions mapping two coordinates to the same cell, that's why we use atomic minimum) - float mortonCellSize = solverBounds[0].MaxAxisLength() / 1024.0; - uint morton = EncodeMorton3(floor((simplexBounds[i].Center() - solverBounds[0].min_).xyz / mortonCellSize)); - InterlockedMin(cellOffsets[cellIndex], morton); - - // clear neighbor count: - neighborCounts[i] = 0; - - // atomically increase this level's population by one: - InterlockedAdd(levelPopulation[1 + level],1); -} - -[numthreads(128,1,1)] -void MortonSort(uint3 id : SV_DispatchThreadID) -{ - uint i = id.x; - - uint hIndex = i & (groupWidth - 1); - uint indexLeft = hIndex + (groupHeight + 1) * (i / groupWidth); - uint rightStepSize = stepIndex == 0 ? groupHeight - 2 * hIndex : (groupHeight + 1) / 2; - uint indexRight = indexLeft + rightStepSize; - - // Exit if out of bounds - if (indexRight >= maxCells) return; - - // get morton index for both cells: - uint mortonL = cellOffsets[indexLeft]; - uint mortonR = cellOffsets[indexRight]; - - // get cell counts: - uint simplexIndexL = cellCounts[indexLeft]; - uint simplexIndexR = cellCounts[indexRight]; - - uint orderL = mortonSortedCellHashes[indexLeft]; - uint orderR = mortonSortedCellHashes[indexRight]; - - // Swap entries if order is incorrect - if (mortonL > mortonR) - { - cellCounts[indexLeft] = simplexIndexR; - cellCounts[indexRight] = simplexIndexL; - - cellOffsets[indexLeft] = mortonR; - cellOffsets[indexRight] = mortonL; - - mortonSortedCellHashes[indexLeft] = orderR; - mortonSortedCellHashes[indexRight] = orderL; - } -} - -[numthreads(128,1,1)] -void BuildMortonIndices(uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - if (i >= maxCells) return; - - // build map from cell hash to index in morton-sorted cell data. - int index = mortonSortedCellHashes[i]; - cellHashToMortonIndex[index] = i; -} - -[numthreads(128, 1, 1)] -void SortSimplices (uint3 id : SV_DispatchThreadID) -{ - uint i = id.x; - if (i >= pointCount + edgeCount + triangleCount) return; - - // write simplex index to its index in the grid: - uint cellIndex = cellHashToMortonIndex[GridHash(R_cellCoords[i])]; - uint gridIndex = R_cellOffsets[cellIndex] + R_offsetInCell[i]; - sortedSimplexIndices[gridIndex] = i; // maps from index in grid to simplex index. - - // flag fluid simplices with 1. we'll later do a prefix sum of this array - // to get a compact list of grid-sorted fluid indices. - int size; - int p = simplices[GetSimplexStartAndSize(i, size)]; - sortedFluidIndices[gridIndex] = ((phases[p] & Fluid) != 0) ? 1:0; -} - -[numthreads(1, 1, 1)] -void BuildFluidDispatch (uint3 id : SV_DispatchThreadID) -{ - // since we are using *exclusive* prefix sum, - // we must add the last entries of both buffers together to get total count of fluid simplices. - - int lastEntry = pointCount + edgeCount + triangleCount - 1; - fluidDispatchBuffer[3] = sortedSimplexToFluid[lastEntry] + sortedFluidIndices[lastEntry]; - fluidDispatchBuffer[0] = fluidDispatchBuffer[3] / 128 + 1; -} - -[numthreads(128, 1, 1)] -void SortFluidSimplices (uint3 id : SV_DispatchThreadID) //rename to sort fluid data. -{ - // check all simplices. - uint i = id.x; - if (i >= pointCount + edgeCount + triangleCount) return; - - uint cellIndex = cellHashToMortonIndex[GridHash(R_cellCoords[i])]; - uint gridIndex = R_cellOffsets[cellIndex] + R_offsetInCell[i]; - - // copy the data of first particle in each fluid simplex to sorted arrays - // using prefix sum results: same as grid order, but contiguous. - int size; - int p = simplices[GetSimplexStartAndSize(i, size)]; - - if ((phases[p] & Fluid) != 0) - { - int fluidIndex = sortedSimplexToFluid[gridIndex]; - sortedFluidIndices[fluidIndex] = i; - - sortedPositions[fluidIndex] = positions[p]; - sortedFluidMaterials[fluidIndex] = fluidMaterials[p]; - sortedFluidInterface[fluidIndex] = fluidInterface[p]; - sortedPrincipalRadii[fluidIndex] = principalRadii[p]; - } - else - sortedSimplexToFluid[gridIndex] = -1; -} - -int GetSimplexGroup(in int simplexStart,in int simplexSize, out int flags, out int category, out int mask, out bool restPositionsEnabled) -{ - flags = 0; - int group = 0; - category = 0; - mask = 0; - restPositionsEnabled = false; - - for (int j = 0; j < simplexSize; ++j) - { - int particleIndex = simplices[simplexStart + j]; - group = max(group, phases[particleIndex] & GroupMask); - flags |= phases[particleIndex] & ~GroupMask; // get flags from phase - category |= filters[particleIndex] & CategoryMask; // get category from filter - mask |= (filters[particleIndex] & MaskMask) >> 16; // get mask from filter - restPositionsEnabled = restPositionsEnabled || (restPositions[particleIndex].w > 0.5f); - } - - return group; -} - -struct simplexData -{ - int index; - int start; - int size; - int category; - int mask; - int flags; - int group; - bool restPosEnabled; -}; - -simplexData GetSimplexData(int indexInGrid) -{ - simplexData s; - s.index = sortedSimplexIndices[indexInGrid]; - s.start = GetSimplexStartAndSize(s.index, s.size); - s.group = GetSimplexGroup(s.start, s.size, s.flags, s.category, s.mask, s.restPosEnabled); - return s; -} - -void InteractionTest(simplexData a, simplexData b) -{ - if ((a.flags & Fluid) == 0 || (b.flags & Fluid) == 0) - { - // immediately reject simplex pairs that share particles: - int j = 0; - for (int i = 0; i < a.size; ++i) - for (j = 0; j < b.size; ++j) - if (simplices[a.start + i] == simplices[b.start + j]) - return; - - // if all particles are in the same group: - if (a.group == b.group) - { - // if none are self-colliding, reject the pair. - if ((a.flags & b.flags & SelfCollide) == 0) - return; - } - // category-based filtering: - else if ((a.mask & b.category) == 0 || (b.mask & a.category) == 0) - return; - - // swap simplices (except for category) so that B is always the one-sided one. - int categoryA = a.category; - int categoryB = b.category; - if ((a.flags & OneSided) != 0 && categoryA < categoryB) - { - simplexData t = a; - a = b; - b = t; - } - - float4 simplexBary = BarycenterForSimplexOfSize(a.size); - float4 simplexPoint; - - Simplex simplexShape; - simplexShape.simplexStart = b.start; - simplexShape.simplexSize = b.size; - simplexShape.simplices = simplices; - simplexShape.positions = restPositions; - float simplexRadiusA = 0; float simplexRadiusB = 0; - - // skip the contact if there's self-intersection at rest: - if (a.group == b.group && (a.restPosEnabled || b.restPosEnabled)) - { - SurfacePoint restPoint = Optimize(simplexShape, restPositions, restOrientations, principalRadii, - simplices, a.start, a.size, simplexBary, simplexPoint, 4, 0); - - for (j = 0; j < a.size; ++j) - simplexRadiusA += principalRadii[simplices[a.start + j]].x * simplexBary[j]; - - for (j = 0; j < b.size; ++j) - simplexRadiusB += principalRadii[simplices[b.start + j]].x * restPoint.bary[j]; - - // compare distance along contact normal with radius. - if (dot(simplexPoint - restPoint.pos, restPoint.normal) < simplexRadiusA + simplexRadiusB) - return; - } - - simplexBary = BarycenterForSimplexOfSize(a.size); - simplexShape.positions = positions; - - SurfacePoint surfacePoint = Optimize(simplexShape, positions, orientations, principalRadii, - simplices, a.start, a.size, simplexBary, simplexPoint); - - simplexRadiusA = 0; simplexRadiusB = 0; - float4 velocityA = FLOAT4_ZERO, velocityB = FLOAT4_ZERO, normalA = FLOAT4_ZERO, normalB = FLOAT4_ZERO; - float invMassA = 0, invMassB = 0; - - for (j = 0; j < a.size; ++j) - { - int particleIndex = simplices[a.start + j]; - simplexRadiusA += principalRadii[particleIndex].x * simplexBary[j]; - velocityA += velocities[particleIndex] * simplexBary[j]; - float4 nrm = asfloat(normals[particleIndex]); - normalA += (nrm.w < 0 ? float4(rotate_vector(orientations[particleIndex],nrm.xyz), nrm.w) : nrm) * simplexBary[j]; - invMassA += invMasses[particleIndex] * simplexBary[j]; - } - - for (j = 0; j < b.size; ++j) - { - int particleIndex = simplices[b.start + j]; - simplexRadiusB += principalRadii[particleIndex].x * surfacePoint.bary[j]; - velocityB += velocities[particleIndex] * surfacePoint.bary[j]; - float4 nrm = asfloat(normals[particleIndex]); - normalB += (nrm.w < 0 ? float4(rotate_vector(orientations[particleIndex],nrm.xyz), nrm.w) : nrm) * surfacePoint.bary[j]; - invMassB += invMasses[particleIndex] * simplexBary[j]; - } - - // no contact between fixed simplices: TODO: make optional - //if (!(invMassA > 0 || invMassB > 0)) - // return; - - float dAB = dot(simplexPoint - surfacePoint.pos, surfacePoint.normal); - float vel = dot(velocityA - velocityB, surfacePoint.normal); - - // check if the projected velocity along the contact normal will get us within collision distance. - if (vel * deltaTime + dAB <= simplexRadiusA + simplexRadiusB + collisionMargin) - { - // adapt collision normal for one-sided simplices: - if ((b.flags & OneSided) != 0 && categoryA < categoryB) - OneSidedNormal(normalB, surfacePoint.normal); - - // during inter-collision, if either particle contains SDF data and they overlap: - if (a.group != b.group && (normalB.w < 0 || normalA.w < 0) && dAB * 1.05f <= simplexRadiusA + simplexRadiusB) - { - // as normal, pick SDF gradient belonging to least penetration distance: - float4 nij = normalB; - if (normalB.w >= 0 || (normalA.w < 0 && normalB.w < normalA.w)) - nij = float4(-normalA.xyz, normalA.w); - - // for boundary particles, use one sided sphere normal: - if (abs(nij.w) <= max(simplexRadiusA, simplexRadiusB) * 1.5f) - OneSidedNormal(nij, surfacePoint.normal); - else - surfacePoint.normal = nij; - } - - uint count = particleContacts.IncrementCounter(); - if (count < maxContacts) - { - contact c = (contact)0; - - c.normal = surfacePoint.normal; - c.pointA = simplexBary; - c.pointB = surfacePoint.bary; - c.bodyA = a.index; - c.bodyB = b.index; - - particleContacts[count] = c; - contactPairs[count] = uint2(c.bodyA,c.bodyB); - - InterlockedMax(dispatchBuffer[0],(count + 1) / 128 + 1); - InterlockedMax(dispatchBuffer[3], count + 1); - } - } - } -} - -[numthreads(128, 1, 1)] -void BuildContactList (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= pointCount + edgeCount + triangleCount) return; - - // current cell: - int4 cellCoord = R_cellCoords[i]; - uint cellIndex = cellHashToMortonIndex[GridHash(cellCoord)]; - uint n = R_cellOffsets[cellIndex]; - uint end = n + R_cellCounts[cellIndex]; - uint indexInGrid = n + R_offsetInCell[i]; - - simplexData data1 = GetSimplexData(indexInGrid); - - // in current cell, only consider simplices that appear after this one: - for (++indexInGrid; indexInGrid < end; ++indexInGrid) - InteractionTest(data1,GetSimplexData(indexInGrid)); - - // neighbour cells ahead of the current one in the same level: - for(int j = 0; j < 13; ++j) - { - // get first simplex in neighbor cell: - cellIndex = cellHashToMortonIndex[GridHash(cellCoord + aheadCellNeighborhood[j])]; - n = R_cellOffsets[cellIndex]; - end = n + R_cellCounts[cellIndex]; - - // iterate through all simplices in neighbor cell: - for (; n < end; ++n) - InteractionTest(data1,GetSimplexData(n)); - } - - // higher grid levels: - for (uint m = 1; m <= R_levelPopulation[0]; ++m) - { - uint l = R_levelPopulation[m]; - if (l <= (uint)cellCoord.w) continue; - - int4 parentCellCoords = GetParentCellCoords(cellCoord, l); - - for (int j = 0; j < 27; ++j) - { - // get first simplex in neighbor cell: - cellIndex = cellHashToMortonIndex[GridHash(parentCellCoords + cellNeighborhood[j])]; - n = R_cellOffsets[cellIndex]; - end = n + R_cellCounts[cellIndex]; - - // iterate through all simplices in neighbor cell: - for (; n < end; ++n) - InteractionTest(data1,GetSimplexData(n)); - } - } -} - -[numthreads(128, 1, 1)] -void FindFluidNeighborsInSameLevel (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - if (i >= dispatchBuffer[3]) return; - - // current cell: - int4 cellCoord = R_cellCoords[sortedFluidIndices[i]]; - int4 neighborCoord; - uint cellIndex, n, end; - - float4 d; - float interactionRadius, cellSize; - int fluidB; - - float4 posA = sortedPositions[i]; - float radA = sortedFluidMaterials[i].x; - - uint count = 0; - - // neighbour cells in same level. We don't need atomics for this, - // and we can guarantee that the neighbors for each particle will - // appear in sorted order. - for(int j = 0; j < 27; ++j) - { - // get cell start/end - neighborCoord = cellCoord + cellNeighborhood[j]; - cellIndex = cellHashToMortonIndex[GridHash(neighborCoord)]; - n = R_cellOffsets[cellIndex]; - end = n + R_cellCounts[cellIndex]; - - // iterate through all simplices in neighbor cell: - for (; n < end; ++n) - { - fluidB = sortedSimplexToFluid[n]; - if (fluidB >= 0 && fluidB != (int)i) - { - // due to hash collisions, two neighboring cells might map to the same - // hash bucket, and we'll add the same set of particles twice to the neighbors list. - // So we only consider particles that have the same spatial coordinates as the cell. - if (any (R_cellCoords[sortedFluidIndices[fluidB]] - neighborCoord)) - continue; - - // calculate particle center distance: - d = posA - sortedPositions[fluidB]; d.w = 0; - interactionRadius = max(radA, sortedFluidMaterials[fluidB].x) + collisionMargin; - - if (dot(d,d) <= interactionRadius * interactionRadius && count < maxNeighbors) - neighbors[maxNeighbors * i + (count++)] = fluidB; - } - } - } - - neighborCounts[i] = count; -} - -[numthreads(128, 1, 1)] -void FindFluidNeighborsInUpperLevels (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - if (i >= dispatchBuffer[3]) return; - - int s = sortedFluidIndices[i]; - - int4 cellCoord = R_cellCoords[s]; - int4 parentCellCoords, neighborCoord; - uint cellIndex, n, end; - - float4 d; - float interactionRadius, cellSize; - int fluidB; - - float4 posA = sortedPositions[i]; - float radA = sortedFluidMaterials[i].x; - - for (uint m = 1; m <= R_levelPopulation[0]; ++m) - { - uint l = R_levelPopulation[m]; - - // skip levels below this particle's level. - if (l <= (uint)cellCoord.w) continue; - - parentCellCoords = GetParentCellCoords(cellCoord, l); - - for (int j = 0; j < 27; ++j) - { - // get cell start/end - neighborCoord = parentCellCoords + cellNeighborhood[j]; - cellIndex = cellHashToMortonIndex[GridHash(neighborCoord)]; - n = R_cellOffsets[cellIndex]; - end = n + R_cellCounts[cellIndex]; - - // iterate through all simplices in neighbor cell: - for (; n < end; ++n) - { - fluidB = sortedSimplexToFluid[n]; - if (fluidB >= 0) - { - // due to hash collisions, two neighboring cells might map to the same - // hash bucket, and we'll add the same set of particles twice to the neighbors list. - // So we only consider particles that have the same spatial coordinates as the cell. - if (any (R_cellCoords[sortedFluidIndices[fluidB]] - neighborCoord)) - continue; - - // calculate particle center distance: - d = posA - sortedPositions[fluidB]; d.w = 0; - interactionRadius = max(radA, sortedFluidMaterials[fluidB].x) + collisionMargin; - - if (dot(d,d) <= interactionRadius * interactionRadius) - { - uint entryA, entryB; - InterlockedAdd(neighborCounts[i], 1, entryA); - InterlockedAdd(neighborCounts[fluidB], 1, entryB); - - if (entryA < maxNeighbors && entryB < maxNeighbors) - { - neighbors[maxNeighbors * i + entryA] = fluidB; - neighbors[maxNeighbors * fluidB + entryB] = i; - } - } - } - } - } - } - -} - -[numthreads(128, 1, 1)] -void BuildFluidParticleIndexBuffer (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - if (i >= dispatchBuffer[3]) return; - - // convert simplex index to start in indices array. - int o; - sortedFluidIndices[i] = simplices[GetSimplexStartAndSize(sortedFluidIndices[i], o)]; -} \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/ParticleGrid.compute.meta b/Assets/Obi/Resources/Compute/ParticleGrid.compute.meta deleted file mode 100644 index 15d29e6b1..000000000 --- a/Assets/Obi/Resources/Compute/ParticleGrid.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 282fd6222e54d48fea7f2d1a74501fa9 -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 65536 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/ParticleMeshBuilding.compute b/Assets/Obi/Resources/Compute/ParticleMeshBuilding.compute deleted file mode 100644 index e990898dc..000000000 --- a/Assets/Obi/Resources/Compute/ParticleMeshBuilding.compute +++ /dev/null @@ -1,72 +0,0 @@ -#pragma kernel BuildMesh - -#include "MathUtils.cginc" - -struct RendererData -{ - float4 color; - float radiusScale; -}; - -StructuredBuffer particleIndices; - -StructuredBuffer positions; -StructuredBuffer orientations; -StructuredBuffer radii; -StructuredBuffer colors; - -StructuredBuffer rendererIndices; -StructuredBuffer rendererData; - -RWByteAddressBuffer vertices; -RWByteAddressBuffer indices; - -uint firstParticle; -uint particleCount; - -[numthreads(128, 1, 1)] -void BuildMesh (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= particleCount) return; - - int p = particleIndices[firstParticle + i]; - int r = rendererIndices[firstParticle + i]; - - // <<2 = multiply by 4 to get byte address, since a float/int is 4 bytes in size. - - // particle data is the same for all 4 vertices: - for (uint v = i*4; v < i*4 + 4; ++v) - { - int base = v*23; - - // pos - vertices.Store4(base<<2, asuint(float4(positions[p].xyz, 1))); - - // color: - vertices.Store4((base+7)<<2, asuint(colors[p] * rendererData[r].color)); - - // b1, b2, b3: - vertices.Store4((base+11)<<2, asuint( float4(rotate_vector(orientations[p],float3(1,0,0)),radii[p].x * radii[p].w * rendererData[r].radiusScale) )); - vertices.Store4((base+15)<<2, asuint( float4(rotate_vector(orientations[p],float3(0,1,0)),radii[p].y * radii[p].w * rendererData[r].radiusScale) )); - vertices.Store4((base+19)<<2, asuint( float4(rotate_vector(orientations[p],float3(0,0,1)),radii[p].z * radii[p].w * rendererData[r].radiusScale) )); - } - - //different offset for each vertex: - int base = i*4; - vertices.Store3((base*23 + 4)<<2, asuint(float3(1,1,0))); - vertices.Store3(((base+1)*23 + 4)<<2, asuint(float3(-1,1,0))); - vertices.Store3(((base+2)*23 + 4)<<2, asuint(float3(-1,-1,0))); - vertices.Store3(((base+3)*23 + 4)<<2, asuint(float3(1,-1,0))); - - // indices: - indices.Store((i*6)<<2, asuint(i*4+2)); - indices.Store((i*6+1)<<2, asuint(i*4+1)); - indices.Store((i*6+2)<<2, asuint(i*4)); - - indices.Store((i*6+3)<<2, asuint(i*4+3)); - indices.Store((i*6+4)<<2, asuint(i*4+2)); - indices.Store((i*6+5)<<2, asuint(i*4)); -} - diff --git a/Assets/Obi/Resources/Compute/ParticleMeshBuilding.compute.meta b/Assets/Obi/Resources/Compute/ParticleMeshBuilding.compute.meta deleted file mode 100644 index c28621d12..000000000 --- a/Assets/Obi/Resources/Compute/ParticleMeshBuilding.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: a5989e4df4ce944ea96d566e7df4d68a -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 65536 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/PathFrame.cginc b/Assets/Obi/Resources/Compute/PathFrame.cginc deleted file mode 100644 index e9ea2742a..000000000 --- a/Assets/Obi/Resources/Compute/PathFrame.cginc +++ /dev/null @@ -1,158 +0,0 @@ -#ifndef PATHFRAME_INCLUDE -#define PATHFRAME_INCLUDE - -#include "MathUtils.cginc" - -struct pathFrame -{ - float3 position; - float3 tangent; - float3 normal; - float3 binormal; - - float4 color; - float thickness; - - - void Initialize(float3 position, float3 tangent, float3 normal, float3 binormal, float4 color, float thickness){ - this.position = position; - this.normal = normal; - this.tangent = tangent; - this.binormal = binormal; - this.color = color; - this.thickness = thickness; - } - - void Reset() - { - position = float3(0,0,0); - tangent = float3(0,0,1); - normal = float3(0,1,0); - binormal = float3(1,0,0); - color = float4(1,1,1,1); - thickness = 0; - } - - void SetTwist(float twist) - { - quaternion twistQ = axis_angle(tangent, radians(twist)); - normal = rotate_vector(twistQ, normal); - binormal = rotate_vector(twistQ, binormal); - } - - void Transport(pathFrame frame, float twist) - { - // Calculate delta rotation: - quaternion rotQ = from_to_rotation(tangent, frame.tangent); - quaternion twistQ = axis_angle(frame.tangent, radians(twist)); - quaternion finalQ = qmul(twistQ , rotQ); - - // Rotate previous frame axes to obtain the new ones: - normal = rotate_vector(finalQ, normal); - binormal = rotate_vector(finalQ, binormal); - tangent = frame.tangent; - position = frame.position; - thickness = frame.thickness; - color = frame.color; - } - - void Transport(float3 newPosition, float3 newTangent, float twist) - { - // Calculate delta rotation: - quaternion rotQ = from_to_rotation(tangent, newTangent); - quaternion twistQ = axis_angle(newTangent, radians(twist)); - quaternion finalQ = qmul(twistQ, rotQ); - - // Rotate previous frame axes to obtain the new ones: - normal = rotate_vector(finalQ, normal); - binormal = rotate_vector(finalQ, binormal); - tangent = newTangent; - position = newPosition; - - } - - // Transport, hinting the normal. - void Transport(float3 newPosition, float3 newTangent, float3 newNormal, float twist) - { - normal = rotate_vector(axis_angle(newTangent,radians(twist)), newNormal); - tangent = newTangent; - binormal = cross(normal, tangent); - position = newPosition; - } - - float3x3 ToMatrix(int mainAxis) - { - float3x3 basis; - - if (mainAxis == 0) - { - basis._m00_m10_m20 = tangent; - basis._m01_m11_m21 = binormal; - basis._m02_m12_m22 = normal; - } - else if (mainAxis == 1) - { - basis._m01_m11_m21 = tangent; - basis._m02_m12_m22 = binormal; - basis._m00_m10_m20 = normal; - } - else - { - basis._m02_m12_m22 = tangent; - basis._m00_m10_m20 = binormal; - basis._m01_m11_m21 = normal; - } - - /*int xo = (mainAxis) % 3; - int yo = (mainAxis + 1) % 3; - int zo = (mainAxis + 2) % 3; - - basis[xo] = tangent; - basis[yo] = binormal; - basis[zo] = normal;*/ - - return basis; - } -}; - -void WeightedSum(float w1, float w2, float w3, in pathFrame c1, in pathFrame c2, in pathFrame c3, out pathFrame sum) -{ - sum.position.x = c1.position.x * w1 + c2.position.x * w2 + c3.position.x * w3; - sum.position.y = c1.position.y * w1 + c2.position.y * w2 + c3.position.y * w3; - sum.position.z = c1.position.z * w1 + c2.position.z * w2 + c3.position.z * w3; - - sum.tangent.x = c1.tangent.x * w1 + c2.tangent.x * w2 + c3.tangent.x * w3; - sum.tangent.y = c1.tangent.y * w1 + c2.tangent.y * w2 + c3.tangent.y * w3; - sum.tangent.z = c1.tangent.z * w1 + c2.tangent.z * w2 + c3.tangent.z * w3; - - sum.normal.x = c1.normal.x * w1 + c2.normal.x * w2 + c3.normal.x * w3; - sum.normal.y = c1.normal.y * w1 + c2.normal.y * w2 + c3.normal.y * w3; - sum.normal.z = c1.normal.z * w1 + c2.normal.z * w2 + c3.normal.z * w3; - - sum.binormal.x = c1.binormal.x * w1 + c2.binormal.x * w2 + c3.binormal.x * w3; - sum.binormal.y = c1.binormal.y * w1 + c2.binormal.y * w2 + c3.binormal.y * w3; - sum.binormal.z = c1.binormal.z * w1 + c2.binormal.z * w2 + c3.binormal.z * w3; - - sum.color.x = c1.color.x * w1 + c2.color.x * w2 + c3.color.x * w3; - sum.color.y = c1.color.y * w1 + c2.color.y * w2 + c3.color.y * w3; - sum.color.z = c1.color.z * w1 + c2.color.z * w2 + c3.color.z * w3; - sum.color.w = c1.color.w * w1 + c2.color.w * w2 + c3.color.w * w3; - - sum.thickness = c1.thickness * w1 + c2.thickness * w2 + c3.thickness * w3; -} - -pathFrame addFrames(pathFrame c1, pathFrame c2) -{ - pathFrame r; - r.Initialize(c1.position + c2.position, c1.tangent + c2.tangent, c1.normal + c2.normal, c1.binormal + c2.binormal, c1.color + c2.color, c1.thickness + c2.thickness); - return r; -} - -pathFrame multiplyFrame(float f, pathFrame c) -{ - pathFrame r; - r.Initialize(c.position * f, c.tangent * f, c.normal * f, c.binormal * f, c.color * f, c.thickness * f); - return r; -} - -#endif \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/PathFrame.cginc.meta b/Assets/Obi/Resources/Compute/PathFrame.cginc.meta deleted file mode 100644 index fa818faa6..000000000 --- a/Assets/Obi/Resources/Compute/PathFrame.cginc.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 10c2f01e614d74b30b6a489c96e8a0ce -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/PathSmoothing.compute b/Assets/Obi/Resources/Compute/PathSmoothing.compute deleted file mode 100644 index 06bf6ae5b..000000000 --- a/Assets/Obi/Resources/Compute/PathSmoothing.compute +++ /dev/null @@ -1,235 +0,0 @@ -#pragma kernel ParallelTransport -#pragma kernel Decimate -#pragma kernel ChaikinSmooth - -#include "PathFrame.cginc" - -struct smootherPathData -{ - uint smoothing; - float decimation; - float twist; - float restLength; - float smoothLength; - bool usesOrientedParticles; -}; - -StructuredBuffer renderablePositions; -StructuredBuffer renderableOrientations; -StructuredBuffer principalRadii; -StructuredBuffer colors; - -RWStructuredBuffer pathData; -StructuredBuffer particleIndices; - -RWStructuredBuffer pathFrames; -StructuredBuffer frameOffsets; -RWStructuredBuffer decimatedFrameCounts; - -RWStructuredBuffer smoothFrames; -StructuredBuffer smoothFrameOffsets; -RWStructuredBuffer smoothFrameCounts; - -// Variables set from the CPU -uint chunkCount; - -void PathFrameFromParticle(inout pathFrame frame, int particleIndex, bool useOrientedParticles, bool interpolateOrientation = false) -{ - // Update current frame values from particles: - frame.position = renderablePositions[particleIndex].xyz; - frame.thickness = principalRadii[particleIndex][0]; - frame.color = colors[particleIndex]; - - // Use particle orientation if possible: - if (useOrientedParticles) - { - quaternion current = renderableOrientations[particleIndex]; - quaternion previous = renderableOrientations[max(0, particleIndex - 1)]; - float4x4 average = q_toMatrix(interpolateOrientation ? q_slerp(current, previous, 0.5f) : current); - frame.normal = average._m01_m11_m21; - frame.binormal = average._m00_m10_m20; - frame.tangent = average._m02_m12_m22; - } -} - - -[numthreads(128, 1, 1)] -void ParallelTransport (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - if (i >= chunkCount) return; - - pathFrame nextFrame; - pathFrame currFrame; - pathFrame prevFrame; - - nextFrame.Reset(); - currFrame.Reset(); - prevFrame.Reset(); - - int firstIndex = i > 0 ? frameOffsets[i - 1] : 0; - int frameCount = frameOffsets[i] - firstIndex; - - // initialize current and previous frame: - PathFrameFromParticle(currFrame, particleIndices[firstIndex], pathData[i].usesOrientedParticles, false); - prevFrame = currFrame; - - // parallel transport: - for (int m = 1; m <= frameCount; ++m) - { - int index = firstIndex + min(m, frameCount - 1); - int pIndex = particleIndices[index]; - - // generate curve frame from particle: - PathFrameFromParticle(nextFrame, pIndex, pathData[i].usesOrientedParticles); - - if (pathData[i].usesOrientedParticles) - { - // copy frame directly. - prevFrame = currFrame; - } - else - { - // perform parallel transport, using forward / backward average to calculate tangent. - // if the average is too small, reuse the previous frame tangent. - currFrame.tangent = normalizesafe((currFrame.position - prevFrame.position) + - (nextFrame.position - currFrame.position), prevFrame.tangent); - prevFrame.Transport(currFrame, pathData[i].twist); - } - - // advance current frame: - currFrame = nextFrame; - pathFrames[firstIndex + m - 1] = prevFrame; - } -} - -[numthreads(128, 1, 1)] -void Decimate (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - if (i >= chunkCount) return; - - int firstInputIndex = i > 0 ? frameOffsets[i - 1] : 0; - int inputFrameCount = frameOffsets[i] - firstInputIndex; - - // no decimation, no work to do, just return: - if (pathData[i].decimation < 0.00001f || inputFrameCount < 3) - { - decimatedFrameCounts[i] = inputFrameCount; - return; - } - - float scaledThreshold = pathData[i].decimation * pathData[i].decimation * 0.01f; - - int start = 0; - int end = inputFrameCount - 1; - decimatedFrameCounts[i] = 0; - - while (start < end) - { - // add starting point: - pathFrames[firstInputIndex + decimatedFrameCounts[i]++] = pathFrames[firstInputIndex + start]; - - int newEnd = end; - - while (true) - { - int maxDistanceIndex = 0; - float maxDistance = 0; - float mu; - - // find the point that's furthest away from the current segment: - for (int j = start + 1; j < newEnd; j++) - { - float3 nearest = NearestPointOnEdge(pathFrames[firstInputIndex + start].position, - pathFrames[firstInputIndex + newEnd].position, - pathFrames[firstInputIndex + j].position, mu); - - float3 delta = nearest - pathFrames[firstInputIndex + j].position; - float d = dot(delta,delta); - - if (d > maxDistance) - { - maxDistanceIndex = j; - maxDistance = d; - } - } - - if (maxDistance <= scaledThreshold) - break; - - newEnd = maxDistanceIndex; - } - - start = newEnd; - } - - // add the last point: - pathFrames[firstInputIndex + decimatedFrameCounts[i]++] = pathFrames[firstInputIndex + end]; - -} - -[numthreads(128, 1, 1)] -void ChaikinSmooth (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - if (i >= chunkCount) return; - - int firstInputIndex = i > 0 ? frameOffsets[i - 1] : 0; - int inputFrameCount = decimatedFrameCounts[i]; - - int firstOutputIndex = smoothFrameOffsets[i]; - - int k = (int)pathData[i].smoothing; - - // No work to do. just copy the input to the output: - if (k == 0) - { - smoothFrameCounts[i] = inputFrameCount; - for (int j = 0; j < inputFrameCount; ++j) - smoothFrames[firstOutputIndex + j] = pathFrames[firstInputIndex + j]; - } - else - { - // precalculate some quantities: - int pCount = (int)pow(2, k); - int n0 = inputFrameCount - 1; - float twoRaisedToMinusKPlus1 = pow(2, -(k + 1)); - float twoRaisedToMinusK = pow(2, -k); - float twoRaisedToMinus2K = pow(2, -2 * k); - float twoRaisedToMinus2KMinus1 = pow(2, -2 * k - 1); - - smoothFrameCounts[i] = (inputFrameCount - 2) * pCount + 2; - - // calculate initial curve points: - smoothFrames[firstOutputIndex] = addFrames(multiplyFrame(0.5f + twoRaisedToMinusKPlus1 , pathFrames[firstInputIndex]) , multiplyFrame(0.5f - twoRaisedToMinusKPlus1, pathFrames[firstInputIndex + 1])); - smoothFrames[firstOutputIndex + pCount * n0 - pCount + 1] = addFrames(multiplyFrame(0.5f - twoRaisedToMinusKPlus1, pathFrames[firstInputIndex + n0 - 1]) , multiplyFrame(0.5f + twoRaisedToMinusKPlus1, pathFrames[firstInputIndex + n0])); - - // calculate internal points: - for (int j = 1; j <= pCount; ++j) - { - // precalculate coefficients: - float F = 0.5f - twoRaisedToMinusKPlus1 - (j - 1) * (twoRaisedToMinusK - j * twoRaisedToMinus2KMinus1); - float G = 0.5f + twoRaisedToMinusKPlus1 + (j - 1) * (twoRaisedToMinusK - j * twoRaisedToMinus2K); - float H = (j - 1) * j * twoRaisedToMinus2KMinus1; - - for (int l = 1; l < n0; ++l) - { - WeightedSum(F, G, H, - pathFrames[firstInputIndex + l - 1], - pathFrames[firstInputIndex + l], - pathFrames[firstInputIndex + l + 1], - smoothFrames[firstOutputIndex + (l - 1) * pCount + j]); - } - } - - // make first and last curve points coincide with original points: - smoothFrames[firstOutputIndex] = pathFrames[firstInputIndex]; - smoothFrames[firstOutputIndex + smoothFrameCounts[i] - 1] = pathFrames[firstInputIndex + inputFrameCount - 1]; - } - - // calculate path lengths: - pathData[i].smoothLength = 0; - for (int j = firstOutputIndex + 1; j < firstOutputIndex + smoothFrameCounts[i]; ++j) - pathData[i].smoothLength += distance(smoothFrames[j-1].position, smoothFrames[j].position); -} diff --git a/Assets/Obi/Resources/Compute/PathSmoothing.compute.meta b/Assets/Obi/Resources/Compute/PathSmoothing.compute.meta deleted file mode 100644 index 589cc57c4..000000000 --- a/Assets/Obi/Resources/Compute/PathSmoothing.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 91c36d3d171884541b751112dfac062c -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 65536 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/Phases.cginc b/Assets/Obi/Resources/Compute/Phases.cginc deleted file mode 100644 index 30bfe2086..000000000 --- a/Assets/Obi/Resources/Compute/Phases.cginc +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef PHASES_INCLUDE -#define PHASES_INCLUDE - - -#define CategoryMask 0x0000ffff -#define MaskMask 0xffff0000 - -#define GroupMask 0x00ffffff -#define SelfCollide 1 << 24 -#define Fluid 1 << 25 -#define OneSided 1 << 26 - -#endif \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/Phases.cginc.meta b/Assets/Obi/Resources/Compute/Phases.cginc.meta deleted file mode 100644 index 290fe9508..000000000 --- a/Assets/Obi/Resources/Compute/Phases.cginc.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 96d6b61b6caf54444b039bf6f29c9205 -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/PinConstraints.compute b/Assets/Obi/Resources/Compute/PinConstraints.compute deleted file mode 100644 index 33bb460e4..000000000 --- a/Assets/Obi/Resources/Compute/PinConstraints.compute +++ /dev/null @@ -1,229 +0,0 @@ -#pragma kernel Clear -#pragma kernel Initialize -#pragma kernel Project -#pragma kernel Apply -#pragma kernel ProjectRenderable - -#include "MathUtils.cginc" -#include "AtomicDeltas.cginc" -#include "ColliderDefinitions.cginc" -#include "Rigidbody.cginc" - -StructuredBuffer particleIndices; -StructuredBuffer colliderIndices; -StructuredBuffer offsets; -StructuredBuffer restDarboux; -StructuredBuffer stiffnesses; -RWStructuredBuffer lambdas; - -StructuredBuffer transforms; -StructuredBuffer shapes; -RWStructuredBuffer RW_rigidbodies; - -RWStructuredBuffer RW_positions; -RWStructuredBuffer RW_orientations; - -StructuredBuffer positions; -StructuredBuffer orientations; -StructuredBuffer prevPositions; -StructuredBuffer invMasses; -StructuredBuffer invRotationalMasses; - -StructuredBuffer inertialSolverFrame; - -// Variables set from the CPU -uint activeConstraintCount; -float stepTime; -float substepTime; -float timeLeft; -int steps; -float sorFactor; - -[numthreads(128, 1, 1)] -void Clear (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= activeConstraintCount) return; - - int colliderIndex = colliderIndices[i]; - - // no collider to pin to, so ignore the constraint. - if (colliderIndex < 0) - return; - - int rigidbodyIndex = shapes[colliderIndex].rigidbodyIndex; - - if (rigidbodyIndex >= 0) - { - int orig; - InterlockedExchange(RW_rigidbodies[rigidbodyIndex].constraintCount, 0, orig); - } -} - -[numthreads(128, 1, 1)] -void Initialize (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= activeConstraintCount) return; - - int colliderIndex = colliderIndices[i]; - - // no collider to pin to, so ignore the constraint. - if (colliderIndex < 0) - return; - - int rigidbodyIndex = shapes[colliderIndex].rigidbodyIndex; - - if (rigidbodyIndex >= 0) - { - InterlockedAdd(RW_rigidbodies[rigidbodyIndex].constraintCount, 1); - } -} - -[numthreads(128, 1, 1)] -void Project (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= activeConstraintCount) return; - - int particleIndex = particleIndices[i]; - int colliderIndex = colliderIndices[i]; - - // no collider to pin to, so ignore the constraint. - if (colliderIndex < 0) - return; - - int rigidbodyIndex = shapes[colliderIndex].rigidbodyIndex; - - float frameEnd = stepTime * steps; - float substepsToEnd = timeLeft / substepTime; - - // calculate time adjusted compliances - float2 compliances = stiffnesses[i].xy / (substepTime * substepTime); - - // project particle position to the end of the full step: - float4 particlePosition = lerp(prevPositions[particleIndex], positions[particleIndex], substepsToEnd); - - // express pin offset in world space: - float4 worldPinOffset = transforms[colliderIndex].TransformPoint(offsets[i]); - float4 predictedPinOffset = worldPinOffset; - quaternion predictedRotation = transforms[colliderIndex].rotation; - - float rigidbodyLinearW = 0; - float rigidbodyAngularW = 0; - - if (rigidbodyIndex >= 0) - { - rigidbody rb = rigidbodies[rigidbodyIndex]; - - // predict offset point position using rb velocity at that point (can't integrate transform since position != center of mass) - float4 velocityAtPoint = GetRigidbodyVelocityAtPoint(rigidbodies[rigidbodyIndex],inertialSolverFrame[0].frame.InverseTransformPoint(worldPinOffset), - asfloat(linearDeltasAsInt[rigidbodyIndex]), - asfloat(angularDeltasAsInt[rigidbodyIndex]), inertialSolverFrame[0]); - - predictedPinOffset = IntegrateLinear(predictedPinOffset, inertialSolverFrame[0].frame.TransformVector(velocityAtPoint), frameEnd); - - // predict rotation at the end of the step: - predictedRotation = IntegrateAngular(predictedRotation, rb.angularVelocity + asfloat(angularDeltasAsInt[rigidbodyIndex]), frameEnd); - - // calculate linear and angular rigidbody effective masses (mass splitting: multiply by constraint count) - rigidbodyLinearW = rb.inverseMass * rb.constraintCount; - rigidbodyAngularW = RotationalInvMass(rb.inverseInertiaTensor, - worldPinOffset - rb.com, - normalizesafe(inertialSolverFrame[0].frame.TransformPoint(particlePosition) - predictedPinOffset)) * rb.constraintCount; - - } - - // Transform pin position to solver space for constraint solving: - predictedPinOffset = inertialSolverFrame[0].frame.InverseTransformPoint(predictedPinOffset); - predictedRotation = qmul(q_conj(inertialSolverFrame[0].frame.rotation), predictedRotation); - - float4 gradient = particlePosition - predictedPinOffset; - float constraint = length(gradient); - float4 gradientDir = gradient / (constraint + EPSILON); - - float4 lambda = lambdas[i]; - float linearDLambda = (-constraint - compliances.x * lambda.w) / (invMasses[particleIndex] + rigidbodyLinearW + rigidbodyAngularW + compliances.x + EPSILON); - lambda.w += linearDLambda; - float4 correction = linearDLambda * gradientDir; - - AddPositionDelta(particleIndex, correction * invMasses[particleIndex] / substepsToEnd); - - if (rigidbodyIndex >= 0) - { - ApplyImpulse(rigidbodyIndex, - -correction / frameEnd, - inertialSolverFrame[0].frame.InverseTransformPoint(worldPinOffset), - inertialSolverFrame[0].frame); - } - - if (rigidbodyAngularW > 0 || invRotationalMasses[particleIndex] > 0) - { - // bend/twist constraint: - quaternion omega = qmul(q_conj(orientations[particleIndex]), predictedRotation); //darboux vector - - quaternion omega_plus; - omega_plus = omega + restDarboux[i]; //delta Omega with - omega_0 - omega -= restDarboux[i]; //delta Omega with + omega_0 - if (dot(omega, omega) > dot(omega_plus, omega_plus)) - omega = omega_plus; - - float3 dlambda = (omega.xyz - compliances.y * lambda.xyz) / (compliances.y + invRotationalMasses[particleIndex] + rigidbodyAngularW + EPSILON); - lambda.xyz += dlambda; - - //discrete Darboux vector does not have vanishing scalar part: - quaternion dlambdaQ = quaternion(dlambda[0], dlambda[1], dlambda[2], 0); - - quaternion orientDelta = asfloat(orientationDeltasAsInt[particleIndex]); - orientDelta += qmul(predictedRotation, dlambdaQ) * invRotationalMasses[particleIndex] / substepsToEnd; - orientationDeltasAsInt[particleIndex] = asuint(orientDelta); - orientationConstraintCounts[particleIndex]++; - - if (rigidbodyIndex >= 0) - { - ApplyDeltaQuaternion(rigidbodyIndex, - predictedRotation, - -qmul(orientations[particleIndex], dlambdaQ) * rigidbodyAngularW, - inertialSolverFrame[0].frame, stepTime); - } - } - - lambdas[i] = lambda; -} - -[numthreads(128, 1, 1)] -void Apply (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= activeConstraintCount) return; - - int p = particleIndices[i]; - - ApplyPositionDelta(RW_positions, p, sorFactor); - ApplyOrientationDelta(RW_orientations, p, sorFactor); -} - -[numthreads(128, 1, 1)] -void ProjectRenderable (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= activeConstraintCount) return; - - int particleIndex = particleIndices[i]; - int colliderIndex = colliderIndices[i]; - - // no collider to pin to or projection deactivated, so ignore the constraint. - if (colliderIndex < 0 || offsets[i].w < 0.5f) - return; - - transform attachmentMatrix = inertialSolverFrame[0].frame.Inverse().Multiply(transforms[colliderIndex]); - - RW_positions[particleIndex] = attachmentMatrix.TransformPoint(offsets[i]); - if (stiffnesses[i].y < 10000) - RW_orientations[particleIndex] = qmul(attachmentMatrix.rotation, restDarboux[i]); -} \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/PinConstraints.compute.meta b/Assets/Obi/Resources/Compute/PinConstraints.compute.meta deleted file mode 100644 index 235824622..000000000 --- a/Assets/Obi/Resources/Compute/PinConstraints.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d65f884fa36104c4493d2bc55441b89d -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 65536 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/PinholeConstraints.compute b/Assets/Obi/Resources/Compute/PinholeConstraints.compute deleted file mode 100644 index 1d5893ac5..000000000 --- a/Assets/Obi/Resources/Compute/PinholeConstraints.compute +++ /dev/null @@ -1,306 +0,0 @@ -#pragma kernel Clear -#pragma kernel Initialize -#pragma kernel Project -#pragma kernel Apply - -#include "MathUtils.cginc" -#include "AtomicDeltas.cginc" -#include "ColliderDefinitions.cginc" -#include "Rigidbody.cginc" - -RWStructuredBuffer particleIndices; -StructuredBuffer colliderIndices; -StructuredBuffer offsets; -RWStructuredBuffer edgeMus; -StructuredBuffer edgeRanges; -StructuredBuffer edgeRangeMus; -StructuredBuffer parameters; -RWStructuredBuffer relativeVelocities; -RWStructuredBuffer lambdas; - -StructuredBuffer transforms; -StructuredBuffer shapes; -RWStructuredBuffer RW_rigidbodies; - -RWStructuredBuffer RW_positions; - -StructuredBuffer deformableEdges; -StructuredBuffer positions; -StructuredBuffer prevPositions; -StructuredBuffer invMasses; - -StructuredBuffer inertialSolverFrame; - -// Variables set from the CPU -uint activeConstraintCount; -float stepTime; -float substepTime; -float timeLeft; -int steps; -float sorFactor; - -[numthreads(128, 1, 1)] -void Clear (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= activeConstraintCount) return; - - int colliderIndex = colliderIndices[i]; - - // no collider to pin to, so ignore the constraint. - if (colliderIndex < 0) - return; - - int rigidbodyIndex = shapes[colliderIndex].rigidbodyIndex; - - if (rigidbodyIndex >= 0) - { - int orig; - InterlockedExchange(RW_rigidbodies[rigidbodyIndex].constraintCount, 0, orig); - } -} - -bool IsEdgeValid(int edgeIndex, int nextEdgeIndex, float mix) -{ - return (mix < 0) ? deformableEdges[nextEdgeIndex * 2 + 1] == deformableEdges[edgeIndex * 2] : - deformableEdges[nextEdgeIndex * 2] == deformableEdges[edgeIndex * 2 + 1]; -} - -bool ClampToRange(int i, int edgeIndex, inout float mix) -{ - bool clamped = false; - if (edgeIndex == edgeRanges[i].x && mix < edgeRangeMus[i].x) - { - mix = edgeRangeMus[i].x; - clamped = true; - } - if (edgeIndex == edgeRanges[i].y && mix > edgeRangeMus[i].y) - { - mix = edgeRangeMus[i].y; - clamped = true; - } - return clamped; -} - -[numthreads(128, 1, 1)] -void Initialize (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= activeConstraintCount) return; - - int edgeIndex = particleIndices[i]; - int colliderIndex = colliderIndices[i]; - - // if no collider or edge, ignore the constraint. - if (edgeIndex < 0 || colliderIndex < 0) - return; - - int rigidbodyIndex = shapes[colliderIndex].rigidbodyIndex; - - if (rigidbodyIndex >= 0) - { - InterlockedAdd(RW_rigidbodies[rigidbodyIndex].constraintCount, 1); - } - - float frameEnd = stepTime * steps; - float substepsToEnd = timeLeft / substepTime; - - // calculate time adjusted compliances - float compliance = parameters[i * 5] / (substepTime * substepTime); - - int p1 = deformableEdges[edgeIndex * 2]; - int p2 = deformableEdges[edgeIndex * 2 + 1]; - int edgeCount = max(0, edgeRanges[i].y - edgeRanges[i].x + 1); - - // express pin offset in world space: - float4 worldPinOffset = transforms[colliderIndex].TransformPoint(offsets[i]); - float4 predictedPinOffset = worldPinOffset; - - if (rigidbodyIndex >= 0) - { - // predict offset point position using rb velocity at that point (can't integrate transform since position != center of mass) - float4 velocityAtPoint = GetRigidbodyVelocityAtPoint(rigidbodies[rigidbodyIndex],inertialSolverFrame[0].frame.InverseTransformPoint(worldPinOffset), - asfloat(linearDeltasAsInt[rigidbodyIndex]), - asfloat(angularDeltasAsInt[rigidbodyIndex]), inertialSolverFrame[0]); - - predictedPinOffset = IntegrateLinear(predictedPinOffset, inertialSolverFrame[0].frame.TransformVector(velocityAtPoint), frameEnd); - } - - // transform pinhole position to solver space for constraint solving: - float4 solverPredictedOffset = inertialSolverFrame[0].frame.InverseTransformPoint(predictedPinOffset); - - // get current edge data: - float mix = 0; - float4 particlePosition1 = lerp(prevPositions[p1], positions[p1], substepsToEnd); - float4 particlePosition2 = lerp(prevPositions[p2], positions[p2], substepsToEnd); - float edgeLength = length(particlePosition1 - particlePosition2) + EPSILON; - NearestPointOnEdge(particlePosition1, particlePosition2, solverPredictedOffset, mix, false); - - // calculate current relative velocity between rope and pinhole: - float velocity = (mix - edgeMus[i]) / substepTime * edgeLength; // vel = pos / time. - relativeVelocities[i] = velocity; - - // apply motor force: - float targetAccel = (parameters[i * 5 + 2] - velocity) / substepTime; // accel = vel / time. - float maxAccel = parameters[i * 5 + 3] * max(lerp(invMasses[p1], invMasses[p2], mix), EPSILON); // accel = force / mass. Guard against inf*0 - velocity += clamp(targetAccel, -maxAccel, maxAccel) * substepTime; - - // calculate new position by adding motor acceleration: - float corrMix = edgeMus[i] + velocity * substepTime / edgeLength; - - // apply artificial friction by interpolating predicted position and corrected position. - mix = lerp(mix, corrMix, parameters[i * 5 + 1]); - - // move to an adjacent simplex if needed - if (!ClampToRange(i, edgeIndex, mix) && (mix < 0 || mix > 1)) - { - bool clampOnEnd = parameters[i * 5 + 4] > 0.5f; - - // calculate distance we need to travel along simplex chain: - float distToTravel = length(particlePosition1 - particlePosition2) * (mix < 0 ? -mix : mix - 1); - - int nextEdgeIndex; - for (int k = 0; k < 10; ++k) - { - // calculate index of next edge: - nextEdgeIndex = edgeRanges[i].x + (int)nfmod((mix < 0 ? edgeIndex - 1 : edgeIndex + 1) - edgeRanges[i].x, edgeCount); - - // see if it's valid - if (!IsEdgeValid(edgeIndex, nextEdgeIndex, mix)) - { - // disable constraint if needed - if (!clampOnEnd) { particleIndices[i] = -1; return; } - - // otherwise clamp to end: - mix = saturate(mix); - break; - } - - // advance to next edge: - edgeIndex = nextEdgeIndex; - - p1 = deformableEdges[edgeIndex*2]; - p2 = deformableEdges[edgeIndex*2 + 1]; - particlePosition1 = lerp(prevPositions[p1], positions[p1], substepsToEnd); - particlePosition2 = lerp(prevPositions[p2], positions[p2], substepsToEnd); - edgeLength = length(particlePosition1 - particlePosition2) + EPSILON; - - // stop if we reached target edge: - if (distToTravel <= edgeLength) - { - mix = mix < 0 ? 1 - saturate(distToTravel / edgeLength) : saturate(distToTravel / edgeLength); - ClampToRange(i, edgeIndex, mix); - break; - } - - // stop if we reached end of range: - if (ClampToRange(i, edgeIndex, mix)) - break; - - distToTravel -= edgeLength; - } - } - - // store new position along edge: - edgeMus[i] = mix; - particleIndices[i] = edgeIndex; -} - -[numthreads(128, 1, 1)] -void Project (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= activeConstraintCount) return; - - int edgeIndex = particleIndices[i]; - int colliderIndex = colliderIndices[i]; - - // if no collider or edge, ignore the constraint. - if (edgeIndex < 0 || colliderIndex < 0) - return; - - float frameEnd = stepTime * steps; - float substepsToEnd = timeLeft / substepTime; - - // calculate time adjusted compliances - float compliance = parameters[i * 5] / (substepTime * substepTime); - - int p1 = deformableEdges[edgeIndex * 2]; - int p2 = deformableEdges[edgeIndex * 2 + 1]; - - // get current edge data: - float mix = edgeMus[i]; - float4 particlePosition1 = lerp(prevPositions[p1], positions[p1], substepsToEnd); - float4 particlePosition2 = lerp(prevPositions[p2], positions[p2], substepsToEnd); - float4 projection = lerp(particlePosition1, particlePosition2, mix); - - // express pin offset in world space: - float4 worldPinOffset = transforms[colliderIndex].TransformPoint(offsets[i]); - float4 predictedPinOffset = worldPinOffset; - - float rigidbodyLinearW = 0; - float rigidbodyAngularW = 0; - - int rigidbodyIndex = shapes[colliderIndex].rigidbodyIndex; - if (rigidbodyIndex >= 0) - { - rigidbody rb = rigidbodies[rigidbodyIndex]; - - // predict offset point position using rb velocity at that point (can't integrate transform since position != center of mass) - float4 velocityAtPoint = GetRigidbodyVelocityAtPoint(rigidbodies[rigidbodyIndex],inertialSolverFrame[0].frame.InverseTransformPoint(worldPinOffset), - asfloat(linearDeltasAsInt[rigidbodyIndex]), - asfloat(angularDeltasAsInt[rigidbodyIndex]), inertialSolverFrame[0]); - - predictedPinOffset = IntegrateLinear(predictedPinOffset, inertialSolverFrame[0].frame.TransformVector(velocityAtPoint), frameEnd); - - // calculate linear and angular rigidbody effective masses (mass splitting: multiply by constraint count) - rigidbodyLinearW = rb.inverseMass * rb.constraintCount; - rigidbodyAngularW = RotationalInvMass(rb.inverseInertiaTensor, - worldPinOffset - rb.com, - normalizesafe(inertialSolverFrame[0].frame.TransformPoint(projection) - predictedPinOffset)) * rb.constraintCount; - } - - // transform pinhole position to solver space for constraint solving: - predictedPinOffset = inertialSolverFrame[0].frame.InverseTransformPoint(predictedPinOffset); - - float4 gradient = projection - predictedPinOffset; - float constraint = length(gradient); - float4 gradientDir = gradient / (constraint + EPSILON); - - float lambda = (-constraint - compliance * lambdas[i]) / (lerp(invMasses[p1], invMasses[p2], mix) + rigidbodyLinearW + rigidbodyAngularW + compliance + EPSILON); - lambdas[i] += lambda; - float4 correction = lambda * gradientDir; - - float baryScale = BaryScale(float4(1 - mix, mix, 0, 0)); - - AddPositionDelta(p1, correction * baryScale * invMasses[p1] * (1 - mix) / substepsToEnd); - AddPositionDelta(p2, correction * baryScale * invMasses[p2] * mix / substepsToEnd); - - if (rigidbodyIndex >= 0) - { - ApplyImpulse(rigidbodyIndex, - -correction / frameEnd, - inertialSolverFrame[0].frame.InverseTransformPoint(worldPinOffset), - inertialSolverFrame[0].frame); - } -} - -[numthreads(128, 1, 1)] -void Apply (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= activeConstraintCount) return; - - int edgeIndex = particleIndices[i]; - if (edgeIndex < 0) return; - - int p1 = deformableEdges[edgeIndex * 2]; - int p2 = deformableEdges[edgeIndex * 2 + 1]; - - ApplyPositionDelta(RW_positions, p1, sorFactor); - ApplyPositionDelta(RW_positions, p2, sorFactor); -} \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/PinholeConstraints.compute.meta b/Assets/Obi/Resources/Compute/PinholeConstraints.compute.meta deleted file mode 100644 index b76f43e88..000000000 --- a/Assets/Obi/Resources/Compute/PinholeConstraints.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: b2e9779c1ab6b4ac5b79540db1485539 -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 65536 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/Quaternion.cginc b/Assets/Obi/Resources/Compute/Quaternion.cginc deleted file mode 100644 index 9143d27ca..000000000 --- a/Assets/Obi/Resources/Compute/Quaternion.cginc +++ /dev/null @@ -1,230 +0,0 @@ -#ifndef QUATERNION_INCLUDE -#define QUATERNION_INCLUDE - -#define QUATERNION_IDENTITY float4(0, 0, 0, 1) - -typedef float4 quaternion; - -// Quaternion multiplication -// http://mathworld.wolfram.com/Quaternion.html -quaternion qmul(quaternion q1, quaternion q2) -{ - return quaternion( - q2.xyz * q1.w + q1.xyz * q2.w + cross(q1.xyz, q2.xyz), - q1.w * q2.w - dot(q1.xyz, q2.xyz) - ); -} - -// Vector rotation with a quaternion -// http://mathworld.wolfram.com/Quaternion.html -float3 rotate_vector(quaternion r, float3 v) -{ - float4 r_c = r * float4(-1, -1, -1, 1); - return qmul(r, qmul(float4(v, 0), r_c)).xyz; -} - -// A given angle of rotation about a given axis -quaternion axis_angle(float3 axis, float angle) -{ - float sn = sin(angle * 0.5); - float cs = cos(angle * 0.5); - return quaternion(axis * sn, cs); -} - -// https://stackoverflow.com/questions/1171849/finding-quaternion-representing-the-rotation-from-one-vector-to-another -quaternion from_to_rotation(float3 v1, float3 v2) -{ - float4 q; - float d = dot(v1, v2); - if (d < -0.999999) - { - float3 right = float3(1, 0, 0); - float3 up = float3(0, 1, 0); - float3 tmp = cross(right, v1); - if (length(tmp) < 0.000001) - { - tmp = cross(up, v1); - } - tmp = normalize(tmp); - q = axis_angle(tmp, 3.14159265359f); - } else if (d > 0.999999) { - q = QUATERNION_IDENTITY; - } else { - q.xyz = cross(v1, v2); - q.w = 1 + d; - q = normalize(q); - } - return q; -} - -float4 q_conj(float4 q) -{ - return float4(-q.x, -q.y, -q.z, q.w); -} - -// https://jp.mathworks.com/help/aeroblks/quaternioninverse.html -quaternion q_inverse(quaternion q) -{ - quaternion conj = q_conj(q); - return conj / (q.x * q.x + q.y * q.y + q.z * q.z + q.w * q.w); -} - -quaternion q_diff(quaternion q1, quaternion q2) -{ - return q2 * q_inverse(q1); -} - -quaternion q_look_at(float3 forward, float3 up) -{ - forward = normalize(forward); - float3 right = normalize(cross(up, forward)); - up = cross(forward, right); - - float m00 = right.x; - float m01 = right.y; - float m02 = right.z; - float m10 = up.x; - float m11 = up.y; - float m12 = up.z; - float m20 = forward.x; - float m21 = forward.y; - float m22 = forward.z; - - float num8 = (m00 + m11) + m22; - quaternion q = QUATERNION_IDENTITY; - - if (num8 > 0.0) - { - float num = sqrt(num8 + 1.0); - q.w = num * 0.5; - num = 0.5 / num; - q.x = (m12 - m21) * num; - q.y = (m20 - m02) * num; - q.z = (m01 - m10) * num; - return q; - } - else if ((m00 >= m11) && (m00 >= m22)) - { - float num7 = sqrt(((1.0 + m00) - m11) - m22); - float num4 = 0.5 / num7; - q.x = 0.5 * num7; - q.y = (m01 + m10) * num4; - q.z = (m02 + m20) * num4; - q.w = (m12 - m21) * num4; - return q; - } - else if (m11 > m22) - { - float num6 = sqrt(((1.0 + m11) - m00) - m22); - float num3 = 0.5 / num6; - q.x = (m10 + m01) * num3; - q.y = 0.5 * num6; - q.z = (m21 + m12) * num3; - q.w = (m20 - m02) * num3; - return q; - } - else - { - float num5 = sqrt(((1.0 + m22) - m00) - m11); - float num2 = 0.5 / num5; - q.x = (m20 + m02) * num2; - q.y = (m21 + m12) * num2; - q.z = 0.5 * num5; - q.w = (m01 - m10) * num2; - return q; - } -} - -quaternion q_slerp(in quaternion a, in quaternion b, float t) -{ - // if either input is zero, return the other. - if (length(a) == 0.0) - { - if (length(b) == 0.0) - return QUATERNION_IDENTITY; - else - return b; - } - else if (length(b) == 0.0) - { - return a; - } - else - { - float cosHalfAngle = a.w * b.w + dot(a.xyz, b.xyz); - - if (cosHalfAngle >= 1.0 || cosHalfAngle <= -1.0) - { - return a; - } - else - { - if (cosHalfAngle < 0.0) - { - b.xyz = -b.xyz; - b.w = -b.w; - cosHalfAngle = -cosHalfAngle; - } - - float blendA; - float blendB; - if (cosHalfAngle < 0.99) - { - // do proper slerp for big angles - float halfAngle = acos(cosHalfAngle); - float sinHalfAngle = sin(halfAngle); - float oneOverSinHalfAngle = 1.0 / sinHalfAngle; - blendA = sin(halfAngle * (1.0 - t)) * oneOverSinHalfAngle; - blendB = sin(halfAngle * t) * oneOverSinHalfAngle; - } - else - { - // do lerp if angle is really small. - blendA = 1.0 - t; - blendB = t; - } - - quaternion result = quaternion(blendA * a.xyz + blendB * b.xyz, blendA * a.w + blendB * b.w); - - if (length(result) > 0.0) - return normalize(result); - else - return QUATERNION_IDENTITY; - } - } -} - -quaternion q_eulerXYZ(float3 euler) -{ - float3 s, c; - sincos(0.5f * euler, s, c); - return quaternion( - // s.x * c.y * c.z + s.y * s.z * c.x, - // s.y * c.x * c.z - s.x * s.z * c.y, - // s.z * c.x * c.y - s.x * s.y * c.z, - // c.x * c.y * c.z + s.y * s.z * s.x - float4(s.xyz, c.x) * c.yxxy * c.zzyz + s.yxxy * s.zzyz * float4(c.xyz, s.x) * float4(1.0f, -1.0f, -1.0f, 1.0f) - ); -} - -float4x4 q_toMatrix(quaternion q) -{ - float xx = q.x * q.x; - float xy = q.x * q.y; - float xz = q.x * q.z; - float xw = q.x * q.w; - - float yy = q.y * q.y; - float yz = q.y * q.z; - float yw = q.y * q.w; - - float zz = q.z * q.z; - float zw = q.z * q.w; - - return float4x4(1 - 2 * (yy + zz), 2 * (xy - zw), 2 * (xz + yw), 0, - 2 * (xy + zw), 1 - 2 * (xx + zz), 2 * (yz - xw), 0, - 2 * (xz - yw), 2 * (yz + xw), 1 - 2 * (xx + yy), 0, - 0, 0, 0, 1); -} - -#endif \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/Quaternion.cginc.meta b/Assets/Obi/Resources/Compute/Quaternion.cginc.meta deleted file mode 100644 index ad02e0bf5..000000000 --- a/Assets/Obi/Resources/Compute/Quaternion.cginc.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: d586fccea37884cd99448480e05b9efc -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/QueryDefinitions.cginc b/Assets/Obi/Resources/Compute/QueryDefinitions.cginc deleted file mode 100644 index ddd2b711a..000000000 --- a/Assets/Obi/Resources/Compute/QueryDefinitions.cginc +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef QUERYDEFS_INCLUDE -#define QUERYDEFS_INCLUDE - -#define SPHERE_QUERY 0 -#define BOX_QUERY 1 -#define RAY_QUERY 2 - -struct queryShape -{ - float4 center; - float4 size; - int type; - float contactOffset; - float maxDistance; - int filter; -}; - -struct queryResult -{ - float4 simplexBary; // point A, expressed as simplex barycentric coords for simplices. - float4 queryPoint; // point B, expressed as a solver-space position. - float4 normal; - float dist; - float distAlongRay; - int simplexIndex; - int queryIndex; -}; - - -#endif \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/QueryDefinitions.cginc.meta b/Assets/Obi/Resources/Compute/QueryDefinitions.cginc.meta deleted file mode 100644 index 55f203af5..000000000 --- a/Assets/Obi/Resources/Compute/QueryDefinitions.cginc.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: aa793a9f45d044bb9af2361e9c92f11d -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/RayShapeQuery.compute b/Assets/Obi/Resources/Compute/RayShapeQuery.compute deleted file mode 100644 index a02d9f39f..000000000 --- a/Assets/Obi/Resources/Compute/RayShapeQuery.compute +++ /dev/null @@ -1,132 +0,0 @@ -#include "ColliderDefinitions.cginc" -#include "QueryDefinitions.cginc" -#include "ContactHandling.cginc" -#include "Transform.cginc" -#include "Simplex.cginc" -#include "Bounds.cginc" -#include "SolverParameters.cginc" -#include "Optimization.cginc" - -#pragma kernel GenerateResults - -StructuredBuffer positions; -StructuredBuffer orientations; -StructuredBuffer principalRadii; -StructuredBuffer simplices; - -StructuredBuffer transforms; -StructuredBuffer shapes; - -StructuredBuffer contactPairs; -StructuredBuffer contactOffsetsPerType; - -RWStructuredBuffer results; -RWStructuredBuffer dispatchBuffer; - -StructuredBuffer worldToSolver; - -uint maxContacts; - -struct Ray : IDistanceFunction -{ - queryShape s; - transform colliderToSolver; - - void Evaluate(in float4 pos, in float4 radii, in quaternion orientation, inout SurfacePoint projectedPoint) - { - float4x4 simplexToSolver = TRS(pos.xyz, orientation, radii.xyz); - float4x4 solverToSimplex = Inverse(simplexToSolver); - float4x4 colliderToSimplex = mul(solverToSimplex, TRS(colliderToSolver.translation.xyz, colliderToSolver.rotation, colliderToSolver.scale.xyz)); - - // express ray in simplex space (ellipsoid == scaled sphere) - float4 rayOrigin = mul(colliderToSimplex, float4(s.center.xyz,1)); - float4 rayDirection = normalizesafe(mul(colliderToSimplex, float4(s.size.xyz,0))); - - float rayDistance = RaySphereIntersection(rayOrigin.xyz, rayDirection.xyz, float3(0,0,0), 1); - - if (rayDistance < 0) - { - pos = colliderToSolver.InverseTransformPointUnscaled(pos); - - float mu; - float4 centerLine = NearestPointOnEdge(s.center * colliderToSolver.scale, (s.center + s.size) * colliderToSolver.scale, pos, mu); - float4 centerToPoint = pos - centerLine; - float distanceToCenter = length(centerToPoint); - - float4 normal = centerToPoint / (distanceToCenter + EPSILON); - - projectedPoint.pos = colliderToSolver.TransformPointUnscaled(centerLine + normal * s.contactOffset); - projectedPoint.normal = colliderToSolver.TransformDirection(normal); - } - else - { - float4 rayPoint = mul(simplexToSolver, float4((rayOrigin + rayDirection * rayDistance).xyz,1)); - float4 normal = normalizesafe(float4((pos - rayPoint).xyz,0)); - - projectedPoint.pos = rayPoint + normal * s.contactOffset; - projectedPoint.normal = normal; - } - - projectedPoint.bary = float4(1,0,0,0); - } -}; - -[numthreads(128, 1, 1)] -void GenerateResults (uint3 id : SV_DispatchThreadID) -{ - uint i = id.x; - - // entry #11 in the dispatch buffer is the amount of pairs for the first shape type. - if (i >= dispatchBuffer[11 + 4*RAY_QUERY]) return; - - int firstPair = contactOffsetsPerType[RAY_QUERY]; - int simplexIndex = contactPairs[firstPair + i].x; - int queryIndex = contactPairs[firstPair + i].y; - - queryResult c = (queryResult)0; - - Ray rayShape; - rayShape.colliderToSolver = worldToSolver[0].Multiply(transforms[queryIndex]); - rayShape.s = shapes[queryIndex]; - - int simplexSize; - int simplexStart = GetSimplexStartAndSize(simplexIndex, simplexSize); - - float4 simplexBary = BarycenterForSimplexOfSize(simplexSize); - float4 simplexPoint; - - SurfacePoint surfacePoint = Optimize(rayShape, positions, orientations, principalRadii, - simplices, simplexStart, simplexSize, simplexBary, simplexPoint, surfaceCollisionIterations, surfaceCollisionTolerance); - - - float4 simplexPrevPosition = FLOAT4_ZERO; - float simplexRadius = 0; - for (int j = 0; j < simplexSize; ++j) - { - int particleIndex = simplices[simplexStart + j]; - simplexPrevPosition += positions[particleIndex] * simplexBary[j]; - simplexRadius += EllipsoidRadius(surfacePoint.normal, orientations[particleIndex], principalRadii[particleIndex].xyz) * simplexBary[j]; - } - - c.queryPoint = surfacePoint.pos; - c.normal = surfacePoint.normal; - c.simplexBary = simplexBary; - c.simplexIndex = simplexIndex; - c.queryIndex = queryIndex; - c.dist = dot(simplexPrevPosition - surfacePoint.pos, surfacePoint.normal) - simplexRadius; - - if (c.dist <= rayShape.s.maxDistance) - { - uint count = results.IncrementCounter(); - if (count < maxContacts) - { - float4 pointOnRay = surfacePoint.pos + surfacePoint.normal * c.dist; - c.distAlongRay = dot(pointOnRay.xyz - rayShape.s.center.xyz, normalizesafe(rayShape.s.size.xyz)); - - results[count] = c; - - InterlockedMax(dispatchBuffer[0],(count + 1) / 128 + 1); - InterlockedMax(dispatchBuffer[3], count + 1); - } - } -} \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/RayShapeQuery.compute.meta b/Assets/Obi/Resources/Compute/RayShapeQuery.compute.meta deleted file mode 100644 index 5228b8174..000000000 --- a/Assets/Obi/Resources/Compute/RayShapeQuery.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: cc1e43b48b9764f8585de0bd68298b1c -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 65536 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/Rigidbody.cginc b/Assets/Obi/Resources/Compute/Rigidbody.cginc deleted file mode 100644 index 9038eef51..000000000 --- a/Assets/Obi/Resources/Compute/Rigidbody.cginc +++ /dev/null @@ -1,108 +0,0 @@ -#ifndef RIGIDBODY_INCLUDE -#define RIGIDBODY_INCLUDE - -#include "InertialFrame.cginc" -#include "InterlockedUtils.cginc" -#include "Integration.cginc" - -RWStructuredBuffer linearDeltasAsInt; -RWStructuredBuffer angularDeltasAsInt; - -struct rigidbody -{ - float4x4 inverseInertiaTensor; - float4 velocity; - float4 angularVelocity; - float4 com; - float inverseMass; - - int constraintCount; - int pad1; - int pad2; -}; - -StructuredBuffer rigidbodies; - -void CalculateContactMassesB(in rigidbody rb, - in transform t, - float4 pointB, - float4 normal, - float4 bitangent, - float4 tangent, - out float normalInvMassB, - out float tangentInvMassB, - out float bitangentInvMassB) -{ - float4 rB = t.TransformPoint(pointB) - rb.com; - - // initialize inverse linear masses: - normalInvMassB = tangentInvMassB = bitangentInvMassB = rb.inverseMass; - normalInvMassB += RotationalInvMass(rb.inverseInertiaTensor, rB, normal); - tangentInvMassB += RotationalInvMass(rb.inverseInertiaTensor, rB, tangent); - bitangentInvMassB += RotationalInvMass(rb.inverseInertiaTensor, rB, bitangent); -} - -float4 GetRigidbodyVelocityAtPoint(in rigidbody rb, - float4 pnt, - float4 linearDelta, - float4 angularDelta, - in inertialFrame frame) -{ - float4 linearVel = rb.velocity + linearDelta; - float4 angularVel = rb.angularVelocity + angularDelta; - float4 r = frame.frame.TransformPoint(pnt) - rb.com; - - // calculate rigidbody velocity. (point is assumed to be expressed in solver space, convert it to world space): - float4 wsRigidbodyVel = linearVel + float4(cross(angularVel.xyz, r.xyz), 0); - - // calculate solver velocity: - float4 wsSolverVelocity = frame.velocity + float4(cross(frame.angularVelocity.xyz, pnt.xyz), 0); - - // convert the resulting velocity back to solver space: - return frame.frame.InverseTransformVector(wsRigidbodyVel - wsSolverVelocity); -}; - -void AtomicAddLinearDelta(in int rigidbodyIndex, in float4 delta) -{ - InterlockedAddFloat(linearDeltasAsInt, rigidbodyIndex, 0, delta.x); - InterlockedAddFloat(linearDeltasAsInt, rigidbodyIndex, 1, delta.y); - InterlockedAddFloat(linearDeltasAsInt, rigidbodyIndex, 2, delta.z); -} - -void AtomicAddAngularDelta(in int rigidbodyIndex, in float4 delta) -{ - InterlockedAddFloat(angularDeltasAsInt, rigidbodyIndex, 0, delta.x); - InterlockedAddFloat(angularDeltasAsInt, rigidbodyIndex, 1, delta.y); - InterlockedAddFloat(angularDeltasAsInt, rigidbodyIndex, 2, delta.z); -} - -void ApplyImpulse(int rigidbodyIndex, - float4 impulse, - float4 pnt, - in transform frame) -{ - float4 impulseWS = frame.TransformVector(impulse); - float4 r = frame.TransformPoint(pnt) - rigidbodies[rigidbodyIndex].com; - - float4 linearDelta = rigidbodies[rigidbodyIndex].inverseMass * impulseWS; - float4 angularDelta = mul(rigidbodies[rigidbodyIndex].inverseInertiaTensor, float4(cross(r.xyz, impulseWS.xyz), 0)); - - AtomicAddLinearDelta (rigidbodyIndex, linearDelta); - AtomicAddAngularDelta(rigidbodyIndex, angularDelta); -} - -void ApplyDeltaQuaternion(int rigidbodyIndex, - quaternion rotation, - quaternion delta, - in transform frame, - float dt) -{ - quaternion rotationWS = qmul(frame.rotation, rotation); - quaternion deltaWS = qmul(frame.rotation, delta); - - // convert quaternion delta to angular acceleration: - quaternion newRotation = normalize(rotationWS + deltaWS); - AtomicAddAngularDelta(rigidbodyIndex, DifferentiateAngular(newRotation, rotationWS, dt)); -} - -#endif \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/RopeChainRendering.compute b/Assets/Obi/Resources/Compute/RopeChainRendering.compute deleted file mode 100644 index 57ee32be6..000000000 --- a/Assets/Obi/Resources/Compute/RopeChainRendering.compute +++ /dev/null @@ -1,109 +0,0 @@ -#pragma kernel UpdateChainMesh - -#include "PathFrame.cginc" - -struct chainRendererData -{ - int modifierOffset; - float twistAnchor; - float twist; - uint usesOrientedParticles; - - float4 scale; -}; - -struct chunkData -{ - int rendererIndex; - int offset; // index of the first element for each chunk. -}; - -struct linkModifier -{ - float3 translation; - float3 scale; - float3 rotation; - - void Clear() - { - translation = float3(0,0,0); - scale = float3(1,1,1); - rotation = float3(0,0,0); - } -}; - -StructuredBuffer rendererData; -StructuredBuffer chunksData; -StructuredBuffer modifiers; -StructuredBuffer elements; - -StructuredBuffer renderablePositions; -StructuredBuffer renderableOrientations; -StructuredBuffer principalRadii; -StructuredBuffer colors; -float4x4 solverToWorld; - -RWStructuredBuffer instanceTransforms; -RWStructuredBuffer invInstanceTransforms; -RWStructuredBuffer instanceColors; - -uint chunkCount; - -[numthreads(32, 1, 1)] -void UpdateChainMesh (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - if (i >= chunkCount) return; - - int firstIndex = i > 0 ? chunksData[i - 1].offset : 0; - uint elementCount = chunksData[i].offset - firstIndex; - - int rendererIndex = chunksData[i].rendererIndex; - chainRendererData renderer = rendererData[rendererIndex]; - - int firstModifier = rendererIndex > 0 ? rendererData[rendererIndex - 1].modifierOffset : 0; - uint modifierCount = renderer.modifierOffset - firstModifier; - - linkModifier modifier; - modifier.Clear(); - - pathFrame frame; - frame.Reset(); - - float twist = -renderer.twist * elementCount * renderer.twistAnchor; - frame.SetTwist(twist); - - // parallel transport: - for (uint m = 0; m < elementCount; ++m) - { - if (modifierCount > 0) - modifier = modifiers[firstModifier + m % modifierCount]; - - int index = firstIndex + m; - float4 pos = renderablePositions[elements[index].x]; - float4 nextPos = renderablePositions[elements[index].y]; - float4 vect = nextPos - pos; - float3 tangent = normalizesafe(vect.xyz); - - if (renderer.usesOrientedParticles == 1) - { - frame.Transport(nextPos.xyz, tangent, rotate_vector(renderableOrientations[elements[index].x], float3(0, 1, 0)), twist); - twist += renderer.twist; - } - else - frame.Transport(nextPos.xyz, tangent, renderer.twist); - - if (modifierCount > 0) - modifier = modifiers[firstModifier + m % (uint)modifierCount]; - - quaternion rotation = q_look_at(frame.tangent, frame.normal); - float3 position = (pos + vect * 0.5f).xyz + rotate_vector(rotation, modifier.translation); - float3 scale = principalRadii[elements[index].x].x * 2 * renderer.scale.xyz * modifier.scale; - - rotation = qmul(rotation, q_eulerXYZ(radians(modifier.rotation))); - - instanceTransforms[index] = mul(solverToWorld, TRS(position,rotation,scale)); - invInstanceTransforms[index] = Inverse(instanceTransforms[index]); - instanceColors[index] = (colors[elements[index].x] + colors[elements[index].x]) * 0.5; - } -} \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/RopeChainRendering.compute.meta b/Assets/Obi/Resources/Compute/RopeChainRendering.compute.meta deleted file mode 100644 index a80ac9cb2..000000000 --- a/Assets/Obi/Resources/Compute/RopeChainRendering.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 64a1b58e2d7634b3b905947b0c5e78c7 -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 65536 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/RopeExtrudedRendering.compute b/Assets/Obi/Resources/Compute/RopeExtrudedRendering.compute deleted file mode 100644 index cdcb106c5..000000000 --- a/Assets/Obi/Resources/Compute/RopeExtrudedRendering.compute +++ /dev/null @@ -1,164 +0,0 @@ -#pragma kernel UpdateRopeMesh - -#include "PathFrame.cginc" - -struct smootherPathData -{ - uint smoothing; - float decimation; - float twist; - float restLength; - float smoothLength; - uint usesOrientedParticles; -}; - -struct extrudedMeshData -{ - int sectionVertexCount; - float thicknessScale; - float uvAnchor; - uint normalizeV; - float2 uvScale; -}; - -StructuredBuffer pathSmootherIndices; -StructuredBuffer chunkOffsets; - -StructuredBuffer frames; -StructuredBuffer frameOffsets; -StructuredBuffer frameCounts; - -StructuredBuffer sectionData; -StructuredBuffer sectionOffsets; -StructuredBuffer sectionIndices; - -StructuredBuffer vertexOffsets; -StructuredBuffer triangleOffsets; -StructuredBuffer triangleCounts; - -StructuredBuffer extrudedData; -StructuredBuffer pathData; - -RWByteAddressBuffer vertices; -RWByteAddressBuffer tris; - -// Variables set from the CPU -uint firstRenderer; -uint rendererCount; - -pathFrame LookAt(pathFrame frame, in pathFrame target, out float dist) -{ - float3 tangent = target.position - frame.position; - dist = length(tangent); - tangent /= dist + EPSILON; - - quaternion rotQ = from_to_rotation(frame.tangent, tangent); - frame.normal = rotate_vector(rotQ, frame.normal); - frame.binormal = rotate_vector(rotQ, frame.binormal); - frame.tangent = tangent; - - return frame; -} - -[numthreads(128, 1, 1)] -void UpdateRopeMesh (uint3 id : SV_DispatchThreadID) -{ - unsigned int u = id.x; - if (u >= rendererCount) return; - - int k = firstRenderer + u; - int s = pathSmootherIndices[k]; - - float3 vertex = float3(0,0,0); - float3 normal = float3(0,0,0); - float4 texTangent = FLOAT4_ZERO; - - int tri = 0; - int sectionIndex = 0; - int sectionStart = sectionOffsets[sectionIndices[k]]; - int sectionSegments = (sectionOffsets[sectionIndices[k] + 1] - sectionStart) - 1; - int verticesPerSection = sectionSegments + 1; // the last vertex in each section must be duplicated, due to uv wraparound. - - float smoothLength = 0; - int i; - for (i = chunkOffsets[s]; i < chunkOffsets[s + 1]; ++i) - smoothLength += pathData[i].smoothLength; - - float vCoord = -extrudedData[k].uvScale.y * pathData[chunkOffsets[s]].restLength * extrudedData[k].uvAnchor; - float actualToRestLengthRatio = smoothLength / pathData[chunkOffsets[s]].restLength; - - int firstVertex = vertexOffsets[k]; - int firstTriangle = triangleOffsets[k]; - - // clear out triangle indices for this rope: - for (i = firstTriangle; i < firstTriangle + triangleCounts[k]; ++i) - { - int offset = i*3; - tris.Store((offset)<<2, 0); - tris.Store((offset+1)<<2,0); - tris.Store((offset+2)<<2,0); - } - - // for each chunk in the rope: - for (i = chunkOffsets[s]; i < chunkOffsets[s+1]; ++i) - { - int firstFrame = frameOffsets[i]; - int frameCount = frameCounts[i]; - - for (int f = 0; f < frameCount; ++f) - { - // Calculate previous and next curve indices: - int prevIndex = firstFrame + max(f - 1, 0); - int index = firstFrame + f; - - // advance v texcoord: - vCoord += extrudedData[k].uvScale.y * (distance(frames[index].position, frames[prevIndex].position) / - (extrudedData[k].normalizeV ? smoothLength : actualToRestLengthRatio)); - - // calculate section thickness and scale the basis vectors by it: - float sectionThickness = frames[index].thickness * extrudedData[k].thicknessScale; - - // Loop around each segment: - int nextSectionIndex = sectionIndex + 1; - for (int j = 0; j <= sectionSegments; ++j) - { - // make just one copy of the section vertex: - float2 sectionVertex = sectionData[sectionStart + j]; - - // calculate normal using section vertex, curve normal and binormal: - normal.x = (sectionVertex.x * frames[index].normal.x + sectionVertex.y * frames[index].binormal.x) * sectionThickness; - normal.y = (sectionVertex.x * frames[index].normal.y + sectionVertex.y * frames[index].binormal.y) * sectionThickness; - normal.z = (sectionVertex.x * frames[index].normal.z + sectionVertex.y * frames[index].binormal.z) * sectionThickness; - - // offset curve position by normal: - vertex.x = frames[index].position.x + normal.x; - vertex.y = frames[index].position.y + normal.y; - vertex.z = frames[index].position.z + normal.z; - - // cross(normal, curve tangent) - texTangent.xyz = cross(normal, frames[index].tangent); - texTangent.w = -1; - - int base = (firstVertex + sectionIndex * verticesPerSection + j) * 16; - vertices.Store3( base<<2, asuint(vertex)); - vertices.Store3((base + 3)<<2, asuint(normal)); - vertices.Store4((base + 6)<<2, asuint(texTangent)); - vertices.Store4((base + 10)<<2, asuint(frames[index].color)); - vertices.Store2((base + 14)<<2, asuint(float2(j / (float)sectionSegments * extrudedData[k].uvScale.x, vCoord))); - - if (j < sectionSegments && f < frameCount - 1) - { - int offset = firstTriangle * 3; - tris.Store((offset + tri++)<<2, asuint(firstVertex + sectionIndex * verticesPerSection + j)); - tris.Store((offset + tri++)<<2, asuint(firstVertex + nextSectionIndex * verticesPerSection + j)); - tris.Store((offset + tri++)<<2, asuint(firstVertex + sectionIndex * verticesPerSection + (j + 1))); - - tris.Store((offset + tri++)<<2, asuint(firstVertex + sectionIndex * verticesPerSection + (j + 1))); - tris.Store((offset + tri++)<<2, asuint(firstVertex + nextSectionIndex * verticesPerSection + j)); - tris.Store((offset + tri++)<<2, asuint(firstVertex + nextSectionIndex * verticesPerSection + (j + 1))); - } - } - sectionIndex++; - } - } -} \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/RopeExtrudedRendering.compute.meta b/Assets/Obi/Resources/Compute/RopeExtrudedRendering.compute.meta deleted file mode 100644 index 2861b99f9..000000000 --- a/Assets/Obi/Resources/Compute/RopeExtrudedRendering.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 0d389c799c83d43f38f2486ab16fe902 -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 65536 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/RopeLineRendering.compute b/Assets/Obi/Resources/Compute/RopeLineRendering.compute deleted file mode 100644 index 8d3582ae6..000000000 --- a/Assets/Obi/Resources/Compute/RopeLineRendering.compute +++ /dev/null @@ -1,162 +0,0 @@ -#pragma kernel UpdateLineMesh - -#include "PathFrame.cginc" - -struct smootherPathData -{ - uint smoothing; - float decimation; - float twist; - float restLength; - float smoothLength; - uint usesOrientedParticles; -}; - -struct lineMeshData -{ - float2 uvScale; - float thicknessScale; - float uvAnchor; - uint normalizeV; -}; - -StructuredBuffer pathSmootherIndices; -StructuredBuffer chunkOffsets; - -StructuredBuffer frames; -StructuredBuffer frameOffsets; -StructuredBuffer frameCounts; - -StructuredBuffer vertexOffsets; -StructuredBuffer triangleOffsets; -StructuredBuffer triangleCounts; - -StructuredBuffer rendererData; -StructuredBuffer pathData; - -RWByteAddressBuffer vertices; -RWByteAddressBuffer tris; - -// Variables set from the CPU -uint firstRenderer; -uint rendererCount; -float3 localSpaceCamera; - -pathFrame LookAt(pathFrame frame, in pathFrame target, out float dist) -{ - float3 tangent = target.position - frame.position; - dist = length(tangent); - tangent /= dist + EPSILON; - - quaternion rotQ = from_to_rotation(frame.tangent, tangent); - frame.normal = rotate_vector(rotQ, frame.normal); - frame.binormal = rotate_vector(rotQ, frame.binormal); - frame.tangent = tangent; - - return frame; -} - -[numthreads(128, 1, 1)] -void UpdateLineMesh (uint3 id : SV_DispatchThreadID) -{ - unsigned int u = id.x; - if (u >= rendererCount) return; - - int k = firstRenderer + u; - int s = pathSmootherIndices[k]; - - float3 vertex = float3(0,0,0); - float3 normal = float3(0,0,0); - float4 bitangent = FLOAT4_ZERO; - - int tri = 0; - int sectionIndex = 0; - int firstVertex = vertexOffsets[k]; - int firstTriangle = triangleOffsets[k]; - - float smoothLength = 0; - int i = 0; - for (i = chunkOffsets[s]; i < chunkOffsets[s + 1]; ++i) - smoothLength += pathData[i].smoothLength; - - float vCoord = -rendererData[k].uvScale.y * pathData[chunkOffsets[s]].restLength * rendererData[k].uvAnchor; - float actualToRestLengthRatio = smoothLength / pathData[chunkOffsets[s]].restLength; - - // clear out triangle indices for this rope: - for (i = firstTriangle; i < firstTriangle + triangleCounts[k]; ++i) - { - int offset = i*3; - tris.Store((offset)<<2, 0); - tris.Store((offset+1)<<2,0); - tris.Store((offset+2)<<2,0); - } - - // for each chunk in the rope: - for (i = chunkOffsets[s]; i < chunkOffsets[s+1]; ++i) - { - int firstFrame = frameOffsets[i]; - int frameCount = frameCounts[i]; - - for (int f = 0; f < frameCount; ++f) - { - // Calculate previous and next curve indices: - int prevIndex = firstFrame + max(f - 1, 0); - int index = firstFrame + f; - - // advance v texcoord: - vCoord += rendererData[k].uvScale.y * (distance(frames[index].position, frames[prevIndex].position) / - (rendererData[k].normalizeV == 1 ? smoothLength : actualToRestLengthRatio)); - - // calculate section thickness and scale the basis vectors by it: - float sectionThickness = frames[index].thickness * rendererData[k].thicknessScale; - - normal.x = frames[index].position.x - localSpaceCamera.x; - normal.y = frames[index].position.y - localSpaceCamera.y; - normal.z = frames[index].position.z - localSpaceCamera.z; - normal = normalize(normal); - - bitangent.x = -(normal.y * frames[index].tangent.z - normal.z * frames[index].tangent.y); - bitangent.y = -(normal.z * frames[index].tangent.x - normal.x * frames[index].tangent.z); - bitangent.z = -(normal.x * frames[index].tangent.y - normal.y * frames[index].tangent.x); - bitangent.xyz = normalize(bitangent.xyz); - bitangent.w = 1; - - vertex.x = frames[index].position.x - bitangent.x * sectionThickness; - vertex.y = frames[index].position.y - bitangent.y * sectionThickness; - vertex.z = frames[index].position.z - bitangent.z * sectionThickness; - - int base = (firstVertex + sectionIndex * 2) * 16; - vertices.Store3( base<<2, asuint(vertex)); - vertices.Store3((base + 3)<<2, asuint(-normal)); - vertices.Store4((base + 6)<<2, asuint(bitangent)); - vertices.Store4((base + 10)<<2, asuint(frames[index].color)); - vertices.Store2((base + 14)<<2, asuint(float2(0, vCoord))); - - vertex.x = frames[index].position.x + bitangent.x * sectionThickness; - vertex.y = frames[index].position.y + bitangent.y * sectionThickness; - vertex.z = frames[index].position.z + bitangent.z * sectionThickness; - - base = (firstVertex + sectionIndex * 2 + 1) * 16; - vertices.Store3( base<<2, asuint(vertex)); - vertices.Store3((base + 3)<<2, asuint(-normal)); - vertices.Store4((base + 6)<<2, asuint(bitangent)); - vertices.Store4((base + 10)<<2, asuint(frames[index].color)); - vertices.Store2((base + 14)<<2, asuint(float2(1, vCoord))); - - if (f < frameCount - 1) - { - - int offset = firstTriangle * 3; - tris.Store((offset + tri++)<<2, asuint(firstVertex + sectionIndex * 2)); - tris.Store((offset + tri++)<<2, asuint(firstVertex + (sectionIndex + 1) * 2)); - tris.Store((offset + tri++)<<2, asuint(firstVertex + sectionIndex * 2 + 1)); - - tris.Store((offset + tri++)<<2, asuint(firstVertex + sectionIndex * 2 + 1)); - tris.Store((offset + tri++)<<2, asuint(firstVertex + (sectionIndex + 1) * 2)); - tris.Store((offset + tri++)<<2, asuint(firstVertex + (sectionIndex + 1) * 2 + 1)); - } - - sectionIndex++; - } - } -} \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/RopeLineRendering.compute.meta b/Assets/Obi/Resources/Compute/RopeLineRendering.compute.meta deleted file mode 100644 index 05e0afc7a..000000000 --- a/Assets/Obi/Resources/Compute/RopeLineRendering.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d9fce691efd9941a78e1e74355ec3d84 -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 65536 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/RopeMeshRendering.compute b/Assets/Obi/Resources/Compute/RopeMeshRendering.compute deleted file mode 100644 index f12fc2dcc..000000000 --- a/Assets/Obi/Resources/Compute/RopeMeshRendering.compute +++ /dev/null @@ -1,218 +0,0 @@ -#pragma kernel UpdateRopeMesh - -#include "PathFrame.cginc" - -struct ropeMeshData -{ - uint axis; - float volumeScaling; - uint stretchWithRope; - uint spanEntireLength; - uint instances; - float instanceSpacing; - float offset; - float meshSizeAlongAxis; - float4 scale; -}; - -struct smootherPathData -{ - uint smoothing; - float decimation; - float twist; - float restLength; - float smoothLength; - uint usesOrientedParticles; -}; - -struct MeshData -{ - int firstVertex; - int vertexCount; - - int firstTriangle; - int triangleCount; -}; - -StructuredBuffer pathSmootherIndices; -StructuredBuffer chunkOffsets; - -StructuredBuffer frames; -StructuredBuffer frameOffsets; -StructuredBuffer frameCounts; - -StructuredBuffer vertexOffsets; - -StructuredBuffer meshIndices; -StructuredBuffer meshData; - -StructuredBuffer sortedIndices; -StructuredBuffer sortedOffsets; - -StructuredBuffer rendererData; -StructuredBuffer pathData; - -StructuredBuffer positions; -StructuredBuffer normals; -StructuredBuffer tangents; -StructuredBuffer colors; - -RWByteAddressBuffer vertices; - -// Variables set from the CPU -uint firstRenderer; -uint rendererCount; - -pathFrame InterpolateFrames(pathFrame a, pathFrame b, float3 bOffset, float t) -{ - // this offset is used to displace a copy of the first and last frames of the path, - // to ensure meshes extrude correctly prior to the first or past the last frame. - b.position += bOffset; - pathFrame interp = addFrames(multiplyFrame(1 - t, a) ,multiplyFrame(t , b)); - - // (no need to renormalize tangent, since offsetFromCurve[axis] = 0) - interp.normal = normalize(interp.normal); - interp.binormal = normalize(interp.binormal); - return interp; -} - -[numthreads(16, 1, 1)] -void UpdateRopeMesh (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - if (i >= rendererCount) return; - - int rendererIndex = firstRenderer + i; - int pathIndex = pathSmootherIndices[rendererIndex]; - ropeMeshData renderer = rendererData[rendererIndex]; - - // get mesh data: - MeshData mesh = meshData[meshIndices[rendererIndex]]; - int sortedOffset = sortedOffsets[rendererIndex]; - - // get index of first output vertex: - int firstOutputVertex = vertexOffsets[rendererIndex]; - - // get index of first chunk, ignore others (no support for tearing): - int chunkIndex = chunkOffsets[pathIndex]; - - // get first frame and frame count: - int firstFrame = frameOffsets[chunkIndex]; - int lastFrame = firstFrame + frameCounts[chunkIndex] - 1; - - // get mesh deform axis: - int axis = renderer.axis; - - // initialize scale vector: - float3 actualScale = renderer.scale.xyz; - - // calculate stretch ratio: - float stretchRatio = renderer.stretchWithRope == 1 ? pathData[chunkIndex].smoothLength / pathData[chunkIndex].restLength : 1; - - // squashing factor, makes mesh thinner when stretched and thicker when compresssed. - float squashing = clamp(1 + renderer.volumeScaling * (1 / max(stretchRatio, 0.01f) - 1), 0.01f, 2); - - // calculate scale along swept axis so that the mesh spans the entire lenght of the rope if required. - if (renderer.spanEntireLength == 1) - { - float totalMeshLength = renderer.meshSizeAlongAxis * renderer.instances; - float totalSpacing = renderer.instanceSpacing * (renderer.instances - 1); - float axisScale = pathData[chunkIndex].restLength / (totalMeshLength + totalSpacing); - - if (axis == 0) actualScale.x = axisScale; - else if (axis == 1) actualScale.y = axisScale; - else actualScale.z = axisScale; - } - - // init loop variables: - float lengthAlongAxis = renderer.offset; - int index = firstFrame; - int nextIndex = firstFrame + 1; - int prevIndex = firstFrame; - float nextMagnitude = distance(frames[index].position, frames[nextIndex].position); - float prevMagnitude = nextMagnitude; - - - for (int j = 0; j < mesh.vertexCount; ++j) - { - int base = (firstOutputVertex + sortedIndices[sortedOffset + j]) * 14; - vertices.Store3(base << 2, asuint(positions[mesh.firstVertex + sortedIndices[sortedOffset + j]] * float3(0.5,1,1))); - } - - for (int k = 0; k < (int)renderer.instances; ++k) - { - for (int j = 0; j < mesh.vertexCount; ++j) - { - int currVIndex = mesh.firstVertex + sortedIndices[sortedOffset + j]; - int prevVIndex = mesh.firstVertex + sortedIndices[sortedOffset + max(0,j - 1)]; - - // calculate how much we've advanced in the sort axis since the last vertex: - lengthAlongAxis += (positions[currVIndex][axis] - positions[prevVIndex][axis]) * actualScale[axis] * stretchRatio; - - // check if we have moved to a new section of the curve: - pathFrame frame; - if (lengthAlongAxis < 0) - { - while (-lengthAlongAxis > prevMagnitude && index > firstFrame) - { - lengthAlongAxis += prevMagnitude; - index = max(index - 1, firstFrame); - nextIndex = min(index + 1, lastFrame); - prevIndex = max(index - 1, firstFrame); - nextMagnitude = distance(frames[index].position, frames[nextIndex].position); - prevMagnitude = distance(frames[index].position, frames[prevIndex].position); - } - - float3 offset = float3(0,0,0); - if (index == prevIndex) - { - offset = frames[index].position - frames[nextIndex].position; - prevMagnitude = length(offset); - } - - frame = InterpolateFrames(frames[index], frames[prevIndex], offset, -lengthAlongAxis / prevMagnitude); - } - else - { - while (lengthAlongAxis > nextMagnitude && index < lastFrame) - { - lengthAlongAxis -= nextMagnitude; - index = min(index + 1, lastFrame); - nextIndex = min(index + 1, lastFrame); - prevIndex = max(index - 1, firstFrame); - nextMagnitude = distance(frames[index].position, frames[nextIndex].position); - prevMagnitude = distance(frames[index].position, frames[prevIndex].position); - } - - float3 offset = float3(0,0,0); - if (index == nextIndex) - { - offset = frames[index].position - frames[prevIndex].position; - nextMagnitude = length(offset); - } - - frame = InterpolateFrames(frames[index], frames[nextIndex], offset, lengthAlongAxis / nextMagnitude); - } - - // update basis matrix: - float3x3 basis = frame.ToMatrix(axis); - - // calculate vertex offset from curve: - float3 offsetFromCurve = positions[currVIndex] * actualScale * frame.thickness * squashing; - if (axis == 0) offsetFromCurve.x = 0; - else if (axis == 1) offsetFromCurve.y = 0; - else offsetFromCurve.z = 0; - - // write modified vertex data: - int base = (firstOutputVertex + sortedIndices[sortedOffset + j]) * 14; - vertices.Store3( base<<2, asuint(frame.position + mul(basis, offsetFromCurve))); - vertices.Store3((base + 3)<<2, asuint(mul(basis, normals[currVIndex]))); - vertices.Store4((base + 6)<<2, asuint(float4(mul(basis, tangents[currVIndex].xyz), tangents[currVIndex].w))); - vertices.Store4((base + 10)<<2, asuint(frames[index].color)); - } - - firstOutputVertex += mesh.vertexCount; - lengthAlongAxis += renderer.instanceSpacing * actualScale[axis] * stretchRatio; - } - -} \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/RopeMeshRendering.compute.meta b/Assets/Obi/Resources/Compute/RopeMeshRendering.compute.meta deleted file mode 100644 index fbe83db5c..000000000 --- a/Assets/Obi/Resources/Compute/RopeMeshRendering.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 68510b7d06c3544fba668628be450928 -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 65536 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/Scan.compute b/Assets/Obi/Resources/Compute/Scan.compute deleted file mode 100644 index dc961d991..000000000 --- a/Assets/Obi/Resources/Compute/Scan.compute +++ /dev/null @@ -1,78 +0,0 @@ -#pragma kernel ScanInBucketExclusive -#pragma kernel ScanAddBucketResult - -#define THREADS_PER_GROUP 512 // Ensure that this equals the 'threadsPerGroup' const in the host script. Must be an odd power of 2. - -// These must be a multiple of THREADS_PER_GROUP. -StructuredBuffer _Input; -RWStructuredBuffer _Result; -RWStructuredBuffer _BlockSum; -uint count; - -groupshared uint bucket[THREADS_PER_GROUP]; - -// Scan in each bucket. -[numthreads(THREADS_PER_GROUP, 1, 1)] -void ScanInBucketExclusive(uint DTid : SV_DispatchThreadID, uint Gid : SV_GroupID, uint GI : SV_GroupIndex) -{ - if (DTid < count) { - bucket[GI] = _Input[DTid]; - } else { - bucket[GI] = 0; - } - - GroupMemoryBarrierWithGroupSync(); - - uint stride; - - // up-sweep - [unroll] - for (stride = 2; stride <= THREADS_PER_GROUP; stride <<= 1) - { - GroupMemoryBarrierWithGroupSync(); - if (((GI + 1) % stride) == 0) - { - const uint half_stride = (stride >> 1); - bucket[GI] += bucket[GI - half_stride]; - } - } - - // Without this barrier, setting tg_mem[-1] to 0 may not be properly - // propagated across the entire threadgroup. - GroupMemoryBarrierWithGroupSync(); - if (GI == THREADS_PER_GROUP - 1) - { - // clear the last element - _BlockSum[Gid] = bucket[GI]; - bucket[GI] = 0; - } - - // down-sweep - [unroll] - for (stride = THREADS_PER_GROUP; stride > 1; stride >>= 1) - { - GroupMemoryBarrierWithGroupSync(); - - if (((GI + 1) % stride) == 0) - { - const uint half_stride = (stride >> 1); - const uint prev_idx = GI - half_stride; - const int tmp = bucket[prev_idx]; - bucket[prev_idx] = bucket[GI]; - bucket[GI] += tmp; - } - } - - GroupMemoryBarrierWithGroupSync(); - - if (DTid < count) - _Result[DTid] = bucket[GI]; -} - -// Add the bucket scanned result to each bucket to get the final result. -[numthreads(THREADS_PER_GROUP, 1, 1)] -void ScanAddBucketResult(uint DTid : SV_DispatchThreadID, uint Gid : SV_GroupID) -{ - if (DTid < count) - _Result[DTid] += _Input[Gid]; -} diff --git a/Assets/Obi/Resources/Compute/Scan.compute.meta b/Assets/Obi/Resources/Compute/Scan.compute.meta deleted file mode 100644 index 4b20551d8..000000000 --- a/Assets/Obi/Resources/Compute/Scan.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7124bb82b9af4476c8de8e82d7f8caba -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 65536 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/ShapeMatchingConstraints.compute b/Assets/Obi/Resources/Compute/ShapeMatchingConstraints.compute deleted file mode 100644 index 79d671b37..000000000 --- a/Assets/Obi/Resources/Compute/ShapeMatchingConstraints.compute +++ /dev/null @@ -1,266 +0,0 @@ -#pragma kernel CalculateRestShapeMatching -#pragma kernel PlasticDeformation -#pragma kernel Project -#pragma kernel Apply - -#include "MathUtils.cginc" -#include "AtomicDeltas.cginc" - -StructuredBuffer particleIndices; -StructuredBuffer firstIndex; -StructuredBuffer numIndices; -StructuredBuffer explicitGroup; -StructuredBuffer shapeMaterialParameters; - -RWStructuredBuffer RW_restComs; -RWStructuredBuffer coms; -RWStructuredBuffer constraintOrientations; - -RWStructuredBuffer RW_Aqq; -RWStructuredBuffer RW_linearTransforms; -RWStructuredBuffer RW_deformation; - -RWStructuredBuffer RW_positions; -RWStructuredBuffer orientations; - -StructuredBuffer restComs; -StructuredBuffer Aqq; -StructuredBuffer linearTransforms; -StructuredBuffer deformation; - -StructuredBuffer positions; -StructuredBuffer restPositions; -StructuredBuffer restOrientations; -StructuredBuffer invMasses; -StructuredBuffer invRotationalMasses; -StructuredBuffer principalRadii; - -// Variables set from the CPU -uint activeConstraintCount; -float deltaTime; -float sorFactor; - -void RecalculateRestData(uint i) -{ - int k = 0; - float maximumMass = 10000; - - // initialize rest center of mass and shape matrix: - RW_restComs[i] = FLOAT4_ZERO; - RW_Aqq[i] = FLOAT4X4_ZERO; - - float4 restCom = FLOAT4_ZERO; - float4x4 _Aqq = FLOAT4X4_ZERO, _Rqq = FLOAT4X4_ZERO; - - // calculate rest center of mass, shape mass and RW_Aqq matrix. - for (int j = 0; j < numIndices[i]; ++j) - { - k = particleIndices[firstIndex[i] + j]; - - float mass = maximumMass; - if (invMasses[k] > 1.0f / maximumMass) - mass = 1.0f / invMasses[k]; - - restCom += restPositions[k] * mass; - - float4x4 particleR = q_toMatrix(restOrientations[k]); - particleR[3][3] = 0; - - _Rqq += mul(particleR, - mul(AsDiagonal(GetParticleInertiaTensor(principalRadii[k],invRotationalMasses[k])), - transpose(particleR)) - ); - - float4 restPosition = restPositions[k]; - restPosition[3] = 0; - - _Aqq += mass * multrnsp4(restPosition, restPosition); - } - - if (restCom[3] < EPSILON) - return; - - restCom.xyz /= restCom[3]; - RW_restComs[i] = restCom; - - restCom[3] = 0; - _Aqq -= RW_restComs[i][3] * multrnsp4(restCom, restCom); - _Aqq[3][3] = 1; // so that the determinant is never 0 due to all-zeros row/column. - - RW_Aqq[i] = Inverse(_Rqq + mul(RW_deformation[i], mul(_Aqq, transpose(RW_deformation[i])))); - -} - -[numthreads(128, 1, 1)] -void CalculateRestShapeMatching (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= activeConstraintCount) return; - - RecalculateRestData(i); -} - -[numthreads(128, 1, 1)] -void Project (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= activeConstraintCount) return; - - int k; - float maximumMass = 10000; - - coms[i] = FLOAT4_ZERO; - float4x4 Apq = FLOAT4X4_ZERO, Rpq = FLOAT4X4_ZERO; - - // calculate shape mass, center of mass, and moment matrix: - int j; - for (j = 0; j < numIndices[i]; ++j) - { - k = particleIndices[firstIndex[i] + j]; - - float mass = maximumMass; - if (invMasses[k] > 1.0f / maximumMass) - mass = 1.0f / invMasses[k]; - - coms[i] += positions[k] * mass; - - float4x4 particleR = q_toMatrix(orientations[k]); - float4x4 particleRT = q_toMatrix(restOrientations[k]); - particleR[3][3] = 0; - particleRT[3][3] = 0; - - Rpq += mul(particleR, - mul(AsDiagonal(GetParticleInertiaTensor(principalRadii[k],invRotationalMasses[k])), - transpose(particleRT)) - ); - - float4 restPosition = restPositions[k]; - restPosition[3] = 0; - - Apq += mass * multrnsp4(positions[k], restPosition); - } - - if (restComs[i][3] < EPSILON) - return; - - coms[i] /= restComs[i][3]; - - // subtract global shape moment: - float4 restCom = restComs[i]; - restCom[3] = 0; - - Apq -= restComs[i][3] * multrnsp4(coms[i], restCom); - - // calculate optimal transform including plastic deformation: - float4x4 Apq_def = Rpq + mul(Apq, transpose(deformation[i])); - Apq_def[3][3] = 1; - - // reconstruct full best-matching linear transform: - RW_linearTransforms[i] = mul(Apq_def, Aqq[i]); - - // extract rotation from transform matrix, using warmstarting and few iterations: - constraintOrientations[i] = ExtractRotation(Apq_def, constraintOrientations[i], 5); - - // calculate particle orientations: - if (explicitGroup[i] > 0) - { - // if the group is explicit, set the orientation for all particles: - for (int j = 0; j < numIndices[i]; ++j) - { - k = particleIndices[firstIndex[i] + j]; - orientations[k] = qmul(constraintOrientations[i], restOrientations[k]); - } - } - else - { - // set orientation of center particle only: - int centerIndex = particleIndices[firstIndex[i]]; - orientations[centerIndex] = qmul(constraintOrientations[i], restOrientations[centerIndex]); - } - - // finally, obtain rotation matrix: - float4x4 R = q_toMatrix(constraintOrientations[i]); - R[3][3] = 0; - float4x4 transform = mul(R,deformation[i]); - - // calculate and accumulate particle goal positions: - float4 goal, delta; - for (j = 0; j < numIndices[i]; ++j) - { - k = particleIndices[firstIndex[i] + j]; - goal = coms[i] + mul(transform, restPositions[k] - restComs[i]); - delta = (goal - positions[k]) * shapeMaterialParameters[i * 5]; - - AddPositionDelta(k, delta); - } -} - -[numthreads(128, 1, 1)] -void PlasticDeformation (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - if (i >= activeConstraintCount) return; - - // get plastic deformation parameters: - float plastic_yield = shapeMaterialParameters[i * 5 + 1]; - float plastic_creep = shapeMaterialParameters[i * 5 + 2]; - float plastic_recovery = shapeMaterialParameters[i * 5 + 3]; - float max_deform = shapeMaterialParameters[i * 5 + 4]; - - // if we are allowed to absorb deformation: - if (plastic_creep > 0) - { - //obtain rotation matrix: - float4x4 R = q_toMatrix(constraintOrientations[i]); - R[3][3] = 1; - - // get scale matrix (A = RS so S = Rt * A) and its deviation from the identity matrix: - float4x4 deform_matrix = mul(transpose(R), linearTransforms[i]) - FLOAT4X4_IDENTITY; - - // if the amount of deformation exceeds the yield threshold: - float norm = FrobeniusNorm(deform_matrix); - if (norm > plastic_yield) - { - // deform the shape permanently: - RW_deformation[i] = mul(FLOAT4X4_IDENTITY + plastic_creep * deform_matrix, RW_deformation[i]); - - // clamp deformation so that it does not exceed a percentage; - deform_matrix = RW_deformation[i] - FLOAT4X4_IDENTITY; - norm = FrobeniusNorm(deform_matrix); - if (norm > max_deform) - { - RW_deformation[i] = FLOAT4X4_IDENTITY + max_deform * deform_matrix / norm; - } - - // if we cannot recover from plastic deformation, recalculate rest shape now: - if (plastic_recovery == 0) - RecalculateRestData(i); - } - } - - // if we can recover from plastic deformation, lerp towards non-deformed shape and recalculate rest shape: - if (plastic_recovery > 0) - { - RW_deformation[i] += (FLOAT4X4_IDENTITY - RW_deformation[i]) * min(plastic_recovery * deltaTime, 1.0f); - RecalculateRestData(i); - } -} - -[numthreads(128, 1, 1)] -void Apply (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= activeConstraintCount) return; - - int first = firstIndex[i]; - int last = first + numIndices[i]; - - for (int k = first; k < last; ++k) - { - int p = particleIndices[k]; - ApplyPositionDelta(RW_positions, p, sorFactor); - } -} \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/ShapeMatchingConstraints.compute.meta b/Assets/Obi/Resources/Compute/ShapeMatchingConstraints.compute.meta deleted file mode 100644 index ea486ca81..000000000 --- a/Assets/Obi/Resources/Compute/ShapeMatchingConstraints.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 18ba9336feedf4902b78736cf9abdaa8 -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 65536 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/Simplex.cginc b/Assets/Obi/Resources/Compute/Simplex.cginc deleted file mode 100644 index 9fc762e39..000000000 --- a/Assets/Obi/Resources/Compute/Simplex.cginc +++ /dev/null @@ -1,89 +0,0 @@ -#ifndef SIMPLEX_INCLUDE -#define SIMPLEX_INCLUDE - -#include "Optimization.cginc" - -uint pointCount; -uint edgeCount; -uint triangleCount; - -int GetSimplexStartAndSize(in uint index, out uint size) -{ - size = 0; - int start = 0; - - if (index < triangleCount) - { - size = 3; - start = index * 3; - } - else if (index < triangleCount + edgeCount) - { - size = 2; - start = triangleCount * 3 + (index - triangleCount) * 2; - } - else if (index < triangleCount + edgeCount + pointCount) - { - size = 1; - start = triangleCount * 3 + edgeCount * 2 + (index - triangleCount - edgeCount); - } - return start; -} - -float4 BarycenterForSimplexOfSize(in int simplexSize) -{ - switch(simplexSize) - { - case 1: return float4(1,0,0,0); - case 2: return float4(0.5,0.5,0,0); - case 3: return float4(1/3.0,1/3.0,1/3.0,0); - case 4: return float4(0.25,0.25,0.25,0.25); - default: return float4(1,0,0,0); - } -} - -struct Simplex : IDistanceFunction -{ - StructuredBuffer positions; - StructuredBuffer radii; - StructuredBuffer simplices; - - int simplexStart; - int simplexSize; - - void Evaluate(in float4 pos, in float4 radii, in quaternion orientation, inout SurfacePoint projectedPoint) - { - switch (simplexSize) - { - case 1: - default: - { - float4 p1 = positions[simplices[simplexStart]]; p1.w = 0; - projectedPoint.bary = float4(1, 0, 0, 0); - projectedPoint.pos = p1; - } - break; - case 2: - { - float4 p1 = positions[simplices[simplexStart]]; p1.w = 0; - float4 p2 = positions[simplices[simplexStart + 1]]; p2.w = 0; - float mu; - NearestPointOnEdge(p1, p2, pos, mu); - projectedPoint.bary = float4(1 - mu, mu, 0, 0); - projectedPoint.pos = p1 * projectedPoint.bary[0] + p2 * projectedPoint.bary[1]; - - }break; - case 3: - { - CachedTri tri; - tri.Cache(float4(positions[simplices[simplexStart]].xyz,0), - float4(positions[simplices[simplexStart + 1]].xyz,0), - float4(positions[simplices[simplexStart + 2]].xyz,0)); - projectedPoint.pos = NearestPointOnTri(tri, pos, projectedPoint.bary); - }break; - } - projectedPoint.normal = normalizesafe(pos - projectedPoint.pos); - } - -}; -#endif \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/Simplex.cginc.meta b/Assets/Obi/Resources/Compute/Simplex.cginc.meta deleted file mode 100644 index a695ffd73..000000000 --- a/Assets/Obi/Resources/Compute/Simplex.cginc.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: d8eeb7300d95c4653a91d905aaaf5344 -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/SkinConstraints.compute b/Assets/Obi/Resources/Compute/SkinConstraints.compute deleted file mode 100644 index c3714990c..000000000 --- a/Assets/Obi/Resources/Compute/SkinConstraints.compute +++ /dev/null @@ -1,71 +0,0 @@ -#pragma kernel Project -#pragma kernel Apply - -#include "MathUtils.cginc" -#include "AtomicDeltas.cginc" - -StructuredBuffer particleIndices; -StructuredBuffer skinPoints; -StructuredBuffer skinNormals; -StructuredBuffer skinRadiiBackstop; -StructuredBuffer skinCompliance; -RWStructuredBuffer lambdas; - -RWStructuredBuffer positions; -StructuredBuffer invMasses; - -// Variables set from the CPU -uint activeConstraintCount; -float deltaTime; -float sorFactor; - -[numthreads(128, 1, 1)] -void Project (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= activeConstraintCount) return; - - float radius = skinRadiiBackstop[i].x; - float collisionRadius = skinRadiiBackstop[i].y; - float backstopDistance = collisionRadius + skinRadiiBackstop[i].z; - - float compliance = skinCompliance[i] / (deltaTime * deltaTime); - int p = particleIndices[i]; - - if (invMasses[p] > 0) - { - float4 toSkin = positions[p] - skinPoints[i]; - float4 toBackstop = positions[p] - (skinPoints[i] - skinNormals[i] * backstopDistance); - - // distance to skin and backstop sphere centers: - float d = length(toSkin); - float b = length(toBackstop); - - // constrain particle within skin radius. - // ignore mass in the equations (use 1), as we don't want particle mass to interfere with skin compliance. - // We should be able to adjust skin properties and particle mass (for collisions) independently. - float constraint = max(0,d - radius); - float dlambda = (-constraint - compliance * lambdas[i]) / (1 + compliance); - lambdas[i] += dlambda; - float4 skinCorrection = dlambda * toSkin / (d + EPSILON); - - // constrain particle outside the backstop sphere (0 compliance): - constraint = min(0, b - collisionRadius); - float4 backstopCorrection = - constraint * toBackstop / (b + EPSILON); - - AddPositionDelta(p, skinCorrection + backstopCorrection); - } -} - -[numthreads(128, 1, 1)] -void Apply (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= activeConstraintCount) return; - - int p1 = particleIndices[i]; - - ApplyPositionDelta(positions, p1, sorFactor); -} \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/SkinConstraints.compute.meta b/Assets/Obi/Resources/Compute/SkinConstraints.compute.meta deleted file mode 100644 index 92eeacff3..000000000 --- a/Assets/Obi/Resources/Compute/SkinConstraints.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 2bec2152263654b08b1639ececa4ced6 -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 65536 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/SoftbodyRendering.compute b/Assets/Obi/Resources/Compute/SoftbodyRendering.compute deleted file mode 100644 index 1afb27c92..000000000 --- a/Assets/Obi/Resources/Compute/SoftbodyRendering.compute +++ /dev/null @@ -1,145 +0,0 @@ -#pragma kernel UpdateSoftbodyMesh - -#include "MathUtils.cginc" - -struct Influence -{ - int index; - float weight; -}; - -struct SkinmapData -{ - int firstInfluence; - int firstInfNumber; - int firstParticleBindPose; - - int firstSkinWeight; - int firstSkinWeightNumber; - int firstBoneBindPose; - - int bindPoseCount; -}; - -struct SkeletonData -{ - int firstBone; - int boneCount; -}; - -struct MeshData -{ - int firstVertex; - int vertexCount; - - int firstTriangle; - int triangleCount; -}; - -StructuredBuffer particleIndices; -StructuredBuffer rendererIndices; // for each vertex/particle, index of its renderer. - -StructuredBuffer renderablePositions; -StructuredBuffer renderableOrientations; - -StructuredBuffer restPositions; -StructuredBuffer restOrientations; -StructuredBuffer colors; - -StructuredBuffer skinConstraintOffsets; - -StructuredBuffer skinmapIndices; // for each renderer, index of its skinmap. -StructuredBuffer meshIndices; // for each renderer, index of its mesh. -StructuredBuffer skeletonIndices; // for each renderer, index of its skeleton. - -StructuredBuffer particleOffsets; // for each renderer, index of its first particle in the batch. -StructuredBuffer vertexOffsets; // for each renderer, index of its first vertex in the batch. - -StructuredBuffer skinData; -StructuredBuffer influences; -StructuredBuffer influenceOffsets; -StructuredBuffer bindPoses; - -StructuredBuffer skeletonData; -StructuredBuffer bonePos; -StructuredBuffer boneRot; -StructuredBuffer boneScl; - -StructuredBuffer meshData; -StructuredBuffer positions; -StructuredBuffer normals; -StructuredBuffer tangents; - -RWByteAddressBuffer vertices; - -// Variables set from the CPU -uint vertexCount; -float4x4 world2Solver; - -[numthreads(128, 1, 1)] -void UpdateSoftbodyMesh (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= vertexCount) return; - - int rendererIndex = rendererIndices[i]; - - // get skin map and mesh data: - SkinmapData skin = skinData[skinmapIndices[rendererIndex]]; - MeshData mesh = meshData[meshIndices[rendererIndex]]; - SkeletonData skel = skeletonData[skeletonIndices[rendererIndex]]; - - // get index of this vertex in its original mesh: - int originalVertexIndex = i - vertexOffsets[rendererIndex]; - - // get index of the vertex in the mesh batch: - int batchedVertexIndex = mesh.firstVertex + originalVertexIndex; - - // get first influence and amount of influences for this vertex: - int influenceStart = influenceOffsets[skin.firstInfNumber + originalVertexIndex]; - int influenceCount = influenceOffsets[skin.firstInfNumber + originalVertexIndex + 1] - influenceStart; - - float3 position = float3(0,0,0); - float3 normal = float3(0,0,0); - float4 tangent = FLOAT4_ZERO; - float4 color = FLOAT4_ZERO; - - for (int k = influenceStart; k < influenceStart + influenceCount; ++k) - { - Influence inf = influences[skin.firstInfluence + k]; - float4x4 trfm; - - if (inf.index < skin.bindPoseCount) // bone influence: - { - int boneIndex = skel.firstBone + inf.index; - int bindIndex = skin.firstParticleBindPose + inf.index; - - float4x4 bind = bindPoses[bindIndex]; - - float4x4 deform = inf.index < skel.boneCount ? TRS(bonePos[boneIndex], boneRot[boneIndex], boneScl[boneIndex]) : FLOAT4X4_IDENTITY; - - // bone skinning leaves vertices in world space, so convert to solver space afterwards: - trfm = mul(world2Solver, mul(deform, bind)); - } - else // particle influence - { - int p = particleIndices[particleOffsets[rendererIndex] + inf.index - skin.bindPoseCount]; - - float4x4 deform = mul(m_translate(FLOAT4X4_IDENTITY,renderablePositions[p].xyz), q_toMatrix(renderableOrientations[p])); - trfm = mul(deform, bindPoses[skin.firstParticleBindPose + inf.index]); - color += colors[p] * inf.weight; - } - - // update vertex/normal/tangent: - position += mul(trfm, float4(positions[batchedVertexIndex], 1)).xyz * inf.weight; - normal += mul(trfm, float4(normals[batchedVertexIndex], 0)).xyz * inf.weight; - tangent += float4(mul(trfm, float4(tangents[batchedVertexIndex].xyz, 0)).xyz, tangents[batchedVertexIndex].w) * inf.weight; - } - - int base = i * 14; - vertices.Store3( base<<2, asuint(position)); - vertices.Store3((base + 3)<<2, asuint(normal)); - vertices.Store4((base + 6)<<2, asuint(tangent)); - vertices.Store4((base + 10)<<2, asuint(color)); -} \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/SoftbodyRendering.compute.meta b/Assets/Obi/Resources/Compute/SoftbodyRendering.compute.meta deleted file mode 100644 index 4ae05f36c..000000000 --- a/Assets/Obi/Resources/Compute/SoftbodyRendering.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 805ca20f71b034180a1ab0ba707928be -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 65536 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/Solver.compute b/Assets/Obi/Resources/Compute/Solver.compute deleted file mode 100644 index 2cb5d27cc..000000000 --- a/Assets/Obi/Resources/Compute/Solver.compute +++ /dev/null @@ -1,288 +0,0 @@ -#pragma kernel ApplyInertialForces -#pragma kernel ApplyRigidbodyDeltas -#pragma kernel PredictPositions -#pragma kernel UpdateVelocities -#pragma kernel UpdatePositions -#pragma kernel UpdateLifetimes -#pragma kernel EnforceLimits -#pragma kernel Interpolate - -#include "Bounds.cginc" -#include "Integration.cginc" -#include "CollisionMaterial.cginc" -#include "SolverParameters.cginc" -#include "MathUtils.cginc" -#include "Rigidbody.cginc" - -StructuredBuffer simplices; -StructuredBuffer activeParticles; -StructuredBuffer invMasses; -StructuredBuffer invRotationalMasses; -StructuredBuffer phases; -StructuredBuffer buoyancies; -StructuredBuffer fluidRadii; - -StructuredBuffer startPositions; -StructuredBuffer endPositions; -StructuredBuffer startOrientations; -StructuredBuffer endOrientations; - -RWStructuredBuffer positions; -RWStructuredBuffer orientations; -RWStructuredBuffer principalRadii; -RWStructuredBuffer renderablePositions; -RWStructuredBuffer renderableOrientations; -RWStructuredBuffer renderableRadii; -RWStructuredBuffer prevPositions; -RWStructuredBuffer prevOrientations; -RWStructuredBuffer velocities; -RWStructuredBuffer angularVelocities; -RWStructuredBuffer life; -RWStructuredBuffer wind; - -RWStructuredBuffer deadParticles; - -RWStructuredBuffer externalForces; -RWStructuredBuffer externalTorques; - -RWStructuredBuffer linearDeltas; -RWStructuredBuffer angularDeltas; - -StructuredBuffer inertialSolverFrame; - -// Variables set from the CPU -uint particleCount; - -float deltaTime; -float blendFactor; -float velocityScale; -bool killOffLimits; - -float4 angularVel; -float4 inertialAccel; -float4 eulerAccel; -float4 ambientWind; -bool inertialWind; - -float4 boundaryLimitsMin; -float4 boundaryLimitsMax; - -[numthreads(128, 1, 1)] -void ApplyInertialForces(uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - if (i >= particleCount) return; - - int p = activeParticles[i]; - - if (invMasses[p] > 0) - { - float4 euler = float4(cross(eulerAccel.xyz, positions[p].xyz), 0); - float4 centrifugal = float4(cross(angularVel.xyz, cross(angularVel.xyz, positions[p].xyz)), 0); - float4 coriolis = 2 * float4(cross(angularVel.xyz, velocities[p].xyz), 0); - float4 angularAccel = euler + coriolis + centrifugal; - - velocities[p] -= (inertialAccel * worldLinearInertiaScale + angularAccel * worldAngularInertiaScale) * deltaTime; - } - - wind[p] = ambientWind; - - if (inertialWind) - { - float4 wsPos = inertialSolverFrame[0].frame.TransformPoint(positions[p]); - wind[p] -= inertialSolverFrame[0].frame.InverseTransformVector(inertialSolverFrame[0].velocityAtPoint(wsPos)); - } -} - -[numthreads(128, 1, 1)] -void ApplyRigidbodyDeltas (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= particleCount) return; - - linearDeltas[i].xyz = float3(asfloat(linearDeltasAsInt[i].x), - asfloat(linearDeltasAsInt[i].y), - asfloat(linearDeltasAsInt[i].z)); - - angularDeltas[i].xyz = float3(asfloat(angularDeltasAsInt[i].x), - asfloat(angularDeltasAsInt[i].y), - asfloat(angularDeltasAsInt[i].z)); -} - -[numthreads(128, 1, 1)] -void PredictPositions (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - if (i >= particleCount) return; - - int p = activeParticles[i]; - - // the previous position/orientation is the current position/orientation at the start of the step. - prevPositions[p] = positions[p]; - prevOrientations[p] = orientations[p]; - - // predict positions: - if (invMasses[p] > 0) - { - float4 effectiveGravity = float4(gravity,0); - - // Adjust gravity for buoyant fluid particles: - if ((phases[p] & (int)PHASE_FLUID) != 0) - effectiveGravity *= -buoyancies[p].z; - - // apply external forces and gravity: - float4 vel = velocities[p] + (invMasses[p] * externalForces[p] + effectiveGravity) * deltaTime; - - // project velocity to 2D plane if needed: - if (mode == 1) - vel[3] = 0; - - velocities[p] = vel; - } - - if (invRotationalMasses[p] > 0) - { - // apply external torques (simplification: we don't use full inertia tensor here) - float3 angularVel = angularVelocities[p].xyz + invRotationalMasses[p] * externalTorques[p].xyz * deltaTime; - - // project angular velocity to 2D plane normal if needed: - if (mode == 1) - angularVel = Project(angularVel,float3(0, 0, 1)); - - angularVelocities[p] = float4(angularVel, angularVelocities[p].w); - } - - positions[p] = IntegrateLinear(positions[p], velocities[p], deltaTime); - orientations[p] = IntegrateAngular(orientations[p], angularVelocities[p], deltaTime); -} - -[numthreads(128, 1, 1)] -void UpdateVelocities (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - if (i >= particleCount) return; - - int p = activeParticles[i]; - - // Project particles on the XY plane if we are in 2D mode: - if (mode == 1) - { - // restrict position to the 2D plane - float4 pos = positions[p]; - pos[2] = prevPositions[p][2]; - positions[p] = pos; - } - - if (invMasses[p] > 0) - velocities[p] = DifferentiateLinear(positions[p],prevPositions[p],deltaTime); - else - velocities[p] = FLOAT4_ZERO; - - if (invRotationalMasses[p] > 0) - angularVelocities[p].xyz = DifferentiateAngular(orientations[p], prevOrientations[p], deltaTime).xyz; - else - angularVelocities[p] = FLOAT4_ZERO; -} - -[numthreads(128, 1, 1)] -void UpdatePositions (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - if (i >= particleCount) return; - - int p = activeParticles[i]; - - // damp velocities: - velocities[p] *= velocityScale; - angularVelocities[p].xyz *= velocityScale; - - // clamp velocities: - float velMagnitude = length(velocities[p]); - float angularVelMagnitude = length(angularVelocities[p].xyz); - - if (velMagnitude > EPSILON) - velocities[p] *= min(maxVelocity, velMagnitude) / velMagnitude; - - if (angularVelMagnitude > EPSILON) - angularVelocities[p].xyz *= min(maxAngularVelocity, angularVelMagnitude) / angularVelMagnitude; - - // if the kinetic energy is below the sleep threshold, keep the particle at its previous position. - if (velMagnitude * velMagnitude * 0.5f + angularVelMagnitude * angularVelMagnitude * 0.5f <= sleepThreshold) - { - positions[p] = prevPositions[p]; - orientations[p] = prevOrientations[p]; - velocities[p] = FLOAT4_ZERO; - angularVelocities[p].xyz = float3(0,0,0); - } -} - -[numthreads(128, 1, 1)] -void UpdateLifetimes (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - if (i >= particleCount) return; - - int p = activeParticles[i]; - - life[p] -= deltaTime; - - // if particle is dead, append it to array. - if (life[p] <= 0) - { - // atomically increment dead particle counter: - uint count = deadParticles.IncrementCounter(); - - deadParticles[count] = p; - life[p] = 0; - } -} - -[numthreads(128, 1, 1)] -void EnforceLimits (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - if (i >= particleCount) return; - - int p = activeParticles[i]; - - float4 pos = positions[p]; - float4 prevPos = prevPositions[p]; - - bool outside = any(step(pos, boundaryLimitsMin).xyz + step(boundaryLimitsMax, pos).xyz); - - if ((phases[p] & (int)PHASE_ISOLATED) != 0) - life[p] = killOffLimits && outside ? 0 : life[p]; - - pos.xyz = clamp(pos, boundaryLimitsMin, boundaryLimitsMax).xyz; - prevPos.xyz = clamp(prevPos, boundaryLimitsMin, boundaryLimitsMax).xyz; - - positions[p] = pos; - prevPositions[p] = prevPos; -} - -[numthreads(128, 1, 1)] -void Interpolate (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - if (i >= particleCount) return; - - if (interpolation == 1) - { - renderablePositions[i] = lerp(startPositions[i], endPositions[i], blendFactor); - renderableOrientations[i] = normalize(q_slerp(startOrientations[i], endOrientations[i], blendFactor)); - renderableRadii[i] = principalRadii[i]; - } - else if (interpolation == 2) - { - renderablePositions[i] = lerp(endPositions[i], positions[i], blendFactor); - renderableOrientations[i] = normalize(q_slerp(endOrientations[i], orientations[i], blendFactor)); - renderableRadii[i] = principalRadii[i]; - } - else - { - renderablePositions[i] = endPositions[i]; - renderableOrientations[i] = normalize(endOrientations[i]); - renderableRadii[i] = principalRadii[i]; - } -} \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/Solver.compute.meta b/Assets/Obi/Resources/Compute/Solver.compute.meta deleted file mode 100644 index 5e9538951..000000000 --- a/Assets/Obi/Resources/Compute/Solver.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 8f597cb6a5a9e45499d9fd0f6160e5b4 -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 65536 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/SolverParameters.cginc b/Assets/Obi/Resources/Compute/SolverParameters.cginc deleted file mode 100644 index 8de4762a4..000000000 --- a/Assets/Obi/Resources/Compute/SolverParameters.cginc +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef SOLVERPARAMS_INCLUDE -#define SOLVERPARAMS_INCLUDE - -int mode; -int interpolation; -float3 gravity; -float damping; -float worldLinearInertiaScale; -float worldAngularInertiaScale; -float maxAnisotropy; -float sleepThreshold; -float maxVelocity; -float maxAngularVelocity; -float collisionMargin; -float maxDepenetration; -float colliderCCD; -float particleCCD; -float shockPropagation; -int surfaceCollisionIterations; -float surfaceCollisionTolerance; -float4 diffusionMask; - -#endif \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/SolverParameters.cginc.meta b/Assets/Obi/Resources/Compute/SolverParameters.cginc.meta deleted file mode 100644 index a591ec8ca..000000000 --- a/Assets/Obi/Resources/Compute/SolverParameters.cginc.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 57c61c65170924f0aa225156e164ceb8 -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/SortParticleData.compute b/Assets/Obi/Resources/Compute/SortParticleData.compute deleted file mode 100644 index 80282cf6f..000000000 --- a/Assets/Obi/Resources/Compute/SortParticleData.compute +++ /dev/null @@ -1,30 +0,0 @@ -#pragma kernel SortData - -StructuredBuffer sortedToOriginal; - -StructuredBuffer positions; -StructuredBuffer prevPositions; -StructuredBuffer principalRadii; -StructuredBuffer userData; - -RWStructuredBuffer sortedPositions; -RWStructuredBuffer sortedPrevPositions; -RWStructuredBuffer sortedPrincipalRadii; -RWStructuredBuffer sortedUserData; - -StructuredBuffer dispatchBuffer; - -[numthreads(128, 1, 1)] -void SortData (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - if (i >= dispatchBuffer[3]) return; - - int original = sortedToOriginal[i]; - - sortedPositions[i] = positions[original]; - sortedPrevPositions[i] = prevPositions[original]; - sortedPrincipalRadii[i] = principalRadii[original]; - sortedUserData[i] = userData[original]; -} - diff --git a/Assets/Obi/Resources/Compute/SortParticleData.compute.meta b/Assets/Obi/Resources/Compute/SortParticleData.compute.meta deleted file mode 100644 index 13aa550a1..000000000 --- a/Assets/Obi/Resources/Compute/SortParticleData.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 9cd8eed4d0d6e45c18941232e855994f -ComputeShaderImporter: - externalObjects: {} - preprocessorOverride: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/SpatialQueries.compute b/Assets/Obi/Resources/Compute/SpatialQueries.compute deleted file mode 100644 index b9db064d1..000000000 --- a/Assets/Obi/Resources/Compute/SpatialQueries.compute +++ /dev/null @@ -1,314 +0,0 @@ -#include "GridUtils.cginc" -#include "CollisionMaterial.cginc" -#include "ContactHandling.cginc" -#include "ColliderDefinitions.cginc" -#include "Rigidbody.cginc" -#include "Bounds.cginc" -#include "Simplex.cginc" -#include "SolverParameters.cginc" -#include "AtomicDeltas.cginc" -#include "Phases.cginc" -#include "QueryDefinitions.cginc" - -#define MAX_RESULTS_PER_SIMPLEX 32 - -#pragma kernel Clear -#pragma kernel BuildUnsortedList -#pragma kernel FindPopulatedLevels -#pragma kernel SortList -#pragma kernel BuildContactList -#pragma kernel PrefixSumColliderCounts -#pragma kernel SortContactPairs - -StructuredBuffer positions; -StructuredBuffer orientations; -StructuredBuffer principalRadii; - -StructuredBuffer activeParticles; -StructuredBuffer simplices; -StructuredBuffer filters; -RWStructuredBuffer simplexBounds; // bounding box of each simplex. - -StructuredBuffer transforms; -StructuredBuffer shapes; -RWStructuredBuffer sortedColliderIndices; - -RWStructuredBuffer colliderTypeCounts; -RWStructuredBuffer contactOffsetsPerType; -RWStructuredBuffer unsortedContactPairs; - -RWStructuredBuffer cellIndices; -RWStructuredBuffer cellOffsets; - -RWStructuredBuffer cellCounts; -RWStructuredBuffer offsetInCells; - -RWStructuredBuffer contacts; -RWStructuredBuffer contactPairs; -RWStructuredBuffer dispatchBuffer; - -StructuredBuffer solverToWorld; -StructuredBuffer worldToSolver; - -uint maxResults; -uint queryCount; // amount of colliders in the grid. -uint cellsPerShape; // max amount of cells a collider can be inserted into. Typically this is 8. -int shapeTypeCount; // number of different query shapes, ie: box, sphere, ray, etc. - -aabb CalculateShapeAABB(in queryShape shape) -{ - float offset = shape.contactOffset + shape.maxDistance; - - aabb bounds; - bounds.min_ = FLT_MAX; - bounds.max_ = FLT_MIN; - switch (shape.type) - { - case SPHERE_QUERY: - bounds.FromParticle(shape.center, shape.size.x + offset); break; - case BOX_QUERY: - bounds.FromEdge(shape.center - shape.size*0.5f, shape.center + shape.size * 0.5f, offset); break; - case RAY_QUERY: - bounds.FromEdge(shape.center, shape.center + shape.size, offset); break; - } - return bounds; -} - -[numthreads(128, 1, 1)] -void Clear (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i == 0) - { - for (int l = 0; l <= GRID_LEVELS; ++l) - levelPopulation[l] = 0; - } - - // clear all cell offsets to invalid, so that we can later use atomic minimum to calculate the offset. - if (i < maxCells) - { - cellOffsets[i] = INVALID; - cellCounts[i] = 0; - } - - // clear all cell indices to invalid. - if (i < queryCount) - { - for (uint j = 0; j < cellsPerShape; ++j) - cellIndices[i*cellsPerShape+j] = INVALID; - } -} - -[numthreads(128, 1, 1)] -void BuildUnsortedList (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - if (i >= queryCount) return; - - // get bounds in solver space: - aabb bounds = CalculateShapeAABB(shapes[i]).Transformed(worldToSolver[0].Multiply(transforms[i])); - - // calculate bounds size, grid level and cell size: - float4 size = bounds.max_ - bounds.min_; - float maxSize = max(max (size.x, size.y), size.z); - int level = GridLevelForSize(maxSize); - float cellSize = CellSizeOfLevel(level); - - // calculate max and min cell coordinates (force 4th component to zero, might not be after expanding) - int4 minCell = floor(bounds.min_ / cellSize); - int4 maxCell = floor(bounds.max_ / cellSize); - minCell[3] = 0; - maxCell[3] = 0; - - int4 cellSpan = maxCell - minCell; - - // insert collider in cells: - for (int x = 0; x <= cellSpan[0]; ++x) - { - for (int y = 0; y <= cellSpan[1]; ++y) - { - for (int z = 0; z <= cellSpan[2]; ++z) - { - int cellIndex = GridHash(minCell + int4(x, y, z, level)); - - // calculate flat index of this cell into arrays: - int k = x + y*2 + z*4 + i*cellsPerShape; - - cellIndices[k] = cellIndex; - InterlockedAdd(cellCounts[cellIndex],1,offsetInCells[k]); - } - } - } - - // atomically increase this level's population by one: - InterlockedAdd(levelPopulation[1 + level],1); -} - -[numthreads(128, 1, 1)] -void SortList (uint3 id : SV_DispatchThreadID) -{ - uint i = id.x; - if (i >= queryCount * cellsPerShape) return; - - uint cellIndex = cellIndices[i]; - - if (cellIndex != INVALID) - { - // write shape to its sorted index: - uint sortedIndex = cellOffsets[cellIndex] + offsetInCells[i]; - sortedColliderIndices[sortedIndex] = i; - } -} - -[numthreads(128, 1, 1)] -void BuildContactList (uint3 id : SV_DispatchThreadID) -{ - unsigned int threadIndex = id.x; - - if (threadIndex >= pointCount + edgeCount + triangleCount) return; - - uint cellCount = queryCount * cellsPerShape; - int candidateCount = 0; - uint candidates[MAX_RESULTS_PER_SIMPLEX]; - - int simplexSize; - int simplexStart = GetSimplexStartAndSize(threadIndex, simplexSize); - - aabb b = simplexBounds[threadIndex]; - - // max size of the particle bounds in cells: - int4 maxSize = int4(10,10,10,10); - - // build a list of candidate colliders: - for (uint m = 1; m <= levelPopulation[0]; ++m) - { - uint l = levelPopulation[m]; - float cellSize = CellSizeOfLevel(l); - - int4 minCell = floor(b.min_ / cellSize); - int4 maxCell = floor(b.max_ / cellSize); - maxCell = minCell + min(maxCell - minCell, maxSize); - - for (int x = minCell[0]; x <= maxCell[0]; ++x) - { - for (int y = minCell[1]; y <= maxCell[1]; ++y) - { - for (int z = minCell[2]; z <= maxCell[2]; ++z) - { - uint flatCellIndex = GridHash(int4(x,y,z,l)); - uint cellStart = cellOffsets[flatCellIndex]; - uint cellCount = cellCounts[flatCellIndex]; - - // iterate through queries in the neighbour cell - for (uint n = cellStart; n < cellStart + cellCount; ++n) - { - if (candidateCount < MAX_RESULTS_PER_SIMPLEX) - candidates[candidateCount++] = sortedColliderIndices[n] / cellsPerShape; - } - - } - } - } - } - - //evaluate candidates and create contacts: - if (candidateCount > 0) - { - // insert sort: - for (int k = 1; k < candidateCount; ++k) - { - uint key = candidates[k]; - int j = k - 1; - - while (j >= 0 && candidates[j] > key) - candidates[j + 1] = candidates[j--]; - - candidates[j + 1] = key; - } - - // make sure each candidate only shows up once in the list: - int first = 0, contactCount = 0; - while(++first != candidateCount) - { - if (candidates[contactCount] != candidates[first]) - candidates[++contactCount] = candidates[first]; - } - contactCount++; - - // append contacts: - for (int i = 0; i < contactCount; i++) - { - int c = candidates[i]; - - // get shape bounds in solver space: - aabb colliderBoundsSS = CalculateShapeAABB(shapes[c]).Transformed(worldToSolver[0].Multiply(transforms[c])); - - // check if any simplex particle and the collider should collide: - bool shouldCollide = false; - int colliderCategory = shapes[c].filter & CategoryMask; - int colliderMask = (shapes[c].filter & MaskMask) >> 16; - for (int j = 0; j < simplexSize; ++j) - { - int simplexCategory = filters[simplices[simplexStart + j]] & CategoryMask; - int simplexMask = (filters[simplices[simplexStart + j]] & MaskMask) >> 16; - shouldCollide = shouldCollide || ((simplexCategory & colliderMask) != 0 && (simplexMask & colliderCategory) != 0); - } - - if (shouldCollide && b.IntersectsAabb(colliderBoundsSS)) - { - uint count; - InterlockedAdd(dispatchBuffer[7], 1, count); - - // technically incorrect, as number of pairs != number of contacts but - // we will ignore either excess pairs or contacts. - if (count < maxResults) - { - // increment the amount of contacts for this shape type: - InterlockedAdd(colliderTypeCounts[shapes[c].type],1); - - // enqueue a new contact pair: - unsortedContactPairs[count] = uint2(threadIndex,c); - - InterlockedMax(dispatchBuffer[4],(count + 1) / 128 + 1); - } - } - } - } -} - -[numthreads(1, 1, 1)] -void PrefixSumColliderCounts (uint3 id : SV_DispatchThreadID) -{ - contactOffsetsPerType[0] = 0; - int i; - - for (i = 0; i < shapeTypeCount; ++i) - { - contactOffsetsPerType[i+1] = contactOffsetsPerType[i] + colliderTypeCounts[i]; - - // write amount of pairs per collider type in the dispatch buffer: - dispatchBuffer[8 + i*4] = colliderTypeCounts[i] / 128 + 1; - dispatchBuffer[8 + i*4 + 3] = colliderTypeCounts[i]; - } -} - -[numthreads(128, 1, 1)] -void SortContactPairs (uint3 id : SV_DispatchThreadID) -{ - uint i = id.x; - if (i >= dispatchBuffer[7] || i >= maxResults) return; - - uint2 pair = unsortedContactPairs[i]; - int shapeType = (int)shapes[pair.y].type; - - // decrement amount of pairs for the given collider type: - uint count; - InterlockedAdd(colliderTypeCounts[shapeType],-1, count); - - // write the pair directly at its position in the sorted array: - contactPairs[contactOffsetsPerType[shapeType] + count - 1] = pair; -} - - - diff --git a/Assets/Obi/Resources/Compute/SpatialQueries.compute.meta b/Assets/Obi/Resources/Compute/SpatialQueries.compute.meta deleted file mode 100644 index 69122c2b3..000000000 --- a/Assets/Obi/Resources/Compute/SpatialQueries.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: dbbb4eb0bd2fa43e08564bf661b00670 -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 65536 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/SphereShape.compute b/Assets/Obi/Resources/Compute/SphereShape.compute deleted file mode 100644 index d801dd95f..000000000 --- a/Assets/Obi/Resources/Compute/SphereShape.compute +++ /dev/null @@ -1,72 +0,0 @@ -#include "ColliderDefinitions.cginc" -#include "ContactHandling.cginc" -#include "DistanceFunctions.cginc" -#include "Simplex.cginc" -#include "Bounds.cginc" -#include "SolverParameters.cginc" -#include "Optimization.cginc" - -#pragma kernel GenerateContacts - -StructuredBuffer positions; -StructuredBuffer orientations; -StructuredBuffer principalRadii; -StructuredBuffer velocities; - -StructuredBuffer simplices; - -StructuredBuffer transforms; -StructuredBuffer shapes; - -StructuredBuffer contactPairs; -StructuredBuffer contactOffsetsPerType; - -RWStructuredBuffer contacts; -RWStructuredBuffer dispatchBuffer; - -StructuredBuffer worldToSolver; - -uint maxContacts; - -[numthreads(128, 1, 1)] -void GenerateContacts (uint3 id : SV_DispatchThreadID) -{ - uint i = id.x; - - // entry #11 in the dispatch buffer is the amount of pairs for the first shape type. - if (i >= dispatchBuffer[11 + 4*SPHERE_SHAPE]) return; - - uint count = contacts.IncrementCounter(); - if (count < maxContacts) - { - int firstPair = contactOffsetsPerType[SPHERE_SHAPE]; - int simplexIndex = contactPairs[firstPair + i].x; - int colliderIndex = contactPairs[firstPair + i].y; - - contact c = (contact)0; - - Sphere sphereShape; - sphereShape.colliderToSolver = worldToSolver[0].Multiply(transforms[colliderIndex]); - sphereShape.s = shapes[colliderIndex]; - - int simplexSize; - int simplexStart = GetSimplexStartAndSize(simplexIndex, simplexSize); - - float4 simplexBary = BarycenterForSimplexOfSize(simplexSize); - float4 simplexPoint; - - SurfacePoint surfacePoint = Optimize(sphereShape, positions, orientations, principalRadii, - simplices, simplexStart, simplexSize, simplexBary, simplexPoint, surfaceCollisionIterations, surfaceCollisionTolerance); - - c.pointB = surfacePoint.pos; - c.normal = surfacePoint.normal * sphereShape.s.isInverted(); - c.pointA = simplexBary; - c.bodyA = simplexIndex; - c.bodyB = colliderIndex; - - contacts[count] = c; - - InterlockedMax(dispatchBuffer[0],(count + 1) / 128 + 1); - InterlockedMax(dispatchBuffer[3], count + 1); - } -} \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/SphereShape.compute.meta b/Assets/Obi/Resources/Compute/SphereShape.compute.meta deleted file mode 100644 index 282bd67c2..000000000 --- a/Assets/Obi/Resources/Compute/SphereShape.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 6bde4f5390fee479ba06d6691eb9450b -ComputeShaderImporter: - externalObjects: {} - preprocessorOverride: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/SphereShapeQuery.compute b/Assets/Obi/Resources/Compute/SphereShapeQuery.compute deleted file mode 100644 index cea2c12e3..000000000 --- a/Assets/Obi/Resources/Compute/SphereShapeQuery.compute +++ /dev/null @@ -1,107 +0,0 @@ -#include "ColliderDefinitions.cginc" -#include "QueryDefinitions.cginc" -#include "ContactHandling.cginc" -#include "Transform.cginc" -#include "Simplex.cginc" -#include "Bounds.cginc" -#include "SolverParameters.cginc" -#include "Optimization.cginc" - -#pragma kernel GenerateResults - -StructuredBuffer positions; -StructuredBuffer orientations; -StructuredBuffer principalRadii; -StructuredBuffer simplices; - -StructuredBuffer transforms; -StructuredBuffer shapes; - -StructuredBuffer contactPairs; -StructuredBuffer contactOffsetsPerType; - -RWStructuredBuffer results; -RWStructuredBuffer dispatchBuffer; - -StructuredBuffer worldToSolver; - -uint maxContacts; - -struct Sphere : IDistanceFunction -{ - queryShape s; - transform colliderToSolver; - - void Evaluate(in float4 pos, in float4 radii, in quaternion orientation, inout SurfacePoint projectedPoint) - { - float4 center = s.center * colliderToSolver.scale; - float4 pnt = colliderToSolver.InverseTransformPointUnscaled(pos) - center; - - float radius = s.size.x * cmax(colliderToSolver.scale.xyz); - float distanceToCenter = length(pnt); - - float4 normal = pnt / (distanceToCenter + EPSILON); - - projectedPoint.pos = colliderToSolver.TransformPointUnscaled(center + normal * (radius + s.contactOffset)); - projectedPoint.normal = colliderToSolver.TransformDirection(normal); - projectedPoint.bary = float4(1,0,0,0); - } -}; - -[numthreads(128, 1, 1)] -void GenerateResults (uint3 id : SV_DispatchThreadID) -{ - uint i = id.x; - - // entry #11 in the dispatch buffer is the amount of pairs for the first shape type. - if (i >= dispatchBuffer[11 + 4*SPHERE_QUERY]) return; - - int firstPair = contactOffsetsPerType[SPHERE_QUERY]; - int simplexIndex = contactPairs[firstPair + i].x; - int queryIndex = contactPairs[firstPair + i].y; - - queryResult c = (queryResult)0; - - Sphere sphereShape; - sphereShape.colliderToSolver = worldToSolver[0].Multiply(transforms[queryIndex]); - sphereShape.s = shapes[queryIndex]; - - int simplexSize; - int simplexStart = GetSimplexStartAndSize(simplexIndex, simplexSize); - - float4 simplexBary = BarycenterForSimplexOfSize(simplexSize); - float4 simplexPoint; - - SurfacePoint surfacePoint = Optimize(sphereShape, positions, orientations, principalRadii, - simplices, simplexStart, simplexSize, simplexBary, simplexPoint, surfaceCollisionIterations, surfaceCollisionTolerance); - - - float4 simplexPrevPosition = FLOAT4_ZERO; - float simplexRadius = 0; - for (int j = 0; j < simplexSize; ++j) - { - int particleIndex = simplices[simplexStart + j]; - simplexPrevPosition += positions[particleIndex] * simplexBary[j]; - simplexRadius += EllipsoidRadius(surfacePoint.normal, orientations[particleIndex], principalRadii[particleIndex].xyz) * simplexBary[j]; - } - - c.queryPoint = surfacePoint.pos; - c.normal = surfacePoint.normal; - c.simplexBary = simplexBary; - c.simplexIndex = simplexIndex; - c.queryIndex = queryIndex; - c.dist = dot(simplexPrevPosition - surfacePoint.pos,surfacePoint.normal) - simplexRadius; - - if (c.dist <= sphereShape.s.maxDistance) - { - uint count = results.IncrementCounter(); - if (count < maxContacts) - { - results[count] = c; - - InterlockedMax(dispatchBuffer[0],(count + 1) / 128 + 1); - InterlockedMax(dispatchBuffer[3], count + 1); - } - } - -} \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/SphereShapeQuery.compute.meta b/Assets/Obi/Resources/Compute/SphereShapeQuery.compute.meta deleted file mode 100644 index c8efb5a70..000000000 --- a/Assets/Obi/Resources/Compute/SphereShapeQuery.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 1b86e67abd0f74accb1c47af5aa6ffbe -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 65536 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/StitchConstraints.compute b/Assets/Obi/Resources/Compute/StitchConstraints.compute deleted file mode 100644 index e26a380fd..000000000 --- a/Assets/Obi/Resources/Compute/StitchConstraints.compute +++ /dev/null @@ -1,64 +0,0 @@ -#pragma kernel Project -#pragma kernel Apply - -#include "MathUtils.cginc" -#include "AtomicDeltas.cginc" - -StructuredBuffer particleIndices; -StructuredBuffer stiffnesses; -RWStructuredBuffer lambdas; - -RWStructuredBuffer positions; -StructuredBuffer invMasses; - -// Variables set from the CPU -uint activeConstraintCount; -float deltaTime; -float sorFactor; - -[numthreads(128, 1, 1)] -void Project (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= activeConstraintCount) return; - - int p1 = particleIndices[i * 2]; - int p2 = particleIndices[i * 2 + 1]; - - float w1 = invMasses[p1]; - float w2 = invMasses[p2]; - - // calculate time adjusted compliance - float compliance = stiffnesses[i] / (deltaTime * deltaTime); - - // calculate position and lambda deltas: - float4 dist = positions[p1] - positions[p2]; - float constraint = length(dist); - - // calculate lambda and position deltas: - float dlambda = (-constraint - compliance * lambdas[i]) / (w1 + w2 + compliance + EPSILON); - float4 delta = dlambda * dist / (constraint + EPSILON); - - lambdas[i] += dlambda; - - float4 delta1 = delta * w1; - float4 delta2 = -delta * w2; - - AddPositionDelta(p1, delta1); - AddPositionDelta(p2, delta2); -} - -[numthreads(128, 1, 1)] -void Apply (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= activeConstraintCount) return; - - int p1 = particleIndices[i * 2]; - int p2 = particleIndices[i * 2 + 1]; - - ApplyPositionDelta(positions, p1, sorFactor); - ApplyPositionDelta(positions, p2, sorFactor); -} \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/StitchConstraints.compute.meta b/Assets/Obi/Resources/Compute/StitchConstraints.compute.meta deleted file mode 100644 index bf07c4dc6..000000000 --- a/Assets/Obi/Resources/Compute/StitchConstraints.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 9d8b905ab89234f6c9c7774317150282 -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 65536 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/StretchShearConstraints.compute b/Assets/Obi/Resources/Compute/StretchShearConstraints.compute deleted file mode 100644 index 5da22d7e1..000000000 --- a/Assets/Obi/Resources/Compute/StretchShearConstraints.compute +++ /dev/null @@ -1,86 +0,0 @@ -#pragma kernel Project -#pragma kernel Apply - -#include "MathUtils.cginc" -#include "AtomicDeltas.cginc" - -StructuredBuffer particleIndices; -StructuredBuffer orientationIndices; -StructuredBuffer restLengths; -StructuredBuffer restOrientations; -StructuredBuffer stiffnesses; -RWStructuredBuffer lambdas; - -RWStructuredBuffer positions; -RWStructuredBuffer orientations; -StructuredBuffer invMasses; -StructuredBuffer invRotationalMasses; - -// Variables set from the CPU -uint activeConstraintCount; -float deltaTime; -float sorFactor; - -[numthreads(128, 1, 1)] -void Project (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= activeConstraintCount) return; - - int p1 = particleIndices[i * 2]; - int p2 = particleIndices[i * 2 + 1]; - int q = orientationIndices[i]; - - float w1 = invMasses[p1]; - float w2 = invMasses[p2]; - - // calculate time adjusted compliance - float3 compliances = stiffnesses[i] / (deltaTime * deltaTime); - - float3 e = rotate_vector(restOrientations[i], float3(0, 0, 1)); - quaternion basis = qmul(orientations[q],restOrientations[i]); - - // calculate rod vector in local element space: - float3 gamma = rotate_vector(q_conj(basis), (positions[p2] - positions[p1]).xyz) / (restLengths[i] + EPSILON); - - // subtract third director vector (0,0,1): - gamma[2] -= 1; - - float W = (w1 + w2) / (restLengths[i] + EPSILON) + invRotationalMasses[q] * 4.0f * restLengths[i]; - float3 dlambda = (gamma - compliances * lambdas[i]) / (W + compliances + EPSILON); - lambdas[i] += dlambda; - - // convert lambda delta lambda back to world space: - dlambda = rotate_vector(basis, dlambda); - - float4 delta1 = float4(dlambda, 0) * w1; - float4 delta2 = -float4(dlambda, 0) * w2; - - quaternion e_3 = quaternion(e.x,e.y,e.z,0); - quaternion q_e_3_bar = qmul(orientations[q],q_conj(e_3)); - - // calculate rotation delta: - quaternion rotDelta = qmul(quaternion(dlambda[0], dlambda[1], dlambda[2], 0.0f),q_e_3_bar); - rotDelta *= 2.0f * invRotationalMasses[q] * restLengths[i]; - - AddPositionDelta(p1, delta1); - AddPositionDelta(p2, delta2); - AddOrientationDelta(q, rotDelta); -} - -[numthreads(128, 1, 1)] -void Apply (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= activeConstraintCount) return; - - int p1 = particleIndices[i * 2]; - int p2 = particleIndices[i * 2 + 1]; - int q = orientationIndices[i]; - - ApplyPositionDelta(positions, p1, sorFactor); - ApplyPositionDelta(positions, p2, sorFactor); - ApplyOrientationDelta(orientations, q, sorFactor); -} \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/StretchShearConstraints.compute.meta b/Assets/Obi/Resources/Compute/StretchShearConstraints.compute.meta deleted file mode 100644 index 99b251aff..000000000 --- a/Assets/Obi/Resources/Compute/StretchShearConstraints.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 09e95e8821fe445bf87f0d434d789822 -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 65536 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/SurfacePoint.cginc b/Assets/Obi/Resources/Compute/SurfacePoint.cginc deleted file mode 100644 index e9d25466a..000000000 --- a/Assets/Obi/Resources/Compute/SurfacePoint.cginc +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef SURFACEPOINT_INCLUDE -#define SURFACEPOINT_INCLUDE - -/** - * point in the surface of a signed distance field. - */ -struct SurfacePoint -{ - float4 bary; - float4 pos; - float4 normal; -}; - -interface IDistanceFunction -{ - void Evaluate(in float4 pos, in float4 radii, in quaternion orientation, inout SurfacePoint projectedPoint); -}; - -#endif \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/SurfacePoint.cginc.meta b/Assets/Obi/Resources/Compute/SurfacePoint.cginc.meta deleted file mode 100644 index f7b123e22..000000000 --- a/Assets/Obi/Resources/Compute/SurfacePoint.cginc.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: b54db800f0f884467b02edb24ca317d4 -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/TetherConstraints.compute b/Assets/Obi/Resources/Compute/TetherConstraints.compute deleted file mode 100644 index cd99220ff..000000000 --- a/Assets/Obi/Resources/Compute/TetherConstraints.compute +++ /dev/null @@ -1,64 +0,0 @@ -#pragma kernel Project -#pragma kernel Apply - -#include "MathUtils.cginc" -#include "AtomicDeltas.cginc" - -StructuredBuffer particleIndices; -StructuredBuffer maxLengthScale; -StructuredBuffer stiffnesses; -RWStructuredBuffer lambdas; - -RWStructuredBuffer positions; -StructuredBuffer invMasses; - -// Variables set from the CPU -uint activeConstraintCount; -float deltaTime; -float sorFactor; - -[numthreads(128, 1, 1)] -void Project (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= activeConstraintCount) return; - - int p1 = particleIndices[i * 2]; - int p2 = particleIndices[i * 2 + 1]; - - float w1 = invMasses[p1]; - float w2 = invMasses[p2]; - - // calculate time adjusted compliance - float compliance = stiffnesses[i] / (deltaTime * deltaTime); - - // calculate position and lambda deltas: - float4 dist = positions[p1] - positions[p2]; - float d = length(dist); - - // calculate constraint value (distance - rest length) - float constraint = d - (maxLengthScale[i].x * maxLengthScale[i].y); - - if (constraint > 0) - { - // calculate lambda and position deltas: - float dlambda = (-constraint - compliance * lambdas[i]) / (w1 + w2 + compliance + EPSILON); - float4 delta = dlambda * dist / (d + EPSILON); - lambdas[i] += dlambda; - - AddPositionDelta(p1, delta * w1); - } -} - -[numthreads(128, 1, 1)] -void Apply (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= activeConstraintCount) return; - - int p = particleIndices[i * 2]; - - ApplyPositionDelta(positions, p, sorFactor); -} \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/TetherConstraints.compute.meta b/Assets/Obi/Resources/Compute/TetherConstraints.compute.meta deleted file mode 100644 index 280042e3c..000000000 --- a/Assets/Obi/Resources/Compute/TetherConstraints.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: dcd2ea33ecfcb4fb0ac44c5a66ea69f8 -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 65536 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/Transform.cginc b/Assets/Obi/Resources/Compute/Transform.cginc deleted file mode 100644 index 039279a43..000000000 --- a/Assets/Obi/Resources/Compute/Transform.cginc +++ /dev/null @@ -1,98 +0,0 @@ -#ifndef TRANSFORM_INCLUDE -#define TRANSFORM_INCLUDE - -#include "Quaternion.cginc" -#include "Integration.cginc" - -struct transform -{ - float4 translation; - float4 scale; - quaternion rotation; - - transform Transform(float4 translation_, quaternion rotation_, float4 scale_) - { - // make sure there are good values in the 4th component: - translation_[3] = 0; - scale_[3] = 1; - - transform t; - t.translation = translation_; - t.rotation = rotation_; - t.scale = scale_; - return t; - } - - transform Inverse() - { - return Transform(float4(rotate_vector(q_conj(rotation),(translation / -scale).xyz),0), - q_conj(rotation), - 1 / scale); - } - - transform Interpolate(transform other, float translationalMu, float rotationalMu, float scaleMu) - { - return Transform(lerp(translation, other.translation, translationalMu), - q_slerp(rotation, other.rotation, rotationalMu), - lerp(scale, other.scale, scaleMu)); - } - - transform Integrate(float4 linearVelocity, float4 angularVelocity, float dt) - { - return Transform(IntegrateLinear(translation, linearVelocity, dt), - IntegrateAngular(rotation, angularVelocity, dt), - scale); - } - - float4 TransformPoint(float4 pnt) - { - return float4(translation.xyz + rotate_vector(rotation, (pnt * scale).xyz),0); - } - - float4 InverseTransformPoint(float4 pnt) - { - return float4(rotate_vector(q_conj(rotation),(pnt - translation).xyz) / scale.xyz , 0); - } - - float4 TransformPointUnscaled(float4 pnt) - { - return float4(translation.xyz + rotate_vector(rotation,pnt.xyz), 0); - } - - float4 InverseTransformPointUnscaled(float4 pnt) - { - return float4(rotate_vector(q_conj(rotation), (pnt - translation).xyz), 0); - } - - float4 TransformDirection(float4 dir) - { - return float4(rotate_vector(rotation, dir.xyz), 0); - } - - float4 InverseTransformDirection(float4 dir) - { - return float4(rotate_vector(q_conj(rotation), dir.xyz), 0); - } - - float4 TransformVector(float4 vect) - { - return float4(rotate_vector(rotation, (vect * scale).xyz), 0); - } - - float4 InverseTransformVector(float4 vect) - { - return float4(rotate_vector(q_conj(rotation),vect.xyz) / scale.xyz, 0); - } - - transform Multiply(transform b) - { - return Transform(this.TransformPoint(b.translation), - qmul(this.rotation,b.rotation), - this.scale * b.scale); - } -}; - - - - -#endif \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/Transform.cginc.meta b/Assets/Obi/Resources/Compute/Transform.cginc.meta deleted file mode 100644 index f749fcd8d..000000000 --- a/Assets/Obi/Resources/Compute/Transform.cginc.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 7e54b6c6b777643958abffa4510e0518 -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/TriangleMeshShape.compute b/Assets/Obi/Resources/Compute/TriangleMeshShape.compute deleted file mode 100644 index f5ea3f0d3..000000000 --- a/Assets/Obi/Resources/Compute/TriangleMeshShape.compute +++ /dev/null @@ -1,154 +0,0 @@ -#include "ColliderDefinitions.cginc" -#include "ContactHandling.cginc" -#include "DistanceFunctions.cginc" -#include "Simplex.cginc" -#include "Bounds.cginc" -#include "SolverParameters.cginc" -#include "Optimization.cginc" - -#pragma kernel GenerateContacts - -StructuredBuffer positions; -StructuredBuffer orientations; -StructuredBuffer principalRadii; -StructuredBuffer velocities; - -StructuredBuffer simplices; -StructuredBuffer simplexBounds; // bounding box of each simplex. - -StructuredBuffer transforms; -StructuredBuffer shapes; - -// triangle mesh data: -StructuredBuffer triangleMeshHeaders; -StructuredBuffer bihNodes; -StructuredBuffer triangles; -StructuredBuffer vertices; - -StructuredBuffer contactPairs; -StructuredBuffer contactOffsetsPerType; - -RWStructuredBuffer contacts; -RWStructuredBuffer dispatchBuffer; - -StructuredBuffer worldToSolver; - -uint maxContacts; -float deltaTime; - - -[numthreads(128, 1, 1)] -void GenerateContacts (uint3 id : SV_DispatchThreadID) -{ - uint i = id.x; - - // entry #11 in the dispatch buffer is the amount of pairs for the first shape type. - if (i >= dispatchBuffer[11 + 4 * TRIANGLE_MESH_SHAPE]) return; - - int firstPair = contactOffsetsPerType[TRIANGLE_MESH_SHAPE]; - int simplexIndex = contactPairs[firstPair + i].x; - int colliderIndex = contactPairs[firstPair + i].y; - shape s = shapes[colliderIndex]; - - if (s.dataIndex < 0) return; - - TriangleMeshHeader header = triangleMeshHeaders[s.dataIndex]; - - TriangleMesh meshShape; - meshShape.colliderToSolver = worldToSolver[0].Multiply(transforms[colliderIndex]); - meshShape.s = s; - - // invert a full matrix here to accurately represent collider bounds scale. - float4x4 solverToCollider = Inverse(TRS(meshShape.colliderToSolver.translation.xyz, meshShape.colliderToSolver.rotation, meshShape.colliderToSolver.scale.xyz)); - aabb simplexBound = simplexBounds[simplexIndex].Transformed(solverToCollider); - - float4 marginCS = float4((s.contactOffset + collisionMargin) / meshShape.colliderToSolver.scale.xyz, 0); - - int simplexSize; - int simplexStart = GetSimplexStartAndSize(simplexIndex, simplexSize); - - int stack[12]; - int stackTop = 0; - - stack[stackTop++] = 0; - - while (stackTop > 0) - { - // pop node index from the stack: - int nodeIndex = stack[--stackTop]; - - BIHNode node = bihNodes[header.firstNode + nodeIndex]; - - // leaf node: - if (node.firstChild < 0) - { - // check for contact against all triangles: - for (int dataOffset = node.start; dataOffset < node.start + node.count; ++dataOffset) - { - Triangle t = triangles[header.firstTriangle + dataOffset]; - float4 v1 = float4(vertices[header.firstVertex + t.i1], 0); - float4 v2 = float4(vertices[header.firstVertex + t.i2], 0); - float4 v3 = float4(vertices[header.firstVertex + t.i3], 0); - aabb triangleBounds; - triangleBounds.FromTriangle(v1, v2, v3, marginCS); - - if (triangleBounds.IntersectsAabb(simplexBound, s.is2D())) - { - float4 simplexBary = BarycenterForSimplexOfSize(simplexSize); - float4 simplexPoint; - - meshShape.tri.Cache(v1 * meshShape.colliderToSolver.scale, v2 * meshShape.colliderToSolver.scale, v3 * meshShape.colliderToSolver.scale); - - SurfacePoint surfacePoint = Optimize(meshShape, positions, orientations, principalRadii, - simplices, simplexStart, simplexSize, simplexBary, simplexPoint, surfaceCollisionIterations, surfaceCollisionTolerance); - - float4 velocity = FLOAT4_ZERO; - float simplexRadius = 0; - for (int j = 0; j < simplexSize; ++j) - { - int particleIndex = simplices[simplexStart + j]; - simplexRadius += principalRadii[particleIndex].x * simplexBary[j]; - velocity += velocities[particleIndex] * simplexBary[j]; - } - - /*float4 rbVelocity = float4.zero; - if (rigidbodyIndex >= 0) - rbVelocity = BurstMath.GetRigidbodyVelocityAtPoint(rigidbodyIndex, colliderPoint.point, rigidbodies, solverToWorld);*/ - - float dAB = dot(simplexPoint - surfacePoint.pos, surfacePoint.normal); - float vel = dot(velocity /*- rbVelocity*/, surfacePoint.normal); - - if (vel * deltaTime + dAB <= simplexRadius + s.contactOffset + collisionMargin) - { - uint count = contacts.IncrementCounter(); - if (count < maxContacts) - { - contact c = (contact)0; - - c.pointB = surfacePoint.pos; - c.normal = surfacePoint.normal * meshShape.s.isInverted(); - c.pointA = simplexBary; - c.bodyA = simplexIndex; - c.bodyB = colliderIndex; - - contacts[count] = c; - - InterlockedMax(dispatchBuffer[0],(count + 1) / 128 + 1); - InterlockedMax(dispatchBuffer[3], count + 1); - } - } - } - } - } - else // check min and/or max children: - { - // visit min node: - if (simplexBound.min_[node.axis] <= node.min_) - stack[stackTop++] = node.firstChild; - - // visit max node: - if (simplexBound.max_[node.axis] >= node.max_) - stack[stackTop++] = node.firstChild + 1; - } - } -} \ No newline at end of file diff --git a/Assets/Obi/Resources/Compute/TriangleMeshShape.compute.meta b/Assets/Obi/Resources/Compute/TriangleMeshShape.compute.meta deleted file mode 100644 index a677721aa..000000000 --- a/Assets/Obi/Resources/Compute/TriangleMeshShape.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: a5454af20f9614aa79e51a90271093e3 -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 65536 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/Compute/VolumeConstraints.compute b/Assets/Obi/Resources/Compute/VolumeConstraints.compute deleted file mode 100644 index 4f6e3d71b..000000000 --- a/Assets/Obi/Resources/Compute/VolumeConstraints.compute +++ /dev/null @@ -1,153 +0,0 @@ -#pragma kernel Gradients -#pragma kernel CalculateVolume -#pragma kernel Denominators -#pragma kernel Constraint -#pragma kernel AccumulateDeltas -#pragma kernel Apply - -//#pragma kernel Project -//#pragma kernel Apply - -#include "MathUtils.cginc" -#include "AtomicDeltas.cginc" - -StructuredBuffer triangles; -StructuredBuffer firstTriangle; -StructuredBuffer numTriangles; -StructuredBuffer restVolumes; -StructuredBuffer pressureStiffness; -RWStructuredBuffer lambdas; - -RWStructuredBuffer denominators; -RWStructuredBuffer volumes; -RWStructuredBuffer gradients; - -StructuredBuffer particles; -StructuredBuffer particleConstraintIndex; -StructuredBuffer triangleConstraintIndex; - -RWStructuredBuffer positions; -StructuredBuffer invMasses; - -// Variables set from the CPU -uint activeConstraintCount; -uint trianglesCount; -uint particlesCount; - -float deltaTime; -float sorFactor; - - -void AccumulateGradient(in int index, in float3 grad) -{ - InterlockedAddFloat(gradients, index, 0, grad.x); - InterlockedAddFloat(gradients, index, 1, grad.y); - InterlockedAddFloat(gradients, index, 2, grad.z); -} - -[numthreads(128, 1, 1)] -void Gradients (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= trianglesCount) return; - - int v = i * 3; - int i1 = triangles[v]; - int i2 = triangles[v + 1]; - int i3 = triangles[v + 2]; - - //accumulate gradient for each particle in the triangle: - AccumulateGradient(i1,cross(positions[i2].xyz, positions[i3].xyz)); - AccumulateGradient(i2,cross(positions[i3].xyz, positions[i1].xyz)); - AccumulateGradient(i3,cross(positions[i1].xyz, positions[i2].xyz)); -} - -[numthreads(128, 1, 1)] -void CalculateVolume (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= trianglesCount) return; - - int constraintIndex = triangleConstraintIndex[i]; - - int v = i * 3; - int i1 = triangles[v]; - int i2 = triangles[v + 1]; - int i3 = triangles[v + 2]; - - float vol = dot(cross(positions[i1].xyz, positions[i2].xyz), positions[i3].xyz) / 6.0f; - InterlockedAddFloat(volumes, triangleConstraintIndex[i],vol); -} - -// One denominator per constraint -// each particle in the constraint contributes only once. - -[numthreads(128, 1, 1)] -void Denominators (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= particlesCount) return; - - int p = particles[i]; - - float3 grad = asfloat(gradients[p]).xyz; - float denom = invMasses[p] * dot(grad, grad); - InterlockedAddFloat(denominators, particleConstraintIndex[i], denom); -} - -[numthreads(128, 1, 1)] -void Constraint (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= activeConstraintCount) return; - - float compliance = pressureStiffness[i].y / (deltaTime * deltaTime); - - // equality constraint: volume - pressure * rest volume = 0 - float constraint = asfloat(volumes[i]) - pressureStiffness[i].x * restVolumes[i]; - - // calculate lagrange multiplier delta: - float dlambda = (-constraint - compliance * 0) / (asfloat(denominators[i]) + compliance + EPSILON); - lambdas[i] = dlambda;//+= dlambda; - - volumes[i] = asuint(0); - denominators[i] = asuint(0); -} - -[numthreads(128, 1, 1)] -void AccumulateDeltas (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= particlesCount) return; - - int p = particles[i]; - int c = particleConstraintIndex[i]; - - AddPositionDelta(p, lambdas[c] * invMasses[p] * asfloat(gradients[p])); - gradients[p] = asuint(FLOAT4_ZERO); -} - -[numthreads(128, 1, 1)] -void Apply (uint3 id : SV_DispatchThreadID) -{ - unsigned int i = id.x; - - if (i >= activeConstraintCount) return; - - for (int j = 0; j < numTriangles[i]; ++j) - { - int v = (firstTriangle[i] + j) * 3; - int p1 = triangles[v]; - int p2 = triangles[v + 1]; - int p3 = triangles[v + 2]; - - ApplyPositionDelta(positions, p1, sorFactor); - ApplyPositionDelta(positions, p2, sorFactor); - ApplyPositionDelta(positions, p3, sorFactor); - } -} diff --git a/Assets/Obi/Resources/Compute/VolumeConstraints.compute.meta b/Assets/Obi/Resources/Compute/VolumeConstraints.compute.meta deleted file mode 100644 index 33f05bbe2..000000000 --- a/Assets/Obi/Resources/Compute/VolumeConstraints.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: fef3adb748a41466696a32b41ecc8831 -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 65536 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/ObiMaterials/Common/Instanced.meta b/Assets/Obi/Resources/ObiMaterials/Common/Instanced.meta deleted file mode 100644 index 71d0305c0..000000000 --- a/Assets/Obi/Resources/ObiMaterials/Common/Instanced.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: b8d28b0e0918140d8b8ee3388bff5ec2 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/ObiMaterials/Common/Instanced/Burst.meta b/Assets/Obi/Resources/ObiMaterials/Common/Instanced/Burst.meta deleted file mode 100644 index 3bd5233dc..000000000 --- a/Assets/Obi/Resources/ObiMaterials/Common/Instanced/Burst.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 1a08e3a8d3c4f4d3b90eb00e408b5f5d -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/ObiMaterials/Common/Instanced/Compute.meta b/Assets/Obi/Resources/ObiMaterials/Common/Instanced/Compute.meta deleted file mode 100644 index 90994bc6b..000000000 --- a/Assets/Obi/Resources/ObiMaterials/Common/Instanced/Compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 5741e12d1b7644a1ea6e9239027b476b -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Resources/ObiMaterials/Common/Instanced/Compute/ProceduralInstanced.shadergraph b/Assets/Obi/Resources/ObiMaterials/Common/Instanced/Compute/ProceduralInstanced.shadergraph deleted file mode 100644 index e1cf98f7d..000000000 --- a/Assets/Obi/Resources/ObiMaterials/Common/Instanced/Compute/ProceduralInstanced.shadergraph +++ /dev/null @@ -1,1049 +0,0 @@ -{ - "m_SGVersion": 3, - "m_Type": "UnityEditor.ShaderGraph.GraphData", - "m_ObjectId": "4d9b84394d46483a8d82779f77202fc2", - "m_Properties": [], - "m_Keywords": [], - "m_Dropdowns": [], - "m_CategoryData": [ - { - "m_Id": "b8a9b963dec346b0a74188d7b6b0cbd5" - } - ], - "m_Nodes": [ - { - "m_Id": "f21b73915f984c11ae68788fc0ea87b5" - }, - { - "m_Id": "57ace758bfb94f7e8df57dc9e52d30e0" - }, - { - "m_Id": "f9361dfcb9af4dc7aa432a4c6703d796" - }, - { - "m_Id": "1a1b6499baff4672a53921e75ddaa5fc" - }, - { - "m_Id": "dce68951c9714e9788d94c3f8d2b91f5" - }, - { - "m_Id": "9081e58b798945758e693a26c3ebd8f5" - }, - { - "m_Id": "b123e3fa488745408e3fbf602a25daf3" - }, - { - "m_Id": "2c50baddc9b84aa8afb710be8e070875" - }, - { - "m_Id": "589e3cd2f09646a5a13738ee59e9ba67" - }, - { - "m_Id": "3c6527cfc4f6489bb7b4a2363bb7eb6d" - }, - { - "m_Id": "f2a0e5496350488fa545f78531eb1ec1" - }, - { - "m_Id": "141eeae6827640a3a61aeb2fe17525be" - }, - { - "m_Id": "1a26996b23904b9f86115e7a3a1217d4" - } - ], - "m_GroupDatas": [], - "m_StickyNoteDatas": [], - "m_Edges": [ - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "2c50baddc9b84aa8afb710be8e070875" - }, - "m_SlotId": 2 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "1a1b6499baff4672a53921e75ddaa5fc" - }, - "m_SlotId": 0 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "2c50baddc9b84aa8afb710be8e070875" - }, - "m_SlotId": 4 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "dce68951c9714e9788d94c3f8d2b91f5" - }, - "m_SlotId": 0 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "9081e58b798945758e693a26c3ebd8f5" - }, - "m_SlotId": 0 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "2c50baddc9b84aa8afb710be8e070875" - }, - "m_SlotId": 3 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "b123e3fa488745408e3fbf602a25daf3" - }, - "m_SlotId": 0 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "2c50baddc9b84aa8afb710be8e070875" - }, - "m_SlotId": 0 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "dce68951c9714e9788d94c3f8d2b91f5" - }, - "m_SlotId": 1 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "f21b73915f984c11ae68788fc0ea87b5" - }, - "m_SlotId": 0 - } - } - ], - "m_VertexContext": { - "m_Position": { - "x": -217.00001525878907, - "y": -224.0 - }, - "m_Blocks": [ - { - "m_Id": "f21b73915f984c11ae68788fc0ea87b5" - }, - { - "m_Id": "57ace758bfb94f7e8df57dc9e52d30e0" - }, - { - "m_Id": "f9361dfcb9af4dc7aa432a4c6703d796" - } - ] - }, - "m_FragmentContext": { - "m_Position": { - "x": -216.99998474121095, - "y": 20.0 - }, - "m_Blocks": [ - { - "m_Id": "1a1b6499baff4672a53921e75ddaa5fc" - }, - { - "m_Id": "589e3cd2f09646a5a13738ee59e9ba67" - }, - { - "m_Id": "3c6527cfc4f6489bb7b4a2363bb7eb6d" - }, - { - "m_Id": "f2a0e5496350488fa545f78531eb1ec1" - }, - { - "m_Id": "141eeae6827640a3a61aeb2fe17525be" - }, - { - "m_Id": "1a26996b23904b9f86115e7a3a1217d4" - } - ] - }, - "m_PreviewData": { - "serializedMesh": { - "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", - "m_Guid": "" - }, - "preventRotation": false - }, - "m_Path": "Shader Graphs", - "m_GraphPrecision": 1, - "m_PreviewMode": 2, - "m_OutputNode": { - "m_Id": "" - }, - "m_ActiveTargets": [ - { - "m_Id": "7338c42471074b8186f44d81129cb741" - } - ] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.PositionMaterialSlot", - "m_ObjectId": "0a05b15df7ce451c80d16da630598a05", - "m_Id": 0, - "m_DisplayName": "Position", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "Position", - "m_StageCapability": 1, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_Labels": [], - "m_Space": 0 -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", - "m_ObjectId": "0f629d2105bb44b7af198990fb5e0e3a", - "m_Id": 0, - "m_DisplayName": "Metallic", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "Metallic", - "m_StageCapability": 2, - "m_Value": 0.0, - "m_DefaultValue": 0.0, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot", - "m_ObjectId": "10e91cfc92e2437989b0fcafaa1b04e2", - "m_Id": 0, - "m_DisplayName": "Base Color", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "BaseColor", - "m_StageCapability": 2, - "m_Value": { - "x": 0.5, - "y": 0.5, - "z": 0.5 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_Labels": [], - "m_ColorMode": 0, - "m_DefaultColor": { - "r": 0.5, - "g": 0.5, - "b": 0.5, - "a": 1.0 - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.BlockNode", - "m_ObjectId": "141eeae6827640a3a61aeb2fe17525be", - "m_Group": { - "m_Id": "" - }, - "m_Name": "SurfaceDescription.Occlusion", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": 0.0, - "y": 0.0, - "width": 0.0, - "height": 0.0 - } - }, - "m_Slots": [ - { - "m_Id": "a08911364fef4ff9a88b383f6a943b8f" - } - ], - "synonyms": [], - "m_Precision": 0, - "m_PreviewExpanded": true, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_SerializedDescriptor": "SurfaceDescription.Occlusion" -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.BlockNode", - "m_ObjectId": "1a1b6499baff4672a53921e75ddaa5fc", - "m_Group": { - "m_Id": "" - }, - "m_Name": "SurfaceDescription.BaseColor", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": 0.0, - "y": 0.0, - "width": 0.0, - "height": 0.0 - } - }, - "m_Slots": [ - { - "m_Id": "10e91cfc92e2437989b0fcafaa1b04e2" - } - ], - "synonyms": [], - "m_Precision": 0, - "m_PreviewExpanded": true, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_SerializedDescriptor": "SurfaceDescription.BaseColor" -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.BlockNode", - "m_ObjectId": "1a26996b23904b9f86115e7a3a1217d4", - "m_Group": { - "m_Id": "" - }, - "m_Name": "SurfaceDescription.Metallic", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": 0.0, - "y": 0.0, - "width": 0.0, - "height": 0.0 - } - }, - "m_Slots": [ - { - "m_Id": "0f629d2105bb44b7af198990fb5e0e3a" - } - ], - "synonyms": [], - "m_Precision": 0, - "m_PreviewExpanded": true, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_SerializedDescriptor": "SurfaceDescription.Metallic" -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", - "m_ObjectId": "1fe2b168153e4be0aaf2bf6d9a61e25e", - "m_Id": 3, - "m_DisplayName": "Pos", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "Pos", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 1, - "m_Type": "UnityEditor.ShaderGraph.CustomFunctionNode", - "m_ObjectId": "2c50baddc9b84aa8afb710be8e070875", - "m_Group": { - "m_Id": "" - }, - "m_Name": "GetInstanceData (Custom Function)", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": -923.0, - "y": 19.999998092651368, - "width": 250.0, - "height": 118.00003051757813 - } - }, - "m_Slots": [ - { - "m_Id": "a2a2e4fd908444d4b04556ecd31ca4a1" - }, - { - "m_Id": "1fe2b168153e4be0aaf2bf6d9a61e25e" - }, - { - "m_Id": "37ecf6c8b3124fb88f0c94ed94b29b1f" - }, - { - "m_Id": "2c56cb67b3594192821def9e2c1f6e25" - } - ], - "synonyms": [ - "code", - "HLSL" - ], - "m_Precision": 0, - "m_PreviewExpanded": false, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_SourceType": 0, - "m_FunctionName": "GetInstanceData", - "m_FunctionSource": "9d77a2f1bd0624d4aa045916cb0955c9", - "m_FunctionBody": "Enter function body here..." -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", - "m_ObjectId": "2c56cb67b3594192821def9e2c1f6e25", - "m_Id": 2, - "m_DisplayName": "Color", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "Color", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", - "m_ObjectId": "37ecf6c8b3124fb88f0c94ed94b29b1f", - "m_Id": 4, - "m_DisplayName": "OutPos", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "OutPos", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", - "m_ObjectId": "3b467b9abac74f6680f029acc0fe9962", - "m_Id": 1, - "m_DisplayName": "Out", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "Out", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.BlockNode", - "m_ObjectId": "3c6527cfc4f6489bb7b4a2363bb7eb6d", - "m_Group": { - "m_Id": "" - }, - "m_Name": "SurfaceDescription.NormalTS", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": 0.0, - "y": 0.0, - "width": 0.0, - "height": 0.0 - } - }, - "m_Slots": [ - { - "m_Id": "f5027c09c73c476da7ed59558d84434c" - } - ], - "synonyms": [], - "m_Precision": 0, - "m_PreviewExpanded": true, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_SerializedDescriptor": "SurfaceDescription.NormalTS" -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", - "m_ObjectId": "506261c1d36144a997b4e1d83f9e50ed", - "m_Id": 0, - "m_DisplayName": "Smoothness", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "Smoothness", - "m_StageCapability": 2, - "m_Value": 0.5, - "m_DefaultValue": 0.5, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.BlockNode", - "m_ObjectId": "57ace758bfb94f7e8df57dc9e52d30e0", - "m_Group": { - "m_Id": "" - }, - "m_Name": "VertexDescription.Normal", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": 0.0, - "y": 0.0, - "width": 0.0, - "height": 0.0 - } - }, - "m_Slots": [ - { - "m_Id": "bbf8165ffd154394a2a8816930eddf76" - } - ], - "synonyms": [], - "m_Precision": 0, - "m_PreviewExpanded": true, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_SerializedDescriptor": "VertexDescription.Normal" -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.BlockNode", - "m_ObjectId": "589e3cd2f09646a5a13738ee59e9ba67", - "m_Group": { - "m_Id": "" - }, - "m_Name": "SurfaceDescription.Smoothness", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": 0.0, - "y": 0.0, - "width": 0.0, - "height": 0.0 - } - }, - "m_Slots": [ - { - "m_Id": "506261c1d36144a997b4e1d83f9e50ed" - } - ], - "synonyms": [], - "m_Precision": 0, - "m_PreviewExpanded": true, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_SerializedDescriptor": "SurfaceDescription.Smoothness" -} - -{ - "m_SGVersion": 2, - "m_Type": "UnityEditor.Rendering.BuiltIn.ShaderGraph.BuiltInTarget", - "m_ObjectId": "7338c42471074b8186f44d81129cb741", - "m_ActiveSubTarget": { - "m_Id": "8c851f9258de4ef494985580b1531932" - }, - "m_AllowMaterialOverride": false, - "m_SurfaceType": 0, - "m_ZWriteControl": 0, - "m_ZTestMode": 4, - "m_AlphaMode": 0, - "m_RenderFace": 2, - "m_AlphaClip": false, - "m_CustomEditorGUI": "" -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", - "m_ObjectId": "76eb4fd0181147b9ba1c126d0b50b4c8", - "m_Id": 0, - "m_DisplayName": "Out", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "Out", - "m_StageCapability": 3, - "m_Value": 0.0, - "m_DefaultValue": 0.0, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.Rendering.BuiltIn.ShaderGraph.BuiltInLitSubTarget", - "m_ObjectId": "8c851f9258de4ef494985580b1531932", - "m_WorkflowMode": 1, - "m_NormalDropOffSpace": 0 -} - -{ - "m_SGVersion": 1, - "m_Type": "UnityEditor.ShaderGraph.PositionNode", - "m_ObjectId": "9081e58b798945758e693a26c3ebd8f5", - "m_Group": { - "m_Id": "" - }, - "m_Name": "Position", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": -1202.5, - "y": 73.0000228881836, - "width": 205.99993896484376, - "height": 130.5 - } - }, - "m_Slots": [ - { - "m_Id": "c9308b0d0e9a4b2eacfd32a0defa35ba" - } - ], - "synonyms": [ - "location" - ], - "m_Precision": 0, - "m_PreviewExpanded": false, - "m_PreviewMode": 2, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_Space": 0, - "m_PositionSource": 0 -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", - "m_ObjectId": "95e168ba774041c59d5e045b2ee33f3c", - "m_Id": 0, - "m_DisplayName": "In", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "In", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", - "m_ObjectId": "a08911364fef4ff9a88b383f6a943b8f", - "m_Id": 0, - "m_DisplayName": "Ambient Occlusion", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "Occlusion", - "m_StageCapability": 2, - "m_Value": 1.0, - "m_DefaultValue": 1.0, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", - "m_ObjectId": "a2a2e4fd908444d4b04556ecd31ca4a1", - "m_Id": 0, - "m_DisplayName": "InstanceID", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "InstanceID", - "m_StageCapability": 3, - "m_Value": 0.0, - "m_DefaultValue": 0.0, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.InstanceIDNode", - "m_ObjectId": "b123e3fa488745408e3fbf602a25daf3", - "m_Group": { - "m_Id": "" - }, - "m_Name": "Instance ID", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": -1099.5001220703125, - "y": -21.500003814697267, - "width": 109.5, - "height": 77.00001525878906 - } - }, - "m_Slots": [ - { - "m_Id": "76eb4fd0181147b9ba1c126d0b50b4c8" - } - ], - "synonyms": [], - "m_Precision": 0, - "m_PreviewExpanded": true, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.CategoryData", - "m_ObjectId": "b8a9b963dec346b0a74188d7b6b0cbd5", - "m_Name": "", - "m_ChildObjectList": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot", - "m_ObjectId": "bbf8165ffd154394a2a8816930eddf76", - "m_Id": 0, - "m_DisplayName": "Normal", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "Normal", - "m_StageCapability": 1, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_Labels": [], - "m_Space": 0 -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", - "m_ObjectId": "c9308b0d0e9a4b2eacfd32a0defa35ba", - "m_Id": 0, - "m_DisplayName": "Out", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "Out", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot", - "m_ObjectId": "dcc60507b5a34b6e8fba60b6787a5774", - "m_Id": 0, - "m_DisplayName": "Emission", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "Emission", - "m_StageCapability": 2, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_Labels": [], - "m_ColorMode": 1, - "m_DefaultColor": { - "r": 0.0, - "g": 0.0, - "b": 0.0, - "a": 1.0 - } -} - -{ - "m_SGVersion": 1, - "m_Type": "UnityEditor.ShaderGraph.CustomFunctionNode", - "m_ObjectId": "dce68951c9714e9788d94c3f8d2b91f5", - "m_Group": { - "m_Id": "" - }, - "m_Name": "vertInstancingSetup (Custom Function)", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": -615.0, - "y": -224.00003051757813, - "width": 269.0, - "height": 94.00001525878906 - } - }, - "m_Slots": [ - { - "m_Id": "95e168ba774041c59d5e045b2ee33f3c" - }, - { - "m_Id": "3b467b9abac74f6680f029acc0fe9962" - } - ], - "synonyms": [ - "code", - "HLSL" - ], - "m_Precision": 0, - "m_PreviewExpanded": false, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_SourceType": 1, - "m_FunctionName": "vertInstancingSetup", - "m_FunctionSource": "", - "m_FunctionBody": "Out = In;\n}\n\n#pragma multi_compile_instancing\n#pragma instancing_options renderinglayer procedural:vertInstancingSetup\n\nvoid dummy(){" -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.TangentMaterialSlot", - "m_ObjectId": "f219385ccac248649c14265dcc45cdbd", - "m_Id": 0, - "m_DisplayName": "Tangent", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "Tangent", - "m_StageCapability": 1, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_Labels": [], - "m_Space": 0 -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.BlockNode", - "m_ObjectId": "f21b73915f984c11ae68788fc0ea87b5", - "m_Group": { - "m_Id": "" - }, - "m_Name": "VertexDescription.Position", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": 47.999996185302737, - "y": -60.00000762939453, - "width": 199.9999237060547, - "height": 41.0 - } - }, - "m_Slots": [ - { - "m_Id": "0a05b15df7ce451c80d16da630598a05" - } - ], - "synonyms": [], - "m_Precision": 0, - "m_PreviewExpanded": true, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_SerializedDescriptor": "VertexDescription.Position" -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.BlockNode", - "m_ObjectId": "f2a0e5496350488fa545f78531eb1ec1", - "m_Group": { - "m_Id": "" - }, - "m_Name": "SurfaceDescription.Emission", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": 0.0, - "y": 0.0, - "width": 0.0, - "height": 0.0 - } - }, - "m_Slots": [ - { - "m_Id": "dcc60507b5a34b6e8fba60b6787a5774" - } - ], - "synonyms": [], - "m_Precision": 0, - "m_PreviewExpanded": true, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_SerializedDescriptor": "SurfaceDescription.Emission" -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot", - "m_ObjectId": "f5027c09c73c476da7ed59558d84434c", - "m_Id": 0, - "m_DisplayName": "Normal (Tangent Space)", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "NormalTS", - "m_StageCapability": 2, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_Labels": [], - "m_Space": 3 -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.BlockNode", - "m_ObjectId": "f9361dfcb9af4dc7aa432a4c6703d796", - "m_Group": { - "m_Id": "" - }, - "m_Name": "VertexDescription.Tangent", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": 0.0, - "y": 0.0, - "width": 0.0, - "height": 0.0 - } - }, - "m_Slots": [ - { - "m_Id": "f219385ccac248649c14265dcc45cdbd" - } - ], - "synonyms": [], - "m_Precision": 0, - "m_PreviewExpanded": true, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_SerializedDescriptor": "VertexDescription.Tangent" -} - diff --git a/Assets/Obi/Resources/ObiMaterials/Common/Instanced/Compute/ProceduralInstancing.cginc b/Assets/Obi/Resources/ObiMaterials/Common/Instanced/Compute/ProceduralInstancing.cginc deleted file mode 100644 index 44c796b32..000000000 --- a/Assets/Obi/Resources/ObiMaterials/Common/Instanced/Compute/ProceduralInstancing.cginc +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef PROCEDURAL_INCLUDED -#define PROCEDURAL_INCLUDED - -#define UNITY_INDIRECT_DRAW_ARGS IndirectDrawIndexedArgs -#include "UnityIndirect.cginc" - -StructuredBuffer _InstanceTransforms; -StructuredBuffer _InvInstanceTransforms; -StructuredBuffer _Colors; - -#if UNITY_ANY_INSTANCING_ENABLED - // Based on : - // https://github.com/Unity-Technologies/Graphics/blob/master/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/ShaderLibrary/ParticlesInstancing.hlsl - // and/or - // https://github.com/TwoTailsGames/Unity-Built-in-Shaders/blob/master/CGIncludes/UnityStandardParticleInstancing.cginc - - void vertInstancingSetup() { - } -#endif - -void GetInstanceData_float(uint svInstanceID, float3 pos, out float3 outPos, out float4 color) -{ - InitIndirectDrawArgs(0); - uint instanceID = GetIndirectInstanceID_Base(svInstanceID); - - unity_ObjectToWorld = _InstanceTransforms[instanceID]; - unity_WorldToObject = _InvInstanceTransforms[instanceID]; - color = _Colors[instanceID]; - - outPos = pos; -} - -#endif \ No newline at end of file diff --git a/Assets/Obi/Resources/ObiMaterials/Common/ObiEllipsoidsHDRP.cginc b/Assets/Obi/Resources/ObiMaterials/Common/ObiEllipsoidsHDRP.cginc deleted file mode 100644 index af6982158..000000000 --- a/Assets/Obi/Resources/ObiMaterials/Common/ObiEllipsoidsHDRP.cginc +++ /dev/null @@ -1,106 +0,0 @@ -#ifndef OBIELLIPSOIDS_INCLUDED -#define OBIELLIPSOIDS_INCLUDED - -// Eye ray origin in world space. -// Works both for orthographic and perspective cameras. -float3 WorldEye(float3 worldPos){ - if ((UNITY_MATRIX_P[3].x == 0.0) && (UNITY_MATRIX_P[3].y == 0.0) && (UNITY_MATRIX_P[3].z == 0.0)){ - return mul(UNITY_MATRIX_I_V,float4(mul(UNITY_MATRIX_V, float4(worldPos,1)).xy,0,1)).xyz; - }else - return _WorldSpaceCameraPos; -} - -// Returns visible ellipsoid radius and offset from center, given the eye position in parameter space. -// Works both for orthographic and perspective cameras. -float VisibleEllipsoidCircleRadius(float3 eye, out float3 m){ - if ((UNITY_MATRIX_P[3].x == 0.0) && (UNITY_MATRIX_P[3].y == 0.0) && (UNITY_MATRIX_P[3].z == 0.0)){ - m = float3(0,0,0); - return 1; - }else{ - float t = 1/dot(eye,eye); - m = t * eye; - return sqrt(1-t); - } -} - -// Performs accurate raycasting of a spherical impostor. -// Works both for orthographic and perspective cameras. -void IntersectEllipsoid_float(float3 v, float4 mapping, float3 a2, float3 a3, out float3 eyePos, out float3 eyeNormal, out float thickness, out float clipThreshold) -{ - float r2 = dot(mapping.xy, mapping.xy); - - // clip if the ray does not intersect the sphere. - clipThreshold = r2/mapping.w; - float iq = 1 - clipThreshold; - - float sqrtiq = sqrt(iq); - float lambda = 1/(1 + mapping.z * sqrtiq); - - eyePos = lambda * v; - eyeNormal = normalize(a2 + lambda * a3); - - // return gaussian-falloff thickness. - thickness = 2 * sqrtiq * exp(-r2*2.0f); - - clipThreshold = (1 - clipThreshold > 0) ? 0 : 1.01; -} - -void BuildVelocityStretchedBasis_float(float3 velocity, float stretchIntensity, float radius, out float4 t0, out float4 t1, out float4 t2) -{ - t0 = float4(UNITY_MATRIX_V[0].xyz, radius); // camera right vector - t2 = float4(UNITY_MATRIX_V[2].xyz, radius); // camera forward vector - - float3 eyeVel = velocity - dot(velocity, t2.xyz) * t2.xyz; - float velNorm = length(eyeVel); - float stretchAmount = velNorm * stretchIntensity; - - // use it to lerp between velocity vector and camera right: - t0 = float4(velNorm > 0.00001 ? eyeVel / velNorm : t0.xyz, radius * (1 + stretchAmount)); - t1 = float4(normalize(cross(t0.xyz,t2.xyz)), radius); -} - -void BuildParameterSpaceMatrices_float(float4 t0, float4 t1, float4 t2, float radiusScale, out float3x3 P, out float3x3 IP) -{ - // build 3x3 orientation matrix and its inverse; - float3x3 IO = float3x3(t0.xyz,t1.xyz,t2.xyz); - float3x3 O = transpose(IO); - - // build 3x3 scaling matrix and its inverse: - float3x3 S = float3x3(radiusScale*t0.w,0,0,0,radiusScale*t1.w,0,0,0,radiusScale*t2.w); - float3x3 IS = float3x3(1/(radiusScale*t0.w),0,0,0,1/(radiusScale*t1.w),0,0,0,1/(radiusScale*t2.w)); - - // build 3x3 transformation matrix and its inverse: - P = mul((float3x3)UNITY_MATRIX_M, mul(O,mul(S,IO)) ); - IP = mul(mul(mul(O,IS),IO), (float3x3)UNITY_MATRIX_I_M); -} - -void BuildEllipsoidBillboard_float(float3 center, float3 corner, float3x3 P, float3x3 IP, out float3 worldPos, out float3 view, out float3 eye, out float radius) -{ - // eye position and quad vectors in parameter space: - eye = mul(IP,WorldEye(center) - center); - float3 u = normalize(cross(-eye,UNITY_MATRIX_V[1].xyz)); - float3 k = normalize(cross(-eye,u)); - - // visible circle radius and offset from center in the direction of the view ray: - float3 m; - radius = VisibleEllipsoidCircleRadius(eye,m); - - // world position of the billboard corner, and view vector to it: - worldPos = center + mul(P, m) + radius * (mul(P,u)* corner.x + mul(P,k)* corner.y); - view = worldPos - WorldEye(worldPos); -} - -void BuildAuxiliaryNormalVectors_float(float3 center, float3 worldPos, float3 view, float3x3 P, float3x3 IP, out float3 a2, out float3 a3) -{ - // calculate T^-2 in object space, then multiply by - // inverse transpose of modelview to rotate normal from object to eye. - // This way the normal calculated in IntersectEllipsoid() is already in view space. - IP = mul((float3x3)UNITY_MATRIX_M,IP); - float3x3 IT_MV = transpose(mul((float3x3)UNITY_MATRIX_I_V, (float3x3)UNITY_MATRIX_I_M)); - float3x3 IP2 = mul(IT_MV, mul((float3x3)UNITY_MATRIX_I_M,mul (IP, IP))); // UNITY_MATRIX_IT_MV - - a2 = mul(IP2,WorldEye(worldPos) - center); //T^-2 * (eye - center) - a3 = mul(IP2,view); //T^-2 * A[0] -} - -#endif diff --git a/Assets/Obi/Resources/ObiMaterials/Common/ParticleShader.shadergraph b/Assets/Obi/Resources/ObiMaterials/Common/ParticleShader.shadergraph deleted file mode 100644 index 4b61fbcdf..000000000 --- a/Assets/Obi/Resources/ObiMaterials/Common/ParticleShader.shadergraph +++ /dev/null @@ -1,5867 +0,0 @@ -{ - "m_SGVersion": 3, - "m_Type": "UnityEditor.ShaderGraph.GraphData", - "m_ObjectId": "78d72b84620c4d40bd076ace556c78f8", - "m_Properties": [ - { - "m_Id": "1f4b884eb7a5494fa0a4c6b1726ae6e9" - }, - { - "m_Id": "22b23a850ca345f6b5b35205f12039ae" - }, - { - "m_Id": "ac709b9b0cc14e26a2611422b499ba45" - } - ], - "m_Keywords": [], - "m_Dropdowns": [], - "m_CategoryData": [ - { - "m_Id": "4c99293183f94afb9e94b8936dbbcc14" - } - ], - "m_Nodes": [ - { - "m_Id": "1fdb294276af4309848652e8d2e07def" - }, - { - "m_Id": "5ff456959eca4fbd934a5aac0280d67f" - }, - { - "m_Id": "d11f8fd02e364ad5b8eadd3550fa2851" - }, - { - "m_Id": "cf2c0d4033c24443b7c21cb036226b3f" - }, - { - "m_Id": "dffaa900d1d04a7db60ef0ccab276839" - }, - { - "m_Id": "0dcd4dbbd33e4365be4d2cdfdc121036" - }, - { - "m_Id": "84cbbe352286486abb8cf0a951e3e458" - }, - { - "m_Id": "2ece075db2b3411a80af471816c4e871" - }, - { - "m_Id": "4f921bef2597498da8ae8c75e3007b37" - }, - { - "m_Id": "1a63d9f74e5943368bfe7e3f9bba296a" - }, - { - "m_Id": "5ee2f7c86c814012bd5eba803e4b36ea" - }, - { - "m_Id": "79ee34ad93234f7880a9f2680b904beb" - }, - { - "m_Id": "44656ed842a54a34b956fc57e356de21" - }, - { - "m_Id": "18eff50f7a64480385a1ad3698dc0a1d" - }, - { - "m_Id": "7c1b54d0ae564cce9fee0e3b18b0f945" - }, - { - "m_Id": "9a540fa4d7fd41edb663c20d392cc937" - }, - { - "m_Id": "b585fdf2c7ce438b8a72c6f452ff31ab" - }, - { - "m_Id": "b397b42dfd5342b0b6291c60e22ae6d4" - }, - { - "m_Id": "e185f6e703b749569fec95035ae86e44" - }, - { - "m_Id": "7e7b6ef93c414bec8d608482fc837fb3" - }, - { - "m_Id": "b35a3765628d49f69d75dfc77df38114" - }, - { - "m_Id": "29c676f6f7fc4d2dbb627a099736baaa" - }, - { - "m_Id": "32c989810b8e4fe7b964240b81ea9def" - }, - { - "m_Id": "a5babea545924715b0ba888ac6373f66" - }, - { - "m_Id": "babccae7634a4d2090f45aa9e154b2ca" - }, - { - "m_Id": "2ed72e60304c47509002fc1b2c204a99" - }, - { - "m_Id": "6f0ad27166324e6fbc829bc0e4076d27" - }, - { - "m_Id": "7650578a1434466faec6ab2d3fe8f0a6" - }, - { - "m_Id": "69d4f0ec92ff4182be437caf84eafb72" - }, - { - "m_Id": "af8c0d42edcd4eda8e6e86de937dbadf" - }, - { - "m_Id": "4c900e907c5340d88caa515b644c0a70" - }, - { - "m_Id": "97bd7a4169c641a59a7012a029b44964" - }, - { - "m_Id": "3b5798f4b422481bb94c97f7014cd7b9" - }, - { - "m_Id": "ee946d6d4c7c4cb1b920e447bb01d580" - }, - { - "m_Id": "f5da1c6b4af04e169c2dce3319f17d13" - }, - { - "m_Id": "675f1b67f80444599ddf4ba675419f8d" - }, - { - "m_Id": "4959d2015a38402881b6fec5e5a518a6" - }, - { - "m_Id": "463beca994a14896865c0978dffaa08b" - }, - { - "m_Id": "e445db0b154846179887a9470ff3aa66" - }, - { - "m_Id": "e94b4e133a134411aa01241421f711cb" - }, - { - "m_Id": "dfd25b2a19df42beba356ef0e5e0b3be" - }, - { - "m_Id": "23a24fff90ba43ab9e3d17e24ec85ad7" - }, - { - "m_Id": "c6116508eb7246469fe9c6ae81460410" - }, - { - "m_Id": "186ed2ae0dbb4487a943f3930c952fc4" - }, - { - "m_Id": "26e1af9d3ae14f71adf1a395a49b937e" - }, - { - "m_Id": "51ff74a2115b4f07940322b02e8b9806" - }, - { - "m_Id": "115b4d546e6b497dae56cf2a084bb730" - }, - { - "m_Id": "4142867127cb4a21bfa771e4c5b504bc" - }, - { - "m_Id": "e17c109ffbe942c89e40ff95cd1cfd7a" - }, - { - "m_Id": "7be03ef72fc946ff81de225831947baf" - } - ], - "m_GroupDatas": [], - "m_StickyNoteDatas": [], - "m_Edges": [ - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "115b4d546e6b497dae56cf2a084bb730" - }, - "m_SlotId": 1 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "af8c0d42edcd4eda8e6e86de937dbadf" - }, - "m_SlotId": 1 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "186ed2ae0dbb4487a943f3930c952fc4" - }, - "m_SlotId": 1 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "5ee2f7c86c814012bd5eba803e4b36ea" - }, - "m_SlotId": 3 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "18eff50f7a64480385a1ad3698dc0a1d" - }, - "m_SlotId": 0 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "4f921bef2597498da8ae8c75e3007b37" - }, - "m_SlotId": 3 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "1a63d9f74e5943368bfe7e3f9bba296a" - }, - "m_SlotId": 4 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "23a24fff90ba43ab9e3d17e24ec85ad7" - }, - "m_SlotId": 0 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "1a63d9f74e5943368bfe7e3f9bba296a" - }, - "m_SlotId": 4 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "5ee2f7c86c814012bd5eba803e4b36ea" - }, - "m_SlotId": 1 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "1a63d9f74e5943368bfe7e3f9bba296a" - }, - "m_SlotId": 5 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "6f0ad27166324e6fbc829bc0e4076d27" - }, - "m_SlotId": 0 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "1a63d9f74e5943368bfe7e3f9bba296a" - }, - "m_SlotId": 6 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "115b4d546e6b497dae56cf2a084bb730" - }, - "m_SlotId": 0 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "1a63d9f74e5943368bfe7e3f9bba296a" - }, - "m_SlotId": 6 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "5ee2f7c86c814012bd5eba803e4b36ea" - }, - "m_SlotId": 2 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "1a63d9f74e5943368bfe7e3f9bba296a" - }, - "m_SlotId": 7 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "babccae7634a4d2090f45aa9e154b2ca" - }, - "m_SlotId": 3 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "23a24fff90ba43ab9e3d17e24ec85ad7" - }, - "m_SlotId": 1 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "1fdb294276af4309848652e8d2e07def" - }, - "m_SlotId": 0 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "26e1af9d3ae14f71adf1a395a49b937e" - }, - "m_SlotId": 1 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "5ee2f7c86c814012bd5eba803e4b36ea" - }, - "m_SlotId": 4 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "29c676f6f7fc4d2dbb627a099736baaa" - }, - "m_SlotId": 0 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "7c1b54d0ae564cce9fee0e3b18b0f945" - }, - "m_SlotId": 2 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "2ece075db2b3411a80af471816c4e871" - }, - "m_SlotId": 0 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "1a63d9f74e5943368bfe7e3f9bba296a" - }, - "m_SlotId": 0 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "2ece075db2b3411a80af471816c4e871" - }, - "m_SlotId": 0 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "5ee2f7c86c814012bd5eba803e4b36ea" - }, - "m_SlotId": 0 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "2ed72e60304c47509002fc1b2c204a99" - }, - "m_SlotId": 1 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "babccae7634a4d2090f45aa9e154b2ca" - }, - "m_SlotId": 0 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "2ed72e60304c47509002fc1b2c204a99" - }, - "m_SlotId": 2 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "babccae7634a4d2090f45aa9e154b2ca" - }, - "m_SlotId": 1 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "32c989810b8e4fe7b964240b81ea9def" - }, - "m_SlotId": 0 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "7c1b54d0ae564cce9fee0e3b18b0f945" - }, - "m_SlotId": 3 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "3b5798f4b422481bb94c97f7014cd7b9" - }, - "m_SlotId": 2 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "5ff456959eca4fbd934a5aac0280d67f" - }, - "m_SlotId": 0 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "44656ed842a54a34b956fc57e356de21" - }, - "m_SlotId": 0 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "4f921bef2597498da8ae8c75e3007b37" - }, - "m_SlotId": 2 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "4959d2015a38402881b6fec5e5a518a6" - }, - "m_SlotId": 3 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "f5da1c6b4af04e169c2dce3319f17d13" - }, - "m_SlotId": 1 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "4c900e907c5340d88caa515b644c0a70" - }, - "m_SlotId": 0 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "3b5798f4b422481bb94c97f7014cd7b9" - }, - "m_SlotId": 1 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "4f921bef2597498da8ae8c75e3007b37" - }, - "m_SlotId": 0 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "186ed2ae0dbb4487a943f3930c952fc4" - }, - "m_SlotId": 0 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "4f921bef2597498da8ae8c75e3007b37" - }, - "m_SlotId": 0 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "1a63d9f74e5943368bfe7e3f9bba296a" - }, - "m_SlotId": 2 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "4f921bef2597498da8ae8c75e3007b37" - }, - "m_SlotId": 4 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "1a63d9f74e5943368bfe7e3f9bba296a" - }, - "m_SlotId": 3 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "4f921bef2597498da8ae8c75e3007b37" - }, - "m_SlotId": 4 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "26e1af9d3ae14f71adf1a395a49b937e" - }, - "m_SlotId": 0 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "51ff74a2115b4f07940322b02e8b9806" - }, - "m_SlotId": 1 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "2ed72e60304c47509002fc1b2c204a99" - }, - "m_SlotId": 0 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "5ee2f7c86c814012bd5eba803e4b36ea" - }, - "m_SlotId": 5 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "7e7b6ef93c414bec8d608482fc837fb3" - }, - "m_SlotId": 0 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "5ee2f7c86c814012bd5eba803e4b36ea" - }, - "m_SlotId": 6 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "b35a3765628d49f69d75dfc77df38114" - }, - "m_SlotId": 0 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "675f1b67f80444599ddf4ba675419f8d" - }, - "m_SlotId": 3 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "f5da1c6b4af04e169c2dce3319f17d13" - }, - "m_SlotId": 0 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "69d4f0ec92ff4182be437caf84eafb72" - }, - "m_SlotId": 0 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "af8c0d42edcd4eda8e6e86de937dbadf" - }, - "m_SlotId": 0 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "6f0ad27166324e6fbc829bc0e4076d27" - }, - "m_SlotId": 1 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "7650578a1434466faec6ab2d3fe8f0a6" - }, - "m_SlotId": 0 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "7650578a1434466faec6ab2d3fe8f0a6" - }, - "m_SlotId": 1 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "babccae7634a4d2090f45aa9e154b2ca" - }, - "m_SlotId": 2 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "79ee34ad93234f7880a9f2680b904beb" - }, - "m_SlotId": 0 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "4f921bef2597498da8ae8c75e3007b37" - }, - "m_SlotId": 1 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "7be03ef72fc946ff81de225831947baf" - }, - "m_SlotId": 0 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "dffaa900d1d04a7db60ef0ccab276839" - }, - "m_SlotId": 0 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "7c1b54d0ae564cce9fee0e3b18b0f945" - }, - "m_SlotId": 4 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "4959d2015a38402881b6fec5e5a518a6" - }, - "m_SlotId": 0 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "7c1b54d0ae564cce9fee0e3b18b0f945" - }, - "m_SlotId": 5 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "a5babea545924715b0ba888ac6373f66" - }, - "m_SlotId": 0 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "7c1b54d0ae564cce9fee0e3b18b0f945" - }, - "m_SlotId": 7 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "dfd25b2a19df42beba356ef0e5e0b3be" - }, - "m_SlotId": 0 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "84cbbe352286486abb8cf0a951e3e458" - }, - "m_SlotId": 0 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "1a63d9f74e5943368bfe7e3f9bba296a" - }, - "m_SlotId": 1 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "84cbbe352286486abb8cf0a951e3e458" - }, - "m_SlotId": 0 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "51ff74a2115b4f07940322b02e8b9806" - }, - "m_SlotId": 0 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "97bd7a4169c641a59a7012a029b44964" - }, - "m_SlotId": 0 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "3b5798f4b422481bb94c97f7014cd7b9" - }, - "m_SlotId": 0 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "a5babea545924715b0ba888ac6373f66" - }, - "m_SlotId": 1 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "463beca994a14896865c0978dffaa08b" - }, - "m_SlotId": 0 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "af8c0d42edcd4eda8e6e86de937dbadf" - }, - "m_SlotId": 2 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "b585fdf2c7ce438b8a72c6f452ff31ab" - }, - "m_SlotId": 0 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "b397b42dfd5342b0b6291c60e22ae6d4" - }, - "m_SlotId": 0 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "7c1b54d0ae564cce9fee0e3b18b0f945" - }, - "m_SlotId": 1 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "babccae7634a4d2090f45aa9e154b2ca" - }, - "m_SlotId": 4 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "9a540fa4d7fd41edb663c20d392cc937" - }, - "m_SlotId": 0 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "c6116508eb7246469fe9c6ae81460410" - }, - "m_SlotId": 1 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "675f1b67f80444599ddf4ba675419f8d" - }, - "m_SlotId": 0 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "e185f6e703b749569fec95035ae86e44" - }, - "m_SlotId": 0 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "7c1b54d0ae564cce9fee0e3b18b0f945" - }, - "m_SlotId": 0 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "e185f6e703b749569fec95035ae86e44" - }, - "m_SlotId": 0 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "c6116508eb7246469fe9c6ae81460410" - }, - "m_SlotId": 0 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "e445db0b154846179887a9470ff3aa66" - }, - "m_SlotId": 0 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "4f921bef2597498da8ae8c75e3007b37" - }, - "m_SlotId": 5 - } - }, - { - "m_OutputSlot": { - "m_Node": { - "m_Id": "f5da1c6b4af04e169c2dce3319f17d13" - }, - "m_SlotId": 2 - }, - "m_InputSlot": { - "m_Node": { - "m_Id": "ee946d6d4c7c4cb1b920e447bb01d580" - }, - "m_SlotId": 0 - } - } - ], - "m_VertexContext": { - "m_Position": { - "x": 535.0, - "y": 29.9999942779541 - }, - "m_Blocks": [ - { - "m_Id": "7e7b6ef93c414bec8d608482fc837fb3" - }, - { - "m_Id": "b35a3765628d49f69d75dfc77df38114" - }, - { - "m_Id": "1fdb294276af4309848652e8d2e07def" - }, - { - "m_Id": "b585fdf2c7ce438b8a72c6f452ff31ab" - }, - { - "m_Id": "9a540fa4d7fd41edb663c20d392cc937" - }, - { - "m_Id": "4142867127cb4a21bfa771e4c5b504bc" - }, - { - "m_Id": "e17c109ffbe942c89e40ff95cd1cfd7a" - } - ] - }, - "m_FragmentContext": { - "m_Position": { - "x": 535.0000610351563, - "y": 411.0000305175781 - }, - "m_Blocks": [ - { - "m_Id": "5ff456959eca4fbd934a5aac0280d67f" - }, - { - "m_Id": "463beca994a14896865c0978dffaa08b" - }, - { - "m_Id": "d11f8fd02e364ad5b8eadd3550fa2851" - }, - { - "m_Id": "cf2c0d4033c24443b7c21cb036226b3f" - }, - { - "m_Id": "dffaa900d1d04a7db60ef0ccab276839" - }, - { - "m_Id": "0dcd4dbbd33e4365be4d2cdfdc121036" - }, - { - "m_Id": "ee946d6d4c7c4cb1b920e447bb01d580" - }, - { - "m_Id": "e94b4e133a134411aa01241421f711cb" - }, - { - "m_Id": "dfd25b2a19df42beba356ef0e5e0b3be" - } - ] - }, - "m_PreviewData": { - "serializedMesh": { - "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", - "m_Guid": "" - }, - "preventRotation": false - }, - "m_Path": "Shader Graphs", - "m_GraphPrecision": 1, - "m_PreviewMode": 2, - "m_OutputNode": { - "m_Id": "" - }, - "m_ActiveTargets": [ - { - "m_Id": "5915510c968749209ff6f351ddb9a96e" - }, - { - "m_Id": "4790e9cb06234cefa4390fb194e36e9d" - }, - { - "m_Id": "9f0ab621b28741df9e2a65a37837af56" - } - ] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", - "m_ObjectId": "02661c44bbcb4c2f9ba17e80d7961c8b", - "m_Id": 1, - "m_DisplayName": "Out", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "Out", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.LightingData", - "m_ObjectId": "0302a9604b3f4175835f2fe805babd5b", - "m_NormalDropOffSpace": 0, - "m_BlendPreserveSpecular": true, - "m_ReceiveDecals": false, - "m_ReceiveSSR": true, - "m_ReceiveSSRTransparent": false, - "m_SpecularAA": false, - "m_SpecularOcclusionMode": 1, - "m_OverrideBakedGI": false -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Matrix3MaterialSlot", - "m_ObjectId": "036bc09f36e2448f81db41a6ae1e8190", - "m_Id": 2, - "m_DisplayName": "P", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "P", - "m_StageCapability": 3, - "m_Value": { - "e00": 1.0, - "e01": 0.0, - "e02": 0.0, - "e03": 0.0, - "e10": 0.0, - "e11": 1.0, - "e12": 0.0, - "e13": 0.0, - "e20": 0.0, - "e21": 0.0, - "e22": 1.0, - "e23": 0.0, - "e30": 0.0, - "e31": 0.0, - "e32": 0.0, - "e33": 1.0 - }, - "m_DefaultValue": { - "e00": 1.0, - "e01": 0.0, - "e02": 0.0, - "e03": 0.0, - "e10": 0.0, - "e11": 1.0, - "e12": 0.0, - "e13": 0.0, - "e20": 0.0, - "e21": 0.0, - "e22": 1.0, - "e23": 0.0, - "e30": 0.0, - "e31": 0.0, - "e32": 0.0, - "e33": 1.0 - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.DynamicMatrixMaterialSlot", - "m_ObjectId": "0486de2ab41b4463853f8b70b1c609d6", - "m_Id": 0, - "m_DisplayName": "", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "", - "m_StageCapability": 3, - "m_Value": { - "e00": 1.0, - "e01": 0.0, - "e02": 0.0, - "e03": 0.0, - "e10": 0.0, - "e11": 1.0, - "e12": 0.0, - "e13": 0.0, - "e20": 0.0, - "e21": 0.0, - "e22": 1.0, - "e23": 0.0, - "e30": 0.0, - "e31": 0.0, - "e32": 0.0, - "e33": 1.0 - }, - "m_DefaultValue": { - "e00": 1.0, - "e01": 0.0, - "e02": 0.0, - "e03": 0.0, - "e10": 0.0, - "e11": 1.0, - "e12": 0.0, - "e13": 0.0, - "e20": 0.0, - "e21": 0.0, - "e22": 1.0, - "e23": 0.0, - "e30": 0.0, - "e31": 0.0, - "e32": 0.0, - "e33": 1.0 - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", - "m_ObjectId": "0631b78f49ed4369abc26bddeecd8c71", - "m_Id": 2, - "m_DisplayName": "view", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "view", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", - "m_ObjectId": "06a2fcfa697b4e19af278e2c539b8d2d", - "m_Id": 0, - "m_DisplayName": "Ambient Occlusion", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "Occlusion", - "m_StageCapability": 2, - "m_Value": 1.0, - "m_DefaultValue": 1.0, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", - "m_ObjectId": "08351f97eeea4b6485b39a61a65a3fe8", - "m_Id": 5, - "m_DisplayName": "RGB", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "RGB", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", - "m_ObjectId": "09069b51882f444b840aabb69c7c506f", - "m_Id": 0, - "m_DisplayName": "In", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "In", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.BuiltinData", - "m_ObjectId": "094b0804cd0a4e33920a4abe743454a6", - "m_Distortion": false, - "m_DistortionMode": 0, - "m_DistortionDepthTest": true, - "m_AddPrecomputedVelocity": false, - "m_TransparentWritesMotionVec": false, - "m_AlphaToMask": false, - "m_DepthOffset": true, - "m_ConservativeDepthOffset": false, - "m_TransparencyFog": true, - "m_AlphaTestShadow": false, - "m_BackThenFrontRendering": false, - "m_TransparentDepthPrepass": false, - "m_TransparentDepthPostpass": false, - "m_SupportLodCrossFade": false -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", - "m_ObjectId": "09cd01e9020d48e1bda65b06c6a71b16", - "m_Id": 0, - "m_DisplayName": "_Smoothness", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "Out", - "m_StageCapability": 3, - "m_Value": 0.0, - "m_DefaultValue": 0.0, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", - "m_ObjectId": "0a65b1a8a9cc4d26aa3d5676905379a0", - "m_Id": 0, - "m_DisplayName": "Depth Offset", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "DepthOffset", - "m_StageCapability": 2, - "m_Value": 0.0, - "m_DefaultValue": 0.0, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot", - "m_ObjectId": "0ba2bd333a584e04a0f559269a5cb217", - "m_Id": 0, - "m_DisplayName": "Base Color", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "BaseColor", - "m_StageCapability": 2, - "m_Value": { - "x": 0.5, - "y": 0.5, - "z": 0.5 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_Labels": [], - "m_ColorMode": 0, - "m_DefaultColor": { - "r": 0.5, - "g": 0.5, - "b": 0.5, - "a": 1.0 - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", - "m_ObjectId": "0bed110901394810986b7c46885c2dbb", - "m_Id": 3, - "m_DisplayName": "a3", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "a3", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", - "m_ObjectId": "0c6df044f18e4fca8e0602ab941e36b3", - "m_Id": 5, - "m_DisplayName": "a2", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "a2", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.BlockNode", - "m_ObjectId": "0dcd4dbbd33e4365be4d2cdfdc121036", - "m_Group": { - "m_Id": "" - }, - "m_Name": "SurfaceDescription.Occlusion", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": 0.0, - "y": 0.0, - "width": 0.0, - "height": 0.0 - } - }, - "m_Slots": [ - { - "m_Id": "06a2fcfa697b4e19af278e2c539b8d2d" - } - ], - "synonyms": [], - "m_Precision": 0, - "m_PreviewExpanded": true, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_SerializedDescriptor": "SurfaceDescription.Occlusion" -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.RedirectNodeData", - "m_ObjectId": "115b4d546e6b497dae56cf2a084bb730", - "m_Group": { - "m_Id": "" - }, - "m_Name": "Redirect Node", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": -215.00003051757813, - "y": 216.00003051757813, - "width": 56.00001525878906, - "height": 24.0 - } - }, - "m_Slots": [ - { - "m_Id": "34b089445d94443bae321419aba92376" - }, - { - "m_Id": "ef8a1c0804ec4253ad73c319031bec6e" - } - ], - "synonyms": [], - "m_Precision": 0, - "m_PreviewExpanded": true, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.RedirectNodeData", - "m_ObjectId": "186ed2ae0dbb4487a943f3930c952fc4", - "m_Group": { - "m_Id": "" - }, - "m_Name": "Redirect Node", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": -1105.0, - "y": -97.00000762939453, - "width": 56.0, - "height": 24.000015258789064 - } - }, - "m_Slots": [ - { - "m_Id": "0486de2ab41b4463853f8b70b1c609d6" - }, - { - "m_Id": "3cdefcef62e446c6820185746a0ec7a1" - } - ], - "synonyms": [], - "m_Precision": 0, - "m_PreviewExpanded": true, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.UVNode", - "m_ObjectId": "18eff50f7a64480385a1ad3698dc0a1d", - "m_Group": { - "m_Id": "" - }, - "m_Name": "UV", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": -1908.0, - "y": 196.0000457763672, - "width": 145.0, - "height": 128.99998474121095 - } - }, - "m_Slots": [ - { - "m_Id": "9d04c3fa0c6848bd908018475a5ec9cf" - } - ], - "synonyms": [ - "texcoords", - "coords", - "coordinates" - ], - "m_Precision": 0, - "m_PreviewExpanded": false, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_OutputChannel": 2 -} - -{ - "m_SGVersion": 1, - "m_Type": "UnityEditor.ShaderGraph.CustomFunctionNode", - "m_ObjectId": "1a63d9f74e5943368bfe7e3f9bba296a", - "m_Group": { - "m_Id": "" - }, - "m_Name": "BuildEllipsoidBillboard (Custom Function)", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": -1105.0, - "y": -20.999990463256837, - "width": 279.0, - "height": 165.99998474121095 - } - }, - "m_Slots": [ - { - "m_Id": "24cc20330a6746e78f01f178e5c0ee25" - }, - { - "m_Id": "54c2e40c04ab4fa88a6d13a3467a46bd" - }, - { - "m_Id": "036bc09f36e2448f81db41a6ae1e8190" - }, - { - "m_Id": "48d6d267a6b6420c974cd75196394443" - }, - { - "m_Id": "436f317395f24909887811586c2f866e" - }, - { - "m_Id": "5861051e6958489e94681625dec6c335" - }, - { - "m_Id": "6fe22af4b335449785d1591830c50ad8" - }, - { - "m_Id": "5649099a965447e4a907f5c05f14dbbd" - } - ], - "synonyms": [ - "code", - "HLSL" - ], - "m_Precision": 0, - "m_PreviewExpanded": false, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_SourceType": 0, - "m_FunctionName": "BuildEllipsoidBillboard", - "m_FunctionSource": "bc807595df1f54350ac0027aaf7cb91b", - "m_FunctionBody": "Enter function body here..." -} - -{ - "m_SGVersion": 3, - "m_Type": "UnityEditor.ShaderGraph.Internal.ColorShaderProperty", - "m_ObjectId": "1f4b884eb7a5494fa0a4c6b1726ae6e9", - "m_Guid": { - "m_GuidSerialized": "763834f5-9d1d-4816-ab86-2702663f61f8" - }, - "m_Name": "_ParticleColor", - "m_DefaultRefNameVersion": 1, - "m_RefNameGeneratedByDisplayName": "_ParticleColor", - "m_DefaultReferenceName": "_ParticleColor", - "m_OverrideReferenceName": "", - "m_GeneratePropertyBlock": true, - "m_UseCustomSlotLabel": false, - "m_CustomSlotLabel": "", - "m_Precision": 0, - "overrideHLSLDeclaration": false, - "hlslDeclarationOverride": 0, - "m_Hidden": false, - "m_Value": { - "r": 1.0, - "g": 1.0, - "b": 1.0, - "a": 1.0 - }, - "isMainColor": false, - "m_ColorMode": 0 -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", - "m_ObjectId": "1f4c9820a5b244deb7bd8e2bf0aa5270", - "m_Id": 0, - "m_DisplayName": "Metallic", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "Metallic", - "m_StageCapability": 2, - "m_Value": 0.0, - "m_DefaultValue": 0.0, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.BlockNode", - "m_ObjectId": "1fdb294276af4309848652e8d2e07def", - "m_Group": { - "m_Id": "" - }, - "m_Name": "VertexDescription.Position", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": 549.0, - "y": 56.99999237060547, - "width": 200.0, - "height": 41.000022888183597 - } - }, - "m_Slots": [ - { - "m_Id": "7e16c891692f43b1951da51f4eb47500" - } - ], - "synonyms": [], - "m_Precision": 0, - "m_PreviewExpanded": true, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_SerializedDescriptor": "VertexDescription.Position" -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", - "m_ObjectId": "202b523ecf9e4573829b429baf158c79", - "m_Id": 0, - "m_DisplayName": "", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Matrix3MaterialSlot", - "m_ObjectId": "212c4e3679184df4b049b834fa8b8426", - "m_Id": 4, - "m_DisplayName": "IP", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "IP", - "m_StageCapability": 3, - "m_Value": { - "e00": 1.0, - "e01": 0.0, - "e02": 0.0, - "e03": 0.0, - "e10": 0.0, - "e11": 1.0, - "e12": 0.0, - "e13": 0.0, - "e20": 0.0, - "e21": 0.0, - "e22": 1.0, - "e23": 0.0, - "e30": 0.0, - "e31": 0.0, - "e32": 0.0, - "e33": 1.0 - }, - "m_DefaultValue": { - "e00": 1.0, - "e01": 0.0, - "e02": 0.0, - "e03": 0.0, - "e10": 0.0, - "e11": 1.0, - "e12": 0.0, - "e13": 0.0, - "e20": 0.0, - "e21": 0.0, - "e22": 1.0, - "e23": 0.0, - "e30": 0.0, - "e31": 0.0, - "e32": 0.0, - "e33": 1.0 - } -} - -{ - "m_SGVersion": 1, - "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", - "m_ObjectId": "22b23a850ca345f6b5b35205f12039ae", - "m_Guid": { - "m_GuidSerialized": "50e8f452-c4bb-469f-bc6d-d232542d1f49" - }, - "m_Name": "_RadiusScale", - "m_DefaultRefNameVersion": 1, - "m_RefNameGeneratedByDisplayName": "_RadiusScale", - "m_DefaultReferenceName": "_RadiusScale", - "m_OverrideReferenceName": "", - "m_GeneratePropertyBlock": true, - "m_UseCustomSlotLabel": false, - "m_CustomSlotLabel": "", - "m_Precision": 0, - "overrideHLSLDeclaration": false, - "hlslDeclarationOverride": 0, - "m_Hidden": false, - "m_Value": 1.0, - "m_FloatType": 0, - "m_RangeValues": { - "x": 0.0, - "y": 1.0 - } -} - -{ - "m_SGVersion": 1, - "m_Type": "UnityEditor.ShaderGraph.TransformNode", - "m_ObjectId": "23a24fff90ba43ab9e3d17e24ec85ad7", - "m_Group": { - "m_Id": "" - }, - "m_Name": "Transform", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": -426.00006103515627, - "y": -20.999967575073243, - "width": 211.00003051757813, - "height": 156.99998474121095 - } - }, - "m_Slots": [ - { - "m_Id": "09069b51882f444b840aabb69c7c506f" - }, - { - "m_Id": "2bd336d88e8e4c18a43bb2689820da8b" - } - ], - "synonyms": [ - "world", - "tangent", - "object", - "view", - "screen", - "convert" - ], - "m_Precision": 0, - "m_PreviewExpanded": false, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_Conversion": { - "from": 2, - "to": 0 - }, - "m_ConversionType": 0 -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", - "m_ObjectId": "24cc20330a6746e78f01f178e5c0ee25", - "m_Id": 0, - "m_DisplayName": "center", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "center", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.RedirectNodeData", - "m_ObjectId": "26e1af9d3ae14f71adf1a395a49b937e", - "m_Group": { - "m_Id": "" - }, - "m_Name": "Redirect Node", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": -1105.0, - "y": -72.99999237060547, - "width": 56.0, - "height": 24.00000762939453 - } - }, - "m_Slots": [ - { - "m_Id": "f66158b6241342c88d2a4991233e93a8" - }, - { - "m_Id": "bfadf92d913d48b88b7911b3bf4952ba" - } - ], - "synonyms": [], - "m_Precision": 0, - "m_PreviewExpanded": true, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.CustomInterpolatorNode", - "m_ObjectId": "29c676f6f7fc4d2dbb627a099736baaa", - "m_Group": { - "m_Id": "" - }, - "m_Name": "a2 (Custom Interpolator)", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": -757.0000610351563, - "y": 766.0, - "width": 186.0, - "height": 94.0 - } - }, - "m_Slots": [ - { - "m_Id": "c1114c7b3db74f0da0e27c4938d3b793" - } - ], - "synonyms": [], - "m_Precision": 0, - "m_PreviewExpanded": false, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "customBlockNodeName": "a2", - "serializedType": 4 -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", - "m_ObjectId": "2b95d6ad64994e1b81cadbf3a7869b7f", - "m_Id": 0, - "m_DisplayName": "Out", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "Out", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", - "m_ObjectId": "2bd336d88e8e4c18a43bb2689820da8b", - "m_Id": 1, - "m_DisplayName": "Out", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "Out", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", - "m_ObjectId": "2c02d7c314a54cb8bed120d81563a87f", - "m_Id": 0, - "m_DisplayName": "Out", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "Out", - "m_StageCapability": 2, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 1, - "m_Type": "UnityEditor.ShaderGraph.PositionNode", - "m_ObjectId": "2ece075db2b3411a80af471816c4e871", - "m_Group": { - "m_Id": "" - }, - "m_Name": "Position", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": -1571.0001220703125, - "y": -238.0, - "width": 206.0001220703125, - "height": 131.0 - } - }, - "m_Slots": [ - { - "m_Id": "719c4a0aa83440f1abe407eb97fe03d1" - } - ], - "synonyms": [ - "location" - ], - "m_Precision": 1, - "m_PreviewExpanded": false, - "m_PreviewMode": 2, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_Space": 2, - "m_PositionSource": 0 -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.SplitNode", - "m_ObjectId": "2ed72e60304c47509002fc1b2c204a99", - "m_Group": { - "m_Id": "" - }, - "m_Name": "Split", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": -534.0, - "y": 266.0, - "width": 119.99993896484375, - "height": 149.00003051757813 - } - }, - "m_Slots": [ - { - "m_Id": "d9e1566528a04795a93b9222cfe9b841" - }, - { - "m_Id": "feae803029f141b7b77576f65de3f361" - }, - { - "m_Id": "9932077343944e9ea934ada791a438e8" - }, - { - "m_Id": "b61bc63901084fca9804abee48abddfd" - }, - { - "m_Id": "ae35ddc362bb47d9831f62b11095e69c" - } - ], - "synonyms": [ - "separate" - ], - "m_Precision": 0, - "m_PreviewExpanded": true, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.CustomInterpolatorNode", - "m_ObjectId": "32c989810b8e4fe7b964240b81ea9def", - "m_Group": { - "m_Id": "" - }, - "m_Name": "a3 (Custom Interpolator)", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": -757.0000610351563, - "y": 865.0, - "width": 186.0, - "height": 94.0 - } - }, - "m_Slots": [ - { - "m_Id": "2c02d7c314a54cb8bed120d81563a87f" - } - ], - "synonyms": [], - "m_Precision": 0, - "m_PreviewExpanded": false, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "customBlockNodeName": "a3", - "serializedType": 4 -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", - "m_ObjectId": "32c9f709646841e6b3d5d2ecf3b88217", - "m_Id": 3, - "m_DisplayName": "B", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "B", - "m_StageCapability": 3, - "m_Value": 0.0, - "m_DefaultValue": 0.0, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", - "m_ObjectId": "333055955acb46f7b454539413c183b0", - "m_Id": 0, - "m_DisplayName": "Out", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "Out", - "m_StageCapability": 3, - "m_Value": { - "x": 1.0, - "y": 1.0, - "z": 1.0, - "w": 1.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", - "m_ObjectId": "34b089445d94443bae321419aba92376", - "m_Id": 0, - "m_DisplayName": "", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.MultiplyNode", - "m_ObjectId": "3b5798f4b422481bb94c97f7014cd7b9", - "m_Group": { - "m_Id": "" - }, - "m_Name": "Multiply", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": 245.99986267089845, - "y": 410.9999694824219, - "width": 129.9999542236328, - "height": 118.00003051757813 - } - }, - "m_Slots": [ - { - "m_Id": "9d0a9a76df624baebeb40acbf1676a05" - }, - { - "m_Id": "6706229ffa8a452fb31f3e611a4e969f" - }, - { - "m_Id": "e27b00a5d6b8496e888b33ff61e843e3" - } - ], - "synonyms": [ - "multiplication", - "times", - "x" - ], - "m_Precision": 0, - "m_PreviewExpanded": false, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.DynamicMatrixMaterialSlot", - "m_ObjectId": "3cdefcef62e446c6820185746a0ec7a1", - "m_Id": 1, - "m_DisplayName": "", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "", - "m_StageCapability": 3, - "m_Value": { - "e00": 1.0, - "e01": 0.0, - "e02": 0.0, - "e03": 0.0, - "e10": 0.0, - "e11": 1.0, - "e12": 0.0, - "e13": 0.0, - "e20": 0.0, - "e21": 0.0, - "e22": 1.0, - "e23": 0.0, - "e30": 0.0, - "e31": 0.0, - "e32": 0.0, - "e33": 1.0 - }, - "m_DefaultValue": { - "e00": 1.0, - "e01": 0.0, - "e02": 0.0, - "e03": 0.0, - "e10": 0.0, - "e11": 1.0, - "e12": 0.0, - "e13": 0.0, - "e20": 0.0, - "e21": 0.0, - "e22": 1.0, - "e23": 0.0, - "e30": 0.0, - "e31": 0.0, - "e32": 0.0, - "e33": 1.0 - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", - "m_ObjectId": "3e0e2d1e47374294b5539e85bc63baf7", - "m_Id": 6, - "m_DisplayName": "a3", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "a3", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", - "m_ObjectId": "3f7e82d473a94fab86903e3875520da8", - "m_Id": 4, - "m_DisplayName": "A", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "A", - "m_StageCapability": 3, - "m_Value": 0.0, - "m_DefaultValue": 0.0, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.BlockNode", - "m_ObjectId": "4142867127cb4a21bfa771e4c5b504bc", - "m_Group": { - "m_Id": "" - }, - "m_Name": "VertexDescription.Normal", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": 0.0, - "y": 0.0, - "width": 0.0, - "height": 0.0 - } - }, - "m_Slots": [ - { - "m_Id": "b456d184e007428eb74e555e1d369069" - } - ], - "synonyms": [], - "m_Precision": 0, - "m_PreviewExpanded": true, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_SerializedDescriptor": "VertexDescription.Normal" -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.TangentMaterialSlot", - "m_ObjectId": "41c7519efb9a45fb85dcded2b16d584d", - "m_Id": 0, - "m_DisplayName": "Tangent", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "Tangent", - "m_StageCapability": 1, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_Labels": [], - "m_Space": 0 -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", - "m_ObjectId": "436f317395f24909887811586c2f866e", - "m_Id": 4, - "m_DisplayName": "worldPos", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "worldPos", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.UVNode", - "m_ObjectId": "44656ed842a54a34b956fc57e356de21", - "m_Group": { - "m_Id": "" - }, - "m_Name": "UV", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": -1908.0, - "y": 62.000003814697269, - "width": 145.0, - "height": 129.0 - } - }, - "m_Slots": [ - { - "m_Id": "2b95d6ad64994e1b81cadbf3a7869b7f" - } - ], - "synonyms": [ - "texcoords", - "coords", - "coordinates" - ], - "m_Precision": 0, - "m_PreviewExpanded": false, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_OutputChannel": 1 -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.BlockNode", - "m_ObjectId": "463beca994a14896865c0978dffaa08b", - "m_Group": { - "m_Id": "" - }, - "m_Name": "SurfaceDescription.NormalWS", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": 541.0000610351563, - "y": 518.0, - "width": 199.99993896484376, - "height": 41.0 - } - }, - "m_Slots": [ - { - "m_Id": "d08d226deab44224a9c127e0838da1ec" - } - ], - "synonyms": [], - "m_Precision": 0, - "m_PreviewExpanded": true, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_SerializedDescriptor": "SurfaceDescription.NormalWS" -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.HDTarget", - "m_ObjectId": "4790e9cb06234cefa4390fb194e36e9d", - "m_ActiveSubTarget": { - "m_Id": "f63f238dcaed45b9859faec9503ae798" - }, - "m_Datas": [ - { - "m_Id": "de8e93dbd1744203a66905de95755eec" - }, - { - "m_Id": "094b0804cd0a4e33920a4abe743454a6" - }, - { - "m_Id": "0302a9604b3f4175835f2fe805babd5b" - }, - { - "m_Id": "91a6a3e7575d45f9ad4d9f157973bc76" - } - ], - "m_CustomEditorGUI": "", - "m_SupportVFX": false -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Matrix3MaterialSlot", - "m_ObjectId": "48d6d267a6b6420c974cd75196394443", - "m_Id": 3, - "m_DisplayName": "IP", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "IP", - "m_StageCapability": 3, - "m_Value": { - "e00": 1.0, - "e01": 0.0, - "e02": 0.0, - "e03": 0.0, - "e10": 0.0, - "e11": 1.0, - "e12": 0.0, - "e13": 0.0, - "e20": 0.0, - "e21": 0.0, - "e22": 1.0, - "e23": 0.0, - "e30": 0.0, - "e31": 0.0, - "e32": 0.0, - "e33": 1.0 - }, - "m_DefaultValue": { - "e00": 1.0, - "e01": 0.0, - "e02": 0.0, - "e03": 0.0, - "e10": 0.0, - "e11": 1.0, - "e12": 0.0, - "e13": 0.0, - "e20": 0.0, - "e21": 0.0, - "e22": 1.0, - "e23": 0.0, - "e30": 0.0, - "e31": 0.0, - "e32": 0.0, - "e33": 1.0 - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.SplitNode", - "m_ObjectId": "4959d2015a38402881b6fec5e5a518a6", - "m_Group": { - "m_Id": "" - }, - "m_Name": "Split", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": -100.99998474121094, - "y": 973.0, - "width": 120.0, - "height": 149.0 - } - }, - "m_Slots": [ - { - "m_Id": "aa904b9834494fefae0603bbf51a46ae" - }, - { - "m_Id": "a04bfc2e0f9748878673606fffc20b60" - }, - { - "m_Id": "d5ab07535b904d6c95b72aefdd4d8ccd" - }, - { - "m_Id": "7e1b86be59204bddbf54c850cfe7f7fd" - }, - { - "m_Id": "ea691d98931f4db5b57fa9074c8ac113" - } - ], - "synonyms": [ - "separate" - ], - "m_Precision": 0, - "m_PreviewExpanded": true, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.PropertyNode", - "m_ObjectId": "4c900e907c5340d88caa515b644c0a70", - "m_Group": { - "m_Id": "" - }, - "m_Name": "Property", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": 49.99992752075195, - "y": 511.9999694824219, - "width": 148.99998474121095, - "height": 34.000030517578128 - } - }, - "m_Slots": [ - { - "m_Id": "ec49096fac914af0a3faddf1feb3953c" - } - ], - "synonyms": [], - "m_Precision": 0, - "m_PreviewExpanded": true, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_Property": { - "m_Id": "1f4b884eb7a5494fa0a4c6b1726ae6e9" - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.CategoryData", - "m_ObjectId": "4c99293183f94afb9e94b8936dbbcc14", - "m_Name": "", - "m_ChildObjectList": [ - { - "m_Id": "1f4b884eb7a5494fa0a4c6b1726ae6e9" - }, - { - "m_Id": "22b23a850ca345f6b5b35205f12039ae" - }, - { - "m_Id": "ac709b9b0cc14e26a2611422b499ba45" - } - ] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", - "m_ObjectId": "4d1be359822e42259ed2488d64051ddd", - "m_Id": 2, - "m_DisplayName": "t1", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "t1", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 1, - "m_Type": "UnityEditor.ShaderGraph.CustomFunctionNode", - "m_ObjectId": "4f921bef2597498da8ae8c75e3007b37", - "m_Group": { - "m_Id": "" - }, - "m_Name": "BuildParameterSpaceMatrices (Custom Function)", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": -1690.999755859375, - "y": 29.999990463256837, - "width": 326.0, - "height": 166.00001525878907 - } - }, - "m_Slots": [ - { - "m_Id": "6de4193c77c443cf829c0b9051349796" - }, - { - "m_Id": "4d1be359822e42259ed2488d64051ddd" - }, - { - "m_Id": "67fa16b6c3424083aaed5ff9d043584a" - }, - { - "m_Id": "d3003457079944b499113867ead39439" - }, - { - "m_Id": "cd294f26621f499cb86c60132cc4143c" - }, - { - "m_Id": "774879720fdb4a149503b61c37ca1170" - } - ], - "synonyms": [ - "code", - "HLSL" - ], - "m_Precision": 0, - "m_PreviewExpanded": false, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_SourceType": 0, - "m_FunctionName": "BuildParameterSpaceMatrices", - "m_FunctionSource": "bc807595df1f54350ac0027aaf7cb91b", - "m_FunctionBody": "Enter function body here..." -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", - "m_ObjectId": "51b895e1b64e43529095cc44fc769771", - "m_Id": 2, - "m_DisplayName": "Out", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "Out", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.RedirectNodeData", - "m_ObjectId": "51ff74a2115b4f07940322b02e8b9806", - "m_Group": { - "m_Id": "" - }, - "m_Name": "Redirect Node", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": -1005.9999389648438, - "y": 304.0, - "width": 56.0, - "height": 24.0 - } - }, - "m_Slots": [ - { - "m_Id": "202b523ecf9e4573829b429baf158c79" - }, - { - "m_Id": "7597891277e54542b0e496704bf8a7f6" - } - ], - "synonyms": [], - "m_Precision": 0, - "m_PreviewExpanded": true, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", - "m_ObjectId": "53f213ac70a7461ab7fb3813e00bb7f6", - "m_Id": 0, - "m_DisplayName": "", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", - "m_ObjectId": "54c2e40c04ab4fa88a6d13a3467a46bd", - "m_Id": 1, - "m_DisplayName": "corner", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "corner", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", - "m_ObjectId": "5649099a965447e4a907f5c05f14dbbd", - "m_Id": 7, - "m_DisplayName": "radius", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "radius", - "m_StageCapability": 3, - "m_Value": 0.0, - "m_DefaultValue": 0.0, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", - "m_ObjectId": "5861051e6958489e94681625dec6c335", - "m_Id": 6, - "m_DisplayName": "view", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "view", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 2, - "m_Type": "UnityEditor.Rendering.BuiltIn.ShaderGraph.BuiltInTarget", - "m_ObjectId": "5915510c968749209ff6f351ddb9a96e", - "m_ActiveSubTarget": { - "m_Id": "64c04874fef94dbaa74657a68a9696db" - }, - "m_AllowMaterialOverride": false, - "m_SurfaceType": 0, - "m_ZWriteControl": 0, - "m_ZTestMode": 4, - "m_AlphaMode": 0, - "m_RenderFace": 2, - "m_AlphaClip": true, - "m_CustomEditorGUI": "" -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", - "m_ObjectId": "5cb55dd043474b2ca931483a70806fb7", - "m_Id": 0, - "m_DisplayName": "In", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "In", - "m_StageCapability": 3, - "m_Value": { - "x": 1.0, - "y": 1.0, - "z": 1.0, - "w": 1.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - } -} - -{ - "m_SGVersion": 1, - "m_Type": "UnityEditor.ShaderGraph.CustomFunctionNode", - "m_ObjectId": "5ee2f7c86c814012bd5eba803e4b36ea", - "m_Group": { - "m_Id": "" - }, - "m_Name": "BuildAuxiliaryNormalVectors (Custom Function)", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": -533.9999389648438, - "y": -262.9999694824219, - "width": 316.00006103515627, - "height": 189.99996948242188 - } - }, - "m_Slots": [ - { - "m_Id": "855a9ade904b45bcac021a0c28779459" - }, - { - "m_Id": "60093ed6facb41ca9cb2a1c011469dfd" - }, - { - "m_Id": "0631b78f49ed4369abc26bddeecd8c71" - }, - { - "m_Id": "e3ffd102837b43d98258c9830c869bff" - }, - { - "m_Id": "212c4e3679184df4b049b834fa8b8426" - }, - { - "m_Id": "0c6df044f18e4fca8e0602ab941e36b3" - }, - { - "m_Id": "3e0e2d1e47374294b5539e85bc63baf7" - } - ], - "synonyms": [ - "code", - "HLSL" - ], - "m_Precision": 0, - "m_PreviewExpanded": false, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_SourceType": 0, - "m_FunctionName": "BuildAuxiliaryNormalVectors", - "m_FunctionSource": "bc807595df1f54350ac0027aaf7cb91b", - "m_FunctionBody": "Enter function body here..." -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.BlockNode", - "m_ObjectId": "5ff456959eca4fbd934a5aac0280d67f", - "m_Group": { - "m_Id": "" - }, - "m_Name": "SurfaceDescription.BaseColor", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": 0.0, - "y": 0.0, - "width": 0.0, - "height": 0.0 - } - }, - "m_Slots": [ - { - "m_Id": "0ba2bd333a584e04a0f559269a5cb217" - } - ], - "synonyms": [], - "m_Precision": 0, - "m_PreviewExpanded": true, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_SerializedDescriptor": "SurfaceDescription.BaseColor" -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", - "m_ObjectId": "60093ed6facb41ca9cb2a1c011469dfd", - "m_Id": 1, - "m_DisplayName": "worldPos", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "worldPos", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", - "m_ObjectId": "619732196dbf41f6a0e7b1174688f54c", - "m_Id": 6, - "m_DisplayName": "RG", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "RG", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot", - "m_ObjectId": "61c80ef969694adf838815d13bc5cd67", - "m_Id": 0, - "m_DisplayName": "Emission", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "Emission", - "m_StageCapability": 2, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_Labels": [], - "m_ColorMode": 1, - "m_DefaultColor": { - "r": 0.0, - "g": 0.0, - "b": 0.0, - "a": 1.0 - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.Rendering.BuiltIn.ShaderGraph.BuiltInLitSubTarget", - "m_ObjectId": "64c04874fef94dbaa74657a68a9696db", - "m_WorkflowMode": 1, - "m_NormalDropOffSpace": 2 -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", - "m_ObjectId": "6706229ffa8a452fb31f3e611a4e969f", - "m_Id": 1, - "m_DisplayName": "B", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "B", - "m_StageCapability": 3, - "m_Value": { - "e00": 2.0, - "e01": 2.0, - "e02": 2.0, - "e03": 2.0, - "e10": 2.0, - "e11": 2.0, - "e12": 2.0, - "e13": 2.0, - "e20": 2.0, - "e21": 2.0, - "e22": 2.0, - "e23": 2.0, - "e30": 2.0, - "e31": 2.0, - "e32": 2.0, - "e33": 2.0 - }, - "m_DefaultValue": { - "e00": 1.0, - "e01": 0.0, - "e02": 0.0, - "e03": 0.0, - "e10": 0.0, - "e11": 1.0, - "e12": 0.0, - "e13": 0.0, - "e20": 0.0, - "e21": 0.0, - "e22": 1.0, - "e23": 0.0, - "e30": 0.0, - "e31": 0.0, - "e32": 0.0, - "e33": 1.0 - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.SplitNode", - "m_ObjectId": "675f1b67f80444599ddf4ba675419f8d", - "m_Group": { - "m_Id": "" - }, - "m_Name": "Split", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": -101.00003814697266, - "y": 815.0, - "width": 120.00003814697266, - "height": 149.0 - } - }, - "m_Slots": [ - { - "m_Id": "9dcc637f334c4ca6bf1c804405d3a006" - }, - { - "m_Id": "80b7c010fc9449a6be2b2971c67263b6" - }, - { - "m_Id": "b7ad4b8143794b239501e5624069fe3e" - }, - { - "m_Id": "32c9f709646841e6b3d5d2ecf3b88217" - }, - { - "m_Id": "3f7e82d473a94fab86903e3875520da8" - } - ], - "synonyms": [ - "separate" - ], - "m_Precision": 0, - "m_PreviewExpanded": true, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", - "m_ObjectId": "67fa16b6c3424083aaed5ff9d043584a", - "m_Id": 3, - "m_DisplayName": "t2", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "t2", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Matrix4MaterialSlot", - "m_ObjectId": "6938d733952943ab93dd81dd0cee899e", - "m_Id": 0, - "m_DisplayName": "Out", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "Out", - "m_StageCapability": 3, - "m_Value": { - "e00": 1.0, - "e01": 0.0, - "e02": 0.0, - "e03": 0.0, - "e10": 0.0, - "e11": 1.0, - "e12": 0.0, - "e13": 0.0, - "e20": 0.0, - "e21": 0.0, - "e22": 1.0, - "e23": 0.0, - "e30": 0.0, - "e31": 0.0, - "e32": 0.0, - "e33": 1.0 - }, - "m_DefaultValue": { - "e00": 1.0, - "e01": 0.0, - "e02": 0.0, - "e03": 0.0, - "e10": 0.0, - "e11": 1.0, - "e12": 0.0, - "e13": 0.0, - "e20": 0.0, - "e21": 0.0, - "e22": 1.0, - "e23": 0.0, - "e30": 0.0, - "e31": 0.0, - "e32": 0.0, - "e33": 1.0 - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.TransformationMatrixNode", - "m_ObjectId": "69d4f0ec92ff4182be437caf84eafb72", - "m_Group": { - "m_Id": "" - }, - "m_Name": "Transformation Matrix", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": -214.9999237060547, - "y": 89.0, - "width": 171.99996948242188, - "height": 111.99996948242188 - } - }, - "m_Slots": [ - { - "m_Id": "6938d733952943ab93dd81dd0cee899e" - } - ], - "synonyms": [], - "m_Precision": 0, - "m_PreviewExpanded": true, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_matrix": -1, - "m_MatrixType": 2 -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", - "m_ObjectId": "6ad20bbbd1074108a572a177504cb6ea", - "m_Id": 0, - "m_DisplayName": "Out", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "Out", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 1.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", - "m_ObjectId": "6de4193c77c443cf829c0b9051349796", - "m_Id": 1, - "m_DisplayName": "t0", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "t0", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", - "m_ObjectId": "6f08d1c6b86e499681f60f1f6a7f9196", - "m_Id": 6, - "m_DisplayName": "thickness", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "thickness", - "m_StageCapability": 3, - "m_Value": 0.0, - "m_DefaultValue": 0.0, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.LengthNode", - "m_ObjectId": "6f0ad27166324e6fbc829bc0e4076d27", - "m_Group": { - "m_Id": "" - }, - "m_Name": "Length", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": -663.9999389648438, - "y": 368.0000305175781, - "width": 129.99993896484376, - "height": 93.99993896484375 - } - }, - "m_Slots": [ - { - "m_Id": "8b53ecbd13194b99a498b327fe512e93" - }, - { - "m_Id": "e716e7c9ae6e45278a7d746d0a1da856" - } - ], - "synonyms": [ - "measure" - ], - "m_Precision": 0, - "m_PreviewExpanded": false, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", - "m_ObjectId": "6fe22af4b335449785d1591830c50ad8", - "m_Id": 5, - "m_DisplayName": "eye", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "eye", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", - "m_ObjectId": "719c4a0aa83440f1abe407eb97fe03d1", - "m_Id": 0, - "m_DisplayName": "Out", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "Out", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", - "m_ObjectId": "74076c4a517f4a9bb9273882b00b51a6", - "m_Id": 1, - "m_DisplayName": "", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", - "m_ObjectId": "748d29134b584213abde74716f79052b", - "m_Id": 0, - "m_DisplayName": "Out", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "Out", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", - "m_ObjectId": "7597891277e54542b0e496704bf8a7f6", - "m_Id": 1, - "m_DisplayName": "", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.ReciprocalNode", - "m_ObjectId": "7650578a1434466faec6ab2d3fe8f0a6", - "m_Group": { - "m_Id": "" - }, - "m_Name": "Reciprocal", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": -414.00006103515627, - "y": 368.0000305175781, - "width": 145.0, - "height": 128.99996948242188 - } - }, - "m_Slots": [ - { - "m_Id": "5cb55dd043474b2ca931483a70806fb7" - }, - { - "m_Id": "02661c44bbcb4c2f9ba17e80d7961c8b" - } - ], - "synonyms": [ - "rcp" - ], - "m_Precision": 0, - "m_PreviewExpanded": false, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_ReciprocalMethod": 0 -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalLitSubTarget", - "m_ObjectId": "773994bbd21543a0aefb333735078a53", - "m_WorkflowMode": 1, - "m_NormalDropOffSpace": 2, - "m_ClearCoat": false -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Matrix3MaterialSlot", - "m_ObjectId": "774879720fdb4a149503b61c37ca1170", - "m_Id": 4, - "m_DisplayName": "IP", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "IP", - "m_StageCapability": 3, - "m_Value": { - "e00": 1.0, - "e01": 0.0, - "e02": 0.0, - "e03": 0.0, - "e10": 0.0, - "e11": 1.0, - "e12": 0.0, - "e13": 0.0, - "e20": 0.0, - "e21": 0.0, - "e22": 1.0, - "e23": 0.0, - "e30": 0.0, - "e31": 0.0, - "e32": 0.0, - "e33": 1.0 - }, - "m_DefaultValue": { - "e00": 1.0, - "e01": 0.0, - "e02": 0.0, - "e03": 0.0, - "e10": 0.0, - "e11": 1.0, - "e12": 0.0, - "e13": 0.0, - "e20": 0.0, - "e21": 0.0, - "e22": 1.0, - "e23": 0.0, - "e30": 0.0, - "e31": 0.0, - "e32": 0.0, - "e33": 1.0 - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", - "m_ObjectId": "789d3c4acdee4777a68a43567cc7de51", - "m_Id": 0, - "m_DisplayName": "In", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "In", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", - "m_ObjectId": "79ab31681e3e419183510b2fa4f09f6a", - "m_Id": 2, - "m_DisplayName": "B", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "B", - "m_StageCapability": 3, - "m_Value": 0.0, - "m_DefaultValue": 0.0, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.UVNode", - "m_ObjectId": "79ee34ad93234f7880a9f2680b904beb", - "m_Group": { - "m_Id": "" - }, - "m_Name": "UV", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": -1908.0, - "y": -73.0, - "width": 145.0, - "height": 129.0 - } - }, - "m_Slots": [ - { - "m_Id": "748d29134b584213abde74716f79052b" - } - ], - "synonyms": [ - "texcoords", - "coords", - "coordinates" - ], - "m_Precision": 0, - "m_PreviewExpanded": false, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_OutputChannel": 0 -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.PropertyNode", - "m_ObjectId": "7be03ef72fc946ff81de225831947baf", - "m_Group": { - "m_Id": "" - }, - "m_Name": "Property", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": 362.0, - "y": 616.0, - "width": 145.0, - "height": 34.0 - } - }, - "m_Slots": [ - { - "m_Id": "09cd01e9020d48e1bda65b06c6a71b16" - } - ], - "synonyms": [], - "m_Precision": 0, - "m_PreviewExpanded": true, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_Property": { - "m_Id": "ac709b9b0cc14e26a2611422b499ba45" - } -} - -{ - "m_SGVersion": 1, - "m_Type": "UnityEditor.ShaderGraph.CustomFunctionNode", - "m_ObjectId": "7c1b54d0ae564cce9fee0e3b18b0f945", - "m_Group": { - "m_Id": "" - }, - "m_Name": "IntersectEllipsoid (Custom Function)", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": -425.99981689453127, - "y": 599.9999389648438, - "width": 251.99984741210938, - "height": 166.0 - } - }, - "m_Slots": [ - { - "m_Id": "afbbb64c9a7b4d16963c20b5f2af4154" - }, - { - "m_Id": "f30fd08bbcc74a6198fb279d65f82696" - }, - { - "m_Id": "b9f263f81f814659b65ba7c8965c6b7e" - }, - { - "m_Id": "0bed110901394810986b7c46885c2dbb" - }, - { - "m_Id": "d068f1207b3340f6a006284eb45ddb8b" - }, - { - "m_Id": "ce9414174ca54d1293c032bb45fac6a3" - }, - { - "m_Id": "6f08d1c6b86e499681f60f1f6a7f9196" - }, - { - "m_Id": "f50f51a906cb44dcbc8403263a8cfa32" - } - ], - "synonyms": [ - "code", - "HLSL" - ], - "m_Precision": 0, - "m_PreviewExpanded": false, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_SourceType": 0, - "m_FunctionName": "IntersectEllipsoid", - "m_FunctionSource": "bc807595df1f54350ac0027aaf7cb91b", - "m_FunctionBody": "Enter function body here..." -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.PositionMaterialSlot", - "m_ObjectId": "7e16c891692f43b1951da51f4eb47500", - "m_Id": 0, - "m_DisplayName": "Position", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "Position", - "m_StageCapability": 1, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_Labels": [], - "m_Space": 0 -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", - "m_ObjectId": "7e1b86be59204bddbf54c850cfe7f7fd", - "m_Id": 3, - "m_DisplayName": "B", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "B", - "m_StageCapability": 3, - "m_Value": 0.0, - "m_DefaultValue": 0.0, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.BlockNode", - "m_ObjectId": "7e7b6ef93c414bec8d608482fc837fb3", - "m_Group": { - "m_Id": "" - }, - "m_Name": "VertexDescription.CustomInterpolator", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": 540.0000610351563, - "y": 51.99999237060547, - "width": 199.99993896484376, - "height": 41.00001525878906 - } - }, - "m_Slots": [ - { - "m_Id": "9d1228b7470642dd9a33ba2fb5148690" - } - ], - "synonyms": [], - "m_Precision": 0, - "m_PreviewExpanded": true, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_SerializedDescriptor": "VertexDescription.a2#4" -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", - "m_ObjectId": "8053f38f7ace4f8c9ae0b53fca131228", - "m_Id": 1, - "m_DisplayName": "Out", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "Out", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", - "m_ObjectId": "80b7c010fc9449a6be2b2971c67263b6", - "m_Id": 1, - "m_DisplayName": "R", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "R", - "m_StageCapability": 3, - "m_Value": 0.0, - "m_DefaultValue": 0.0, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.NormalVectorNode", - "m_ObjectId": "84cbbe352286486abb8cf0a951e3e458", - "m_Group": { - "m_Id": "" - }, - "m_Name": "Normal Vector", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": -1570.9998779296875, - "y": -106.99996948242188, - "width": 206.0, - "height": 131.0 - } - }, - "m_Slots": [ - { - "m_Id": "6ad20bbbd1074108a572a177504cb6ea" - } - ], - "synonyms": [ - "surface direction" - ], - "m_Precision": 0, - "m_PreviewExpanded": false, - "m_PreviewMode": 2, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_Space": 0 -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", - "m_ObjectId": "855a9ade904b45bcac021a0c28779459", - "m_Id": 0, - "m_DisplayName": "center", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "center", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", - "m_ObjectId": "8b53ecbd13194b99a498b327fe512e93", - "m_Id": 0, - "m_DisplayName": "In", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "In", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.SystemData", - "m_ObjectId": "91a6a3e7575d45f9ad4d9f157973bc76", - "m_MaterialNeedsUpdateHash": 529, - "m_SurfaceType": 0, - "m_RenderingPass": 1, - "m_BlendMode": 0, - "m_ZTest": 4, - "m_ZWrite": false, - "m_TransparentCullMode": 2, - "m_OpaqueCullMode": 2, - "m_SortPriority": 0, - "m_AlphaTest": false, - "m_TransparentDepthPrepass": false, - "m_TransparentDepthPostpass": false, - "m_SupportLodCrossFade": false, - "m_DoubleSidedMode": 0, - "m_DOTSInstancing": false, - "m_CustomVelocity": false, - "m_Tessellation": false, - "m_TessellationMode": 0, - "m_TessellationFactorMinDistance": 20.0, - "m_TessellationFactorMaxDistance": 50.0, - "m_TessellationFactorTriangleSize": 100.0, - "m_TessellationShapeFactor": 0.75, - "m_TessellationBackFaceCullEpsilon": -0.25, - "m_TessellationMaxDisplacement": 0.009999999776482582, - "m_Version": 1, - "inspectorFoldoutMask": 9 -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", - "m_ObjectId": "94d8bef9ca4146a9bc8013782aa27188", - "m_Id": 0, - "m_DisplayName": "Out", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "Out", - "m_StageCapability": 2, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.VertexColorNode", - "m_ObjectId": "97bd7a4169c641a59a7012a029b44964", - "m_Group": { - "m_Id": "" - }, - "m_Name": "Vertex Color", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": 81.0, - "y": 391.0, - "width": 118.00001525878906, - "height": 93.99990844726563 - } - }, - "m_Slots": [ - { - "m_Id": "333055955acb46f7b454539413c183b0" - } - ], - "synonyms": [], - "m_Precision": 0, - "m_PreviewExpanded": false, - "m_PreviewMode": 2, - "m_CustomColors": { - "m_SerializableColors": [] - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", - "m_ObjectId": "9932077343944e9ea934ada791a438e8", - "m_Id": 2, - "m_DisplayName": "G", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "G", - "m_StageCapability": 3, - "m_Value": 0.0, - "m_DefaultValue": 0.0, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.BlockNode", - "m_ObjectId": "9a540fa4d7fd41edb663c20d392cc937", - "m_Group": { - "m_Id": "" - }, - "m_Name": "VertexDescription.CustomInterpolator", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": 557.0, - "y": 316.0, - "width": 200.0001220703125, - "height": 40.999969482421878 - } - }, - "m_Slots": [ - { - "m_Id": "f14b3173a44b48f1a3ab3e787ab15403" - } - ], - "synonyms": [], - "m_Precision": 0, - "m_PreviewExpanded": true, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_SerializedDescriptor": "VertexDescription.mapping#4" -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", - "m_ObjectId": "9d04c3fa0c6848bd908018475a5ec9cf", - "m_Id": 0, - "m_DisplayName": "Out", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "Out", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", - "m_ObjectId": "9d0a9a76df624baebeb40acbf1676a05", - "m_Id": 0, - "m_DisplayName": "A", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "A", - "m_StageCapability": 3, - "m_Value": { - "e00": 0.0, - "e01": 0.0, - "e02": 0.0, - "e03": 0.0, - "e10": 0.0, - "e11": 0.0, - "e12": 0.0, - "e13": 0.0, - "e20": 0.0, - "e21": 0.0, - "e22": 0.0, - "e23": 0.0, - "e30": 0.0, - "e31": 0.0, - "e32": 0.0, - "e33": 0.0 - }, - "m_DefaultValue": { - "e00": 1.0, - "e01": 0.0, - "e02": 0.0, - "e03": 0.0, - "e10": 0.0, - "e11": 1.0, - "e12": 0.0, - "e13": 0.0, - "e20": 0.0, - "e21": 0.0, - "e22": 1.0, - "e23": 0.0, - "e30": 0.0, - "e31": 0.0, - "e32": 0.0, - "e33": 1.0 - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", - "m_ObjectId": "9d1228b7470642dd9a33ba2fb5148690", - "m_Id": 0, - "m_DisplayName": "a2", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "a2", - "m_StageCapability": 1, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", - "m_ObjectId": "9dcc637f334c4ca6bf1c804405d3a006", - "m_Id": 0, - "m_DisplayName": "In", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "In", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - } -} - -{ - "m_SGVersion": 1, - "m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalTarget", - "m_ObjectId": "9f0ab621b28741df9e2a65a37837af56", - "m_ActiveSubTarget": { - "m_Id": "773994bbd21543a0aefb333735078a53" - }, - "m_AllowMaterialOverride": false, - "m_SurfaceType": 0, - "m_ZTestMode": 4, - "m_ZWriteControl": 0, - "m_AlphaMode": 0, - "m_RenderFace": 2, - "m_AlphaClip": true, - "m_CastShadows": true, - "m_ReceiveShadows": true, - "m_CustomEditorGUI": "", - "m_SupportVFX": false -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", - "m_ObjectId": "a04bfc2e0f9748878673606fffc20b60", - "m_Id": 1, - "m_DisplayName": "R", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "R", - "m_StageCapability": 3, - "m_Value": 0.0, - "m_DefaultValue": 0.0, - "m_Labels": [] -} - -{ - "m_SGVersion": 1, - "m_Type": "UnityEditor.ShaderGraph.TransformNode", - "m_ObjectId": "a5babea545924715b0ba888ac6373f66", - "m_Group": { - "m_Id": "" - }, - "m_Name": "Transform", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": -24.000009536743165, - "y": 594.0, - "width": 211.00003051757813, - "height": 157.0 - } - }, - "m_Slots": [ - { - "m_Id": "789d3c4acdee4777a68a43567cc7de51" - }, - { - "m_Id": "8053f38f7ace4f8c9ae0b53fca131228" - } - ], - "synonyms": [ - "world", - "tangent", - "object", - "view", - "screen", - "convert" - ], - "m_Precision": 0, - "m_PreviewExpanded": false, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_Conversion": { - "from": 1, - "to": 2 - }, - "m_ConversionType": 1 -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", - "m_ObjectId": "a7a558d25384460e8b0995dc9f89165a", - "m_Id": 0, - "m_DisplayName": "A", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "A", - "m_StageCapability": 3, - "m_Value": { - "x": 1.0, - "y": 1.0, - "z": 1.0, - "w": 1.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", - "m_ObjectId": "aa904b9834494fefae0603bbf51a46ae", - "m_Id": 0, - "m_DisplayName": "In", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "In", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", - "m_ObjectId": "ac5ddd82d3a84a4cbf509ddfe1beb229", - "m_Id": 3, - "m_DisplayName": "A", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "A", - "m_StageCapability": 3, - "m_Value": 0.0, - "m_DefaultValue": 0.0, - "m_Labels": [] -} - -{ - "m_SGVersion": 1, - "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", - "m_ObjectId": "ac709b9b0cc14e26a2611422b499ba45", - "m_Guid": { - "m_GuidSerialized": "fd0f61ba-fe9f-4b6c-a0ab-7f54fec438ab" - }, - "m_Name": "_Smoothness", - "m_DefaultRefNameVersion": 1, - "m_RefNameGeneratedByDisplayName": "_Smoothness", - "m_DefaultReferenceName": "_Smoothness", - "m_OverrideReferenceName": "", - "m_GeneratePropertyBlock": true, - "m_UseCustomSlotLabel": false, - "m_CustomSlotLabel": "", - "m_Precision": 0, - "overrideHLSLDeclaration": false, - "hlslDeclarationOverride": 0, - "m_Hidden": false, - "m_Value": 0.5, - "m_FloatType": 1, - "m_RangeValues": { - "x": 0.0, - "y": 1.0 - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", - "m_ObjectId": "acddb4312eae4453829ee3b01c3b96e1", - "m_Id": 2, - "m_DisplayName": "Out", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "Out", - "m_StageCapability": 3, - "m_Value": { - "e00": 0.0, - "e01": 0.0, - "e02": 0.0, - "e03": 0.0, - "e10": 0.0, - "e11": 0.0, - "e12": 0.0, - "e13": 0.0, - "e20": 0.0, - "e21": 0.0, - "e22": 0.0, - "e23": 0.0, - "e30": 0.0, - "e31": 0.0, - "e32": 0.0, - "e33": 0.0 - }, - "m_DefaultValue": { - "e00": 1.0, - "e01": 0.0, - "e02": 0.0, - "e03": 0.0, - "e10": 0.0, - "e11": 1.0, - "e12": 0.0, - "e13": 0.0, - "e20": 0.0, - "e21": 0.0, - "e22": 1.0, - "e23": 0.0, - "e30": 0.0, - "e31": 0.0, - "e32": 0.0, - "e33": 1.0 - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", - "m_ObjectId": "ae35ddc362bb47d9831f62b11095e69c", - "m_Id": 4, - "m_DisplayName": "A", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "A", - "m_StageCapability": 3, - "m_Value": 0.0, - "m_DefaultValue": 0.0, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.MultiplyNode", - "m_ObjectId": "af8c0d42edcd4eda8e6e86de937dbadf", - "m_Group": { - "m_Id": "" - }, - "m_Name": "Multiply", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": -5.000051021575928, - "y": 145.00003051757813, - "width": 143.00003051757813, - "height": 117.99993896484375 - } - }, - "m_Slots": [ - { - "m_Id": "eefaca546df646d9bab0a7e8ead8fe9f" - }, - { - "m_Id": "e82eba05d3404e81a4d1193cf676653b" - }, - { - "m_Id": "acddb4312eae4453829ee3b01c3b96e1" - } - ], - "synonyms": [ - "multiplication", - "times", - "x" - ], - "m_Precision": 0, - "m_PreviewExpanded": false, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", - "m_ObjectId": "afbbb64c9a7b4d16963c20b5f2af4154", - "m_Id": 0, - "m_DisplayName": "v", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "v", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.BlockNode", - "m_ObjectId": "b35a3765628d49f69d75dfc77df38114", - "m_Group": { - "m_Id": "" - }, - "m_Name": "VertexDescription.CustomInterpolator", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": 547.0, - "y": 88.00001525878906, - "width": 200.0001220703125, - "height": 40.999969482421878 - } - }, - "m_Slots": [ - { - "m_Id": "c81b0a23ef5c4e1bbc194418c1316342" - } - ], - "synonyms": [], - "m_Precision": 0, - "m_PreviewExpanded": true, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_SerializedDescriptor": "VertexDescription.a3#4" -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.CustomInterpolatorNode", - "m_ObjectId": "b397b42dfd5342b0b6291c60e22ae6d4", - "m_Group": { - "m_Id": "" - }, - "m_Name": "mapping (Custom Interpolator)", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": -787.0000610351563, - "y": 672.0, - "width": 221.0, - "height": 94.0 - } - }, - "m_Slots": [ - { - "m_Id": "94d8bef9ca4146a9bc8013782aa27188" - } - ], - "synonyms": [], - "m_Precision": 0, - "m_PreviewExpanded": false, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "customBlockNodeName": "mapping", - "serializedType": 4 -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot", - "m_ObjectId": "b456d184e007428eb74e555e1d369069", - "m_Id": 0, - "m_DisplayName": "Normal", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "Normal", - "m_StageCapability": 1, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_Labels": [], - "m_Space": 0 -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.BlockNode", - "m_ObjectId": "b585fdf2c7ce438b8a72c6f452ff31ab", - "m_Group": { - "m_Id": "" - }, - "m_Name": "VertexDescription.CustomInterpolator", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": 235.00001525878907, - "y": 189.0, - "width": 199.99989318847657, - "height": 40.99998474121094 - } - }, - "m_Slots": [ - { - "m_Id": "e5ebb82ec44c4baf91e6301f7c8864a9" - } - ], - "synonyms": [], - "m_Precision": 0, - "m_PreviewExpanded": true, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_SerializedDescriptor": "VertexDescription.viewRay#3" -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", - "m_ObjectId": "b61bc63901084fca9804abee48abddfd", - "m_Id": 3, - "m_DisplayName": "B", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "B", - "m_StageCapability": 3, - "m_Value": 0.0, - "m_DefaultValue": 0.0, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", - "m_ObjectId": "b7ad4b8143794b239501e5624069fe3e", - "m_Id": 2, - "m_DisplayName": "G", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "G", - "m_StageCapability": 3, - "m_Value": 0.0, - "m_DefaultValue": 0.0, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", - "m_ObjectId": "b97286e6cc284c43a67b57f07ce0539b", - "m_Id": 0, - "m_DisplayName": "Alpha", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "Alpha", - "m_StageCapability": 2, - "m_Value": 1.0, - "m_DefaultValue": 1.0, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", - "m_ObjectId": "b9f263f81f814659b65ba7c8965c6b7e", - "m_Id": 2, - "m_DisplayName": "a2", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "a2", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.CombineNode", - "m_ObjectId": "babccae7634a4d2090f45aa9e154b2ca", - "m_Group": { - "m_Id": "" - }, - "m_Name": "Combine", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": -215.00001525878907, - "y": 266.0, - "width": 140.00001525878907, - "height": 166.0 - } - }, - "m_Slots": [ - { - "m_Id": "f4036022b00d4f13bf8f03f2b55d5b41" - }, - { - "m_Id": "d49b15aa5cf746cf954a2b46e033e76d" - }, - { - "m_Id": "79ab31681e3e419183510b2fa4f09f6a" - }, - { - "m_Id": "ac5ddd82d3a84a4cbf509ddfe1beb229" - }, - { - "m_Id": "c6fd8c5c8cf744a58bb4efca3dab998f" - }, - { - "m_Id": "08351f97eeea4b6485b39a61a65a3fe8" - }, - { - "m_Id": "619732196dbf41f6a0e7b1174688f54c" - } - ], - "synonyms": [ - "append" - ], - "m_Precision": 0, - "m_PreviewExpanded": false, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.DynamicMatrixMaterialSlot", - "m_ObjectId": "bfadf92d913d48b88b7911b3bf4952ba", - "m_Id": 1, - "m_DisplayName": "", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "", - "m_StageCapability": 3, - "m_Value": { - "e00": 1.0, - "e01": 0.0, - "e02": 0.0, - "e03": 0.0, - "e10": 0.0, - "e11": 1.0, - "e12": 0.0, - "e13": 0.0, - "e20": 0.0, - "e21": 0.0, - "e22": 1.0, - "e23": 0.0, - "e30": 0.0, - "e31": 0.0, - "e32": 0.0, - "e33": 1.0 - }, - "m_DefaultValue": { - "e00": 1.0, - "e01": 0.0, - "e02": 0.0, - "e03": 0.0, - "e10": 0.0, - "e11": 1.0, - "e12": 0.0, - "e13": 0.0, - "e20": 0.0, - "e21": 0.0, - "e22": 1.0, - "e23": 0.0, - "e30": 0.0, - "e31": 0.0, - "e32": 0.0, - "e33": 1.0 - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", - "m_ObjectId": "c1114c7b3db74f0da0e27c4938d3b793", - "m_Id": 0, - "m_DisplayName": "Out", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "Out", - "m_StageCapability": 2, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.RedirectNodeData", - "m_ObjectId": "c6116508eb7246469fe9c6ae81460410", - "m_Group": { - "m_Id": "" - }, - "m_Name": "Redirect Node", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": -426.00006103515627, - "y": 864.9999389648438, - "width": 56.000030517578128, - "height": 24.00006103515625 - } - }, - "m_Slots": [ - { - "m_Id": "53f213ac70a7461ab7fb3813e00bb7f6" - }, - { - "m_Id": "74076c4a517f4a9bb9273882b00b51a6" - } - ], - "synonyms": [], - "m_Precision": 0, - "m_PreviewExpanded": true, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", - "m_ObjectId": "c6fd8c5c8cf744a58bb4efca3dab998f", - "m_Id": 4, - "m_DisplayName": "RGBA", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "RGBA", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", - "m_ObjectId": "c81b0a23ef5c4e1bbc194418c1316342", - "m_Id": 0, - "m_DisplayName": "a3", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "a3", - "m_StageCapability": 1, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Matrix3MaterialSlot", - "m_ObjectId": "cd294f26621f499cb86c60132cc4143c", - "m_Id": 0, - "m_DisplayName": "P", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "P", - "m_StageCapability": 3, - "m_Value": { - "e00": 1.0, - "e01": 0.0, - "e02": 0.0, - "e03": 0.0, - "e10": 0.0, - "e11": 1.0, - "e12": 0.0, - "e13": 0.0, - "e20": 0.0, - "e21": 0.0, - "e22": 1.0, - "e23": 0.0, - "e30": 0.0, - "e31": 0.0, - "e32": 0.0, - "e33": 1.0 - }, - "m_DefaultValue": { - "e00": 1.0, - "e01": 0.0, - "e02": 0.0, - "e03": 0.0, - "e10": 0.0, - "e11": 1.0, - "e12": 0.0, - "e13": 0.0, - "e20": 0.0, - "e21": 0.0, - "e22": 1.0, - "e23": 0.0, - "e30": 0.0, - "e31": 0.0, - "e32": 0.0, - "e33": 1.0 - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", - "m_ObjectId": "ce61c417fb924d9098ede6f08e533041", - "m_Id": 1, - "m_DisplayName": "B", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "B", - "m_StageCapability": 3, - "m_Value": { - "x": 1.0, - "y": 1.0, - "z": 1.0, - "w": 1.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", - "m_ObjectId": "ce9414174ca54d1293c032bb45fac6a3", - "m_Id": 5, - "m_DisplayName": "eyeNormal", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "eyeNormal", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.BlockNode", - "m_ObjectId": "cf2c0d4033c24443b7c21cb036226b3f", - "m_Group": { - "m_Id": "" - }, - "m_Name": "SurfaceDescription.Emission", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": 0.0, - "y": 0.0, - "width": 0.0, - "height": 0.0 - } - }, - "m_Slots": [ - { - "m_Id": "61c80ef969694adf838815d13bc5cd67" - } - ], - "synonyms": [], - "m_Precision": 0, - "m_PreviewExpanded": true, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_SerializedDescriptor": "SurfaceDescription.Emission" -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", - "m_ObjectId": "d068f1207b3340f6a006284eb45ddb8b", - "m_Id": 4, - "m_DisplayName": "eyePos", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "eyePos", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot", - "m_ObjectId": "d08d226deab44224a9c127e0838da1ec", - "m_Id": 0, - "m_DisplayName": "Normal (World Space)", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "NormalWS", - "m_StageCapability": 2, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_Labels": [], - "m_Space": 2 -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.BlockNode", - "m_ObjectId": "d11f8fd02e364ad5b8eadd3550fa2851", - "m_Group": { - "m_Id": "" - }, - "m_Name": "SurfaceDescription.Metallic", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": 0.0, - "y": 0.0, - "width": 0.0, - "height": 0.0 - } - }, - "m_Slots": [ - { - "m_Id": "1f4c9820a5b244deb7bd8e2bf0aa5270" - } - ], - "synonyms": [], - "m_Precision": 0, - "m_PreviewExpanded": true, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_SerializedDescriptor": "SurfaceDescription.Metallic" -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", - "m_ObjectId": "d3003457079944b499113867ead39439", - "m_Id": 5, - "m_DisplayName": "radiusScale", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "radiusScale", - "m_StageCapability": 3, - "m_Value": 0.0, - "m_DefaultValue": 0.0, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", - "m_ObjectId": "d49b15aa5cf746cf954a2b46e033e76d", - "m_Id": 1, - "m_DisplayName": "G", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "G", - "m_StageCapability": 3, - "m_Value": 0.0, - "m_DefaultValue": 0.0, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", - "m_ObjectId": "d5ab07535b904d6c95b72aefdd4d8ccd", - "m_Id": 2, - "m_DisplayName": "G", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "G", - "m_StageCapability": 3, - "m_Value": 0.0, - "m_DefaultValue": 0.0, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", - "m_ObjectId": "d9e1566528a04795a93b9222cfe9b841", - "m_Id": 0, - "m_DisplayName": "In", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "In", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", - "m_ObjectId": "db6f119a98ed4aee872e15302095fbfb", - "m_Id": 0, - "m_DisplayName": "Out", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "Out", - "m_StageCapability": 2, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", - "m_ObjectId": "dba07545e112449c9e6450b20a948fe0", - "m_Id": 0, - "m_DisplayName": "Smoothness", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "Smoothness", - "m_StageCapability": 2, - "m_Value": 0.0, - "m_DefaultValue": 0.5, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.HDLitData", - "m_ObjectId": "de8e93dbd1744203a66905de95755eec", - "m_RayTracing": false, - "m_MaterialType": 0, - "m_RefractionModel": 0, - "m_SSSTransmission": true, - "m_EnergyConservingSpecular": true, - "m_ClearCoat": false -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.BlockNode", - "m_ObjectId": "dfd25b2a19df42beba356ef0e5e0b3be", - "m_Group": { - "m_Id": "" - }, - "m_Name": "SurfaceDescription.AlphaClipThreshold", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": 0.0, - "y": 0.0, - "width": 0.0, - "height": 0.0 - } - }, - "m_Slots": [ - { - "m_Id": "f73cd7a7841243ac96286fd2afaf7862" - } - ], - "synonyms": [], - "m_Precision": 0, - "m_PreviewExpanded": true, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_SerializedDescriptor": "SurfaceDescription.AlphaClipThreshold" -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.BlockNode", - "m_ObjectId": "dffaa900d1d04a7db60ef0ccab276839", - "m_Group": { - "m_Id": "" - }, - "m_Name": "SurfaceDescription.Smoothness", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": 0.0, - "y": 0.0, - "width": 0.0, - "height": 0.0 - } - }, - "m_Slots": [ - { - "m_Id": "dba07545e112449c9e6450b20a948fe0" - } - ], - "synonyms": [], - "m_Precision": 0, - "m_PreviewExpanded": true, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_SerializedDescriptor": "SurfaceDescription.Smoothness" -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", - "m_ObjectId": "e09a4f7448b74893a9745d1625d39a19", - "m_Id": 0, - "m_DisplayName": "_RadiusScale", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "Out", - "m_StageCapability": 3, - "m_Value": 0.0, - "m_DefaultValue": 0.0, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.BlockNode", - "m_ObjectId": "e17c109ffbe942c89e40ff95cd1cfd7a", - "m_Group": { - "m_Id": "" - }, - "m_Name": "VertexDescription.Tangent", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": 0.0, - "y": 0.0, - "width": 0.0, - "height": 0.0 - } - }, - "m_Slots": [ - { - "m_Id": "41c7519efb9a45fb85dcded2b16d584d" - } - ], - "synonyms": [], - "m_Precision": 0, - "m_PreviewExpanded": true, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_SerializedDescriptor": "VertexDescription.Tangent" -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.CustomInterpolatorNode", - "m_ObjectId": "e185f6e703b749569fec95035ae86e44", - "m_Group": { - "m_Id": "" - }, - "m_Name": "viewRay (Custom Interpolator)", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": -790.0000610351563, - "y": 576.0, - "width": 219.0, - "height": 94.0 - } - }, - "m_Slots": [ - { - "m_Id": "db6f119a98ed4aee872e15302095fbfb" - } - ], - "synonyms": [], - "m_Precision": 0, - "m_PreviewExpanded": false, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "customBlockNodeName": "viewRay", - "serializedType": 3 -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", - "m_ObjectId": "e27b00a5d6b8496e888b33ff61e843e3", - "m_Id": 2, - "m_DisplayName": "Out", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "Out", - "m_StageCapability": 3, - "m_Value": { - "e00": 0.0, - "e01": 0.0, - "e02": 0.0, - "e03": 0.0, - "e10": 0.0, - "e11": 0.0, - "e12": 0.0, - "e13": 0.0, - "e20": 0.0, - "e21": 0.0, - "e22": 0.0, - "e23": 0.0, - "e30": 0.0, - "e31": 0.0, - "e32": 0.0, - "e33": 0.0 - }, - "m_DefaultValue": { - "e00": 1.0, - "e01": 0.0, - "e02": 0.0, - "e03": 0.0, - "e10": 0.0, - "e11": 1.0, - "e12": 0.0, - "e13": 0.0, - "e20": 0.0, - "e21": 0.0, - "e22": 1.0, - "e23": 0.0, - "e30": 0.0, - "e31": 0.0, - "e32": 0.0, - "e33": 1.0 - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Matrix3MaterialSlot", - "m_ObjectId": "e3ffd102837b43d98258c9830c869bff", - "m_Id": 3, - "m_DisplayName": "P", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "P", - "m_StageCapability": 3, - "m_Value": { - "e00": 1.0, - "e01": 0.0, - "e02": 0.0, - "e03": 0.0, - "e10": 0.0, - "e11": 1.0, - "e12": 0.0, - "e13": 0.0, - "e20": 0.0, - "e21": 0.0, - "e22": 1.0, - "e23": 0.0, - "e30": 0.0, - "e31": 0.0, - "e32": 0.0, - "e33": 1.0 - }, - "m_DefaultValue": { - "e00": 1.0, - "e01": 0.0, - "e02": 0.0, - "e03": 0.0, - "e10": 0.0, - "e11": 1.0, - "e12": 0.0, - "e13": 0.0, - "e20": 0.0, - "e21": 0.0, - "e22": 1.0, - "e23": 0.0, - "e30": 0.0, - "e31": 0.0, - "e32": 0.0, - "e33": 1.0 - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.PropertyNode", - "m_ObjectId": "e445db0b154846179887a9470ff3aa66", - "m_Group": { - "m_Id": "" - }, - "m_Name": "Property", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": -1906.9998779296875, - "y": 331.0, - "width": 143.9998779296875, - "height": 33.999969482421878 - } - }, - "m_Slots": [ - { - "m_Id": "e09a4f7448b74893a9745d1625d39a19" - } - ], - "synonyms": [], - "m_Precision": 0, - "m_PreviewExpanded": true, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_Property": { - "m_Id": "22b23a850ca345f6b5b35205f12039ae" - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", - "m_ObjectId": "e5ebb82ec44c4baf91e6301f7c8864a9", - "m_Id": 0, - "m_DisplayName": "viewRay", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "viewRay", - "m_StageCapability": 1, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", - "m_ObjectId": "e716e7c9ae6e45278a7d746d0a1da856", - "m_Id": 1, - "m_DisplayName": "Out", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "Out", - "m_StageCapability": 3, - "m_Value": 0.0, - "m_DefaultValue": 0.0, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", - "m_ObjectId": "e82eba05d3404e81a4d1193cf676653b", - "m_Id": 1, - "m_DisplayName": "B", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "B", - "m_StageCapability": 3, - "m_Value": { - "e00": 2.0, - "e01": 2.0, - "e02": 2.0, - "e03": 2.0, - "e10": 2.0, - "e11": 2.0, - "e12": 2.0, - "e13": 2.0, - "e20": 2.0, - "e21": 2.0, - "e22": 2.0, - "e23": 2.0, - "e30": 2.0, - "e31": 2.0, - "e32": 2.0, - "e33": 2.0 - }, - "m_DefaultValue": { - "e00": 1.0, - "e01": 0.0, - "e02": 0.0, - "e03": 0.0, - "e10": 0.0, - "e11": 1.0, - "e12": 0.0, - "e13": 0.0, - "e20": 0.0, - "e21": 0.0, - "e22": 1.0, - "e23": 0.0, - "e30": 0.0, - "e31": 0.0, - "e32": 0.0, - "e33": 1.0 - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.BlockNode", - "m_ObjectId": "e94b4e133a134411aa01241421f711cb", - "m_Group": { - "m_Id": "" - }, - "m_Name": "SurfaceDescription.Alpha", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": 0.0, - "y": 0.0, - "width": 0.0, - "height": 0.0 - } - }, - "m_Slots": [ - { - "m_Id": "b97286e6cc284c43a67b57f07ce0539b" - } - ], - "synonyms": [], - "m_Precision": 0, - "m_PreviewExpanded": true, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_SerializedDescriptor": "SurfaceDescription.Alpha" -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", - "m_ObjectId": "ea691d98931f4db5b57fa9074c8ac113", - "m_Id": 4, - "m_DisplayName": "A", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "A", - "m_StageCapability": 3, - "m_Value": 0.0, - "m_DefaultValue": 0.0, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", - "m_ObjectId": "ec49096fac914af0a3faddf1feb3953c", - "m_Id": 0, - "m_DisplayName": "_ParticleColor", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "Out", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.BlockNode", - "m_ObjectId": "ee946d6d4c7c4cb1b920e447bb01d580", - "m_Group": { - "m_Id": "" - }, - "m_Name": "SurfaceDescription.DepthOffset", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": 546.0, - "y": 732.0, - "width": 200.0, - "height": 41.0 - } - }, - "m_Slots": [ - { - "m_Id": "0a65b1a8a9cc4d26aa3d5676905379a0" - } - ], - "synonyms": [], - "m_Precision": 0, - "m_PreviewExpanded": true, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - }, - "m_SerializedDescriptor": "SurfaceDescription.DepthOffset" -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", - "m_ObjectId": "eefaca546df646d9bab0a7e8ead8fe9f", - "m_Id": 0, - "m_DisplayName": "A", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "A", - "m_StageCapability": 3, - "m_Value": { - "e00": 0.0, - "e01": 0.0, - "e02": 0.0, - "e03": 0.0, - "e10": 0.0, - "e11": 0.0, - "e12": 0.0, - "e13": 0.0, - "e20": 0.0, - "e21": 0.0, - "e22": 0.0, - "e23": 0.0, - "e30": 0.0, - "e31": 0.0, - "e32": 0.0, - "e33": 0.0 - }, - "m_DefaultValue": { - "e00": 1.0, - "e01": 0.0, - "e02": 0.0, - "e03": 0.0, - "e10": 0.0, - "e11": 1.0, - "e12": 0.0, - "e13": 0.0, - "e20": 0.0, - "e21": 0.0, - "e22": 1.0, - "e23": 0.0, - "e30": 0.0, - "e31": 0.0, - "e32": 0.0, - "e33": 1.0 - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", - "m_ObjectId": "ef8a1c0804ec4253ad73c319031bec6e", - "m_Id": 1, - "m_DisplayName": "", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", - "m_ObjectId": "f14b3173a44b48f1a3ab3e787ab15403", - "m_Id": 0, - "m_DisplayName": "mapping", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "mapping", - "m_StageCapability": 1, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", - "m_ObjectId": "f30fd08bbcc74a6198fb279d65f82696", - "m_Id": 1, - "m_DisplayName": "mapping", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "mapping", - "m_StageCapability": 3, - "m_Value": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_DefaultValue": { - "x": 0.0, - "y": 0.0, - "z": 0.0, - "w": 0.0 - }, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", - "m_ObjectId": "f4036022b00d4f13bf8f03f2b55d5b41", - "m_Id": 0, - "m_DisplayName": "R", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "R", - "m_StageCapability": 3, - "m_Value": 0.0, - "m_DefaultValue": 0.0, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", - "m_ObjectId": "f50f51a906cb44dcbc8403263a8cfa32", - "m_Id": 7, - "m_DisplayName": "clipThreshold", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "clipThreshold", - "m_StageCapability": 3, - "m_Value": 0.0, - "m_DefaultValue": 0.0, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.SubtractNode", - "m_ObjectId": "f5da1c6b4af04e169c2dce3319f17d13", - "m_Group": { - "m_Id": "" - }, - "m_Name": "Subtract", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": 63.999977111816409, - "y": 877.0, - "width": 126.00000762939453, - "height": 118.00006103515625 - } - }, - "m_Slots": [ - { - "m_Id": "a7a558d25384460e8b0995dc9f89165a" - }, - { - "m_Id": "ce61c417fb924d9098ede6f08e533041" - }, - { - "m_Id": "51b895e1b64e43529095cc44fc769771" - } - ], - "synonyms": [ - "subtraction", - "remove", - "minus", - "take away" - ], - "m_Precision": 0, - "m_PreviewExpanded": false, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.HDLitSubTarget", - "m_ObjectId": "f63f238dcaed45b9859faec9503ae798" -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.DynamicMatrixMaterialSlot", - "m_ObjectId": "f66158b6241342c88d2a4991233e93a8", - "m_Id": 0, - "m_DisplayName": "", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "", - "m_StageCapability": 3, - "m_Value": { - "e00": 1.0, - "e01": 0.0, - "e02": 0.0, - "e03": 0.0, - "e10": 0.0, - "e11": 1.0, - "e12": 0.0, - "e13": 0.0, - "e20": 0.0, - "e21": 0.0, - "e22": 1.0, - "e23": 0.0, - "e30": 0.0, - "e31": 0.0, - "e32": 0.0, - "e33": 1.0 - }, - "m_DefaultValue": { - "e00": 1.0, - "e01": 0.0, - "e02": 0.0, - "e03": 0.0, - "e10": 0.0, - "e11": 1.0, - "e12": 0.0, - "e13": 0.0, - "e20": 0.0, - "e21": 0.0, - "e22": 1.0, - "e23": 0.0, - "e30": 0.0, - "e31": 0.0, - "e32": 0.0, - "e33": 1.0 - } -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", - "m_ObjectId": "f73cd7a7841243ac96286fd2afaf7862", - "m_Id": 0, - "m_DisplayName": "Alpha Clip Threshold", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "AlphaClipThreshold", - "m_StageCapability": 2, - "m_Value": 0.5, - "m_DefaultValue": 0.5, - "m_Labels": [] -} - -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", - "m_ObjectId": "feae803029f141b7b77576f65de3f361", - "m_Id": 1, - "m_DisplayName": "R", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "R", - "m_StageCapability": 3, - "m_Value": 0.0, - "m_DefaultValue": 0.0, - "m_Labels": [] -} - diff --git a/Assets/Obi/Resources/ObiMaterials/DistanceFields/DistanceFieldRendering.mat b/Assets/Obi/Resources/ObiMaterials/DistanceFieldRendering.mat similarity index 100% rename from Assets/Obi/Resources/ObiMaterials/DistanceFields/DistanceFieldRendering.mat rename to Assets/Obi/Resources/ObiMaterials/DistanceFieldRendering.mat diff --git a/Assets/Obi/Resources/ObiMaterials/DistanceFields/DistanceFieldRendering.mat.meta b/Assets/Obi/Resources/ObiMaterials/DistanceFieldRendering.mat.meta similarity index 100% rename from Assets/Obi/Resources/ObiMaterials/DistanceFields/DistanceFieldRendering.mat.meta rename to Assets/Obi/Resources/ObiMaterials/DistanceFieldRendering.mat.meta diff --git a/Assets/Obi/Resources/ObiMaterials/DistanceFields/DistanceFieldSlice.shader b/Assets/Obi/Resources/ObiMaterials/DistanceFieldSlice.shader similarity index 100% rename from Assets/Obi/Resources/ObiMaterials/DistanceFields/DistanceFieldSlice.shader rename to Assets/Obi/Resources/ObiMaterials/DistanceFieldSlice.shader diff --git a/Assets/Obi/Resources/ObiMaterials/DistanceFields/DistanceFieldSlice.shader.meta b/Assets/Obi/Resources/ObiMaterials/DistanceFieldSlice.shader.meta similarity index 100% rename from Assets/Obi/Resources/ObiMaterials/DistanceFields/DistanceFieldSlice.shader.meta rename to Assets/Obi/Resources/ObiMaterials/DistanceFieldSlice.shader.meta diff --git a/Assets/Obi/Resources/ObiMaterials/DistanceFields.meta b/Assets/Obi/Resources/ObiMaterials/DistanceFields.meta deleted file mode 100644 index bbfbc4174..000000000 --- a/Assets/Obi/Resources/ObiMaterials/DistanceFields.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: aacd9fe47bf4d416d883fd99066cf37e -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Materials/TanglePeg.mat b/Assets/Obi/Resources/ObiMaterials/InstancedStandard.mat similarity index 90% rename from Assets/Obi/Samples/RopeAndRod/SampleResources/Materials/TanglePeg.mat rename to Assets/Obi/Resources/ObiMaterials/InstancedStandard.mat index 191a3283a..62f2fec4a 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Materials/TanglePeg.mat +++ b/Assets/Obi/Resources/ObiMaterials/InstancedStandard.mat @@ -7,14 +7,14 @@ Material: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: TanglePeg + m_Name: InstancedStandard m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 + m_EnableInstancingVariants: 1 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} @@ -44,7 +44,7 @@ Material: m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _MainTex: - m_Texture: {fileID: 0} + m_Texture: {fileID: 2800000, guid: 8fbd9c5f957b8434883cdfce9d6a3c27, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _MetallicGlossMap: @@ -66,7 +66,7 @@ Material: - _DetailNormalMapScale: 1 - _DstBlend: 0 - _GlossMapScale: 1 - - _Glossiness: 0.8 + - _Glossiness: 0.5 - _GlossyReflections: 1 - _Metallic: 0 - _Mode: 0 @@ -78,7 +78,7 @@ Material: - _UVSec: 0 - _ZWrite: 1 m_Colors: - - _Color: {r: 1, g: 0.7734498, b: 0, a: 1} + - _Color: {r: 1, g: 1, b: 1, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] m_AllowLocking: 1 diff --git a/Assets/Obi/Resources/ObiMaterials/Common/Instanced/Compute/ProceduralInstanced.mat.meta b/Assets/Obi/Resources/ObiMaterials/InstancedStandard.mat.meta similarity index 100% rename from Assets/Obi/Resources/ObiMaterials/Common/Instanced/Compute/ProceduralInstanced.mat.meta rename to Assets/Obi/Resources/ObiMaterials/InstancedStandard.mat.meta diff --git a/Assets/Obi/Resources/ObiMaterials/Common/ObiEllipsoids.cginc b/Assets/Obi/Resources/ObiMaterials/ObiEllipsoids.cginc similarity index 63% rename from Assets/Obi/Resources/ObiMaterials/Common/ObiEllipsoids.cginc rename to Assets/Obi/Resources/ObiMaterials/ObiEllipsoids.cginc index 63513cb9c..157d9d0b5 100644 --- a/Assets/Obi/Resources/ObiMaterials/Common/ObiEllipsoids.cginc +++ b/Assets/Obi/Resources/ObiMaterials/ObiEllipsoids.cginc @@ -1,13 +1,15 @@ #ifndef OBIELLIPSOIDS_INCLUDED #define OBIELLIPSOIDS_INCLUDED +float _RadiusScale; + // Eye ray origin in world space. // Works both for orthographic and perspective cameras. float3 WorldEye(float3 worldPos){ if ((UNITY_MATRIX_P[3].x == 0.0) && (UNITY_MATRIX_P[3].y == 0.0) && (UNITY_MATRIX_P[3].z == 0.0)){ return mul(UNITY_MATRIX_I_V,float4(mul(UNITY_MATRIX_V, float4(worldPos,1)).xy,0,1)).xyz; }else - return _WorldSpaceCameraPos; + return UNITY_MATRIX_I_V._m03_m13_m23; } // Returns visible ellipsoid radius and offset from center, given the eye position in parameter space. @@ -41,20 +43,6 @@ float IntersectEllipsoid(float3 v, float4 mapping, float3 a2, float3 a3, out flo return 2 * sqrtiq * exp(-r2*2.0f); } -void BuildVelocityStretchedBasis(float3 velocity, float stretchIntensity, float radius, out float4 t0, out float4 t1, out float4 t2) -{ - t0 = float4(UNITY_MATRIX_V[0].xyz, radius); // camera right vector - t2 = float4(UNITY_MATRIX_V[2].xyz, radius); // camera forward vector - - float3 eyeVel = velocity - dot(velocity, t2.xyz) * t2.xyz; - float velNorm = length(eyeVel); - float stretchAmount = velNorm * stretchIntensity; - - // use it to lerp between velocity vector and camera right: - t0 = float4(velNorm > 0.00001 ? eyeVel / velNorm : t0, radius * (1 + stretchAmount)); - t1 = float4(normalize(cross(t0.xyz,t2.xyz)), radius); -} - void BuildParameterSpaceMatrices(float4 t0, float4 t1, float4 t2, out float3x3 P, out float3x3 IP) { // build 3x3 orientation matrix and its inverse; @@ -62,18 +50,18 @@ void BuildParameterSpaceMatrices(float4 t0, float4 t1, float4 t2, out float3x3 P float3x3 O = transpose(IO); // build 3x3 scaling matrix and its inverse: - float3x3 S = float3x3(t0.w,0,0,0,t1.w,0,0,0,t2.w); - float3x3 IS = float3x3(1/t0.w,0,0,0,1/t1.w,0,0,0,1/t2.w); + float3x3 S = float3x3(_RadiusScale*t0.w,0,0,0,_RadiusScale*t1.w,0,0,0,_RadiusScale*t2.w); + float3x3 IS = float3x3(1/(_RadiusScale*t0.w),0,0,0,1/(_RadiusScale*t1.w),0,0,0,1/(_RadiusScale*t2.w)); // build 3x3 transformation matrix and its inverse: - P = mul((float3x3)unity_ObjectToWorld, mul(O,mul(S,IO)) ); - IP = mul(mul(mul(O,IS),IO), (float3x3)unity_WorldToObject); + P = mul(mul(O,S),IO); + IP = mul(mul(O,IS),IO); } float BuildEllipsoidBillboard(float3 center, float3 corner, float3x3 P, float3x3 IP, out float3 worldPos, out float3 view, out float3 eye) { // eye position and quad vectors in parameter space: - eye = mul(IP, WorldEye(center) - center); + eye = mul(IP,WorldEye(center) - center); float3 u = normalize(cross(-eye,UNITY_MATRIX_V[1].xyz)); float3 k = normalize(cross(-eye,u)); @@ -90,14 +78,8 @@ float BuildEllipsoidBillboard(float3 center, float3 corner, float3x3 P, float3x3 void BuildAuxiliaryNormalVectors(float3 center, float3 worldPos, float3 view, float3x3 P, float3x3 IP, out float3 a2, out float3 a3) { - // calculate T^-2 in object space, then multiply by - // inverse transpose of modelview to rotate normal from object to eye. - // This way the normal calculated in IntersectEllipsoid() is already in view space. - IP = mul((float3x3)unity_ObjectToWorld,IP); - float3x3 IP2 = mul((float3x3)UNITY_MATRIX_IT_MV, mul((float3x3)unity_WorldToObject,mul (IP, IP))); - - a2 = mul(IP2,WorldEye(worldPos) - center); //T^-2 * (eye - center) - a3 = mul(IP2,view); //T^-2 * A[0] + a2 = mul((float3x3)UNITY_MATRIX_V,mul(IP,mul(IP,WorldEye(worldPos) - center))); //T^-2 * (eye - center) + a3 = mul((float3x3)UNITY_MATRIX_V,mul(IP,mul(IP,view))); //T^-2 * A[0] } #endif diff --git a/Assets/Obi/Resources/ObiMaterials/Common/ObiEllipsoids.cginc.meta b/Assets/Obi/Resources/ObiMaterials/ObiEllipsoids.cginc.meta similarity index 100% rename from Assets/Obi/Resources/ObiMaterials/Common/ObiEllipsoids.cginc.meta rename to Assets/Obi/Resources/ObiMaterials/ObiEllipsoids.cginc.meta diff --git a/Assets/Obi/Resources/ObiMaterials/ObiLightingBuiltIn.cginc b/Assets/Obi/Resources/ObiMaterials/ObiLightingBuiltIn.cginc new file mode 100644 index 000000000..35ff81bb9 --- /dev/null +++ b/Assets/Obi/Resources/ObiMaterials/ObiLightingBuiltIn.cginc @@ -0,0 +1,19 @@ +#ifndef OBILIGHTINGBUILTIN_INCLUDED +#define OBILIGHTINGBUILTIN_INCLUDED + +#include "UnityCG.cginc" +#include "UnityStandardUtils.cginc" +#include "AutoLight.cginc" + +half3 SampleSphereAmbient(float3 eyeNormal, float3 eyePos) +{ + #if UNITY_SHOULD_SAMPLE_SH + half3 worldNormal = mul(transpose((float3x3)UNITY_MATRIX_V),eyeNormal); + half3 worldPos = mul(_Camera_to_World,half4(eyePos,1.0)); + return ShadeSHPerPixel(half4(worldNormal, 1.0),half3(0,0,0),worldPos); + #else + return UNITY_LIGHTMODEL_AMBIENT; + #endif +} + +#endif diff --git a/Assets/Obi/Resources/Compute/Bounds.cginc.meta b/Assets/Obi/Resources/ObiMaterials/ObiLightingBuiltIn.cginc.meta similarity index 80% rename from Assets/Obi/Resources/Compute/Bounds.cginc.meta rename to Assets/Obi/Resources/ObiMaterials/ObiLightingBuiltIn.cginc.meta index f3c0a8e7c..761c6bcb2 100644 --- a/Assets/Obi/Resources/Compute/Bounds.cginc.meta +++ b/Assets/Obi/Resources/ObiMaterials/ObiLightingBuiltIn.cginc.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 52c09ed0a553243328693072f77d1465 +guid: 135872c7cdf2b43bf89b8c57d067d4de ShaderImporter: externalObjects: {} defaultTextures: [] diff --git a/Assets/Obi/Resources/ObiMaterials/ObiParticles.cginc b/Assets/Obi/Resources/ObiMaterials/ObiParticles.cginc new file mode 100644 index 000000000..b2e8f8f40 --- /dev/null +++ b/Assets/Obi/Resources/ObiMaterials/ObiParticles.cginc @@ -0,0 +1,24 @@ +#ifndef OBIPARTICLES_INCLUDED +#define OBIPARTICLES_INCLUDED + +float _RadiusScale; + +float3 BillboardSphereNormals(float2 texcoords) +{ + float3 n; + n.xy = texcoords*2.0-1.0; + float r2 = dot(n.xy, n.xy); + clip (1 - r2); // clip pixels outside circle + n.z = sqrt(1.0 - r2); + return n; +} + +float BillboardSphereThickness(float2 texcoords) +{ + float2 n = texcoords*2.0-1.0; + float r2 = dot(n.xy, n.xy); + clip (1 - r2); // clip pixels outside circle + return sqrt(1.0 - r2)*2.0f*exp(-r2*2.0f); +} + +#endif diff --git a/Assets/Obi/Resources/ObiMaterials/ObiParticles.cginc.meta b/Assets/Obi/Resources/ObiMaterials/ObiParticles.cginc.meta new file mode 100644 index 000000000..a08cdc8ea --- /dev/null +++ b/Assets/Obi/Resources/ObiMaterials/ObiParticles.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: e4575c757879646c793ff2b434b83e74 +timeCreated: 1445285630 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Resources/ObiMaterials/Common/ObiUtils.cginc b/Assets/Obi/Resources/ObiMaterials/ObiUtils.cginc similarity index 100% rename from Assets/Obi/Resources/ObiMaterials/Common/ObiUtils.cginc rename to Assets/Obi/Resources/ObiMaterials/ObiUtils.cginc diff --git a/Assets/Obi/Resources/ObiMaterials/Common/ObiUtils.cginc.meta b/Assets/Obi/Resources/ObiMaterials/ObiUtils.cginc.meta similarity index 100% rename from Assets/Obi/Resources/ObiMaterials/Common/ObiUtils.cginc.meta rename to Assets/Obi/Resources/ObiMaterials/ObiUtils.cginc.meta diff --git a/Assets/Obi/Resources/ObiMaterials/Particle.mat b/Assets/Obi/Resources/ObiMaterials/Particle.mat new file mode 100644 index 000000000..6cda4517e --- /dev/null +++ b/Assets/Obi/Resources/ObiMaterials/Particle.mat @@ -0,0 +1,83 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Particle + m_Shader: {fileID: 4800000, guid: 87908c483837f4df49e97fa1aa0dacda, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 5 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 10300, guid: 0000000000000000f000000000000000, type: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _Glossiness: 0.5 + - _InvFade: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _RadiusScale: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _TintColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} + m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Assets/Obi/Resources/ObiMaterials/Particle.mat.meta b/Assets/Obi/Resources/ObiMaterials/Particle.mat.meta new file mode 100644 index 000000000..c37067413 --- /dev/null +++ b/Assets/Obi/Resources/ObiMaterials/Particle.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: fb972beb020dd4ff5ab78835f4393522 +timeCreated: 1444705309 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Resources/ObiMaterials/ParticleShader.shader b/Assets/Obi/Resources/ObiMaterials/ParticleShader.shader new file mode 100644 index 000000000..941d682f9 --- /dev/null +++ b/Assets/Obi/Resources/ObiMaterials/ParticleShader.shader @@ -0,0 +1,215 @@ +Shader "Obi/Particles" { + +Properties { + _Color ("Particle color", Color) = (1,1,1,1) + _RadiusScale("Radius scale",float) = 1 +} + + SubShader { + + Pass { + + Name "ParticleFwdBase" + Tags {"Queue"="Geometry" "IgnoreProjector"="True" "RenderType"="Opaque" "LightMode" = "ForwardBase"} + Blend SrcAlpha OneMinusSrcAlpha + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma fragmentoption ARB_precision_hint_fastest + + #pragma multi_compile_fwdbase nolightmap + + #include "ObiEllipsoids.cginc" + #include "ObiUtils.cginc" + #include "ObiLightingBuiltIn.cginc" + + fixed4 _Color; + fixed4 _LightColor0; + + struct vin{ + float4 vertex : POSITION; + float3 corner : NORMAL; + fixed4 color : COLOR; + + float4 t0 : TEXCOORD0; // ellipsoid t1 vector + float4 t1 : TEXCOORD1; // ellipsoid t2 vector + float4 t2 : TEXCOORD2; // ellipsoid t3 vector + }; + + struct v2f + { + float4 pos : SV_POSITION; + fixed4 color : COLOR; + float4 mapping : TEXCOORD0; + float3 viewRay : TEXCOORD1; + float3 lightDir : TEXCOORD2; + float3 a2 : TEXCOORD3; + float3 a3 : TEXCOORD4; + LIGHTING_COORDS(5,6) + }; + + struct fout + { + half4 color : SV_Target; + float depth : SV_Depth; + }; + + v2f vert(vin v) + { + float3x3 P, IP; + BuildParameterSpaceMatrices(v.t0,v.t1,v.t2,P,IP); + + float3 worldPos; + float3 view; + float3 eye; + float radius = BuildEllipsoidBillboard(v.vertex,v.corner,P,IP,worldPos,view,eye); + + v2f o; + o.pos = mul(UNITY_MATRIX_VP, float4(worldPos,v.vertex.w)); + o.mapping = float4(v.corner.xy,1/length(eye),radius); // A[1] + o.viewRay = mul((float3x3)UNITY_MATRIX_V,view); // A[0] + o.color = v.color * _Color; + + BuildAuxiliaryNormalVectors(v.vertex,worldPos,view,P,IP,o.a2,o.a3); + + o.lightDir = mul((float3x3)UNITY_MATRIX_MV, ObjSpaceLightDir(v.vertex)); + TRANSFER_VERTEX_TO_FRAGMENT(o); + + return o; + } + + fout frag(v2f i) + { + fout fo; + + fo.color = half4(0,0,0,i.color.a); + + // generate sphere normals: + float3 p,n; + IntersectEllipsoid(i.viewRay,i.mapping, i.a2,i.a3,p, n); + + // clip space position: + float4 pos = mul(UNITY_MATRIX_P,float4(p,1.0)); + + // simple lighting: ambient + half3 amb = SampleSphereAmbient(n,p); + + // simple lighting: diffuse + float ndotl = saturate( dot( n, normalize(i.lightDir) ) ); + UNITY_LIGHT_ATTENUATION(atten,i,0); + + // final lit color: + fo.color.rgb = i.color * (_LightColor0 * ndotl * atten + amb); + + // normalized device coordinates: + fo.depth = pos.z/pos.w; + + // in openGL calculated depth range is <-1,1> map it to <0,1> + #if SHADER_API_OPENGL || SHADER_API_GLCORE || SHADER_API_GLES || SHADER_API_GLES3 + fo.depth = 0.5*fo.depth + 0.5; + #endif + + return fo; + } + + ENDCG + + } + + Pass { + Name "ShadowCaster" + Tags { "LightMode" = "ShadowCaster" } + Offset 1, 1 + + Fog {Mode Off} + ZWrite On ZTest LEqual + + CGPROGRAM + + #pragma vertex ellipsoidShadowVS + #pragma fragment frag + #pragma fragmentoption ARB_precision_hint_fastest + + #pragma multi_compile_shadowcaster nolightmap + + #include "ObiEllipsoids.cginc" + #include "ObiUtils.cginc" + #include "ObiLightingBuiltIn.cginc" + + sampler3D _DitherMaskLOD; + fixed4 _Color; + + struct vin{ + float4 vertex : POSITION; + float3 corner : NORMAL; + fixed4 color : COLOR; + + float4 t0 : TEXCOORD0; // ellipsoid t1 vector + float4 t1 : TEXCOORD1; // ellipsoid t2 vector + float4 t2 : TEXCOORD2; // ellipsoid t3 vector + }; + + struct v2f { + fixed4 color : COLOR; + float4 mapping : TEXCOORD0; + float3 viewRay : TEXCOORD1; + }; + + struct fout + { + half4 color : SV_Target; + float depth : SV_Depth; + }; + + v2f ellipsoidShadowVS( vin v , out float4 outpos : SV_POSITION )// clip space position output + { + float3x3 P, IP; + BuildParameterSpaceMatrices(v.t0,v.t1,v.t2,P,IP); + + float3 worldPos; + float3 view; + float3 eye; + float radius = BuildEllipsoidBillboard(v.vertex,v.corner,P,IP,worldPos,view,eye); + + v2f o; + outpos = mul(UNITY_MATRIX_VP, float4(worldPos,v.vertex.w)); + o.mapping = float4(v.corner.xy,1/length(eye),radius); // A[1] + o.viewRay = mul((float3x3)UNITY_MATRIX_V,view); // A[0] + o.color = v.color * _Color; + return o; + } + + fout frag( v2f i , UNITY_VPOS_TYPE vpos : VPOS) + { + fout fo; + + float3 p,n; + IntersectEllipsoid(i.viewRay,i.mapping, float3(0,0,0),float3(0,0,0),p, n); + + // project camera space position. + float4 pos = UnityApplyLinearShadowBias( mul(UNITY_MATRIX_P,float4(p,1.0)) ); + + fo.color = pos.z/pos.w; //similar to what SHADOW_CASTER_FRAGMENT does in case there's no depth buffer. + fo.depth = pos.z/pos.w; + + // in openGL calculated depth range is <-1,1> map it to <0,1> + #if SHADER_API_OPENGL || SHADER_API_GLCORE || SHADER_API_GLES || SHADER_API_GLES3 + fo.depth = fo.depth*0.5+0.5; + #endif + + // Use dither mask for alpha blended shadows, based on pixel position xy + // and alpha level. Our dither texture is 4x4x16. + half alphaRef = tex3D(_DitherMaskLOD, float3(vpos.xy*0.25,i.color.a*0.9375)).a; + clip (alphaRef - 0.01); + + return fo; + } + ENDCG + + } + + } +FallBack "Diffuse" +} + diff --git a/Assets/Obi/Resources/ObiMaterials/ParticleShader.shader.meta b/Assets/Obi/Resources/ObiMaterials/ParticleShader.shader.meta new file mode 100644 index 000000000..b7373631e --- /dev/null +++ b/Assets/Obi/Resources/ObiMaterials/ParticleShader.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 801733041f66b49e1b3c2101471db877 +timeCreated: 1438934781 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Resources/ObiMaterials/SimpleParticleShader.shader b/Assets/Obi/Resources/ObiMaterials/SimpleParticleShader.shader new file mode 100644 index 000000000..b6b0f89aa --- /dev/null +++ b/Assets/Obi/Resources/ObiMaterials/SimpleParticleShader.shader @@ -0,0 +1,131 @@ +Shader "Obi/Simple Particles" { + +Properties { + _Color ("Particle color", Color) = (1,1,1,1) +} + + SubShader { + + Pass { + + Name "ParticleFwdBase" + Tags {"Queue"="Geometry" "IgnoreProjector"="True" "RenderType"="Opaque" "LightMode" = "ForwardBase"} + Blend SrcAlpha OneMinusSrcAlpha + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma fragmentoption ARB_precision_hint_fastest + + #pragma multi_compile_fwdbase nolightmap + + #include "ObiParticles.cginc" + #include "ObiUtils.cginc" + #include "ObiLightingBuiltIn.cginc" + + fixed4 _Color; + fixed4 _LightColor0; + + struct vin{ + float4 vertex : POSITION; + float3 corner : NORMAL; + fixed4 color : COLOR; + float4 t0 : TEXCOORD0; // ellipsoid t1 vector + }; + + struct v2f + { + float4 pos : POSITION; + fixed4 color : COLOR; + float2 texcoord : TEXCOORD0; + float3 lightDir : TEXCOORD1; + LIGHTING_COORDS(3,4) + }; + + v2f vert(vin v) + { + v2f o; + + // particle positions are passed in world space, no need to use modelview matrix, just view. + float radius = v.t0.w * _RadiusScale; + float4 viewpos = mul(UNITY_MATRIX_V, v.vertex) + float4(v.corner.x, v.corner.y, 0, 0) * radius; // multiply by size. + o.pos = mul(UNITY_MATRIX_P, viewpos); + o.texcoord = float3(v.corner.x*0.5+0.5, v.corner.y*0.5+0.5, radius); + o.color = v.color * _Color; + + o.lightDir = mul ((float3x3)UNITY_MATRIX_MV, ObjSpaceLightDir(v.vertex)); + + TRANSFER_VERTEX_TO_FRAGMENT(o); + + return o; + } + + fixed4 frag(v2f i) : SV_Target + { + // generate sphere normals: + float3 n = BillboardSphereNormals(i.texcoord); + + // simple lighting: diffuse + float ndotl = saturate( dot( n, normalize(i.lightDir) ) ); + + // final lit color: + return fixed4(i.color.rgb * (_LightColor0 * ndotl + UNITY_LIGHTMODEL_AMBIENT),i.color.a); + } + + ENDCG + + } + + Pass { + Name "ShadowCaster" + Tags { "LightMode" = "ShadowCaster" } + Offset 1, 1 + + Fog {Mode Off} + ZWrite On ZTest LEqual + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma fragmentoption ARB_precision_hint_fastest + + #pragma multi_compile_shadowcaster nolightmap + + #include "ObiParticles.cginc" + + struct vin{ + float4 vertex : POSITION; + float3 corner : NORMAL; + float4 t0 : TEXCOORD0; // ellipsoid t1 vector + }; + + struct v2f { + float4 pos : POSITION; + float3 texcoord : TEXCOORD0; + }; + + v2f vert( vin v ) + { + v2f o; + + float radius = v.t0.w * _RadiusScale; + float4 viewpos = mul(UNITY_MATRIX_V, v.vertex) + float4(v.corner.x, v.corner.y, 0, 0) * radius; + o.pos = mul(UNITY_MATRIX_P, viewpos); + o.texcoord = float3(v.corner.x*0.5+0.5, v.corner.y*0.5+0.5, radius); + return o; + } + + fixed4 frag( v2f i ) : SV_Target + { + float3 n = BillboardSphereNormals(i.texcoord); + + return fixed4(0,0,0,0); + } + ENDCG + + } + + } +FallBack "Diffuse" +} + diff --git a/Assets/Obi/Resources/ObiMaterials/SimpleParticleShader.shader.meta b/Assets/Obi/Resources/ObiMaterials/SimpleParticleShader.shader.meta new file mode 100644 index 000000000..d7b7965c7 --- /dev/null +++ b/Assets/Obi/Resources/ObiMaterials/SimpleParticleShader.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 87908c483837f4df49e97fa1aa0dacda +timeCreated: 1489574725 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Resources/ObiMaterials/BuiltInStandardBackfaces/StandardVertexColors.shader b/Assets/Obi/Resources/ObiMaterials/StandardVertexColors.shader similarity index 100% rename from Assets/Obi/Resources/ObiMaterials/BuiltInStandardBackfaces/StandardVertexColors.shader rename to Assets/Obi/Resources/ObiMaterials/StandardVertexColors.shader diff --git a/Assets/Obi/Resources/ObiMaterials/BuiltInStandardBackfaces/StandardVertexColors.shader.meta b/Assets/Obi/Resources/ObiMaterials/StandardVertexColors.shader.meta similarity index 100% rename from Assets/Obi/Resources/ObiMaterials/BuiltInStandardBackfaces/StandardVertexColors.shader.meta rename to Assets/Obi/Resources/ObiMaterials/StandardVertexColors.shader.meta diff --git a/Assets/Obi/Resources/ObiMaterials/URP.meta b/Assets/Obi/Resources/ObiMaterials/URP.meta new file mode 100644 index 000000000..0507e4054 --- /dev/null +++ b/Assets/Obi/Resources/ObiMaterials/URP.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7377795ea5bbd404ba97de2909380e01 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Resources/ObiMaterials/URP/ObiLightingURP.cginc b/Assets/Obi/Resources/ObiMaterials/URP/ObiLightingURP.cginc new file mode 100644 index 000000000..aa1019617 --- /dev/null +++ b/Assets/Obi/Resources/ObiMaterials/URP/ObiLightingURP.cginc @@ -0,0 +1,36 @@ +#ifndef OBILIGHTINGBUILTURP_INCLUDED +#define OBILIGHTINGBUILTURP_INCLUDED + +#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" +#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" +#include "Packages/com.unity.render-pipelines.universal/Shaders/LitInput.hlsl" + +half3 SampleSphereAmbient(float3 eyeNormal) +{ + half3 worldNormal = mul(UNITY_MATRIX_I_V,half4(eyeNormal,0.0)); + return SampleSH(worldNormal); +} + +float3 ObjSpaceLightDir(in float4 modelPos) +{ + float3 lightPos = mul(unity_WorldToObject,_MainLightPosition).xyz; + float3 lightVector = lightPos.xyz - modelPos * _MainLightPosition.w; + return lightVector; +} + +float3 WorldSpaceLightDir(in float4 modelPos) +{ + float3 vertexPos = mul(unity_ObjectToWorld, modelPos).xyz; + float3 lightVector = _MainLightPosition.xyz - vertexPos * _MainLightPosition.w; + return lightVector; +} + +half Attenuation(float3 eyePos) +{ + half3 worldPos = mul(UNITY_MATRIX_I_V,half4(eyePos,1.0)); + float4 shadowCoord = TransformWorldToShadowCoord(worldPos); + Light mainLight = GetMainLight(shadowCoord); + return mainLight.shadowAttenuation * mainLight.distanceAttenuation; +} + +#endif diff --git a/Assets/Obi/Resources/ObiMaterials/URP/ObiLightingURP.cginc.meta b/Assets/Obi/Resources/ObiMaterials/URP/ObiLightingURP.cginc.meta new file mode 100644 index 000000000..7a766777a --- /dev/null +++ b/Assets/Obi/Resources/ObiMaterials/URP/ObiLightingURP.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 2231c15aefcd6484e9857cbb64ad8cd7 +timeCreated: 1445285630 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Resources/ObiMaterials/URP/ParticleShaderURP.shader b/Assets/Obi/Resources/ObiMaterials/URP/ParticleShaderURP.shader new file mode 100644 index 000000000..7d20e3601 --- /dev/null +++ b/Assets/Obi/Resources/ObiMaterials/URP/ParticleShaderURP.shader @@ -0,0 +1,236 @@ +Shader "Obi/URP/Particles" { + +Properties { + _Color ("Particle color", Color) = (1,1,1,1) + _RadiusScale("Radius scale",float) = 1 +} + + SubShader { + + Tags{"RenderPipeline" = "UniversalRenderPipeline"} + + Pass { + + Name "ParticleFwdBase" + Tags {"Queue"="Geometry" "IgnoreProjector"="True" "RenderType"="Opaque" "LightMode" = "UniversalForward"} + Blend SrcAlpha OneMinusSrcAlpha + + HLSLPROGRAM + + #pragma prefer_hlslcc gles + #pragma exclude_renderers d3d11_9x + #pragma target 2.0 + + #pragma vertex vert + #pragma fragment frag + #pragma fragmentoption ARB_precision_hint_fastest + + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS_CASCADE + #pragma multi_compile _ _SHADOWS_SOFT + + #include "../ObiUtils.cginc" + #include "ObiLightingURP.cginc" + #include "../ObiEllipsoids.cginc" + + float4 _Color; + float4 _LightColor0; + + struct vin{ + float4 vertex : POSITION; + float3 corner : NORMAL; + float4 color : COLOR; + float4 t0 : TEXCOORD0; // ellipsoid t1 vector + float4 t1 : TEXCOORD1; // ellipsoid t2 vector + float4 t2 : TEXCOORD2; // ellipsoid t3 vector + }; + + struct v2f + { + float4 pos : SV_POSITION; + float4 color : COLOR; + float4 mapping : TEXCOORD0; + float3 viewRay : TEXCOORD1; + float3 lightDir : TEXCOORD2; + float3 a2 : TEXCOORD3; + float3 a3 : TEXCOORD4; + }; + + struct fout + { + half4 color : SV_Target; + float depth : SV_Depth; + }; + + v2f vert(vin v) + { + float3x3 P, IP; + BuildParameterSpaceMatrices(v.t0,v.t1,v.t2,P,IP); + + float3 worldPos; + float3 view; + float3 eye; + float radius = BuildEllipsoidBillboard(v.vertex,v.corner,P,IP,worldPos,view,eye); + + v2f o; + o.pos = mul(UNITY_MATRIX_VP, float4(worldPos,v.vertex.w)); + o.mapping = float4(v.corner.xy,1/length(eye),radius); // A[1] + o.viewRay = mul((float3x3)UNITY_MATRIX_V,view); // A[0] + o.color = v.color * _Color; + + BuildAuxiliaryNormalVectors(v.vertex,worldPos,view,P,IP,o.a2,o.a3); + + o.lightDir = mul((float3x3)UNITY_MATRIX_MV, ObjSpaceLightDir(v.vertex)); + + return o; + } + + fout frag(v2f i) + { + fout fo; + + fo.color = half4(0,0,0,i.color.a); + + // generate sphere normals: + float3 p,n; + IntersectEllipsoid(i.viewRay,i.mapping, i.a2,i.a3, p, n); + + // clip space position: + float4 pos = mul(UNITY_MATRIX_P,float4(p,1.0)); + + // simple lighting: ambient + half3 amb = SampleSphereAmbient(n); + + // simple lighting: diffuse + float ndotl = saturate( dot( n, normalize(i.lightDir) ) ); + float atten = Attenuation(p); + + // final lit color: + fo.color.rgb = i.color * (_LightColor0 * ndotl * atten + amb); + + // normalized device coordinates: + fo.depth = pos.z/pos.w; + + // in openGL calculated depth range is <-1,1> map it to <0,1> + #if SHADER_API_OPENGL || SHADER_API_GLCORE || SHADER_API_GLES || SHADER_API_GLES3 + fo.depth = 0.5 * fo.depth + 0.5; + #endif + + return fo; + } + + ENDHLSL + + } + + Pass { + + Name "ShadowCaster" + Tags { "LightMode" = "ShadowCaster" } + Offset 1, 1 + + Fog {Mode Off} + ZWrite On ZTest LEqual + + HLSLPROGRAM + + #pragma prefer_hlslcc gles + #pragma exclude_renderers d3d11_9x + #pragma target 2.0 + + #pragma vertex ellipsoidShadowVS + #pragma fragment frag + #pragma fragmentoption ARB_precision_hint_fastest + + #pragma multi_compile_shadowcaster + + #include "../ObiUtils.cginc" + #include "ObiLightingURP.cginc" + #include "../ObiEllipsoids.cginc" + + sampler3D _DitherMaskLOD; + float4 _Color; + + struct vin{ + float4 vertex : POSITION; + float3 corner : NORMAL; + float4 color : COLOR; + float4 t0 : TEXCOORD0; // ellipsoid t1 vector + float4 t1 : TEXCOORD1; // ellipsoid t2 vector + float4 t2 : TEXCOORD2; // ellipsoid t3 vector + }; + + struct v2f { + float4 color : COLOR; + float4 mapping : TEXCOORD0; + float3 viewRay : TEXCOORD1; + float3 lightDir : TEXCOORD2; + float3 a2 : TEXCOORD3; + float3 a3 : TEXCOORD4; + }; + + struct fout + { + half4 color : SV_Target; + float depth : SV_Depth; + }; + + v2f ellipsoidShadowVS( vin v , out float4 outpos : SV_POSITION )// clip space position output + { + float3x3 P, IP; + BuildParameterSpaceMatrices(v.t0,v.t1,v.t2,P,IP); + + float3 worldPos; + float3 view; + float3 eye; + float radius = BuildEllipsoidBillboard(v.vertex,v.corner,P,IP,worldPos,view,eye); + + v2f o; + outpos = mul(UNITY_MATRIX_VP, float4(worldPos,v.vertex.w)); + o.mapping = float4(v.corner.xy,1/length(eye),radius); // A[1] + o.viewRay = mul((float3x3)UNITY_MATRIX_V,view); // A[0] + o.color = v.color * _Color; + + BuildAuxiliaryNormalVectors(v.vertex,worldPos,view,P,IP,o.a2,o.a3); + + o.lightDir = WorldSpaceLightDir(v.vertex); + return o; + } + + fout frag( v2f i ) + { + fout fo; + + float3 p,n; + IntersectEllipsoid(i.viewRay,i.mapping,i.a2,i.a3,p, n); + + // calculate world space position and normal: + float4 wnormal = mul(UNITY_MATRIX_I_V,float4(n,0)); + float4 wpos = mul(UNITY_MATRIX_I_V,float4(p,1)); + + // calculate clip space position. + float4 clipPos = TransformWorldToHClip(ApplyShadowBias(wpos, wnormal, normalize(i.lightDir))); + + #if UNITY_REVERSED_Z + clipPos.z = min(clipPos.z, clipPos.w * UNITY_NEAR_CLIP_VALUE); + #else + clipPos.z = max(clipPos.z, clipPos.w * UNITY_NEAR_CLIP_VALUE); + #endif + + fo.color = clipPos.z/clipPos.w; //similar to what SHADOW_CASTER_FRAGMENT does in case there's no depth buffer. + fo.depth = clipPos.z/clipPos.w; + + // in openGL calculated depth range is <-1,1> map it to <0,1> + #if SHADER_API_OPENGL || SHADER_API_GLCORE || SHADER_API_GLES || SHADER_API_GLES3 + fo.depth = fo.depth*0.5+0.5; + #endif + + return fo; + } + ENDHLSL + + } + + } +} + diff --git a/Assets/Obi/Resources/ObiMaterials/URP/ParticleShaderURP.shader.meta b/Assets/Obi/Resources/ObiMaterials/URP/ParticleShaderURP.shader.meta new file mode 100644 index 000000000..c201e984d --- /dev/null +++ b/Assets/Obi/Resources/ObiMaterials/URP/ParticleShaderURP.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 28641a0edd6e047c6af7e3c6b342c81a +timeCreated: 1438934781 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Resources/ObiMaterials/URP/SimpleParticleShaderURP.shader b/Assets/Obi/Resources/ObiMaterials/URP/SimpleParticleShaderURP.shader new file mode 100644 index 000000000..95d2ee5d8 --- /dev/null +++ b/Assets/Obi/Resources/ObiMaterials/URP/SimpleParticleShaderURP.shader @@ -0,0 +1,145 @@ +Shader "Obi/URP/Simple Particles" { + +Properties { + _Color ("Particle color", Color) = (1,1,1,1) +} + + SubShader { + + Tags{"RenderPipeline" = "UniversalRenderPipeline"} + + Pass { + + Name "ParticleFwdBase" + Tags {"Queue"="Geometry" "IgnoreProjector"="True" "RenderType"="Opaque" "LightMode" = "UniversalForward"} + Blend SrcAlpha OneMinusSrcAlpha + + HLSLPROGRAM + + #pragma prefer_hlslcc gles + #pragma exclude_renderers d3d11_9x + #pragma target 2.0 + + #pragma vertex vert + #pragma fragment frag + #pragma fragmentoption ARB_precision_hint_fastest + + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS_CASCADE + #pragma multi_compile _ _SHADOWS_SOFT + + #include "../ObiUtils.cginc" + #include "ObiLightingURP.cginc" + #include "../ObiParticles.cginc" + + float4 _Color; + float4 _LightColor0; + + struct vin{ + float4 vertex : POSITION; + float3 corner : NORMAL; + float4 color : COLOR; + float4 t0 : TEXCOORD0; // ellipsoid t1 vector + }; + + struct v2f + { + float4 pos : POSITION; + float4 color : COLOR; + float2 texcoord : TEXCOORD0; + float3 lightDir : TEXCOORD1; + }; + + v2f vert(vin v) + { + v2f o; + + // particle positions are passed in world space, no need to use modelview matrix, just view. + float radius = v.t0.w * _RadiusScale; + float4 viewpos = mul(UNITY_MATRIX_V, v.vertex) + float4(v.corner.x, v.corner.y, 0, 0) * radius; // multiply by size. + o.pos = mul(UNITY_MATRIX_P, viewpos); + o.texcoord = float3(v.corner.x*0.5+0.5, v.corner.y*0.5+0.5, radius); + o.color = v.color * _Color; + + o.lightDir = mul ((float3x3)UNITY_MATRIX_MV, ObjSpaceLightDir(v.vertex)); + + return o; + } + + float4 frag(v2f i) : SV_Target + { + // generate sphere normals: + float3 n = BillboardSphereNormals(i.texcoord); + + // simple lighting: ambient + half3 amb = SampleSphereAmbient(n); + + // simple lighting: diffuse + float ndotl = saturate( dot( n, normalize(i.lightDir) ) ); + + // final lit color: + return float4(i.color.rgb * (_LightColor0 * ndotl + amb),i.color.a); + } + + ENDHLSL + + } + + Pass { + Name "ShadowCaster" + Tags { "LightMode" = "ShadowCaster" } + Offset 1, 1 + + Fog {Mode Off} + ZWrite On ZTest LEqual + + HLSLPROGRAM + #pragma prefer_hlslcc gles + #pragma exclude_renderers d3d11_9x + #pragma target 2.0 + + #pragma vertex vert + #pragma fragment frag + #pragma fragmentoption ARB_precision_hint_fastest + + #pragma multi_compile_shadowcaster + + #include "../ObiUtils.cginc" + #include "ObiLightingURP.cginc" + #include "../ObiParticles.cginc" + + struct vin{ + float4 vertex : POSITION; + float3 corner : NORMAL; + float4 t0 : TEXCOORD0; // ellipsoid t1 vector + }; + + struct v2f { + float4 pos : POSITION; + float3 texcoord : TEXCOORD0; + }; + + v2f vert( vin v ) + { + v2f o; + + float radius = v.t0.w * _RadiusScale; + float4 viewpos = mul(UNITY_MATRIX_V, v.vertex) + float4(v.corner.x, v.corner.y, 0, 0) * radius; + o.pos = mul(UNITY_MATRIX_P, viewpos); + o.texcoord = float3(v.corner.x*0.5+0.5, v.corner.y*0.5+0.5, radius); + return o; + } + + float4 frag( v2f i ) : SV_Target + { + float3 n = BillboardSphereNormals(i.texcoord); + + return float4(0,0,0,0); + } + ENDHLSL + + } + + } +} + diff --git a/Assets/Obi/Resources/Compute/ColliderDefinitions.cginc.meta b/Assets/Obi/Resources/ObiMaterials/URP/SimpleParticleShaderURP.shader.meta similarity index 80% rename from Assets/Obi/Resources/Compute/ColliderDefinitions.cginc.meta rename to Assets/Obi/Resources/ObiMaterials/URP/SimpleParticleShaderURP.shader.meta index 469484159..72d99fd08 100644 --- a/Assets/Obi/Resources/Compute/ColliderDefinitions.cginc.meta +++ b/Assets/Obi/Resources/ObiMaterials/URP/SimpleParticleShaderURP.shader.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: fe486a46344cd4c299b4475a4e046796 +guid: a8c46db5ccc10489cba075e7a9172ca6 ShaderImporter: externalObjects: {} defaultTextures: [] diff --git a/Assets/Obi/Resources/ObiMaterials/Common/particle.png b/Assets/Obi/Resources/ObiMaterials/particle.png similarity index 100% rename from Assets/Obi/Resources/ObiMaterials/Common/particle.png rename to Assets/Obi/Resources/ObiMaterials/particle.png diff --git a/Assets/Obi/Resources/ObiMaterials/Common/particle.png.meta b/Assets/Obi/Resources/ObiMaterials/particle.png.meta similarity index 100% rename from Assets/Obi/Resources/ObiMaterials/Common/particle.png.meta rename to Assets/Obi/Resources/ObiMaterials/particle.png.meta diff --git a/Assets/Obi/Samples/Common/SampleResources/Animations/FanHorizontal.anim b/Assets/Obi/Samples/Common/SampleResources/Animations/FanHorizontal.anim deleted file mode 100644 index 589ba23c3..000000000 --- a/Assets/Obi/Samples/Common/SampleResources/Animations/FanHorizontal.anim +++ /dev/null @@ -1,213 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!74 &7400000 -AnimationClip: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: FanHorizontal - serializedVersion: 7 - m_Legacy: 0 - m_Compressed: 0 - m_UseHighQualityCurve: 1 - m_RotationCurves: [] - m_CompressedRotationCurves: [] - m_EulerCurves: [] - m_PositionCurves: - - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: {x: -0.25, y: 0, z: 2} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 4 - value: {x: -0.25, y: 0, z: -5} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - - serializedVersion: 3 - time: 8.016666 - value: {x: -0.25, y: 0, z: 2} - inSlope: {x: 0, y: 0, z: 0} - outSlope: {x: 0, y: 0, z: 0} - tangentMode: 0 - weightedMode: 0 - inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - path: - m_ScaleCurves: [] - m_FloatCurves: [] - m_PPtrCurves: [] - m_SampleRate: 60 - m_WrapMode: 0 - m_Bounds: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 0, y: 0, z: 0} - m_ClipBindingConstant: - genericBindings: - - serializedVersion: 2 - path: 0 - attribute: 1 - script: {fileID: 0} - typeID: 4 - customType: 0 - isPPtrCurve: 0 - isIntCurve: 0 - isSerializeReferenceCurve: 0 - pptrCurveMapping: [] - m_AnimationClipSettings: - serializedVersion: 2 - m_AdditiveReferencePoseClip: {fileID: 0} - m_AdditiveReferencePoseTime: 0 - m_StartTime: 0 - m_StopTime: 8.016666 - m_OrientationOffsetY: 0 - m_Level: 0 - m_CycleOffset: 0 - m_HasAdditiveReferencePose: 0 - m_LoopTime: 1 - m_LoopBlend: 0 - m_LoopBlendOrientation: 0 - m_LoopBlendPositionY: 0 - m_LoopBlendPositionXZ: 0 - m_KeepOriginalOrientation: 0 - m_KeepOriginalPositionY: 1 - m_KeepOriginalPositionXZ: 0 - m_HeightFromFeet: 0 - m_Mirror: 0 - m_EditorCurves: - - serializedVersion: 2 - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: -0.25 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 4 - value: -0.25 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 8.016666 - value: -0.25 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.x - path: - classID: 4 - script: {fileID: 0} - flags: 16 - - serializedVersion: 2 - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 4 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 8.016666 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.y - path: - classID: 4 - script: {fileID: 0} - flags: 16 - - serializedVersion: 2 - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 2 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 4 - value: -5 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - - serializedVersion: 3 - time: 8.016666 - value: 2 - inSlope: 0 - outSlope: 0 - tangentMode: 136 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - attribute: m_LocalPosition.z - path: - classID: 4 - script: {fileID: 0} - flags: 16 - m_EulerEditorCurves: [] - m_HasGenericRootTransform: 1 - m_HasMotionFloatCurves: 0 - m_Events: [] diff --git a/Assets/Obi/Samples/Common/SampleResources/Animations/FanRoot.controller b/Assets/Obi/Samples/Common/SampleResources/Animations/FanRoot.controller deleted file mode 100644 index abdf16d85..000000000 --- a/Assets/Obi/Samples/Common/SampleResources/Animations/FanRoot.controller +++ /dev/null @@ -1,72 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1107 &-2774476986902412069 -AnimatorStateMachine: - serializedVersion: 6 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Base Layer - m_ChildStates: - - serializedVersion: 1 - m_State: {fileID: -1105214364667259717} - m_Position: {x: 250, y: 120, z: 0} - m_ChildStateMachines: [] - m_AnyStateTransitions: [] - m_EntryTransitions: [] - m_StateMachineTransitions: {} - m_StateMachineBehaviours: [] - m_AnyStatePosition: {x: 50, y: 20, z: 0} - m_EntryPosition: {x: 50, y: 120, z: 0} - m_ExitPosition: {x: 800, y: 120, z: 0} - m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} - m_DefaultState: {fileID: -1105214364667259717} ---- !u!1102 &-1105214364667259717 -AnimatorState: - serializedVersion: 6 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: FanHorizontal - m_Speed: 1 - m_CycleOffset: 0 - m_Transitions: [] - m_StateMachineBehaviours: [] - m_Position: {x: 50, y: 50, z: 0} - m_IKOnFeet: 0 - m_WriteDefaultValues: 1 - m_Mirror: 0 - m_SpeedParameterActive: 0 - m_MirrorParameterActive: 0 - m_CycleOffsetParameterActive: 0 - m_TimeParameterActive: 0 - m_Motion: {fileID: 7400000, guid: 8e33f749f1d024f159aa5cae7a502d72, type: 2} - m_Tag: - m_SpeedParameter: - m_MirrorParameter: - m_CycleOffsetParameter: - m_TimeParameter: ---- !u!91 &9100000 -AnimatorController: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: FanRoot - serializedVersion: 5 - m_AnimatorParameters: [] - m_AnimatorLayers: - - serializedVersion: 5 - m_Name: Base Layer - m_StateMachine: {fileID: -2774476986902412069} - m_Mask: {fileID: 0} - m_Motions: [] - m_Behaviours: [] - m_BlendingMode: 0 - m_SyncedLayerIndex: -1 - m_DefaultWeight: 0 - m_IKPass: 0 - m_SyncedLayerAffectsTiming: 0 - m_Controller: {fileID: 9100000} diff --git a/Assets/Obi/Samples/Common/SampleResources/Animations/ThirdPersonAnimatorController.controller b/Assets/Obi/Samples/Common/SampleResources/Animations/ThirdPersonAnimatorController.controller index 2b4b178de..7bf86ec31 100644 --- a/Assets/Obi/Samples/Common/SampleResources/Animations/ThirdPersonAnimatorController.controller +++ b/Assets/Obi/Samples/Common/SampleResources/Animations/ThirdPersonAnimatorController.controller @@ -918,13 +918,13 @@ AnimatorStateMachine: m_ChildStates: - serializedVersion: 1 m_State: {fileID: 110298501} - m_Position: {x: 470, y: 20, z: 0} + m_Position: {x: 590, y: 100, z: 0} - serializedVersion: 1 m_State: {fileID: 110200000} - m_Position: {x: 670, y: -100, z: 0} + m_Position: {x: 440, y: 240, z: 0} - serializedVersion: 1 m_State: {fileID: 110276412} - m_Position: {x: 370, y: -120, z: 0} + m_Position: {x: 440, y: -50, z: 0} m_ChildStateMachines: [] m_AnyStateTransitions: [] m_EntryTransitions: [] diff --git a/Assets/Obi/Samples/Common/SampleResources/CollisionMaterials/HighFriction.asset b/Assets/Obi/Samples/Common/SampleResources/CollisionMaterials/HighFriction.asset index ae997429e..352f070d3 100644 --- a/Assets/Obi/Samples/Common/SampleResources/CollisionMaterials/HighFriction.asset +++ b/Assets/Obi/Samples/Common/SampleResources/CollisionMaterials/HighFriction.asset @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 5b9c84cdb747944209b1c8753933c5db, type: 3} m_Name: HighFriction m_EditorClassIdentifier: - dynamicFriction: 0.5 + dynamicFriction: 1 staticFriction: 0 stickiness: 0 stickDistance: 0 diff --git a/Assets/Obi/Samples/Common/SampleResources/CollisionMaterials/MediumFriction.asset b/Assets/Obi/Samples/Common/SampleResources/CollisionMaterials/MediumFriction.asset index bb418697b..686668d4f 100644 --- a/Assets/Obi/Samples/Common/SampleResources/CollisionMaterials/MediumFriction.asset +++ b/Assets/Obi/Samples/Common/SampleResources/CollisionMaterials/MediumFriction.asset @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 5b9c84cdb747944209b1c8753933c5db, type: 3} m_Name: MediumFriction m_EditorClassIdentifier: - dynamicFriction: 0.1 + dynamicFriction: 0.17 staticFriction: 0 stickiness: 0 stickDistance: 0 diff --git a/Assets/Obi/Samples/Common/SampleResources/CollisionMaterials/RollingFriction.asset b/Assets/Obi/Samples/Common/SampleResources/CollisionMaterials/RollingFriction.asset index d98d3e3ee..7a63fa378 100644 --- a/Assets/Obi/Samples/Common/SampleResources/CollisionMaterials/RollingFriction.asset +++ b/Assets/Obi/Samples/Common/SampleResources/CollisionMaterials/RollingFriction.asset @@ -12,11 +12,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 5b9c84cdb747944209b1c8753933c5db, type: 3} m_Name: RollingFriction m_EditorClassIdentifier: - dynamicFriction: 0.9 + dynamicFriction: 0.7 staticFriction: 0 stickiness: 0 stickDistance: 0 frictionCombine: 0 - stickinessCombine: 1 + stickinessCombine: 3 rollingContacts: 1 - rollingFriction: 0.02 + rollingFriction: 0.2 diff --git a/Assets/Obi/Samples/Common/SampleResources/CollisionMaterials/RollingFrictionSmoke.asset b/Assets/Obi/Samples/Common/SampleResources/CollisionMaterials/RollingFrictionSmoke.asset deleted file mode 100644 index f9aa1c397..000000000 --- a/Assets/Obi/Samples/Common/SampleResources/CollisionMaterials/RollingFrictionSmoke.asset +++ /dev/null @@ -1,22 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5b9c84cdb747944209b1c8753933c5db, type: 3} - m_Name: RollingFrictionSmoke - m_EditorClassIdentifier: - dynamicFriction: 0.1 - staticFriction: 0 - stickiness: 0 - stickDistance: 0 - frictionCombine: 0 - stickinessCombine: 3 - rollingContacts: 1 - rollingFriction: 0.01 diff --git a/Assets/Obi/Samples/Common/SampleResources/CollisionMaterials/VerySticky.asset b/Assets/Obi/Samples/Common/SampleResources/CollisionMaterials/VerySticky.asset index dddae90c4..8a9681338 100644 --- a/Assets/Obi/Samples/Common/SampleResources/CollisionMaterials/VerySticky.asset +++ b/Assets/Obi/Samples/Common/SampleResources/CollisionMaterials/VerySticky.asset @@ -12,10 +12,10 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 5b9c84cdb747944209b1c8753933c5db, type: 3} m_Name: VerySticky m_EditorClassIdentifier: - dynamicFriction: 0.3 + dynamicFriction: 0.2 staticFriction: 0 - stickiness: 0.16 - stickDistance: 0.025 + stickiness: 0.2 + stickDistance: 0.03 frictionCombine: 3 stickinessCombine: 3 rollingContacts: 0 diff --git a/Assets/Obi/Samples/Common/SampleResources/Materials/Checker.mat b/Assets/Obi/Samples/Common/SampleResources/Materials/Checker.mat index e2aefe395..9d6caa40d 100644 --- a/Assets/Obi/Samples/Common/SampleResources/Materials/Checker.mat +++ b/Assets/Obi/Samples/Common/SampleResources/Materials/Checker.mat @@ -1,18 +1,5 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: ---- !u!114 &-6423271243515826522 -MonoBehaviour: - m_ObjectHideFlags: 11 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} - m_Name: - m_EditorClassIdentifier: - version: 5 --- !u!21 &2100000 Material: serializedVersion: 8 @@ -37,12 +24,8 @@ Material: m_SavedProperties: serializedVersion: 3 m_TexEnvs: - - _BaseMap: - m_Texture: {fileID: 2800000, guid: 8fbd9c5f957b8434883cdfce9d6a3c27, type: 3} - m_Scale: {x: 5, y: 5} - m_Offset: {x: 0, y: 0} - _BumpMap: - m_Texture: {fileID: 0} + m_Texture: {fileID: 2800000, guid: 176574918b29445148929eb9a46c70ef, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _DetailAlbedoMap: @@ -59,11 +42,11 @@ Material: m_Offset: {x: 0, y: 0} - _EmissionMap: m_Texture: {fileID: 0} - m_Scale: {x: 5, y: 5} + m_Scale: {x: 40, y: 40} m_Offset: {x: 0, y: 0} - _MainTex: m_Texture: {fileID: 2800000, guid: 8fbd9c5f957b8434883cdfce9d6a3c27, type: 3} - m_Scale: {x: 5, y: 5} + m_Scale: {x: 40, y: 40} m_Offset: {x: 0, y: 0} - _MetallicGlossMap: m_Texture: {fileID: 0} @@ -77,36 +60,13 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - _SpecGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_Lightmaps: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_LightmapsInd: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_ShadowMasks: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} m_Ints: [] m_Floats: - - _AlphaClip: 0 - - _Blend: 0 - _BumpScale: 1 - - _ClearCoatMask: 0 - - _ClearCoatSmoothness: 0 - - _Cull: 2 - _Cutoff: 0.5 - - _DetailAlbedoMapScale: 1 - _DetailNormalMapScale: 1 - _DstBlend: 0 - _EmissionScaleUI: 0 - - _EnvironmentReflections: 1 - _GlossMapScale: 1 - _Glossiness: 0.3 - _GlossyReflections: 1 @@ -114,21 +74,14 @@ Material: - _Mode: 0 - _OcclusionStrength: 1 - _Parallax: 0.02 - - _QueueOffset: 0 - - _ReceiveShadows: 1 - - _Smoothness: 0.5 - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 - _SrcBlend: 1 - - _Surface: 0 - _UVSec: 0 - - _WorkflowMode: 1 - _ZWrite: 1 m_Colors: - - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _Color: {r: 1, g: 1, b: 1, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 0} - _EmissionColorUI: {r: 1, g: 1, b: 1, a: 1} - - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} m_BuildTextureStacks: [] m_AllowLocking: 1 diff --git a/Assets/Obi/Samples/Common/SampleResources/Materials/CoarseChecker.mat b/Assets/Obi/Samples/Common/SampleResources/Materials/CoarseChecker.mat index ef95fa00a..a5a18fa72 100644 --- a/Assets/Obi/Samples/Common/SampleResources/Materials/CoarseChecker.mat +++ b/Assets/Obi/Samples/Common/SampleResources/Materials/CoarseChecker.mat @@ -67,28 +67,13 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - unity_Lightmaps: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_LightmapsInd: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_ShadowMasks: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} m_Ints: [] m_Floats: - _AlphaClip: 0 - _Blend: 0 - _BumpScale: 1 - - _ClearCoatMask: 0 - - _ClearCoatSmoothness: 0 - _Cull: 2 - _Cutoff: 0.5 - - _DetailAlbedoMapScale: 1 - _DetailNormalMapScale: 1 - _DstBlend: 0 - _EmissionScaleUI: 0 @@ -102,7 +87,6 @@ Material: - _OcclusionStrength: 1 - _Parallax: 0.02 - _QueueOffset: 0 - - _RadiusScale: 1 - _ReceiveShadows: 1 - _SampleGI: 0 - _Shininess: 0 @@ -136,4 +120,4 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 5 + version: 2 diff --git a/Assets/Obi/Samples/Common/SampleResources/Materials/Metal.mat b/Assets/Obi/Samples/Common/SampleResources/Materials/Metal.mat index 337a2a7e4..ec7c878ad 100644 --- a/Assets/Obi/Samples/Common/SampleResources/Materials/Metal.mat +++ b/Assets/Obi/Samples/Common/SampleResources/Materials/Metal.mat @@ -68,7 +68,7 @@ Material: - _DstBlend: 0 - _EmissionScaleUI: 0 - _GlossMapScale: 1 - - _Glossiness: 0.7 + - _Glossiness: 0.6 - _GlossyReflections: 1 - _Metallic: 1 - _Mode: 0 @@ -80,7 +80,7 @@ Material: - _UVSec: 0 - _ZWrite: 1 m_Colors: - - _Color: {r: 0.6, g: 0.6, b: 0.6, a: 1} + - _Color: {r: 0.4705882, g: 0.4705882, b: 0.4705882, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _EmissionColorUI: {r: 1, g: 1, b: 1, a: 1} m_BuildTextureStacks: [] diff --git a/Assets/Obi/Samples/Common/SampleResources/Models/Fan.fbx b/Assets/Obi/Samples/Common/SampleResources/Models/Fan.fbx deleted file mode 100644 index 77ab5dd52..000000000 Binary files a/Assets/Obi/Samples/Common/SampleResources/Models/Fan.fbx and /dev/null differ diff --git a/Assets/Obi/Samples/Common/SampleResources/Models/Fan.fbx.meta b/Assets/Obi/Samples/Common/SampleResources/Models/Fan.fbx.meta deleted file mode 100644 index cd9a62c9d..000000000 --- a/Assets/Obi/Samples/Common/SampleResources/Models/Fan.fbx.meta +++ /dev/null @@ -1,171 +0,0 @@ -fileFormatVersion: 2 -guid: 89e24673c05344d179c516868eb341b8 -ModelImporter: - serializedVersion: 21202 - internalIDToNameTable: - - first: - 1: 100000 - second: //RootNode - - first: - 1: 100002 - second: pCube2 - - first: - 1: 100004 - second: pCube3 - - first: - 1: 100006 - second: pCube4 - - first: - 1: 100008 - second: pCylinder1 - - first: - 4: 400000 - second: //RootNode - - first: - 4: 400002 - second: pCube2 - - first: - 4: 400004 - second: pCube3 - - first: - 4: 400006 - second: pCube4 - - first: - 4: 400008 - second: pCylinder1 - - first: - 23: 2300000 - second: pCube2 - - first: - 23: 2300002 - second: pCube3 - - first: - 23: 2300004 - second: pCube4 - - first: - 23: 2300006 - second: pCylinder1 - - first: - 33: 3300000 - second: pCube2 - - first: - 33: 3300002 - second: pCube3 - - first: - 33: 3300004 - second: pCube4 - - first: - 33: 3300006 - second: pCylinder1 - - first: - 43: 4300000 - second: pCylinder1 - - first: - 43: 4300002 - second: pCube2 - - first: - 43: 4300004 - second: pCube3 - - first: - 43: 4300006 - second: pCube4 - externalObjects: {} - materials: - materialImportMode: 0 - materialName: 0 - materialSearch: 1 - materialLocation: 0 - animations: - legacyGenerateAnimations: 4 - bakeSimulation: 0 - resampleCurves: 1 - optimizeGameObjects: 0 - removeConstantScaleCurves: 0 - motionNodeName: - rigImportErrors: - rigImportWarnings: - animationImportErrors: - animationImportWarnings: - animationRetargetingWarnings: - animationDoRetargetingWarnings: 0 - importAnimatedCustomProperties: 0 - importConstraints: 0 - animationCompression: 1 - animationRotationError: 0.5 - animationPositionError: 0.5 - animationScaleError: 0.5 - animationWrapMode: 0 - extraExposedTransformPaths: [] - extraUserProperties: [] - clipAnimations: [] - isReadable: 1 - meshes: - lODScreenPercentages: [] - globalScale: 40 - meshCompression: 0 - addColliders: 0 - useSRGBMaterialColor: 1 - sortHierarchyByName: 1 - importVisibility: 0 - importBlendShapes: 1 - importCameras: 0 - importLights: 0 - nodeNameCollisionStrategy: 0 - fileIdsGeneration: 1 - swapUVChannels: 0 - generateSecondaryUV: 0 - useFileUnits: 1 - keepQuads: 0 - weldVertices: 1 - bakeAxisConversion: 0 - preserveHierarchy: 0 - skinWeightsMode: 0 - maxBonesPerVertex: 4 - minBoneWeight: 0.001 - optimizeBones: 1 - meshOptimizationFlags: -1 - indexFormat: 1 - secondaryUVAngleDistortion: 8 - secondaryUVAreaDistortion: 15.000001 - secondaryUVHardAngle: 88 - secondaryUVMarginMethod: 0 - secondaryUVMinLightmapResolution: 40 - secondaryUVMinObjectScale: 1 - secondaryUVPackMargin: 4 - useFileScale: 1 - tangentSpace: - normalSmoothAngle: 60 - normalImportMode: 0 - tangentImportMode: 3 - normalCalculationMode: 0 - legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 1 - blendShapeNormalImportMode: 1 - normalSmoothingSource: 0 - referencedClips: [] - importAnimation: 1 - humanDescription: - serializedVersion: 3 - human: [] - skeleton: [] - armTwist: 0.5 - foreArmTwist: 0.5 - upperLegTwist: 0.5 - legTwist: 0.5 - armStretch: 0.05 - legStretch: 0.05 - feetSpacing: 0 - globalScale: 40 - rootMotionBoneName: - hasTranslationDoF: 0 - hasExtraRoot: 0 - skeletonHasParents: 1 - lastHumanDescriptionAvatarSource: {instanceID: 0} - autoGenerateAvatarMappingIfUnspecified: 1 - animationType: 0 - humanoidOversampling: 1 - avatarSetup: 0 - addHumanoidExtraRootOnlyWhenUsingAvatar: 0 - additionalBone: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Samples/Common/SampleResources/Models/TestEnvironment.fbx.meta b/Assets/Obi/Samples/Common/SampleResources/Models/TestEnvironment.fbx.meta index 68499baea..45c3b5676 100644 --- a/Assets/Obi/Samples/Common/SampleResources/Models/TestEnvironment.fbx.meta +++ b/Assets/Obi/Samples/Common/SampleResources/Models/TestEnvironment.fbx.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 guid: 64df75de10b494f109b074d28a8eade0 ModelImporter: - serializedVersion: 21202 + serializedVersion: 26 internalIDToNameTable: - first: 1: 100000 @@ -20,7 +20,7 @@ ModelImporter: second: pCube1 externalObjects: {} materials: - materialImportMode: 0 + importMaterials: 0 materialName: 0 materialSearch: 1 materialLocation: 0 @@ -29,7 +29,6 @@ ModelImporter: bakeSimulation: 0 resampleCurves: 1 optimizeGameObjects: 0 - removeConstantScaleCurves: 0 motionNodeName: rigImportErrors: rigImportWarnings: @@ -59,27 +58,20 @@ ModelImporter: importBlendShapes: 1 importCameras: 0 importLights: 0 - nodeNameCollisionStrategy: 0 - fileIdsGeneration: 1 swapUVChannels: 0 generateSecondaryUV: 0 useFileUnits: 1 keepQuads: 0 weldVertices: 1 - bakeAxisConversion: 0 preserveHierarchy: 0 skinWeightsMode: 0 maxBonesPerVertex: 4 minBoneWeight: 0.001 - optimizeBones: 1 meshOptimizationFlags: -1 indexFormat: 1 secondaryUVAngleDistortion: 8 secondaryUVAreaDistortion: 15.000001 secondaryUVHardAngle: 88 - secondaryUVMarginMethod: 0 - secondaryUVMinLightmapResolution: 40 - secondaryUVMinObjectScale: 1 secondaryUVPackMargin: 4 useFileScale: 1 tangentSpace: @@ -92,6 +84,7 @@ ModelImporter: normalSmoothingSource: 0 referencedClips: [] importAnimation: 1 + copyAvatar: 0 humanDescription: serializedVersion: 3 human: [] @@ -109,11 +102,8 @@ ModelImporter: hasExtraRoot: 0 skeletonHasParents: 1 lastHumanDescriptionAvatarSource: {instanceID: 0} - autoGenerateAvatarMappingIfUnspecified: 1 animationType: 0 humanoidOversampling: 1 - avatarSetup: 0 - addHumanoidExtraRootOnlyWhenUsingAvatar: 0 additionalBone: 0 userData: assetBundleName: diff --git a/Assets/Obi/Samples/Common/SampleResources/Scripts/ActorActorCollisionDetector.cs b/Assets/Obi/Samples/Common/SampleResources/Scripts/ActorActorCollisionDetector.cs deleted file mode 100644 index db2ef153a..000000000 --- a/Assets/Obi/Samples/Common/SampleResources/Scripts/ActorActorCollisionDetector.cs +++ /dev/null @@ -1,69 +0,0 @@ -using UnityEngine; -using UnityEngine.Events; - -namespace Obi.Samples -{ - [RequireComponent(typeof(ObiSolver))] - public class ActorActorCollisionDetector : MonoBehaviour - { - public struct ActorPair - { - public readonly ObiActor actorA; - public readonly ObiActor actorB; - public int particleA; - public int particleB; - - public ActorPair(ObiActor actorA, ObiActor actorB, int particleA, int particleB) - { - this.actorA = actorA; - this.actorB = actorB; - this.particleA = particleA; - this.particleB = particleB; - } - } - - public UnityEvent callback; - ObiSolver solver; - - void OnEnable() - { - solver = GetComponent(); - solver.OnParticleCollision += Solver_OnCollision; - } - - void OnDisable() - { - solver.OnParticleCollision -= Solver_OnCollision; - } - - void Solver_OnCollision(object sender, ObiNativeContactList e) - { - if (!solver.initialized || callback == null) return; - - // just iterate over all contacts in the current frame: - foreach (Oni.Contact contact in e) - { - // if this one is an actual collision: - if (contact.distance < 0.01) - { - // get the index of the first entry in the simplices array for both bodies: - int startA = solver.simplexCounts.GetSimplexStartAndSize(contact.bodyA, out _); - int startB = solver.simplexCounts.GetSimplexStartAndSize(contact.bodyB, out _); - - // retrieve the index of both particles from the simplices array: - int particleA = solver.simplices[startA]; - int particleB = solver.simplices[startB]; - - // retrieve info about both actors involved in the collision: - var particleInActorA = solver.particleToActor[particleA]; - var particleInActorB = solver.particleToActor[particleB]; - - // if they're not the same actor, trigger a callback: - if (particleInActorA != null && particleInActorB != null && particleInActorA.actor != particleInActorB.actor) - callback.Invoke(new ActorPair(particleInActorA.actor, particleInActorB.actor, particleA, particleB)); - } - } - } - - } -} diff --git a/Assets/Obi/Samples/Common/SampleResources/Scripts/ActorActorCollisionDetector.cs.meta b/Assets/Obi/Samples/Common/SampleResources/Scripts/ActorActorCollisionDetector.cs.meta deleted file mode 100644 index d036a2d12..000000000 --- a/Assets/Obi/Samples/Common/SampleResources/Scripts/ActorActorCollisionDetector.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a5a3cc3afb7a14486848b022c300ea32 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Samples/Common/SampleResources/Scripts/ActorBlinker.cs b/Assets/Obi/Samples/Common/SampleResources/Scripts/ActorBlinker.cs deleted file mode 100644 index ec64776aa..000000000 --- a/Assets/Obi/Samples/Common/SampleResources/Scripts/ActorBlinker.cs +++ /dev/null @@ -1,32 +0,0 @@ -using UnityEngine; -using Obi; - -namespace Obi.Samples -{ - [RequireComponent(typeof(ObiActor))] - public class ActorBlinker : MonoBehaviour - { - public Color neutralColor = Color.white; - public Color highlightColor = Color.red; - private ObiActor actor; - - void Awake() - { - actor = GetComponent(); - } - - public void Blink(int particleIndex) - { - if (actor.solver != null) - actor.solver.colors[particleIndex] = highlightColor; - } - - void LateUpdate() - { - if (actor.solver != null) - for (int i = 0; i < actor.activeParticleCount; ++i) - actor.solver.colors[actor.solverIndices[i]] += (neutralColor - actor.solver.colors[actor.solverIndices[i]]) * Time.deltaTime * 5; - } - - } -} \ No newline at end of file diff --git a/Assets/Obi/Samples/Common/SampleResources/Scripts/ActorBlinker.cs.meta b/Assets/Obi/Samples/Common/SampleResources/Scripts/ActorBlinker.cs.meta deleted file mode 100644 index 95fad905d..000000000 --- a/Assets/Obi/Samples/Common/SampleResources/Scripts/ActorBlinker.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: fbbc507232dcc4cb1ae27d9474ddbe70 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Samples/Common/SampleResources/Scripts/ActorCOMTransform.cs b/Assets/Obi/Samples/Common/SampleResources/Scripts/ActorCOMTransform.cs index 018a320c4..051482236 100644 --- a/Assets/Obi/Samples/Common/SampleResources/Scripts/ActorCOMTransform.cs +++ b/Assets/Obi/Samples/Common/SampleResources/Scripts/ActorCOMTransform.cs @@ -1,23 +1,21 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; +using Obi; -namespace Obi.Samples +public class ActorCOMTransform : MonoBehaviour { - public class ActorCOMTransform : MonoBehaviour + + public Vector3 offset; + public ObiActor actor; + + public void Update() { - - public Vector3 offset; - public ObiActor actor; - - public void Update() + if (actor != null && actor.isLoaded) { - if (actor != null && actor.isLoaded) - { - Vector3 com; - actor.GetMass(out com); - transform.position = actor.solver.transform.TransformPoint(com) + offset; - } + Vector3 com; + actor.GetMass(out com); + transform.position = actor.solver.transform.TransformPoint(com) + offset; } } } diff --git a/Assets/Obi/Samples/Common/SampleResources/Scripts/ActorSpawner.cs b/Assets/Obi/Samples/Common/SampleResources/Scripts/ActorSpawner.cs index 609290646..5afb457fd 100644 --- a/Assets/Obi/Samples/Common/SampleResources/Scripts/ActorSpawner.cs +++ b/Assets/Obi/Samples/Common/SampleResources/Scripts/ActorSpawner.cs @@ -1,33 +1,35 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; +using Obi; -namespace Obi.Samples -{ - public class ActorSpawner : MonoBehaviour - { +public class ActorSpawner : MonoBehaviour { - public ObiActor template; + public ObiActor template; - public int maxInstances = 32; - public float spawnDelay = 0.3f; + public int basePhase = 2; + public int maxInstances = 32; + public float spawnDelay = 0.3f; - private int instances = 0; - private float timeFromLastSpawn = 0; + private int phase = 0; + private int instances = 0; + private float timeFromLastSpawn = 0; + + // Update is called once per frame + void Update () { - // Update is called once per frame - void Update() - { + timeFromLastSpawn += Time.deltaTime; - timeFromLastSpawn += Time.deltaTime; + if (Input.GetMouseButtonDown(0) && instances < maxInstances && timeFromLastSpawn > spawnDelay) + { + GameObject go = Instantiate(template.gameObject,transform.position,Quaternion.identity); + go.transform.SetParent(transform.parent); - if (Input.GetMouseButtonDown(0) && instances < maxInstances && timeFromLastSpawn > spawnDelay) - { - GameObject go = Instantiate(template.gameObject, transform.position, Quaternion.identity); - go.transform.SetParent(transform.parent); - instances++; - timeFromLastSpawn = 0; - } - } - } -} \ No newline at end of file + go.GetComponent().SetFilterCategory(basePhase + phase); + + phase++; + instances++; + timeFromLastSpawn = 0; + } + } +} diff --git a/Assets/Obi/Samples/Common/SampleResources/Scripts/AddRandomVelocity.cs b/Assets/Obi/Samples/Common/SampleResources/Scripts/AddRandomVelocity.cs index 72fbe5837..9a1f94717 100644 --- a/Assets/Obi/Samples/Common/SampleResources/Scripts/AddRandomVelocity.cs +++ b/Assets/Obi/Samples/Common/SampleResources/Scripts/AddRandomVelocity.cs @@ -1,21 +1,16 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; +using Obi; -namespace Obi.Samples -{ - [RequireComponent(typeof(ObiActor))] - public class AddRandomVelocity : MonoBehaviour - { +[RequireComponent(typeof(ObiActor))] +public class AddRandomVelocity : MonoBehaviour { - public float intensity = 5; - - void Update() - { - if (Input.GetKeyDown(KeyCode.Space)) - { - GetComponent().AddForce(UnityEngine.Random.onUnitSphere * intensity, ForceMode.VelocityChange); - } - } - } + public float intensity = 5; + + void Update () { + if (Input.GetKeyDown(KeyCode.Space)){ + GetComponent().AddForce(UnityEngine.Random.onUnitSphere*intensity,ForceMode.VelocityChange); + } + } } diff --git a/Assets/Obi/Samples/Common/SampleResources/Scripts/Blinker.cs b/Assets/Obi/Samples/Common/SampleResources/Scripts/Blinker.cs index b8fcd917f..897374084 100644 --- a/Assets/Obi/Samples/Common/SampleResources/Scripts/Blinker.cs +++ b/Assets/Obi/Samples/Common/SampleResources/Scripts/Blinker.cs @@ -1,30 +1,23 @@ using UnityEngine; -namespace Obi.Samples -{ - public class Blinker : MonoBehaviour - { +public class Blinker : MonoBehaviour { - public Color highlightColor; + public Color highlightColor; - private Renderer rend; - private Color original; + private Renderer rend; + private Color original; - void Awake() - { - rend = GetComponent(); - original = rend.material.color; - } + void Awake(){ + rend = GetComponent(); + original = rend.material.color; + } - public void Blink() - { - rend.material.color = highlightColor; - } + public void Blink(){ + rend.material.color = highlightColor; + } - void LateUpdate() - { - rend.material.color += (original - rend.material.color) * Time.deltaTime * 5; - } + void LateUpdate(){ + rend.material.color += (original - rend.material.color)*Time.deltaTime*5; + } - } -} \ No newline at end of file +} diff --git a/Assets/Obi/Samples/Common/SampleResources/Scripts/CharacterController/SampleCharacterController.cs b/Assets/Obi/Samples/Common/SampleResources/Scripts/CharacterController/SampleCharacterController.cs index 93c6fb00e..6d76046ea 100644 --- a/Assets/Obi/Samples/Common/SampleResources/Scripts/CharacterController/SampleCharacterController.cs +++ b/Assets/Obi/Samples/Common/SampleResources/Scripts/CharacterController/SampleCharacterController.cs @@ -33,7 +33,7 @@ namespace Obi{ } - private void Update() + private void FixedUpdate() { if (!m_Jump) { diff --git a/Assets/Obi/Samples/Common/SampleResources/Scripts/ColliderHighlighter.cs b/Assets/Obi/Samples/Common/SampleResources/Scripts/ColliderHighlighter.cs index b53a0f8b5..42b38487e 100644 --- a/Assets/Obi/Samples/Common/SampleResources/Scripts/ColliderHighlighter.cs +++ b/Assets/Obi/Samples/Common/SampleResources/Scripts/ColliderHighlighter.cs @@ -1,51 +1,48 @@ using UnityEngine; +using System.Collections; +using System.Collections.Generic; +using Obi; -namespace Obi.Samples -{ - [RequireComponent(typeof(ObiSolver))] - public class ColliderHighlighter : MonoBehaviour - { +[RequireComponent(typeof(ObiSolver))] +public class ColliderHighlighter : MonoBehaviour { - ObiSolver solver; + ObiSolver solver; - void Awake() - { - solver = GetComponent(); - } + void Awake(){ + solver = GetComponent(); + } - void OnEnable() - { - solver.OnCollision += Solver_OnCollision; - } + void OnEnable () { + solver.OnCollision += Solver_OnCollision; + } - void OnDisable() - { - solver.OnCollision -= Solver_OnCollision; - } + void OnDisable(){ + solver.OnCollision -= Solver_OnCollision; + } + + void Solver_OnCollision (object sender, Obi.ObiSolver.ObiCollisionEventArgs e) + { + var colliderWorld = ObiColliderWorld.GetInstance(); - void Solver_OnCollision(object sender, ObiNativeContactList e) - { - var colliderWorld = ObiColliderWorld.GetInstance(); + Oni.Contact[] contacts = e.contacts.Data; + for(int i = 0; i < e.contacts.Count; ++i) + { + Oni.Contact c = contacts[i]; + // make sure this is an actual contact: + if (c.distance < 0.01f) + { + // get the collider: + var col = colliderWorld.colliderHandles[c.bodyB].owner; - for (int i = 0; i < e.count; ++i) - { - Oni.Contact c = e[i]; - // make sure this is an actual contact: - if (c.distance < 0.01f) + if (col != null) { - // get the collider: - var col = colliderWorld.colliderHandles[c.bodyB].owner; - - if (col != null) - { - // make it blink: - Blinker blinker = col.GetComponent(); - - if (blinker) - blinker.Blink(); - } - } - } - } - } + // make it blink: + Blinker blinker = col.GetComponent(); + + if (blinker) + blinker.Blink(); + } + } + } + } } diff --git a/Assets/Obi/Samples/Common/SampleResources/Scripts/CollisionEventHandler.cs b/Assets/Obi/Samples/Common/SampleResources/Scripts/CollisionEventHandler.cs index 2db887399..fe6749dc5 100644 --- a/Assets/Obi/Samples/Common/SampleResources/Scripts/CollisionEventHandler.cs +++ b/Assets/Obi/Samples/Common/SampleResources/Scripts/CollisionEventHandler.cs @@ -1,97 +1,184 @@ using UnityEngine; using System.Collections; using System.Collections.Generic; +using Obi; -namespace Obi.Samples +[RequireComponent(typeof(ObiSolver))] +public class CollisionEventHandler : MonoBehaviour { - [RequireComponent(typeof(ObiSolver))] - public class CollisionEventHandler : MonoBehaviour + + ObiSolver solver; + public int contactCount; + + Obi.ObiSolver.ObiCollisionEventArgs frame; + + void Awake() { + solver = GetComponent(); + } - ObiSolver solver; - public int contactCount; + void OnEnable() + { + solver.OnParticleCollision += Solver_OnCollision; + } - ObiNativeContactList frame; + void OnDisable() + { + solver.OnParticleCollision -= Solver_OnCollision; + } - void Awake() + void Solver_OnCollision(object sender, Obi.ObiSolver.ObiCollisionEventArgs e) + { + frame = e; + } + + void OnDrawGizmos() + { + if (solver == null || frame == null || frame.contacts == null) return; + + Gizmos.matrix = solver.transform.localToWorldMatrix; + + contactCount = frame.contacts.Count; + + /*for (int i = 0; i < frame.contacts.Count; ++i) { - solver = GetComponent(); - } + var contact = frame.contacts.Data[i]; - void OnEnable() + //if (contact.distance > 0.001f) continue; + + Gizmos.color = (contact.distance <= 0) ? Color.red : Color.green; + + //Gizmos.color = new Color(((i * 100) % 255) / 255.0f, ((i * 50) % 255) / 255.0f, ((i * 20) % 255) / 255.0f); + + Vector3 point = frame.contacts.Data[i].pointB; + + Gizmos.DrawSphere(point, 0.01f); + + Gizmos.DrawRay(point, contact.normal * contact.distance); + + Gizmos.color = Color.cyan; + Gizmos.DrawRay(point, contact.tangent * contact.tangentImpulse + contact.bitangent * contact.bitangentImpulse); + + }*/ + + for (int i = 0; i < frame.contacts.Count; ++i) { - solver.OnCollision += Solver_OnCollision; - } + var contact = frame.contacts.Data[i]; - void OnDisable() - { - solver.OnCollision -= Solver_OnCollision; - } + //if (contact.distance > 0.001f) continue; - void Solver_OnCollision(object sender, ObiNativeContactList e) - { - frame = e; - } + Gizmos.color = (contact.distance <= 0) ? Color.red : Color.green; - void OnDrawGizmos() - { - if (solver == null || frame == null) return; + //Gizmos.color = new Color(((i * 100) % 255) / 255.0f, ((i * 50) % 255) / 255.0f, ((i * 20) % 255) / 255.0f); - Gizmos.matrix = solver.transform.localToWorldMatrix; + Vector3 point = Vector3.zero;//frame.contacts.Data[i].point; - contactCount = frame.count; + int simplexStart = solver.simplexCounts.GetSimplexStartAndSize(contact.bodyB, out int simplexSize); - for (int i = 0; i < frame.count; ++i) + float radius = 0; + for (int j = 0; j < simplexSize; ++j) { - var contact = frame[i]; - - //if (contact.distance > 0.001f) continue; - - Gizmos.color = (contact.distance <= 0) ? Color.red : Color.green; - - //Gizmos.color = new Color(((i * 100) % 255) / 255.0f, ((i * 50) % 255) / 255.0f, ((i * 20) % 255) / 255.0f); - - Vector3 point = frame[i].pointB; - - Gizmos.DrawSphere(point, 0.01f); - - Gizmos.DrawRay(point, contact.normal * contact.distance); - - Gizmos.color = Color.cyan; - //Gizmos.DrawRay(point, contact.tangent * contact.tangentImpulse + contact.bitangent * contact.bitangentImpulse); - + point += (Vector3)solver.positions[solver.simplices[simplexStart + j]] * contact.pointB[j]; + radius += solver.principalRadii[solver.simplices[simplexStart + j]].x * contact.pointB[j]; } - /*for (int i = 0; i < frame.count; ++i) - { - var contact = frame[i]; + Vector3 normal = contact.normal; - //if (contact.distance > 0.001f) continue; + //Gizmos.DrawSphere(point + normal.normalized * frame.contacts[i].distance, 0.01f); - Gizmos.color = (contact.distance <= 0) ? Color.red : Color.green; + Gizmos.DrawSphere(point + normal * radius, 0.01f); - //Gizmos.color = new Color(((i * 100) % 255) / 255.0f, ((i * 50) % 255) / 255.0f, ((i * 20) % 255) / 255.0f); - - Vector3 point = Vector3.zero;//frame.contacts.Data[i].point; - - int simplexStart = solver.simplexCounts.GetSimplexStartAndSize(contact.bodyB, out int simplexSize); - - float radius = 0; - for (int j = 0; j < simplexSize; ++j) - { - point += (Vector3)solver.positions[solver.simplices[simplexStart + j]] * contact.pointB[j]; - radius += solver.principalRadii[solver.simplices[simplexStart + j]].x * contact.pointB[j]; - } - - Vector3 normal = contact.normal; - - //Gizmos.DrawSphere(point + normal.normalized * frame.contacts[i].distance, 0.01f); - - Gizmos.DrawSphere(point + normal * radius, 0.01f); - - Gizmos.DrawRay(point + normal * radius, normal.normalized * contact.distance); - }*/ + Gizmos.DrawRay(point + normal * radius, normal.normalized * contact.distance); } - } + } + +/* +[RequireComponent(typeof(ObiSolver))] +public class CollisionEventHandler : MonoBehaviour { + + ObiSolver solver; + public int counter = 0; + public Collider targetCollider = null; + + HashSet particles = new HashSet(); + + void Awake(){ + solver = GetComponent(); + } + + void OnEnable () { + solver.OnCollision += Solver_OnCollision; + } + + void OnDisable(){ + solver.OnCollision -= Solver_OnCollision; + } + + void Solver_OnCollision (object sender, Obi.ObiSolver.ObiCollisionEventArgs e) + { + HashSet currentParticles = new HashSet(); + + for(int i = 0; i < e.contacts.Count; ++i) + { + if (e.contacts.Data[i].distance < 0.001f) + { + + Component collider; + if (ObiCollider.idToCollider.TryGetValue(e.contacts.Data[i].other,out collider)){ + + if (collider == targetCollider) + currentParticles.Add(e.contacts.Data[i].particle); + + } + } + } + + particles.ExceptWith(currentParticles); + counter += particles.Count; + particles = currentParticles; + } + +} +*/ + +/*[RequireComponent(typeof(ObiSolver))] +public class CollisionEventHandler : MonoBehaviour { + + ObiSolver solver; + public Collider targetCollider = null; + + void Awake(){ + solver = GetComponent(); + } + + void OnEnable () { + solver.OnCollision += Solver_OnCollision; + } + + void OnDisable(){ + solver.OnCollision -= Solver_OnCollision; + } + + void Solver_OnCollision (object sender, Obi.ObiSolver.ObiCollisionEventArgs e) + { + + for(int i = 0; i < e.contacts.Count; ++i) + { + if (e.contacts.Data[i].distance < 0.001f) + { + Component collider; + if (ObiCollider.idToCollider.TryGetValue(e.contacts.Data[i].other,out collider)){ + + if (collider == targetCollider) + + solver.viscosities[e.contacts.Data[i].particle] = Mathf.Max(0,solver.viscosities[e.contacts.Data[i].particle] - 0.1f * Time.fixedDeltaTime); + + } + } + } + + } + +}*/ diff --git a/Assets/Obi/Samples/Common/SampleResources/Scripts/ColorFromPhase.cs b/Assets/Obi/Samples/Common/SampleResources/Scripts/ColorFromPhase.cs index 5fcfe1c98..af3d4df10 100644 --- a/Assets/Obi/Samples/Common/SampleResources/Scripts/ColorFromPhase.cs +++ b/Assets/Obi/Samples/Common/SampleResources/Scripts/ColorFromPhase.cs @@ -3,7 +3,7 @@ using System; using System.Collections; using System.Collections.Generic; -namespace Obi.Samples +namespace Obi { /** * Sample script that colors fluid particles based on their vorticity (2D only) @@ -22,7 +22,7 @@ namespace Obi.Samples if (!isActiveAndEnabled || actor.solver == null) return; - for (int i = 0; i < actor.solverIndices.count; ++i) + for (int i = 0; i < actor.solverIndices.Length; ++i) { int k = actor.solverIndices[i]; diff --git a/Assets/Obi/Samples/Common/SampleResources/Scripts/ColorFromVelocity.cs b/Assets/Obi/Samples/Common/SampleResources/Scripts/ColorFromVelocity.cs index a1cf04c61..3c1d5552f 100644 --- a/Assets/Obi/Samples/Common/SampleResources/Scripts/ColorFromVelocity.cs +++ b/Assets/Obi/Samples/Common/SampleResources/Scripts/ColorFromVelocity.cs @@ -3,7 +3,7 @@ using System; using System.Collections; using System.Collections.Generic; -namespace Obi.Samples +namespace Obi { /** * Sample script that colors fluid particles based on their vorticity (2D only) @@ -25,7 +25,7 @@ namespace Obi.Samples if (!isActiveAndEnabled || actor.solver == null) return; - for (int i = 0; i < actor.solverIndices.count; ++i){ + for (int i = 0; i < actor.solverIndices.Length; ++i){ int k = actor.solverIndices[i]; diff --git a/Assets/Obi/Samples/Common/SampleResources/Scripts/ColorRandomizer.cs b/Assets/Obi/Samples/Common/SampleResources/Scripts/ColorRandomizer.cs index c445dfc28..dcc1ba2d7 100644 --- a/Assets/Obi/Samples/Common/SampleResources/Scripts/ColorRandomizer.cs +++ b/Assets/Obi/Samples/Common/SampleResources/Scripts/ColorRandomizer.cs @@ -1,6 +1,9 @@ using UnityEngine; +using System; +using System.Collections; +using System.Collections.Generic; -namespace Obi.Samples +namespace Obi { [RequireComponent(typeof(ObiActor))] public class ColorRandomizer : MonoBehaviour @@ -11,16 +14,13 @@ namespace Obi.Samples void Start() { actor = GetComponent(); - actor.OnBlueprintLoaded += Actor_OnBlueprintLoaded; - } - private void Actor_OnBlueprintLoaded(ObiActor a, ObiActorBlueprint blueprint) - { - for (int i = 0; i < actor.solverIndices.count; ++i) + for (int i = 0; i < actor.solverIndices.Length; ++i) { actor.solver.colors[actor.solverIndices[i]] = gradient.Evaluate(UnityEngine.Random.value); - } - } - } + } + } + + } } diff --git a/Assets/Obi/Samples/Common/SampleResources/Scripts/DebugParticleFrames.cs b/Assets/Obi/Samples/Common/SampleResources/Scripts/DebugParticleFrames.cs index 298017a89..25e1f211b 100644 --- a/Assets/Obi/Samples/Common/SampleResources/Scripts/DebugParticleFrames.cs +++ b/Assets/Obi/Samples/Common/SampleResources/Scripts/DebugParticleFrames.cs @@ -1,42 +1,39 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; +using Obi; -namespace Obi.Samples -{ - [ExecuteInEditMode] - [RequireComponent(typeof(ObiActor))] - public class DebugParticleFrames : MonoBehaviour +[ExecuteInEditMode] +[RequireComponent(typeof(ObiActor))] +public class DebugParticleFrames : MonoBehaviour { + + ObiActor actor; + public float size = 1; + + public void Awake() { - - ObiActor actor; - public float size = 1; - - public void Awake() + actor = GetComponent(); + } + + // Update is called once per frame + void OnDrawGizmos () + { + Vector4 b1 = new Vector4(1, 0, 0, 0); + Vector4 b2 = new Vector4(0, 1, 0, 0); + Vector4 b3 = new Vector4(0, 0, 1, 0); + for (int i = 0; i < actor.activeParticleCount; ++i) { - actor = GetComponent(); - } - // Update is called once per frame - void OnDrawGizmos() - { - Vector4 b1 = new Vector4(1, 0, 0, 0); - Vector4 b2 = new Vector4(0, 1, 0, 0); - Vector4 b3 = new Vector4(0, 0, 1, 0); - for (int i = 0; i < actor.activeParticleCount; ++i) - { - - Vector3 position = actor.GetParticlePosition(actor.solverIndices[i]); - Quaternion quat = actor.GetParticleOrientation(actor.solverIndices[i]); - - Gizmos.color = Color.red; - Gizmos.DrawRay(position, quat * b1 * size); - Gizmos.color = Color.green; - Gizmos.DrawRay(position, quat * b2 * size); - Gizmos.color = Color.blue; - Gizmos.DrawRay(position, quat * b3 * size); - } - - } - } + Vector3 position = actor.GetParticlePosition(actor.solverIndices[i]); + Quaternion quat = actor.GetParticleOrientation(actor.solverIndices[i]); + + Gizmos.color = Color.red; + Gizmos.DrawRay(position, quat * b1 * size); + Gizmos.color = Color.green; + Gizmos.DrawRay(position, quat * b2 * size); + Gizmos.color = Color.blue; + Gizmos.DrawRay(position, quat * b3 * size); + } + + } } diff --git a/Assets/Obi/Samples/Common/SampleResources/Scripts/ExtrapolationCamera.cs b/Assets/Obi/Samples/Common/SampleResources/Scripts/ExtrapolationCamera.cs index ff7bb55d0..4f7a13465 100644 --- a/Assets/Obi/Samples/Common/SampleResources/Scripts/ExtrapolationCamera.cs +++ b/Assets/Obi/Samples/Common/SampleResources/Scripts/ExtrapolationCamera.cs @@ -1,78 +1,76 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; +using Obi; -namespace Obi.Samples +public class ExtrapolationCamera : MonoBehaviour { - public class ExtrapolationCamera : MonoBehaviour + public Transform target = null; + + public float extrapolation = 10; + + [Range(0, 1)] + public float smoothness = 0.8f; + + [Range(0, 1)] + public float linearSpeed = 1; + + [Range(0, 1)] + public float rotationalSpeed = 1; + + [Min(0)] + public float distanceFromTarget = 4; + + Vector3 lastPosition; + Vector3 extrapolatedPos; + + void Start() { - public Transform target = null; + if (target != null) + lastPosition = target.position; + } - public float extrapolation = 10; - - [Range(0, 1)] - public float smoothness = 0.8f; - - [Range(0, 1)] - public float linearSpeed = 1; - - [Range(0, 1)] - public float rotationalSpeed = 1; - - [Min(0)] - public float distanceFromTarget = 4; - - Vector3 lastPosition; - Vector3 extrapolatedPos; - - void Start() + private void FixedUpdate() + { + if (target != null) { - if (target != null) - lastPosition = target.position; - } + // Get position delta since the last physics update: + Vector3 positionDelta = target.position - lastPosition; + positionDelta.y = 0; - private void FixedUpdate() - { - if (target != null) - { - // Get position delta since the last physics update: - Vector3 positionDelta = target.position - lastPosition; - positionDelta.y = 0; + // extrapolate position using velocity (the division/multiplication by Time.deltaTime simplify out) + extrapolatedPos = Vector3.Lerp(target.position + positionDelta * extrapolation, extrapolatedPos, smoothness); - // extrapolate position using velocity (the division/multiplication by Time.deltaTime simplify out) - extrapolatedPos = Vector3.Lerp(target.position + positionDelta * extrapolation, extrapolatedPos, smoothness); - - // store the target's current com for the next frame: - lastPosition = target.position; - } - } - - void LateUpdate() - { - if (target != null) - { - // get vector from the camera to the extrapolated position: - Vector3 toTarget = extrapolatedPos - transform.position; - - // rotate the camera towards the extrapolated position: - transform.rotation = Quaternion.Lerp(transform.rotation, Quaternion.LookRotation(toTarget), rotationalSpeed); - - // keep our current world space height: - toTarget.y = 0; - - // move the camera towards the extrapolated position, keeping some distance to it: - transform.position += toTarget.normalized * (toTarget.magnitude - distanceFromTarget) * linearSpeed; - - } - } - - public void Teleport(Vector3 position, Quaternion rotation) - { - transform.position = position; - transform.rotation = rotation; - - if (target != null) - extrapolatedPos = lastPosition = target.position; + // store the target's current com for the next frame: + lastPosition = target.position; } } + + void LateUpdate() + { + if (target != null) + { + // get vector from the camera to the extrapolated position: + Vector3 toTarget = extrapolatedPos - transform.position; + + // rotate the camera towards the extrapolated position: + transform.rotation = Quaternion.Lerp(transform.rotation, Quaternion.LookRotation(toTarget), rotationalSpeed); + + // keep our current world space height: + toTarget.y = 0; + + // move the camera towards the extrapolated position, keeping some distance to it: + transform.position += toTarget.normalized * (toTarget.magnitude - distanceFromTarget) * linearSpeed; + + } + } + + public void Teleport(Vector3 position, Quaternion rotation) + { + transform.position = position; + transform.rotation = rotation; + + if (target != null) + extrapolatedPos = lastPosition = target.position; + } } diff --git a/Assets/Obi/Samples/Common/SampleResources/Scripts/FPSDisplay.cs b/Assets/Obi/Samples/Common/SampleResources/Scripts/FPSDisplay.cs index bd83d2163..2433ea770 100644 --- a/Assets/Obi/Samples/Common/SampleResources/Scripts/FPSDisplay.cs +++ b/Assets/Obi/Samples/Common/SampleResources/Scripts/FPSDisplay.cs @@ -2,59 +2,56 @@ using UnityEngine.UI; using System.Collections; -namespace Obi.Samples +[RequireComponent(typeof(Text))] +public class FPSDisplay : MonoBehaviour { - [RequireComponent(typeof(Text))] - public class FPSDisplay : MonoBehaviour + public float updateInterval = 0.5f; + + public bool showMedian = false; + public float medianLearnrate = 0.05f; + + private float accum = 0; // FPS accumulated over the interval + private int frames = 0; // Frames drawn over the interval + private float timeleft; // Left time for current interval + private float currentFPS = 0; + + private float median = 0; + private float average = 0; + + public float CurrentFPS{ + get { return currentFPS; } + } + + public float FPSMedian { - public float updateInterval = 0.5f; + get { return median; } + } - public bool showMedian = false; - public float medianLearnrate = 0.05f; + public float FPSAverage + { + get { return average; } + } - private float accum = 0; // FPS accumulated over the interval - private int frames = 0; // Frames drawn over the interval - private float timeleft; // Left time for current interval - private float currentFPS = 0; + Text uguiText; - private float median = 0; - private float average = 0; + void Start() + { + uguiText = GetComponent(); + timeleft = updateInterval; + } - public float CurrentFPS - { - get { return currentFPS; } - } + void Update() + { + // Timing inside the editor is not accurate. Only use in actual build. - public float FPSMedian - { - get { return median; } - } - - public float FPSAverage - { - get { return average; } - } - - Text uguiText; - - void Start() - { - uguiText = GetComponent(); - timeleft = updateInterval; - } - - void Update() - { - // Timing inside the editor is not accurate. Only use in actual build. - - //#if !UNITY_EDITOR + //#if !UNITY_EDITOR timeleft -= Time.deltaTime; - accum += Time.timeScale / Time.deltaTime; + accum += Time.timeScale/Time.deltaTime; ++frames; - + // Interval ended - update GUI text and start new interval - if (timeleft <= 0.0) + if( timeleft <= 0.0) { currentFPS = accum / frames; @@ -63,19 +60,18 @@ namespace Obi.Samples // display two fractional digits (f2 format) float fps = showMedian ? median : currentFPS; - uguiText.text = System.String.Format("{0:F2} FPS ({1:F1} ms)", fps, 1000.0f / fps); + uguiText.text = System.String.Format("{0:F2} FPS ({1:F1} ms)", fps, 1000.0f / fps); timeleft = updateInterval; accum = 0.0F; frames = 0; } - //#endif - } + //#endif + } - public void ResetMedianAndAverage() - { - median = 0; - average = 0; - } + public void ResetMedianAndAverage() + { + median = 0; + average = 0; } } \ No newline at end of file diff --git a/Assets/Obi/Samples/Common/SampleResources/Scripts/LookAroundCamera.cs b/Assets/Obi/Samples/Common/SampleResources/Scripts/LookAroundCamera.cs index 79bcebe3e..bcd4788a5 100644 --- a/Assets/Obi/Samples/Common/SampleResources/Scripts/LookAroundCamera.cs +++ b/Assets/Obi/Samples/Common/SampleResources/Scripts/LookAroundCamera.cs @@ -1,6 +1,6 @@ using UnityEngine; -namespace Obi.Samples +namespace Obi { [RequireComponent(typeof(Camera))] public class LookAroundCamera : MonoBehaviour @@ -64,10 +64,7 @@ namespace Obi.Samples currentShot.position += delta * Time.deltaTime * movementSpeed; - var system = UnityEngine.EventSystems.EventSystem.current; - bool focusUI = system != null && system.IsPointerOverGameObject(); - - if (Input.GetKey(KeyCode.Mouse0) && !focusUI) + if (Input.GetKey(KeyCode.Mouse0)) { float deltaX = Input.GetAxis("Mouse X") * rotationSpeed; float deltaY = Input.GetAxis("Mouse Y") * rotationSpeed; diff --git a/Assets/Obi/Samples/Common/SampleResources/Scripts/MoveAndRotate.cs b/Assets/Obi/Samples/Common/SampleResources/Scripts/MoveAndRotate.cs index a077e14f6..7597a980e 100644 --- a/Assets/Obi/Samples/Common/SampleResources/Scripts/MoveAndRotate.cs +++ b/Assets/Obi/Samples/Common/SampleResources/Scripts/MoveAndRotate.cs @@ -1,7 +1,7 @@ using System; using UnityEngine; -namespace Obi.Samples +namespace Obi { public class MoveAndRotate : MonoBehaviour { diff --git a/Assets/Obi/Samples/Common/SampleResources/Scripts/ObiActorTeleport.cs b/Assets/Obi/Samples/Common/SampleResources/Scripts/ObiActorTeleport.cs index ba39a0312..d9b6f8d66 100644 --- a/Assets/Obi/Samples/Common/SampleResources/Scripts/ObiActorTeleport.cs +++ b/Assets/Obi/Samples/Common/SampleResources/Scripts/ObiActorTeleport.cs @@ -1,17 +1,15 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; +using Obi; -namespace Obi.Samples +public class ObiActorTeleport : MonoBehaviour { - public class ObiActorTeleport : MonoBehaviour - { - public ObiActor actor; - public Transform target; + public ObiActor actor; + public Transform target; - public void Teleport() - { - actor.Teleport(target.position, target.rotation); - } + public void Teleport() + { + actor.Teleport(target.position, target.rotation); } } diff --git a/Assets/Obi/Samples/Common/SampleResources/Scripts/ObiParticleCounter.cs b/Assets/Obi/Samples/Common/SampleResources/Scripts/ObiParticleCounter.cs index ae6fcf333..ee392463f 100644 --- a/Assets/Obi/Samples/Common/SampleResources/Scripts/ObiParticleCounter.cs +++ b/Assets/Obi/Samples/Common/SampleResources/Scripts/ObiParticleCounter.cs @@ -1,58 +1,53 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; +using Obi; -namespace Obi.Samples -{ - [RequireComponent(typeof(ObiSolver))] - public class ObiParticleCounter : MonoBehaviour - { +[RequireComponent(typeof(ObiSolver))] +public class ObiParticleCounter : MonoBehaviour { - ObiSolver solver; - public int counter = 0; - public Collider2D targetCollider = null; - - ObiNativeContactList frame; - HashSet particles = new HashSet(); - - void Awake() - { - solver = GetComponent(); - } - - void OnEnable() - { - solver.OnCollision += Solver_OnCollision; - } - - void OnDisable() - { - solver.OnCollision -= Solver_OnCollision; - } - - void Solver_OnCollision(object sender, ObiNativeContactList e) - { - HashSet currentParticles = new HashSet(); - - for (int i = 0; i < e.count; ++i) - { - if (e[i].distance < 0.001f) - { - - /*Component collider; - if (ObiCollider2D.idToCollider.TryGetValue(e.contacts.Data[i].other,out collider)){ - - if (collider == targetCollider) - currentParticles.Add(e.contacts.Data[i].particle); - - }*/ - } - } - - particles.ExceptWith(currentParticles); - counter += particles.Count; - particles = currentParticles; Debug.Log(counter); - } + ObiSolver solver; + public int counter = 0; + public Collider2D targetCollider = null; + + Obi.ObiSolver.ObiCollisionEventArgs frame; + HashSet particles = new HashSet(); + void Awake(){ + solver = GetComponent(); } + + void OnEnable () { + solver.OnCollision += Solver_OnCollision; + } + + void OnDisable(){ + solver.OnCollision -= Solver_OnCollision; + } + + void Solver_OnCollision (object sender, Obi.ObiSolver.ObiCollisionEventArgs e) + { + HashSet currentParticles = new HashSet(); + + for(int i = 0; i < e.contacts.Count; ++i) + { + if (e.contacts.Data[i].distance < 0.001f) + { + + /*Component collider; + if (ObiCollider2D.idToCollider.TryGetValue(e.contacts.Data[i].other,out collider)){ + + if (collider == targetCollider) + currentParticles.Add(e.contacts.Data[i].particle); + + }*/ + } + } + + particles.ExceptWith(currentParticles); + counter += particles.Count; + particles = currentParticles;Debug.Log(counter); + } + } + diff --git a/Assets/Obi/Samples/Common/SampleResources/Scripts/ObjectDragger.cs b/Assets/Obi/Samples/Common/SampleResources/Scripts/ObjectDragger.cs index 9f8127d1a..1ca0319cf 100644 --- a/Assets/Obi/Samples/Common/SampleResources/Scripts/ObjectDragger.cs +++ b/Assets/Obi/Samples/Common/SampleResources/Scripts/ObjectDragger.cs @@ -1,25 +1,23 @@ using UnityEngine; using System.Collections; - -namespace Obi.Samples + +public class ObjectDragger : MonoBehaviour { - public class ObjectDragger : MonoBehaviour - { + + private Vector3 screenPoint; + private Vector3 offset; + + void OnMouseDown() + { + screenPoint = Camera.main.WorldToScreenPoint(gameObject.transform.position); + offset = gameObject.transform.position - Camera.main.ScreenToWorldPoint(new Vector3(Input.mousePosition.x, Input.mousePosition.y, screenPoint.z)); + } + + void OnMouseDrag() + { + Vector3 curScreenPoint = new Vector3(Input.mousePosition.x, Input.mousePosition.y, screenPoint.z); + transform.position = Camera.main.ScreenToWorldPoint(curScreenPoint) + offset; + } - private Vector3 screenPoint; - private Vector3 offset; - - void OnMouseDown() - { - screenPoint = Camera.main.WorldToScreenPoint(gameObject.transform.position); - offset = gameObject.transform.position - Camera.main.ScreenToWorldPoint(new Vector3(Input.mousePosition.x, Input.mousePosition.y, screenPoint.z)); - } - - void OnMouseDrag() - { - Vector3 curScreenPoint = new Vector3(Input.mousePosition.x, Input.mousePosition.y, screenPoint.z); - transform.position = Camera.main.ScreenToWorldPoint(curScreenPoint) + offset; - } - - } + } \ No newline at end of file diff --git a/Assets/Obi/Samples/Common/SampleResources/Scripts/ObjectLimit.cs b/Assets/Obi/Samples/Common/SampleResources/Scripts/ObjectLimit.cs index 673104e56..9bea6154e 100644 --- a/Assets/Obi/Samples/Common/SampleResources/Scripts/ObjectLimit.cs +++ b/Assets/Obi/Samples/Common/SampleResources/Scripts/ObjectLimit.cs @@ -1,25 +1,22 @@ using UnityEngine; using System.Collections; - -namespace Obi.Samples -{ - public class ObjectLimit : MonoBehaviour - { - - public float minX = 0; - public float maxX = 1; - public float minY = 0; - public float maxY = 1; - public float minZ = 0; - public float maxZ = 1; - - void Update() - { - transform.localPosition = new Vector3(Mathf.Clamp(gameObject.transform.localPosition.x, minX, maxX), - Mathf.Clamp(gameObject.transform.localPosition.y, minY, maxY), - Mathf.Clamp(gameObject.transform.localPosition.z, minZ, maxZ)); - - } - - } -} \ No newline at end of file + + public class ObjectLimit : MonoBehaviour + { + + public float minX = 0; + public float maxX = 1; + public float minY = 0; + public float maxY = 1; + public float minZ = 0; + public float maxZ = 1; + + void Update() + { + transform.localPosition = new Vector3(Mathf.Clamp(gameObject.transform.localPosition.x,minX,maxX), + Mathf.Clamp(gameObject.transform.localPosition.y,minY,maxY), + Mathf.Clamp(gameObject.transform.localPosition.z,minZ,maxZ)); + + } + + } \ No newline at end of file diff --git a/Assets/Obi/Samples/Common/SampleResources/Scripts/RigidbodyMaxAngularVel.cs b/Assets/Obi/Samples/Common/SampleResources/Scripts/RigidbodyMaxAngularVel.cs deleted file mode 100644 index aff42672f..000000000 --- a/Assets/Obi/Samples/Common/SampleResources/Scripts/RigidbodyMaxAngularVel.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace Obi.Samples -{ - [RequireComponent(typeof(Rigidbody))] - public class RigidbodyMaxAngularVel : MonoBehaviour - { - public float maxAngularVelocity = 20; - - // Start is called before the first frame update - void Start() - { - GetComponent().maxAngularVelocity = maxAngularVelocity; - } - - // Update is called once per frame - void Update() - { - - } - } -} diff --git a/Assets/Obi/Samples/Common/SampleResources/Scripts/RigidbodyMaxAngularVel.cs.meta b/Assets/Obi/Samples/Common/SampleResources/Scripts/RigidbodyMaxAngularVel.cs.meta deleted file mode 100644 index bdba51d88..000000000 --- a/Assets/Obi/Samples/Common/SampleResources/Scripts/RigidbodyMaxAngularVel.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 0c31446bcaf82443aa64afa152fac3d0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Samples/Common/SampleResources/Scripts/SlowmoToggler.cs b/Assets/Obi/Samples/Common/SampleResources/Scripts/SlowmoToggler.cs index 5b70d25ac..2e9072166 100644 --- a/Assets/Obi/Samples/Common/SampleResources/Scripts/SlowmoToggler.cs +++ b/Assets/Obi/Samples/Common/SampleResources/Scripts/SlowmoToggler.cs @@ -2,14 +2,9 @@ using System.Collections.Generic; using UnityEngine; -namespace Obi.Samples -{ - public class SlowmoToggler : MonoBehaviour - { +public class SlowmoToggler : MonoBehaviour { - public void Slowmo(bool slowmo) - { - Time.timeScale = slowmo ? 0.25f : 1; - } - } + public void Slowmo (bool slowmo) { + Time.timeScale = slowmo?0.25f:1; + } } diff --git a/Assets/Obi/Samples/Common/SampleResources/Scripts/WorldSpaceGravity.cs b/Assets/Obi/Samples/Common/SampleResources/Scripts/WorldSpaceGravity.cs index fc9c9971a..c91f8816c 100644 --- a/Assets/Obi/Samples/Common/SampleResources/Scripts/WorldSpaceGravity.cs +++ b/Assets/Obi/Samples/Common/SampleResources/Scripts/WorldSpaceGravity.cs @@ -1,24 +1,21 @@ using UnityEngine; using Obi; -namespace Obi.Samples +[RequireComponent(typeof(ObiSolver))] +public class WorldSpaceGravity : MonoBehaviour { - [RequireComponent(typeof(ObiSolver))] - public class WorldSpaceGravity : MonoBehaviour + + ObiSolver solver; + public Vector3 worldGravity = new Vector3(0,-9.81f,0); + + void Awake() { + solver = GetComponent(); + } - ObiSolver solver; - public Vector3 worldGravity = new Vector3(0, -9.81f, 0); - - void Awake() - { - solver = GetComponent(); - } - - void Update() - { - solver.parameters.gravity = transform.InverseTransformDirection(worldGravity); - solver.PushSolverParameters(); - } + void Update() + { + solver.parameters.gravity = transform.InverseTransformDirection(worldGravity); + solver.PushSolverParameters(); } } diff --git a/Assets/Obi/Samples/RopeAndRod/CableCar.unity b/Assets/Obi/Samples/RopeAndRod/CableCar.unity deleted file mode 100644 index 7377017d8..000000000 --- a/Assets/Obi/Samples/RopeAndRod/CableCar.unity +++ /dev/null @@ -1,3602 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!29 &1 -OcclusionCullingSettings: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_OcclusionBakeSettings: - smallestOccluder: 5 - smallestHole: 0.25 - backfaceThreshold: 100 - m_SceneGUID: 00000000000000000000000000000000 - m_OcclusionCullingData: {fileID: 0} ---- !u!104 &2 -RenderSettings: - m_ObjectHideFlags: 0 - serializedVersion: 10 - m_Fog: 0 - m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - m_FogMode: 3 - m_FogDensity: 0.01 - m_LinearFogStart: 0 - m_LinearFogEnd: 300 - m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} - m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} - m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} - m_AmbientIntensity: 1 - m_AmbientMode: 0 - m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} - m_HaloStrength: 0.5 - m_FlareStrength: 1 - m_FlareFadeSpeed: 3 - m_HaloTexture: {fileID: 0} - m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} - m_DefaultReflectionMode: 0 - m_DefaultReflectionResolution: 128 - m_ReflectionBounces: 1 - m_ReflectionIntensity: 1 - m_CustomReflection: {fileID: 0} - m_Sun: {fileID: 0} - m_UseRadianceAmbientProbe: 0 ---- !u!157 &4 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 13 - m_BakeOnSceneLoad: 1 - m_GISettings: - serializedVersion: 2 - m_BounceScale: 1 - m_IndirectOutputScale: 1 - m_AlbedoBoost: 1 - m_EnvironmentLightingMode: 0 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 1 - m_LightmapEditorSettings: - serializedVersion: 12 - m_Resolution: 2 - m_BakeResolution: 40 - m_AtlasSize: 1024 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 0 - m_CompAOExponentDirect: 0 - m_ExtractAmbientOcclusion: 0 - m_Padding: 2 - m_LightmapParameters: {fileID: 0} - m_LightmapsBakeMode: 1 - m_TextureCompression: 1 - m_ReflectionCompression: 2 - m_MixedBakeMode: 1 - m_BakeBackend: 0 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 500 - m_PVRBounces: 2 - m_PVREnvironmentSampleCount: 500 - m_PVREnvironmentReferencePointCount: 2048 - m_PVRFilteringMode: 2 - m_PVRDenoiserTypeDirect: 0 - m_PVRDenoiserTypeIndirect: 0 - m_PVRDenoiserTypeAO: 0 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVREnvironmentMIS: 0 - m_PVRCulling: 1 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 5 - m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_ExportTrainingData: 0 - m_TrainingDataDestination: TrainingData - m_LightProbeSampleCountMultiplier: 4 - m_LightingDataAsset: {fileID: 0} - m_LightingSettings: {fileID: 664654699} ---- !u!196 &5 -NavMeshSettings: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_BuildSettings: - serializedVersion: 3 - agentTypeID: 0 - agentRadius: 0.5 - agentHeight: 2 - agentSlope: 45 - agentClimb: 0.4 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - minRegionArea: 2 - manualCellSize: 0 - cellSize: 0.16666667 - manualTileSize: 0 - tileSize: 256 - buildHeightMesh: 0 - maxJobWorkers: 0 - preserveTilesOutsideBounds: 0 - debug: - m_Flags: 0 - m_NavMeshData: {fileID: 0} ---- !u!1 &158742032 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 158742033} - - component: {fileID: 158742035} - - component: {fileID: 158742034} - m_Layer: 0 - m_Name: Cube - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &158742033 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 158742032} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 1.82, y: 0.929, z: 0} - m_LocalScale: {x: 3, y: 0.058823526, z: 0.3333333} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1359249594} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!23 &158742034 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 158742032} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 4294967295 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 1 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &158742035 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 158742032} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!1 &282899373 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 282899377} - - component: {fileID: 282899376} - - component: {fileID: 282899375} - - component: {fileID: 282899374} - m_Layer: 5 - m_Name: Canvas - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &282899374 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 282899373} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} - m_Name: - m_EditorClassIdentifier: - m_IgnoreReversedGraphics: 1 - m_BlockingObjects: 0 - m_BlockingMask: - serializedVersion: 2 - m_Bits: 4294967295 ---- !u!114 &282899375 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 282899373} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} - m_Name: - m_EditorClassIdentifier: - m_UiScaleMode: 0 - m_ReferencePixelsPerUnit: 100 - m_ScaleFactor: 1 - m_ReferenceResolution: {x: 800, y: 600} - m_ScreenMatchMode: 0 - m_MatchWidthOrHeight: 0 - m_PhysicalUnit: 3 - m_FallbackScreenDPI: 96 - m_DefaultSpriteDPI: 96 - m_DynamicPixelsPerUnit: 1 - m_PresetInfoIsWorld: 0 ---- !u!223 &282899376 -Canvas: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 282899373} - m_Enabled: 1 - serializedVersion: 3 - m_RenderMode: 0 - m_Camera: {fileID: 0} - m_PlaneDistance: 100 - m_PixelPerfect: 0 - m_ReceivesEvents: 1 - m_OverrideSorting: 0 - m_OverridePixelPerfect: 0 - m_SortingBucketNormalizedSize: 0 - m_VertexColorAlwaysGammaSpace: 0 - m_AdditionalShaderChannelsFlag: 25 - m_UpdateRectTransformForStandalone: 0 - m_SortingLayerID: 0 - m_SortingOrder: 0 - m_TargetDisplay: 0 ---- !u!224 &282899377 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 282899373} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0, y: 0, z: 0} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 2087273468} - - {fileID: 665462092} - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0, y: 0} ---- !u!1 &318045077 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 318045078} - - component: {fileID: 318045080} - - component: {fileID: 318045079} - m_Layer: 0 - m_Name: Cube - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &318045078 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 318045077} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 1.82, y: 0.929, z: 0} - m_LocalScale: {x: 3, y: 0.058823526, z: 0.3333333} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 452639195} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!23 &318045079 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 318045077} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 4294967295 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 1 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &318045080 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 318045077} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!1 &352165315 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 352165316} - - component: {fileID: 352165319} - - component: {fileID: 352165317} - m_Layer: 0 - m_Name: Cube - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &352165316 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 352165315} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 1.82, y: 0.929, z: 0} - m_LocalScale: {x: 3, y: 0.058823526, z: 0.3333333} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1625299420} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!23 &352165317 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 352165315} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 4294967295 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 1 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &352165319 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 352165315} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!1001 &421764872 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 400000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: m_RootOrder - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: m_LocalRotation.y - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 2300000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: 'm_Materials.Array.data[0]' - value: - objectReference: {fileID: 2100000, guid: a0a5f9e13fa7c47f78547e54896609da, type: 2} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: - - targetCorrespondingSourceObject: {fileID: 100000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - insertIndex: -1 - addedObject: {fileID: 506459882} - - targetCorrespondingSourceObject: {fileID: 100000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - insertIndex: -1 - addedObject: {fileID: 506459883} - m_SourcePrefab: {fileID: 100100000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} ---- !u!1 &452639190 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 452639195} - - component: {fileID: 452639194} - - component: {fileID: 452639193} - - component: {fileID: 452639192} - - component: {fileID: 452639191} - m_Layer: 0 - m_Name: Post (3) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!54 &452639191 -Rigidbody: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 452639190} - serializedVersion: 5 - m_Mass: 1 - m_LinearDamping: 0 - m_AngularDamping: 0.05 - m_CenterOfMass: {x: 0, y: 0, z: 0} - m_InertiaTensor: {x: 1, y: 1, z: 1} - m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ImplicitCom: 1 - m_ImplicitTensor: 1 - m_UseGravity: 1 - m_IsKinematic: 1 - m_Interpolate: 0 - m_Constraints: 0 - m_CollisionDetection: 0 ---- !u!23 &452639192 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 452639190} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 4294967295 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 1 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!136 &452639193 -CapsuleCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 452639190} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: 0.5 - m_Height: 2 - m_Direction: 1 - m_Center: {x: 0, y: 0, z: 0} ---- !u!33 &452639194 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 452639190} - m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &452639195 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 452639190} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 1, z: 0, w: 0} - m_LocalPosition: {x: 2.73, y: 2, z: -2.57} - m_LocalScale: {x: 0.3, y: 2, z: 0.3} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 318045078} - - {fileID: 571024694} - - {fileID: 669702488} - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0} ---- !u!1 &488353305 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 488353306} - - component: {fileID: 488353309} - - component: {fileID: 488353308} - - component: {fileID: 488353307} - - component: {fileID: 488353316} - - component: {fileID: 488353315} - - component: {fileID: 488353314} - - component: {fileID: 488353313} - - component: {fileID: 488353312} - - component: {fileID: 488353311} - - component: {fileID: 488353310} - - component: {fileID: 488353318} - - component: {fileID: 488353317} - m_Layer: 0 - m_Name: Obi Rope - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &488353306 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 488353305} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 3.65, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 754643806} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &488353307 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 488353305} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 40} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.8 ---- !u!114 &488353308 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 488353305} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 0 ---- !u!114 &488353309 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 488353305} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b0000007c0000007d0000007e0000007f000000800000008100000082000000830000008400000085000000860000008700000088000000890000008a0000008b0000008c0000008d0000008e0000008f000000900000009100000092000000 - m_AlignBytes: 16 - groupID: 1 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 18.60432 - elements: - - particle1: 0 - particle2: 1 - restLength: 0.18564853 - constraintForce: 0 - tearResistance: 1 - - particle1: 1 - particle2: 2 - restLength: 0.18596585 - constraintForce: 0 - tearResistance: 1 - - particle1: 2 - particle2: 3 - restLength: 0.18565044 - constraintForce: 0 - tearResistance: 1 - - particle1: 3 - particle2: 4 - restLength: 0.18601711 - constraintForce: 0 - tearResistance: 1 - - particle1: 4 - particle2: 5 - restLength: 0.18576063 - constraintForce: 0 - tearResistance: 1 - - particle1: 5 - particle2: 6 - restLength: 0.18583234 - constraintForce: 0 - tearResistance: 1 - - particle1: 6 - particle2: 7 - restLength: 0.18588233 - constraintForce: 0 - tearResistance: 1 - - particle1: 7 - particle2: 8 - restLength: 0.18583456 - constraintForce: 0 - tearResistance: 1 - - particle1: 8 - particle2: 9 - restLength: 0.18592378 - constraintForce: 0 - tearResistance: 1 - - particle1: 9 - particle2: 10 - restLength: 0.18579607 - constraintForce: 0 - tearResistance: 1 - - particle1: 10 - particle2: 11 - restLength: 0.1858063 - constraintForce: 0 - tearResistance: 1 - - particle1: 11 - particle2: 12 - restLength: 0.1861207 - constraintForce: 0 - tearResistance: 1 - - particle1: 12 - particle2: 13 - restLength: 0.19971544 - constraintForce: 0 - tearResistance: 1 - - particle1: 13 - particle2: 14 - restLength: 0.19943272 - constraintForce: 0 - tearResistance: 1 - - particle1: 14 - particle2: 15 - restLength: 0.19898842 - constraintForce: 0 - tearResistance: 1 - - particle1: 15 - particle2: 16 - restLength: 0.19928476 - constraintForce: 0 - tearResistance: 1 - - particle1: 16 - particle2: 17 - restLength: 0.19936812 - constraintForce: 0 - tearResistance: 1 - - particle1: 17 - particle2: 18 - restLength: 0.19907406 - constraintForce: 0 - tearResistance: 1 - - particle1: 18 - particle2: 19 - restLength: 0.19931118 - constraintForce: 0 - tearResistance: 1 - - particle1: 19 - particle2: 20 - restLength: 0.19934076 - constraintForce: 0 - tearResistance: 1 - - particle1: 20 - particle2: 21 - restLength: 0.19907784 - constraintForce: 0 - tearResistance: 1 - - particle1: 21 - particle2: 22 - restLength: 0.19906293 - constraintForce: 0 - tearResistance: 1 - - particle1: 22 - particle2: 23 - restLength: 0.19933437 - constraintForce: 0 - tearResistance: 1 - - particle1: 23 - particle2: 24 - restLength: 0.1992483 - constraintForce: 0 - tearResistance: 1 - - particle1: 24 - particle2: 25 - restLength: 0.19919144 - constraintForce: 0 - tearResistance: 1 - - particle1: 25 - particle2: 26 - restLength: 0.19944213 - constraintForce: 0 - tearResistance: 1 - - particle1: 26 - particle2: 27 - restLength: 0.19925661 - constraintForce: 0 - tearResistance: 1 - - particle1: 27 - particle2: 28 - restLength: 0.19924371 - constraintForce: 0 - tearResistance: 1 - - particle1: 28 - particle2: 29 - restLength: 0.19933179 - constraintForce: 0 - tearResistance: 1 - - particle1: 29 - particle2: 30 - restLength: 0.19922554 - constraintForce: 0 - tearResistance: 1 - - particle1: 30 - particle2: 31 - restLength: 0.1993162 - constraintForce: 0 - tearResistance: 1 - - particle1: 31 - particle2: 32 - restLength: 0.1992752 - constraintForce: 0 - tearResistance: 1 - - particle1: 32 - particle2: 33 - restLength: 0.199276 - constraintForce: 0 - tearResistance: 1 - - particle1: 33 - particle2: 34 - restLength: 0.19927499 - constraintForce: 0 - tearResistance: 1 - - particle1: 34 - particle2: 35 - restLength: 0.19931632 - constraintForce: 0 - tearResistance: 1 - - particle1: 35 - particle2: 36 - restLength: 0.19922356 - constraintForce: 0 - tearResistance: 1 - - particle1: 36 - particle2: 37 - restLength: 0.19934614 - constraintForce: 0 - tearResistance: 1 - - particle1: 37 - particle2: 38 - restLength: 0.19922769 - constraintForce: 0 - tearResistance: 1 - - particle1: 38 - particle2: 39 - restLength: 0.19926094 - constraintForce: 0 - tearResistance: 1 - - particle1: 39 - particle2: 40 - restLength: 0.1994527 - constraintForce: 0 - tearResistance: 1 - - particle1: 40 - particle2: 41 - restLength: 0.17630634 - constraintForce: 0 - tearResistance: 1 - - particle1: 41 - particle2: 42 - restLength: 0.1766938 - constraintForce: 0 - tearResistance: 1 - - particle1: 42 - particle2: 43 - restLength: 0.17595129 - constraintForce: 0 - tearResistance: 1 - - particle1: 43 - particle2: 44 - restLength: 0.17587988 - constraintForce: 0 - tearResistance: 1 - - particle1: 44 - particle2: 45 - restLength: 0.17602395 - constraintForce: 0 - tearResistance: 1 - - particle1: 45 - particle2: 46 - restLength: 0.17617115 - constraintForce: 0 - tearResistance: 1 - - particle1: 46 - particle2: 47 - restLength: 0.17634629 - constraintForce: 0 - tearResistance: 1 - - particle1: 47 - particle2: 48 - restLength: 0.17855187 - constraintForce: 0 - tearResistance: 1 - - particle1: 48 - particle2: 49 - restLength: 0.17836717 - constraintForce: 0 - tearResistance: 1 - - particle1: 49 - particle2: 50 - restLength: 0.17838444 - constraintForce: 0 - tearResistance: 1 - - particle1: 50 - particle2: 51 - restLength: 0.178448 - constraintForce: 0 - tearResistance: 1 - - particle1: 51 - particle2: 52 - restLength: 0.17842674 - constraintForce: 0 - tearResistance: 1 - - particle1: 52 - particle2: 53 - restLength: 0.17843884 - constraintForce: 0 - tearResistance: 1 - - particle1: 53 - particle2: 54 - restLength: 0.17857191 - constraintForce: 0 - tearResistance: 1 - - particle1: 54 - particle2: 55 - restLength: 0.19458835 - constraintForce: 0 - tearResistance: 1 - - particle1: 55 - particle2: 56 - restLength: 0.19471198 - constraintForce: 0 - tearResistance: 1 - - particle1: 56 - particle2: 57 - restLength: 0.19477776 - constraintForce: 0 - tearResistance: 1 - - particle1: 57 - particle2: 58 - restLength: 0.19480988 - constraintForce: 0 - tearResistance: 1 - - particle1: 58 - particle2: 59 - restLength: 0.19482192 - constraintForce: 0 - tearResistance: 1 - - particle1: 59 - particle2: 60 - restLength: 0.19482367 - constraintForce: 0 - tearResistance: 1 - - particle1: 60 - particle2: 61 - restLength: 0.1948015 - constraintForce: 0 - tearResistance: 1 - - particle1: 61 - particle2: 62 - restLength: 0.19473623 - constraintForce: 0 - tearResistance: 1 - - particle1: 62 - particle2: 63 - restLength: 0.19476943 - constraintForce: 0 - tearResistance: 1 - - particle1: 63 - particle2: 64 - restLength: 0.19480366 - constraintForce: 0 - tearResistance: 1 - - particle1: 64 - particle2: 65 - restLength: 0.19482858 - constraintForce: 0 - tearResistance: 1 - - particle1: 65 - particle2: 66 - restLength: 0.19484122 - constraintForce: 0 - tearResistance: 1 - - particle1: 66 - particle2: 67 - restLength: 0.19484922 - constraintForce: 0 - tearResistance: 1 - - particle1: 67 - particle2: 68 - restLength: 0.1948556 - constraintForce: 0 - tearResistance: 1 - - particle1: 68 - particle2: 69 - restLength: 0.19484958 - constraintForce: 0 - tearResistance: 1 - - particle1: 69 - particle2: 70 - restLength: 0.19484664 - constraintForce: 0 - tearResistance: 1 - - particle1: 70 - particle2: 71 - restLength: 0.19483826 - constraintForce: 0 - tearResistance: 1 - - particle1: 71 - particle2: 72 - restLength: 0.19481866 - constraintForce: 0 - tearResistance: 1 - - particle1: 72 - particle2: 73 - restLength: 0.1947577 - constraintForce: 0 - tearResistance: 1 - - particle1: 73 - particle2: 74 - restLength: 0.19461222 - constraintForce: 0 - tearResistance: 1 - - particle1: 74 - particle2: 75 - restLength: 0.19427651 - constraintForce: 0 - tearResistance: 1 - - particle1: 75 - particle2: 76 - restLength: 0.19059443 - constraintForce: 0 - tearResistance: 1 - - particle1: 76 - particle2: 77 - restLength: 0.19353278 - constraintForce: 0 - tearResistance: 1 - - particle1: 77 - particle2: 78 - restLength: 0.19126464 - constraintForce: 0 - tearResistance: 1 - - particle1: 78 - particle2: 79 - restLength: 0.19203633 - constraintForce: 0 - tearResistance: 1 - - particle1: 79 - particle2: 80 - restLength: 0.1922527 - constraintForce: 0 - tearResistance: 1 - - particle1: 80 - particle2: 81 - restLength: 0.19227861 - constraintForce: 0 - tearResistance: 1 - - particle1: 81 - particle2: 82 - restLength: 0.19226435 - constraintForce: 0 - tearResistance: 1 - - particle1: 82 - particle2: 83 - restLength: 0.19226244 - constraintForce: 0 - tearResistance: 1 - - particle1: 83 - particle2: 84 - restLength: 0.19227688 - constraintForce: 0 - tearResistance: 1 - - particle1: 84 - particle2: 85 - restLength: 0.19230759 - constraintForce: 0 - tearResistance: 1 - - particle1: 85 - particle2: 86 - restLength: 0.19232152 - constraintForce: 0 - tearResistance: 1 - - particle1: 86 - particle2: 87 - restLength: 0.19231874 - constraintForce: 0 - tearResistance: 1 - - particle1: 87 - particle2: 88 - restLength: 0.1922695 - constraintForce: 0 - tearResistance: 1 - - particle1: 88 - particle2: 89 - restLength: 0.192091 - constraintForce: 0 - tearResistance: 1 - - particle1: 89 - particle2: 90 - restLength: 0.19219275 - constraintForce: 0 - tearResistance: 1 - - particle1: 90 - particle2: 91 - restLength: 0.19225457 - constraintForce: 0 - tearResistance: 1 - - particle1: 91 - particle2: 92 - restLength: 0.19226341 - constraintForce: 0 - tearResistance: 1 - - particle1: 92 - particle2: 93 - restLength: 0.19222912 - constraintForce: 0 - tearResistance: 1 - - particle1: 93 - particle2: 94 - restLength: 0.19215801 - constraintForce: 0 - tearResistance: 1 - - particle1: 94 - particle2: 95 - restLength: 0.19206558 - constraintForce: 0 - tearResistance: 1 - - particle1: 95 - particle2: 96 - restLength: 0.19197142 - constraintForce: 0 - tearResistance: 1 - - particle1: 96 - particle2: 0 - restLength: 0.18639506 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: e016b4df5bfaf488f91ab99ebca81d83, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!114 &488353310 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 488353305} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 488353309} - m_Target: {fileID: 1569702937} - m_ParticleGroup: {fileID: -6013852427284171944, guid: e016b4df5bfaf488f91ab99ebca81d83, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &488353311 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 488353305} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 488353309} - m_Target: {fileID: 452639195} - m_ParticleGroup: {fileID: -7671420094400086755, guid: e016b4df5bfaf488f91ab99ebca81d83, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &488353312 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 488353305} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 488353309} - m_Target: {fileID: 452639195} - m_ParticleGroup: {fileID: 218208082314265139, guid: e016b4df5bfaf488f91ab99ebca81d83, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &488353313 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 488353305} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 488353309} - m_Target: {fileID: 452639195} - m_ParticleGroup: {fileID: 1548941265819301156, guid: e016b4df5bfaf488f91ab99ebca81d83, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &488353314 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 488353305} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 488353309} - m_Target: {fileID: 1192568501} - m_ParticleGroup: {fileID: -793357204084665196, guid: e016b4df5bfaf488f91ab99ebca81d83, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &488353315 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 488353305} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 488353309} - m_Target: {fileID: 1359249594} - m_ParticleGroup: {fileID: 135749586216130241, guid: e016b4df5bfaf488f91ab99ebca81d83, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &488353316 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 488353305} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 488353309} - m_Target: {fileID: 1625299420} - m_ParticleGroup: {fileID: 8813747759735635217, guid: e016b4df5bfaf488f91ab99ebca81d83, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &488353317 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 488353305} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 2aadf7c5471054b0db8c70bd317bc272, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Rope: {fileID: 488353309} - m_Target: {fileID: 1060357570} - m_Position: 0.326 - m_LimitRange: 0 - m_Range: {x: 0, y: 1} - m_Friction: 0 - m_MotorSpeed: 0 - m_MotorForce: Infinity - m_Compliance: 0 - m_ClampAtEnds: 1 - currentEdge: - edgeIndex: 31 - coordinate: 0.62199974 - firstEdge: - edgeIndex: 0 - coordinate: -3.4028235e+38 - lastEdge: - edgeIndex: 96 - coordinate: 3.4028235e+38 - breakThreshold: Infinity ---- !u!114 &488353318 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 488353305} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 2aadf7c5471054b0db8c70bd317bc272, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Rope: {fileID: 488353309} - m_Target: {fileID: 1060357570} - m_Position: 0.31 - m_LimitRange: 0 - m_Range: {x: 0, y: 1} - m_Friction: 1 - m_MotorSpeed: 0 - m_MotorForce: Infinity - m_Compliance: 0 - m_ClampAtEnds: 1 - currentEdge: - edgeIndex: 30 - coordinate: 0.069999695 - firstEdge: - edgeIndex: 0 - coordinate: -3.4028235e+38 - lastEdge: - edgeIndex: 96 - coordinate: 3.4028235e+38 - breakThreshold: Infinity ---- !u!1 &506459881 stripped -GameObject: - m_CorrespondingSourceObject: {fileID: 100000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - m_PrefabInstance: {fileID: 421764872} - m_PrefabAsset: {fileID: 0} ---- !u!64 &506459882 -MeshCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 506459881} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 5 - m_Convex: 0 - m_CookingOptions: 30 - m_Mesh: {fileID: 4300000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} ---- !u!114 &506459883 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 506459881} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6757b231cedd544c583ef8aeaf773b2a, type: 3} - m_Name: - m_EditorClassIdentifier: - thickness: 0 - inverted: 0 - material: {fileID: 0} - filter: -65535 - m_SourceCollider: {fileID: 506459882} - m_DistanceField: {fileID: 11400000, guid: 5eb5ff1af3a3f4a14977448198c232ae, type: 2} ---- !u!1 &571024693 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 571024694} - - component: {fileID: 571024696} - - component: {fileID: 571024695} - m_Layer: 0 - m_Name: Cube (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &571024694 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 571024693} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -1.88, y: 0.929, z: 0} - m_LocalScale: {x: 3, y: 0.058823526, z: 0.3333333} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 452639195} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!23 &571024695 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 571024693} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 4294967295 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 1 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &571024696 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 571024693} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!850595691 &664654699 -LightingSettings: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Settings.lighting - serializedVersion: 9 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 1 - m_RealtimeEnvironmentLighting: 1 - m_BounceScale: 1 - m_AlbedoBoost: 1 - m_IndirectOutputScale: 1 - m_UsingShadowmask: 0 - m_BakeBackend: 1 - m_LightmapMaxSize: 1024 - m_LightmapSizeFixed: 0 - m_UseMipmapLimits: 1 - m_BakeResolution: 40 - m_Padding: 2 - m_LightmapCompression: 3 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 0 - m_CompAOExponentDirect: 0 - m_ExtractAO: 0 - m_MixedBakeMode: 1 - m_LightmapsBakeMode: 1 - m_FilterMode: 1 - m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} - m_ExportTrainingData: 0 - m_EnableWorkerProcessBaking: 1 - m_TrainingDataDestination: TrainingData - m_RealtimeResolution: 2 - m_ForceWhiteAlbedo: 0 - m_ForceUpdates: 0 - m_PVRCulling: 1 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 512 - m_PVREnvironmentSampleCount: 512 - m_PVREnvironmentReferencePointCount: 2048 - m_LightProbeSampleCountMultiplier: 4 - m_PVRBounces: 2 - m_PVRMinBounces: 2 - m_PVREnvironmentImportanceSampling: 0 - m_PVRFilteringMode: 2 - m_PVRDenoiserTypeDirect: 0 - m_PVRDenoiserTypeIndirect: 0 - m_PVRDenoiserTypeAO: 0 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 5 - m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_RespectSceneVisibilityWhenBakingGI: 0 ---- !u!1 &665462091 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 665462092} - - component: {fileID: 665462094} - - component: {fileID: 665462093} - m_Layer: 5 - m_Name: Text - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &665462092 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 665462091} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 282899377} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 100.29999, y: 24.400024} - m_SizeDelta: {x: 160, y: 30} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &665462093 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 665462091} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 18 - m_FontStyle: 1 - m_BestFit: 0 - m_MinSize: 5 - m_MaxSize: 200 - m_Alignment: 0 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 1 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: Use W and S to move the cable car. Press the spacebar to toggle its motor - on/off. ---- !u!222 &665462094 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 665462091} - m_CullTransparentMesh: 0 ---- !u!1 &669702487 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 669702488} - - component: {fileID: 669702490} - - component: {fileID: 669702489} - m_Layer: 0 - m_Name: Cube (2) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &669702488 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 669702487} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0.7071068, z: 0, w: 0.7071068} - m_LocalPosition: {x: 0, y: 0.929, z: 1.79} - m_LocalScale: {x: 3, y: 0.058823526, z: 0.3333333} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 452639195} - m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} ---- !u!23 &669702489 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 669702487} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 4294967295 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 1 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &669702490 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 669702487} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!1 &752782995 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 752782996} - - component: {fileID: 752782998} - - component: {fileID: 752782997} - m_Layer: 0 - m_Name: Cube - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &752782996 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 752782995} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 1.82, y: 0.929, z: 0} - m_LocalScale: {x: 3, y: 0.058823526, z: 0.3333333} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1569702937} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!23 &752782997 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 752782995} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 4294967295 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 1 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &752782998 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 752782995} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!1 &754643804 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 754643806} - - component: {fileID: 754643805} - m_Layer: 0 - m_Name: Obi Solver - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &754643805 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 754643804} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9d174fab52f0c4b8399f25d5c3ea524c, type: 3} - m_Name: - m_EditorClassIdentifier: - simulateWhenInvisible: 1 - m_Backend: 1 - substeps: 8 - maxStepsPerFrame: 1 - synchronization: 2 - parameters: - mode: 0 - interpolation: 0 - gravity: {x: 0, y: -9.81, z: 0} - ambientWind: {x: 0, y: 0, z: 0} - foamGravityScale: 1 - damping: 0.2 - maxAnisotropy: 3 - sleepThreshold: 0.00001 - maxVelocity: 50 - maxAngularVelocity: 20 - collisionMargin: 0.02 - maxDepenetration: 10 - colliderCCD: 1 - particleCCD: 0 - shockPropagation: 0 - surfaceCollisionIterations: 8 - surfaceCollisionTolerance: 0.005 - diffusionMask: {x: 1, y: 1, z: 1, w: 1} - m_MaxSurfaceChunks: 32768 - maxQueryResults: 8192 - maxFoamParticles: 8192 - maxParticleNeighbors: 128 - maxParticleContacts: 6 - useLimits: 0 - killOffLimitsParticles: 0 - boundaryLimits: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 5, y: 5, z: 5} - gravity: {x: 0, y: -9.81, z: 0} - gravitySpace: 1 - ambientWind: {x: 0, y: 0, z: 0} - windSpace: 1 - foamSubsteps: 1 - foamMinNeighbors: 3 - foamCollisions: 0 - maxFoamVelocityStretch: 0.3 - foamRadiusScale: 1 - foamFade: {x: 0.05, y: 0.8} - foamAccelAgingRange: {x: 0.5, y: 0.8} - foamAccelAging: 4 - foamVolumeDensity: 0.1 - foamAmbientDensity: 0.02 - foamScatterColor: {r: 0.8, g: 0.75, b: 0.7, a: 1} - foamAmbientColor: {r: 0.4, g: 0.5, b: 0.6, a: 1} - worldLinearInertiaScale: 0 - worldAngularInertiaScale: 0 - synchronousSpatialQueries: 0 - distanceConstraintParameters: - evaluationOrder: 0 - iterations: 1 - SORFactor: 1 - enabled: 1 - bendingConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 - particleCollisionConstraintParameters: - evaluationOrder: 0 - iterations: 1 - SORFactor: 1 - enabled: 1 - particleFrictionConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 - collisionConstraintParameters: - evaluationOrder: 0 - iterations: 1 - SORFactor: 1 - enabled: 1 - frictionConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 - skinConstraintParameters: - evaluationOrder: 0 - iterations: 1 - SORFactor: 1 - enabled: 1 - volumeConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 - shapeMatchingConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 - tetherConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 - pinConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 - pinholeConstraintParameters: - evaluationOrder: 1 - iterations: 2 - SORFactor: 1 - enabled: 1 - stitchConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 - densityConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 - stretchShearConstraintParameters: - evaluationOrder: 0 - iterations: 1 - SORFactor: 1 - enabled: 1 - bendTwistConstraintParameters: - evaluationOrder: 0 - iterations: 1 - SORFactor: 1 - enabled: 1 - chainConstraintParameters: - evaluationOrder: 0 - iterations: 1 - SORFactor: 1 - enabled: 0 ---- !u!4 &754643806 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 754643804} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 488353306} - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1002464891 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1002464896} - - component: {fileID: 1002464895} - - component: {fileID: 1002464893} - - component: {fileID: 1002464892} - m_Layer: 0 - m_Name: Main Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!81 &1002464892 -AudioListener: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1002464891} - m_Enabled: 1 ---- !u!124 &1002464893 -Behaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1002464891} - m_Enabled: 1 ---- !u!20 &1002464895 -Camera: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1002464891} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844} - m_projectionMatrixMode: 1 - m_GateFitMode: 2 - m_FOVAxisMode: 0 - m_Iso: 200 - m_ShutterSpeed: 0.005 - m_Aperture: 16 - m_FocusDistance: 10 - m_FocalLength: 50 - m_BladeCount: 5 - m_Curvature: {x: 2, y: 11} - m_BarrelClipping: 0.25 - m_Anamorphism: 0 - m_SensorSize: {x: 36, y: 24} - m_LensShift: {x: 0, y: 0} - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - far clip plane: 1000 - field of view: 75 - orthographic: 0 - orthographic size: 5 - m_Depth: -1 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 3 - m_HDR: 0 - m_AllowMSAA: 1 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!4 &1002464896 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1002464891} - serializedVersion: 2 - m_LocalRotation: {x: 0.1763995, y: 0.25600994, z: -0.04757431, w: 0.9492517} - m_LocalPosition: {x: -2.711, y: 4.27, z: -4.417} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 21.054, y: 30.187, z: 0} ---- !u!1 &1060357566 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1060357570} - - component: {fileID: 1060357569} - - component: {fileID: 1060357568} - - component: {fileID: 1060357567} - - component: {fileID: 1060357571} - - component: {fileID: 1060357573} - - component: {fileID: 1060357572} - - component: {fileID: 1060357574} - m_Layer: 0 - m_Name: Car - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!23 &1060357567 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1060357566} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 4294967295 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 1 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!65 &1060357568 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1060357566} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!33 &1060357569 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1060357566} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1060357570 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1060357566} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: 0.22492011, z: -0, w: 0.9743773} - m_LocalPosition: {x: 0.216, y: 3.42, z: -1.774} - m_LocalScale: {x: 0.5, y: 0.3, z: 0.3} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 1537151302} - - {fileID: 1763592425} - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 25.996, z: 0} ---- !u!54 &1060357571 -Rigidbody: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1060357566} - serializedVersion: 5 - m_Mass: 2 - m_LinearDamping: 0 - m_AngularDamping: 0.05 - m_CenterOfMass: {x: 0, y: 0, z: 0} - m_InertiaTensor: {x: 1, y: 1, z: 1} - m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ImplicitCom: 1 - m_ImplicitTensor: 1 - m_UseGravity: 1 - m_IsKinematic: 0 - m_Interpolate: 0 - m_Constraints: 0 - m_CollisionDetection: 0 ---- !u!114 &1060357572 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1060357566} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 62359d80fdc0e4315ab6331b78ec5b90, type: 3} - m_Name: - m_EditorClassIdentifier: - kinematicForParticles: 0 ---- !u!114 &1060357573 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1060357566} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6757b231cedd544c583ef8aeaf773b2a, type: 3} - m_Name: - m_EditorClassIdentifier: - thickness: 0 - inverted: 0 - material: {fileID: 0} - filter: -65535 - m_SourceCollider: {fileID: 1060357568} - m_DistanceField: {fileID: 0} ---- !u!114 &1060357574 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1060357566} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: df6783efff96747d7b949f3538d1cee7, type: 3} - m_Name: - m_EditorClassIdentifier: - pinhole: {fileID: 488353318} - carSpeed: 1 ---- !u!1 &1175446144 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1175446146} - - component: {fileID: 1175446145} - m_Layer: 0 - m_Name: Directional Light - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!108 &1175446145 -Light: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1175446144} - m_Enabled: 1 - serializedVersion: 11 - m_Type: 1 - m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} - m_Intensity: 1 - m_Range: 10 - m_SpotAngle: 30 - m_InnerSpotAngle: 21.802082 - m_CookieSize: 10 - m_Shadows: - m_Type: 2 - m_Resolution: -1 - m_CustomResolution: -1 - m_Strength: 1 - m_Bias: 0.03 - m_NormalBias: 0.01 - m_NearPlane: 0.2 - m_CullingMatrixOverride: - e00: 1 - e01: 0 - e02: 0 - e03: 0 - e10: 0 - e11: 1 - e12: 0 - e13: 0 - e20: 0 - e21: 0 - e22: 1 - e23: 0 - e30: 0 - e31: 0 - e32: 0 - e33: 1 - m_UseCullingMatrixOverride: 0 - m_Cookie: {fileID: 0} - m_DrawHalo: 0 - m_Flare: {fileID: 0} - m_RenderMode: 0 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingLayerMask: 1 - m_Lightmapping: 4 - m_LightShadowCasterMode: 0 - m_AreaSize: {x: 1, y: 1} - m_BounceIntensity: 1 - m_ColorTemperature: 6570 - m_UseColorTemperature: 0 - m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} - m_UseBoundingSphereOverride: 0 - m_UseViewFrustumForShadowCasterCull: 1 - m_ForceVisible: 0 - m_ShadowRadius: 0 - m_ShadowAngle: 0 - m_LightUnit: 1 - m_LuxAtDistance: 1 - m_EnableSpotReflector: 1 ---- !u!4 &1175446146 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1175446144} - serializedVersion: 2 - m_LocalRotation: {x: 0.41595167, y: -0.26247028, z: 0.26683384, w: 0.82879025} - m_LocalPosition: {x: 0, y: 3, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 56.052002, y: -22.431002, z: 23.642} ---- !u!1 &1192568496 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1192568501} - - component: {fileID: 1192568500} - - component: {fileID: 1192568499} - - component: {fileID: 1192568498} - - component: {fileID: 1192568497} - m_Layer: 0 - m_Name: Post (2) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!54 &1192568497 -Rigidbody: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1192568496} - serializedVersion: 5 - m_Mass: 1 - m_LinearDamping: 0 - m_AngularDamping: 0.05 - m_CenterOfMass: {x: 0, y: 0, z: 0} - m_InertiaTensor: {x: 1, y: 1, z: 1} - m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ImplicitCom: 1 - m_ImplicitTensor: 1 - m_UseGravity: 1 - m_IsKinematic: 1 - m_Interpolate: 0 - m_Constraints: 0 - m_CollisionDetection: 0 ---- !u!23 &1192568498 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1192568496} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 4294967295 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 1 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!136 &1192568499 -CapsuleCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1192568496} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: 0.5 - m_Height: 2 - m_Direction: 1 - m_Center: {x: 0, y: 0, z: 0} ---- !u!33 &1192568500 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1192568496} - m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1192568501 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1192568496} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0.8870109, z: 0, w: 0.46174863} - m_LocalPosition: {x: 3, y: 2, z: 2} - m_LocalScale: {x: 0.3, y: 2, z: 0.3} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 1921533333} - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 125, z: 0} ---- !u!1 &1327725106 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1327725109} - - component: {fileID: 1327725108} - - component: {fileID: 1327725107} - m_Layer: 0 - m_Name: EventSystem - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1327725107 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1327725106} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3} - m_Name: - m_EditorClassIdentifier: - m_SendPointerHoverToParent: 1 - m_HorizontalAxis: Horizontal - m_VerticalAxis: Vertical - m_SubmitButton: Submit - m_CancelButton: Cancel - m_InputActionsPerSecond: 10 - m_RepeatDelay: 0.5 - m_ForceModuleActive: 0 ---- !u!114 &1327725108 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1327725106} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} - m_Name: - m_EditorClassIdentifier: - m_FirstSelected: {fileID: 0} - m_sendNavigationEvents: 1 - m_DragThreshold: 5 ---- !u!4 &1327725109 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1327725106} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1359249589 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1359249594} - - component: {fileID: 1359249593} - - component: {fileID: 1359249592} - - component: {fileID: 1359249591} - - component: {fileID: 1359249590} - m_Layer: 0 - m_Name: Post (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!54 &1359249590 -Rigidbody: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1359249589} - serializedVersion: 5 - m_Mass: 1 - m_LinearDamping: 0 - m_AngularDamping: 0.05 - m_CenterOfMass: {x: 0, y: 0, z: 0} - m_InertiaTensor: {x: 1, y: 1, z: 1} - m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ImplicitCom: 1 - m_ImplicitTensor: 1 - m_UseGravity: 1 - m_IsKinematic: 1 - m_Interpolate: 0 - m_Constraints: 0 - m_CollisionDetection: 0 ---- !u!23 &1359249591 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1359249589} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 4294967295 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 1 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!136 &1359249592 -CapsuleCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1359249589} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: 0.5 - m_Height: 2 - m_Direction: 1 - m_Center: {x: 0, y: 0, z: 0} ---- !u!33 &1359249593 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1359249589} - m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1359249594 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1359249589} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0.7071068, z: 0, w: 0.7071068} - m_LocalPosition: {x: -1.51, y: 1.96, z: 2.69} - m_LocalScale: {x: 0.3, y: 2, z: 0.3} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 158742033} - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} ---- !u!1 &1537151301 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1537151302} - - component: {fileID: 1537151304} - - component: {fileID: 1537151303} - m_Layer: 0 - m_Name: PinholeTarget - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1537151302 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1537151301} - serializedVersion: 2 - m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} - m_LocalPosition: {x: -0.3, y: 0.5, z: 0} - m_LocalScale: {x: 10, y: 25, z: 25} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1060357570} - m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} ---- !u!23 &1537151303 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1537151301} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 4294967295 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 1 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &1537151304 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1537151301} - m_Mesh: {fileID: 4300000, guid: 70b5250dc71ea4b35987751a9843d8d6, type: 3} ---- !u!1 &1569702932 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1569702937} - - component: {fileID: 1569702936} - - component: {fileID: 1569702935} - - component: {fileID: 1569702934} - - component: {fileID: 1569702933} - m_Layer: 0 - m_Name: Post (4) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!54 &1569702933 -Rigidbody: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1569702932} - serializedVersion: 5 - m_Mass: 1 - m_LinearDamping: 0 - m_AngularDamping: 0.05 - m_CenterOfMass: {x: 0, y: 0, z: 0} - m_InertiaTensor: {x: 1, y: 1, z: 1} - m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ImplicitCom: 1 - m_ImplicitTensor: 1 - m_UseGravity: 1 - m_IsKinematic: 1 - m_Interpolate: 0 - m_Constraints: 0 - m_CollisionDetection: 0 ---- !u!23 &1569702934 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1569702932} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 4294967295 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 1 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!136 &1569702935 -CapsuleCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1569702932} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: 0.5 - m_Height: 2 - m_Direction: 1 - m_Center: {x: 0, y: 0, z: 0} ---- !u!33 &1569702936 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1569702932} - m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1569702937 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1569702932} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0.8870109, z: 0, w: 0.46174863} - m_LocalPosition: {x: -0.37, y: 2, z: -0.59} - m_LocalScale: {x: 0.3, y: 2, z: 0.3} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 752782996} - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 125, z: 0} ---- !u!1 &1625299419 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1625299420} - - component: {fileID: 1625299423} - - component: {fileID: 1625299422} - - component: {fileID: 1625299421} - - component: {fileID: 1625299424} - m_Layer: 0 - m_Name: Post - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1625299420 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1625299419} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -4, y: 1.96, z: 0} - m_LocalScale: {x: 0.3, y: 2, z: 0.3} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 352165316} - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!23 &1625299421 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1625299419} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 4294967295 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 1 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!136 &1625299422 -CapsuleCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1625299419} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: 0.5 - m_Height: 2 - m_Direction: 1 - m_Center: {x: 0, y: 0, z: 0} ---- !u!33 &1625299423 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1625299419} - m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0} ---- !u!54 &1625299424 -Rigidbody: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1625299419} - serializedVersion: 5 - m_Mass: 1 - m_LinearDamping: 0 - m_AngularDamping: 0.05 - m_CenterOfMass: {x: 0, y: 0, z: 0} - m_InertiaTensor: {x: 1, y: 1, z: 1} - m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ImplicitCom: 1 - m_ImplicitTensor: 1 - m_UseGravity: 1 - m_IsKinematic: 1 - m_Interpolate: 0 - m_Constraints: 0 - m_CollisionDetection: 0 ---- !u!1 &1763592424 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1763592425} - - component: {fileID: 1763592427} - - component: {fileID: 1763592426} - m_Layer: 0 - m_Name: PinholeTarget (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1763592425 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1763592424} - serializedVersion: 2 - m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} - m_LocalPosition: {x: 0.3, y: 0.5, z: 0} - m_LocalScale: {x: 10, y: 25, z: 25} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1060357570} - m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} ---- !u!23 &1763592426 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1763592424} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 4294967295 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 1 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &1763592427 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1763592424} - m_Mesh: {fileID: 4300000, guid: 70b5250dc71ea4b35987751a9843d8d6, type: 3} ---- !u!1 &1921533332 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1921533333} - - component: {fileID: 1921533335} - - component: {fileID: 1921533334} - m_Layer: 0 - m_Name: Cube - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1921533333 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1921533332} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 1.82, y: 0.929, z: 0} - m_LocalScale: {x: 3, y: 0.058823526, z: 0.3333333} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1192568501} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!23 &1921533334 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1921533332} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 4294967295 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 1 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &1921533335 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1921533332} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!1 &2046597303 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2046597305} - - component: {fileID: 2046597304} - m_Layer: 0 - m_Name: BurstCollisionWorld - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &2046597304 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2046597303} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f1a161c4294214a4fbcb7e9e94800494, type: 3} - m_Name: - m_EditorClassIdentifier: - cellSpans: - m_AlignBytes: 16 ---- !u!4 &2046597305 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2046597303} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &2087273467 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2087273468} - - component: {fileID: 2087273472} - - component: {fileID: 2087273471} - - component: {fileID: 2087273470} - - component: {fileID: 2087273469} - m_Layer: 5 - m_Name: FPSDisplay - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &2087273468 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2087273467} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 282899377} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 99, y: -31} - m_SizeDelta: {x: 160, y: 30} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &2087273469 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2087273467} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: cfabb0440166ab443bba8876756fdfa9, type: 3} - m_Name: - m_EditorClassIdentifier: - m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5} - m_EffectDistance: {x: 1, y: -1} - m_UseGraphicAlpha: 1 ---- !u!114 &2087273470 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2087273467} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f14f49b61044e49ebb2f29511f2b3f41, type: 3} - m_Name: - m_EditorClassIdentifier: - updateInterval: 0.5 - showMedian: 0 - medianLearnrate: 0.05 ---- !u!114 &2087273471 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2087273467} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 20 - m_FontStyle: 0 - m_BestFit: 0 - m_MinSize: 1 - m_MaxSize: 40 - m_Alignment: 0 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 1 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: ---- !u!222 &2087273472 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2087273467} - m_CullTransparentMesh: 0 ---- !u!1660057539 &9223372036854775807 -SceneRoots: - m_ObjectHideFlags: 0 - m_Roots: - - {fileID: 1002464896} - - {fileID: 421764872} - - {fileID: 1175446146} - - {fileID: 1625299420} - - {fileID: 1359249594} - - {fileID: 1192568501} - - {fileID: 1569702937} - - {fileID: 452639195} - - {fileID: 1060357570} - - {fileID: 282899377} - - {fileID: 1327725109} - - {fileID: 754643806} - - {fileID: 2046597305} diff --git a/Assets/Obi/Samples/RopeAndRod/CableCar.unity.meta b/Assets/Obi/Samples/RopeAndRod/CableCar.unity.meta deleted file mode 100644 index ec65ee589..000000000 --- a/Assets/Obi/Samples/RopeAndRod/CableCar.unity.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 78725675a368c4503978c7bd3dbc2778 -labels: -- ObiRope -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Samples/RopeAndRod/Chains.unity b/Assets/Obi/Samples/RopeAndRod/Chains.unity index 2bce92310..2f80c7e15 100644 --- a/Assets/Obi/Samples/RopeAndRod/Chains.unity +++ b/Assets/Obi/Samples/RopeAndRod/Chains.unity @@ -43,7 +43,7 @@ RenderSettings: LightmapSettings: m_ObjectHideFlags: 0 serializedVersion: 13 - m_BakeOnSceneLoad: 0 + m_BakeOnSceneLoad: 1 m_GISettings: serializedVersion: 2 m_BounceScale: 1 @@ -388,7 +388,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 0} filter: -65535 m_SourceCollider: {fileID: 34917044} @@ -560,7 +559,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 0} filter: -65535 m_SourceCollider: {fileID: 37255351} @@ -732,7 +730,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 0} filter: -65535 m_SourceCollider: {fileID: 56383759} @@ -971,7 +968,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 0} filter: -65535 m_SourceCollider: {fileID: 447687749} @@ -1016,7 +1012,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 11400000, guid: d368f2c47473d4bfb8dd9f08073cb403, type: 2} filter: -65535 m_SourceCollider: {fileID: 506459882} @@ -1188,57 +1183,10 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 0} filter: -65535 m_SourceCollider: {fileID: 512808550} m_DistanceField: {fileID: 0} ---- !u!1 &632392820 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 632392822} - - component: {fileID: 632392821} - m_Layer: 0 - m_Name: BurstCollisionWorld - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &632392821 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 632392820} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f1a161c4294214a4fbcb7e9e94800494, type: 3} - m_Name: - m_EditorClassIdentifier: - cellSpans: - m_AlignBytes: 16 ---- !u!4 &632392822 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 632392820} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &870807626 GameObject: m_ObjectHideFlags: 0 @@ -1288,6 +1236,7 @@ GameObject: - component: {fileID: 1002464895} - component: {fileID: 1002464893} - component: {fileID: 1002464892} + - component: {fileID: 1002464897} m_Layer: 0 m_Name: Main Camera m_TagString: MainCamera @@ -1377,6 +1326,26 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1002464897 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1002464891} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 62e83a599724f45a4aa337d74764e572, type: 3} + m_Name: + m_EditorClassIdentifier: + skin: {fileID: 11400000, guid: b90d3c214c99743b0865fc0e0d1f1a15, type: 2} + threadColor: {r: 0, g: 1, b: 1, a: 1} + taskColor: {r: 0, g: 1, b: 0, a: 1} + parallelTaskColor: {r: 1, g: 0.8, b: 0.2, a: 1} + renderTaskColor: {r: 0.2, g: 0.7, b: 1, a: 1} + defaultTaskColor: {r: 1, g: 0.5, b: 0.2, a: 1} + showPercentages: 0 + profileThrottle: 30 --- !u!1 &1175446144 GameObject: m_ObjectHideFlags: 0 @@ -1641,7 +1610,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 0} filter: -65535 m_SourceCollider: {fileID: 1225692701} @@ -1681,13 +1649,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} m_Name: m_EditorClassIdentifier: - solverIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b000000 - m_AlignBytes: 16 - groupID: 1 + solverIndices: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b000000 m_CollisionMaterial: {fileID: 0} m_SurfaceCollisions: 0 - m_MassScale: 1 m_SelfCollisions: 0 restLength_: 5.092446 elements: @@ -1806,9 +1770,6 @@ MonoBehaviour: restLength: 0.21691507 constraintForce: 0 tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 m_RopeBlueprint: {fileID: 11400000, guid: 9b7a30b754796421d9e0b869d8eb345b, type: 2} tearingEnabled: 0 tearResistanceMultiplier: 1000 @@ -1834,26 +1795,14 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 09ac962c0743c400aa230ebf871b6156, type: 3} m_Name: m_EditorClassIdentifier: - linkMesh: {fileID: 4300000, guid: 70b5250dc71ea4b35987751a9843d8d6, type: 3} - linkMaterial: {fileID: 2100000, guid: edc856900ac3941a98996e21e91e215e, type: 2} + linkInstances: [] + randomizeLinks: 1 linkScale: {x: 34, y: 34, z: 34} + linkPrefabs: + - {fileID: 116810, guid: 1a25eaebcccc14ffeabd9b15641f8b51, type: 3} + - {fileID: 116810, guid: 2d2a7dadfeecb4ffc9bdbfa8ae0b4727, type: 3} twistAnchor: 0 - linkTwist: 0 - linkModifiers: - - translation: {x: 0, y: 0, z: 0} - scale: {x: 1, y: 1, z: 1} - rotation: {x: 0, y: 0, z: 0} - - translation: {x: 0, y: 0, z: 0} - scale: {x: 0, y: 0, z: 0} - rotation: {x: 0, y: 0, z: 0} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 + sectionTwist: 90 --- !u!114 &1346965644 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1866,26 +1815,12 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 09ac962c0743c400aa230ebf871b6156, type: 3} m_Name: m_EditorClassIdentifier: - linkMesh: {fileID: 4300000, guid: 70b5250dc71ea4b35987751a9843d8d6, type: 3} - linkMaterial: {fileID: 2100000, guid: b74081a5a5bbf418ea9f95bfec18f393, type: 2} - linkScale: {x: 34, y: 34, z: 34} + linkInstances: [] + randomizeLinks: 0 + linkScale: {x: 1, y: 1, z: 1} + linkPrefabs: [] twistAnchor: 0 - linkTwist: 0 - linkModifiers: - - translation: {x: 0, y: 0, z: 0} - scale: {x: 0, y: 0, z: 0} - rotation: {x: 0, y: 0, z: 0} - - translation: {x: 0, y: 0, z: 0} - scale: {x: 1, y: 1, z: 1} - rotation: {x: 0, y: 0, z: 90} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 + sectionTwist: 0 --- !u!114 &1346965645 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1903,9 +1838,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: 7546284794258584817, guid: 9b7a30b754796421d9e0b869d8eb345b, type: 2} m_AttachmentType: 1 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &1346965646 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1923,9 +1857,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: -4517029930201779066, guid: 9b7a30b754796421d9e0b869d8eb345b, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &1346965647 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1941,7 +1874,6 @@ MonoBehaviour: decimation: 0 smoothing: 0 twist: 0 - indexInSystem: 0 --- !u!114 &1346965648 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1959,9 +1891,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: -53998285165153434, guid: 9b7a30b754796421d9e0b869d8eb345b, type: 2} m_AttachmentType: 1 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!4 &1346965650 Transform: m_ObjectHideFlags: 0 @@ -2144,11 +2075,56 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 0} filter: -65535 m_SourceCollider: {fileID: 1535267388} m_DistanceField: {fileID: 0} +--- !u!1 &1619481825 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1619481827} + - component: {fileID: 1619481826} + m_Layer: 0 + m_Name: BurstCollisionWorld + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1619481826 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1619481825} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f1a161c4294214a4fbcb7e9e94800494, type: 3} + m_Name: + m_EditorClassIdentifier: Obi::Obi.BurstColliderWorld + cellSpans: + m_AlignBytes: 16 +--- !u!4 &1619481827 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1619481825} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1715322543 GameObject: m_ObjectHideFlags: 0 @@ -2450,6 +2426,7 @@ GameObject: m_Component: - component: {fileID: 2102841797} - component: {fileID: 2102841796} + - component: {fileID: 2102841795} m_Layer: 0 m_Name: Obi Solver m_TagString: Untagged @@ -2457,6 +2434,21 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 +--- !u!114 &2102841795 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2102841794} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1d9704d540ac448439a425526f6b2986, type: 3} + m_Name: + m_EditorClassIdentifier: + solvers: + - {fileID: 2102841796} + substeps: 4 --- !u!114 &2102841796 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2471,57 +2463,23 @@ MonoBehaviour: m_EditorClassIdentifier: simulateWhenInvisible: 1 m_Backend: 1 - substeps: 4 - maxStepsPerFrame: 1 - synchronization: 0 parameters: mode: 0 interpolation: 0 gravity: {x: 0, y: -9.81, z: 0} - ambientWind: {x: 0, y: 0, z: 0} - foamGravityScale: 1 damping: 0.5 maxAnisotropy: 3 sleepThreshold: 0.001 - maxVelocity: 50 - maxAngularVelocity: 20 collisionMargin: 0.02 maxDepenetration: 10 - colliderCCD: 1 - particleCCD: 0 + continuousCollisionDetection: 1 shockPropagation: 0 surfaceCollisionIterations: 8 surfaceCollisionTolerance: 0.005 - diffusionMask: {x: 1, y: 1, z: 1, w: 1} - m_MaxSurfaceChunks: 32768 - maxQueryResults: 8192 - maxFoamParticles: 8192 - maxParticleNeighbors: 128 - maxParticleContacts: 6 - useLimits: 0 - killOffLimitsParticles: 0 - boundaryLimits: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 5, y: 5, z: 5} gravity: {x: 0, y: -9.81, z: 0} gravitySpace: 1 - ambientWind: {x: 0, y: 0, z: 0} - windSpace: 1 - foamSubsteps: 1 - foamMinNeighbors: 3 - foamCollisions: 0 - maxFoamVelocityStretch: 0.3 - foamRadiusScale: 1 - foamFade: {x: 0.05, y: 0.8} - foamAccelAgingRange: {x: 0.5, y: 0.8} - foamAccelAging: 4 - foamVolumeDensity: 0.1 - foamAmbientDensity: 0.02 - foamScatterColor: {r: 0.8, g: 0.75, b: 0.7, a: 1} - foamAmbientColor: {r: 0.4, g: 0.5, b: 0.6, a: 1} worldLinearInertiaScale: 0 worldAngularInertiaScale: 0 - synchronousSpatialQueries: 0 distanceConstraintParameters: evaluationOrder: 0 iterations: 5 @@ -2577,11 +2535,6 @@ MonoBehaviour: iterations: 2 SORFactor: 1 enabled: 1 - pinholeConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 stitchConstraintParameters: evaluationOrder: 1 iterations: 5 @@ -2635,4 +2588,4 @@ SceneRoots: - {fileID: 1804369595} - {fileID: 1715322546} - {fileID: 870807627} - - {fileID: 632392822} + - {fileID: 1619481827} diff --git a/Assets/Obi/Samples/RopeAndRod/CharacterTentacles.unity b/Assets/Obi/Samples/RopeAndRod/CharacterTentacles.unity index e4a27b50e..486d0295d 100644 --- a/Assets/Obi/Samples/RopeAndRod/CharacterTentacles.unity +++ b/Assets/Obi/Samples/RopeAndRod/CharacterTentacles.unity @@ -94,7 +94,7 @@ LightmapSettings: m_TrainingDataDestination: TrainingData m_LightProbeSampleCountMultiplier: 4 m_LightingDataAsset: {fileID: 0} - m_LightingSettings: {fileID: 135660571} + m_LightingSettings: {fileID: 4890085278179872738, guid: 15d9e0b9bae5bee4facadf87959c6061, type: 2} --- !u!196 &5 NavMeshSettings: serializedVersion: 2 @@ -119,67 +119,6 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} ---- !u!850595691 &135660571 -LightingSettings: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Settings.lighting - serializedVersion: 9 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 1 - m_RealtimeEnvironmentLighting: 1 - m_BounceScale: 1 - m_AlbedoBoost: 1 - m_IndirectOutputScale: 1 - m_UsingShadowmask: 0 - m_BakeBackend: 1 - m_LightmapMaxSize: 1024 - m_LightmapSizeFixed: 0 - m_UseMipmapLimits: 1 - m_BakeResolution: 40 - m_Padding: 2 - m_LightmapCompression: 3 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 0 - m_CompAOExponentDirect: 0 - m_ExtractAO: 0 - m_MixedBakeMode: 1 - m_LightmapsBakeMode: 1 - m_FilterMode: 1 - m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} - m_ExportTrainingData: 0 - m_EnableWorkerProcessBaking: 1 - m_TrainingDataDestination: TrainingData - m_RealtimeResolution: 2 - m_ForceWhiteAlbedo: 0 - m_ForceUpdates: 0 - m_PVRCulling: 1 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 512 - m_PVREnvironmentSampleCount: 512 - m_PVREnvironmentReferencePointCount: 2048 - m_LightProbeSampleCountMultiplier: 4 - m_PVRBounces: 2 - m_PVRMinBounces: 2 - m_PVREnvironmentImportanceSampling: 0 - m_PVRFilteringMode: 2 - m_PVRDenoiserTypeDirect: 0 - m_PVRDenoiserTypeIndirect: 0 - m_PVRDenoiserTypeAO: 0 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 5 - m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_RespectSceneVisibilityWhenBakingGI: 0 --- !u!1 &283647873 GameObject: m_ObjectHideFlags: 0 @@ -377,7 +316,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 11400000, guid: c73079cca10924a80871331c66b4ad4b, type: 2} filter: -65535 m_SourceCollider: {fileID: 506459882} @@ -396,51 +334,51 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: -9172040529234819637, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: -0.0000010492962 + value: -0.00000035347645 objectReference: {fileID: 0} - target: {fileID: -9172040529234819637, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: -0.2534013 + value: -0.25340143 objectReference: {fileID: 0} - target: {fileID: -9172040529234819637, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: -0.000000015490253 + value: -0.00000013932136 objectReference: {fileID: 0} - target: {fileID: -9127106894692312864, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.x - value: -0.07600576 + value: -0.07600623 objectReference: {fileID: 0} - target: {fileID: -9127106894692312864, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.y - value: -0.0000015074818 + value: -0.00000025504167 objectReference: {fileID: 0} - target: {fileID: -9127106894692312864, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.z - value: -0.00000029842522 + value: -0.00000018258288 objectReference: {fileID: 0} - target: {fileID: -9127106894692312864, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: -0.00000042157708 + value: -0.000000014007303 objectReference: {fileID: 0} - target: {fileID: -9127106894692312864, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: 0.00009201089 + value: 0.000091485614 objectReference: {fileID: 0} - target: {fileID: -9127106894692312864, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: 0.0000010680768 + value: 0.00000020098787 objectReference: {fileID: 0} - target: {fileID: -9062284935739990963, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.x - value: -0.13803966 + value: -0.13803943 objectReference: {fileID: 0} - target: {fileID: -9062284935739990963, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.y - value: 0.00000073331586 + value: 0.00000051572107 objectReference: {fileID: 0} - target: {fileID: -9062284935739990963, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.z - value: 8.111622e-24 + value: 1.9185334e-23 objectReference: {fileID: 0} - target: {fileID: -9062284935739990963, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.w @@ -448,31 +386,31 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: -9062284935739990963, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: -2.7034068e-23 + value: 5.897394e-25 objectReference: {fileID: 0} - target: {fileID: -9062284935739990963, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: 1.2354341e-23 + value: -1.3514626e-23 objectReference: {fileID: 0} - target: {fileID: -9062284935739990963, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: 0.022107342 + value: 0.02210797 objectReference: {fileID: 0} - target: {fileID: -8713422515971011683, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.w - value: -0.09805872 + value: -0.09805851 objectReference: {fileID: 0} - target: {fileID: -8713422515971011683, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: 0.75200963 + value: 0.75200945 objectReference: {fileID: 0} - target: {fileID: -8713422515971011683, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: -0.11493167 + value: -0.114931755 objectReference: {fileID: 0} - target: {fileID: -8713422515971011683, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: 0.6416048 + value: 0.64160514 objectReference: {fileID: 0} - target: {fileID: -8679921383154817045, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_RootOrder @@ -520,43 +458,43 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: -8507949964929264032, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.x - value: 0.36056164 + value: 0.36055627 objectReference: {fileID: 0} - target: {fileID: -8507949964929264032, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.y - value: 0.000002228131 + value: 0.0000005631009 objectReference: {fileID: 0} - target: {fileID: -8507949964929264032, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.z - value: -0.120003656 + value: -0.120000735 objectReference: {fileID: 0} - target: {fileID: -8507949964929264032, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.w - value: 0.99996156 + value: 0.9999616 objectReference: {fileID: 0} - target: {fileID: -8507949964929264032, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: -0.000000043665747 + value: 0.000000014688959 objectReference: {fileID: 0} - target: {fileID: -8507949964929264032, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: 0.00000018800084 + value: 0.000000011031668 objectReference: {fileID: 0} - target: {fileID: -8507949964929264032, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: -0.008770226 + value: -0.008770917 objectReference: {fileID: 0} - target: {fileID: -8256864240980919291, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.x - value: 0.07985789 + value: 0.079857364 objectReference: {fileID: 0} - target: {fileID: -8256864240980919291, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.y - value: 0.00000037613611 + value: 0.00000019398995 objectReference: {fileID: 0} - target: {fileID: -8256864240980919291, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.z - value: -0.0000002995739 + value: -0.00000016918875 objectReference: {fileID: 0} - target: {fileID: -8256864240980919291, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.w @@ -564,15 +502,15 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: -8256864240980919291, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: -0.000000038988315 + value: 0.0000000911087 objectReference: {fileID: 0} - target: {fileID: -8256864240980919291, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: -0.021723459 + value: -0.021724027 objectReference: {fileID: 0} - target: {fileID: -8256864240980919291, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: -0.00000006747969 + value: 0.00000012005526 objectReference: {fileID: 0} - target: {fileID: -7959887483407685756, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.w @@ -580,31 +518,31 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: -7959887483407685756, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: -0.0000001661601 + value: -0.00000008222498 objectReference: {fileID: 0} - target: {fileID: -7959887483407685756, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: -0.25340128 + value: -0.2534013 objectReference: {fileID: 0} - target: {fileID: -7959887483407685756, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: 0.00000016678908 + value: 0.00000015242011 objectReference: {fileID: 0} - target: {fileID: -7940801031966596053, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.w - value: 0.99978685 + value: 0.9997869 objectReference: {fileID: 0} - target: {fileID: -7940801031966596053, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: 0.00000008968509 + value: 0.000000090835755 objectReference: {fileID: 0} - target: {fileID: -7940801031966596053, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: -0.020645771 + value: -0.020644648 objectReference: {fileID: 0} - target: {fileID: -7940801031966596053, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: 0.00000055668374 + value: 0.000000045180247 objectReference: {fileID: 0} - target: {fileID: -7477343846450812277, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.x @@ -632,59 +570,55 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: -7272726868776662169, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.x - value: -0.07985784 + value: -0.07985702 objectReference: {fileID: 0} - target: {fileID: -7272726868776662169, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.y - value: -0.00000080354766 + value: -0.00000034656287 objectReference: {fileID: 0} - target: {fileID: -7272726868776662169, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.z - value: -0.0000005768561 + value: 0.000000029655894 objectReference: {fileID: 0} - target: {fileID: -7272726868776662169, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.w - value: 0.9997641 + value: 0.999764 objectReference: {fileID: 0} - target: {fileID: -7272726868776662169, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: 0.00000014191231 + value: -0.000000011411709 objectReference: {fileID: 0} - target: {fileID: -7272726868776662169, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: -0.021724235 + value: -0.0217239 objectReference: {fileID: 0} - target: {fileID: -7272726868776662169, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: 0.00000062396185 + value: 0.000000069100224 objectReference: {fileID: 0} - target: {fileID: -6926694757232413474, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.x - value: -0.11609173 + value: -0.11609162 objectReference: {fileID: 0} - target: {fileID: -6926694757232413474, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.y - value: -0.00000062014124 + value: -0.0000005731995 objectReference: {fileID: 0} - target: {fileID: -6926694757232413474, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.z - value: -2.5339291e-23 - objectReference: {fileID: 0} - - target: {fileID: -6926694757232413474, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} - propertyPath: m_LocalRotation.w - value: 0.99978566 + value: -1.0095917e-23 objectReference: {fileID: 0} - target: {fileID: -6926694757232413474, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: 1.324855e-23 + value: -1.0545787e-26 objectReference: {fileID: 0} - target: {fileID: -6926694757232413474, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: -1.32212165e-23 + value: 1.296086e-23 objectReference: {fileID: 0} - target: {fileID: -6926694757232413474, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: 0.020704893 + value: 0.020704772 objectReference: {fileID: 0} - target: {fileID: -6781684182533653455, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.w @@ -692,55 +626,55 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: -6781684182533653455, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: -0.00000035827992 + value: -0.000000027877974 objectReference: {fileID: 0} - target: {fileID: -6781684182533653455, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: -0.014716088 + value: -0.01471638 objectReference: {fileID: 0} - target: {fileID: -6781684182533653455, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: -0.00000051379055 + value: -0.00000016789998 objectReference: {fileID: 0} - target: {fileID: -6674389897051338689, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.x - value: -0.09154363 + value: -0.09154375 objectReference: {fileID: 0} - target: {fileID: -6674389897051338689, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.y - value: 0.019814389 + value: 0.019813953 objectReference: {fileID: 0} - target: {fileID: -6674389897051338689, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.z - value: 0.029995376 + value: 0.029995024 objectReference: {fileID: 0} - target: {fileID: -6674389897051338689, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.w - value: 0.9868012 + value: 0.9868013 objectReference: {fileID: 0} - target: {fileID: -6674389897051338689, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: 0.042868167 + value: 0.04286804 objectReference: {fileID: 0} - target: {fileID: -6674389897051338689, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: 0.1501125 + value: 0.1501124 objectReference: {fileID: 0} - target: {fileID: -6674389897051338689, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: -0.043033816 + value: -0.04303353 objectReference: {fileID: 0} - target: {fileID: -6573219111723820052, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.x - value: 0.07747036 + value: 0.07746903 objectReference: {fileID: 0} - target: {fileID: -6573219111723820052, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.y - value: -0.000000062956175 + value: -0.00000013306443 objectReference: {fileID: 0} - target: {fileID: -6573219111723820052, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.z - value: 0.00000022474865 + value: 0.00000014895568 objectReference: {fileID: 0} - target: {fileID: -6573219111723820052, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.w @@ -748,115 +682,111 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: -6573219111723820052, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: 0.000000004672845 + value: 0.000000038067565 objectReference: {fileID: 0} - target: {fileID: -6573219111723820052, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: -0.008621245 + value: -0.008619632 objectReference: {fileID: 0} - target: {fileID: -6573219111723820052, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: 0.00000027842057 - objectReference: {fileID: 0} - - target: {fileID: -6417551873659808624, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} - propertyPath: m_LocalRotation.w - value: 0.99986434 + value: -0.000000022024029 objectReference: {fileID: 0} - target: {fileID: -6417551873659808624, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: -0.00000067800266 + value: -0.0000002458691 objectReference: {fileID: 0} - target: {fileID: -6417551873659808624, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: 0.016475664 + value: 0.016476635 objectReference: {fileID: 0} - target: {fileID: -6417551873659808624, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: 0.00000055879343 + value: -0.00000013411042 objectReference: {fileID: 0} - target: {fileID: -6393091041921524369, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.x - value: 0.38948995 + value: 0.38948783 objectReference: {fileID: 0} - target: {fileID: -6393091041921524369, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.y - value: -0.0000005662441 + value: -0.00000020861626 objectReference: {fileID: 0} - target: {fileID: -6393091041921524369, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.z - value: 0.0000011026862 + value: 0.00000020861631 objectReference: {fileID: 0} - target: {fileID: -6393091041921524369, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.w - value: -0.99637693 + value: 0.996377 objectReference: {fileID: 0} - target: {fileID: -6393091041921524369, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: -0.00000010173496 + value: -0.000000036327606 objectReference: {fileID: 0} - target: {fileID: -6393091041921524369, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: 0.00000014762924 + value: -0.000000055867655 objectReference: {fileID: 0} - target: {fileID: -6393091041921524369, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: 0.08504721 + value: -0.08504705 objectReference: {fileID: 0} - target: {fileID: -6258611573451978496, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.x - value: -0.06707188 + value: -0.06707275 objectReference: {fileID: 0} - target: {fileID: -6258611573451978496, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.y - value: -0.0000005421837 + value: 0.00000006884857 objectReference: {fileID: 0} - target: {fileID: -6258611573451978496, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.z - value: -0.00000026477534 + value: 0.000000018969658 objectReference: {fileID: 0} - target: {fileID: -6258611573451978496, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.w - value: 0.71317726 + value: 0.7131761 objectReference: {fileID: 0} - target: {fileID: -6258611573451978496, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: -0.0000002642057 + value: -0.00000016517498 objectReference: {fileID: 0} - target: {fileID: -6258611573451978496, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: -0.7009838 + value: -0.700985 objectReference: {fileID: 0} - target: {fileID: -6258611573451978496, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: -0.00000026777093 + value: 0.000000009968829 objectReference: {fileID: 0} - target: {fileID: -5999528792458690478, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.x - value: 0.08444421 + value: 0.08444028 objectReference: {fileID: 0} - target: {fileID: -5999528792458690478, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.y - value: 0.00000041417888 + value: 0.00000030478665 objectReference: {fileID: 0} - target: {fileID: -5999528792458690478, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.z - value: 0.0000005414325 + value: 0.00000051571277 objectReference: {fileID: 0} - target: {fileID: -5999528792458690478, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.w - value: 0.99937284 + value: 0.9993727 objectReference: {fileID: 0} - target: {fileID: -5999528792458690478, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: -0.00000025388488 + value: -0.0000002560232 objectReference: {fileID: 0} - target: {fileID: -5999528792458690478, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: 0.035412047 + value: 0.03541356 objectReference: {fileID: 0} - target: {fileID: -5999528792458690478, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: 0.00000079346563 + value: 0.00000011542316 objectReference: {fileID: 0} - target: {fileID: -5777574540501867108, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x @@ -872,103 +802,103 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: -5625989425371717735, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.x - value: 0.09620107 + value: 0.09619963 objectReference: {fileID: 0} - target: {fileID: -5625989425371717735, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.y - value: -0.0000041651533 + value: -0.0000037450247 objectReference: {fileID: 0} - target: {fileID: -5625989425371717735, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.z - value: 0.00000087866357 + value: -0.00000012138516 objectReference: {fileID: 0} - target: {fileID: -5625989425371717735, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.w - value: 0.9933716 + value: 0.9933717 objectReference: {fileID: 0} - target: {fileID: -5625989425371717735, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: -0.0000007276969 + value: -0.00000007241961 objectReference: {fileID: 0} - target: {fileID: -5625989425371717735, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: -0.11494698 + value: -0.11494669 objectReference: {fileID: 0} - target: {fileID: -5625989425371717735, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: -0.00000019915707 + value: -0.00000012544264 objectReference: {fileID: 0} - target: {fileID: -5102611502599791723, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.x - value: -0.3894925 + value: -0.38948792 objectReference: {fileID: 0} - target: {fileID: -5102611502599791723, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.y - value: 0.00000016577542 + value: 0.000000055879354 objectReference: {fileID: 0} - target: {fileID: -5102611502599791723, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.z - value: -0.00000008940697 + value: -0.000000029802322 objectReference: {fileID: 0} - target: {fileID: -5102611502599791723, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.w - value: 0.996377 + value: 0.99637693 objectReference: {fileID: 0} - target: {fileID: -5102611502599791723, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: 0.000000023014751 + value: 0.000000003835789 objectReference: {fileID: 0} - target: {fileID: -5102611502599791723, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: -0.0000001938165 + value: -0.00000003230275 objectReference: {fileID: 0} - target: {fileID: -5102611502599791723, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: -0.08504718 + value: -0.085047096 objectReference: {fileID: 0} - target: {fileID: -4705109256053941059, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.x - value: 0.08916262 + value: 0.08916188 objectReference: {fileID: 0} - target: {fileID: -4705109256053941059, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.y - value: 0.00000014660782 + value: -0.000000044923127 objectReference: {fileID: 0} - target: {fileID: -4705109256053941059, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.z - value: 0.0000008493662 + value: 0.00000018626451 objectReference: {fileID: 0} - target: {fileID: -4705109256053941059, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.w - value: 0.99993104 + value: 0.999931 objectReference: {fileID: 0} - target: {fileID: -4705109256053941059, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: 0.0000005885956 + value: 0.00000018626436 objectReference: {fileID: 0} - target: {fileID: -4705109256053941059, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: -0.011747742 + value: -0.011748751 objectReference: {fileID: 0} - target: {fileID: -4705109256053941059, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: -0.0000013411038 + value: -0.00000032782526 objectReference: {fileID: 0} - target: {fileID: -4421869768541714866, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.w - value: -0.060132556 + value: -0.060132433 objectReference: {fileID: 0} - target: {fileID: -4421869768541714866, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: 0.9060736 + value: 0.9060735 objectReference: {fileID: 0} - target: {fileID: -4421869768541714866, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: -0.13775198 + value: -0.137752 objectReference: {fileID: 0} - target: {fileID: -4421869768541714866, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: 0.39552408 + value: 0.39552405 objectReference: {fileID: 0} - target: {fileID: -3575167729457297781, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.w @@ -976,15 +906,15 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: -3575167729457297781, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: 0.0000003071598 + value: 0.0000002476626 objectReference: {fileID: 0} - target: {fileID: -3575167729457297781, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: -0.02064545 + value: -0.020644594 objectReference: {fileID: 0} - target: {fileID: -3575167729457297781, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: 0.00000009844927 + value: -0.000000045258204 objectReference: {fileID: 0} - target: {fileID: -3168850724122587569, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: 'm_Materials.Array.data[0]' @@ -992,15 +922,15 @@ PrefabInstance: objectReference: {fileID: 2100000, guid: 5c0346dbcbacd4648bec909deff79751, type: 2} - target: {fileID: -3057246181936861889, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.x - value: -0.09765314 + value: -0.097654 objectReference: {fileID: 0} - target: {fileID: -3057246181936861889, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.y - value: -0.0000018528449 + value: -0.00000036611073 objectReference: {fileID: 0} - target: {fileID: -3057246181936861889, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.z - value: 0.000000010311136 + value: -0.000000003749075 objectReference: {fileID: 0} - target: {fileID: -3057246181936861889, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.w @@ -1008,59 +938,59 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: -3057246181936861889, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: 0.00000012380465 + value: 0.000000022251575 objectReference: {fileID: 0} - target: {fileID: -3057246181936861889, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: 0.00000004935552 + value: -0.000000019825379 objectReference: {fileID: 0} - target: {fileID: -3057246181936861889, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: 0.027953576 + value: 0.027953451 objectReference: {fileID: 0} - target: {fileID: -3011178037101974448, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.w - value: 0.92407554 + value: 0.9240755 objectReference: {fileID: 0} - target: {fileID: -3011178037101974448, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: 0.00000028197525 + value: 0.00000015530905 objectReference: {fileID: 0} - target: {fileID: -3011178037101974448, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: -0.3822101 + value: -0.38221008 objectReference: {fileID: 0} - target: {fileID: -3011178037101974448, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: 0.00000041559773 + value: -0.00000006197281 objectReference: {fileID: 0} - target: {fileID: -2765548614572629195, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.x - value: 0.06707575 + value: 0.0670727 objectReference: {fileID: 0} - target: {fileID: -2765548614572629195, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.y - value: 0.00000031952973 + value: -0.0000000052219806 objectReference: {fileID: 0} - target: {fileID: -2765548614572629195, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.z - value: -0.00000045113052 + value: -0.00000035371752 objectReference: {fileID: 0} - target: {fileID: -2765548614572629195, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.w - value: 0.71317756 + value: 0.71317565 objectReference: {fileID: 0} - target: {fileID: -2765548614572629195, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: -0.0000008332994 + value: -0.00000038672738 objectReference: {fileID: 0} - target: {fileID: -2765548614572629195, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: -0.7009834 + value: -0.7009854 objectReference: {fileID: 0} - target: {fileID: -2765548614572629195, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: -0.000000019855111 + value: -8.278953e-10 objectReference: {fileID: 0} - target: {fileID: -1607268682270953884, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.x @@ -1076,103 +1006,99 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: -1607268682270953884, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.w - value: 0.9999386 + value: 0.99993867 objectReference: {fileID: 0} - target: {fileID: -1607268682270953884, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: -1.622888e-16 + value: -1.6228881e-16 objectReference: {fileID: 0} - target: {fileID: -1607268682270953884, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: -1.8379094e-16 + value: -1.8379096e-16 objectReference: {fileID: 0} - target: {fileID: -1607268682270953884, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: -0.011078295 - objectReference: {fileID: 0} - - target: {fileID: -1336073094781112630, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} - propertyPath: m_LocalRotation.w - value: 0.9999462 + value: -0.011078296 objectReference: {fileID: 0} - target: {fileID: -1336073094781112630, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: -0.00000021312617 + value: 0.000000098879 objectReference: {fileID: 0} - target: {fileID: -1336073094781112630, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: -0.010378925 + value: -0.010379857 objectReference: {fileID: 0} - target: {fileID: -1336073094781112630, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: -0.000000986678 + value: -0.000000038188134 objectReference: {fileID: 0} - target: {fileID: -1054683304811679433, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.x - value: -0.09660413 + value: -0.09660024 objectReference: {fileID: 0} - target: {fileID: -1054683304811679433, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.y - value: 0.0000019549343 + value: 0.00000036440179 objectReference: {fileID: 0} - target: {fileID: -1054683304811679433, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.z - value: -4.440892e-16 + value: -1.6653345e-16 objectReference: {fileID: 0} - target: {fileID: -1054683304811679433, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.w - value: 0.9999919 + value: 0.99999195 objectReference: {fileID: 0} - target: {fileID: -1054683304811679433, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x + value: -1.7763562e-15 + objectReference: {fileID: 0} + - target: {fileID: -1054683304811679433, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} + propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: -1054683304811679433, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} - propertyPath: m_LocalRotation.y - value: -3.552712e-15 - objectReference: {fileID: 0} - target: {fileID: -1054683304811679433, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: -0.0040304568 + value: -0.0040301573 objectReference: {fileID: 0} - target: {fileID: -749513139196117795, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.x - value: -0.025980504 + value: -0.025980879 objectReference: {fileID: 0} - target: {fileID: -749513139196117795, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.y - value: 0.0028841335 + value: 0.0028835752 objectReference: {fileID: 0} - target: {fileID: -749513139196117795, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.z - value: 0.12321715 + value: 0.12321692 objectReference: {fileID: 0} - target: {fileID: -749513139196117795, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.w - value: 0.6993337 + value: 0.69933355 objectReference: {fileID: 0} - target: {fileID: -749513139196117795, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: 0.1130452 + value: 0.11304523 objectReference: {fileID: 0} - target: {fileID: -749513139196117795, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: 0.69661605 + value: 0.69661623 objectReference: {fileID: 0} - target: {fileID: -749513139196117795, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: -0.11348706 + value: -0.11348655 objectReference: {fileID: 0} - target: {fileID: -668384516862315930, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.x - value: -0.0683766 + value: -0.068375364 objectReference: {fileID: 0} - target: {fileID: -668384516862315930, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.y - value: 0.00000027297665 + value: 0.00000043567888 objectReference: {fileID: 0} - target: {fileID: -668384516862315930, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.z - value: 1.839932e-15 + value: -1.490854e-15 objectReference: {fileID: 0} - target: {fileID: -668384516862315930, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.w @@ -1180,55 +1106,55 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: -668384516862315930, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: -0.50786996 + value: -0.5078705 objectReference: {fileID: 0} - target: {fileID: -668384516862315930, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: 0.4920044 + value: 0.4920038 objectReference: {fileID: 0} - target: {fileID: -668384516862315930, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: -0.49200338 + value: -0.49200356 objectReference: {fileID: 0} - target: {fileID: 726893922322061280, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.x - value: -0.08916246 + value: -0.089161985 objectReference: {fileID: 0} - target: {fileID: 726893922322061280, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.y - value: -0.000001291351 + value: -0.00000004194635 objectReference: {fileID: 0} - target: {fileID: 726893922322061280, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.z - value: 0.0000005438924 + value: 0.00000048428774 objectReference: {fileID: 0} - target: {fileID: 726893922322061280, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.w - value: 0.999931 + value: 0.99993104 objectReference: {fileID: 0} - target: {fileID: 726893922322061280, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: -0.00000040978173 + value: -0.00000008195633 objectReference: {fileID: 0} - target: {fileID: 726893922322061280, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: -0.011747533 + value: -0.011748425 objectReference: {fileID: 0} - target: {fileID: 726893922322061280, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: 0.0000005885956 + value: 0.0000004842874 objectReference: {fileID: 0} - target: {fileID: 848833919448333585, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.x - value: -0.07399587 + value: -0.07399583 objectReference: {fileID: 0} - target: {fileID: 848833919448333585, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.y - value: -0.00000026158523 + value: -0.0000000144355 objectReference: {fileID: 0} - target: {fileID: 848833919448333585, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.z - value: -0.00000035576522 + value: -0.00000015180558 objectReference: {fileID: 0} - target: {fileID: 848833919448333585, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.w @@ -1236,15 +1162,15 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 848833919448333585, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: 0.000000007450576 + value: 0.000000040978158 objectReference: {fileID: 0} - target: {fileID: 848833919448333585, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: -0.041633245 + value: -0.041632753 objectReference: {fileID: 0} - target: {fileID: 848833919448333585, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: -0.00000019604329 + value: -0.0000001215375 objectReference: {fileID: 0} - target: {fileID: 919132149155446097, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_Name @@ -1252,15 +1178,15 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 1002887218015374962, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.x - value: -0.0954846 + value: -0.09548417 objectReference: {fileID: 0} - target: {fileID: 1002887218015374962, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.y - value: 0.0000020772218 + value: 0.0000005920281 objectReference: {fileID: 0} - target: {fileID: 1002887218015374962, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.z - value: 5.2939566e-23 + value: 2.6253225e-27 objectReference: {fileID: 0} - target: {fileID: 1002887218015374962, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.w @@ -1268,31 +1194,31 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 1002887218015374962, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: -0.000000123532 + value: -0.000000022360005 objectReference: {fileID: 0} - target: {fileID: 1002887218015374962, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: -0.000000050034007 + value: 0.000000019703004 objectReference: {fileID: 0} - target: {fileID: 1002887218015374962, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: -0.022468971 + value: -0.022468941 objectReference: {fileID: 0} - target: {fileID: 2040772738850610504, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.w - value: 0.9998918 + value: 0.99989176 objectReference: {fileID: 0} - target: {fileID: 2040772738850610504, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: 0.0000006451799 + value: 0.00000007007278 objectReference: {fileID: 0} - target: {fileID: 2040772738850610504, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: -0.014714867 + value: -0.014716182 objectReference: {fileID: 0} - target: {fileID: 2040772738850610504, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: 0.00000026629922 + value: -0.00000008374207 objectReference: {fileID: 0} - target: {fileID: 2115105493465890901, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.w @@ -1300,31 +1226,31 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 2115105493465890901, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: 0.058945026 + value: 0.05894502 objectReference: {fileID: 0} - target: {fileID: 2115105493465890901, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: 0.3856826 + value: 0.38568267 objectReference: {fileID: 0} - target: {fileID: 2115105493465890901, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: 0.13910525 + value: 0.13910511 objectReference: {fileID: 0} - target: {fileID: 2527769708469969364, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.w - value: 0.9999462 + value: 0.9999461 objectReference: {fileID: 0} - target: {fileID: 2527769708469969364, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: -0.00000004621701 + value: -0.00000005579037 objectReference: {fileID: 0} - target: {fileID: 2527769708469969364, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: -0.010380278 + value: -0.010380306 objectReference: {fileID: 0} - target: {fileID: 2527769708469969364, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: 0.00000042109525 + value: 0.00000026966057 objectReference: {fileID: 0} - target: {fileID: 2545839310169955134, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.x @@ -1340,27 +1266,27 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 2545839310169955134, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: 2.586405e-23 + value: -5.8000204e-25 objectReference: {fileID: 0} - target: {fileID: 2545839310169955134, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: 1.4385742e-23 + value: 1.3218873e-23 objectReference: {fileID: 0} - target: {fileID: 2545839310169955134, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: 0.00024960932 + value: 0.00024904308 objectReference: {fileID: 0} - target: {fileID: 2548148072889551224, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.x - value: -0.07817269 + value: -0.07817221 objectReference: {fileID: 0} - target: {fileID: 2548148072889551224, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.y - value: 0.0000017938504 + value: 0.00000015993884 objectReference: {fileID: 0} - target: {fileID: 2548148072889551224, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.z - value: 1.665669e-15 + value: 1.0258534e-15 objectReference: {fileID: 0} - target: {fileID: 2548148072889551224, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.w @@ -1368,43 +1294,43 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 2548148072889551224, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: -1.4326946e-14 + value: -9.362882e-19 objectReference: {fileID: 0} - target: {fileID: 2548148072889551224, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: 3.607274e-15 + value: 6.5162556e-17 objectReference: {fileID: 0} - target: {fileID: 2548148072889551224, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: -0.03668081 + value: -0.03668089 objectReference: {fileID: 0} - target: {fileID: 2683500738491615210, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.x - value: 0.091541335 + value: 0.09154148 objectReference: {fileID: 0} - target: {fileID: 2683500738491615210, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.y - value: -0.019814892 + value: -0.01981489 objectReference: {fileID: 0} - target: {fileID: 2683500738491615210, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.z - value: -0.029995365 + value: -0.02999468 objectReference: {fileID: 0} - target: {fileID: 2683500738491615210, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.w - value: 0.98680127 + value: 0.9868013 objectReference: {fileID: 0} - target: {fileID: 2683500738491615210, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: 0.042868026 + value: 0.042868104 objectReference: {fileID: 0} - target: {fileID: 2683500738491615210, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: 0.15011218 + value: 0.15011251 objectReference: {fileID: 0} - target: {fileID: 2683500738491615210, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: -0.043034364 + value: -0.043033507 objectReference: {fileID: 0} - target: {fileID: 2885808408270941255, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.w @@ -1412,23 +1338,23 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 2885808408270941255, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: 0.00000033341337 + value: 0.0000002030282 objectReference: {fileID: 0} - target: {fileID: 2885808408270941255, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: 0.018016445 + value: 0.018015321 objectReference: {fileID: 0} - target: {fileID: 2885808408270941255, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: -0.0000004951142 + value: -0.000000015599644 objectReference: {fileID: 0} - target: {fileID: 3027249137484211221, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.x - value: -0.36056012 + value: -0.36055595 objectReference: {fileID: 0} - target: {fileID: 3027249137484211221, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.y - value: -0.0000008348143 + value: -0.000000091735274 objectReference: {fileID: 0} - target: {fileID: 3027249137484211221, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.z @@ -1440,79 +1366,79 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 3027249137484211221, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: 0.00000020615342 + value: 0.00000004837842 objectReference: {fileID: 0} - target: {fileID: 3027249137484211221, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: 0.00000018319605 + value: 0.00000003436716 objectReference: {fileID: 0} - target: {fileID: 3027249137484211221, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: -0.008770426 + value: -0.008770723 objectReference: {fileID: 0} - target: {fileID: 3748059883230484020, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.x - value: 0.07600952 + value: 0.07600932 objectReference: {fileID: 0} - target: {fileID: 3748059883230484020, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.y - value: 0.000003103759 + value: 0.00000334365 objectReference: {fileID: 0} - target: {fileID: 3748059883230484020, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.z - value: -0.0000006124428 + value: 0.0000007629533 objectReference: {fileID: 0} - target: {fileID: 3748059883230484020, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: 0.000000053867357 + value: -0.000000087195154 objectReference: {fileID: 0} - target: {fileID: 3748059883230484020, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: 0.00009152289 + value: 0.00009146326 objectReference: {fileID: 0} - target: {fileID: 3748059883230484020, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: 0.000000486669 + value: 0.00000014438807 objectReference: {fileID: 0} - target: {fileID: 4407419453612453932, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.x - value: -0.096200034 + value: -0.09619819 objectReference: {fileID: 0} - target: {fileID: 4407419453612453932, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.y - value: 0.0000007554088 + value: -0.00000018176283 objectReference: {fileID: 0} - target: {fileID: 4407419453612453932, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.z - value: 0.0000007054443 + value: 0.00000057005826 objectReference: {fileID: 0} - target: {fileID: 4407419453612453932, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.w - value: 0.99337167 + value: 0.9933717 objectReference: {fileID: 0} - target: {fileID: 4407419453612453932, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: 0.00000010875463 + value: 0.00000001302149 objectReference: {fileID: 0} - target: {fileID: 4407419453612453932, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: -0.1149467 + value: -0.11494673 objectReference: {fileID: 0} - target: {fileID: 4407419453612453932, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: -0.0000010473476 + value: -0.00000027911648 objectReference: {fileID: 0} - target: {fileID: 4990029417244473137, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.x - value: -0.08443848 + value: -0.08443858 objectReference: {fileID: 0} - target: {fileID: 4990029417244473137, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.y - value: -0.0000011159559 + value: -0.00000023513277 objectReference: {fileID: 0} - target: {fileID: 4990029417244473137, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.z - value: -0.0000000035768721 + value: -0.00000031256445 objectReference: {fileID: 0} - target: {fileID: 4990029417244473137, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.w @@ -1520,47 +1446,47 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4990029417244473137, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: -0.00000016915709 + value: -0.00000014378008 objectReference: {fileID: 0} - target: {fileID: 4990029417244473137, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: 0.035412762 + value: 0.03541338 objectReference: {fileID: 0} - target: {fileID: 4990029417244473137, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: -0.00000092941957 + value: -0.0000003751099 objectReference: {fileID: 0} - target: {fileID: 5146824284552866293, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.w - value: 0.9998643 + value: 0.99986434 objectReference: {fileID: 0} - target: {fileID: 5146824284552866293, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: 0.00000008195636 + value: 0.000000044703462 objectReference: {fileID: 0} - target: {fileID: 5146824284552866293, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: 0.016477132 + value: 0.01647713 objectReference: {fileID: 0} - target: {fileID: 5146824284552866293, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: -0.00000016391272 + value: -0.00000007823106 objectReference: {fileID: 0} - target: {fileID: 5536388351197450959, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.w - value: 0.9998377 + value: 0.99983776 objectReference: {fileID: 0} - target: {fileID: 5536388351197450959, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: -0.00000019371501 + value: -0.00000024586907 objectReference: {fileID: 0} - target: {fileID: 5536388351197450959, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: 0.018016273 + value: 0.018015463 objectReference: {fileID: 0} - target: {fileID: 5536388351197450959, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: 0.00000019371501 + value: 0.00000031292427 objectReference: {fileID: 0} - target: {fileID: 5866666021909216657, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_Controller @@ -1568,15 +1494,15 @@ PrefabInstance: objectReference: {fileID: 9100000, guid: e2cf68ff4b1ffda45a77f7307dd789b9, type: 2} - target: {fileID: 7514784303115233714, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.x - value: 0.07399515 + value: 0.07399513 objectReference: {fileID: 0} - target: {fileID: 7514784303115233714, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.y - value: 0.0000009936048 + value: 0.0000007917406 objectReference: {fileID: 0} - target: {fileID: 7514784303115233714, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.z - value: -0.00000067777 + value: -0.0000009469222 objectReference: {fileID: 0} - target: {fileID: 7514784303115233714, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.w @@ -1584,35 +1510,35 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 7514784303115233714, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: -0.00000012293455 + value: -0.000000033527588 objectReference: {fileID: 0} - target: {fileID: 7514784303115233714, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: -0.041632507 + value: -0.041632883 objectReference: {fileID: 0} - target: {fileID: 7514784303115233714, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: 0.00000034738324 + value: 0.0000000149011505 objectReference: {fileID: 0} - target: {fileID: 8136026706196182388, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.x - value: 0.025979655 + value: 0.02597995 objectReference: {fileID: 0} - target: {fileID: 8136026706196182388, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.y - value: -0.0028832175 + value: -0.0028835365 objectReference: {fileID: 0} - target: {fileID: 8136026706196182388, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.z - value: -0.12322027 + value: -0.12321778 objectReference: {fileID: 0} - target: {fileID: 8136026706196182388, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.w - value: 0.69933337 + value: 0.6993333 objectReference: {fileID: 0} - target: {fileID: 8136026706196182388, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: 0.11304582 + value: 0.11304535 objectReference: {fileID: 0} - target: {fileID: 8136026706196182388, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y @@ -1620,63 +1546,63 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 8136026706196182388, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: -0.11348579 + value: -0.11348603 objectReference: {fileID: 0} - target: {fileID: 8216163743844190192, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.x - value: -0.07747022 + value: -0.07746922 objectReference: {fileID: 0} - target: {fileID: 8216163743844190192, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.y - value: -0.00000047863637 + value: -0.00000003922807 objectReference: {fileID: 0} - target: {fileID: 8216163743844190192, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.z - value: 0.0000015713451 + value: 0.00000046299692 objectReference: {fileID: 0} - target: {fileID: 8216163743844190192, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.w - value: 0.99996287 + value: 0.9999629 objectReference: {fileID: 0} - target: {fileID: 8216163743844190192, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: 0.00000017576116 + value: 0.000000095049955 objectReference: {fileID: 0} - target: {fileID: 8216163743844190192, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: -0.008620437 + value: -0.008619845 objectReference: {fileID: 0} - target: {fileID: 8216163743844190192, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: 0.0000003392898 + value: 0.00000013218293 objectReference: {fileID: 0} - target: {fileID: 8561469618316601768, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.w - value: 0.92407495 + value: 0.9240755 objectReference: {fileID: 0} - target: {fileID: 8561469618316601768, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: 0.000000031075025 + value: 0.000000037750738 objectReference: {fileID: 0} - target: {fileID: 8561469618316601768, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: -0.38221136 + value: -0.3822102 objectReference: {fileID: 0} - target: {fileID: 8561469618316601768, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: -0.00000037519456 + value: -0.00000008068842 objectReference: {fileID: 0} - target: {fileID: 8663071241739252781, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.x - value: -0.08463777 + value: -0.08463919 objectReference: {fileID: 0} - target: {fileID: 8663071241739252781, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.y - value: 0.00000077379883 + value: 0.000000050538493 objectReference: {fileID: 0} - target: {fileID: 8663071241739252781, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalPosition.z - value: -3.8395097e-15 + value: 1.3612353e-15 objectReference: {fileID: 0} - target: {fileID: 8663071241739252781, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.w @@ -1684,15 +1610,15 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 8663071241739252781, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.x - value: 2.8434645e-17 + value: 5.2939534e-22 objectReference: {fileID: 0} - target: {fileID: 8663071241739252781, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.y - value: 2.1175819e-22 + value: -1.421738e-17 objectReference: {fileID: 0} - target: {fileID: 8663071241739252781, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} propertyPath: m_LocalRotation.z - value: 0.008003579 + value: 0.008003613 objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] @@ -1710,6 +1636,9 @@ PrefabInstance: - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} insertIndex: -1 addedObject: {fileID: 1080600883} + - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} + insertIndex: -1 + addedObject: {fileID: 1080600886} - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} insertIndex: -1 addedObject: {fileID: 1080600887} @@ -1743,13 +1672,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 7be315bc5964b4fbca6cf0a978ff76a1, type: 3} m_Name: m_EditorClassIdentifier: - solverIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c000000 - m_AlignBytes: 16 - groupID: 1 + solverIndices: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c000000 m_CollisionMaterial: {fileID: 0} m_SurfaceCollisions: 0 - m_MassScale: 1 m_SelfCollisions: 0 _radius: multiplier: 0.1 @@ -2092,59 +2017,6 @@ MonoBehaviour: m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 - _aerodynamicsEnabled: 1 - _drag: - multiplier: 0.02 - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 1 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0 - outWeight: 0 - - serializedVersion: 3 - time: 1 - value: 1 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0 - outWeight: 0 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - _lift: - multiplier: 0.02 - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 1 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0 - outWeight: 0 - - serializedVersion: 3 - time: 1 - value: 1 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0 - outWeight: 0 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 filter: -65534 fixRoot: 1 stretchBones: 1 @@ -2161,6 +2033,7 @@ GameObject: - component: {fileID: 1002464895} - component: {fileID: 1002464893} - component: {fileID: 1002464892} + - component: {fileID: 1002464897} - component: {fileID: 1002464894} m_Layer: 0 m_Name: Main Camera @@ -2269,6 +2142,72 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1002464897 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1002464891} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 62e83a599724f45a4aa337d74764e572, type: 3} + m_Name: + m_EditorClassIdentifier: + skin: {fileID: 11400000, guid: b90d3c214c99743b0865fc0e0d1f1a15, type: 2} + threadColor: {r: 0, g: 1, b: 1, a: 1} + taskColor: {r: 0, g: 1, b: 0, a: 1} + parallelTaskColor: {r: 1, g: 0.8, b: 0.2, a: 1} + renderTaskColor: {r: 0.2, g: 0.7, b: 1, a: 1} + defaultTaskColor: {r: 1, g: 0.5, b: 0.2, a: 1} + showPercentages: 0 + profileThrottle: 30 +--- !u!1 &1076081359 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1076081361} + - component: {fileID: 1076081360} + m_Layer: 0 + m_Name: BurstCollisionWorld + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1076081360 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1076081359} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f1a161c4294214a4fbcb7e9e94800494, type: 3} + m_Name: + m_EditorClassIdentifier: + cellSpans: + m_AlignBytes: 16 +--- !u!4 &1076081361 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1076081359} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1080600881 stripped GameObject: m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 643a73163dc8d4f0e904d6c0f6857999, type: 3} @@ -2356,6 +2295,22 @@ Rigidbody: m_Interpolate: 0 m_Constraints: 0 m_CollisionDetection: 0 +--- !u!114 &1080600886 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1080600881} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 434d88f9b3534406382ff56c0e74bd9a, type: 3} + m_Name: + m_EditorClassIdentifier: + solvers: + - {fileID: 1080600887} + deltaSmoothing: 0.95 + substeps: 2 --- !u!114 &1080600887 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2369,58 +2324,24 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: simulateWhenInvisible: 1 - m_Backend: 0 - substeps: 2 - maxStepsPerFrame: 1 - synchronization: 0 + m_Backend: 1 parameters: mode: 0 interpolation: 0 gravity: {x: 0, y: -5, z: 0} - ambientWind: {x: 0, y: 0, z: 0} - foamGravityScale: 1 damping: 0.6 maxAnisotropy: 3 sleepThreshold: 0.001 - maxVelocity: 10 - maxAngularVelocity: 10 collisionMargin: 0.02 maxDepenetration: 10 - colliderCCD: 1 - particleCCD: 0 + continuousCollisionDetection: 1 shockPropagation: 0 surfaceCollisionIterations: 8 surfaceCollisionTolerance: 0.005 - diffusionMask: {x: 1, y: 1, z: 1, w: 1} - m_MaxSurfaceChunks: 32768 - maxQueryResults: 8192 - maxFoamParticles: 8192 - maxParticleNeighbors: 128 - maxParticleContacts: 4 - useLimits: 0 - killOffLimitsParticles: 0 - boundaryLimits: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 5, y: 5, z: 5} gravity: {x: 0, y: -9.81, z: 0} gravitySpace: 1 - ambientWind: {x: 0, y: 0, z: 0} - windSpace: 0 - foamSubsteps: 1 - foamMinNeighbors: 3 - foamCollisions: 0 - maxFoamVelocityStretch: 0.3 - foamRadiusScale: 1 - foamFade: {x: 0.05, y: 0.8} - foamAccelAgingRange: {x: 0.5, y: 0.8} - foamAccelAging: 4 - foamVolumeDensity: 0.1 - foamAmbientDensity: 0.02 - foamScatterColor: {r: 0.8, g: 0.75, b: 0.7, a: 1} - foamAmbientColor: {r: 0.4, g: 0.5, b: 0.6, a: 1} worldLinearInertiaScale: 0.5 worldAngularInertiaScale: 0.1 - synchronousSpatialQueries: 0 distanceConstraintParameters: evaluationOrder: 0 iterations: 1 @@ -2472,11 +2393,6 @@ MonoBehaviour: SORFactor: 1 enabled: 0 pinConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 - pinholeConstraintParameters: evaluationOrder: 1 iterations: 1 SORFactor: 1 @@ -2603,50 +2519,6 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 56.052002, y: -22.431002, z: 23.642} ---- !u!1 &1643493863 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1643493865} - - component: {fileID: 1643493864} - m_Layer: 0 - m_Name: ComputeCollisionWorld - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1643493864 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1643493863} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: ce0ddc77554954cd78643d83b0505396, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!4 &1643493865 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1643493863} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1660007473 GameObject: m_ObjectHideFlags: 0 @@ -2743,13 +2615,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 7be315bc5964b4fbca6cf0a978ff76a1, type: 3} m_Name: m_EditorClassIdentifier: - solverIndices: - serializedContents: 0d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000 - m_AlignBytes: 16 - groupID: 2 + solverIndices: 0d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000 m_CollisionMaterial: {fileID: 0} m_SurfaceCollisions: 0 - m_MassScale: 1 m_SelfCollisions: 0 _radius: multiplier: 0.04 @@ -3092,59 +2960,6 @@ MonoBehaviour: m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 - _aerodynamicsEnabled: 1 - _drag: - multiplier: 0.02 - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 1 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0 - outWeight: 0 - - serializedVersion: 3 - time: 1 - value: 1 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0 - outWeight: 0 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - _lift: - multiplier: 0.02 - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 1 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0 - outWeight: 0 - - serializedVersion: 3 - time: 1 - value: 1 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0 - outWeight: 0 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 filter: -65534 fixRoot: 1 stretchBones: 0 @@ -3166,13 +2981,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 7be315bc5964b4fbca6cf0a978ff76a1, type: 3} m_Name: m_EditorClassIdentifier: - solverIndices: - serializedContents: 200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b000000 - m_AlignBytes: 16 - groupID: 3 + solverIndices: 200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b000000 m_CollisionMaterial: {fileID: 0} m_SurfaceCollisions: 0 - m_MassScale: 1 m_SelfCollisions: 0 _radius: multiplier: 0.1 @@ -3515,59 +3326,6 @@ MonoBehaviour: m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 - _aerodynamicsEnabled: 1 - _drag: - multiplier: 1 - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0 - outWeight: 0 - - serializedVersion: 3 - time: 1 - value: 1 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0 - outWeight: 0 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - _lift: - multiplier: 0.02 - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 0 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0 - outWeight: 0 - - serializedVersion: 3 - time: 1 - value: 1 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0 - outWeight: 0 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 filter: -65534 fixRoot: 1 stretchBones: 1 @@ -3589,13 +3347,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 7be315bc5964b4fbca6cf0a978ff76a1, type: 3} m_Name: m_EditorClassIdentifier: - solverIndices: - serializedContents: 2c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000 - m_AlignBytes: 16 - groupID: 4 + solverIndices: 2c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000 m_CollisionMaterial: {fileID: 0} m_SurfaceCollisions: 0 - m_MassScale: 1 m_SelfCollisions: 0 _radius: multiplier: 0.1 @@ -3938,59 +3692,6 @@ MonoBehaviour: m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 - _aerodynamicsEnabled: 1 - _drag: - multiplier: 0.02 - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 1 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0 - outWeight: 0 - - serializedVersion: 3 - time: 1 - value: 1 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0 - outWeight: 0 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - _lift: - multiplier: 0.02 - curve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 1 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0 - outWeight: 0 - - serializedVersion: 3 - time: 1 - value: 1 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0 - outWeight: 0 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 filter: -65534 fixRoot: 1 stretchBones: 1 @@ -4004,4 +3705,4 @@ SceneRoots: - {fileID: 421764872} - {fileID: 1175446146} - {fileID: 283647877} - - {fileID: 1643493865} + - {fileID: 1076081361} diff --git a/Assets/Obi/Samples/RopeAndRod/CharacterTentaclesSettings.lighting b/Assets/Obi/Samples/RopeAndRod/CharacterTentaclesSettings.lighting new file mode 100644 index 000000000..1d6feb729 --- /dev/null +++ b/Assets/Obi/Samples/RopeAndRod/CharacterTentaclesSettings.lighting @@ -0,0 +1,63 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!850595691 &4890085278179872738 +LightingSettings: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: CharacterTentaclesSettings + serializedVersion: 9 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 1 + m_RealtimeEnvironmentLighting: 1 + m_BounceScale: 1 + m_AlbedoBoost: 1 + m_IndirectOutputScale: 1 + m_UsingShadowmask: 0 + m_BakeBackend: 1 + m_LightmapMaxSize: 1024 + m_LightmapSizeFixed: 0 + m_UseMipmapLimits: 1 + m_BakeResolution: 40 + m_Padding: 2 + m_LightmapCompression: 3 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 0 + m_CompAOExponentDirect: 0 + m_ExtractAO: 0 + m_MixedBakeMode: 1 + m_LightmapsBakeMode: 1 + m_FilterMode: 1 + m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + m_ExportTrainingData: 0 + m_EnableWorkerProcessBaking: 1 + m_TrainingDataDestination: TrainingData + m_RealtimeResolution: 2 + m_ForceWhiteAlbedo: 0 + m_ForceUpdates: 0 + m_PVRCulling: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVREnvironmentSampleCount: 512 + m_PVREnvironmentReferencePointCount: 2048 + m_LightProbeSampleCountMultiplier: 4 + m_PVRBounces: 2 + m_PVRMinBounces: 2 + m_PVREnvironmentImportanceSampling: 0 + m_PVRFilteringMode: 2 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_RespectSceneVisibilityWhenBakingGI: 0 diff --git a/Assets/Obi/Samples/RopeAndRod/CharacterTentaclesSettings.lighting.meta b/Assets/Obi/Samples/RopeAndRod/CharacterTentaclesSettings.lighting.meta new file mode 100644 index 000000000..3c9ea8bed --- /dev/null +++ b/Assets/Obi/Samples/RopeAndRod/CharacterTentaclesSettings.lighting.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 15d9e0b9bae5bee4facadf87959c6061 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 4890085278179872738 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Samples/RopeAndRod/ComputeRopes.unity b/Assets/Obi/Samples/RopeAndRod/ComputeRopes.unity deleted file mode 100644 index 2d0484722..000000000 --- a/Assets/Obi/Samples/RopeAndRod/ComputeRopes.unity +++ /dev/null @@ -1,40302 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!29 &1 -OcclusionCullingSettings: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_OcclusionBakeSettings: - smallestOccluder: 5 - smallestHole: 0.25 - backfaceThreshold: 100 - m_SceneGUID: 00000000000000000000000000000000 - m_OcclusionCullingData: {fileID: 0} ---- !u!104 &2 -RenderSettings: - m_ObjectHideFlags: 0 - serializedVersion: 10 - m_Fog: 0 - m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - m_FogMode: 3 - m_FogDensity: 0.01 - m_LinearFogStart: 0 - m_LinearFogEnd: 300 - m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} - m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} - m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} - m_AmbientIntensity: 1 - m_AmbientMode: 0 - m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} - m_HaloStrength: 0.5 - m_FlareStrength: 1 - m_FlareFadeSpeed: 3 - m_HaloTexture: {fileID: 0} - m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} - m_DefaultReflectionMode: 0 - m_DefaultReflectionResolution: 128 - m_ReflectionBounces: 1 - m_ReflectionIntensity: 1 - m_CustomReflection: {fileID: 0} - m_Sun: {fileID: 0} - m_UseRadianceAmbientProbe: 0 ---- !u!157 &4 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 13 - m_BakeOnSceneLoad: 0 - m_GISettings: - serializedVersion: 2 - m_BounceScale: 1 - m_IndirectOutputScale: 1 - m_AlbedoBoost: 1 - m_EnvironmentLightingMode: 0 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 1 - m_LightmapEditorSettings: - serializedVersion: 12 - m_Resolution: 2 - m_BakeResolution: 40 - m_AtlasSize: 1024 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 0 - m_CompAOExponentDirect: 0 - m_ExtractAmbientOcclusion: 0 - m_Padding: 2 - m_LightmapParameters: {fileID: 0} - m_LightmapsBakeMode: 1 - m_TextureCompression: 1 - m_ReflectionCompression: 2 - m_MixedBakeMode: 1 - m_BakeBackend: 0 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 500 - m_PVRBounces: 2 - m_PVREnvironmentSampleCount: 500 - m_PVREnvironmentReferencePointCount: 2048 - m_PVRFilteringMode: 2 - m_PVRDenoiserTypeDirect: 0 - m_PVRDenoiserTypeIndirect: 0 - m_PVRDenoiserTypeAO: 0 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVREnvironmentMIS: 0 - m_PVRCulling: 1 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 5 - m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_ExportTrainingData: 0 - m_TrainingDataDestination: TrainingData - m_LightProbeSampleCountMultiplier: 4 - m_LightingDataAsset: {fileID: 0} - m_LightingSettings: {fileID: 4890085278179872738, guid: 2a7dd55cd73e04316941dd907bb58462, type: 2} ---- !u!196 &5 -NavMeshSettings: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_BuildSettings: - serializedVersion: 3 - agentTypeID: 0 - agentRadius: 0.5 - agentHeight: 2 - agentSlope: 45 - agentClimb: 0.4 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - minRegionArea: 2 - manualCellSize: 0 - cellSize: 0.16666667 - manualTileSize: 0 - tileSize: 256 - buildHeightMesh: 0 - maxJobWorkers: 0 - preserveTilesOutsideBounds: 0 - debug: - m_Flags: 0 - m_NavMeshData: {fileID: 0} ---- !u!1 &23156 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 23157} - - component: {fileID: 23161} - - component: {fileID: 23160} - - component: {fileID: 23159} - - component: {fileID: 23158} - m_Layer: 0 - m_Name: Obi Rope (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &23157 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 23156} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.2, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1798495239} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &23158 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 23156} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 23161} - m_Target: {fileID: 23157} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &23159 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 23156} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &23160 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 23156} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 0 ---- !u!114 &23161 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 23156} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000 - m_AlignBytes: 16 - groupID: 1 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 0 - particle2: 1 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 1 - particle2: 2 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 2 - particle2: 3 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 3 - particle2: 4 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 4 - particle2: 5 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 5 - particle2: 6 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 6 - particle2: 7 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 7 - particle2: 8 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 8 - particle2: 9 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 9 - particle2: 10 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 10 - particle2: 11 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &21655690 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 21655691} - - component: {fileID: 21655695} - - component: {fileID: 21655694} - - component: {fileID: 21655693} - - component: {fileID: 21655692} - m_Layer: 0 - m_Name: Obi Rope - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &21655691 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 21655690} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 472161722} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &21655692 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 21655690} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 21655695} - m_Target: {fileID: 21655691} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &21655693 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 21655690} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &21655694 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 21655690} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 1 ---- !u!114 &21655695 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 21655690} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b0000007c0000007d0000007e0000007f000000800000008100000082000000830000008400000085000000860000008700000088000000890000008a0000008b0000008c0000008d0000008e0000008f000000900000009100000092000000930000009400000095000000960000009700000098000000990000009a0000009b0000009c0000009d0000009e0000009f000000a0000000a1000000a2000000a3000000a4000000a5000000a6000000a7000000a8000000a9000000aa000000ab000000ac000000ad000000ae000000af000000b0000000b1000000b2000000b3000000b4000000b5000000b6000000b7000000b8000000b9000000ba000000bb000000bc000000bd000000be000000bf000000c0000000c1000000c2000000c3000000c4000000c5000000c6000000c7000000c8000000c9000000ca000000cb000000cc000000cd000000ce000000cf000000d0000000d1000000d2000000d3000000d4000000d5000000d6000000d7000000d8000000d9000000da000000db000000dc000000dd000000de000000df000000 - m_AlignBytes: 16 - groupID: 2 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 112 - particle2: 113 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 113 - particle2: 114 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 114 - particle2: 115 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 115 - particle2: 116 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 116 - particle2: 117 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 117 - particle2: 118 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 118 - particle2: 119 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 119 - particle2: 120 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 120 - particle2: 121 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 121 - particle2: 122 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 122 - particle2: 123 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &39329228 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 39329229} - - component: {fileID: 39329233} - - component: {fileID: 39329232} - - component: {fileID: 39329231} - - component: {fileID: 39329230} - m_Layer: 0 - m_Name: Obi Rope (5) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &39329229 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 39329228} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1240601735} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &39329230 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 39329228} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 39329233} - m_Target: {fileID: 39329229} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &39329231 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 39329228} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &39329232 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 39329228} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 2 ---- !u!114 &39329233 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 39329228} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: e0000000e1000000e2000000e3000000e4000000e5000000e6000000e7000000e8000000e9000000ea000000eb000000ec000000ed000000ee000000ef000000f0000000f1000000f2000000f3000000f4000000f5000000f6000000f7000000f8000000f9000000fa000000fb000000fc000000fd000000fe000000ff000000000100000101000002010000030100000401000005010000060100000701000008010000090100000a0100000b0100000c0100000d0100000e0100000f010000100100001101000012010000130100001401000015010000160100001701000018010000190100001a0100001b0100001c0100001d0100001e0100001f010000200100002101000022010000230100002401000025010000260100002701000028010000290100002a0100002b0100002c0100002d0100002e0100002f010000300100003101000032010000330100003401000035010000360100003701000038010000390100003a0100003b0100003c0100003d0100003e0100003f010000400100004101000042010000430100004401000045010000460100004701000048010000490100004a0100004b0100004c0100004d0100004e0100004f010000 - m_AlignBytes: 16 - groupID: 3 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 224 - particle2: 225 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 225 - particle2: 226 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 226 - particle2: 227 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 227 - particle2: 228 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 228 - particle2: 229 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 229 - particle2: 230 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 230 - particle2: 231 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 231 - particle2: 232 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 232 - particle2: 233 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 233 - particle2: 234 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 234 - particle2: 235 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &40955814 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 40955815} - - component: {fileID: 40955819} - - component: {fileID: 40955818} - - component: {fileID: 40955817} - - component: {fileID: 40955816} - m_Layer: 0 - m_Name: Obi Rope (7) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &40955815 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 40955814} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.4, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 426164209} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &40955816 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 40955814} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 40955819} - m_Target: {fileID: 40955815} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &40955817 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 40955814} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &40955818 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 40955814} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 3 ---- !u!114 &40955819 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 40955814} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 500100005101000052010000530100005401000055010000560100005701000058010000590100005a0100005b0100005c0100005d0100005e0100005f010000600100006101000062010000630100006401000065010000660100006701000068010000690100006a0100006b0100006c0100006d0100006e0100006f010000700100007101000072010000730100007401000075010000760100007701000078010000790100007a0100007b0100007c0100007d0100007e0100007f010000800100008101000082010000830100008401000085010000860100008701000088010000890100008a0100008b0100008c0100008d0100008e0100008f010000900100009101000092010000930100009401000095010000960100009701000098010000990100009a0100009b0100009c0100009d0100009e0100009f010000a0010000a1010000a2010000a3010000a4010000a5010000a6010000a7010000a8010000a9010000aa010000ab010000ac010000ad010000ae010000af010000b0010000b1010000b2010000b3010000b4010000b5010000b6010000b7010000b8010000b9010000ba010000bb010000bc010000bd010000be010000bf010000 - m_AlignBytes: 16 - groupID: 4 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 336 - particle2: 337 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 337 - particle2: 338 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 338 - particle2: 339 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 339 - particle2: 340 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 340 - particle2: 341 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 341 - particle2: 342 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 342 - particle2: 343 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 343 - particle2: 344 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 344 - particle2: 345 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 345 - particle2: 346 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 346 - particle2: 347 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &52316902 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 52316903} - - component: {fileID: 52316907} - - component: {fileID: 52316906} - - component: {fileID: 52316905} - - component: {fileID: 52316904} - m_Layer: 0 - m_Name: Obi Rope (5) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &52316903 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 52316902} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 779073863} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &52316904 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 52316902} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 52316907} - m_Target: {fileID: 52316903} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &52316905 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 52316902} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &52316906 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 52316902} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 4 ---- !u!114 &52316907 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 52316902} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: c0010000c1010000c2010000c3010000c4010000c5010000c6010000c7010000c8010000c9010000ca010000cb010000cc010000cd010000ce010000cf010000d0010000d1010000d2010000d3010000d4010000d5010000d6010000d7010000d8010000d9010000da010000db010000dc010000dd010000de010000df010000e0010000e1010000e2010000e3010000e4010000e5010000e6010000e7010000e8010000e9010000ea010000eb010000ec010000ed010000ee010000ef010000f0010000f1010000f2010000f3010000f4010000f5010000f6010000f7010000f8010000f9010000fa010000fb010000fc010000fd010000fe010000ff010000000200000102000002020000030200000402000005020000060200000702000008020000090200000a0200000b0200000c0200000d0200000e0200000f020000100200001102000012020000130200001402000015020000160200001702000018020000190200001a0200001b0200001c0200001d0200001e0200001f020000200200002102000022020000230200002402000025020000260200002702000028020000290200002a0200002b0200002c0200002d0200002e0200002f020000 - m_AlignBytes: 16 - groupID: 5 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 448 - particle2: 449 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 449 - particle2: 450 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 450 - particle2: 451 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 451 - particle2: 452 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 452 - particle2: 453 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 453 - particle2: 454 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 454 - particle2: 455 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 455 - particle2: 456 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 456 - particle2: 457 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 457 - particle2: 458 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 458 - particle2: 459 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &54623966 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 54623967} - m_Layer: 0 - m_Name: Row (6) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &54623967 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 54623966} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -1.2} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 1461467372} - - {fileID: 549111722} - - {fileID: 2039851350} - - {fileID: 2120568196} - - {fileID: 1707229808} - - {fileID: 453529546} - - {fileID: 437496967} - - {fileID: 75753452} - - {fileID: 1143427710} - - {fileID: 1796031224} - m_Father: {fileID: 1760688768} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &58243449 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 58243450} - - component: {fileID: 58243454} - - component: {fileID: 58243453} - - component: {fileID: 58243452} - - component: {fileID: 58243451} - m_Layer: 0 - m_Name: Obi Rope (6) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &58243450 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 58243449} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.2, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 779073863} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &58243451 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 58243449} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 58243454} - m_Target: {fileID: 58243450} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &58243452 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 58243449} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &58243453 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 58243449} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 5 ---- !u!114 &58243454 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 58243449} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 300200003102000032020000330200003402000035020000360200003702000038020000390200003a0200003b0200003c0200003d0200003e0200003f020000400200004102000042020000430200004402000045020000460200004702000048020000490200004a0200004b0200004c0200004d0200004e0200004f020000500200005102000052020000530200005402000055020000560200005702000058020000590200005a0200005b0200005c0200005d0200005e0200005f020000600200006102000062020000630200006402000065020000660200006702000068020000690200006a0200006b0200006c0200006d0200006e0200006f020000700200007102000072020000730200007402000075020000760200007702000078020000790200007a0200007b0200007c0200007d0200007e0200007f020000800200008102000082020000830200008402000085020000860200008702000088020000890200008a0200008b0200008c0200008d0200008e0200008f020000900200009102000092020000930200009402000095020000960200009702000098020000990200009a0200009b0200009c0200009d0200009e0200009f020000 - m_AlignBytes: 16 - groupID: 6 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 560 - particle2: 561 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 561 - particle2: 562 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 562 - particle2: 563 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 563 - particle2: 564 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 564 - particle2: 565 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 565 - particle2: 566 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 566 - particle2: 567 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 567 - particle2: 568 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 568 - particle2: 569 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 569 - particle2: 570 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 570 - particle2: 571 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &59144233 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 59144234} - - component: {fileID: 59144238} - - component: {fileID: 59144237} - - component: {fileID: 59144236} - - component: {fileID: 59144235} - m_Layer: 0 - m_Name: Obi Rope (3) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &59144234 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 59144233} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.6, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 713844502} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &59144235 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 59144233} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 59144238} - m_Target: {fileID: 59144234} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &59144236 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 59144233} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &59144237 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 59144233} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 6 ---- !u!114 &59144238 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 59144233} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: a0020000a1020000a2020000a3020000a4020000a5020000a6020000a7020000a8020000a9020000aa020000ab020000ac020000ad020000ae020000af020000b0020000b1020000b2020000b3020000b4020000b5020000b6020000b7020000b8020000b9020000ba020000bb020000bc020000bd020000be020000bf020000c0020000c1020000c2020000c3020000c4020000c5020000c6020000c7020000c8020000c9020000ca020000cb020000cc020000cd020000ce020000cf020000d0020000d1020000d2020000d3020000d4020000d5020000d6020000d7020000d8020000d9020000da020000db020000dc020000dd020000de020000df020000e0020000e1020000e2020000e3020000e4020000e5020000e6020000e7020000e8020000e9020000ea020000eb020000ec020000ed020000ee020000ef020000f0020000f1020000f2020000f3020000f4020000f5020000f6020000f7020000f8020000f9020000fa020000fb020000fc020000fd020000fe020000ff020000000300000103000002030000030300000403000005030000060300000703000008030000090300000a0300000b0300000c0300000d0300000e0300000f030000 - m_AlignBytes: 16 - groupID: 7 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 672 - particle2: 673 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 673 - particle2: 674 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 674 - particle2: 675 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 675 - particle2: 676 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 676 - particle2: 677 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 677 - particle2: 678 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 678 - particle2: 679 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 679 - particle2: 680 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 680 - particle2: 681 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 681 - particle2: 682 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 682 - particle2: 683 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &61099066 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 61099067} - - component: {fileID: 61099071} - - component: {fileID: 61099070} - - component: {fileID: 61099069} - - component: {fileID: 61099068} - m_Layer: 0 - m_Name: Obi Rope (2) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &61099067 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 61099066} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.4, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 472161722} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &61099068 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 61099066} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 61099071} - m_Target: {fileID: 61099067} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &61099069 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 61099066} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &61099070 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 61099066} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 7 ---- !u!114 &61099071 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 61099066} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 100300001103000012030000130300001403000015030000160300001703000018030000190300001a0300001b0300001c0300001d0300001e0300001f030000200300002103000022030000230300002403000025030000260300002703000028030000290300002a0300002b0300002c0300002d0300002e0300002f030000300300003103000032030000330300003403000035030000360300003703000038030000390300003a0300003b0300003c0300003d0300003e0300003f030000400300004103000042030000430300004403000045030000460300004703000048030000490300004a0300004b0300004c0300004d0300004e0300004f030000500300005103000052030000530300005403000055030000560300005703000058030000590300005a0300005b0300005c0300005d0300005e0300005f030000600300006103000062030000630300006403000065030000660300006703000068030000690300006a0300006b0300006c0300006d0300006e0300006f030000700300007103000072030000730300007403000075030000760300007703000078030000790300007a0300007b0300007c0300007d0300007e0300007f030000 - m_AlignBytes: 16 - groupID: 8 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 784 - particle2: 785 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 785 - particle2: 786 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 786 - particle2: 787 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 787 - particle2: 788 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 788 - particle2: 789 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 789 - particle2: 790 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 790 - particle2: 791 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 791 - particle2: 792 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 792 - particle2: 793 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 793 - particle2: 794 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 794 - particle2: 795 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &67321348 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 67321349} - - component: {fileID: 67321353} - - component: {fileID: 67321352} - - component: {fileID: 67321351} - - component: {fileID: 67321350} - m_Layer: 0 - m_Name: Obi Rope (3) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &67321349 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 67321348} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.6, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 472161722} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &67321350 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 67321348} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 67321353} - m_Target: {fileID: 67321349} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &67321351 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 67321348} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &67321352 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 67321348} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 8 ---- !u!114 &67321353 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 67321348} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 800300008103000082030000830300008403000085030000860300008703000088030000890300008a0300008b0300008c0300008d0300008e0300008f030000900300009103000092030000930300009403000095030000960300009703000098030000990300009a0300009b0300009c0300009d0300009e0300009f030000a0030000a1030000a2030000a3030000a4030000a5030000a6030000a7030000a8030000a9030000aa030000ab030000ac030000ad030000ae030000af030000b0030000b1030000b2030000b3030000b4030000b5030000b6030000b7030000b8030000b9030000ba030000bb030000bc030000bd030000be030000bf030000c0030000c1030000c2030000c3030000c4030000c5030000c6030000c7030000c8030000c9030000ca030000cb030000cc030000cd030000ce030000cf030000d0030000d1030000d2030000d3030000d4030000d5030000d6030000d7030000d8030000d9030000da030000db030000dc030000dd030000de030000df030000e0030000e1030000e2030000e3030000e4030000e5030000e6030000e7030000e8030000e9030000ea030000eb030000ec030000ed030000ee030000ef030000 - m_AlignBytes: 16 - groupID: 9 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 896 - particle2: 897 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 897 - particle2: 898 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 898 - particle2: 899 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 899 - particle2: 900 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 900 - particle2: 901 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 901 - particle2: 902 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 902 - particle2: 903 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 903 - particle2: 904 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 904 - particle2: 905 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 905 - particle2: 906 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 906 - particle2: 907 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &75753451 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 75753452} - - component: {fileID: 75753456} - - component: {fileID: 75753455} - - component: {fileID: 75753454} - - component: {fileID: 75753453} - m_Layer: 0 - m_Name: Obi Rope (7) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &75753452 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 75753451} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.4, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 54623967} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &75753453 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 75753451} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 75753456} - m_Target: {fileID: 75753452} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &75753454 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 75753451} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &75753455 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 75753451} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 9 ---- !u!114 &75753456 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 75753451} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: f0030000f1030000f2030000f3030000f4030000f5030000f6030000f7030000f8030000f9030000fa030000fb030000fc030000fd030000fe030000ff030000000400000104000002040000030400000404000005040000060400000704000008040000090400000a0400000b0400000c0400000d0400000e0400000f040000100400001104000012040000130400001404000015040000160400001704000018040000190400001a0400001b0400001c0400001d0400001e0400001f040000200400002104000022040000230400002404000025040000260400002704000028040000290400002a0400002b0400002c0400002d0400002e0400002f040000300400003104000032040000330400003404000035040000360400003704000038040000390400003a0400003b0400003c0400003d0400003e0400003f040000400400004104000042040000430400004404000045040000460400004704000048040000490400004a0400004b0400004c0400004d0400004e0400004f040000500400005104000052040000530400005404000055040000560400005704000058040000590400005a0400005b0400005c0400005d0400005e0400005f040000 - m_AlignBytes: 16 - groupID: 10 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 1008 - particle2: 1009 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 1009 - particle2: 1010 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 1010 - particle2: 1011 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 1011 - particle2: 1012 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 1012 - particle2: 1013 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 1013 - particle2: 1014 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 1014 - particle2: 1015 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 1015 - particle2: 1016 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 1016 - particle2: 1017 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 1017 - particle2: 1018 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 1018 - particle2: 1019 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &82705114 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 82705115} - - component: {fileID: 82705119} - - component: {fileID: 82705118} - - component: {fileID: 82705117} - - component: {fileID: 82705116} - m_Layer: 0 - m_Name: Obi Rope (5) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &82705115 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 82705114} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 510728467} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &82705116 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 82705114} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 82705119} - m_Target: {fileID: 82705115} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &82705117 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 82705114} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &82705118 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 82705114} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 10 ---- !u!114 &82705119 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 82705114} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 600400006104000062040000630400006404000065040000660400006704000068040000690400006a0400006b0400006c0400006d0400006e0400006f040000700400007104000072040000730400007404000075040000760400007704000078040000790400007a0400007b0400007c0400007d0400007e0400007f040000800400008104000082040000830400008404000085040000860400008704000088040000890400008a0400008b0400008c0400008d0400008e0400008f040000900400009104000092040000930400009404000095040000960400009704000098040000990400009a0400009b0400009c0400009d0400009e0400009f040000a0040000a1040000a2040000a3040000a4040000a5040000a6040000a7040000a8040000a9040000aa040000ab040000ac040000ad040000ae040000af040000b0040000b1040000b2040000b3040000b4040000b5040000b6040000b7040000b8040000b9040000ba040000bb040000bc040000bd040000be040000bf040000c0040000c1040000c2040000c3040000c4040000c5040000c6040000c7040000c8040000c9040000ca040000cb040000cc040000cd040000ce040000cf040000 - m_AlignBytes: 16 - groupID: 11 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 1120 - particle2: 1121 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 1121 - particle2: 1122 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 1122 - particle2: 1123 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 1123 - particle2: 1124 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 1124 - particle2: 1125 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 1125 - particle2: 1126 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 1126 - particle2: 1127 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 1127 - particle2: 1128 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 1128 - particle2: 1129 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 1129 - particle2: 1130 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 1130 - particle2: 1131 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &84035659 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 84035660} - - component: {fileID: 84035664} - - component: {fileID: 84035663} - - component: {fileID: 84035662} - - component: {fileID: 84035661} - m_Layer: 0 - m_Name: Obi Rope (9) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &84035660 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 84035659} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.8, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1798495239} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &84035661 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 84035659} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 84035664} - m_Target: {fileID: 84035660} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &84035662 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 84035659} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &84035663 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 84035659} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 11 ---- !u!114 &84035664 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 84035659} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: d0040000d1040000d2040000d3040000d4040000d5040000d6040000d7040000d8040000d9040000da040000db040000dc040000dd040000de040000df040000e0040000e1040000e2040000e3040000e4040000e5040000e6040000e7040000e8040000e9040000ea040000eb040000ec040000ed040000ee040000ef040000f0040000f1040000f2040000f3040000f4040000f5040000f6040000f7040000f8040000f9040000fa040000fb040000fc040000fd040000fe040000ff040000000500000105000002050000030500000405000005050000060500000705000008050000090500000a0500000b0500000c0500000d0500000e0500000f050000100500001105000012050000130500001405000015050000160500001705000018050000190500001a0500001b0500001c0500001d0500001e0500001f050000200500002105000022050000230500002405000025050000260500002705000028050000290500002a0500002b0500002c0500002d0500002e0500002f050000300500003105000032050000330500003405000035050000360500003705000038050000390500003a0500003b0500003c0500003d0500003e0500003f050000 - m_AlignBytes: 16 - groupID: 12 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 1232 - particle2: 1233 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 1233 - particle2: 1234 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 1234 - particle2: 1235 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 1235 - particle2: 1236 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 1236 - particle2: 1237 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 1237 - particle2: 1238 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 1238 - particle2: 1239 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 1239 - particle2: 1240 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 1240 - particle2: 1241 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 1241 - particle2: 1242 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 1242 - particle2: 1243 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &104614687 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 104614688} - - component: {fileID: 104614692} - - component: {fileID: 104614691} - - component: {fileID: 104614690} - - component: {fileID: 104614689} - m_Layer: 0 - m_Name: Obi Rope (5) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &104614688 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 104614687} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 648480057} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &104614689 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 104614687} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 104614692} - m_Target: {fileID: 104614688} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &104614690 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 104614687} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &104614691 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 104614687} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 12 ---- !u!114 &104614692 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 104614687} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 400500004105000042050000430500004405000045050000460500004705000048050000490500004a0500004b0500004c0500004d0500004e0500004f050000500500005105000052050000530500005405000055050000560500005705000058050000590500005a0500005b0500005c0500005d0500005e0500005f050000600500006105000062050000630500006405000065050000660500006705000068050000690500006a0500006b0500006c0500006d0500006e0500006f050000700500007105000072050000730500007405000075050000760500007705000078050000790500007a0500007b0500007c0500007d0500007e0500007f050000800500008105000082050000830500008405000085050000860500008705000088050000890500008a0500008b0500008c0500008d0500008e0500008f050000900500009105000092050000930500009405000095050000960500009705000098050000990500009a0500009b0500009c0500009d0500009e0500009f050000a0050000a1050000a2050000a3050000a4050000a5050000a6050000a7050000a8050000a9050000aa050000ab050000ac050000ad050000ae050000af050000 - m_AlignBytes: 16 - groupID: 13 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 1344 - particle2: 1345 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 1345 - particle2: 1346 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 1346 - particle2: 1347 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 1347 - particle2: 1348 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 1348 - particle2: 1349 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 1349 - particle2: 1350 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 1350 - particle2: 1351 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 1351 - particle2: 1352 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 1352 - particle2: 1353 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 1353 - particle2: 1354 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 1354 - particle2: 1355 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &113190532 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 113190533} - - component: {fileID: 113190537} - - component: {fileID: 113190536} - - component: {fileID: 113190535} - - component: {fileID: 113190534} - m_Layer: 0 - m_Name: Obi Rope (6) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &113190533 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 113190532} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.2, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 648480057} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &113190534 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 113190532} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 113190537} - m_Target: {fileID: 113190533} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &113190535 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 113190532} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &113190536 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 113190532} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 13 ---- !u!114 &113190537 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 113190532} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: b0050000b1050000b2050000b3050000b4050000b5050000b6050000b7050000b8050000b9050000ba050000bb050000bc050000bd050000be050000bf050000c0050000c1050000c2050000c3050000c4050000c5050000c6050000c7050000c8050000c9050000ca050000cb050000cc050000cd050000ce050000cf050000d0050000d1050000d2050000d3050000d4050000d5050000d6050000d7050000d8050000d9050000da050000db050000dc050000dd050000de050000df050000e0050000e1050000e2050000e3050000e4050000e5050000e6050000e7050000e8050000e9050000ea050000eb050000ec050000ed050000ee050000ef050000f0050000f1050000f2050000f3050000f4050000f5050000f6050000f7050000f8050000f9050000fa050000fb050000fc050000fd050000fe050000ff050000000600000106000002060000030600000406000005060000060600000706000008060000090600000a0600000b0600000c0600000d0600000e0600000f060000100600001106000012060000130600001406000015060000160600001706000018060000190600001a0600001b0600001c0600001d0600001e0600001f060000 - m_AlignBytes: 16 - groupID: 14 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 1456 - particle2: 1457 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 1457 - particle2: 1458 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 1458 - particle2: 1459 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 1459 - particle2: 1460 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 1460 - particle2: 1461 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 1461 - particle2: 1462 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 1462 - particle2: 1463 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 1463 - particle2: 1464 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 1464 - particle2: 1465 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 1465 - particle2: 1466 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 1466 - particle2: 1467 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &123868265 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 123868266} - - component: {fileID: 123868270} - - component: {fileID: 123868269} - - component: {fileID: 123868268} - - component: {fileID: 123868267} - m_Layer: 0 - m_Name: Obi Rope (2) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &123868266 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 123868265} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.4, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 779073863} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &123868267 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 123868265} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 123868270} - m_Target: {fileID: 123868266} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &123868268 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 123868265} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &123868269 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 123868265} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 14 ---- !u!114 &123868270 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 123868265} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 200600002106000022060000230600002406000025060000260600002706000028060000290600002a0600002b0600002c0600002d0600002e0600002f060000300600003106000032060000330600003406000035060000360600003706000038060000390600003a0600003b0600003c0600003d0600003e0600003f060000400600004106000042060000430600004406000045060000460600004706000048060000490600004a0600004b0600004c0600004d0600004e0600004f060000500600005106000052060000530600005406000055060000560600005706000058060000590600005a0600005b0600005c0600005d0600005e0600005f060000600600006106000062060000630600006406000065060000660600006706000068060000690600006a0600006b0600006c0600006d0600006e0600006f060000700600007106000072060000730600007406000075060000760600007706000078060000790600007a0600007b0600007c0600007d0600007e0600007f060000800600008106000082060000830600008406000085060000860600008706000088060000890600008a0600008b0600008c0600008d0600008e0600008f060000 - m_AlignBytes: 16 - groupID: 15 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 1568 - particle2: 1569 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 1569 - particle2: 1570 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 1570 - particle2: 1571 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 1571 - particle2: 1572 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 1572 - particle2: 1573 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 1573 - particle2: 1574 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 1574 - particle2: 1575 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 1575 - particle2: 1576 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 1576 - particle2: 1577 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 1577 - particle2: 1578 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 1578 - particle2: 1579 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &138556972 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 138556973} - - component: {fileID: 138556977} - - component: {fileID: 138556976} - - component: {fileID: 138556975} - - component: {fileID: 138556974} - m_Layer: 0 - m_Name: Obi Rope (5) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &138556973 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 138556972} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 472161722} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &138556974 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 138556972} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 138556977} - m_Target: {fileID: 138556973} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &138556975 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 138556972} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &138556976 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 138556972} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 15 ---- !u!114 &138556977 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 138556972} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 900600009106000092060000930600009406000095060000960600009706000098060000990600009a0600009b0600009c0600009d0600009e0600009f060000a0060000a1060000a2060000a3060000a4060000a5060000a6060000a7060000a8060000a9060000aa060000ab060000ac060000ad060000ae060000af060000b0060000b1060000b2060000b3060000b4060000b5060000b6060000b7060000b8060000b9060000ba060000bb060000bc060000bd060000be060000bf060000c0060000c1060000c2060000c3060000c4060000c5060000c6060000c7060000c8060000c9060000ca060000cb060000cc060000cd060000ce060000cf060000d0060000d1060000d2060000d3060000d4060000d5060000d6060000d7060000d8060000d9060000da060000db060000dc060000dd060000de060000df060000e0060000e1060000e2060000e3060000e4060000e5060000e6060000e7060000e8060000e9060000ea060000eb060000ec060000ed060000ee060000ef060000f0060000f1060000f2060000f3060000f4060000f5060000f6060000f7060000f8060000f9060000fa060000fb060000fc060000fd060000fe060000ff060000 - m_AlignBytes: 16 - groupID: 16 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 1680 - particle2: 1681 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 1681 - particle2: 1682 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 1682 - particle2: 1683 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 1683 - particle2: 1684 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 1684 - particle2: 1685 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 1685 - particle2: 1686 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 1686 - particle2: 1687 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 1687 - particle2: 1688 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 1688 - particle2: 1689 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 1689 - particle2: 1690 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 1690 - particle2: 1691 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &139383574 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 139383575} - - component: {fileID: 139383579} - - component: {fileID: 139383578} - - component: {fileID: 139383577} - - component: {fileID: 139383576} - m_Layer: 0 - m_Name: Obi Rope (3) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &139383575 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 139383574} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.6, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1062536481} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &139383576 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 139383574} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 139383579} - m_Target: {fileID: 139383575} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &139383577 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 139383574} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &139383578 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 139383574} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 16 ---- !u!114 &139383579 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 139383574} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 000700000107000002070000030700000407000005070000060700000707000008070000090700000a0700000b0700000c0700000d0700000e0700000f070000100700001107000012070000130700001407000015070000160700001707000018070000190700001a0700001b0700001c0700001d0700001e0700001f070000200700002107000022070000230700002407000025070000260700002707000028070000290700002a0700002b0700002c0700002d0700002e0700002f070000300700003107000032070000330700003407000035070000360700003707000038070000390700003a0700003b0700003c0700003d0700003e0700003f070000400700004107000042070000430700004407000045070000460700004707000048070000490700004a0700004b0700004c0700004d0700004e0700004f070000500700005107000052070000530700005407000055070000560700005707000058070000590700005a0700005b0700005c0700005d0700005e0700005f070000600700006107000062070000630700006407000065070000660700006707000068070000690700006a0700006b0700006c0700006d0700006e0700006f070000 - m_AlignBytes: 16 - groupID: 17 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 1792 - particle2: 1793 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 1793 - particle2: 1794 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 1794 - particle2: 1795 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 1795 - particle2: 1796 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 1796 - particle2: 1797 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 1797 - particle2: 1798 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 1798 - particle2: 1799 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 1799 - particle2: 1800 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 1800 - particle2: 1801 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 1801 - particle2: 1802 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 1802 - particle2: 1803 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &156100544 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 156100545} - - component: {fileID: 156100549} - - component: {fileID: 156100548} - - component: {fileID: 156100547} - - component: {fileID: 156100546} - m_Layer: 0 - m_Name: Obi Rope (9) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &156100545 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 156100544} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.8, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1062536481} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &156100546 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 156100544} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 156100549} - m_Target: {fileID: 156100545} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &156100547 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 156100544} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &156100548 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 156100544} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 17 ---- !u!114 &156100549 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 156100544} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 700700007107000072070000730700007407000075070000760700007707000078070000790700007a0700007b0700007c0700007d0700007e0700007f070000800700008107000082070000830700008407000085070000860700008707000088070000890700008a0700008b0700008c0700008d0700008e0700008f070000900700009107000092070000930700009407000095070000960700009707000098070000990700009a0700009b0700009c0700009d0700009e0700009f070000a0070000a1070000a2070000a3070000a4070000a5070000a6070000a7070000a8070000a9070000aa070000ab070000ac070000ad070000ae070000af070000b0070000b1070000b2070000b3070000b4070000b5070000b6070000b7070000b8070000b9070000ba070000bb070000bc070000bd070000be070000bf070000c0070000c1070000c2070000c3070000c4070000c5070000c6070000c7070000c8070000c9070000ca070000cb070000cc070000cd070000ce070000cf070000d0070000d1070000d2070000d3070000d4070000d5070000d6070000d7070000d8070000d9070000da070000db070000dc070000dd070000de070000df070000 - m_AlignBytes: 16 - groupID: 18 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 1904 - particle2: 1905 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 1905 - particle2: 1906 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 1906 - particle2: 1907 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 1907 - particle2: 1908 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 1908 - particle2: 1909 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 1909 - particle2: 1910 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 1910 - particle2: 1911 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 1911 - particle2: 1912 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 1912 - particle2: 1913 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 1913 - particle2: 1914 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 1914 - particle2: 1915 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &161507645 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 161507646} - - component: {fileID: 161507650} - - component: {fileID: 161507649} - - component: {fileID: 161507648} - - component: {fileID: 161507647} - m_Layer: 0 - m_Name: Obi Rope (7) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &161507646 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 161507645} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.4, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 2009678977} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &161507647 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 161507645} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 161507650} - m_Target: {fileID: 161507646} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &161507648 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 161507645} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &161507649 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 161507645} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 18 ---- !u!114 &161507650 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 161507645} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: e0070000e1070000e2070000e3070000e4070000e5070000e6070000e7070000e8070000e9070000ea070000eb070000ec070000ed070000ee070000ef070000f0070000f1070000f2070000f3070000f4070000f5070000f6070000f7070000f8070000f9070000fa070000fb070000fc070000fd070000fe070000ff070000000800000108000002080000030800000408000005080000060800000708000008080000090800000a0800000b0800000c0800000d0800000e0800000f080000100800001108000012080000130800001408000015080000160800001708000018080000190800001a0800001b0800001c0800001d0800001e0800001f080000200800002108000022080000230800002408000025080000260800002708000028080000290800002a0800002b0800002c0800002d0800002e0800002f080000300800003108000032080000330800003408000035080000360800003708000038080000390800003a0800003b0800003c0800003d0800003e0800003f080000400800004108000042080000430800004408000045080000460800004708000048080000490800004a0800004b0800004c0800004d0800004e0800004f080000 - m_AlignBytes: 16 - groupID: 19 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 2016 - particle2: 2017 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 2017 - particle2: 2018 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 2018 - particle2: 2019 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 2019 - particle2: 2020 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 2020 - particle2: 2021 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 2021 - particle2: 2022 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 2022 - particle2: 2023 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 2023 - particle2: 2024 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 2024 - particle2: 2025 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 2025 - particle2: 2026 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 2026 - particle2: 2027 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &163656623 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 163656624} - - component: {fileID: 163656628} - - component: {fileID: 163656627} - - component: {fileID: 163656626} - - component: {fileID: 163656625} - m_Layer: 0 - m_Name: Obi Rope - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &163656624 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 163656623} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 2009678977} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &163656625 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 163656623} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 163656628} - m_Target: {fileID: 163656624} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &163656626 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 163656623} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &163656627 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 163656623} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 19 ---- !u!114 &163656628 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 163656623} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 500800005108000052080000530800005408000055080000560800005708000058080000590800005a0800005b0800005c0800005d0800005e0800005f080000600800006108000062080000630800006408000065080000660800006708000068080000690800006a0800006b0800006c0800006d0800006e0800006f080000700800007108000072080000730800007408000075080000760800007708000078080000790800007a0800007b0800007c0800007d0800007e0800007f080000800800008108000082080000830800008408000085080000860800008708000088080000890800008a0800008b0800008c0800008d0800008e0800008f080000900800009108000092080000930800009408000095080000960800009708000098080000990800009a0800009b0800009c0800009d0800009e0800009f080000a0080000a1080000a2080000a3080000a4080000a5080000a6080000a7080000a8080000a9080000aa080000ab080000ac080000ad080000ae080000af080000b0080000b1080000b2080000b3080000b4080000b5080000b6080000b7080000b8080000b9080000ba080000bb080000bc080000bd080000be080000bf080000 - m_AlignBytes: 16 - groupID: 20 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 2128 - particle2: 2129 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 2129 - particle2: 2130 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 2130 - particle2: 2131 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 2131 - particle2: 2132 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 2132 - particle2: 2133 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 2133 - particle2: 2134 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 2134 - particle2: 2135 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 2135 - particle2: 2136 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 2136 - particle2: 2137 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 2137 - particle2: 2138 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 2138 - particle2: 2139 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &165314044 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 165314045} - - component: {fileID: 165314049} - - component: {fileID: 165314048} - - component: {fileID: 165314047} - - component: {fileID: 165314046} - m_Layer: 0 - m_Name: Obi Rope (8) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &165314045 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 165314044} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.6, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 893001395} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &165314046 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 165314044} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 165314049} - m_Target: {fileID: 165314045} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &165314047 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 165314044} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &165314048 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 165314044} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 20 ---- !u!114 &165314049 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 165314044} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: c0080000c1080000c2080000c3080000c4080000c5080000c6080000c7080000c8080000c9080000ca080000cb080000cc080000cd080000ce080000cf080000d0080000d1080000d2080000d3080000d4080000d5080000d6080000d7080000d8080000d9080000da080000db080000dc080000dd080000de080000df080000e0080000e1080000e2080000e3080000e4080000e5080000e6080000e7080000e8080000e9080000ea080000eb080000ec080000ed080000ee080000ef080000f0080000f1080000f2080000f3080000f4080000f5080000f6080000f7080000f8080000f9080000fa080000fb080000fc080000fd080000fe080000ff080000000900000109000002090000030900000409000005090000060900000709000008090000090900000a0900000b0900000c0900000d0900000e0900000f090000100900001109000012090000130900001409000015090000160900001709000018090000190900001a0900001b0900001c0900001d0900001e0900001f090000200900002109000022090000230900002409000025090000260900002709000028090000290900002a0900002b0900002c0900002d0900002e0900002f090000 - m_AlignBytes: 16 - groupID: 21 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 2240 - particle2: 2241 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 2241 - particle2: 2242 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 2242 - particle2: 2243 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 2243 - particle2: 2244 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 2244 - particle2: 2245 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 2245 - particle2: 2246 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 2246 - particle2: 2247 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 2247 - particle2: 2248 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 2248 - particle2: 2249 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 2249 - particle2: 2250 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 2250 - particle2: 2251 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &170149754 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 170149755} - - component: {fileID: 170149759} - - component: {fileID: 170149758} - - component: {fileID: 170149757} - - component: {fileID: 170149756} - m_Layer: 0 - m_Name: Obi Rope (5) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &170149755 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 170149754} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1306593279} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &170149756 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 170149754} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 170149759} - m_Target: {fileID: 170149755} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &170149757 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 170149754} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &170149758 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 170149754} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 21 ---- !u!114 &170149759 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 170149754} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 300900003109000032090000330900003409000035090000360900003709000038090000390900003a0900003b0900003c0900003d0900003e0900003f090000400900004109000042090000430900004409000045090000460900004709000048090000490900004a0900004b0900004c0900004d0900004e0900004f090000500900005109000052090000530900005409000055090000560900005709000058090000590900005a0900005b0900005c0900005d0900005e0900005f090000600900006109000062090000630900006409000065090000660900006709000068090000690900006a0900006b0900006c0900006d0900006e0900006f090000700900007109000072090000730900007409000075090000760900007709000078090000790900007a0900007b0900007c0900007d0900007e0900007f090000800900008109000082090000830900008409000085090000860900008709000088090000890900008a0900008b0900008c0900008d0900008e0900008f090000900900009109000092090000930900009409000095090000960900009709000098090000990900009a0900009b0900009c0900009d0900009e0900009f090000 - m_AlignBytes: 16 - groupID: 22 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 2352 - particle2: 2353 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 2353 - particle2: 2354 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 2354 - particle2: 2355 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 2355 - particle2: 2356 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 2356 - particle2: 2357 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 2357 - particle2: 2358 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 2358 - particle2: 2359 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 2359 - particle2: 2360 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 2360 - particle2: 2361 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 2361 - particle2: 2362 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 2362 - particle2: 2363 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &238005275 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 238005276} - - component: {fileID: 238005280} - - component: {fileID: 238005279} - - component: {fileID: 238005278} - - component: {fileID: 238005277} - m_Layer: 0 - m_Name: Obi Rope (5) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &238005276 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 238005275} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 713844502} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &238005277 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 238005275} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 238005280} - m_Target: {fileID: 238005276} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &238005278 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 238005275} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &238005279 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 238005275} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 22 ---- !u!114 &238005280 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 238005275} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: a0090000a1090000a2090000a3090000a4090000a5090000a6090000a7090000a8090000a9090000aa090000ab090000ac090000ad090000ae090000af090000b0090000b1090000b2090000b3090000b4090000b5090000b6090000b7090000b8090000b9090000ba090000bb090000bc090000bd090000be090000bf090000c0090000c1090000c2090000c3090000c4090000c5090000c6090000c7090000c8090000c9090000ca090000cb090000cc090000cd090000ce090000cf090000d0090000d1090000d2090000d3090000d4090000d5090000d6090000d7090000d8090000d9090000da090000db090000dc090000dd090000de090000df090000e0090000e1090000e2090000e3090000e4090000e5090000e6090000e7090000e8090000e9090000ea090000eb090000ec090000ed090000ee090000ef090000f0090000f1090000f2090000f3090000f4090000f5090000f6090000f7090000f8090000f9090000fa090000fb090000fc090000fd090000fe090000ff090000000a0000010a0000020a0000030a0000040a0000050a0000060a0000070a0000080a0000090a00000a0a00000b0a00000c0a00000d0a00000e0a00000f0a0000 - m_AlignBytes: 16 - groupID: 23 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 2464 - particle2: 2465 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 2465 - particle2: 2466 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 2466 - particle2: 2467 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 2467 - particle2: 2468 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 2468 - particle2: 2469 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 2469 - particle2: 2470 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 2470 - particle2: 2471 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 2471 - particle2: 2472 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 2472 - particle2: 2473 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 2473 - particle2: 2474 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 2474 - particle2: 2475 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &249029317 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 249029318} - m_Layer: 0 - m_Name: Row (4) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &249029318 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 249029317} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -0.8} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 1101870350} - - {fileID: 304677351} - - {fileID: 1569249538} - - {fileID: 1092735640} - - {fileID: 1058904400} - - {fileID: 1153529340} - - {fileID: 881133077} - - {fileID: 1743992358} - - {fileID: 519875456} - - {fileID: 960049599} - m_Father: {fileID: 1027659676} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &258800384 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 258800385} - - component: {fileID: 258800389} - - component: {fileID: 258800388} - - component: {fileID: 258800387} - - component: {fileID: 258800386} - m_Layer: 0 - m_Name: Obi Rope - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &258800385 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 258800384} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1798495239} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &258800386 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 258800384} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 258800389} - m_Target: {fileID: 258800385} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &258800387 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 258800384} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &258800388 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 258800384} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 23 ---- !u!114 &258800389 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 258800384} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 100a0000110a0000120a0000130a0000140a0000150a0000160a0000170a0000180a0000190a00001a0a00001b0a00001c0a00001d0a00001e0a00001f0a0000200a0000210a0000220a0000230a0000240a0000250a0000260a0000270a0000280a0000290a00002a0a00002b0a00002c0a00002d0a00002e0a00002f0a0000300a0000310a0000320a0000330a0000340a0000350a0000360a0000370a0000380a0000390a00003a0a00003b0a00003c0a00003d0a00003e0a00003f0a0000400a0000410a0000420a0000430a0000440a0000450a0000460a0000470a0000480a0000490a00004a0a00004b0a00004c0a00004d0a00004e0a00004f0a0000500a0000510a0000520a0000530a0000540a0000550a0000560a0000570a0000580a0000590a00005a0a00005b0a00005c0a00005d0a00005e0a00005f0a0000600a0000610a0000620a0000630a0000640a0000650a0000660a0000670a0000680a0000690a00006a0a00006b0a00006c0a00006d0a00006e0a00006f0a0000700a0000710a0000720a0000730a0000740a0000750a0000760a0000770a0000780a0000790a00007a0a00007b0a00007c0a00007d0a00007e0a00007f0a0000 - m_AlignBytes: 16 - groupID: 24 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 2576 - particle2: 2577 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 2577 - particle2: 2578 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 2578 - particle2: 2579 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 2579 - particle2: 2580 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 2580 - particle2: 2581 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 2581 - particle2: 2582 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 2582 - particle2: 2583 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 2583 - particle2: 2584 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 2584 - particle2: 2585 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 2585 - particle2: 2586 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 2586 - particle2: 2587 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &265659788 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 265659789} - - component: {fileID: 265659793} - - component: {fileID: 265659792} - - component: {fileID: 265659791} - - component: {fileID: 265659790} - m_Layer: 0 - m_Name: Obi Rope (4) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &265659789 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 265659788} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.8, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 893001395} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &265659790 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 265659788} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 265659793} - m_Target: {fileID: 265659789} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &265659791 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 265659788} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &265659792 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 265659788} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 24 ---- !u!114 &265659793 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 265659788} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 800a0000810a0000820a0000830a0000840a0000850a0000860a0000870a0000880a0000890a00008a0a00008b0a00008c0a00008d0a00008e0a00008f0a0000900a0000910a0000920a0000930a0000940a0000950a0000960a0000970a0000980a0000990a00009a0a00009b0a00009c0a00009d0a00009e0a00009f0a0000a00a0000a10a0000a20a0000a30a0000a40a0000a50a0000a60a0000a70a0000a80a0000a90a0000aa0a0000ab0a0000ac0a0000ad0a0000ae0a0000af0a0000b00a0000b10a0000b20a0000b30a0000b40a0000b50a0000b60a0000b70a0000b80a0000b90a0000ba0a0000bb0a0000bc0a0000bd0a0000be0a0000bf0a0000c00a0000c10a0000c20a0000c30a0000c40a0000c50a0000c60a0000c70a0000c80a0000c90a0000ca0a0000cb0a0000cc0a0000cd0a0000ce0a0000cf0a0000d00a0000d10a0000d20a0000d30a0000d40a0000d50a0000d60a0000d70a0000d80a0000d90a0000da0a0000db0a0000dc0a0000dd0a0000de0a0000df0a0000e00a0000e10a0000e20a0000e30a0000e40a0000e50a0000e60a0000e70a0000e80a0000e90a0000ea0a0000eb0a0000ec0a0000ed0a0000ee0a0000ef0a0000 - m_AlignBytes: 16 - groupID: 25 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 2688 - particle2: 2689 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 2689 - particle2: 2690 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 2690 - particle2: 2691 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 2691 - particle2: 2692 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 2692 - particle2: 2693 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 2693 - particle2: 2694 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 2694 - particle2: 2695 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 2695 - particle2: 2696 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 2696 - particle2: 2697 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 2697 - particle2: 2698 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 2698 - particle2: 2699 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &274966133 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 274966134} - - component: {fileID: 274966138} - - component: {fileID: 274966137} - - component: {fileID: 274966136} - - component: {fileID: 274966135} - m_Layer: 0 - m_Name: Obi Rope (2) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &274966134 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 274966133} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.4, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1977632070} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &274966135 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 274966133} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 274966138} - m_Target: {fileID: 274966134} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &274966136 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 274966133} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &274966137 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 274966133} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 25 ---- !u!114 &274966138 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 274966133} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: f00a0000f10a0000f20a0000f30a0000f40a0000f50a0000f60a0000f70a0000f80a0000f90a0000fa0a0000fb0a0000fc0a0000fd0a0000fe0a0000ff0a0000000b0000010b0000020b0000030b0000040b0000050b0000060b0000070b0000080b0000090b00000a0b00000b0b00000c0b00000d0b00000e0b00000f0b0000100b0000110b0000120b0000130b0000140b0000150b0000160b0000170b0000180b0000190b00001a0b00001b0b00001c0b00001d0b00001e0b00001f0b0000200b0000210b0000220b0000230b0000240b0000250b0000260b0000270b0000280b0000290b00002a0b00002b0b00002c0b00002d0b00002e0b00002f0b0000300b0000310b0000320b0000330b0000340b0000350b0000360b0000370b0000380b0000390b00003a0b00003b0b00003c0b00003d0b00003e0b00003f0b0000400b0000410b0000420b0000430b0000440b0000450b0000460b0000470b0000480b0000490b00004a0b00004b0b00004c0b00004d0b00004e0b00004f0b0000500b0000510b0000520b0000530b0000540b0000550b0000560b0000570b0000580b0000590b00005a0b00005b0b00005c0b00005d0b00005e0b00005f0b0000 - m_AlignBytes: 16 - groupID: 26 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 2800 - particle2: 2801 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 2801 - particle2: 2802 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 2802 - particle2: 2803 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 2803 - particle2: 2804 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 2804 - particle2: 2805 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 2805 - particle2: 2806 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 2806 - particle2: 2807 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 2807 - particle2: 2808 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 2808 - particle2: 2809 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 2809 - particle2: 2810 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 2810 - particle2: 2811 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &277586513 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 277586514} - - component: {fileID: 277586518} - - component: {fileID: 277586517} - - component: {fileID: 277586516} - - component: {fileID: 277586515} - m_Layer: 0 - m_Name: Obi Rope (3) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &277586514 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 277586513} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.6, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 893001395} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &277586515 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 277586513} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 277586518} - m_Target: {fileID: 277586514} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &277586516 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 277586513} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &277586517 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 277586513} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 26 ---- !u!114 &277586518 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 277586513} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 600b0000610b0000620b0000630b0000640b0000650b0000660b0000670b0000680b0000690b00006a0b00006b0b00006c0b00006d0b00006e0b00006f0b0000700b0000710b0000720b0000730b0000740b0000750b0000760b0000770b0000780b0000790b00007a0b00007b0b00007c0b00007d0b00007e0b00007f0b0000800b0000810b0000820b0000830b0000840b0000850b0000860b0000870b0000880b0000890b00008a0b00008b0b00008c0b00008d0b00008e0b00008f0b0000900b0000910b0000920b0000930b0000940b0000950b0000960b0000970b0000980b0000990b00009a0b00009b0b00009c0b00009d0b00009e0b00009f0b0000a00b0000a10b0000a20b0000a30b0000a40b0000a50b0000a60b0000a70b0000a80b0000a90b0000aa0b0000ab0b0000ac0b0000ad0b0000ae0b0000af0b0000b00b0000b10b0000b20b0000b30b0000b40b0000b50b0000b60b0000b70b0000b80b0000b90b0000ba0b0000bb0b0000bc0b0000bd0b0000be0b0000bf0b0000c00b0000c10b0000c20b0000c30b0000c40b0000c50b0000c60b0000c70b0000c80b0000c90b0000ca0b0000cb0b0000cc0b0000cd0b0000ce0b0000cf0b0000 - m_AlignBytes: 16 - groupID: 27 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 2912 - particle2: 2913 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 2913 - particle2: 2914 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 2914 - particle2: 2915 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 2915 - particle2: 2916 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 2916 - particle2: 2917 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 2917 - particle2: 2918 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 2918 - particle2: 2919 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 2919 - particle2: 2920 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 2920 - particle2: 2921 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 2921 - particle2: 2922 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 2922 - particle2: 2923 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &302892550 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 302892551} - - component: {fileID: 302892555} - - component: {fileID: 302892554} - - component: {fileID: 302892553} - - component: {fileID: 302892552} - m_Layer: 0 - m_Name: Obi Rope (8) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &302892551 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 302892550} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.6, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 713844502} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &302892552 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 302892550} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 302892555} - m_Target: {fileID: 302892551} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &302892553 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 302892550} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &302892554 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 302892550} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 27 ---- !u!114 &302892555 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 302892550} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: d00b0000d10b0000d20b0000d30b0000d40b0000d50b0000d60b0000d70b0000d80b0000d90b0000da0b0000db0b0000dc0b0000dd0b0000de0b0000df0b0000e00b0000e10b0000e20b0000e30b0000e40b0000e50b0000e60b0000e70b0000e80b0000e90b0000ea0b0000eb0b0000ec0b0000ed0b0000ee0b0000ef0b0000f00b0000f10b0000f20b0000f30b0000f40b0000f50b0000f60b0000f70b0000f80b0000f90b0000fa0b0000fb0b0000fc0b0000fd0b0000fe0b0000ff0b0000000c0000010c0000020c0000030c0000040c0000050c0000060c0000070c0000080c0000090c00000a0c00000b0c00000c0c00000d0c00000e0c00000f0c0000100c0000110c0000120c0000130c0000140c0000150c0000160c0000170c0000180c0000190c00001a0c00001b0c00001c0c00001d0c00001e0c00001f0c0000200c0000210c0000220c0000230c0000240c0000250c0000260c0000270c0000280c0000290c00002a0c00002b0c00002c0c00002d0c00002e0c00002f0c0000300c0000310c0000320c0000330c0000340c0000350c0000360c0000370c0000380c0000390c00003a0c00003b0c00003c0c00003d0c00003e0c00003f0c0000 - m_AlignBytes: 16 - groupID: 28 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 3024 - particle2: 3025 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 3025 - particle2: 3026 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 3026 - particle2: 3027 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 3027 - particle2: 3028 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 3028 - particle2: 3029 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 3029 - particle2: 3030 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 3030 - particle2: 3031 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 3031 - particle2: 3032 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 3032 - particle2: 3033 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 3033 - particle2: 3034 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 3034 - particle2: 3035 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &304677350 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 304677351} - - component: {fileID: 304677355} - - component: {fileID: 304677354} - - component: {fileID: 304677353} - - component: {fileID: 304677352} - m_Layer: 0 - m_Name: Obi Rope (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &304677351 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 304677350} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.2, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 249029318} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &304677352 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 304677350} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 304677355} - m_Target: {fileID: 304677351} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &304677353 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 304677350} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &304677354 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 304677350} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 28 ---- !u!114 &304677355 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 304677350} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 400c0000410c0000420c0000430c0000440c0000450c0000460c0000470c0000480c0000490c00004a0c00004b0c00004c0c00004d0c00004e0c00004f0c0000500c0000510c0000520c0000530c0000540c0000550c0000560c0000570c0000580c0000590c00005a0c00005b0c00005c0c00005d0c00005e0c00005f0c0000600c0000610c0000620c0000630c0000640c0000650c0000660c0000670c0000680c0000690c00006a0c00006b0c00006c0c00006d0c00006e0c00006f0c0000700c0000710c0000720c0000730c0000740c0000750c0000760c0000770c0000780c0000790c00007a0c00007b0c00007c0c00007d0c00007e0c00007f0c0000800c0000810c0000820c0000830c0000840c0000850c0000860c0000870c0000880c0000890c00008a0c00008b0c00008c0c00008d0c00008e0c00008f0c0000900c0000910c0000920c0000930c0000940c0000950c0000960c0000970c0000980c0000990c00009a0c00009b0c00009c0c00009d0c00009e0c00009f0c0000a00c0000a10c0000a20c0000a30c0000a40c0000a50c0000a60c0000a70c0000a80c0000a90c0000aa0c0000ab0c0000ac0c0000ad0c0000ae0c0000af0c0000 - m_AlignBytes: 16 - groupID: 29 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 3136 - particle2: 3137 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 3137 - particle2: 3138 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 3138 - particle2: 3139 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 3139 - particle2: 3140 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 3140 - particle2: 3141 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 3141 - particle2: 3142 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 3142 - particle2: 3143 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 3143 - particle2: 3144 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 3144 - particle2: 3145 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 3145 - particle2: 3146 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 3146 - particle2: 3147 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &334659106 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 334659107} - - component: {fileID: 334659111} - - component: {fileID: 334659110} - - component: {fileID: 334659109} - - component: {fileID: 334659108} - m_Layer: 0 - m_Name: Obi Rope (9) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &334659107 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 334659106} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.8, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 648480057} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &334659108 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 334659106} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 334659111} - m_Target: {fileID: 334659107} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &334659109 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 334659106} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &334659110 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 334659106} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 29 ---- !u!114 &334659111 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 334659106} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: b00c0000b10c0000b20c0000b30c0000b40c0000b50c0000b60c0000b70c0000b80c0000b90c0000ba0c0000bb0c0000bc0c0000bd0c0000be0c0000bf0c0000c00c0000c10c0000c20c0000c30c0000c40c0000c50c0000c60c0000c70c0000c80c0000c90c0000ca0c0000cb0c0000cc0c0000cd0c0000ce0c0000cf0c0000d00c0000d10c0000d20c0000d30c0000d40c0000d50c0000d60c0000d70c0000d80c0000d90c0000da0c0000db0c0000dc0c0000dd0c0000de0c0000df0c0000e00c0000e10c0000e20c0000e30c0000e40c0000e50c0000e60c0000e70c0000e80c0000e90c0000ea0c0000eb0c0000ec0c0000ed0c0000ee0c0000ef0c0000f00c0000f10c0000f20c0000f30c0000f40c0000f50c0000f60c0000f70c0000f80c0000f90c0000fa0c0000fb0c0000fc0c0000fd0c0000fe0c0000ff0c0000000d0000010d0000020d0000030d0000040d0000050d0000060d0000070d0000080d0000090d00000a0d00000b0d00000c0d00000d0d00000e0d00000f0d0000100d0000110d0000120d0000130d0000140d0000150d0000160d0000170d0000180d0000190d00001a0d00001b0d00001c0d00001d0d00001e0d00001f0d0000 - m_AlignBytes: 16 - groupID: 30 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 3248 - particle2: 3249 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 3249 - particle2: 3250 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 3250 - particle2: 3251 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 3251 - particle2: 3252 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 3252 - particle2: 3253 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 3253 - particle2: 3254 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 3254 - particle2: 3255 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 3255 - particle2: 3256 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 3256 - particle2: 3257 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 3257 - particle2: 3258 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 3258 - particle2: 3259 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &347068006 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 347068007} - - component: {fileID: 347068011} - - component: {fileID: 347068010} - - component: {fileID: 347068009} - - component: {fileID: 347068008} - m_Layer: 0 - m_Name: Obi Rope (9) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &347068007 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 347068006} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.8, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 2009678977} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &347068008 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 347068006} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 347068011} - m_Target: {fileID: 347068007} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &347068009 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 347068006} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &347068010 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 347068006} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 30 ---- !u!114 &347068011 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 347068006} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 200d0000210d0000220d0000230d0000240d0000250d0000260d0000270d0000280d0000290d00002a0d00002b0d00002c0d00002d0d00002e0d00002f0d0000300d0000310d0000320d0000330d0000340d0000350d0000360d0000370d0000380d0000390d00003a0d00003b0d00003c0d00003d0d00003e0d00003f0d0000400d0000410d0000420d0000430d0000440d0000450d0000460d0000470d0000480d0000490d00004a0d00004b0d00004c0d00004d0d00004e0d00004f0d0000500d0000510d0000520d0000530d0000540d0000550d0000560d0000570d0000580d0000590d00005a0d00005b0d00005c0d00005d0d00005e0d00005f0d0000600d0000610d0000620d0000630d0000640d0000650d0000660d0000670d0000680d0000690d00006a0d00006b0d00006c0d00006d0d00006e0d00006f0d0000700d0000710d0000720d0000730d0000740d0000750d0000760d0000770d0000780d0000790d00007a0d00007b0d00007c0d00007d0d00007e0d00007f0d0000800d0000810d0000820d0000830d0000840d0000850d0000860d0000870d0000880d0000890d00008a0d00008b0d00008c0d00008d0d00008e0d00008f0d0000 - m_AlignBytes: 16 - groupID: 31 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 3360 - particle2: 3361 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 3361 - particle2: 3362 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 3362 - particle2: 3363 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 3363 - particle2: 3364 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 3364 - particle2: 3365 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 3365 - particle2: 3366 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 3366 - particle2: 3367 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 3367 - particle2: 3368 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 3368 - particle2: 3369 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 3369 - particle2: 3370 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 3370 - particle2: 3371 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &353133263 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 353133264} - - component: {fileID: 353133268} - - component: {fileID: 353133267} - - component: {fileID: 353133266} - - component: {fileID: 353133265} - m_Layer: 0 - m_Name: Obi Rope (9) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &353133264 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 353133263} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.8, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1628171963} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &353133265 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 353133263} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 353133268} - m_Target: {fileID: 353133264} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &353133266 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 353133263} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &353133267 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 353133263} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 31 ---- !u!114 &353133268 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 353133263} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 900d0000910d0000920d0000930d0000940d0000950d0000960d0000970d0000980d0000990d00009a0d00009b0d00009c0d00009d0d00009e0d00009f0d0000a00d0000a10d0000a20d0000a30d0000a40d0000a50d0000a60d0000a70d0000a80d0000a90d0000aa0d0000ab0d0000ac0d0000ad0d0000ae0d0000af0d0000b00d0000b10d0000b20d0000b30d0000b40d0000b50d0000b60d0000b70d0000b80d0000b90d0000ba0d0000bb0d0000bc0d0000bd0d0000be0d0000bf0d0000c00d0000c10d0000c20d0000c30d0000c40d0000c50d0000c60d0000c70d0000c80d0000c90d0000ca0d0000cb0d0000cc0d0000cd0d0000ce0d0000cf0d0000d00d0000d10d0000d20d0000d30d0000d40d0000d50d0000d60d0000d70d0000d80d0000d90d0000da0d0000db0d0000dc0d0000dd0d0000de0d0000df0d0000e00d0000e10d0000e20d0000e30d0000e40d0000e50d0000e60d0000e70d0000e80d0000e90d0000ea0d0000eb0d0000ec0d0000ed0d0000ee0d0000ef0d0000f00d0000f10d0000f20d0000f30d0000f40d0000f50d0000f60d0000f70d0000f80d0000f90d0000fa0d0000fb0d0000fc0d0000fd0d0000fe0d0000ff0d0000 - m_AlignBytes: 16 - groupID: 32 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 3472 - particle2: 3473 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 3473 - particle2: 3474 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 3474 - particle2: 3475 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 3475 - particle2: 3476 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 3476 - particle2: 3477 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 3477 - particle2: 3478 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 3478 - particle2: 3479 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 3479 - particle2: 3480 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 3480 - particle2: 3481 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 3481 - particle2: 3482 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 3482 - particle2: 3483 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &356687287 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 356687288} - - component: {fileID: 356687292} - - component: {fileID: 356687291} - - component: {fileID: 356687290} - - component: {fileID: 356687289} - m_Layer: 0 - m_Name: Obi Rope (6) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &356687288 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 356687287} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.2, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1240601735} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &356687289 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 356687287} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 356687292} - m_Target: {fileID: 356687288} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &356687290 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 356687287} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &356687291 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 356687287} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 32 ---- !u!114 &356687292 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 356687287} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 000e0000010e0000020e0000030e0000040e0000050e0000060e0000070e0000080e0000090e00000a0e00000b0e00000c0e00000d0e00000e0e00000f0e0000100e0000110e0000120e0000130e0000140e0000150e0000160e0000170e0000180e0000190e00001a0e00001b0e00001c0e00001d0e00001e0e00001f0e0000200e0000210e0000220e0000230e0000240e0000250e0000260e0000270e0000280e0000290e00002a0e00002b0e00002c0e00002d0e00002e0e00002f0e0000300e0000310e0000320e0000330e0000340e0000350e0000360e0000370e0000380e0000390e00003a0e00003b0e00003c0e00003d0e00003e0e00003f0e0000400e0000410e0000420e0000430e0000440e0000450e0000460e0000470e0000480e0000490e00004a0e00004b0e00004c0e00004d0e00004e0e00004f0e0000500e0000510e0000520e0000530e0000540e0000550e0000560e0000570e0000580e0000590e00005a0e00005b0e00005c0e00005d0e00005e0e00005f0e0000600e0000610e0000620e0000630e0000640e0000650e0000660e0000670e0000680e0000690e00006a0e00006b0e00006c0e00006d0e00006e0e00006f0e0000 - m_AlignBytes: 16 - groupID: 33 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 3584 - particle2: 3585 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 3585 - particle2: 3586 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 3586 - particle2: 3587 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 3587 - particle2: 3588 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 3588 - particle2: 3589 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 3589 - particle2: 3590 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 3590 - particle2: 3591 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 3591 - particle2: 3592 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 3592 - particle2: 3593 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 3593 - particle2: 3594 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 3594 - particle2: 3595 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &360658607 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 360658608} - - component: {fileID: 360658612} - - component: {fileID: 360658611} - - component: {fileID: 360658610} - - component: {fileID: 360658609} - m_Layer: 0 - m_Name: Obi Rope (6) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &360658608 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 360658607} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.2, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1306593279} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &360658609 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 360658607} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 360658612} - m_Target: {fileID: 360658608} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &360658610 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 360658607} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &360658611 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 360658607} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 33 ---- !u!114 &360658612 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 360658607} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 700e0000710e0000720e0000730e0000740e0000750e0000760e0000770e0000780e0000790e00007a0e00007b0e00007c0e00007d0e00007e0e00007f0e0000800e0000810e0000820e0000830e0000840e0000850e0000860e0000870e0000880e0000890e00008a0e00008b0e00008c0e00008d0e00008e0e00008f0e0000900e0000910e0000920e0000930e0000940e0000950e0000960e0000970e0000980e0000990e00009a0e00009b0e00009c0e00009d0e00009e0e00009f0e0000a00e0000a10e0000a20e0000a30e0000a40e0000a50e0000a60e0000a70e0000a80e0000a90e0000aa0e0000ab0e0000ac0e0000ad0e0000ae0e0000af0e0000b00e0000b10e0000b20e0000b30e0000b40e0000b50e0000b60e0000b70e0000b80e0000b90e0000ba0e0000bb0e0000bc0e0000bd0e0000be0e0000bf0e0000c00e0000c10e0000c20e0000c30e0000c40e0000c50e0000c60e0000c70e0000c80e0000c90e0000ca0e0000cb0e0000cc0e0000cd0e0000ce0e0000cf0e0000d00e0000d10e0000d20e0000d30e0000d40e0000d50e0000d60e0000d70e0000d80e0000d90e0000da0e0000db0e0000dc0e0000dd0e0000de0e0000df0e0000 - m_AlignBytes: 16 - groupID: 34 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 3696 - particle2: 3697 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 3697 - particle2: 3698 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 3698 - particle2: 3699 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 3699 - particle2: 3700 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 3700 - particle2: 3701 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 3701 - particle2: 3702 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 3702 - particle2: 3703 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 3703 - particle2: 3704 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 3704 - particle2: 3705 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 3705 - particle2: 3706 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 3706 - particle2: 3707 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &386305777 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 386305778} - - component: {fileID: 386305782} - - component: {fileID: 386305781} - - component: {fileID: 386305780} - - component: {fileID: 386305779} - m_Layer: 0 - m_Name: Obi Rope (7) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &386305778 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 386305777} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.4, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1640435994} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &386305779 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 386305777} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 386305782} - m_Target: {fileID: 386305778} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &386305780 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 386305777} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &386305781 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 386305777} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 34 ---- !u!114 &386305782 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 386305777} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: e00e0000e10e0000e20e0000e30e0000e40e0000e50e0000e60e0000e70e0000e80e0000e90e0000ea0e0000eb0e0000ec0e0000ed0e0000ee0e0000ef0e0000f00e0000f10e0000f20e0000f30e0000f40e0000f50e0000f60e0000f70e0000f80e0000f90e0000fa0e0000fb0e0000fc0e0000fd0e0000fe0e0000ff0e0000000f0000010f0000020f0000030f0000040f0000050f0000060f0000070f0000080f0000090f00000a0f00000b0f00000c0f00000d0f00000e0f00000f0f0000100f0000110f0000120f0000130f0000140f0000150f0000160f0000170f0000180f0000190f00001a0f00001b0f00001c0f00001d0f00001e0f00001f0f0000200f0000210f0000220f0000230f0000240f0000250f0000260f0000270f0000280f0000290f00002a0f00002b0f00002c0f00002d0f00002e0f00002f0f0000300f0000310f0000320f0000330f0000340f0000350f0000360f0000370f0000380f0000390f00003a0f00003b0f00003c0f00003d0f00003e0f00003f0f0000400f0000410f0000420f0000430f0000440f0000450f0000460f0000470f0000480f0000490f00004a0f00004b0f00004c0f00004d0f00004e0f00004f0f0000 - m_AlignBytes: 16 - groupID: 35 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 3808 - particle2: 3809 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 3809 - particle2: 3810 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 3810 - particle2: 3811 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 3811 - particle2: 3812 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 3812 - particle2: 3813 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 3813 - particle2: 3814 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 3814 - particle2: 3815 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 3815 - particle2: 3816 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 3816 - particle2: 3817 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 3817 - particle2: 3818 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 3818 - particle2: 3819 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &386703046 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 386703047} - - component: {fileID: 386703051} - - component: {fileID: 386703050} - - component: {fileID: 386703049} - - component: {fileID: 386703048} - m_Layer: 0 - m_Name: Obi Rope (4) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &386703047 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 386703046} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.8, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1241971666} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &386703048 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 386703046} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 386703051} - m_Target: {fileID: 386703047} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &386703049 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 386703046} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &386703050 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 386703046} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 35 ---- !u!114 &386703051 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 386703046} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 500f0000510f0000520f0000530f0000540f0000550f0000560f0000570f0000580f0000590f00005a0f00005b0f00005c0f00005d0f00005e0f00005f0f0000600f0000610f0000620f0000630f0000640f0000650f0000660f0000670f0000680f0000690f00006a0f00006b0f00006c0f00006d0f00006e0f00006f0f0000700f0000710f0000720f0000730f0000740f0000750f0000760f0000770f0000780f0000790f00007a0f00007b0f00007c0f00007d0f00007e0f00007f0f0000800f0000810f0000820f0000830f0000840f0000850f0000860f0000870f0000880f0000890f00008a0f00008b0f00008c0f00008d0f00008e0f00008f0f0000900f0000910f0000920f0000930f0000940f0000950f0000960f0000970f0000980f0000990f00009a0f00009b0f00009c0f00009d0f00009e0f00009f0f0000a00f0000a10f0000a20f0000a30f0000a40f0000a50f0000a60f0000a70f0000a80f0000a90f0000aa0f0000ab0f0000ac0f0000ad0f0000ae0f0000af0f0000b00f0000b10f0000b20f0000b30f0000b40f0000b50f0000b60f0000b70f0000b80f0000b90f0000ba0f0000bb0f0000bc0f0000bd0f0000be0f0000bf0f0000 - m_AlignBytes: 16 - groupID: 36 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 3920 - particle2: 3921 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 3921 - particle2: 3922 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 3922 - particle2: 3923 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 3923 - particle2: 3924 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 3924 - particle2: 3925 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 3925 - particle2: 3926 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 3926 - particle2: 3927 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 3927 - particle2: 3928 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 3928 - particle2: 3929 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 3929 - particle2: 3930 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 3930 - particle2: 3931 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &393174416 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 393174417} - - component: {fileID: 393174421} - - component: {fileID: 393174420} - - component: {fileID: 393174419} - - component: {fileID: 393174418} - m_Layer: 0 - m_Name: Obi Rope (7) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &393174417 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 393174416} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.4, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 940408952} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &393174418 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 393174416} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 393174421} - m_Target: {fileID: 393174417} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &393174419 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 393174416} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &393174420 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 393174416} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 36 ---- !u!114 &393174421 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 393174416} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: c00f0000c10f0000c20f0000c30f0000c40f0000c50f0000c60f0000c70f0000c80f0000c90f0000ca0f0000cb0f0000cc0f0000cd0f0000ce0f0000cf0f0000d00f0000d10f0000d20f0000d30f0000d40f0000d50f0000d60f0000d70f0000d80f0000d90f0000da0f0000db0f0000dc0f0000dd0f0000de0f0000df0f0000e00f0000e10f0000e20f0000e30f0000e40f0000e50f0000e60f0000e70f0000e80f0000e90f0000ea0f0000eb0f0000ec0f0000ed0f0000ee0f0000ef0f0000f00f0000f10f0000f20f0000f30f0000f40f0000f50f0000f60f0000f70f0000f80f0000f90f0000fa0f0000fb0f0000fc0f0000fd0f0000fe0f0000ff0f0000001000000110000002100000031000000410000005100000061000000710000008100000091000000a1000000b1000000c1000000d1000000e1000000f100000101000001110000012100000131000001410000015100000161000001710000018100000191000001a1000001b1000001c1000001d1000001e1000001f100000201000002110000022100000231000002410000025100000261000002710000028100000291000002a1000002b1000002c1000002d1000002e1000002f100000 - m_AlignBytes: 16 - groupID: 37 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 4032 - particle2: 4033 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 4033 - particle2: 4034 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 4034 - particle2: 4035 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 4035 - particle2: 4036 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 4036 - particle2: 4037 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 4037 - particle2: 4038 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 4038 - particle2: 4039 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 4039 - particle2: 4040 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 4040 - particle2: 4041 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 4041 - particle2: 4042 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 4042 - particle2: 4043 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &399904145 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 399904146} - - component: {fileID: 399904150} - - component: {fileID: 399904149} - - component: {fileID: 399904148} - - component: {fileID: 399904147} - m_Layer: 0 - m_Name: Obi Rope (7) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &399904146 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 399904145} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.4, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1977632070} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &399904147 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 399904145} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 399904150} - m_Target: {fileID: 399904146} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &399904148 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 399904145} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &399904149 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 399904145} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 37 ---- !u!114 &399904150 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 399904145} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 301000003110000032100000331000003410000035100000361000003710000038100000391000003a1000003b1000003c1000003d1000003e1000003f100000401000004110000042100000431000004410000045100000461000004710000048100000491000004a1000004b1000004c1000004d1000004e1000004f100000501000005110000052100000531000005410000055100000561000005710000058100000591000005a1000005b1000005c1000005d1000005e1000005f100000601000006110000062100000631000006410000065100000661000006710000068100000691000006a1000006b1000006c1000006d1000006e1000006f100000701000007110000072100000731000007410000075100000761000007710000078100000791000007a1000007b1000007c1000007d1000007e1000007f100000801000008110000082100000831000008410000085100000861000008710000088100000891000008a1000008b1000008c1000008d1000008e1000008f100000901000009110000092100000931000009410000095100000961000009710000098100000991000009a1000009b1000009c1000009d1000009e1000009f100000 - m_AlignBytes: 16 - groupID: 38 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 4144 - particle2: 4145 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 4145 - particle2: 4146 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 4146 - particle2: 4147 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 4147 - particle2: 4148 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 4148 - particle2: 4149 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 4149 - particle2: 4150 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 4150 - particle2: 4151 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 4151 - particle2: 4152 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 4152 - particle2: 4153 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 4153 - particle2: 4154 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 4154 - particle2: 4155 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1001 &421764872 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 400000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: m_RootOrder - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: m_LocalScale.x - value: 1.2 - objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: m_LocalScale.y - value: 1.2 - objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: m_LocalScale.z - value: 1.2 - objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: m_LocalRotation.y - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 2300000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: 'm_Materials.Array.data[0]' - value: - objectReference: {fileID: 2100000, guid: a0a5f9e13fa7c47f78547e54896609da, type: 2} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: - - targetCorrespondingSourceObject: {fileID: 100000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - insertIndex: -1 - addedObject: {fileID: 506459882} - - targetCorrespondingSourceObject: {fileID: 100000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - insertIndex: -1 - addedObject: {fileID: 506459883} - m_SourcePrefab: {fileID: 100100000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} ---- !u!1 &426164208 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 426164209} - m_Layer: 0 - m_Name: Row (8) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &426164209 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 426164208} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -1.6} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 584208411} - - {fileID: 1523215163} - - {fileID: 1895783475} - - {fileID: 1898534085} - - {fileID: 1948354618} - - {fileID: 2078944946} - - {fileID: 2145370371} - - {fileID: 40955815} - - {fileID: 1789705481} - - {fileID: 1753057674} - m_Father: {fileID: 1760688768} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &437496966 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 437496967} - - component: {fileID: 437496971} - - component: {fileID: 437496970} - - component: {fileID: 437496969} - - component: {fileID: 437496968} - m_Layer: 0 - m_Name: Obi Rope (6) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &437496967 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 437496966} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.2, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 54623967} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &437496968 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 437496966} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 437496971} - m_Target: {fileID: 437496967} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &437496969 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 437496966} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &437496970 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 437496966} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 38 ---- !u!114 &437496971 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 437496966} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: a0100000a1100000a2100000a3100000a4100000a5100000a6100000a7100000a8100000a9100000aa100000ab100000ac100000ad100000ae100000af100000b0100000b1100000b2100000b3100000b4100000b5100000b6100000b7100000b8100000b9100000ba100000bb100000bc100000bd100000be100000bf100000c0100000c1100000c2100000c3100000c4100000c5100000c6100000c7100000c8100000c9100000ca100000cb100000cc100000cd100000ce100000cf100000d0100000d1100000d2100000d3100000d4100000d5100000d6100000d7100000d8100000d9100000da100000db100000dc100000dd100000de100000df100000e0100000e1100000e2100000e3100000e4100000e5100000e6100000e7100000e8100000e9100000ea100000eb100000ec100000ed100000ee100000ef100000f0100000f1100000f2100000f3100000f4100000f5100000f6100000f7100000f8100000f9100000fa100000fb100000fc100000fd100000fe100000ff100000001100000111000002110000031100000411000005110000061100000711000008110000091100000a1100000b1100000c1100000d1100000e1100000f110000 - m_AlignBytes: 16 - groupID: 39 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 4256 - particle2: 4257 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 4257 - particle2: 4258 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 4258 - particle2: 4259 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 4259 - particle2: 4260 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 4260 - particle2: 4261 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 4261 - particle2: 4262 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 4262 - particle2: 4263 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 4263 - particle2: 4264 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 4264 - particle2: 4265 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 4265 - particle2: 4266 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 4266 - particle2: 4267 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &444273475 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 444273476} - - component: {fileID: 444273480} - - component: {fileID: 444273479} - - component: {fileID: 444273478} - - component: {fileID: 444273477} - m_Layer: 0 - m_Name: Obi Rope - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &444273476 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 444273475} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 713844502} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &444273477 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 444273475} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 444273480} - m_Target: {fileID: 444273476} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &444273478 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 444273475} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &444273479 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 444273475} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 39 ---- !u!114 &444273480 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 444273475} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 101100001111000012110000131100001411000015110000161100001711000018110000191100001a1100001b1100001c1100001d1100001e1100001f110000201100002111000022110000231100002411000025110000261100002711000028110000291100002a1100002b1100002c1100002d1100002e1100002f110000301100003111000032110000331100003411000035110000361100003711000038110000391100003a1100003b1100003c1100003d1100003e1100003f110000401100004111000042110000431100004411000045110000461100004711000048110000491100004a1100004b1100004c1100004d1100004e1100004f110000501100005111000052110000531100005411000055110000561100005711000058110000591100005a1100005b1100005c1100005d1100005e1100005f110000601100006111000062110000631100006411000065110000661100006711000068110000691100006a1100006b1100006c1100006d1100006e1100006f110000701100007111000072110000731100007411000075110000761100007711000078110000791100007a1100007b1100007c1100007d1100007e1100007f110000 - m_AlignBytes: 16 - groupID: 40 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 4368 - particle2: 4369 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 4369 - particle2: 4370 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 4370 - particle2: 4371 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 4371 - particle2: 4372 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 4372 - particle2: 4373 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 4373 - particle2: 4374 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 4374 - particle2: 4375 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 4375 - particle2: 4376 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 4376 - particle2: 4377 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 4377 - particle2: 4378 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 4378 - particle2: 4379 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &449353292 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 449353293} - - component: {fileID: 449353297} - - component: {fileID: 449353296} - - component: {fileID: 449353295} - - component: {fileID: 449353294} - m_Layer: 0 - m_Name: Obi Rope - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &449353293 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 449353292} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1628171963} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &449353294 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 449353292} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 449353297} - m_Target: {fileID: 449353293} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &449353295 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 449353292} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &449353296 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 449353292} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 40 ---- !u!114 &449353297 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 449353292} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 801100008111000082110000831100008411000085110000861100008711000088110000891100008a1100008b1100008c1100008d1100008e1100008f110000901100009111000092110000931100009411000095110000961100009711000098110000991100009a1100009b1100009c1100009d1100009e1100009f110000a0110000a1110000a2110000a3110000a4110000a5110000a6110000a7110000a8110000a9110000aa110000ab110000ac110000ad110000ae110000af110000b0110000b1110000b2110000b3110000b4110000b5110000b6110000b7110000b8110000b9110000ba110000bb110000bc110000bd110000be110000bf110000c0110000c1110000c2110000c3110000c4110000c5110000c6110000c7110000c8110000c9110000ca110000cb110000cc110000cd110000ce110000cf110000d0110000d1110000d2110000d3110000d4110000d5110000d6110000d7110000d8110000d9110000da110000db110000dc110000dd110000de110000df110000e0110000e1110000e2110000e3110000e4110000e5110000e6110000e7110000e8110000e9110000ea110000eb110000ec110000ed110000ee110000ef110000 - m_AlignBytes: 16 - groupID: 41 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 4480 - particle2: 4481 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 4481 - particle2: 4482 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 4482 - particle2: 4483 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 4483 - particle2: 4484 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 4484 - particle2: 4485 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 4485 - particle2: 4486 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 4486 - particle2: 4487 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 4487 - particle2: 4488 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 4488 - particle2: 4489 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 4489 - particle2: 4490 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 4490 - particle2: 4491 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &449771828 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 449771829} - - component: {fileID: 449771833} - - component: {fileID: 449771832} - - component: {fileID: 449771831} - - component: {fileID: 449771830} - m_Layer: 0 - m_Name: Obi Rope (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &449771829 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 449771828} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.2, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 472161722} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &449771830 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 449771828} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 449771833} - m_Target: {fileID: 449771829} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &449771831 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 449771828} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &449771832 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 449771828} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 41 ---- !u!114 &449771833 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 449771828} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: f0110000f1110000f2110000f3110000f4110000f5110000f6110000f7110000f8110000f9110000fa110000fb110000fc110000fd110000fe110000ff110000001200000112000002120000031200000412000005120000061200000712000008120000091200000a1200000b1200000c1200000d1200000e1200000f120000101200001112000012120000131200001412000015120000161200001712000018120000191200001a1200001b1200001c1200001d1200001e1200001f120000201200002112000022120000231200002412000025120000261200002712000028120000291200002a1200002b1200002c1200002d1200002e1200002f120000301200003112000032120000331200003412000035120000361200003712000038120000391200003a1200003b1200003c1200003d1200003e1200003f120000401200004112000042120000431200004412000045120000461200004712000048120000491200004a1200004b1200004c1200004d1200004e1200004f120000501200005112000052120000531200005412000055120000561200005712000058120000591200005a1200005b1200005c1200005d1200005e1200005f120000 - m_AlignBytes: 16 - groupID: 42 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 4592 - particle2: 4593 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 4593 - particle2: 4594 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 4594 - particle2: 4595 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 4595 - particle2: 4596 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 4596 - particle2: 4597 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 4597 - particle2: 4598 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 4598 - particle2: 4599 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 4599 - particle2: 4600 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 4600 - particle2: 4601 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 4601 - particle2: 4602 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 4602 - particle2: 4603 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &451433693 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 451433694} - - component: {fileID: 451433698} - - component: {fileID: 451433697} - - component: {fileID: 451433696} - - component: {fileID: 451433695} - m_Layer: 0 - m_Name: Obi Rope (8) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &451433694 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 451433693} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.6, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 648480057} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &451433695 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 451433693} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 451433698} - m_Target: {fileID: 451433694} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &451433696 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 451433693} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &451433697 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 451433693} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 42 ---- !u!114 &451433698 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 451433693} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 601200006112000062120000631200006412000065120000661200006712000068120000691200006a1200006b1200006c1200006d1200006e1200006f120000701200007112000072120000731200007412000075120000761200007712000078120000791200007a1200007b1200007c1200007d1200007e1200007f120000801200008112000082120000831200008412000085120000861200008712000088120000891200008a1200008b1200008c1200008d1200008e1200008f120000901200009112000092120000931200009412000095120000961200009712000098120000991200009a1200009b1200009c1200009d1200009e1200009f120000a0120000a1120000a2120000a3120000a4120000a5120000a6120000a7120000a8120000a9120000aa120000ab120000ac120000ad120000ae120000af120000b0120000b1120000b2120000b3120000b4120000b5120000b6120000b7120000b8120000b9120000ba120000bb120000bc120000bd120000be120000bf120000c0120000c1120000c2120000c3120000c4120000c5120000c6120000c7120000c8120000c9120000ca120000cb120000cc120000cd120000ce120000cf120000 - m_AlignBytes: 16 - groupID: 43 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 4704 - particle2: 4705 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 4705 - particle2: 4706 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 4706 - particle2: 4707 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 4707 - particle2: 4708 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 4708 - particle2: 4709 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 4709 - particle2: 4710 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 4710 - particle2: 4711 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 4711 - particle2: 4712 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 4712 - particle2: 4713 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 4713 - particle2: 4714 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 4714 - particle2: 4715 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &452192105 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 452192106} - - component: {fileID: 452192110} - - component: {fileID: 452192109} - - component: {fileID: 452192108} - - component: {fileID: 452192107} - m_Layer: 0 - m_Name: Obi Rope (8) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &452192106 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 452192105} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.6, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1640435994} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &452192107 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 452192105} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 452192110} - m_Target: {fileID: 452192106} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &452192108 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 452192105} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &452192109 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 452192105} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 43 ---- !u!114 &452192110 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 452192105} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: d0120000d1120000d2120000d3120000d4120000d5120000d6120000d7120000d8120000d9120000da120000db120000dc120000dd120000de120000df120000e0120000e1120000e2120000e3120000e4120000e5120000e6120000e7120000e8120000e9120000ea120000eb120000ec120000ed120000ee120000ef120000f0120000f1120000f2120000f3120000f4120000f5120000f6120000f7120000f8120000f9120000fa120000fb120000fc120000fd120000fe120000ff120000001300000113000002130000031300000413000005130000061300000713000008130000091300000a1300000b1300000c1300000d1300000e1300000f130000101300001113000012130000131300001413000015130000161300001713000018130000191300001a1300001b1300001c1300001d1300001e1300001f130000201300002113000022130000231300002413000025130000261300002713000028130000291300002a1300002b1300002c1300002d1300002e1300002f130000301300003113000032130000331300003413000035130000361300003713000038130000391300003a1300003b1300003c1300003d1300003e1300003f130000 - m_AlignBytes: 16 - groupID: 44 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 4816 - particle2: 4817 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 4817 - particle2: 4818 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 4818 - particle2: 4819 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 4819 - particle2: 4820 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 4820 - particle2: 4821 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 4821 - particle2: 4822 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 4822 - particle2: 4823 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 4823 - particle2: 4824 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 4824 - particle2: 4825 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 4825 - particle2: 4826 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 4826 - particle2: 4827 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &453529545 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 453529546} - - component: {fileID: 453529550} - - component: {fileID: 453529549} - - component: {fileID: 453529548} - - component: {fileID: 453529547} - m_Layer: 0 - m_Name: Obi Rope (5) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &453529546 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 453529545} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 54623967} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &453529547 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 453529545} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 453529550} - m_Target: {fileID: 453529546} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &453529548 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 453529545} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &453529549 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 453529545} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 44 ---- !u!114 &453529550 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 453529545} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 401300004113000042130000431300004413000045130000461300004713000048130000491300004a1300004b1300004c1300004d1300004e1300004f130000501300005113000052130000531300005413000055130000561300005713000058130000591300005a1300005b1300005c1300005d1300005e1300005f130000601300006113000062130000631300006413000065130000661300006713000068130000691300006a1300006b1300006c1300006d1300006e1300006f130000701300007113000072130000731300007413000075130000761300007713000078130000791300007a1300007b1300007c1300007d1300007e1300007f130000801300008113000082130000831300008413000085130000861300008713000088130000891300008a1300008b1300008c1300008d1300008e1300008f130000901300009113000092130000931300009413000095130000961300009713000098130000991300009a1300009b1300009c1300009d1300009e1300009f130000a0130000a1130000a2130000a3130000a4130000a5130000a6130000a7130000a8130000a9130000aa130000ab130000ac130000ad130000ae130000af130000 - m_AlignBytes: 16 - groupID: 45 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 4928 - particle2: 4929 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 4929 - particle2: 4930 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 4930 - particle2: 4931 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 4931 - particle2: 4932 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 4932 - particle2: 4933 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 4933 - particle2: 4934 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 4934 - particle2: 4935 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 4935 - particle2: 4936 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 4936 - particle2: 4937 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 4937 - particle2: 4938 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 4938 - particle2: 4939 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &455432479 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 455432480} - - component: {fileID: 455432484} - - component: {fileID: 455432483} - - component: {fileID: 455432482} - - component: {fileID: 455432481} - m_Layer: 0 - m_Name: Obi Rope (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &455432480 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 455432479} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.2, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 713844502} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &455432481 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 455432479} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 455432484} - m_Target: {fileID: 455432480} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &455432482 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 455432479} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &455432483 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 455432479} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 45 ---- !u!114 &455432484 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 455432479} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: b0130000b1130000b2130000b3130000b4130000b5130000b6130000b7130000b8130000b9130000ba130000bb130000bc130000bd130000be130000bf130000c0130000c1130000c2130000c3130000c4130000c5130000c6130000c7130000c8130000c9130000ca130000cb130000cc130000cd130000ce130000cf130000d0130000d1130000d2130000d3130000d4130000d5130000d6130000d7130000d8130000d9130000da130000db130000dc130000dd130000de130000df130000e0130000e1130000e2130000e3130000e4130000e5130000e6130000e7130000e8130000e9130000ea130000eb130000ec130000ed130000ee130000ef130000f0130000f1130000f2130000f3130000f4130000f5130000f6130000f7130000f8130000f9130000fa130000fb130000fc130000fd130000fe130000ff130000001400000114000002140000031400000414000005140000061400000714000008140000091400000a1400000b1400000c1400000d1400000e1400000f140000101400001114000012140000131400001414000015140000161400001714000018140000191400001a1400001b1400001c1400001d1400001e1400001f140000 - m_AlignBytes: 16 - groupID: 46 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 5040 - particle2: 5041 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 5041 - particle2: 5042 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 5042 - particle2: 5043 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 5043 - particle2: 5044 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 5044 - particle2: 5045 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 5045 - particle2: 5046 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 5046 - particle2: 5047 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 5047 - particle2: 5048 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 5048 - particle2: 5049 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 5049 - particle2: 5050 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 5050 - particle2: 5051 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &469876704 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 469876705} - - component: {fileID: 469876709} - - component: {fileID: 469876708} - - component: {fileID: 469876707} - - component: {fileID: 469876706} - m_Layer: 0 - m_Name: Obi Rope (7) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &469876705 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 469876704} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.4, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1798495239} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &469876706 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 469876704} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 469876709} - m_Target: {fileID: 469876705} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &469876707 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 469876704} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &469876708 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 469876704} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 46 ---- !u!114 &469876709 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 469876704} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 201400002114000022140000231400002414000025140000261400002714000028140000291400002a1400002b1400002c1400002d1400002e1400002f140000301400003114000032140000331400003414000035140000361400003714000038140000391400003a1400003b1400003c1400003d1400003e1400003f140000401400004114000042140000431400004414000045140000461400004714000048140000491400004a1400004b1400004c1400004d1400004e1400004f140000501400005114000052140000531400005414000055140000561400005714000058140000591400005a1400005b1400005c1400005d1400005e1400005f140000601400006114000062140000631400006414000065140000661400006714000068140000691400006a1400006b1400006c1400006d1400006e1400006f140000701400007114000072140000731400007414000075140000761400007714000078140000791400007a1400007b1400007c1400007d1400007e1400007f140000801400008114000082140000831400008414000085140000861400008714000088140000891400008a1400008b1400008c1400008d1400008e1400008f140000 - m_AlignBytes: 16 - groupID: 47 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 5152 - particle2: 5153 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 5153 - particle2: 5154 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 5154 - particle2: 5155 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 5155 - particle2: 5156 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 5156 - particle2: 5157 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 5157 - particle2: 5158 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 5158 - particle2: 5159 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 5159 - particle2: 5160 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 5160 - particle2: 5161 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 5161 - particle2: 5162 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 5162 - particle2: 5163 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &472161721 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 472161722} - m_Layer: 0 - m_Name: Row (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &472161722 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 472161721} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -0.2} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 21655691} - - {fileID: 449771829} - - {fileID: 61099067} - - {fileID: 67321349} - - {fileID: 531662323} - - {fileID: 138556973} - - {fileID: 515056253} - - {fileID: 1537736705} - - {fileID: 1503252370} - - {fileID: 811913319} - m_Father: {fileID: 1027659676} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &474752658 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 474752659} - - component: {fileID: 474752663} - - component: {fileID: 474752662} - - component: {fileID: 474752661} - - component: {fileID: 474752660} - m_Layer: 0 - m_Name: Obi Rope (2) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &474752659 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 474752658} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.4, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1306593279} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &474752660 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 474752658} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 474752663} - m_Target: {fileID: 474752659} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &474752661 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 474752658} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &474752662 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 474752658} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 47 ---- !u!114 &474752663 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 474752658} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 901400009114000092140000931400009414000095140000961400009714000098140000991400009a1400009b1400009c1400009d1400009e1400009f140000a0140000a1140000a2140000a3140000a4140000a5140000a6140000a7140000a8140000a9140000aa140000ab140000ac140000ad140000ae140000af140000b0140000b1140000b2140000b3140000b4140000b5140000b6140000b7140000b8140000b9140000ba140000bb140000bc140000bd140000be140000bf140000c0140000c1140000c2140000c3140000c4140000c5140000c6140000c7140000c8140000c9140000ca140000cb140000cc140000cd140000ce140000cf140000d0140000d1140000d2140000d3140000d4140000d5140000d6140000d7140000d8140000d9140000da140000db140000dc140000dd140000de140000df140000e0140000e1140000e2140000e3140000e4140000e5140000e6140000e7140000e8140000e9140000ea140000eb140000ec140000ed140000ee140000ef140000f0140000f1140000f2140000f3140000f4140000f5140000f6140000f7140000f8140000f9140000fa140000fb140000fc140000fd140000fe140000ff140000 - m_AlignBytes: 16 - groupID: 48 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 5264 - particle2: 5265 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 5265 - particle2: 5266 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 5266 - particle2: 5267 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 5267 - particle2: 5268 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 5268 - particle2: 5269 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 5269 - particle2: 5270 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 5270 - particle2: 5271 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 5271 - particle2: 5272 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 5272 - particle2: 5273 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 5273 - particle2: 5274 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 5274 - particle2: 5275 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &489080964 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 489080965} - - component: {fileID: 489080969} - - component: {fileID: 489080968} - - component: {fileID: 489080967} - - component: {fileID: 489080966} - m_Layer: 0 - m_Name: Obi Rope (5) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &489080965 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 489080964} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1977632070} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &489080966 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 489080964} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 489080969} - m_Target: {fileID: 489080965} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &489080967 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 489080964} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &489080968 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 489080964} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 48 ---- !u!114 &489080969 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 489080964} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 001500000115000002150000031500000415000005150000061500000715000008150000091500000a1500000b1500000c1500000d1500000e1500000f150000101500001115000012150000131500001415000015150000161500001715000018150000191500001a1500001b1500001c1500001d1500001e1500001f150000201500002115000022150000231500002415000025150000261500002715000028150000291500002a1500002b1500002c1500002d1500002e1500002f150000301500003115000032150000331500003415000035150000361500003715000038150000391500003a1500003b1500003c1500003d1500003e1500003f150000401500004115000042150000431500004415000045150000461500004715000048150000491500004a1500004b1500004c1500004d1500004e1500004f150000501500005115000052150000531500005415000055150000561500005715000058150000591500005a1500005b1500005c1500005d1500005e1500005f150000601500006115000062150000631500006415000065150000661500006715000068150000691500006a1500006b1500006c1500006d1500006e1500006f150000 - m_AlignBytes: 16 - groupID: 49 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 5376 - particle2: 5377 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 5377 - particle2: 5378 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 5378 - particle2: 5379 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 5379 - particle2: 5380 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 5380 - particle2: 5381 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 5381 - particle2: 5382 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 5382 - particle2: 5383 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 5383 - particle2: 5384 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 5384 - particle2: 5385 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 5385 - particle2: 5386 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 5386 - particle2: 5387 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &503533458 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 503533459} - - component: {fileID: 503533463} - - component: {fileID: 503533462} - - component: {fileID: 503533461} - - component: {fileID: 503533460} - m_Layer: 0 - m_Name: Obi Rope (2) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &503533459 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 503533458} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.4, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1240601735} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &503533460 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 503533458} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 503533463} - m_Target: {fileID: 503533459} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &503533461 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 503533458} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &503533462 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 503533458} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 49 ---- !u!114 &503533463 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 503533458} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 701500007115000072150000731500007415000075150000761500007715000078150000791500007a1500007b1500007c1500007d1500007e1500007f150000801500008115000082150000831500008415000085150000861500008715000088150000891500008a1500008b1500008c1500008d1500008e1500008f150000901500009115000092150000931500009415000095150000961500009715000098150000991500009a1500009b1500009c1500009d1500009e1500009f150000a0150000a1150000a2150000a3150000a4150000a5150000a6150000a7150000a8150000a9150000aa150000ab150000ac150000ad150000ae150000af150000b0150000b1150000b2150000b3150000b4150000b5150000b6150000b7150000b8150000b9150000ba150000bb150000bc150000bd150000be150000bf150000c0150000c1150000c2150000c3150000c4150000c5150000c6150000c7150000c8150000c9150000ca150000cb150000cc150000cd150000ce150000cf150000d0150000d1150000d2150000d3150000d4150000d5150000d6150000d7150000d8150000d9150000da150000db150000dc150000dd150000de150000df150000 - m_AlignBytes: 16 - groupID: 50 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 5488 - particle2: 5489 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 5489 - particle2: 5490 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 5490 - particle2: 5491 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 5491 - particle2: 5492 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 5492 - particle2: 5493 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 5493 - particle2: 5494 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 5494 - particle2: 5495 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 5495 - particle2: 5496 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 5496 - particle2: 5497 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 5497 - particle2: 5498 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 5498 - particle2: 5499 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &506459881 stripped -GameObject: - m_CorrespondingSourceObject: {fileID: 100000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - m_PrefabInstance: {fileID: 421764872} - m_PrefabAsset: {fileID: 0} ---- !u!64 &506459882 -MeshCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 506459881} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 5 - m_Convex: 0 - m_CookingOptions: 30 - m_Mesh: {fileID: 4300000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} ---- !u!114 &506459883 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 506459881} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6757b231cedd544c583ef8aeaf773b2a, type: 3} - m_Name: - m_EditorClassIdentifier: - thickness: 0 - inverted: 0 - material: {fileID: 11400000, guid: d368f2c47473d4bfb8dd9f08073cb403, type: 2} - filter: -65535 - m_SourceCollider: {fileID: 506459882} - m_DistanceField: {fileID: 0} ---- !u!1 &510728466 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 510728467} - m_Layer: 0 - m_Name: Row (2) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &510728467 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 510728466} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -0.4} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 1424048101} - - {fileID: 1084473020} - - {fileID: 729000486} - - {fileID: 980293277} - - {fileID: 1739484933} - - {fileID: 82705115} - - {fileID: 611757892} - - {fileID: 865980438} - - {fileID: 529503719} - - {fileID: 1143771886} - m_Father: {fileID: 1760688768} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &514767705 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 514767706} - - component: {fileID: 514767710} - - component: {fileID: 514767709} - - component: {fileID: 514767708} - - component: {fileID: 514767707} - m_Layer: 0 - m_Name: Obi Rope (6) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &514767706 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 514767705} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.2, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 713844502} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &514767707 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 514767705} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 514767710} - m_Target: {fileID: 514767706} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &514767708 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 514767705} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &514767709 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 514767705} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 50 ---- !u!114 &514767710 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 514767705} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: e0150000e1150000e2150000e3150000e4150000e5150000e6150000e7150000e8150000e9150000ea150000eb150000ec150000ed150000ee150000ef150000f0150000f1150000f2150000f3150000f4150000f5150000f6150000f7150000f8150000f9150000fa150000fb150000fc150000fd150000fe150000ff150000001600000116000002160000031600000416000005160000061600000716000008160000091600000a1600000b1600000c1600000d1600000e1600000f160000101600001116000012160000131600001416000015160000161600001716000018160000191600001a1600001b1600001c1600001d1600001e1600001f160000201600002116000022160000231600002416000025160000261600002716000028160000291600002a1600002b1600002c1600002d1600002e1600002f160000301600003116000032160000331600003416000035160000361600003716000038160000391600003a1600003b1600003c1600003d1600003e1600003f160000401600004116000042160000431600004416000045160000461600004716000048160000491600004a1600004b1600004c1600004d1600004e1600004f160000 - m_AlignBytes: 16 - groupID: 51 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 5600 - particle2: 5601 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 5601 - particle2: 5602 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 5602 - particle2: 5603 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 5603 - particle2: 5604 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 5604 - particle2: 5605 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 5605 - particle2: 5606 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 5606 - particle2: 5607 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 5607 - particle2: 5608 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 5608 - particle2: 5609 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 5609 - particle2: 5610 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 5610 - particle2: 5611 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &515056252 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 515056253} - - component: {fileID: 515056257} - - component: {fileID: 515056256} - - component: {fileID: 515056255} - - component: {fileID: 515056254} - m_Layer: 0 - m_Name: Obi Rope (6) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &515056253 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 515056252} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.2, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 472161722} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &515056254 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 515056252} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 515056257} - m_Target: {fileID: 515056253} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &515056255 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 515056252} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &515056256 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 515056252} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 51 ---- !u!114 &515056257 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 515056252} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 501600005116000052160000531600005416000055160000561600005716000058160000591600005a1600005b1600005c1600005d1600005e1600005f160000601600006116000062160000631600006416000065160000661600006716000068160000691600006a1600006b1600006c1600006d1600006e1600006f160000701600007116000072160000731600007416000075160000761600007716000078160000791600007a1600007b1600007c1600007d1600007e1600007f160000801600008116000082160000831600008416000085160000861600008716000088160000891600008a1600008b1600008c1600008d1600008e1600008f160000901600009116000092160000931600009416000095160000961600009716000098160000991600009a1600009b1600009c1600009d1600009e1600009f160000a0160000a1160000a2160000a3160000a4160000a5160000a6160000a7160000a8160000a9160000aa160000ab160000ac160000ad160000ae160000af160000b0160000b1160000b2160000b3160000b4160000b5160000b6160000b7160000b8160000b9160000ba160000bb160000bc160000bd160000be160000bf160000 - m_AlignBytes: 16 - groupID: 52 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 5712 - particle2: 5713 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 5713 - particle2: 5714 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 5714 - particle2: 5715 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 5715 - particle2: 5716 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 5716 - particle2: 5717 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 5717 - particle2: 5718 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 5718 - particle2: 5719 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 5719 - particle2: 5720 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 5720 - particle2: 5721 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 5721 - particle2: 5722 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 5722 - particle2: 5723 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &519875455 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 519875456} - - component: {fileID: 519875460} - - component: {fileID: 519875459} - - component: {fileID: 519875458} - - component: {fileID: 519875457} - m_Layer: 0 - m_Name: Obi Rope (8) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &519875456 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 519875455} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.6, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 249029318} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &519875457 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 519875455} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 519875460} - m_Target: {fileID: 519875456} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &519875458 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 519875455} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &519875459 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 519875455} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 52 ---- !u!114 &519875460 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 519875455} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: c0160000c1160000c2160000c3160000c4160000c5160000c6160000c7160000c8160000c9160000ca160000cb160000cc160000cd160000ce160000cf160000d0160000d1160000d2160000d3160000d4160000d5160000d6160000d7160000d8160000d9160000da160000db160000dc160000dd160000de160000df160000e0160000e1160000e2160000e3160000e4160000e5160000e6160000e7160000e8160000e9160000ea160000eb160000ec160000ed160000ee160000ef160000f0160000f1160000f2160000f3160000f4160000f5160000f6160000f7160000f8160000f9160000fa160000fb160000fc160000fd160000fe160000ff160000001700000117000002170000031700000417000005170000061700000717000008170000091700000a1700000b1700000c1700000d1700000e1700000f170000101700001117000012170000131700001417000015170000161700001717000018170000191700001a1700001b1700001c1700001d1700001e1700001f170000201700002117000022170000231700002417000025170000261700002717000028170000291700002a1700002b1700002c1700002d1700002e1700002f170000 - m_AlignBytes: 16 - groupID: 53 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 5824 - particle2: 5825 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 5825 - particle2: 5826 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 5826 - particle2: 5827 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 5827 - particle2: 5828 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 5828 - particle2: 5829 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 5829 - particle2: 5830 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 5830 - particle2: 5831 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 5831 - particle2: 5832 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 5832 - particle2: 5833 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 5833 - particle2: 5834 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 5834 - particle2: 5835 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &529503718 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 529503719} - - component: {fileID: 529503723} - - component: {fileID: 529503722} - - component: {fileID: 529503721} - - component: {fileID: 529503720} - m_Layer: 0 - m_Name: Obi Rope (8) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &529503719 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 529503718} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.6, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 510728467} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &529503720 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 529503718} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 529503723} - m_Target: {fileID: 529503719} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &529503721 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 529503718} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &529503722 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 529503718} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 53 ---- !u!114 &529503723 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 529503718} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 301700003117000032170000331700003417000035170000361700003717000038170000391700003a1700003b1700003c1700003d1700003e1700003f170000401700004117000042170000431700004417000045170000461700004717000048170000491700004a1700004b1700004c1700004d1700004e1700004f170000501700005117000052170000531700005417000055170000561700005717000058170000591700005a1700005b1700005c1700005d1700005e1700005f170000601700006117000062170000631700006417000065170000661700006717000068170000691700006a1700006b1700006c1700006d1700006e1700006f170000701700007117000072170000731700007417000075170000761700007717000078170000791700007a1700007b1700007c1700007d1700007e1700007f170000801700008117000082170000831700008417000085170000861700008717000088170000891700008a1700008b1700008c1700008d1700008e1700008f170000901700009117000092170000931700009417000095170000961700009717000098170000991700009a1700009b1700009c1700009d1700009e1700009f170000 - m_AlignBytes: 16 - groupID: 54 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 5936 - particle2: 5937 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 5937 - particle2: 5938 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 5938 - particle2: 5939 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 5939 - particle2: 5940 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 5940 - particle2: 5941 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 5941 - particle2: 5942 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 5942 - particle2: 5943 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 5943 - particle2: 5944 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 5944 - particle2: 5945 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 5945 - particle2: 5946 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 5946 - particle2: 5947 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &531482357 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 531482358} - - component: {fileID: 531482362} - - component: {fileID: 531482361} - - component: {fileID: 531482360} - - component: {fileID: 531482359} - m_Layer: 0 - m_Name: Obi Rope (3) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &531482358 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 531482357} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.6, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1240601735} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &531482359 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 531482357} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 531482362} - m_Target: {fileID: 531482358} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &531482360 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 531482357} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &531482361 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 531482357} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 54 ---- !u!114 &531482362 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 531482357} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: a0170000a1170000a2170000a3170000a4170000a5170000a6170000a7170000a8170000a9170000aa170000ab170000ac170000ad170000ae170000af170000b0170000b1170000b2170000b3170000b4170000b5170000b6170000b7170000b8170000b9170000ba170000bb170000bc170000bd170000be170000bf170000c0170000c1170000c2170000c3170000c4170000c5170000c6170000c7170000c8170000c9170000ca170000cb170000cc170000cd170000ce170000cf170000d0170000d1170000d2170000d3170000d4170000d5170000d6170000d7170000d8170000d9170000da170000db170000dc170000dd170000de170000df170000e0170000e1170000e2170000e3170000e4170000e5170000e6170000e7170000e8170000e9170000ea170000eb170000ec170000ed170000ee170000ef170000f0170000f1170000f2170000f3170000f4170000f5170000f6170000f7170000f8170000f9170000fa170000fb170000fc170000fd170000fe170000ff170000001800000118000002180000031800000418000005180000061800000718000008180000091800000a1800000b1800000c1800000d1800000e1800000f180000 - m_AlignBytes: 16 - groupID: 55 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 6048 - particle2: 6049 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 6049 - particle2: 6050 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 6050 - particle2: 6051 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 6051 - particle2: 6052 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 6052 - particle2: 6053 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 6053 - particle2: 6054 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 6054 - particle2: 6055 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 6055 - particle2: 6056 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 6056 - particle2: 6057 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 6057 - particle2: 6058 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 6058 - particle2: 6059 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &531662322 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 531662323} - - component: {fileID: 531662327} - - component: {fileID: 531662326} - - component: {fileID: 531662325} - - component: {fileID: 531662324} - m_Layer: 0 - m_Name: Obi Rope (4) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &531662323 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 531662322} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.8, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 472161722} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &531662324 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 531662322} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 531662327} - m_Target: {fileID: 531662323} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &531662325 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 531662322} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &531662326 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 531662322} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 55 ---- !u!114 &531662327 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 531662322} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 101800001118000012180000131800001418000015180000161800001718000018180000191800001a1800001b1800001c1800001d1800001e1800001f180000201800002118000022180000231800002418000025180000261800002718000028180000291800002a1800002b1800002c1800002d1800002e1800002f180000301800003118000032180000331800003418000035180000361800003718000038180000391800003a1800003b1800003c1800003d1800003e1800003f180000401800004118000042180000431800004418000045180000461800004718000048180000491800004a1800004b1800004c1800004d1800004e1800004f180000501800005118000052180000531800005418000055180000561800005718000058180000591800005a1800005b1800005c1800005d1800005e1800005f180000601800006118000062180000631800006418000065180000661800006718000068180000691800006a1800006b1800006c1800006d1800006e1800006f180000701800007118000072180000731800007418000075180000761800007718000078180000791800007a1800007b1800007c1800007d1800007e1800007f180000 - m_AlignBytes: 16 - groupID: 56 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 6160 - particle2: 6161 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 6161 - particle2: 6162 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 6162 - particle2: 6163 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 6163 - particle2: 6164 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 6164 - particle2: 6165 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 6165 - particle2: 6166 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 6166 - particle2: 6167 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 6167 - particle2: 6168 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 6168 - particle2: 6169 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 6169 - particle2: 6170 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 6170 - particle2: 6171 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &535373371 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 535373372} - - component: {fileID: 535373376} - - component: {fileID: 535373375} - - component: {fileID: 535373374} - - component: {fileID: 535373373} - m_Layer: 0 - m_Name: Obi Rope (6) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &535373372 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 535373371} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.2, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1977632070} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &535373373 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 535373371} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 535373376} - m_Target: {fileID: 535373372} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &535373374 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 535373371} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &535373375 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 535373371} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 56 ---- !u!114 &535373376 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 535373371} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 801800008118000082180000831800008418000085180000861800008718000088180000891800008a1800008b1800008c1800008d1800008e1800008f180000901800009118000092180000931800009418000095180000961800009718000098180000991800009a1800009b1800009c1800009d1800009e1800009f180000a0180000a1180000a2180000a3180000a4180000a5180000a6180000a7180000a8180000a9180000aa180000ab180000ac180000ad180000ae180000af180000b0180000b1180000b2180000b3180000b4180000b5180000b6180000b7180000b8180000b9180000ba180000bb180000bc180000bd180000be180000bf180000c0180000c1180000c2180000c3180000c4180000c5180000c6180000c7180000c8180000c9180000ca180000cb180000cc180000cd180000ce180000cf180000d0180000d1180000d2180000d3180000d4180000d5180000d6180000d7180000d8180000d9180000da180000db180000dc180000dd180000de180000df180000e0180000e1180000e2180000e3180000e4180000e5180000e6180000e7180000e8180000e9180000ea180000eb180000ec180000ed180000ee180000ef180000 - m_AlignBytes: 16 - groupID: 57 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 6272 - particle2: 6273 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 6273 - particle2: 6274 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 6274 - particle2: 6275 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 6275 - particle2: 6276 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 6276 - particle2: 6277 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 6277 - particle2: 6278 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 6278 - particle2: 6279 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 6279 - particle2: 6280 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 6280 - particle2: 6281 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 6281 - particle2: 6282 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 6282 - particle2: 6283 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &544654643 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 544654644} - - component: {fileID: 544654648} - - component: {fileID: 544654647} - - component: {fileID: 544654646} - - component: {fileID: 544654645} - m_Layer: 0 - m_Name: Obi Rope (3) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &544654644 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 544654643} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.6, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 648480057} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &544654645 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 544654643} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 544654648} - m_Target: {fileID: 544654644} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &544654646 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 544654643} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &544654647 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 544654643} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 57 ---- !u!114 &544654648 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 544654643} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: f0180000f1180000f2180000f3180000f4180000f5180000f6180000f7180000f8180000f9180000fa180000fb180000fc180000fd180000fe180000ff180000001900000119000002190000031900000419000005190000061900000719000008190000091900000a1900000b1900000c1900000d1900000e1900000f190000101900001119000012190000131900001419000015190000161900001719000018190000191900001a1900001b1900001c1900001d1900001e1900001f190000201900002119000022190000231900002419000025190000261900002719000028190000291900002a1900002b1900002c1900002d1900002e1900002f190000301900003119000032190000331900003419000035190000361900003719000038190000391900003a1900003b1900003c1900003d1900003e1900003f190000401900004119000042190000431900004419000045190000461900004719000048190000491900004a1900004b1900004c1900004d1900004e1900004f190000501900005119000052190000531900005419000055190000561900005719000058190000591900005a1900005b1900005c1900005d1900005e1900005f190000 - m_AlignBytes: 16 - groupID: 58 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 6384 - particle2: 6385 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 6385 - particle2: 6386 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 6386 - particle2: 6387 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 6387 - particle2: 6388 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 6388 - particle2: 6389 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 6389 - particle2: 6390 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 6390 - particle2: 6391 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 6391 - particle2: 6392 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 6392 - particle2: 6393 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 6393 - particle2: 6394 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 6394 - particle2: 6395 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &547327666 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 547327667} - - component: {fileID: 547327671} - - component: {fileID: 547327670} - - component: {fileID: 547327669} - - component: {fileID: 547327668} - m_Layer: 0 - m_Name: Obi Rope (4) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &547327667 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 547327666} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.8, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1306593279} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &547327668 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 547327666} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 547327671} - m_Target: {fileID: 547327667} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &547327669 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 547327666} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &547327670 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 547327666} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 58 ---- !u!114 &547327671 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 547327666} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 601900006119000062190000631900006419000065190000661900006719000068190000691900006a1900006b1900006c1900006d1900006e1900006f190000701900007119000072190000731900007419000075190000761900007719000078190000791900007a1900007b1900007c1900007d1900007e1900007f190000801900008119000082190000831900008419000085190000861900008719000088190000891900008a1900008b1900008c1900008d1900008e1900008f190000901900009119000092190000931900009419000095190000961900009719000098190000991900009a1900009b1900009c1900009d1900009e1900009f190000a0190000a1190000a2190000a3190000a4190000a5190000a6190000a7190000a8190000a9190000aa190000ab190000ac190000ad190000ae190000af190000b0190000b1190000b2190000b3190000b4190000b5190000b6190000b7190000b8190000b9190000ba190000bb190000bc190000bd190000be190000bf190000c0190000c1190000c2190000c3190000c4190000c5190000c6190000c7190000c8190000c9190000ca190000cb190000cc190000cd190000ce190000cf190000 - m_AlignBytes: 16 - groupID: 59 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 6496 - particle2: 6497 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 6497 - particle2: 6498 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 6498 - particle2: 6499 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 6499 - particle2: 6500 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 6500 - particle2: 6501 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 6501 - particle2: 6502 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 6502 - particle2: 6503 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 6503 - particle2: 6504 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 6504 - particle2: 6505 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 6505 - particle2: 6506 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 6506 - particle2: 6507 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &549111721 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 549111722} - - component: {fileID: 549111726} - - component: {fileID: 549111725} - - component: {fileID: 549111724} - - component: {fileID: 549111723} - m_Layer: 0 - m_Name: Obi Rope (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &549111722 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 549111721} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.2, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 54623967} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &549111723 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 549111721} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 549111726} - m_Target: {fileID: 549111722} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &549111724 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 549111721} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &549111725 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 549111721} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 59 ---- !u!114 &549111726 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 549111721} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: d0190000d1190000d2190000d3190000d4190000d5190000d6190000d7190000d8190000d9190000da190000db190000dc190000dd190000de190000df190000e0190000e1190000e2190000e3190000e4190000e5190000e6190000e7190000e8190000e9190000ea190000eb190000ec190000ed190000ee190000ef190000f0190000f1190000f2190000f3190000f4190000f5190000f6190000f7190000f8190000f9190000fa190000fb190000fc190000fd190000fe190000ff190000001a0000011a0000021a0000031a0000041a0000051a0000061a0000071a0000081a0000091a00000a1a00000b1a00000c1a00000d1a00000e1a00000f1a0000101a0000111a0000121a0000131a0000141a0000151a0000161a0000171a0000181a0000191a00001a1a00001b1a00001c1a00001d1a00001e1a00001f1a0000201a0000211a0000221a0000231a0000241a0000251a0000261a0000271a0000281a0000291a00002a1a00002b1a00002c1a00002d1a00002e1a00002f1a0000301a0000311a0000321a0000331a0000341a0000351a0000361a0000371a0000381a0000391a00003a1a00003b1a00003c1a00003d1a00003e1a00003f1a0000 - m_AlignBytes: 16 - groupID: 60 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 6608 - particle2: 6609 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 6609 - particle2: 6610 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 6610 - particle2: 6611 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 6611 - particle2: 6612 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 6612 - particle2: 6613 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 6613 - particle2: 6614 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 6614 - particle2: 6615 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 6615 - particle2: 6616 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 6616 - particle2: 6617 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 6617 - particle2: 6618 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 6618 - particle2: 6619 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &549530595 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 549530596} - - component: {fileID: 549530600} - - component: {fileID: 549530599} - - component: {fileID: 549530598} - - component: {fileID: 549530597} - m_Layer: 0 - m_Name: Obi Rope (5) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &549530596 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 549530595} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1628171963} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &549530597 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 549530595} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 549530600} - m_Target: {fileID: 549530596} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &549530598 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 549530595} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &549530599 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 549530595} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 60 ---- !u!114 &549530600 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 549530595} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 401a0000411a0000421a0000431a0000441a0000451a0000461a0000471a0000481a0000491a00004a1a00004b1a00004c1a00004d1a00004e1a00004f1a0000501a0000511a0000521a0000531a0000541a0000551a0000561a0000571a0000581a0000591a00005a1a00005b1a00005c1a00005d1a00005e1a00005f1a0000601a0000611a0000621a0000631a0000641a0000651a0000661a0000671a0000681a0000691a00006a1a00006b1a00006c1a00006d1a00006e1a00006f1a0000701a0000711a0000721a0000731a0000741a0000751a0000761a0000771a0000781a0000791a00007a1a00007b1a00007c1a00007d1a00007e1a00007f1a0000801a0000811a0000821a0000831a0000841a0000851a0000861a0000871a0000881a0000891a00008a1a00008b1a00008c1a00008d1a00008e1a00008f1a0000901a0000911a0000921a0000931a0000941a0000951a0000961a0000971a0000981a0000991a00009a1a00009b1a00009c1a00009d1a00009e1a00009f1a0000a01a0000a11a0000a21a0000a31a0000a41a0000a51a0000a61a0000a71a0000a81a0000a91a0000aa1a0000ab1a0000ac1a0000ad1a0000ae1a0000af1a0000 - m_AlignBytes: 16 - groupID: 61 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 6720 - particle2: 6721 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 6721 - particle2: 6722 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 6722 - particle2: 6723 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 6723 - particle2: 6724 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 6724 - particle2: 6725 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 6725 - particle2: 6726 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 6726 - particle2: 6727 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 6727 - particle2: 6728 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 6728 - particle2: 6729 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 6729 - particle2: 6730 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 6730 - particle2: 6731 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &557556285 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 557556286} - - component: {fileID: 557556290} - - component: {fileID: 557556289} - - component: {fileID: 557556288} - - component: {fileID: 557556287} - m_Layer: 0 - m_Name: Obi Rope (8) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &557556286 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 557556285} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.6, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1977632070} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &557556287 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 557556285} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 557556290} - m_Target: {fileID: 557556286} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &557556288 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 557556285} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &557556289 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 557556285} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 61 ---- !u!114 &557556290 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 557556285} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: b01a0000b11a0000b21a0000b31a0000b41a0000b51a0000b61a0000b71a0000b81a0000b91a0000ba1a0000bb1a0000bc1a0000bd1a0000be1a0000bf1a0000c01a0000c11a0000c21a0000c31a0000c41a0000c51a0000c61a0000c71a0000c81a0000c91a0000ca1a0000cb1a0000cc1a0000cd1a0000ce1a0000cf1a0000d01a0000d11a0000d21a0000d31a0000d41a0000d51a0000d61a0000d71a0000d81a0000d91a0000da1a0000db1a0000dc1a0000dd1a0000de1a0000df1a0000e01a0000e11a0000e21a0000e31a0000e41a0000e51a0000e61a0000e71a0000e81a0000e91a0000ea1a0000eb1a0000ec1a0000ed1a0000ee1a0000ef1a0000f01a0000f11a0000f21a0000f31a0000f41a0000f51a0000f61a0000f71a0000f81a0000f91a0000fa1a0000fb1a0000fc1a0000fd1a0000fe1a0000ff1a0000001b0000011b0000021b0000031b0000041b0000051b0000061b0000071b0000081b0000091b00000a1b00000b1b00000c1b00000d1b00000e1b00000f1b0000101b0000111b0000121b0000131b0000141b0000151b0000161b0000171b0000181b0000191b00001a1b00001b1b00001c1b00001d1b00001e1b00001f1b0000 - m_AlignBytes: 16 - groupID: 62 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 6832 - particle2: 6833 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 6833 - particle2: 6834 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 6834 - particle2: 6835 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 6835 - particle2: 6836 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 6836 - particle2: 6837 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 6837 - particle2: 6838 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 6838 - particle2: 6839 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 6839 - particle2: 6840 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 6840 - particle2: 6841 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 6841 - particle2: 6842 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 6842 - particle2: 6843 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &584208410 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 584208411} - - component: {fileID: 584208415} - - component: {fileID: 584208414} - - component: {fileID: 584208413} - - component: {fileID: 584208412} - m_Layer: 0 - m_Name: Obi Rope - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &584208411 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 584208410} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 426164209} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &584208412 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 584208410} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 584208415} - m_Target: {fileID: 584208411} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &584208413 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 584208410} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &584208414 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 584208410} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 62 ---- !u!114 &584208415 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 584208410} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 201b0000211b0000221b0000231b0000241b0000251b0000261b0000271b0000281b0000291b00002a1b00002b1b00002c1b00002d1b00002e1b00002f1b0000301b0000311b0000321b0000331b0000341b0000351b0000361b0000371b0000381b0000391b00003a1b00003b1b00003c1b00003d1b00003e1b00003f1b0000401b0000411b0000421b0000431b0000441b0000451b0000461b0000471b0000481b0000491b00004a1b00004b1b00004c1b00004d1b00004e1b00004f1b0000501b0000511b0000521b0000531b0000541b0000551b0000561b0000571b0000581b0000591b00005a1b00005b1b00005c1b00005d1b00005e1b00005f1b0000601b0000611b0000621b0000631b0000641b0000651b0000661b0000671b0000681b0000691b00006a1b00006b1b00006c1b00006d1b00006e1b00006f1b0000701b0000711b0000721b0000731b0000741b0000751b0000761b0000771b0000781b0000791b00007a1b00007b1b00007c1b00007d1b00007e1b00007f1b0000801b0000811b0000821b0000831b0000841b0000851b0000861b0000871b0000881b0000891b00008a1b00008b1b00008c1b00008d1b00008e1b00008f1b0000 - m_AlignBytes: 16 - groupID: 63 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 6944 - particle2: 6945 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 6945 - particle2: 6946 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 6946 - particle2: 6947 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 6947 - particle2: 6948 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 6948 - particle2: 6949 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 6949 - particle2: 6950 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 6950 - particle2: 6951 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 6951 - particle2: 6952 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 6952 - particle2: 6953 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 6953 - particle2: 6954 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 6954 - particle2: 6955 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &600063429 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 600063430} - - component: {fileID: 600063434} - - component: {fileID: 600063433} - - component: {fileID: 600063432} - - component: {fileID: 600063431} - m_Layer: 0 - m_Name: Obi Rope (5) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &600063430 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 600063429} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1241971666} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &600063431 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 600063429} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 600063434} - m_Target: {fileID: 600063430} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &600063432 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 600063429} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &600063433 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 600063429} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 63 ---- !u!114 &600063434 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 600063429} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 901b0000911b0000921b0000931b0000941b0000951b0000961b0000971b0000981b0000991b00009a1b00009b1b00009c1b00009d1b00009e1b00009f1b0000a01b0000a11b0000a21b0000a31b0000a41b0000a51b0000a61b0000a71b0000a81b0000a91b0000aa1b0000ab1b0000ac1b0000ad1b0000ae1b0000af1b0000b01b0000b11b0000b21b0000b31b0000b41b0000b51b0000b61b0000b71b0000b81b0000b91b0000ba1b0000bb1b0000bc1b0000bd1b0000be1b0000bf1b0000c01b0000c11b0000c21b0000c31b0000c41b0000c51b0000c61b0000c71b0000c81b0000c91b0000ca1b0000cb1b0000cc1b0000cd1b0000ce1b0000cf1b0000d01b0000d11b0000d21b0000d31b0000d41b0000d51b0000d61b0000d71b0000d81b0000d91b0000da1b0000db1b0000dc1b0000dd1b0000de1b0000df1b0000e01b0000e11b0000e21b0000e31b0000e41b0000e51b0000e61b0000e71b0000e81b0000e91b0000ea1b0000eb1b0000ec1b0000ed1b0000ee1b0000ef1b0000f01b0000f11b0000f21b0000f31b0000f41b0000f51b0000f61b0000f71b0000f81b0000f91b0000fa1b0000fb1b0000fc1b0000fd1b0000fe1b0000ff1b0000 - m_AlignBytes: 16 - groupID: 64 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 7056 - particle2: 7057 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 7057 - particle2: 7058 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 7058 - particle2: 7059 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 7059 - particle2: 7060 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 7060 - particle2: 7061 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 7061 - particle2: 7062 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 7062 - particle2: 7063 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 7063 - particle2: 7064 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 7064 - particle2: 7065 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 7065 - particle2: 7066 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 7066 - particle2: 7067 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &611757891 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 611757892} - - component: {fileID: 611757896} - - component: {fileID: 611757895} - - component: {fileID: 611757894} - - component: {fileID: 611757893} - m_Layer: 0 - m_Name: Obi Rope (6) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &611757892 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 611757891} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.2, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 510728467} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &611757893 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 611757891} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 611757896} - m_Target: {fileID: 611757892} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &611757894 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 611757891} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &611757895 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 611757891} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 64 ---- !u!114 &611757896 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 611757891} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 001c0000011c0000021c0000031c0000041c0000051c0000061c0000071c0000081c0000091c00000a1c00000b1c00000c1c00000d1c00000e1c00000f1c0000101c0000111c0000121c0000131c0000141c0000151c0000161c0000171c0000181c0000191c00001a1c00001b1c00001c1c00001d1c00001e1c00001f1c0000201c0000211c0000221c0000231c0000241c0000251c0000261c0000271c0000281c0000291c00002a1c00002b1c00002c1c00002d1c00002e1c00002f1c0000301c0000311c0000321c0000331c0000341c0000351c0000361c0000371c0000381c0000391c00003a1c00003b1c00003c1c00003d1c00003e1c00003f1c0000401c0000411c0000421c0000431c0000441c0000451c0000461c0000471c0000481c0000491c00004a1c00004b1c00004c1c00004d1c00004e1c00004f1c0000501c0000511c0000521c0000531c0000541c0000551c0000561c0000571c0000581c0000591c00005a1c00005b1c00005c1c00005d1c00005e1c00005f1c0000601c0000611c0000621c0000631c0000641c0000651c0000661c0000671c0000681c0000691c00006a1c00006b1c00006c1c00006d1c00006e1c00006f1c0000 - m_AlignBytes: 16 - groupID: 65 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 7168 - particle2: 7169 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 7169 - particle2: 7170 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 7170 - particle2: 7171 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 7171 - particle2: 7172 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 7172 - particle2: 7173 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 7173 - particle2: 7174 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 7174 - particle2: 7175 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 7175 - particle2: 7176 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 7176 - particle2: 7177 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 7177 - particle2: 7178 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 7178 - particle2: 7179 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &620777758 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 620777759} - - component: {fileID: 620777763} - - component: {fileID: 620777762} - - component: {fileID: 620777761} - - component: {fileID: 620777760} - m_Layer: 0 - m_Name: Obi Rope (4) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &620777759 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 620777758} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.8, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 779073863} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &620777760 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 620777758} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 620777763} - m_Target: {fileID: 620777759} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &620777761 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 620777758} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &620777762 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 620777758} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 65 ---- !u!114 &620777763 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 620777758} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 701c0000711c0000721c0000731c0000741c0000751c0000761c0000771c0000781c0000791c00007a1c00007b1c00007c1c00007d1c00007e1c00007f1c0000801c0000811c0000821c0000831c0000841c0000851c0000861c0000871c0000881c0000891c00008a1c00008b1c00008c1c00008d1c00008e1c00008f1c0000901c0000911c0000921c0000931c0000941c0000951c0000961c0000971c0000981c0000991c00009a1c00009b1c00009c1c00009d1c00009e1c00009f1c0000a01c0000a11c0000a21c0000a31c0000a41c0000a51c0000a61c0000a71c0000a81c0000a91c0000aa1c0000ab1c0000ac1c0000ad1c0000ae1c0000af1c0000b01c0000b11c0000b21c0000b31c0000b41c0000b51c0000b61c0000b71c0000b81c0000b91c0000ba1c0000bb1c0000bc1c0000bd1c0000be1c0000bf1c0000c01c0000c11c0000c21c0000c31c0000c41c0000c51c0000c61c0000c71c0000c81c0000c91c0000ca1c0000cb1c0000cc1c0000cd1c0000ce1c0000cf1c0000d01c0000d11c0000d21c0000d31c0000d41c0000d51c0000d61c0000d71c0000d81c0000d91c0000da1c0000db1c0000dc1c0000dd1c0000de1c0000df1c0000 - m_AlignBytes: 16 - groupID: 66 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 7280 - particle2: 7281 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 7281 - particle2: 7282 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 7282 - particle2: 7283 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 7283 - particle2: 7284 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 7284 - particle2: 7285 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 7285 - particle2: 7286 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 7286 - particle2: 7287 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 7287 - particle2: 7288 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 7288 - particle2: 7289 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 7289 - particle2: 7290 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 7290 - particle2: 7291 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &640325666 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 640325667} - - component: {fileID: 640325671} - - component: {fileID: 640325670} - - component: {fileID: 640325669} - - component: {fileID: 640325668} - m_Layer: 0 - m_Name: Obi Rope (3) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &640325667 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 640325666} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.6, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1241971666} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &640325668 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 640325666} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 640325671} - m_Target: {fileID: 640325667} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &640325669 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 640325666} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &640325670 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 640325666} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 66 ---- !u!114 &640325671 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 640325666} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: e01c0000e11c0000e21c0000e31c0000e41c0000e51c0000e61c0000e71c0000e81c0000e91c0000ea1c0000eb1c0000ec1c0000ed1c0000ee1c0000ef1c0000f01c0000f11c0000f21c0000f31c0000f41c0000f51c0000f61c0000f71c0000f81c0000f91c0000fa1c0000fb1c0000fc1c0000fd1c0000fe1c0000ff1c0000001d0000011d0000021d0000031d0000041d0000051d0000061d0000071d0000081d0000091d00000a1d00000b1d00000c1d00000d1d00000e1d00000f1d0000101d0000111d0000121d0000131d0000141d0000151d0000161d0000171d0000181d0000191d00001a1d00001b1d00001c1d00001d1d00001e1d00001f1d0000201d0000211d0000221d0000231d0000241d0000251d0000261d0000271d0000281d0000291d00002a1d00002b1d00002c1d00002d1d00002e1d00002f1d0000301d0000311d0000321d0000331d0000341d0000351d0000361d0000371d0000381d0000391d00003a1d00003b1d00003c1d00003d1d00003e1d00003f1d0000401d0000411d0000421d0000431d0000441d0000451d0000461d0000471d0000481d0000491d00004a1d00004b1d00004c1d00004d1d00004e1d00004f1d0000 - m_AlignBytes: 16 - groupID: 67 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 7392 - particle2: 7393 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 7393 - particle2: 7394 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 7394 - particle2: 7395 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 7395 - particle2: 7396 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 7396 - particle2: 7397 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 7397 - particle2: 7398 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 7398 - particle2: 7399 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 7399 - particle2: 7400 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 7400 - particle2: 7401 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 7401 - particle2: 7402 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 7402 - particle2: 7403 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &648480056 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 648480057} - m_Layer: 0 - m_Name: Row (7) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &648480057 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 648480056} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -1.4} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 820904268} - - {fileID: 990019828} - - {fileID: 1593990336} - - {fileID: 544654644} - - {fileID: 1588242874} - - {fileID: 104614688} - - {fileID: 113190533} - - {fileID: 713725211} - - {fileID: 451433694} - - {fileID: 334659107} - m_Father: {fileID: 1760688768} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &666418978 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 666418979} - - component: {fileID: 666418983} - - component: {fileID: 666418982} - - component: {fileID: 666418981} - - component: {fileID: 666418980} - m_Layer: 0 - m_Name: Obi Rope (3) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &666418979 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 666418978} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.6, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 2009678977} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &666418980 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 666418978} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 666418983} - m_Target: {fileID: 666418979} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &666418981 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 666418978} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &666418982 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 666418978} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 67 ---- !u!114 &666418983 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 666418978} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 501d0000511d0000521d0000531d0000541d0000551d0000561d0000571d0000581d0000591d00005a1d00005b1d00005c1d00005d1d00005e1d00005f1d0000601d0000611d0000621d0000631d0000641d0000651d0000661d0000671d0000681d0000691d00006a1d00006b1d00006c1d00006d1d00006e1d00006f1d0000701d0000711d0000721d0000731d0000741d0000751d0000761d0000771d0000781d0000791d00007a1d00007b1d00007c1d00007d1d00007e1d00007f1d0000801d0000811d0000821d0000831d0000841d0000851d0000861d0000871d0000881d0000891d00008a1d00008b1d00008c1d00008d1d00008e1d00008f1d0000901d0000911d0000921d0000931d0000941d0000951d0000961d0000971d0000981d0000991d00009a1d00009b1d00009c1d00009d1d00009e1d00009f1d0000a01d0000a11d0000a21d0000a31d0000a41d0000a51d0000a61d0000a71d0000a81d0000a91d0000aa1d0000ab1d0000ac1d0000ad1d0000ae1d0000af1d0000b01d0000b11d0000b21d0000b31d0000b41d0000b51d0000b61d0000b71d0000b81d0000b91d0000ba1d0000bb1d0000bc1d0000bd1d0000be1d0000bf1d0000 - m_AlignBytes: 16 - groupID: 68 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 7504 - particle2: 7505 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 7505 - particle2: 7506 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 7506 - particle2: 7507 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 7507 - particle2: 7508 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 7508 - particle2: 7509 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 7509 - particle2: 7510 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 7510 - particle2: 7511 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 7511 - particle2: 7512 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 7512 - particle2: 7513 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 7513 - particle2: 7514 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 7514 - particle2: 7515 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &667569020 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 667569021} - - component: {fileID: 667569025} - - component: {fileID: 667569024} - - component: {fileID: 667569023} - - component: {fileID: 667569022} - m_Layer: 0 - m_Name: Obi Rope (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &667569021 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 667569020} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.2, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 940408952} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &667569022 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 667569020} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 667569025} - m_Target: {fileID: 667569021} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &667569023 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 667569020} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &667569024 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 667569020} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 68 ---- !u!114 &667569025 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 667569020} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: c01d0000c11d0000c21d0000c31d0000c41d0000c51d0000c61d0000c71d0000c81d0000c91d0000ca1d0000cb1d0000cc1d0000cd1d0000ce1d0000cf1d0000d01d0000d11d0000d21d0000d31d0000d41d0000d51d0000d61d0000d71d0000d81d0000d91d0000da1d0000db1d0000dc1d0000dd1d0000de1d0000df1d0000e01d0000e11d0000e21d0000e31d0000e41d0000e51d0000e61d0000e71d0000e81d0000e91d0000ea1d0000eb1d0000ec1d0000ed1d0000ee1d0000ef1d0000f01d0000f11d0000f21d0000f31d0000f41d0000f51d0000f61d0000f71d0000f81d0000f91d0000fa1d0000fb1d0000fc1d0000fd1d0000fe1d0000ff1d0000001e0000011e0000021e0000031e0000041e0000051e0000061e0000071e0000081e0000091e00000a1e00000b1e00000c1e00000d1e00000e1e00000f1e0000101e0000111e0000121e0000131e0000141e0000151e0000161e0000171e0000181e0000191e00001a1e00001b1e00001c1e00001d1e00001e1e00001f1e0000201e0000211e0000221e0000231e0000241e0000251e0000261e0000271e0000281e0000291e00002a1e00002b1e00002c1e00002d1e00002e1e00002f1e0000 - m_AlignBytes: 16 - groupID: 69 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 7616 - particle2: 7617 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 7617 - particle2: 7618 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 7618 - particle2: 7619 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 7619 - particle2: 7620 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 7620 - particle2: 7621 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 7621 - particle2: 7622 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 7622 - particle2: 7623 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 7623 - particle2: 7624 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 7624 - particle2: 7625 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 7625 - particle2: 7626 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 7626 - particle2: 7627 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &674074860 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 674074861} - - component: {fileID: 674074865} - - component: {fileID: 674074864} - - component: {fileID: 674074863} - - component: {fileID: 674074862} - m_Layer: 0 - m_Name: Obi Rope (7) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &674074861 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 674074860} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.4, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1464717035} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &674074862 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 674074860} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 674074865} - m_Target: {fileID: 674074861} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &674074863 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 674074860} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &674074864 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 674074860} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 69 ---- !u!114 &674074865 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 674074860} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 301e0000311e0000321e0000331e0000341e0000351e0000361e0000371e0000381e0000391e00003a1e00003b1e00003c1e00003d1e00003e1e00003f1e0000401e0000411e0000421e0000431e0000441e0000451e0000461e0000471e0000481e0000491e00004a1e00004b1e00004c1e00004d1e00004e1e00004f1e0000501e0000511e0000521e0000531e0000541e0000551e0000561e0000571e0000581e0000591e00005a1e00005b1e00005c1e00005d1e00005e1e00005f1e0000601e0000611e0000621e0000631e0000641e0000651e0000661e0000671e0000681e0000691e00006a1e00006b1e00006c1e00006d1e00006e1e00006f1e0000701e0000711e0000721e0000731e0000741e0000751e0000761e0000771e0000781e0000791e00007a1e00007b1e00007c1e00007d1e00007e1e00007f1e0000801e0000811e0000821e0000831e0000841e0000851e0000861e0000871e0000881e0000891e00008a1e00008b1e00008c1e00008d1e00008e1e00008f1e0000901e0000911e0000921e0000931e0000941e0000951e0000961e0000971e0000981e0000991e00009a1e00009b1e00009c1e00009d1e00009e1e00009f1e0000 - m_AlignBytes: 16 - groupID: 70 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 7728 - particle2: 7729 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 7729 - particle2: 7730 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 7730 - particle2: 7731 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 7731 - particle2: 7732 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 7732 - particle2: 7733 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 7733 - particle2: 7734 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 7734 - particle2: 7735 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 7735 - particle2: 7736 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 7736 - particle2: 7737 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 7737 - particle2: 7738 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 7738 - particle2: 7739 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &686144123 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 686144124} - - component: {fileID: 686144128} - - component: {fileID: 686144127} - - component: {fileID: 686144126} - - component: {fileID: 686144125} - m_Layer: 0 - m_Name: Obi Rope (9) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &686144124 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 686144123} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.8, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1464717035} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &686144125 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 686144123} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 686144128} - m_Target: {fileID: 686144124} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &686144126 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 686144123} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &686144127 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 686144123} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 70 ---- !u!114 &686144128 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 686144123} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: a01e0000a11e0000a21e0000a31e0000a41e0000a51e0000a61e0000a71e0000a81e0000a91e0000aa1e0000ab1e0000ac1e0000ad1e0000ae1e0000af1e0000b01e0000b11e0000b21e0000b31e0000b41e0000b51e0000b61e0000b71e0000b81e0000b91e0000ba1e0000bb1e0000bc1e0000bd1e0000be1e0000bf1e0000c01e0000c11e0000c21e0000c31e0000c41e0000c51e0000c61e0000c71e0000c81e0000c91e0000ca1e0000cb1e0000cc1e0000cd1e0000ce1e0000cf1e0000d01e0000d11e0000d21e0000d31e0000d41e0000d51e0000d61e0000d71e0000d81e0000d91e0000da1e0000db1e0000dc1e0000dd1e0000de1e0000df1e0000e01e0000e11e0000e21e0000e31e0000e41e0000e51e0000e61e0000e71e0000e81e0000e91e0000ea1e0000eb1e0000ec1e0000ed1e0000ee1e0000ef1e0000f01e0000f11e0000f21e0000f31e0000f41e0000f51e0000f61e0000f71e0000f81e0000f91e0000fa1e0000fb1e0000fc1e0000fd1e0000fe1e0000ff1e0000001f0000011f0000021f0000031f0000041f0000051f0000061f0000071f0000081f0000091f00000a1f00000b1f00000c1f00000d1f00000e1f00000f1f0000 - m_AlignBytes: 16 - groupID: 71 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 7840 - particle2: 7841 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 7841 - particle2: 7842 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 7842 - particle2: 7843 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 7843 - particle2: 7844 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 7844 - particle2: 7845 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 7845 - particle2: 7846 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 7846 - particle2: 7847 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 7847 - particle2: 7848 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 7848 - particle2: 7849 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 7849 - particle2: 7850 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 7850 - particle2: 7851 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &702256089 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 702256090} - - component: {fileID: 702256094} - - component: {fileID: 702256093} - - component: {fileID: 702256092} - - component: {fileID: 702256091} - m_Layer: 0 - m_Name: Obi Rope (3) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &702256090 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 702256089} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.6, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 940408952} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &702256091 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 702256089} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 702256094} - m_Target: {fileID: 702256090} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &702256092 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 702256089} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &702256093 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 702256089} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 71 ---- !u!114 &702256094 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 702256089} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 101f0000111f0000121f0000131f0000141f0000151f0000161f0000171f0000181f0000191f00001a1f00001b1f00001c1f00001d1f00001e1f00001f1f0000201f0000211f0000221f0000231f0000241f0000251f0000261f0000271f0000281f0000291f00002a1f00002b1f00002c1f00002d1f00002e1f00002f1f0000301f0000311f0000321f0000331f0000341f0000351f0000361f0000371f0000381f0000391f00003a1f00003b1f00003c1f00003d1f00003e1f00003f1f0000401f0000411f0000421f0000431f0000441f0000451f0000461f0000471f0000481f0000491f00004a1f00004b1f00004c1f00004d1f00004e1f00004f1f0000501f0000511f0000521f0000531f0000541f0000551f0000561f0000571f0000581f0000591f00005a1f00005b1f00005c1f00005d1f00005e1f00005f1f0000601f0000611f0000621f0000631f0000641f0000651f0000661f0000671f0000681f0000691f00006a1f00006b1f00006c1f00006d1f00006e1f00006f1f0000701f0000711f0000721f0000731f0000741f0000751f0000761f0000771f0000781f0000791f00007a1f00007b1f00007c1f00007d1f00007e1f00007f1f0000 - m_AlignBytes: 16 - groupID: 72 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 7952 - particle2: 7953 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 7953 - particle2: 7954 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 7954 - particle2: 7955 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 7955 - particle2: 7956 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 7956 - particle2: 7957 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 7957 - particle2: 7958 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 7958 - particle2: 7959 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 7959 - particle2: 7960 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 7960 - particle2: 7961 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 7961 - particle2: 7962 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 7962 - particle2: 7963 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &713725210 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 713725211} - - component: {fileID: 713725215} - - component: {fileID: 713725214} - - component: {fileID: 713725213} - - component: {fileID: 713725212} - m_Layer: 0 - m_Name: Obi Rope (7) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &713725211 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 713725210} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.4, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 648480057} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &713725212 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 713725210} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 713725215} - m_Target: {fileID: 713725211} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &713725213 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 713725210} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &713725214 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 713725210} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 72 ---- !u!114 &713725215 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 713725210} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 801f0000811f0000821f0000831f0000841f0000851f0000861f0000871f0000881f0000891f00008a1f00008b1f00008c1f00008d1f00008e1f00008f1f0000901f0000911f0000921f0000931f0000941f0000951f0000961f0000971f0000981f0000991f00009a1f00009b1f00009c1f00009d1f00009e1f00009f1f0000a01f0000a11f0000a21f0000a31f0000a41f0000a51f0000a61f0000a71f0000a81f0000a91f0000aa1f0000ab1f0000ac1f0000ad1f0000ae1f0000af1f0000b01f0000b11f0000b21f0000b31f0000b41f0000b51f0000b61f0000b71f0000b81f0000b91f0000ba1f0000bb1f0000bc1f0000bd1f0000be1f0000bf1f0000c01f0000c11f0000c21f0000c31f0000c41f0000c51f0000c61f0000c71f0000c81f0000c91f0000ca1f0000cb1f0000cc1f0000cd1f0000ce1f0000cf1f0000d01f0000d11f0000d21f0000d31f0000d41f0000d51f0000d61f0000d71f0000d81f0000d91f0000da1f0000db1f0000dc1f0000dd1f0000de1f0000df1f0000e01f0000e11f0000e21f0000e31f0000e41f0000e51f0000e61f0000e71f0000e81f0000e91f0000ea1f0000eb1f0000ec1f0000ed1f0000ee1f0000ef1f0000 - m_AlignBytes: 16 - groupID: 73 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 8064 - particle2: 8065 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 8065 - particle2: 8066 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 8066 - particle2: 8067 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 8067 - particle2: 8068 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 8068 - particle2: 8069 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 8069 - particle2: 8070 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 8070 - particle2: 8071 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 8071 - particle2: 8072 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 8072 - particle2: 8073 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 8073 - particle2: 8074 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 8074 - particle2: 8075 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &713844501 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 713844502} - m_Layer: 0 - m_Name: Row (4) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &713844502 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 713844501} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -0.8} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 444273476} - - {fileID: 455432480} - - {fileID: 1746497396} - - {fileID: 59144234} - - {fileID: 1919837743} - - {fileID: 238005276} - - {fileID: 514767706} - - {fileID: 1771245892} - - {fileID: 302892551} - - {fileID: 2017265027} - m_Father: {fileID: 1760688768} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &729000485 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 729000486} - - component: {fileID: 729000490} - - component: {fileID: 729000489} - - component: {fileID: 729000488} - - component: {fileID: 729000487} - m_Layer: 0 - m_Name: Obi Rope (2) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &729000486 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 729000485} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.4, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 510728467} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &729000487 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 729000485} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 729000490} - m_Target: {fileID: 729000486} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &729000488 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 729000485} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &729000489 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 729000485} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 73 ---- !u!114 &729000490 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 729000485} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: f01f0000f11f0000f21f0000f31f0000f41f0000f51f0000f61f0000f71f0000f81f0000f91f0000fa1f0000fb1f0000fc1f0000fd1f0000fe1f0000ff1f0000002000000120000002200000032000000420000005200000062000000720000008200000092000000a2000000b2000000c2000000d2000000e2000000f200000102000001120000012200000132000001420000015200000162000001720000018200000192000001a2000001b2000001c2000001d2000001e2000001f200000202000002120000022200000232000002420000025200000262000002720000028200000292000002a2000002b2000002c2000002d2000002e2000002f200000302000003120000032200000332000003420000035200000362000003720000038200000392000003a2000003b2000003c2000003d2000003e2000003f200000402000004120000042200000432000004420000045200000462000004720000048200000492000004a2000004b2000004c2000004d2000004e2000004f200000502000005120000052200000532000005420000055200000562000005720000058200000592000005a2000005b2000005c2000005d2000005e2000005f200000 - m_AlignBytes: 16 - groupID: 74 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 8176 - particle2: 8177 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 8177 - particle2: 8178 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 8178 - particle2: 8179 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 8179 - particle2: 8180 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 8180 - particle2: 8181 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 8181 - particle2: 8182 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 8182 - particle2: 8183 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 8183 - particle2: 8184 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 8184 - particle2: 8185 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 8185 - particle2: 8186 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 8186 - particle2: 8187 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &733963100 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 733963101} - - component: {fileID: 733963105} - - component: {fileID: 733963104} - - component: {fileID: 733963103} - - component: {fileID: 733963102} - m_Layer: 0 - m_Name: Obi Rope (7) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &733963101 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 733963100} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.4, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1306593279} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &733963102 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 733963100} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 733963105} - m_Target: {fileID: 733963101} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &733963103 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 733963100} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &733963104 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 733963100} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 74 ---- !u!114 &733963105 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 733963100} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 602000006120000062200000632000006420000065200000662000006720000068200000692000006a2000006b2000006c2000006d2000006e2000006f200000702000007120000072200000732000007420000075200000762000007720000078200000792000007a2000007b2000007c2000007d2000007e2000007f200000802000008120000082200000832000008420000085200000862000008720000088200000892000008a2000008b2000008c2000008d2000008e2000008f200000902000009120000092200000932000009420000095200000962000009720000098200000992000009a2000009b2000009c2000009d2000009e2000009f200000a0200000a1200000a2200000a3200000a4200000a5200000a6200000a7200000a8200000a9200000aa200000ab200000ac200000ad200000ae200000af200000b0200000b1200000b2200000b3200000b4200000b5200000b6200000b7200000b8200000b9200000ba200000bb200000bc200000bd200000be200000bf200000c0200000c1200000c2200000c3200000c4200000c5200000c6200000c7200000c8200000c9200000ca200000cb200000cc200000cd200000ce200000cf200000 - m_AlignBytes: 16 - groupID: 75 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 8288 - particle2: 8289 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 8289 - particle2: 8290 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 8290 - particle2: 8291 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 8291 - particle2: 8292 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 8292 - particle2: 8293 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 8293 - particle2: 8294 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 8294 - particle2: 8295 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 8295 - particle2: 8296 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 8296 - particle2: 8297 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 8297 - particle2: 8298 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 8298 - particle2: 8299 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &746024796 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 746024797} - - component: {fileID: 746024801} - - component: {fileID: 746024800} - - component: {fileID: 746024799} - - component: {fileID: 746024798} - m_Layer: 0 - m_Name: Obi Rope (9) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &746024797 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 746024796} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.8, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1240601735} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &746024798 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 746024796} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 746024801} - m_Target: {fileID: 746024797} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &746024799 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 746024796} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &746024800 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 746024796} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 75 ---- !u!114 &746024801 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 746024796} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: d0200000d1200000d2200000d3200000d4200000d5200000d6200000d7200000d8200000d9200000da200000db200000dc200000dd200000de200000df200000e0200000e1200000e2200000e3200000e4200000e5200000e6200000e7200000e8200000e9200000ea200000eb200000ec200000ed200000ee200000ef200000f0200000f1200000f2200000f3200000f4200000f5200000f6200000f7200000f8200000f9200000fa200000fb200000fc200000fd200000fe200000ff200000002100000121000002210000032100000421000005210000062100000721000008210000092100000a2100000b2100000c2100000d2100000e2100000f210000102100001121000012210000132100001421000015210000162100001721000018210000192100001a2100001b2100001c2100001d2100001e2100001f210000202100002121000022210000232100002421000025210000262100002721000028210000292100002a2100002b2100002c2100002d2100002e2100002f210000302100003121000032210000332100003421000035210000362100003721000038210000392100003a2100003b2100003c2100003d2100003e2100003f210000 - m_AlignBytes: 16 - groupID: 76 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 8400 - particle2: 8401 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 8401 - particle2: 8402 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 8402 - particle2: 8403 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 8403 - particle2: 8404 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 8404 - particle2: 8405 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 8405 - particle2: 8406 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 8406 - particle2: 8407 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 8407 - particle2: 8408 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 8408 - particle2: 8409 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 8409 - particle2: 8410 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 8410 - particle2: 8411 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &765011063 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 765011064} - - component: {fileID: 765011068} - - component: {fileID: 765011067} - - component: {fileID: 765011066} - - component: {fileID: 765011065} - m_Layer: 0 - m_Name: Obi Rope (3) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &765011064 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 765011063} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.6, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1798495239} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &765011065 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 765011063} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 765011068} - m_Target: {fileID: 765011064} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &765011066 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 765011063} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &765011067 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 765011063} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 76 ---- !u!114 &765011068 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 765011063} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 402100004121000042210000432100004421000045210000462100004721000048210000492100004a2100004b2100004c2100004d2100004e2100004f210000502100005121000052210000532100005421000055210000562100005721000058210000592100005a2100005b2100005c2100005d2100005e2100005f210000602100006121000062210000632100006421000065210000662100006721000068210000692100006a2100006b2100006c2100006d2100006e2100006f210000702100007121000072210000732100007421000075210000762100007721000078210000792100007a2100007b2100007c2100007d2100007e2100007f210000802100008121000082210000832100008421000085210000862100008721000088210000892100008a2100008b2100008c2100008d2100008e2100008f210000902100009121000092210000932100009421000095210000962100009721000098210000992100009a2100009b2100009c2100009d2100009e2100009f210000a0210000a1210000a2210000a3210000a4210000a5210000a6210000a7210000a8210000a9210000aa210000ab210000ac210000ad210000ae210000af210000 - m_AlignBytes: 16 - groupID: 77 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 8512 - particle2: 8513 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 8513 - particle2: 8514 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 8514 - particle2: 8515 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 8515 - particle2: 8516 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 8516 - particle2: 8517 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 8517 - particle2: 8518 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 8518 - particle2: 8519 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 8519 - particle2: 8520 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 8520 - particle2: 8521 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 8521 - particle2: 8522 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 8522 - particle2: 8523 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &765551416 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 765551417} - - component: {fileID: 765551421} - - component: {fileID: 765551420} - - component: {fileID: 765551419} - - component: {fileID: 765551418} - m_Layer: 0 - m_Name: Obi Rope (8) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &765551417 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 765551416} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.6, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 779073863} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &765551418 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 765551416} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 765551421} - m_Target: {fileID: 765551417} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &765551419 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 765551416} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &765551420 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 765551416} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 77 ---- !u!114 &765551421 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 765551416} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: b0210000b1210000b2210000b3210000b4210000b5210000b6210000b7210000b8210000b9210000ba210000bb210000bc210000bd210000be210000bf210000c0210000c1210000c2210000c3210000c4210000c5210000c6210000c7210000c8210000c9210000ca210000cb210000cc210000cd210000ce210000cf210000d0210000d1210000d2210000d3210000d4210000d5210000d6210000d7210000d8210000d9210000da210000db210000dc210000dd210000de210000df210000e0210000e1210000e2210000e3210000e4210000e5210000e6210000e7210000e8210000e9210000ea210000eb210000ec210000ed210000ee210000ef210000f0210000f1210000f2210000f3210000f4210000f5210000f6210000f7210000f8210000f9210000fa210000fb210000fc210000fd210000fe210000ff210000002200000122000002220000032200000422000005220000062200000722000008220000092200000a2200000b2200000c2200000d2200000e2200000f220000102200001122000012220000132200001422000015220000162200001722000018220000192200001a2200001b2200001c2200001d2200001e2200001f220000 - m_AlignBytes: 16 - groupID: 78 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 8624 - particle2: 8625 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 8625 - particle2: 8626 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 8626 - particle2: 8627 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 8627 - particle2: 8628 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 8628 - particle2: 8629 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 8629 - particle2: 8630 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 8630 - particle2: 8631 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 8631 - particle2: 8632 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 8632 - particle2: 8633 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 8633 - particle2: 8634 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 8634 - particle2: 8635 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &769380901 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 769380902} - - component: {fileID: 769380906} - - component: {fileID: 769380905} - - component: {fileID: 769380904} - - component: {fileID: 769380903} - m_Layer: 0 - m_Name: Obi Rope (4) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &769380902 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 769380901} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.8, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 2009678977} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &769380903 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 769380901} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 769380906} - m_Target: {fileID: 769380902} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &769380904 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 769380901} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &769380905 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 769380901} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 78 ---- !u!114 &769380906 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 769380901} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 202200002122000022220000232200002422000025220000262200002722000028220000292200002a2200002b2200002c2200002d2200002e2200002f220000302200003122000032220000332200003422000035220000362200003722000038220000392200003a2200003b2200003c2200003d2200003e2200003f220000402200004122000042220000432200004422000045220000462200004722000048220000492200004a2200004b2200004c2200004d2200004e2200004f220000502200005122000052220000532200005422000055220000562200005722000058220000592200005a2200005b2200005c2200005d2200005e2200005f220000602200006122000062220000632200006422000065220000662200006722000068220000692200006a2200006b2200006c2200006d2200006e2200006f220000702200007122000072220000732200007422000075220000762200007722000078220000792200007a2200007b2200007c2200007d2200007e2200007f220000802200008122000082220000832200008422000085220000862200008722000088220000892200008a2200008b2200008c2200008d2200008e2200008f220000 - m_AlignBytes: 16 - groupID: 79 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 8736 - particle2: 8737 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 8737 - particle2: 8738 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 8738 - particle2: 8739 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 8739 - particle2: 8740 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 8740 - particle2: 8741 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 8741 - particle2: 8742 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 8742 - particle2: 8743 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 8743 - particle2: 8744 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 8744 - particle2: 8745 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 8745 - particle2: 8746 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 8746 - particle2: 8747 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &778889993 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 778889994} - - component: {fileID: 778889998} - - component: {fileID: 778889997} - - component: {fileID: 778889996} - - component: {fileID: 778889995} - m_Layer: 0 - m_Name: Obi Rope (6) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &778889994 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 778889993} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.2, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 940408952} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &778889995 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 778889993} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 778889998} - m_Target: {fileID: 778889994} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &778889996 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 778889993} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &778889997 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 778889993} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 79 ---- !u!114 &778889998 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 778889993} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 902200009122000092220000932200009422000095220000962200009722000098220000992200009a2200009b2200009c2200009d2200009e2200009f220000a0220000a1220000a2220000a3220000a4220000a5220000a6220000a7220000a8220000a9220000aa220000ab220000ac220000ad220000ae220000af220000b0220000b1220000b2220000b3220000b4220000b5220000b6220000b7220000b8220000b9220000ba220000bb220000bc220000bd220000be220000bf220000c0220000c1220000c2220000c3220000c4220000c5220000c6220000c7220000c8220000c9220000ca220000cb220000cc220000cd220000ce220000cf220000d0220000d1220000d2220000d3220000d4220000d5220000d6220000d7220000d8220000d9220000da220000db220000dc220000dd220000de220000df220000e0220000e1220000e2220000e3220000e4220000e5220000e6220000e7220000e8220000e9220000ea220000eb220000ec220000ed220000ee220000ef220000f0220000f1220000f2220000f3220000f4220000f5220000f6220000f7220000f8220000f9220000fa220000fb220000fc220000fd220000fe220000ff220000 - m_AlignBytes: 16 - groupID: 80 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 8848 - particle2: 8849 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 8849 - particle2: 8850 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 8850 - particle2: 8851 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 8851 - particle2: 8852 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 8852 - particle2: 8853 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 8853 - particle2: 8854 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 8854 - particle2: 8855 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 8855 - particle2: 8856 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 8856 - particle2: 8857 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 8857 - particle2: 8858 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 8858 - particle2: 8859 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &779073862 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 779073863} - m_Layer: 0 - m_Name: Row (5) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &779073863 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 779073862} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -1} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 1375015038} - - {fileID: 1994012442} - - {fileID: 123868266} - - {fileID: 1100467796} - - {fileID: 620777759} - - {fileID: 52316903} - - {fileID: 58243450} - - {fileID: 1517801622} - - {fileID: 765551417} - - {fileID: 1300868598} - m_Father: {fileID: 1027659676} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!33 &789375856 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 792672126} - m_Mesh: {fileID: 4300000, guid: 89e24673c05344d179c516868eb341b8, type: 3} ---- !u!33 &789375858 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 792672112} - m_Mesh: {fileID: 4300006, guid: 89e24673c05344d179c516868eb341b8, type: 3} ---- !u!33 &789375860 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 792672114} - m_Mesh: {fileID: 4300004, guid: 89e24673c05344d179c516868eb341b8, type: 3} ---- !u!33 &789375862 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 792672116} - m_Mesh: {fileID: 4300002, guid: 89e24673c05344d179c516868eb341b8, type: 3} ---- !u!23 &790473136 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 792672126} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!23 &790473138 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 792672112} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!23 &790473140 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 792672114} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!23 &790473142 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 792672116} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!4 &792243024 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 792672112} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 792243030} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &792243026 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 792672114} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 792243030} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &792243028 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 792672116} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 792243030} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &792243030 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 792672118} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 1, z: 1} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 2045321430962147711} - - {fileID: 792243028} - - {fileID: 792243026} - - {fileID: 792243024} - - {fileID: 792243038} - m_Father: {fileID: 1561375948} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!4 &792243038 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 792672126} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 792243030} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &792672112 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 792243024} - - component: {fileID: 789375858} - - component: {fileID: 790473138} - - component: {fileID: 792672115} - - component: {fileID: 792672113} - m_Layer: 0 - m_Name: pCube4 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &792672113 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 792672112} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6757b231cedd544c583ef8aeaf773b2a, type: 3} - m_Name: - m_EditorClassIdentifier: - thickness: 0 - inverted: 0 - material: {fileID: 0} - filter: -65535 - m_SourceCollider: {fileID: 792672115} - m_DistanceField: {fileID: 0} ---- !u!1 &792672114 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 792243026} - - component: {fileID: 789375860} - - component: {fileID: 790473140} - - component: {fileID: 792672119} - - component: {fileID: 792672117} - m_Layer: 0 - m_Name: pCube3 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!135 &792672115 -SphereCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 792672112} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Radius: 0.46872288 - m_Center: {x: -0.77275866, y: -0.01624769, z: 0.027971357} ---- !u!1 &792672116 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 792243028} - - component: {fileID: 789375862} - - component: {fileID: 790473142} - - component: {fileID: 792672121} - - component: {fileID: 792672120} - m_Layer: 0 - m_Name: pCube2 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &792672117 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 792672114} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6757b231cedd544c583ef8aeaf773b2a, type: 3} - m_Name: - m_EditorClassIdentifier: - thickness: 0 - inverted: 0 - material: {fileID: 0} - filter: -65535 - m_SourceCollider: {fileID: 792672119} - m_DistanceField: {fileID: 0} ---- !u!1 &792672118 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 792243030} - - component: {fileID: 792672122} - m_Layer: 0 - m_Name: Fan (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!135 &792672119 -SphereCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 792672114} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Radius: 0.44351313 - m_Center: {x: 0.46067736, y: -0.01624769, z: -0.6795417} ---- !u!114 &792672120 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 792672116} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6757b231cedd544c583ef8aeaf773b2a, type: 3} - m_Name: - m_EditorClassIdentifier: - thickness: 0 - inverted: 0 - material: {fileID: 0} - filter: -65535 - m_SourceCollider: {fileID: 792672121} - m_DistanceField: {fileID: 0} ---- !u!135 &792672121 -SphereCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 792672116} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Radius: 0.46508226 - m_Center: {x: 0.4708475, y: -0.01624769, z: 0.7047374} ---- !u!114 &792672122 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 792672118} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: dae436d3aef704ae1b22a06a92480162, type: 3} - m_Name: - m_EditorClassIdentifier: - moveUnitsPerSecond: - value: {x: 0, y: 0, z: 0} - space: 1 - rotateDegreesPerSecond: - value: {x: 0, y: -500, z: 0} - space: 1 - ignoreTimescale: 0 ---- !u!1 &792672126 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 792243038} - - component: {fileID: 789375856} - - component: {fileID: 790473136} - - component: {fileID: 792672128} - - component: {fileID: 792672127} - m_Layer: 0 - m_Name: pCylinder1 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &792672127 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 792672126} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6757b231cedd544c583ef8aeaf773b2a, type: 3} - m_Name: - m_EditorClassIdentifier: - thickness: 0 - inverted: 0 - material: {fileID: 0} - filter: -65535 - m_SourceCollider: {fileID: 792672128} - m_DistanceField: {fileID: 0} ---- !u!135 &792672128 -SphereCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 792672126} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Radius: 0.4000001 - m_Center: {x: 0.000000044703484, y: 0.18707478, z: -0.000000059604645} ---- !u!1 &811595117 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 811595118} - - component: {fileID: 811595122} - - component: {fileID: 811595121} - - component: {fileID: 811595120} - - component: {fileID: 811595119} - m_Layer: 0 - m_Name: Obi Rope (6) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &811595118 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 811595117} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.2, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 893001395} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &811595119 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 811595117} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 811595122} - m_Target: {fileID: 811595118} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &811595120 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 811595117} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &811595121 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 811595117} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 80 ---- !u!114 &811595122 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 811595117} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 002300000123000002230000032300000423000005230000062300000723000008230000092300000a2300000b2300000c2300000d2300000e2300000f230000102300001123000012230000132300001423000015230000162300001723000018230000192300001a2300001b2300001c2300001d2300001e2300001f230000202300002123000022230000232300002423000025230000262300002723000028230000292300002a2300002b2300002c2300002d2300002e2300002f230000302300003123000032230000332300003423000035230000362300003723000038230000392300003a2300003b2300003c2300003d2300003e2300003f230000402300004123000042230000432300004423000045230000462300004723000048230000492300004a2300004b2300004c2300004d2300004e2300004f230000502300005123000052230000532300005423000055230000562300005723000058230000592300005a2300005b2300005c2300005d2300005e2300005f230000602300006123000062230000632300006423000065230000662300006723000068230000692300006a2300006b2300006c2300006d2300006e2300006f230000 - m_AlignBytes: 16 - groupID: 81 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 8960 - particle2: 8961 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 8961 - particle2: 8962 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 8962 - particle2: 8963 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 8963 - particle2: 8964 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 8964 - particle2: 8965 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 8965 - particle2: 8966 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 8966 - particle2: 8967 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 8967 - particle2: 8968 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 8968 - particle2: 8969 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 8969 - particle2: 8970 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 8970 - particle2: 8971 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &811913318 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 811913319} - - component: {fileID: 811913323} - - component: {fileID: 811913322} - - component: {fileID: 811913321} - - component: {fileID: 811913320} - m_Layer: 0 - m_Name: Obi Rope (9) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &811913319 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 811913318} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.8, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 472161722} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &811913320 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 811913318} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 811913323} - m_Target: {fileID: 811913319} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &811913321 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 811913318} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &811913322 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 811913318} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 81 ---- !u!114 &811913323 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 811913318} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 702300007123000072230000732300007423000075230000762300007723000078230000792300007a2300007b2300007c2300007d2300007e2300007f230000802300008123000082230000832300008423000085230000862300008723000088230000892300008a2300008b2300008c2300008d2300008e2300008f230000902300009123000092230000932300009423000095230000962300009723000098230000992300009a2300009b2300009c2300009d2300009e2300009f230000a0230000a1230000a2230000a3230000a4230000a5230000a6230000a7230000a8230000a9230000aa230000ab230000ac230000ad230000ae230000af230000b0230000b1230000b2230000b3230000b4230000b5230000b6230000b7230000b8230000b9230000ba230000bb230000bc230000bd230000be230000bf230000c0230000c1230000c2230000c3230000c4230000c5230000c6230000c7230000c8230000c9230000ca230000cb230000cc230000cd230000ce230000cf230000d0230000d1230000d2230000d3230000d4230000d5230000d6230000d7230000d8230000d9230000da230000db230000dc230000dd230000de230000df230000 - m_AlignBytes: 16 - groupID: 82 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 9072 - particle2: 9073 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 9073 - particle2: 9074 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 9074 - particle2: 9075 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 9075 - particle2: 9076 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 9076 - particle2: 9077 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 9077 - particle2: 9078 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 9078 - particle2: 9079 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 9079 - particle2: 9080 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 9080 - particle2: 9081 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 9081 - particle2: 9082 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 9082 - particle2: 9083 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &820904267 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 820904268} - - component: {fileID: 820904272} - - component: {fileID: 820904271} - - component: {fileID: 820904270} - - component: {fileID: 820904269} - m_Layer: 0 - m_Name: Obi Rope - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &820904268 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 820904267} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 648480057} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &820904269 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 820904267} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 820904272} - m_Target: {fileID: 820904268} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &820904270 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 820904267} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &820904271 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 820904267} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 82 ---- !u!114 &820904272 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 820904267} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: e0230000e1230000e2230000e3230000e4230000e5230000e6230000e7230000e8230000e9230000ea230000eb230000ec230000ed230000ee230000ef230000f0230000f1230000f2230000f3230000f4230000f5230000f6230000f7230000f8230000f9230000fa230000fb230000fc230000fd230000fe230000ff230000002400000124000002240000032400000424000005240000062400000724000008240000092400000a2400000b2400000c2400000d2400000e2400000f240000102400001124000012240000132400001424000015240000162400001724000018240000192400001a2400001b2400001c2400001d2400001e2400001f240000202400002124000022240000232400002424000025240000262400002724000028240000292400002a2400002b2400002c2400002d2400002e2400002f240000302400003124000032240000332400003424000035240000362400003724000038240000392400003a2400003b2400003c2400003d2400003e2400003f240000402400004124000042240000432400004424000045240000462400004724000048240000492400004a2400004b2400004c2400004d2400004e2400004f240000 - m_AlignBytes: 16 - groupID: 83 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 9184 - particle2: 9185 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 9185 - particle2: 9186 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 9186 - particle2: 9187 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 9187 - particle2: 9188 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 9188 - particle2: 9189 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 9189 - particle2: 9190 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 9190 - particle2: 9191 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 9191 - particle2: 9192 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 9192 - particle2: 9193 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 9193 - particle2: 9194 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 9194 - particle2: 9195 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &824780548 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 824780549} - - component: {fileID: 824780553} - - component: {fileID: 824780552} - - component: {fileID: 824780551} - - component: {fileID: 824780550} - m_Layer: 0 - m_Name: Obi Rope (8) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &824780549 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 824780548} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.6, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 2009678977} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &824780550 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 824780548} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 824780553} - m_Target: {fileID: 824780549} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &824780551 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 824780548} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &824780552 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 824780548} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 83 ---- !u!114 &824780553 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 824780548} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 502400005124000052240000532400005424000055240000562400005724000058240000592400005a2400005b2400005c2400005d2400005e2400005f240000602400006124000062240000632400006424000065240000662400006724000068240000692400006a2400006b2400006c2400006d2400006e2400006f240000702400007124000072240000732400007424000075240000762400007724000078240000792400007a2400007b2400007c2400007d2400007e2400007f240000802400008124000082240000832400008424000085240000862400008724000088240000892400008a2400008b2400008c2400008d2400008e2400008f240000902400009124000092240000932400009424000095240000962400009724000098240000992400009a2400009b2400009c2400009d2400009e2400009f240000a0240000a1240000a2240000a3240000a4240000a5240000a6240000a7240000a8240000a9240000aa240000ab240000ac240000ad240000ae240000af240000b0240000b1240000b2240000b3240000b4240000b5240000b6240000b7240000b8240000b9240000ba240000bb240000bc240000bd240000be240000bf240000 - m_AlignBytes: 16 - groupID: 84 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 9296 - particle2: 9297 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 9297 - particle2: 9298 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 9298 - particle2: 9299 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 9299 - particle2: 9300 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 9300 - particle2: 9301 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 9301 - particle2: 9302 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 9302 - particle2: 9303 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 9303 - particle2: 9304 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 9304 - particle2: 9305 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 9305 - particle2: 9306 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 9306 - particle2: 9307 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &865980437 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 865980438} - - component: {fileID: 865980442} - - component: {fileID: 865980441} - - component: {fileID: 865980440} - - component: {fileID: 865980439} - m_Layer: 0 - m_Name: Obi Rope (7) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &865980438 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 865980437} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.4, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 510728467} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &865980439 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 865980437} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 865980442} - m_Target: {fileID: 865980438} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &865980440 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 865980437} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &865980441 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 865980437} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 84 ---- !u!114 &865980442 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 865980437} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: c0240000c1240000c2240000c3240000c4240000c5240000c6240000c7240000c8240000c9240000ca240000cb240000cc240000cd240000ce240000cf240000d0240000d1240000d2240000d3240000d4240000d5240000d6240000d7240000d8240000d9240000da240000db240000dc240000dd240000de240000df240000e0240000e1240000e2240000e3240000e4240000e5240000e6240000e7240000e8240000e9240000ea240000eb240000ec240000ed240000ee240000ef240000f0240000f1240000f2240000f3240000f4240000f5240000f6240000f7240000f8240000f9240000fa240000fb240000fc240000fd240000fe240000ff240000002500000125000002250000032500000425000005250000062500000725000008250000092500000a2500000b2500000c2500000d2500000e2500000f250000102500001125000012250000132500001425000015250000162500001725000018250000192500001a2500001b2500001c2500001d2500001e2500001f250000202500002125000022250000232500002425000025250000262500002725000028250000292500002a2500002b2500002c2500002d2500002e2500002f250000 - m_AlignBytes: 16 - groupID: 85 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 9408 - particle2: 9409 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 9409 - particle2: 9410 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 9410 - particle2: 9411 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 9411 - particle2: 9412 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 9412 - particle2: 9413 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 9413 - particle2: 9414 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 9414 - particle2: 9415 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 9415 - particle2: 9416 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 9416 - particle2: 9417 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 9417 - particle2: 9418 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 9418 - particle2: 9419 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &869213057 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 869213058} - - component: {fileID: 869213062} - - component: {fileID: 869213061} - - component: {fileID: 869213060} - - component: {fileID: 869213059} - m_Layer: 0 - m_Name: Obi Rope (6) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &869213058 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 869213057} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.2, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1062536481} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &869213059 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 869213057} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 869213062} - m_Target: {fileID: 869213058} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &869213060 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 869213057} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &869213061 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 869213057} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 85 ---- !u!114 &869213062 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 869213057} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 302500003125000032250000332500003425000035250000362500003725000038250000392500003a2500003b2500003c2500003d2500003e2500003f250000402500004125000042250000432500004425000045250000462500004725000048250000492500004a2500004b2500004c2500004d2500004e2500004f250000502500005125000052250000532500005425000055250000562500005725000058250000592500005a2500005b2500005c2500005d2500005e2500005f250000602500006125000062250000632500006425000065250000662500006725000068250000692500006a2500006b2500006c2500006d2500006e2500006f250000702500007125000072250000732500007425000075250000762500007725000078250000792500007a2500007b2500007c2500007d2500007e2500007f250000802500008125000082250000832500008425000085250000862500008725000088250000892500008a2500008b2500008c2500008d2500008e2500008f250000902500009125000092250000932500009425000095250000962500009725000098250000992500009a2500009b2500009c2500009d2500009e2500009f250000 - m_AlignBytes: 16 - groupID: 86 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 9520 - particle2: 9521 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 9521 - particle2: 9522 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 9522 - particle2: 9523 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 9523 - particle2: 9524 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 9524 - particle2: 9525 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 9525 - particle2: 9526 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 9526 - particle2: 9527 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 9527 - particle2: 9528 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 9528 - particle2: 9529 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 9529 - particle2: 9530 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 9530 - particle2: 9531 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &881133076 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 881133077} - - component: {fileID: 881133081} - - component: {fileID: 881133080} - - component: {fileID: 881133079} - - component: {fileID: 881133078} - m_Layer: 0 - m_Name: Obi Rope (6) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &881133077 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 881133076} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.2, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 249029318} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &881133078 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 881133076} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 881133081} - m_Target: {fileID: 881133077} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &881133079 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 881133076} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &881133080 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 881133076} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 86 ---- !u!114 &881133081 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 881133076} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: a0250000a1250000a2250000a3250000a4250000a5250000a6250000a7250000a8250000a9250000aa250000ab250000ac250000ad250000ae250000af250000b0250000b1250000b2250000b3250000b4250000b5250000b6250000b7250000b8250000b9250000ba250000bb250000bc250000bd250000be250000bf250000c0250000c1250000c2250000c3250000c4250000c5250000c6250000c7250000c8250000c9250000ca250000cb250000cc250000cd250000ce250000cf250000d0250000d1250000d2250000d3250000d4250000d5250000d6250000d7250000d8250000d9250000da250000db250000dc250000dd250000de250000df250000e0250000e1250000e2250000e3250000e4250000e5250000e6250000e7250000e8250000e9250000ea250000eb250000ec250000ed250000ee250000ef250000f0250000f1250000f2250000f3250000f4250000f5250000f6250000f7250000f8250000f9250000fa250000fb250000fc250000fd250000fe250000ff250000002600000126000002260000032600000426000005260000062600000726000008260000092600000a2600000b2600000c2600000d2600000e2600000f260000 - m_AlignBytes: 16 - groupID: 87 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 9632 - particle2: 9633 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 9633 - particle2: 9634 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 9634 - particle2: 9635 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 9635 - particle2: 9636 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 9636 - particle2: 9637 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 9637 - particle2: 9638 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 9638 - particle2: 9639 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 9639 - particle2: 9640 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 9640 - particle2: 9641 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 9641 - particle2: 9642 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 9642 - particle2: 9643 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &888913398 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 888913399} - - component: {fileID: 888913403} - - component: {fileID: 888913402} - - component: {fileID: 888913401} - - component: {fileID: 888913400} - m_Layer: 0 - m_Name: Obi Rope (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &888913399 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 888913398} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.2, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1306593279} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &888913400 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 888913398} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 888913403} - m_Target: {fileID: 888913399} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &888913401 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 888913398} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &888913402 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 888913398} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 87 ---- !u!114 &888913403 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 888913398} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 102600001126000012260000132600001426000015260000162600001726000018260000192600001a2600001b2600001c2600001d2600001e2600001f260000202600002126000022260000232600002426000025260000262600002726000028260000292600002a2600002b2600002c2600002d2600002e2600002f260000302600003126000032260000332600003426000035260000362600003726000038260000392600003a2600003b2600003c2600003d2600003e2600003f260000402600004126000042260000432600004426000045260000462600004726000048260000492600004a2600004b2600004c2600004d2600004e2600004f260000502600005126000052260000532600005426000055260000562600005726000058260000592600005a2600005b2600005c2600005d2600005e2600005f260000602600006126000062260000632600006426000065260000662600006726000068260000692600006a2600006b2600006c2600006d2600006e2600006f260000702600007126000072260000732600007426000075260000762600007726000078260000792600007a2600007b2600007c2600007d2600007e2600007f260000 - m_AlignBytes: 16 - groupID: 88 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 9744 - particle2: 9745 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 9745 - particle2: 9746 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 9746 - particle2: 9747 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 9747 - particle2: 9748 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 9748 - particle2: 9749 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 9749 - particle2: 9750 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 9750 - particle2: 9751 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 9751 - particle2: 9752 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 9752 - particle2: 9753 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 9753 - particle2: 9754 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 9754 - particle2: 9755 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &893001394 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 893001395} - m_Layer: 0 - m_Name: Row (8) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &893001395 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 893001394} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -1.6} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 2028909269} - - {fileID: 1521845708} - - {fileID: 1605421489} - - {fileID: 277586514} - - {fileID: 265659789} - - {fileID: 1438254939} - - {fileID: 811595118} - - {fileID: 1299859297} - - {fileID: 165314045} - - {fileID: 1948398665} - m_Father: {fileID: 1027659676} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &920811575 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 920811577} - - component: {fileID: 920811576} - m_Layer: 0 - m_Name: ComputeCollisionWorld - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &920811576 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 920811575} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: ce0ddc77554954cd78643d83b0505396, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!4 &920811577 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 920811575} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &938771665 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 938771666} - - component: {fileID: 938771670} - - component: {fileID: 938771669} - - component: {fileID: 938771668} - - component: {fileID: 938771667} - m_Layer: 0 - m_Name: Obi Rope - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &938771666 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 938771665} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1640435994} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &938771667 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 938771665} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 938771670} - m_Target: {fileID: 938771666} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &938771668 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 938771665} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &938771669 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 938771665} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 88 ---- !u!114 &938771670 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 938771665} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 802600008126000082260000832600008426000085260000862600008726000088260000892600008a2600008b2600008c2600008d2600008e2600008f260000902600009126000092260000932600009426000095260000962600009726000098260000992600009a2600009b2600009c2600009d2600009e2600009f260000a0260000a1260000a2260000a3260000a4260000a5260000a6260000a7260000a8260000a9260000aa260000ab260000ac260000ad260000ae260000af260000b0260000b1260000b2260000b3260000b4260000b5260000b6260000b7260000b8260000b9260000ba260000bb260000bc260000bd260000be260000bf260000c0260000c1260000c2260000c3260000c4260000c5260000c6260000c7260000c8260000c9260000ca260000cb260000cc260000cd260000ce260000cf260000d0260000d1260000d2260000d3260000d4260000d5260000d6260000d7260000d8260000d9260000da260000db260000dc260000dd260000de260000df260000e0260000e1260000e2260000e3260000e4260000e5260000e6260000e7260000e8260000e9260000ea260000eb260000ec260000ed260000ee260000ef260000 - m_AlignBytes: 16 - groupID: 89 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 9856 - particle2: 9857 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 9857 - particle2: 9858 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 9858 - particle2: 9859 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 9859 - particle2: 9860 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 9860 - particle2: 9861 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 9861 - particle2: 9862 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 9862 - particle2: 9863 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 9863 - particle2: 9864 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 9864 - particle2: 9865 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 9865 - particle2: 9866 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 9866 - particle2: 9867 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &940408951 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 940408952} - m_Layer: 0 - m_Name: Row - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &940408952 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 940408951} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 1304270659} - - {fileID: 667569021} - - {fileID: 1613103433} - - {fileID: 702256090} - - {fileID: 1152767235} - - {fileID: 1333859662} - - {fileID: 778889994} - - {fileID: 393174417} - - {fileID: 1649225306} - - {fileID: 2033391599} - m_Father: {fileID: 1760688768} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &941225758 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 941225759} - - component: {fileID: 941225763} - - component: {fileID: 941225762} - - component: {fileID: 941225761} - - component: {fileID: 941225760} - m_Layer: 0 - m_Name: Obi Rope - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &941225759 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 941225758} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1240601735} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &941225760 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 941225758} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 941225763} - m_Target: {fileID: 941225759} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &941225761 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 941225758} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &941225762 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 941225758} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 89 ---- !u!114 &941225763 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 941225758} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: f0260000f1260000f2260000f3260000f4260000f5260000f6260000f7260000f8260000f9260000fa260000fb260000fc260000fd260000fe260000ff260000002700000127000002270000032700000427000005270000062700000727000008270000092700000a2700000b2700000c2700000d2700000e2700000f270000102700001127000012270000132700001427000015270000162700001727000018270000192700001a2700001b2700001c2700001d2700001e2700001f270000202700002127000022270000232700002427000025270000262700002727000028270000292700002a2700002b2700002c2700002d2700002e2700002f270000302700003127000032270000332700003427000035270000362700003727000038270000392700003a2700003b2700003c2700003d2700003e2700003f270000402700004127000042270000432700004427000045270000462700004727000048270000492700004a2700004b2700004c2700004d2700004e2700004f270000502700005127000052270000532700005427000055270000562700005727000058270000592700005a2700005b2700005c2700005d2700005e2700005f270000 - m_AlignBytes: 16 - groupID: 90 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 9968 - particle2: 9969 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 9969 - particle2: 9970 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 9970 - particle2: 9971 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 9971 - particle2: 9972 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 9972 - particle2: 9973 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 9973 - particle2: 9974 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 9974 - particle2: 9975 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 9975 - particle2: 9976 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 9976 - particle2: 9977 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 9977 - particle2: 9978 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 9978 - particle2: 9979 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &949070423 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 949070424} - - component: {fileID: 949070428} - - component: {fileID: 949070427} - - component: {fileID: 949070426} - - component: {fileID: 949070425} - m_Layer: 0 - m_Name: Obi Rope (8) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &949070424 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 949070423} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.6, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1062536481} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &949070425 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 949070423} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 949070428} - m_Target: {fileID: 949070424} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &949070426 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 949070423} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &949070427 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 949070423} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 90 ---- !u!114 &949070428 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 949070423} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 602700006127000062270000632700006427000065270000662700006727000068270000692700006a2700006b2700006c2700006d2700006e2700006f270000702700007127000072270000732700007427000075270000762700007727000078270000792700007a2700007b2700007c2700007d2700007e2700007f270000802700008127000082270000832700008427000085270000862700008727000088270000892700008a2700008b2700008c2700008d2700008e2700008f270000902700009127000092270000932700009427000095270000962700009727000098270000992700009a2700009b2700009c2700009d2700009e2700009f270000a0270000a1270000a2270000a3270000a4270000a5270000a6270000a7270000a8270000a9270000aa270000ab270000ac270000ad270000ae270000af270000b0270000b1270000b2270000b3270000b4270000b5270000b6270000b7270000b8270000b9270000ba270000bb270000bc270000bd270000be270000bf270000c0270000c1270000c2270000c3270000c4270000c5270000c6270000c7270000c8270000c9270000ca270000cb270000cc270000cd270000ce270000cf270000 - m_AlignBytes: 16 - groupID: 91 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 10080 - particle2: 10081 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 10081 - particle2: 10082 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 10082 - particle2: 10083 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 10083 - particle2: 10084 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 10084 - particle2: 10085 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 10085 - particle2: 10086 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 10086 - particle2: 10087 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 10087 - particle2: 10088 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 10088 - particle2: 10089 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 10089 - particle2: 10090 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 10090 - particle2: 10091 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &949981032 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 949981033} - - component: {fileID: 949981037} - - component: {fileID: 949981036} - - component: {fileID: 949981035} - - component: {fileID: 949981034} - m_Layer: 0 - m_Name: Obi Rope - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &949981033 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 949981032} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1241971666} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &949981034 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 949981032} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 949981037} - m_Target: {fileID: 949981033} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &949981035 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 949981032} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &949981036 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 949981032} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 91 ---- !u!114 &949981037 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 949981032} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: d0270000d1270000d2270000d3270000d4270000d5270000d6270000d7270000d8270000d9270000da270000db270000dc270000dd270000de270000df270000e0270000e1270000e2270000e3270000e4270000e5270000e6270000e7270000e8270000e9270000ea270000eb270000ec270000ed270000ee270000ef270000f0270000f1270000f2270000f3270000f4270000f5270000f6270000f7270000f8270000f9270000fa270000fb270000fc270000fd270000fe270000ff270000002800000128000002280000032800000428000005280000062800000728000008280000092800000a2800000b2800000c2800000d2800000e2800000f280000102800001128000012280000132800001428000015280000162800001728000018280000192800001a2800001b2800001c2800001d2800001e2800001f280000202800002128000022280000232800002428000025280000262800002728000028280000292800002a2800002b2800002c2800002d2800002e2800002f280000302800003128000032280000332800003428000035280000362800003728000038280000392800003a2800003b2800003c2800003d2800003e2800003f280000 - m_AlignBytes: 16 - groupID: 92 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 10192 - particle2: 10193 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 10193 - particle2: 10194 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 10194 - particle2: 10195 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 10195 - particle2: 10196 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 10196 - particle2: 10197 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 10197 - particle2: 10198 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 10198 - particle2: 10199 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 10199 - particle2: 10200 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 10200 - particle2: 10201 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 10201 - particle2: 10202 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 10202 - particle2: 10203 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &960049598 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 960049599} - - component: {fileID: 960049603} - - component: {fileID: 960049602} - - component: {fileID: 960049601} - - component: {fileID: 960049600} - m_Layer: 0 - m_Name: Obi Rope (9) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &960049599 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 960049598} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.8, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 249029318} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &960049600 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 960049598} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 960049603} - m_Target: {fileID: 960049599} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &960049601 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 960049598} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &960049602 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 960049598} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 92 ---- !u!114 &960049603 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 960049598} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 402800004128000042280000432800004428000045280000462800004728000048280000492800004a2800004b2800004c2800004d2800004e2800004f280000502800005128000052280000532800005428000055280000562800005728000058280000592800005a2800005b2800005c2800005d2800005e2800005f280000602800006128000062280000632800006428000065280000662800006728000068280000692800006a2800006b2800006c2800006d2800006e2800006f280000702800007128000072280000732800007428000075280000762800007728000078280000792800007a2800007b2800007c2800007d2800007e2800007f280000802800008128000082280000832800008428000085280000862800008728000088280000892800008a2800008b2800008c2800008d2800008e2800008f280000902800009128000092280000932800009428000095280000962800009728000098280000992800009a2800009b2800009c2800009d2800009e2800009f280000a0280000a1280000a2280000a3280000a4280000a5280000a6280000a7280000a8280000a9280000aa280000ab280000ac280000ad280000ae280000af280000 - m_AlignBytes: 16 - groupID: 93 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 10304 - particle2: 10305 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 10305 - particle2: 10306 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 10306 - particle2: 10307 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 10307 - particle2: 10308 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 10308 - particle2: 10309 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 10309 - particle2: 10310 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 10310 - particle2: 10311 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 10311 - particle2: 10312 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 10312 - particle2: 10313 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 10313 - particle2: 10314 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 10314 - particle2: 10315 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &964498382 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 964498383} - - component: {fileID: 964498387} - - component: {fileID: 964498386} - - component: {fileID: 964498385} - - component: {fileID: 964498384} - m_Layer: 0 - m_Name: Obi Rope (2) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &964498383 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 964498382} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.4, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 2009678977} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &964498384 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 964498382} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 964498387} - m_Target: {fileID: 964498383} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &964498385 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 964498382} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &964498386 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 964498382} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 93 ---- !u!114 &964498387 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 964498382} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: b0280000b1280000b2280000b3280000b4280000b5280000b6280000b7280000b8280000b9280000ba280000bb280000bc280000bd280000be280000bf280000c0280000c1280000c2280000c3280000c4280000c5280000c6280000c7280000c8280000c9280000ca280000cb280000cc280000cd280000ce280000cf280000d0280000d1280000d2280000d3280000d4280000d5280000d6280000d7280000d8280000d9280000da280000db280000dc280000dd280000de280000df280000e0280000e1280000e2280000e3280000e4280000e5280000e6280000e7280000e8280000e9280000ea280000eb280000ec280000ed280000ee280000ef280000f0280000f1280000f2280000f3280000f4280000f5280000f6280000f7280000f8280000f9280000fa280000fb280000fc280000fd280000fe280000ff280000002900000129000002290000032900000429000005290000062900000729000008290000092900000a2900000b2900000c2900000d2900000e2900000f290000102900001129000012290000132900001429000015290000162900001729000018290000192900001a2900001b2900001c2900001d2900001e2900001f290000 - m_AlignBytes: 16 - groupID: 94 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 10416 - particle2: 10417 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 10417 - particle2: 10418 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 10418 - particle2: 10419 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 10419 - particle2: 10420 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 10420 - particle2: 10421 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 10421 - particle2: 10422 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 10422 - particle2: 10423 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 10423 - particle2: 10424 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 10424 - particle2: 10425 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 10425 - particle2: 10426 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 10426 - particle2: 10427 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &975387944 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 975387945} - - component: {fileID: 975387949} - - component: {fileID: 975387948} - - component: {fileID: 975387947} - - component: {fileID: 975387946} - m_Layer: 0 - m_Name: Obi Rope (4) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &975387945 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 975387944} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.8, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1464717035} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &975387946 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 975387944} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 975387949} - m_Target: {fileID: 975387945} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &975387947 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 975387944} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &975387948 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 975387944} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 94 ---- !u!114 &975387949 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 975387944} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 202900002129000022290000232900002429000025290000262900002729000028290000292900002a2900002b2900002c2900002d2900002e2900002f290000302900003129000032290000332900003429000035290000362900003729000038290000392900003a2900003b2900003c2900003d2900003e2900003f290000402900004129000042290000432900004429000045290000462900004729000048290000492900004a2900004b2900004c2900004d2900004e2900004f290000502900005129000052290000532900005429000055290000562900005729000058290000592900005a2900005b2900005c2900005d2900005e2900005f290000602900006129000062290000632900006429000065290000662900006729000068290000692900006a2900006b2900006c2900006d2900006e2900006f290000702900007129000072290000732900007429000075290000762900007729000078290000792900007a2900007b2900007c2900007d2900007e2900007f290000802900008129000082290000832900008429000085290000862900008729000088290000892900008a2900008b2900008c2900008d2900008e2900008f290000 - m_AlignBytes: 16 - groupID: 95 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 10528 - particle2: 10529 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 10529 - particle2: 10530 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 10530 - particle2: 10531 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 10531 - particle2: 10532 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 10532 - particle2: 10533 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 10533 - particle2: 10534 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 10534 - particle2: 10535 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 10535 - particle2: 10536 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 10536 - particle2: 10537 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 10537 - particle2: 10538 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 10538 - particle2: 10539 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &980293276 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 980293277} - - component: {fileID: 980293281} - - component: {fileID: 980293280} - - component: {fileID: 980293279} - - component: {fileID: 980293278} - m_Layer: 0 - m_Name: Obi Rope (3) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &980293277 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 980293276} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.6, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 510728467} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &980293278 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 980293276} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 980293281} - m_Target: {fileID: 980293277} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &980293279 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 980293276} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &980293280 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 980293276} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 95 ---- !u!114 &980293281 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 980293276} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 902900009129000092290000932900009429000095290000962900009729000098290000992900009a2900009b2900009c2900009d2900009e2900009f290000a0290000a1290000a2290000a3290000a4290000a5290000a6290000a7290000a8290000a9290000aa290000ab290000ac290000ad290000ae290000af290000b0290000b1290000b2290000b3290000b4290000b5290000b6290000b7290000b8290000b9290000ba290000bb290000bc290000bd290000be290000bf290000c0290000c1290000c2290000c3290000c4290000c5290000c6290000c7290000c8290000c9290000ca290000cb290000cc290000cd290000ce290000cf290000d0290000d1290000d2290000d3290000d4290000d5290000d6290000d7290000d8290000d9290000da290000db290000dc290000dd290000de290000df290000e0290000e1290000e2290000e3290000e4290000e5290000e6290000e7290000e8290000e9290000ea290000eb290000ec290000ed290000ee290000ef290000f0290000f1290000f2290000f3290000f4290000f5290000f6290000f7290000f8290000f9290000fa290000fb290000fc290000fd290000fe290000ff290000 - m_AlignBytes: 16 - groupID: 96 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 10640 - particle2: 10641 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 10641 - particle2: 10642 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 10642 - particle2: 10643 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 10643 - particle2: 10644 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 10644 - particle2: 10645 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 10645 - particle2: 10646 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 10646 - particle2: 10647 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 10647 - particle2: 10648 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 10648 - particle2: 10649 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 10649 - particle2: 10650 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 10650 - particle2: 10651 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &983686048 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 983686049} - - component: {fileID: 983686053} - - component: {fileID: 983686052} - - component: {fileID: 983686051} - - component: {fileID: 983686050} - m_Layer: 0 - m_Name: Obi Rope (8) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &983686049 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 983686048} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.6, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1241971666} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &983686050 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 983686048} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 983686053} - m_Target: {fileID: 983686049} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &983686051 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 983686048} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &983686052 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 983686048} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 96 ---- !u!114 &983686053 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 983686048} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 002a0000012a0000022a0000032a0000042a0000052a0000062a0000072a0000082a0000092a00000a2a00000b2a00000c2a00000d2a00000e2a00000f2a0000102a0000112a0000122a0000132a0000142a0000152a0000162a0000172a0000182a0000192a00001a2a00001b2a00001c2a00001d2a00001e2a00001f2a0000202a0000212a0000222a0000232a0000242a0000252a0000262a0000272a0000282a0000292a00002a2a00002b2a00002c2a00002d2a00002e2a00002f2a0000302a0000312a0000322a0000332a0000342a0000352a0000362a0000372a0000382a0000392a00003a2a00003b2a00003c2a00003d2a00003e2a00003f2a0000402a0000412a0000422a0000432a0000442a0000452a0000462a0000472a0000482a0000492a00004a2a00004b2a00004c2a00004d2a00004e2a00004f2a0000502a0000512a0000522a0000532a0000542a0000552a0000562a0000572a0000582a0000592a00005a2a00005b2a00005c2a00005d2a00005e2a00005f2a0000602a0000612a0000622a0000632a0000642a0000652a0000662a0000672a0000682a0000692a00006a2a00006b2a00006c2a00006d2a00006e2a00006f2a0000 - m_AlignBytes: 16 - groupID: 97 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 10752 - particle2: 10753 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 10753 - particle2: 10754 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 10754 - particle2: 10755 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 10755 - particle2: 10756 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 10756 - particle2: 10757 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 10757 - particle2: 10758 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 10758 - particle2: 10759 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 10759 - particle2: 10760 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 10760 - particle2: 10761 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 10761 - particle2: 10762 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 10762 - particle2: 10763 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &990019827 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 990019828} - - component: {fileID: 990019832} - - component: {fileID: 990019831} - - component: {fileID: 990019830} - - component: {fileID: 990019829} - m_Layer: 0 - m_Name: Obi Rope (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &990019828 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 990019827} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.2, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 648480057} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &990019829 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 990019827} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 990019832} - m_Target: {fileID: 990019828} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &990019830 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 990019827} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &990019831 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 990019827} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 97 ---- !u!114 &990019832 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 990019827} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 702a0000712a0000722a0000732a0000742a0000752a0000762a0000772a0000782a0000792a00007a2a00007b2a00007c2a00007d2a00007e2a00007f2a0000802a0000812a0000822a0000832a0000842a0000852a0000862a0000872a0000882a0000892a00008a2a00008b2a00008c2a00008d2a00008e2a00008f2a0000902a0000912a0000922a0000932a0000942a0000952a0000962a0000972a0000982a0000992a00009a2a00009b2a00009c2a00009d2a00009e2a00009f2a0000a02a0000a12a0000a22a0000a32a0000a42a0000a52a0000a62a0000a72a0000a82a0000a92a0000aa2a0000ab2a0000ac2a0000ad2a0000ae2a0000af2a0000b02a0000b12a0000b22a0000b32a0000b42a0000b52a0000b62a0000b72a0000b82a0000b92a0000ba2a0000bb2a0000bc2a0000bd2a0000be2a0000bf2a0000c02a0000c12a0000c22a0000c32a0000c42a0000c52a0000c62a0000c72a0000c82a0000c92a0000ca2a0000cb2a0000cc2a0000cd2a0000ce2a0000cf2a0000d02a0000d12a0000d22a0000d32a0000d42a0000d52a0000d62a0000d72a0000d82a0000d92a0000da2a0000db2a0000dc2a0000dd2a0000de2a0000df2a0000 - m_AlignBytes: 16 - groupID: 98 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 10864 - particle2: 10865 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 10865 - particle2: 10866 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 10866 - particle2: 10867 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 10867 - particle2: 10868 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 10868 - particle2: 10869 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 10869 - particle2: 10870 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 10870 - particle2: 10871 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 10871 - particle2: 10872 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 10872 - particle2: 10873 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 10873 - particle2: 10874 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 10874 - particle2: 10875 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1001012757 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1001012758} - - component: {fileID: 1001012762} - - component: {fileID: 1001012761} - - component: {fileID: 1001012760} - - component: {fileID: 1001012759} - m_Layer: 0 - m_Name: Obi Rope (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1001012758 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1001012757} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.2, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1977632070} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1001012759 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1001012757} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1001012762} - m_Target: {fileID: 1001012758} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1001012760 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1001012757} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1001012761 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1001012757} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 98 ---- !u!114 &1001012762 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1001012757} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: e02a0000e12a0000e22a0000e32a0000e42a0000e52a0000e62a0000e72a0000e82a0000e92a0000ea2a0000eb2a0000ec2a0000ed2a0000ee2a0000ef2a0000f02a0000f12a0000f22a0000f32a0000f42a0000f52a0000f62a0000f72a0000f82a0000f92a0000fa2a0000fb2a0000fc2a0000fd2a0000fe2a0000ff2a0000002b0000012b0000022b0000032b0000042b0000052b0000062b0000072b0000082b0000092b00000a2b00000b2b00000c2b00000d2b00000e2b00000f2b0000102b0000112b0000122b0000132b0000142b0000152b0000162b0000172b0000182b0000192b00001a2b00001b2b00001c2b00001d2b00001e2b00001f2b0000202b0000212b0000222b0000232b0000242b0000252b0000262b0000272b0000282b0000292b00002a2b00002b2b00002c2b00002d2b00002e2b00002f2b0000302b0000312b0000322b0000332b0000342b0000352b0000362b0000372b0000382b0000392b00003a2b00003b2b00003c2b00003d2b00003e2b00003f2b0000402b0000412b0000422b0000432b0000442b0000452b0000462b0000472b0000482b0000492b00004a2b00004b2b00004c2b00004d2b00004e2b00004f2b0000 - m_AlignBytes: 16 - groupID: 99 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 10976 - particle2: 10977 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 10977 - particle2: 10978 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 10978 - particle2: 10979 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 10979 - particle2: 10980 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 10980 - particle2: 10981 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 10981 - particle2: 10982 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 10982 - particle2: 10983 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 10983 - particle2: 10984 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 10984 - particle2: 10985 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 10985 - particle2: 10986 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 10986 - particle2: 10987 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1001514667 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1001514668} - - component: {fileID: 1001514672} - - component: {fileID: 1001514671} - - component: {fileID: 1001514670} - - component: {fileID: 1001514669} - m_Layer: 0 - m_Name: Obi Rope (5) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1001514668 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1001514667} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1464717035} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1001514669 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1001514667} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1001514672} - m_Target: {fileID: 1001514668} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1001514670 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1001514667} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1001514671 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1001514667} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 99 ---- !u!114 &1001514672 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1001514667} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 502b0000512b0000522b0000532b0000542b0000552b0000562b0000572b0000582b0000592b00005a2b00005b2b00005c2b00005d2b00005e2b00005f2b0000602b0000612b0000622b0000632b0000642b0000652b0000662b0000672b0000682b0000692b00006a2b00006b2b00006c2b00006d2b00006e2b00006f2b0000702b0000712b0000722b0000732b0000742b0000752b0000762b0000772b0000782b0000792b00007a2b00007b2b00007c2b00007d2b00007e2b00007f2b0000802b0000812b0000822b0000832b0000842b0000852b0000862b0000872b0000882b0000892b00008a2b00008b2b00008c2b00008d2b00008e2b00008f2b0000902b0000912b0000922b0000932b0000942b0000952b0000962b0000972b0000982b0000992b00009a2b00009b2b00009c2b00009d2b00009e2b00009f2b0000a02b0000a12b0000a22b0000a32b0000a42b0000a52b0000a62b0000a72b0000a82b0000a92b0000aa2b0000ab2b0000ac2b0000ad2b0000ae2b0000af2b0000b02b0000b12b0000b22b0000b32b0000b42b0000b52b0000b62b0000b72b0000b82b0000b92b0000ba2b0000bb2b0000bc2b0000bd2b0000be2b0000bf2b0000 - m_AlignBytes: 16 - groupID: 100 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 11088 - particle2: 11089 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 11089 - particle2: 11090 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 11090 - particle2: 11091 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 11091 - particle2: 11092 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 11092 - particle2: 11093 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 11093 - particle2: 11094 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 11094 - particle2: 11095 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 11095 - particle2: 11096 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 11096 - particle2: 11097 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 11097 - particle2: 11098 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 11098 - particle2: 11099 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1002464891 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1002464896} - - component: {fileID: 1002464895} - - component: {fileID: 1002464893} - - component: {fileID: 1002464892} - m_Layer: 0 - m_Name: Main Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!81 &1002464892 -AudioListener: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1002464891} - m_Enabled: 1 ---- !u!124 &1002464893 -Behaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1002464891} - m_Enabled: 1 ---- !u!20 &1002464895 -Camera: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1002464891} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844} - m_projectionMatrixMode: 1 - m_GateFitMode: 2 - m_FOVAxisMode: 0 - m_Iso: 200 - m_ShutterSpeed: 0.005 - m_Aperture: 16 - m_FocusDistance: 10 - m_FocalLength: 50 - m_BladeCount: 5 - m_Curvature: {x: 2, y: 11} - m_BarrelClipping: 0.25 - m_Anamorphism: 0 - m_SensorSize: {x: 36, y: 24} - m_LensShift: {x: 0, y: 0} - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - far clip plane: 1000 - field of view: 75 - orthographic: 0 - orthographic size: 5 - m_Depth: -1 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 3 - m_HDR: 0 - m_AllowMSAA: 1 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!4 &1002464896 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1002464891} - serializedVersion: 2 - m_LocalRotation: {x: 0.14555489, y: 0.3786732, z: -0.060435172, w: 0.9120132} - m_LocalPosition: {x: -3.68, y: 4.2, z: -4.1} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 18.136, y: 45.097, z: 0} ---- !u!1 &1022784182 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1022784183} - - component: {fileID: 1022784187} - - component: {fileID: 1022784186} - - component: {fileID: 1022784185} - - component: {fileID: 1022784184} - m_Layer: 0 - m_Name: Obi Rope (4) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1022784183 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1022784182} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.8, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1798495239} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1022784184 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1022784182} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1022784187} - m_Target: {fileID: 1022784183} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1022784185 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1022784182} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1022784186 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1022784182} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 100 ---- !u!114 &1022784187 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1022784182} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: c02b0000c12b0000c22b0000c32b0000c42b0000c52b0000c62b0000c72b0000c82b0000c92b0000ca2b0000cb2b0000cc2b0000cd2b0000ce2b0000cf2b0000d02b0000d12b0000d22b0000d32b0000d42b0000d52b0000d62b0000d72b0000d82b0000d92b0000da2b0000db2b0000dc2b0000dd2b0000de2b0000df2b0000e02b0000e12b0000e22b0000e32b0000e42b0000e52b0000e62b0000e72b0000e82b0000e92b0000ea2b0000eb2b0000ec2b0000ed2b0000ee2b0000ef2b0000f02b0000f12b0000f22b0000f32b0000f42b0000f52b0000f62b0000f72b0000f82b0000f92b0000fa2b0000fb2b0000fc2b0000fd2b0000fe2b0000ff2b0000002c0000012c0000022c0000032c0000042c0000052c0000062c0000072c0000082c0000092c00000a2c00000b2c00000c2c00000d2c00000e2c00000f2c0000102c0000112c0000122c0000132c0000142c0000152c0000162c0000172c0000182c0000192c00001a2c00001b2c00001c2c00001d2c00001e2c00001f2c0000202c0000212c0000222c0000232c0000242c0000252c0000262c0000272c0000282c0000292c00002a2c00002b2c00002c2c00002d2c00002e2c00002f2c0000 - m_AlignBytes: 16 - groupID: 101 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 11200 - particle2: 11201 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 11201 - particle2: 11202 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 11202 - particle2: 11203 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 11203 - particle2: 11204 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 11204 - particle2: 11205 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 11205 - particle2: 11206 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 11206 - particle2: 11207 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 11207 - particle2: 11208 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 11208 - particle2: 11209 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 11209 - particle2: 11210 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 11210 - particle2: 11211 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1027659675 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1027659676} - m_Layer: 0 - m_Name: Group - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1027659676 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1027659675} - serializedVersion: 2 - m_LocalRotation: {x: 0.0008726948, y: 0, z: 0, w: 0.99999964} - m_LocalPosition: {x: -1.11, y: 1.59, z: 1.61} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 2009678977} - - {fileID: 472161722} - - {fileID: 1306593279} - - {fileID: 1628171963} - - {fileID: 249029318} - - {fileID: 779073863} - - {fileID: 1240601735} - - {fileID: 1640435994} - - {fileID: 893001395} - - {fileID: 1241971666} - m_Father: {fileID: 2102841797} - m_LocalEulerAnglesHint: {x: 0.1, y: 0, z: 0} ---- !u!1 &1040360818 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1040360819} - - component: {fileID: 1040360823} - - component: {fileID: 1040360822} - - component: {fileID: 1040360821} - - component: {fileID: 1040360820} - m_Layer: 0 - m_Name: Obi Rope (6) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1040360819 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1040360818} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.2, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1464717035} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1040360820 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1040360818} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1040360823} - m_Target: {fileID: 1040360819} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1040360821 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1040360818} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1040360822 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1040360818} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 101 ---- !u!114 &1040360823 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1040360818} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 302c0000312c0000322c0000332c0000342c0000352c0000362c0000372c0000382c0000392c00003a2c00003b2c00003c2c00003d2c00003e2c00003f2c0000402c0000412c0000422c0000432c0000442c0000452c0000462c0000472c0000482c0000492c00004a2c00004b2c00004c2c00004d2c00004e2c00004f2c0000502c0000512c0000522c0000532c0000542c0000552c0000562c0000572c0000582c0000592c00005a2c00005b2c00005c2c00005d2c00005e2c00005f2c0000602c0000612c0000622c0000632c0000642c0000652c0000662c0000672c0000682c0000692c00006a2c00006b2c00006c2c00006d2c00006e2c00006f2c0000702c0000712c0000722c0000732c0000742c0000752c0000762c0000772c0000782c0000792c00007a2c00007b2c00007c2c00007d2c00007e2c00007f2c0000802c0000812c0000822c0000832c0000842c0000852c0000862c0000872c0000882c0000892c00008a2c00008b2c00008c2c00008d2c00008e2c00008f2c0000902c0000912c0000922c0000932c0000942c0000952c0000962c0000972c0000982c0000992c00009a2c00009b2c00009c2c00009d2c00009e2c00009f2c0000 - m_AlignBytes: 16 - groupID: 102 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 11312 - particle2: 11313 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 11313 - particle2: 11314 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 11314 - particle2: 11315 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 11315 - particle2: 11316 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 11316 - particle2: 11317 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 11317 - particle2: 11318 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 11318 - particle2: 11319 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 11319 - particle2: 11320 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 11320 - particle2: 11321 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 11321 - particle2: 11322 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 11322 - particle2: 11323 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1058904399 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1058904400} - - component: {fileID: 1058904404} - - component: {fileID: 1058904403} - - component: {fileID: 1058904402} - - component: {fileID: 1058904401} - m_Layer: 0 - m_Name: Obi Rope (4) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1058904400 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1058904399} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.8, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 249029318} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1058904401 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1058904399} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1058904404} - m_Target: {fileID: 1058904400} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1058904402 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1058904399} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1058904403 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1058904399} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 102 ---- !u!114 &1058904404 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1058904399} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: a02c0000a12c0000a22c0000a32c0000a42c0000a52c0000a62c0000a72c0000a82c0000a92c0000aa2c0000ab2c0000ac2c0000ad2c0000ae2c0000af2c0000b02c0000b12c0000b22c0000b32c0000b42c0000b52c0000b62c0000b72c0000b82c0000b92c0000ba2c0000bb2c0000bc2c0000bd2c0000be2c0000bf2c0000c02c0000c12c0000c22c0000c32c0000c42c0000c52c0000c62c0000c72c0000c82c0000c92c0000ca2c0000cb2c0000cc2c0000cd2c0000ce2c0000cf2c0000d02c0000d12c0000d22c0000d32c0000d42c0000d52c0000d62c0000d72c0000d82c0000d92c0000da2c0000db2c0000dc2c0000dd2c0000de2c0000df2c0000e02c0000e12c0000e22c0000e32c0000e42c0000e52c0000e62c0000e72c0000e82c0000e92c0000ea2c0000eb2c0000ec2c0000ed2c0000ee2c0000ef2c0000f02c0000f12c0000f22c0000f32c0000f42c0000f52c0000f62c0000f72c0000f82c0000f92c0000fa2c0000fb2c0000fc2c0000fd2c0000fe2c0000ff2c0000002d0000012d0000022d0000032d0000042d0000052d0000062d0000072d0000082d0000092d00000a2d00000b2d00000c2d00000d2d00000e2d00000f2d0000 - m_AlignBytes: 16 - groupID: 103 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 11424 - particle2: 11425 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 11425 - particle2: 11426 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 11426 - particle2: 11427 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 11427 - particle2: 11428 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 11428 - particle2: 11429 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 11429 - particle2: 11430 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 11430 - particle2: 11431 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 11431 - particle2: 11432 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 11432 - particle2: 11433 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 11433 - particle2: 11434 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 11434 - particle2: 11435 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1061430264 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1061430265} - - component: {fileID: 1061430269} - - component: {fileID: 1061430268} - - component: {fileID: 1061430267} - - component: {fileID: 1061430266} - m_Layer: 0 - m_Name: Obi Rope (6) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1061430265 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1061430264} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.2, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 2009678977} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1061430266 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1061430264} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1061430269} - m_Target: {fileID: 1061430265} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1061430267 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1061430264} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1061430268 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1061430264} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 103 ---- !u!114 &1061430269 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1061430264} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 102d0000112d0000122d0000132d0000142d0000152d0000162d0000172d0000182d0000192d00001a2d00001b2d00001c2d00001d2d00001e2d00001f2d0000202d0000212d0000222d0000232d0000242d0000252d0000262d0000272d0000282d0000292d00002a2d00002b2d00002c2d00002d2d00002e2d00002f2d0000302d0000312d0000322d0000332d0000342d0000352d0000362d0000372d0000382d0000392d00003a2d00003b2d00003c2d00003d2d00003e2d00003f2d0000402d0000412d0000422d0000432d0000442d0000452d0000462d0000472d0000482d0000492d00004a2d00004b2d00004c2d00004d2d00004e2d00004f2d0000502d0000512d0000522d0000532d0000542d0000552d0000562d0000572d0000582d0000592d00005a2d00005b2d00005c2d00005d2d00005e2d00005f2d0000602d0000612d0000622d0000632d0000642d0000652d0000662d0000672d0000682d0000692d00006a2d00006b2d00006c2d00006d2d00006e2d00006f2d0000702d0000712d0000722d0000732d0000742d0000752d0000762d0000772d0000782d0000792d00007a2d00007b2d00007c2d00007d2d00007e2d00007f2d0000 - m_AlignBytes: 16 - groupID: 104 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 11536 - particle2: 11537 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 11537 - particle2: 11538 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 11538 - particle2: 11539 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 11539 - particle2: 11540 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 11540 - particle2: 11541 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 11541 - particle2: 11542 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 11542 - particle2: 11543 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 11543 - particle2: 11544 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 11544 - particle2: 11545 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 11545 - particle2: 11546 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 11546 - particle2: 11547 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1062536480 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1062536481} - m_Layer: 0 - m_Name: Row (3) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1062536481 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1062536480} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -0.6} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 1098754171} - - {fileID: 1107509114} - - {fileID: 1121401526} - - {fileID: 139383575} - - {fileID: 1621912098} - - {fileID: 1440395744} - - {fileID: 869213058} - - {fileID: 2058503950} - - {fileID: 949070424} - - {fileID: 156100545} - m_Father: {fileID: 1760688768} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1084473019 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1084473020} - - component: {fileID: 1084473024} - - component: {fileID: 1084473023} - - component: {fileID: 1084473022} - - component: {fileID: 1084473021} - m_Layer: 0 - m_Name: Obi Rope (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1084473020 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1084473019} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.2, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 510728467} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1084473021 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1084473019} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1084473024} - m_Target: {fileID: 1084473020} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1084473022 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1084473019} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1084473023 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1084473019} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 104 ---- !u!114 &1084473024 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1084473019} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 802d0000812d0000822d0000832d0000842d0000852d0000862d0000872d0000882d0000892d00008a2d00008b2d00008c2d00008d2d00008e2d00008f2d0000902d0000912d0000922d0000932d0000942d0000952d0000962d0000972d0000982d0000992d00009a2d00009b2d00009c2d00009d2d00009e2d00009f2d0000a02d0000a12d0000a22d0000a32d0000a42d0000a52d0000a62d0000a72d0000a82d0000a92d0000aa2d0000ab2d0000ac2d0000ad2d0000ae2d0000af2d0000b02d0000b12d0000b22d0000b32d0000b42d0000b52d0000b62d0000b72d0000b82d0000b92d0000ba2d0000bb2d0000bc2d0000bd2d0000be2d0000bf2d0000c02d0000c12d0000c22d0000c32d0000c42d0000c52d0000c62d0000c72d0000c82d0000c92d0000ca2d0000cb2d0000cc2d0000cd2d0000ce2d0000cf2d0000d02d0000d12d0000d22d0000d32d0000d42d0000d52d0000d62d0000d72d0000d82d0000d92d0000da2d0000db2d0000dc2d0000dd2d0000de2d0000df2d0000e02d0000e12d0000e22d0000e32d0000e42d0000e52d0000e62d0000e72d0000e82d0000e92d0000ea2d0000eb2d0000ec2d0000ed2d0000ee2d0000ef2d0000 - m_AlignBytes: 16 - groupID: 105 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 11648 - particle2: 11649 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 11649 - particle2: 11650 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 11650 - particle2: 11651 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 11651 - particle2: 11652 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 11652 - particle2: 11653 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 11653 - particle2: 11654 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 11654 - particle2: 11655 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 11655 - particle2: 11656 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 11656 - particle2: 11657 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 11657 - particle2: 11658 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 11658 - particle2: 11659 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1092735639 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1092735640} - - component: {fileID: 1092735644} - - component: {fileID: 1092735643} - - component: {fileID: 1092735642} - - component: {fileID: 1092735641} - m_Layer: 0 - m_Name: Obi Rope (3) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1092735640 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1092735639} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.6, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 249029318} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1092735641 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1092735639} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1092735644} - m_Target: {fileID: 1092735640} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1092735642 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1092735639} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1092735643 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1092735639} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 105 ---- !u!114 &1092735644 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1092735639} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: f02d0000f12d0000f22d0000f32d0000f42d0000f52d0000f62d0000f72d0000f82d0000f92d0000fa2d0000fb2d0000fc2d0000fd2d0000fe2d0000ff2d0000002e0000012e0000022e0000032e0000042e0000052e0000062e0000072e0000082e0000092e00000a2e00000b2e00000c2e00000d2e00000e2e00000f2e0000102e0000112e0000122e0000132e0000142e0000152e0000162e0000172e0000182e0000192e00001a2e00001b2e00001c2e00001d2e00001e2e00001f2e0000202e0000212e0000222e0000232e0000242e0000252e0000262e0000272e0000282e0000292e00002a2e00002b2e00002c2e00002d2e00002e2e00002f2e0000302e0000312e0000322e0000332e0000342e0000352e0000362e0000372e0000382e0000392e00003a2e00003b2e00003c2e00003d2e00003e2e00003f2e0000402e0000412e0000422e0000432e0000442e0000452e0000462e0000472e0000482e0000492e00004a2e00004b2e00004c2e00004d2e00004e2e00004f2e0000502e0000512e0000522e0000532e0000542e0000552e0000562e0000572e0000582e0000592e00005a2e00005b2e00005c2e00005d2e00005e2e00005f2e0000 - m_AlignBytes: 16 - groupID: 106 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 11760 - particle2: 11761 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 11761 - particle2: 11762 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 11762 - particle2: 11763 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 11763 - particle2: 11764 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 11764 - particle2: 11765 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 11765 - particle2: 11766 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 11766 - particle2: 11767 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 11767 - particle2: 11768 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 11768 - particle2: 11769 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 11769 - particle2: 11770 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 11770 - particle2: 11771 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1098754170 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1098754171} - - component: {fileID: 1098754175} - - component: {fileID: 1098754174} - - component: {fileID: 1098754173} - - component: {fileID: 1098754172} - m_Layer: 0 - m_Name: Obi Rope - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1098754171 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1098754170} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1062536481} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1098754172 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1098754170} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1098754175} - m_Target: {fileID: 1098754171} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1098754173 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1098754170} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1098754174 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1098754170} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 106 ---- !u!114 &1098754175 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1098754170} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 602e0000612e0000622e0000632e0000642e0000652e0000662e0000672e0000682e0000692e00006a2e00006b2e00006c2e00006d2e00006e2e00006f2e0000702e0000712e0000722e0000732e0000742e0000752e0000762e0000772e0000782e0000792e00007a2e00007b2e00007c2e00007d2e00007e2e00007f2e0000802e0000812e0000822e0000832e0000842e0000852e0000862e0000872e0000882e0000892e00008a2e00008b2e00008c2e00008d2e00008e2e00008f2e0000902e0000912e0000922e0000932e0000942e0000952e0000962e0000972e0000982e0000992e00009a2e00009b2e00009c2e00009d2e00009e2e00009f2e0000a02e0000a12e0000a22e0000a32e0000a42e0000a52e0000a62e0000a72e0000a82e0000a92e0000aa2e0000ab2e0000ac2e0000ad2e0000ae2e0000af2e0000b02e0000b12e0000b22e0000b32e0000b42e0000b52e0000b62e0000b72e0000b82e0000b92e0000ba2e0000bb2e0000bc2e0000bd2e0000be2e0000bf2e0000c02e0000c12e0000c22e0000c32e0000c42e0000c52e0000c62e0000c72e0000c82e0000c92e0000ca2e0000cb2e0000cc2e0000cd2e0000ce2e0000cf2e0000 - m_AlignBytes: 16 - groupID: 107 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 11872 - particle2: 11873 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 11873 - particle2: 11874 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 11874 - particle2: 11875 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 11875 - particle2: 11876 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 11876 - particle2: 11877 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 11877 - particle2: 11878 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 11878 - particle2: 11879 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 11879 - particle2: 11880 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 11880 - particle2: 11881 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 11881 - particle2: 11882 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 11882 - particle2: 11883 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1100467795 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1100467796} - - component: {fileID: 1100467800} - - component: {fileID: 1100467799} - - component: {fileID: 1100467798} - - component: {fileID: 1100467797} - m_Layer: 0 - m_Name: Obi Rope (3) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1100467796 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1100467795} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.6, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 779073863} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1100467797 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1100467795} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1100467800} - m_Target: {fileID: 1100467796} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1100467798 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1100467795} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1100467799 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1100467795} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 107 ---- !u!114 &1100467800 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1100467795} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: d02e0000d12e0000d22e0000d32e0000d42e0000d52e0000d62e0000d72e0000d82e0000d92e0000da2e0000db2e0000dc2e0000dd2e0000de2e0000df2e0000e02e0000e12e0000e22e0000e32e0000e42e0000e52e0000e62e0000e72e0000e82e0000e92e0000ea2e0000eb2e0000ec2e0000ed2e0000ee2e0000ef2e0000f02e0000f12e0000f22e0000f32e0000f42e0000f52e0000f62e0000f72e0000f82e0000f92e0000fa2e0000fb2e0000fc2e0000fd2e0000fe2e0000ff2e0000002f0000012f0000022f0000032f0000042f0000052f0000062f0000072f0000082f0000092f00000a2f00000b2f00000c2f00000d2f00000e2f00000f2f0000102f0000112f0000122f0000132f0000142f0000152f0000162f0000172f0000182f0000192f00001a2f00001b2f00001c2f00001d2f00001e2f00001f2f0000202f0000212f0000222f0000232f0000242f0000252f0000262f0000272f0000282f0000292f00002a2f00002b2f00002c2f00002d2f00002e2f00002f2f0000302f0000312f0000322f0000332f0000342f0000352f0000362f0000372f0000382f0000392f00003a2f00003b2f00003c2f00003d2f00003e2f00003f2f0000 - m_AlignBytes: 16 - groupID: 108 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 11984 - particle2: 11985 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 11985 - particle2: 11986 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 11986 - particle2: 11987 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 11987 - particle2: 11988 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 11988 - particle2: 11989 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 11989 - particle2: 11990 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 11990 - particle2: 11991 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 11991 - particle2: 11992 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 11992 - particle2: 11993 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 11993 - particle2: 11994 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 11994 - particle2: 11995 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1101870349 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1101870350} - - component: {fileID: 1101870354} - - component: {fileID: 1101870353} - - component: {fileID: 1101870352} - - component: {fileID: 1101870351} - m_Layer: 0 - m_Name: Obi Rope - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1101870350 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1101870349} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 249029318} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1101870351 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1101870349} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1101870354} - m_Target: {fileID: 1101870350} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1101870352 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1101870349} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1101870353 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1101870349} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 108 ---- !u!114 &1101870354 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1101870349} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 402f0000412f0000422f0000432f0000442f0000452f0000462f0000472f0000482f0000492f00004a2f00004b2f00004c2f00004d2f00004e2f00004f2f0000502f0000512f0000522f0000532f0000542f0000552f0000562f0000572f0000582f0000592f00005a2f00005b2f00005c2f00005d2f00005e2f00005f2f0000602f0000612f0000622f0000632f0000642f0000652f0000662f0000672f0000682f0000692f00006a2f00006b2f00006c2f00006d2f00006e2f00006f2f0000702f0000712f0000722f0000732f0000742f0000752f0000762f0000772f0000782f0000792f00007a2f00007b2f00007c2f00007d2f00007e2f00007f2f0000802f0000812f0000822f0000832f0000842f0000852f0000862f0000872f0000882f0000892f00008a2f00008b2f00008c2f00008d2f00008e2f00008f2f0000902f0000912f0000922f0000932f0000942f0000952f0000962f0000972f0000982f0000992f00009a2f00009b2f00009c2f00009d2f00009e2f00009f2f0000a02f0000a12f0000a22f0000a32f0000a42f0000a52f0000a62f0000a72f0000a82f0000a92f0000aa2f0000ab2f0000ac2f0000ad2f0000ae2f0000af2f0000 - m_AlignBytes: 16 - groupID: 109 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 12096 - particle2: 12097 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 12097 - particle2: 12098 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 12098 - particle2: 12099 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 12099 - particle2: 12100 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 12100 - particle2: 12101 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 12101 - particle2: 12102 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 12102 - particle2: 12103 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 12103 - particle2: 12104 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 12104 - particle2: 12105 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 12105 - particle2: 12106 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 12106 - particle2: 12107 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1107509113 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1107509114} - - component: {fileID: 1107509118} - - component: {fileID: 1107509117} - - component: {fileID: 1107509116} - - component: {fileID: 1107509115} - m_Layer: 0 - m_Name: Obi Rope (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1107509114 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1107509113} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.2, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1062536481} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1107509115 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1107509113} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1107509118} - m_Target: {fileID: 1107509114} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1107509116 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1107509113} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1107509117 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1107509113} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 109 ---- !u!114 &1107509118 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1107509113} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: b02f0000b12f0000b22f0000b32f0000b42f0000b52f0000b62f0000b72f0000b82f0000b92f0000ba2f0000bb2f0000bc2f0000bd2f0000be2f0000bf2f0000c02f0000c12f0000c22f0000c32f0000c42f0000c52f0000c62f0000c72f0000c82f0000c92f0000ca2f0000cb2f0000cc2f0000cd2f0000ce2f0000cf2f0000d02f0000d12f0000d22f0000d32f0000d42f0000d52f0000d62f0000d72f0000d82f0000d92f0000da2f0000db2f0000dc2f0000dd2f0000de2f0000df2f0000e02f0000e12f0000e22f0000e32f0000e42f0000e52f0000e62f0000e72f0000e82f0000e92f0000ea2f0000eb2f0000ec2f0000ed2f0000ee2f0000ef2f0000f02f0000f12f0000f22f0000f32f0000f42f0000f52f0000f62f0000f72f0000f82f0000f92f0000fa2f0000fb2f0000fc2f0000fd2f0000fe2f0000ff2f0000003000000130000002300000033000000430000005300000063000000730000008300000093000000a3000000b3000000c3000000d3000000e3000000f300000103000001130000012300000133000001430000015300000163000001730000018300000193000001a3000001b3000001c3000001d3000001e3000001f300000 - m_AlignBytes: 16 - groupID: 110 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 12208 - particle2: 12209 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 12209 - particle2: 12210 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 12210 - particle2: 12211 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 12211 - particle2: 12212 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 12212 - particle2: 12213 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 12213 - particle2: 12214 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 12214 - particle2: 12215 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 12215 - particle2: 12216 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 12216 - particle2: 12217 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 12217 - particle2: 12218 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 12218 - particle2: 12219 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1117186088 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1117186089} - - component: {fileID: 1117186093} - - component: {fileID: 1117186092} - - component: {fileID: 1117186091} - - component: {fileID: 1117186090} - m_Layer: 0 - m_Name: Obi Rope - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1117186089 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1117186088} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1464717035} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1117186090 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1117186088} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1117186093} - m_Target: {fileID: 1117186089} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1117186091 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1117186088} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1117186092 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1117186088} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 110 ---- !u!114 &1117186093 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1117186088} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 203000002130000022300000233000002430000025300000263000002730000028300000293000002a3000002b3000002c3000002d3000002e3000002f300000303000003130000032300000333000003430000035300000363000003730000038300000393000003a3000003b3000003c3000003d3000003e3000003f300000403000004130000042300000433000004430000045300000463000004730000048300000493000004a3000004b3000004c3000004d3000004e3000004f300000503000005130000052300000533000005430000055300000563000005730000058300000593000005a3000005b3000005c3000005d3000005e3000005f300000603000006130000062300000633000006430000065300000663000006730000068300000693000006a3000006b3000006c3000006d3000006e3000006f300000703000007130000072300000733000007430000075300000763000007730000078300000793000007a3000007b3000007c3000007d3000007e3000007f300000803000008130000082300000833000008430000085300000863000008730000088300000893000008a3000008b3000008c3000008d3000008e3000008f300000 - m_AlignBytes: 16 - groupID: 111 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 12320 - particle2: 12321 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 12321 - particle2: 12322 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 12322 - particle2: 12323 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 12323 - particle2: 12324 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 12324 - particle2: 12325 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 12325 - particle2: 12326 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 12326 - particle2: 12327 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 12327 - particle2: 12328 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 12328 - particle2: 12329 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 12329 - particle2: 12330 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 12330 - particle2: 12331 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1121401525 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1121401526} - - component: {fileID: 1121401530} - - component: {fileID: 1121401529} - - component: {fileID: 1121401528} - - component: {fileID: 1121401527} - m_Layer: 0 - m_Name: Obi Rope (2) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1121401526 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1121401525} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.4, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1062536481} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1121401527 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1121401525} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1121401530} - m_Target: {fileID: 1121401526} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1121401528 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1121401525} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1121401529 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1121401525} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 111 ---- !u!114 &1121401530 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1121401525} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 903000009130000092300000933000009430000095300000963000009730000098300000993000009a3000009b3000009c3000009d3000009e3000009f300000a0300000a1300000a2300000a3300000a4300000a5300000a6300000a7300000a8300000a9300000aa300000ab300000ac300000ad300000ae300000af300000b0300000b1300000b2300000b3300000b4300000b5300000b6300000b7300000b8300000b9300000ba300000bb300000bc300000bd300000be300000bf300000c0300000c1300000c2300000c3300000c4300000c5300000c6300000c7300000c8300000c9300000ca300000cb300000cc300000cd300000ce300000cf300000d0300000d1300000d2300000d3300000d4300000d5300000d6300000d7300000d8300000d9300000da300000db300000dc300000dd300000de300000df300000e0300000e1300000e2300000e3300000e4300000e5300000e6300000e7300000e8300000e9300000ea300000eb300000ec300000ed300000ee300000ef300000f0300000f1300000f2300000f3300000f4300000f5300000f6300000f7300000f8300000f9300000fa300000fb300000fc300000fd300000fe300000ff300000 - m_AlignBytes: 16 - groupID: 112 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 12432 - particle2: 12433 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 12433 - particle2: 12434 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 12434 - particle2: 12435 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 12435 - particle2: 12436 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 12436 - particle2: 12437 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 12437 - particle2: 12438 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 12438 - particle2: 12439 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 12439 - particle2: 12440 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 12440 - particle2: 12441 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 12441 - particle2: 12442 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 12442 - particle2: 12443 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1143427709 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1143427710} - - component: {fileID: 1143427714} - - component: {fileID: 1143427713} - - component: {fileID: 1143427712} - - component: {fileID: 1143427711} - m_Layer: 0 - m_Name: Obi Rope (8) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1143427710 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1143427709} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.6, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 54623967} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1143427711 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1143427709} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1143427714} - m_Target: {fileID: 1143427710} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1143427712 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1143427709} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1143427713 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1143427709} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 112 ---- !u!114 &1143427714 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1143427709} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 003100000131000002310000033100000431000005310000063100000731000008310000093100000a3100000b3100000c3100000d3100000e3100000f310000103100001131000012310000133100001431000015310000163100001731000018310000193100001a3100001b3100001c3100001d3100001e3100001f310000203100002131000022310000233100002431000025310000263100002731000028310000293100002a3100002b3100002c3100002d3100002e3100002f310000303100003131000032310000333100003431000035310000363100003731000038310000393100003a3100003b3100003c3100003d3100003e3100003f310000403100004131000042310000433100004431000045310000463100004731000048310000493100004a3100004b3100004c3100004d3100004e3100004f310000503100005131000052310000533100005431000055310000563100005731000058310000593100005a3100005b3100005c3100005d3100005e3100005f310000603100006131000062310000633100006431000065310000663100006731000068310000693100006a3100006b3100006c3100006d3100006e3100006f310000 - m_AlignBytes: 16 - groupID: 113 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 12544 - particle2: 12545 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 12545 - particle2: 12546 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 12546 - particle2: 12547 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 12547 - particle2: 12548 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 12548 - particle2: 12549 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 12549 - particle2: 12550 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 12550 - particle2: 12551 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 12551 - particle2: 12552 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 12552 - particle2: 12553 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 12553 - particle2: 12554 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 12554 - particle2: 12555 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1143771885 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1143771886} - - component: {fileID: 1143771890} - - component: {fileID: 1143771889} - - component: {fileID: 1143771888} - - component: {fileID: 1143771887} - m_Layer: 0 - m_Name: Obi Rope (9) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1143771886 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1143771885} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.8, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 510728467} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1143771887 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1143771885} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1143771890} - m_Target: {fileID: 1143771886} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1143771888 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1143771885} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1143771889 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1143771885} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 113 ---- !u!114 &1143771890 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1143771885} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 703100007131000072310000733100007431000075310000763100007731000078310000793100007a3100007b3100007c3100007d3100007e3100007f310000803100008131000082310000833100008431000085310000863100008731000088310000893100008a3100008b3100008c3100008d3100008e3100008f310000903100009131000092310000933100009431000095310000963100009731000098310000993100009a3100009b3100009c3100009d3100009e3100009f310000a0310000a1310000a2310000a3310000a4310000a5310000a6310000a7310000a8310000a9310000aa310000ab310000ac310000ad310000ae310000af310000b0310000b1310000b2310000b3310000b4310000b5310000b6310000b7310000b8310000b9310000ba310000bb310000bc310000bd310000be310000bf310000c0310000c1310000c2310000c3310000c4310000c5310000c6310000c7310000c8310000c9310000ca310000cb310000cc310000cd310000ce310000cf310000d0310000d1310000d2310000d3310000d4310000d5310000d6310000d7310000d8310000d9310000da310000db310000dc310000dd310000de310000df310000 - m_AlignBytes: 16 - groupID: 114 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 12656 - particle2: 12657 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 12657 - particle2: 12658 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 12658 - particle2: 12659 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 12659 - particle2: 12660 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 12660 - particle2: 12661 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 12661 - particle2: 12662 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 12662 - particle2: 12663 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 12663 - particle2: 12664 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 12664 - particle2: 12665 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 12665 - particle2: 12666 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 12666 - particle2: 12667 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1152767234 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1152767235} - - component: {fileID: 1152767239} - - component: {fileID: 1152767238} - - component: {fileID: 1152767237} - - component: {fileID: 1152767236} - m_Layer: 0 - m_Name: Obi Rope (4) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1152767235 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1152767234} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.8, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 940408952} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1152767236 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1152767234} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1152767239} - m_Target: {fileID: 1152767235} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1152767237 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1152767234} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1152767238 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1152767234} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 114 ---- !u!114 &1152767239 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1152767234} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: e0310000e1310000e2310000e3310000e4310000e5310000e6310000e7310000e8310000e9310000ea310000eb310000ec310000ed310000ee310000ef310000f0310000f1310000f2310000f3310000f4310000f5310000f6310000f7310000f8310000f9310000fa310000fb310000fc310000fd310000fe310000ff310000003200000132000002320000033200000432000005320000063200000732000008320000093200000a3200000b3200000c3200000d3200000e3200000f320000103200001132000012320000133200001432000015320000163200001732000018320000193200001a3200001b3200001c3200001d3200001e3200001f320000203200002132000022320000233200002432000025320000263200002732000028320000293200002a3200002b3200002c3200002d3200002e3200002f320000303200003132000032320000333200003432000035320000363200003732000038320000393200003a3200003b3200003c3200003d3200003e3200003f320000403200004132000042320000433200004432000045320000463200004732000048320000493200004a3200004b3200004c3200004d3200004e3200004f320000 - m_AlignBytes: 16 - groupID: 115 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 12768 - particle2: 12769 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 12769 - particle2: 12770 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 12770 - particle2: 12771 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 12771 - particle2: 12772 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 12772 - particle2: 12773 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 12773 - particle2: 12774 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 12774 - particle2: 12775 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 12775 - particle2: 12776 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 12776 - particle2: 12777 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 12777 - particle2: 12778 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 12778 - particle2: 12779 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1153529339 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1153529340} - - component: {fileID: 1153529344} - - component: {fileID: 1153529343} - - component: {fileID: 1153529342} - - component: {fileID: 1153529341} - m_Layer: 0 - m_Name: Obi Rope (5) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1153529340 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1153529339} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 249029318} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1153529341 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1153529339} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1153529344} - m_Target: {fileID: 1153529340} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1153529342 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1153529339} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1153529343 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1153529339} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 115 ---- !u!114 &1153529344 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1153529339} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 503200005132000052320000533200005432000055320000563200005732000058320000593200005a3200005b3200005c3200005d3200005e3200005f320000603200006132000062320000633200006432000065320000663200006732000068320000693200006a3200006b3200006c3200006d3200006e3200006f320000703200007132000072320000733200007432000075320000763200007732000078320000793200007a3200007b3200007c3200007d3200007e3200007f320000803200008132000082320000833200008432000085320000863200008732000088320000893200008a3200008b3200008c3200008d3200008e3200008f320000903200009132000092320000933200009432000095320000963200009732000098320000993200009a3200009b3200009c3200009d3200009e3200009f320000a0320000a1320000a2320000a3320000a4320000a5320000a6320000a7320000a8320000a9320000aa320000ab320000ac320000ad320000ae320000af320000b0320000b1320000b2320000b3320000b4320000b5320000b6320000b7320000b8320000b9320000ba320000bb320000bc320000bd320000be320000bf320000 - m_AlignBytes: 16 - groupID: 116 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 12880 - particle2: 12881 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 12881 - particle2: 12882 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 12882 - particle2: 12883 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 12883 - particle2: 12884 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 12884 - particle2: 12885 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 12885 - particle2: 12886 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 12886 - particle2: 12887 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 12887 - particle2: 12888 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 12888 - particle2: 12889 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 12889 - particle2: 12890 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 12890 - particle2: 12891 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1175446144 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1175446146} - - component: {fileID: 1175446145} - m_Layer: 0 - m_Name: Directional Light - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!108 &1175446145 -Light: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1175446144} - m_Enabled: 1 - serializedVersion: 11 - m_Type: 1 - m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} - m_Intensity: 1 - m_Range: 10 - m_SpotAngle: 30 - m_InnerSpotAngle: 21.802082 - m_CookieSize: 10 - m_Shadows: - m_Type: 2 - m_Resolution: -1 - m_CustomResolution: -1 - m_Strength: 1 - m_Bias: 0.03 - m_NormalBias: 0.01 - m_NearPlane: 0.2 - m_CullingMatrixOverride: - e00: 1 - e01: 0 - e02: 0 - e03: 0 - e10: 0 - e11: 1 - e12: 0 - e13: 0 - e20: 0 - e21: 0 - e22: 1 - e23: 0 - e30: 0 - e31: 0 - e32: 0 - e33: 1 - m_UseCullingMatrixOverride: 0 - m_Cookie: {fileID: 0} - m_DrawHalo: 0 - m_Flare: {fileID: 0} - m_RenderMode: 0 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingLayerMask: 1 - m_Lightmapping: 4 - m_LightShadowCasterMode: 0 - m_AreaSize: {x: 1, y: 1} - m_BounceIntensity: 1 - m_ColorTemperature: 6570 - m_UseColorTemperature: 0 - m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} - m_UseBoundingSphereOverride: 0 - m_UseViewFrustumForShadowCasterCull: 1 - m_ForceVisible: 0 - m_ShadowRadius: 0 - m_ShadowAngle: 0 - m_LightUnit: 1 - m_LuxAtDistance: 1 - m_EnableSpotReflector: 1 ---- !u!4 &1175446146 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1175446144} - serializedVersion: 2 - m_LocalRotation: {x: 0.41595167, y: -0.26247028, z: 0.26683384, w: 0.82879025} - m_LocalPosition: {x: 0, y: 3, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 56.052002, y: -22.431002, z: 23.642} ---- !u!1 &1189976173 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1189976174} - - component: {fileID: 1189976178} - - component: {fileID: 1189976177} - - component: {fileID: 1189976176} - - component: {fileID: 1189976175} - m_Layer: 0 - m_Name: Obi Rope (3) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1189976174 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1189976173} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.6, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1977632070} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1189976175 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1189976173} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1189976178} - m_Target: {fileID: 1189976174} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1189976176 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1189976173} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1189976177 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1189976173} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 116 ---- !u!114 &1189976178 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1189976173} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: c0320000c1320000c2320000c3320000c4320000c5320000c6320000c7320000c8320000c9320000ca320000cb320000cc320000cd320000ce320000cf320000d0320000d1320000d2320000d3320000d4320000d5320000d6320000d7320000d8320000d9320000da320000db320000dc320000dd320000de320000df320000e0320000e1320000e2320000e3320000e4320000e5320000e6320000e7320000e8320000e9320000ea320000eb320000ec320000ed320000ee320000ef320000f0320000f1320000f2320000f3320000f4320000f5320000f6320000f7320000f8320000f9320000fa320000fb320000fc320000fd320000fe320000ff320000003300000133000002330000033300000433000005330000063300000733000008330000093300000a3300000b3300000c3300000d3300000e3300000f330000103300001133000012330000133300001433000015330000163300001733000018330000193300001a3300001b3300001c3300001d3300001e3300001f330000203300002133000022330000233300002433000025330000263300002733000028330000293300002a3300002b3300002c3300002d3300002e3300002f330000 - m_AlignBytes: 16 - groupID: 117 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 12992 - particle2: 12993 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 12993 - particle2: 12994 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 12994 - particle2: 12995 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 12995 - particle2: 12996 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 12996 - particle2: 12997 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 12997 - particle2: 12998 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 12998 - particle2: 12999 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 12999 - particle2: 13000 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 13000 - particle2: 13001 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 13001 - particle2: 13002 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 13002 - particle2: 13003 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1228595149 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1228595150} - - component: {fileID: 1228595154} - - component: {fileID: 1228595153} - - component: {fileID: 1228595152} - - component: {fileID: 1228595151} - m_Layer: 0 - m_Name: Obi Rope (9) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1228595150 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1228595149} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.8, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1306593279} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1228595151 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1228595149} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1228595154} - m_Target: {fileID: 1228595150} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1228595152 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1228595149} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1228595153 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1228595149} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 117 ---- !u!114 &1228595154 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1228595149} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 303300003133000032330000333300003433000035330000363300003733000038330000393300003a3300003b3300003c3300003d3300003e3300003f330000403300004133000042330000433300004433000045330000463300004733000048330000493300004a3300004b3300004c3300004d3300004e3300004f330000503300005133000052330000533300005433000055330000563300005733000058330000593300005a3300005b3300005c3300005d3300005e3300005f330000603300006133000062330000633300006433000065330000663300006733000068330000693300006a3300006b3300006c3300006d3300006e3300006f330000703300007133000072330000733300007433000075330000763300007733000078330000793300007a3300007b3300007c3300007d3300007e3300007f330000803300008133000082330000833300008433000085330000863300008733000088330000893300008a3300008b3300008c3300008d3300008e3300008f330000903300009133000092330000933300009433000095330000963300009733000098330000993300009a3300009b3300009c3300009d3300009e3300009f330000 - m_AlignBytes: 16 - groupID: 118 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 13104 - particle2: 13105 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 13105 - particle2: 13106 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 13106 - particle2: 13107 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 13107 - particle2: 13108 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 13108 - particle2: 13109 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 13109 - particle2: 13110 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 13110 - particle2: 13111 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 13111 - particle2: 13112 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 13112 - particle2: 13113 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 13113 - particle2: 13114 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 13114 - particle2: 13115 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1237247125 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1237247126} - - component: {fileID: 1237247130} - - component: {fileID: 1237247129} - - component: {fileID: 1237247128} - - component: {fileID: 1237247127} - m_Layer: 0 - m_Name: Obi Rope (2) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1237247126 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1237247125} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.4, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1241971666} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1237247127 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1237247125} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1237247130} - m_Target: {fileID: 1237247126} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1237247128 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1237247125} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1237247129 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1237247125} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 118 ---- !u!114 &1237247130 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1237247125} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: a0330000a1330000a2330000a3330000a4330000a5330000a6330000a7330000a8330000a9330000aa330000ab330000ac330000ad330000ae330000af330000b0330000b1330000b2330000b3330000b4330000b5330000b6330000b7330000b8330000b9330000ba330000bb330000bc330000bd330000be330000bf330000c0330000c1330000c2330000c3330000c4330000c5330000c6330000c7330000c8330000c9330000ca330000cb330000cc330000cd330000ce330000cf330000d0330000d1330000d2330000d3330000d4330000d5330000d6330000d7330000d8330000d9330000da330000db330000dc330000dd330000de330000df330000e0330000e1330000e2330000e3330000e4330000e5330000e6330000e7330000e8330000e9330000ea330000eb330000ec330000ed330000ee330000ef330000f0330000f1330000f2330000f3330000f4330000f5330000f6330000f7330000f8330000f9330000fa330000fb330000fc330000fd330000fe330000ff330000003400000134000002340000033400000434000005340000063400000734000008340000093400000a3400000b3400000c3400000d3400000e3400000f340000 - m_AlignBytes: 16 - groupID: 119 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 13216 - particle2: 13217 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 13217 - particle2: 13218 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 13218 - particle2: 13219 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 13219 - particle2: 13220 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 13220 - particle2: 13221 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 13221 - particle2: 13222 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 13222 - particle2: 13223 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 13223 - particle2: 13224 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 13224 - particle2: 13225 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 13225 - particle2: 13226 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 13226 - particle2: 13227 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1240601734 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1240601735} - m_Layer: 0 - m_Name: Row (6) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1240601735 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1240601734} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -1.2} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 941225759} - - {fileID: 1551337444} - - {fileID: 503533459} - - {fileID: 531482358} - - {fileID: 1937961235} - - {fileID: 39329229} - - {fileID: 356687288} - - {fileID: 1288966894} - - {fileID: 1595267027} - - {fileID: 746024797} - m_Father: {fileID: 1027659676} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1241971665 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1241971666} - m_Layer: 0 - m_Name: Row (9) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1241971666 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1241971665} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -1.8} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 949981033} - - {fileID: 1268175475} - - {fileID: 1237247126} - - {fileID: 640325667} - - {fileID: 386703047} - - {fileID: 600063430} - - {fileID: 1336151026} - - {fileID: 1812706183} - - {fileID: 983686049} - - {fileID: 1901308916} - m_Father: {fileID: 1027659676} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1268175474 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1268175475} - - component: {fileID: 1268175479} - - component: {fileID: 1268175478} - - component: {fileID: 1268175477} - - component: {fileID: 1268175476} - m_Layer: 0 - m_Name: Obi Rope (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1268175475 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1268175474} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.2, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1241971666} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1268175476 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1268175474} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1268175479} - m_Target: {fileID: 1268175475} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1268175477 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1268175474} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1268175478 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1268175474} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 119 ---- !u!114 &1268175479 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1268175474} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 103400001134000012340000133400001434000015340000163400001734000018340000193400001a3400001b3400001c3400001d3400001e3400001f340000203400002134000022340000233400002434000025340000263400002734000028340000293400002a3400002b3400002c3400002d3400002e3400002f340000303400003134000032340000333400003434000035340000363400003734000038340000393400003a3400003b3400003c3400003d3400003e3400003f340000403400004134000042340000433400004434000045340000463400004734000048340000493400004a3400004b3400004c3400004d3400004e3400004f340000503400005134000052340000533400005434000055340000563400005734000058340000593400005a3400005b3400005c3400005d3400005e3400005f340000603400006134000062340000633400006434000065340000663400006734000068340000693400006a3400006b3400006c3400006d3400006e3400006f340000703400007134000072340000733400007434000075340000763400007734000078340000793400007a3400007b3400007c3400007d3400007e3400007f340000 - m_AlignBytes: 16 - groupID: 120 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 13328 - particle2: 13329 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 13329 - particle2: 13330 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 13330 - particle2: 13331 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 13331 - particle2: 13332 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 13332 - particle2: 13333 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 13333 - particle2: 13334 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 13334 - particle2: 13335 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 13335 - particle2: 13336 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 13336 - particle2: 13337 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 13337 - particle2: 13338 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 13338 - particle2: 13339 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1288966893 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1288966894} - - component: {fileID: 1288966898} - - component: {fileID: 1288966897} - - component: {fileID: 1288966896} - - component: {fileID: 1288966895} - m_Layer: 0 - m_Name: Obi Rope (7) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1288966894 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1288966893} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.4, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1240601735} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1288966895 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1288966893} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1288966898} - m_Target: {fileID: 1288966894} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1288966896 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1288966893} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1288966897 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1288966893} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 120 ---- !u!114 &1288966898 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1288966893} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 803400008134000082340000833400008434000085340000863400008734000088340000893400008a3400008b3400008c3400008d3400008e3400008f340000903400009134000092340000933400009434000095340000963400009734000098340000993400009a3400009b3400009c3400009d3400009e3400009f340000a0340000a1340000a2340000a3340000a4340000a5340000a6340000a7340000a8340000a9340000aa340000ab340000ac340000ad340000ae340000af340000b0340000b1340000b2340000b3340000b4340000b5340000b6340000b7340000b8340000b9340000ba340000bb340000bc340000bd340000be340000bf340000c0340000c1340000c2340000c3340000c4340000c5340000c6340000c7340000c8340000c9340000ca340000cb340000cc340000cd340000ce340000cf340000d0340000d1340000d2340000d3340000d4340000d5340000d6340000d7340000d8340000d9340000da340000db340000dc340000dd340000de340000df340000e0340000e1340000e2340000e3340000e4340000e5340000e6340000e7340000e8340000e9340000ea340000eb340000ec340000ed340000ee340000ef340000 - m_AlignBytes: 16 - groupID: 121 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 13440 - particle2: 13441 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 13441 - particle2: 13442 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 13442 - particle2: 13443 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 13443 - particle2: 13444 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 13444 - particle2: 13445 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 13445 - particle2: 13446 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 13446 - particle2: 13447 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 13447 - particle2: 13448 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 13448 - particle2: 13449 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 13449 - particle2: 13450 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 13450 - particle2: 13451 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1297311440 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1297311441} - - component: {fileID: 1297311445} - - component: {fileID: 1297311444} - - component: {fileID: 1297311443} - - component: {fileID: 1297311442} - m_Layer: 0 - m_Name: Obi Rope (3) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1297311441 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1297311440} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.6, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1640435994} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1297311442 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1297311440} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1297311445} - m_Target: {fileID: 1297311441} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1297311443 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1297311440} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1297311444 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1297311440} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 121 ---- !u!114 &1297311445 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1297311440} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: f0340000f1340000f2340000f3340000f4340000f5340000f6340000f7340000f8340000f9340000fa340000fb340000fc340000fd340000fe340000ff340000003500000135000002350000033500000435000005350000063500000735000008350000093500000a3500000b3500000c3500000d3500000e3500000f350000103500001135000012350000133500001435000015350000163500001735000018350000193500001a3500001b3500001c3500001d3500001e3500001f350000203500002135000022350000233500002435000025350000263500002735000028350000293500002a3500002b3500002c3500002d3500002e3500002f350000303500003135000032350000333500003435000035350000363500003735000038350000393500003a3500003b3500003c3500003d3500003e3500003f350000403500004135000042350000433500004435000045350000463500004735000048350000493500004a3500004b3500004c3500004d3500004e3500004f350000503500005135000052350000533500005435000055350000563500005735000058350000593500005a3500005b3500005c3500005d3500005e3500005f350000 - m_AlignBytes: 16 - groupID: 122 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 13552 - particle2: 13553 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 13553 - particle2: 13554 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 13554 - particle2: 13555 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 13555 - particle2: 13556 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 13556 - particle2: 13557 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 13557 - particle2: 13558 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 13558 - particle2: 13559 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 13559 - particle2: 13560 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 13560 - particle2: 13561 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 13561 - particle2: 13562 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 13562 - particle2: 13563 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1299859296 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1299859297} - - component: {fileID: 1299859301} - - component: {fileID: 1299859300} - - component: {fileID: 1299859299} - - component: {fileID: 1299859298} - m_Layer: 0 - m_Name: Obi Rope (7) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1299859297 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1299859296} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.4, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 893001395} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1299859298 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1299859296} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1299859301} - m_Target: {fileID: 1299859297} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1299859299 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1299859296} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1299859300 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1299859296} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 122 ---- !u!114 &1299859301 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1299859296} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 603500006135000062350000633500006435000065350000663500006735000068350000693500006a3500006b3500006c3500006d3500006e3500006f350000703500007135000072350000733500007435000075350000763500007735000078350000793500007a3500007b3500007c3500007d3500007e3500007f350000803500008135000082350000833500008435000085350000863500008735000088350000893500008a3500008b3500008c3500008d3500008e3500008f350000903500009135000092350000933500009435000095350000963500009735000098350000993500009a3500009b3500009c3500009d3500009e3500009f350000a0350000a1350000a2350000a3350000a4350000a5350000a6350000a7350000a8350000a9350000aa350000ab350000ac350000ad350000ae350000af350000b0350000b1350000b2350000b3350000b4350000b5350000b6350000b7350000b8350000b9350000ba350000bb350000bc350000bd350000be350000bf350000c0350000c1350000c2350000c3350000c4350000c5350000c6350000c7350000c8350000c9350000ca350000cb350000cc350000cd350000ce350000cf350000 - m_AlignBytes: 16 - groupID: 123 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 13664 - particle2: 13665 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 13665 - particle2: 13666 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 13666 - particle2: 13667 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 13667 - particle2: 13668 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 13668 - particle2: 13669 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 13669 - particle2: 13670 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 13670 - particle2: 13671 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 13671 - particle2: 13672 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 13672 - particle2: 13673 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 13673 - particle2: 13674 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 13674 - particle2: 13675 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1300868597 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1300868598} - - component: {fileID: 1300868602} - - component: {fileID: 1300868601} - - component: {fileID: 1300868600} - - component: {fileID: 1300868599} - m_Layer: 0 - m_Name: Obi Rope (9) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1300868598 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1300868597} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.8, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 779073863} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1300868599 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1300868597} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1300868602} - m_Target: {fileID: 1300868598} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1300868600 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1300868597} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1300868601 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1300868597} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 123 ---- !u!114 &1300868602 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1300868597} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: d0350000d1350000d2350000d3350000d4350000d5350000d6350000d7350000d8350000d9350000da350000db350000dc350000dd350000de350000df350000e0350000e1350000e2350000e3350000e4350000e5350000e6350000e7350000e8350000e9350000ea350000eb350000ec350000ed350000ee350000ef350000f0350000f1350000f2350000f3350000f4350000f5350000f6350000f7350000f8350000f9350000fa350000fb350000fc350000fd350000fe350000ff350000003600000136000002360000033600000436000005360000063600000736000008360000093600000a3600000b3600000c3600000d3600000e3600000f360000103600001136000012360000133600001436000015360000163600001736000018360000193600001a3600001b3600001c3600001d3600001e3600001f360000203600002136000022360000233600002436000025360000263600002736000028360000293600002a3600002b3600002c3600002d3600002e3600002f360000303600003136000032360000333600003436000035360000363600003736000038360000393600003a3600003b3600003c3600003d3600003e3600003f360000 - m_AlignBytes: 16 - groupID: 124 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 13776 - particle2: 13777 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 13777 - particle2: 13778 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 13778 - particle2: 13779 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 13779 - particle2: 13780 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 13780 - particle2: 13781 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 13781 - particle2: 13782 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 13782 - particle2: 13783 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 13783 - particle2: 13784 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 13784 - particle2: 13785 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 13785 - particle2: 13786 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 13786 - particle2: 13787 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1304270658 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1304270659} - - component: {fileID: 1304270663} - - component: {fileID: 1304270662} - - component: {fileID: 1304270661} - - component: {fileID: 1304270660} - m_Layer: 0 - m_Name: Obi Rope - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1304270659 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1304270658} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 940408952} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1304270660 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1304270658} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1304270663} - m_Target: {fileID: 1304270659} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1304270661 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1304270658} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1304270662 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1304270658} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 124 ---- !u!114 &1304270663 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1304270658} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 403600004136000042360000433600004436000045360000463600004736000048360000493600004a3600004b3600004c3600004d3600004e3600004f360000503600005136000052360000533600005436000055360000563600005736000058360000593600005a3600005b3600005c3600005d3600005e3600005f360000603600006136000062360000633600006436000065360000663600006736000068360000693600006a3600006b3600006c3600006d3600006e3600006f360000703600007136000072360000733600007436000075360000763600007736000078360000793600007a3600007b3600007c3600007d3600007e3600007f360000803600008136000082360000833600008436000085360000863600008736000088360000893600008a3600008b3600008c3600008d3600008e3600008f360000903600009136000092360000933600009436000095360000963600009736000098360000993600009a3600009b3600009c3600009d3600009e3600009f360000a0360000a1360000a2360000a3360000a4360000a5360000a6360000a7360000a8360000a9360000aa360000ab360000ac360000ad360000ae360000af360000 - m_AlignBytes: 16 - groupID: 125 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 13888 - particle2: 13889 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 13889 - particle2: 13890 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 13890 - particle2: 13891 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 13891 - particle2: 13892 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 13892 - particle2: 13893 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 13893 - particle2: 13894 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 13894 - particle2: 13895 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 13895 - particle2: 13896 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 13896 - particle2: 13897 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 13897 - particle2: 13898 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 13898 - particle2: 13899 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1306593278 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1306593279} - m_Layer: 0 - m_Name: Row (2) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1306593279 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1306593278} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -0.4} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 1758285766} - - {fileID: 888913399} - - {fileID: 474752659} - - {fileID: 1886039167} - - {fileID: 547327667} - - {fileID: 170149755} - - {fileID: 360658608} - - {fileID: 733963101} - - {fileID: 1964761414} - - {fileID: 1228595150} - m_Father: {fileID: 1027659676} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1332770745 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1332770746} - - component: {fileID: 1332770750} - - component: {fileID: 1332770749} - - component: {fileID: 1332770748} - - component: {fileID: 1332770747} - m_Layer: 0 - m_Name: Obi Rope (8) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1332770746 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1332770745} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.6, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1628171963} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1332770747 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1332770745} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1332770750} - m_Target: {fileID: 1332770746} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1332770748 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1332770745} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1332770749 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1332770745} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 125 ---- !u!114 &1332770750 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1332770745} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: b0360000b1360000b2360000b3360000b4360000b5360000b6360000b7360000b8360000b9360000ba360000bb360000bc360000bd360000be360000bf360000c0360000c1360000c2360000c3360000c4360000c5360000c6360000c7360000c8360000c9360000ca360000cb360000cc360000cd360000ce360000cf360000d0360000d1360000d2360000d3360000d4360000d5360000d6360000d7360000d8360000d9360000da360000db360000dc360000dd360000de360000df360000e0360000e1360000e2360000e3360000e4360000e5360000e6360000e7360000e8360000e9360000ea360000eb360000ec360000ed360000ee360000ef360000f0360000f1360000f2360000f3360000f4360000f5360000f6360000f7360000f8360000f9360000fa360000fb360000fc360000fd360000fe360000ff360000003700000137000002370000033700000437000005370000063700000737000008370000093700000a3700000b3700000c3700000d3700000e3700000f370000103700001137000012370000133700001437000015370000163700001737000018370000193700001a3700001b3700001c3700001d3700001e3700001f370000 - m_AlignBytes: 16 - groupID: 126 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 14000 - particle2: 14001 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 14001 - particle2: 14002 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 14002 - particle2: 14003 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 14003 - particle2: 14004 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 14004 - particle2: 14005 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 14005 - particle2: 14006 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 14006 - particle2: 14007 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 14007 - particle2: 14008 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 14008 - particle2: 14009 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 14009 - particle2: 14010 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 14010 - particle2: 14011 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1333859661 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1333859662} - - component: {fileID: 1333859666} - - component: {fileID: 1333859665} - - component: {fileID: 1333859664} - - component: {fileID: 1333859663} - m_Layer: 0 - m_Name: Obi Rope (5) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1333859662 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1333859661} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 940408952} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1333859663 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1333859661} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1333859666} - m_Target: {fileID: 1333859662} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1333859664 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1333859661} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1333859665 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1333859661} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 126 ---- !u!114 &1333859666 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1333859661} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 203700002137000022370000233700002437000025370000263700002737000028370000293700002a3700002b3700002c3700002d3700002e3700002f370000303700003137000032370000333700003437000035370000363700003737000038370000393700003a3700003b3700003c3700003d3700003e3700003f370000403700004137000042370000433700004437000045370000463700004737000048370000493700004a3700004b3700004c3700004d3700004e3700004f370000503700005137000052370000533700005437000055370000563700005737000058370000593700005a3700005b3700005c3700005d3700005e3700005f370000603700006137000062370000633700006437000065370000663700006737000068370000693700006a3700006b3700006c3700006d3700006e3700006f370000703700007137000072370000733700007437000075370000763700007737000078370000793700007a3700007b3700007c3700007d3700007e3700007f370000803700008137000082370000833700008437000085370000863700008737000088370000893700008a3700008b3700008c3700008d3700008e3700008f370000 - m_AlignBytes: 16 - groupID: 127 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 14112 - particle2: 14113 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 14113 - particle2: 14114 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 14114 - particle2: 14115 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 14115 - particle2: 14116 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 14116 - particle2: 14117 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 14117 - particle2: 14118 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 14118 - particle2: 14119 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 14119 - particle2: 14120 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 14120 - particle2: 14121 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 14121 - particle2: 14122 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 14122 - particle2: 14123 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1336151025 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1336151026} - - component: {fileID: 1336151030} - - component: {fileID: 1336151029} - - component: {fileID: 1336151028} - - component: {fileID: 1336151027} - m_Layer: 0 - m_Name: Obi Rope (6) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1336151026 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1336151025} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.2, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1241971666} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1336151027 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1336151025} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1336151030} - m_Target: {fileID: 1336151026} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1336151028 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1336151025} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1336151029 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1336151025} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 127 ---- !u!114 &1336151030 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1336151025} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 903700009137000092370000933700009437000095370000963700009737000098370000993700009a3700009b3700009c3700009d3700009e3700009f370000a0370000a1370000a2370000a3370000a4370000a5370000a6370000a7370000a8370000a9370000aa370000ab370000ac370000ad370000ae370000af370000b0370000b1370000b2370000b3370000b4370000b5370000b6370000b7370000b8370000b9370000ba370000bb370000bc370000bd370000be370000bf370000c0370000c1370000c2370000c3370000c4370000c5370000c6370000c7370000c8370000c9370000ca370000cb370000cc370000cd370000ce370000cf370000d0370000d1370000d2370000d3370000d4370000d5370000d6370000d7370000d8370000d9370000da370000db370000dc370000dd370000de370000df370000e0370000e1370000e2370000e3370000e4370000e5370000e6370000e7370000e8370000e9370000ea370000eb370000ec370000ed370000ee370000ef370000f0370000f1370000f2370000f3370000f4370000f5370000f6370000f7370000f8370000f9370000fa370000fb370000fc370000fd370000fe370000ff370000 - m_AlignBytes: 16 - groupID: 128 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 14224 - particle2: 14225 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 14225 - particle2: 14226 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 14226 - particle2: 14227 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 14227 - particle2: 14228 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 14228 - particle2: 14229 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 14229 - particle2: 14230 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 14230 - particle2: 14231 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 14231 - particle2: 14232 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 14232 - particle2: 14233 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 14233 - particle2: 14234 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 14234 - particle2: 14235 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1374969020 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1374969021} - - component: {fileID: 1374969025} - - component: {fileID: 1374969024} - - component: {fileID: 1374969023} - - component: {fileID: 1374969022} - m_Layer: 0 - m_Name: Obi Rope (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1374969021 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1374969020} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.2, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1640435994} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1374969022 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1374969020} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1374969025} - m_Target: {fileID: 1374969021} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1374969023 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1374969020} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1374969024 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1374969020} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 128 ---- !u!114 &1374969025 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1374969020} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 003800000138000002380000033800000438000005380000063800000738000008380000093800000a3800000b3800000c3800000d3800000e3800000f380000103800001138000012380000133800001438000015380000163800001738000018380000193800001a3800001b3800001c3800001d3800001e3800001f380000203800002138000022380000233800002438000025380000263800002738000028380000293800002a3800002b3800002c3800002d3800002e3800002f380000303800003138000032380000333800003438000035380000363800003738000038380000393800003a3800003b3800003c3800003d3800003e3800003f380000403800004138000042380000433800004438000045380000463800004738000048380000493800004a3800004b3800004c3800004d3800004e3800004f380000503800005138000052380000533800005438000055380000563800005738000058380000593800005a3800005b3800005c3800005d3800005e3800005f380000603800006138000062380000633800006438000065380000663800006738000068380000693800006a3800006b3800006c3800006d3800006e3800006f380000 - m_AlignBytes: 16 - groupID: 129 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 14336 - particle2: 14337 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 14337 - particle2: 14338 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 14338 - particle2: 14339 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 14339 - particle2: 14340 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 14340 - particle2: 14341 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 14341 - particle2: 14342 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 14342 - particle2: 14343 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 14343 - particle2: 14344 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 14344 - particle2: 14345 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 14345 - particle2: 14346 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 14346 - particle2: 14347 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1375015037 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1375015038} - - component: {fileID: 1375015042} - - component: {fileID: 1375015041} - - component: {fileID: 1375015040} - - component: {fileID: 1375015039} - m_Layer: 0 - m_Name: Obi Rope - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1375015038 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1375015037} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 779073863} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1375015039 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1375015037} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1375015042} - m_Target: {fileID: 1375015038} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1375015040 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1375015037} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1375015041 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1375015037} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 129 ---- !u!114 &1375015042 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1375015037} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 703800007138000072380000733800007438000075380000763800007738000078380000793800007a3800007b3800007c3800007d3800007e3800007f380000803800008138000082380000833800008438000085380000863800008738000088380000893800008a3800008b3800008c3800008d3800008e3800008f380000903800009138000092380000933800009438000095380000963800009738000098380000993800009a3800009b3800009c3800009d3800009e3800009f380000a0380000a1380000a2380000a3380000a4380000a5380000a6380000a7380000a8380000a9380000aa380000ab380000ac380000ad380000ae380000af380000b0380000b1380000b2380000b3380000b4380000b5380000b6380000b7380000b8380000b9380000ba380000bb380000bc380000bd380000be380000bf380000c0380000c1380000c2380000c3380000c4380000c5380000c6380000c7380000c8380000c9380000ca380000cb380000cc380000cd380000ce380000cf380000d0380000d1380000d2380000d3380000d4380000d5380000d6380000d7380000d8380000d9380000da380000db380000dc380000dd380000de380000df380000 - m_AlignBytes: 16 - groupID: 130 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 14448 - particle2: 14449 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 14449 - particle2: 14450 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 14450 - particle2: 14451 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 14451 - particle2: 14452 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 14452 - particle2: 14453 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 14453 - particle2: 14454 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 14454 - particle2: 14455 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 14455 - particle2: 14456 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 14456 - particle2: 14457 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 14457 - particle2: 14458 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 14458 - particle2: 14459 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1424048100 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1424048101} - - component: {fileID: 1424048105} - - component: {fileID: 1424048104} - - component: {fileID: 1424048103} - - component: {fileID: 1424048102} - m_Layer: 0 - m_Name: Obi Rope - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1424048101 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1424048100} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 510728467} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1424048102 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1424048100} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1424048105} - m_Target: {fileID: 1424048101} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1424048103 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1424048100} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1424048104 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1424048100} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 130 ---- !u!114 &1424048105 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1424048100} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: e0380000e1380000e2380000e3380000e4380000e5380000e6380000e7380000e8380000e9380000ea380000eb380000ec380000ed380000ee380000ef380000f0380000f1380000f2380000f3380000f4380000f5380000f6380000f7380000f8380000f9380000fa380000fb380000fc380000fd380000fe380000ff380000003900000139000002390000033900000439000005390000063900000739000008390000093900000a3900000b3900000c3900000d3900000e3900000f390000103900001139000012390000133900001439000015390000163900001739000018390000193900001a3900001b3900001c3900001d3900001e3900001f390000203900002139000022390000233900002439000025390000263900002739000028390000293900002a3900002b3900002c3900002d3900002e3900002f390000303900003139000032390000333900003439000035390000363900003739000038390000393900003a3900003b3900003c3900003d3900003e3900003f390000403900004139000042390000433900004439000045390000463900004739000048390000493900004a3900004b3900004c3900004d3900004e3900004f390000 - m_AlignBytes: 16 - groupID: 131 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 14560 - particle2: 14561 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 14561 - particle2: 14562 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 14562 - particle2: 14563 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 14563 - particle2: 14564 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 14564 - particle2: 14565 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 14565 - particle2: 14566 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 14566 - particle2: 14567 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 14567 - particle2: 14568 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 14568 - particle2: 14569 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 14569 - particle2: 14570 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 14570 - particle2: 14571 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1431270382 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1431270383} - - component: {fileID: 1431270387} - - component: {fileID: 1431270386} - - component: {fileID: 1431270385} - - component: {fileID: 1431270384} - m_Layer: 0 - m_Name: Obi Rope (2) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1431270383 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1431270382} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.4, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1464717035} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1431270384 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1431270382} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1431270387} - m_Target: {fileID: 1431270383} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1431270385 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1431270382} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1431270386 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1431270382} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 131 ---- !u!114 &1431270387 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1431270382} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 503900005139000052390000533900005439000055390000563900005739000058390000593900005a3900005b3900005c3900005d3900005e3900005f390000603900006139000062390000633900006439000065390000663900006739000068390000693900006a3900006b3900006c3900006d3900006e3900006f390000703900007139000072390000733900007439000075390000763900007739000078390000793900007a3900007b3900007c3900007d3900007e3900007f390000803900008139000082390000833900008439000085390000863900008739000088390000893900008a3900008b3900008c3900008d3900008e3900008f390000903900009139000092390000933900009439000095390000963900009739000098390000993900009a3900009b3900009c3900009d3900009e3900009f390000a0390000a1390000a2390000a3390000a4390000a5390000a6390000a7390000a8390000a9390000aa390000ab390000ac390000ad390000ae390000af390000b0390000b1390000b2390000b3390000b4390000b5390000b6390000b7390000b8390000b9390000ba390000bb390000bc390000bd390000be390000bf390000 - m_AlignBytes: 16 - groupID: 132 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 14672 - particle2: 14673 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 14673 - particle2: 14674 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 14674 - particle2: 14675 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 14675 - particle2: 14676 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 14676 - particle2: 14677 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 14677 - particle2: 14678 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 14678 - particle2: 14679 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 14679 - particle2: 14680 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 14680 - particle2: 14681 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 14681 - particle2: 14682 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 14682 - particle2: 14683 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1437781648 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1437781649} - - component: {fileID: 1437781653} - - component: {fileID: 1437781652} - - component: {fileID: 1437781651} - - component: {fileID: 1437781650} - m_Layer: 0 - m_Name: Obi Rope (5) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1437781649 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1437781648} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 2009678977} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1437781650 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1437781648} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1437781653} - m_Target: {fileID: 1437781649} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1437781651 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1437781648} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1437781652 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1437781648} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 132 ---- !u!114 &1437781653 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1437781648} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: c0390000c1390000c2390000c3390000c4390000c5390000c6390000c7390000c8390000c9390000ca390000cb390000cc390000cd390000ce390000cf390000d0390000d1390000d2390000d3390000d4390000d5390000d6390000d7390000d8390000d9390000da390000db390000dc390000dd390000de390000df390000e0390000e1390000e2390000e3390000e4390000e5390000e6390000e7390000e8390000e9390000ea390000eb390000ec390000ed390000ee390000ef390000f0390000f1390000f2390000f3390000f4390000f5390000f6390000f7390000f8390000f9390000fa390000fb390000fc390000fd390000fe390000ff390000003a0000013a0000023a0000033a0000043a0000053a0000063a0000073a0000083a0000093a00000a3a00000b3a00000c3a00000d3a00000e3a00000f3a0000103a0000113a0000123a0000133a0000143a0000153a0000163a0000173a0000183a0000193a00001a3a00001b3a00001c3a00001d3a00001e3a00001f3a0000203a0000213a0000223a0000233a0000243a0000253a0000263a0000273a0000283a0000293a00002a3a00002b3a00002c3a00002d3a00002e3a00002f3a0000 - m_AlignBytes: 16 - groupID: 133 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 14784 - particle2: 14785 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 14785 - particle2: 14786 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 14786 - particle2: 14787 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 14787 - particle2: 14788 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 14788 - particle2: 14789 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 14789 - particle2: 14790 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 14790 - particle2: 14791 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 14791 - particle2: 14792 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 14792 - particle2: 14793 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 14793 - particle2: 14794 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 14794 - particle2: 14795 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1438254938 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1438254939} - - component: {fileID: 1438254943} - - component: {fileID: 1438254942} - - component: {fileID: 1438254941} - - component: {fileID: 1438254940} - m_Layer: 0 - m_Name: Obi Rope (5) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1438254939 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1438254938} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 893001395} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1438254940 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1438254938} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1438254943} - m_Target: {fileID: 1438254939} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1438254941 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1438254938} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1438254942 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1438254938} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 133 ---- !u!114 &1438254943 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1438254938} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 303a0000313a0000323a0000333a0000343a0000353a0000363a0000373a0000383a0000393a00003a3a00003b3a00003c3a00003d3a00003e3a00003f3a0000403a0000413a0000423a0000433a0000443a0000453a0000463a0000473a0000483a0000493a00004a3a00004b3a00004c3a00004d3a00004e3a00004f3a0000503a0000513a0000523a0000533a0000543a0000553a0000563a0000573a0000583a0000593a00005a3a00005b3a00005c3a00005d3a00005e3a00005f3a0000603a0000613a0000623a0000633a0000643a0000653a0000663a0000673a0000683a0000693a00006a3a00006b3a00006c3a00006d3a00006e3a00006f3a0000703a0000713a0000723a0000733a0000743a0000753a0000763a0000773a0000783a0000793a00007a3a00007b3a00007c3a00007d3a00007e3a00007f3a0000803a0000813a0000823a0000833a0000843a0000853a0000863a0000873a0000883a0000893a00008a3a00008b3a00008c3a00008d3a00008e3a00008f3a0000903a0000913a0000923a0000933a0000943a0000953a0000963a0000973a0000983a0000993a00009a3a00009b3a00009c3a00009d3a00009e3a00009f3a0000 - m_AlignBytes: 16 - groupID: 134 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 14896 - particle2: 14897 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 14897 - particle2: 14898 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 14898 - particle2: 14899 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 14899 - particle2: 14900 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 14900 - particle2: 14901 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 14901 - particle2: 14902 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 14902 - particle2: 14903 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 14903 - particle2: 14904 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 14904 - particle2: 14905 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 14905 - particle2: 14906 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 14906 - particle2: 14907 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1440395743 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1440395744} - - component: {fileID: 1440395748} - - component: {fileID: 1440395747} - - component: {fileID: 1440395746} - - component: {fileID: 1440395745} - m_Layer: 0 - m_Name: Obi Rope (5) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1440395744 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1440395743} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1062536481} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1440395745 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1440395743} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1440395748} - m_Target: {fileID: 1440395744} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1440395746 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1440395743} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1440395747 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1440395743} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 134 ---- !u!114 &1440395748 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1440395743} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: a03a0000a13a0000a23a0000a33a0000a43a0000a53a0000a63a0000a73a0000a83a0000a93a0000aa3a0000ab3a0000ac3a0000ad3a0000ae3a0000af3a0000b03a0000b13a0000b23a0000b33a0000b43a0000b53a0000b63a0000b73a0000b83a0000b93a0000ba3a0000bb3a0000bc3a0000bd3a0000be3a0000bf3a0000c03a0000c13a0000c23a0000c33a0000c43a0000c53a0000c63a0000c73a0000c83a0000c93a0000ca3a0000cb3a0000cc3a0000cd3a0000ce3a0000cf3a0000d03a0000d13a0000d23a0000d33a0000d43a0000d53a0000d63a0000d73a0000d83a0000d93a0000da3a0000db3a0000dc3a0000dd3a0000de3a0000df3a0000e03a0000e13a0000e23a0000e33a0000e43a0000e53a0000e63a0000e73a0000e83a0000e93a0000ea3a0000eb3a0000ec3a0000ed3a0000ee3a0000ef3a0000f03a0000f13a0000f23a0000f33a0000f43a0000f53a0000f63a0000f73a0000f83a0000f93a0000fa3a0000fb3a0000fc3a0000fd3a0000fe3a0000ff3a0000003b0000013b0000023b0000033b0000043b0000053b0000063b0000073b0000083b0000093b00000a3b00000b3b00000c3b00000d3b00000e3b00000f3b0000 - m_AlignBytes: 16 - groupID: 135 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 15008 - particle2: 15009 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 15009 - particle2: 15010 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 15010 - particle2: 15011 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 15011 - particle2: 15012 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 15012 - particle2: 15013 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 15013 - particle2: 15014 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 15014 - particle2: 15015 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 15015 - particle2: 15016 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 15016 - particle2: 15017 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 15017 - particle2: 15018 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 15018 - particle2: 15019 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1454186979 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1454186980} - - component: {fileID: 1454186984} - - component: {fileID: 1454186983} - - component: {fileID: 1454186982} - - component: {fileID: 1454186981} - m_Layer: 0 - m_Name: Obi Rope (6) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1454186980 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1454186979} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.2, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1628171963} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1454186981 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1454186979} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1454186984} - m_Target: {fileID: 1454186980} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1454186982 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1454186979} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1454186983 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1454186979} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 135 ---- !u!114 &1454186984 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1454186979} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 103b0000113b0000123b0000133b0000143b0000153b0000163b0000173b0000183b0000193b00001a3b00001b3b00001c3b00001d3b00001e3b00001f3b0000203b0000213b0000223b0000233b0000243b0000253b0000263b0000273b0000283b0000293b00002a3b00002b3b00002c3b00002d3b00002e3b00002f3b0000303b0000313b0000323b0000333b0000343b0000353b0000363b0000373b0000383b0000393b00003a3b00003b3b00003c3b00003d3b00003e3b00003f3b0000403b0000413b0000423b0000433b0000443b0000453b0000463b0000473b0000483b0000493b00004a3b00004b3b00004c3b00004d3b00004e3b00004f3b0000503b0000513b0000523b0000533b0000543b0000553b0000563b0000573b0000583b0000593b00005a3b00005b3b00005c3b00005d3b00005e3b00005f3b0000603b0000613b0000623b0000633b0000643b0000653b0000663b0000673b0000683b0000693b00006a3b00006b3b00006c3b00006d3b00006e3b00006f3b0000703b0000713b0000723b0000733b0000743b0000753b0000763b0000773b0000783b0000793b00007a3b00007b3b00007c3b00007d3b00007e3b00007f3b0000 - m_AlignBytes: 16 - groupID: 136 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 15120 - particle2: 15121 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 15121 - particle2: 15122 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 15122 - particle2: 15123 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 15123 - particle2: 15124 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 15124 - particle2: 15125 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 15125 - particle2: 15126 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 15126 - particle2: 15127 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 15127 - particle2: 15128 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 15128 - particle2: 15129 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 15129 - particle2: 15130 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 15130 - particle2: 15131 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1461467371 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1461467372} - - component: {fileID: 1461467376} - - component: {fileID: 1461467375} - - component: {fileID: 1461467374} - - component: {fileID: 1461467373} - m_Layer: 0 - m_Name: Obi Rope - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1461467372 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1461467371} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 54623967} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1461467373 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1461467371} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1461467376} - m_Target: {fileID: 1461467372} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1461467374 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1461467371} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1461467375 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1461467371} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 136 ---- !u!114 &1461467376 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1461467371} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 803b0000813b0000823b0000833b0000843b0000853b0000863b0000873b0000883b0000893b00008a3b00008b3b00008c3b00008d3b00008e3b00008f3b0000903b0000913b0000923b0000933b0000943b0000953b0000963b0000973b0000983b0000993b00009a3b00009b3b00009c3b00009d3b00009e3b00009f3b0000a03b0000a13b0000a23b0000a33b0000a43b0000a53b0000a63b0000a73b0000a83b0000a93b0000aa3b0000ab3b0000ac3b0000ad3b0000ae3b0000af3b0000b03b0000b13b0000b23b0000b33b0000b43b0000b53b0000b63b0000b73b0000b83b0000b93b0000ba3b0000bb3b0000bc3b0000bd3b0000be3b0000bf3b0000c03b0000c13b0000c23b0000c33b0000c43b0000c53b0000c63b0000c73b0000c83b0000c93b0000ca3b0000cb3b0000cc3b0000cd3b0000ce3b0000cf3b0000d03b0000d13b0000d23b0000d33b0000d43b0000d53b0000d63b0000d73b0000d83b0000d93b0000da3b0000db3b0000dc3b0000dd3b0000de3b0000df3b0000e03b0000e13b0000e23b0000e33b0000e43b0000e53b0000e63b0000e73b0000e83b0000e93b0000ea3b0000eb3b0000ec3b0000ed3b0000ee3b0000ef3b0000 - m_AlignBytes: 16 - groupID: 137 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 15232 - particle2: 15233 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 15233 - particle2: 15234 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 15234 - particle2: 15235 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 15235 - particle2: 15236 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 15236 - particle2: 15237 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 15237 - particle2: 15238 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 15238 - particle2: 15239 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 15239 - particle2: 15240 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 15240 - particle2: 15241 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 15241 - particle2: 15242 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 15242 - particle2: 15243 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1464717034 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1464717035} - m_Layer: 0 - m_Name: Row (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1464717035 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1464717034} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -0.2} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 1117186089} - - {fileID: 1635734355} - - {fileID: 1431270383} - - {fileID: 2127388785} - - {fileID: 975387945} - - {fileID: 1001514668} - - {fileID: 1040360819} - - {fileID: 674074861} - - {fileID: 1970184123} - - {fileID: 686144124} - m_Father: {fileID: 1760688768} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1472901346 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1472901347} - - component: {fileID: 1472901351} - - component: {fileID: 1472901350} - - component: {fileID: 1472901349} - - component: {fileID: 1472901348} - m_Layer: 0 - m_Name: Obi Rope (9) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1472901347 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1472901346} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.8, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1977632070} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1472901348 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1472901346} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1472901351} - m_Target: {fileID: 1472901347} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1472901349 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1472901346} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1472901350 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1472901346} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 137 ---- !u!114 &1472901351 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1472901346} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: f03b0000f13b0000f23b0000f33b0000f43b0000f53b0000f63b0000f73b0000f83b0000f93b0000fa3b0000fb3b0000fc3b0000fd3b0000fe3b0000ff3b0000003c0000013c0000023c0000033c0000043c0000053c0000063c0000073c0000083c0000093c00000a3c00000b3c00000c3c00000d3c00000e3c00000f3c0000103c0000113c0000123c0000133c0000143c0000153c0000163c0000173c0000183c0000193c00001a3c00001b3c00001c3c00001d3c00001e3c00001f3c0000203c0000213c0000223c0000233c0000243c0000253c0000263c0000273c0000283c0000293c00002a3c00002b3c00002c3c00002d3c00002e3c00002f3c0000303c0000313c0000323c0000333c0000343c0000353c0000363c0000373c0000383c0000393c00003a3c00003b3c00003c3c00003d3c00003e3c00003f3c0000403c0000413c0000423c0000433c0000443c0000453c0000463c0000473c0000483c0000493c00004a3c00004b3c00004c3c00004d3c00004e3c00004f3c0000503c0000513c0000523c0000533c0000543c0000553c0000563c0000573c0000583c0000593c00005a3c00005b3c00005c3c00005d3c00005e3c00005f3c0000 - m_AlignBytes: 16 - groupID: 138 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 15344 - particle2: 15345 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 15345 - particle2: 15346 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 15346 - particle2: 15347 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 15347 - particle2: 15348 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 15348 - particle2: 15349 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 15349 - particle2: 15350 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 15350 - particle2: 15351 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 15351 - particle2: 15352 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 15352 - particle2: 15353 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 15353 - particle2: 15354 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 15354 - particle2: 15355 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1479240941 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1479240942} - - component: {fileID: 1479240946} - - component: {fileID: 1479240945} - - component: {fileID: 1479240944} - - component: {fileID: 1479240943} - m_Layer: 0 - m_Name: Obi Rope (2) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1479240942 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1479240941} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.4, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1798495239} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1479240943 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1479240941} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1479240946} - m_Target: {fileID: 1479240942} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1479240944 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1479240941} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1479240945 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1479240941} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 138 ---- !u!114 &1479240946 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1479240941} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 603c0000613c0000623c0000633c0000643c0000653c0000663c0000673c0000683c0000693c00006a3c00006b3c00006c3c00006d3c00006e3c00006f3c0000703c0000713c0000723c0000733c0000743c0000753c0000763c0000773c0000783c0000793c00007a3c00007b3c00007c3c00007d3c00007e3c00007f3c0000803c0000813c0000823c0000833c0000843c0000853c0000863c0000873c0000883c0000893c00008a3c00008b3c00008c3c00008d3c00008e3c00008f3c0000903c0000913c0000923c0000933c0000943c0000953c0000963c0000973c0000983c0000993c00009a3c00009b3c00009c3c00009d3c00009e3c00009f3c0000a03c0000a13c0000a23c0000a33c0000a43c0000a53c0000a63c0000a73c0000a83c0000a93c0000aa3c0000ab3c0000ac3c0000ad3c0000ae3c0000af3c0000b03c0000b13c0000b23c0000b33c0000b43c0000b53c0000b63c0000b73c0000b83c0000b93c0000ba3c0000bb3c0000bc3c0000bd3c0000be3c0000bf3c0000c03c0000c13c0000c23c0000c33c0000c43c0000c53c0000c63c0000c73c0000c83c0000c93c0000ca3c0000cb3c0000cc3c0000cd3c0000ce3c0000cf3c0000 - m_AlignBytes: 16 - groupID: 139 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 15456 - particle2: 15457 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 15457 - particle2: 15458 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 15458 - particle2: 15459 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 15459 - particle2: 15460 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 15460 - particle2: 15461 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 15461 - particle2: 15462 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 15462 - particle2: 15463 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 15463 - particle2: 15464 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 15464 - particle2: 15465 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 15465 - particle2: 15466 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 15466 - particle2: 15467 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1501728738 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1501728739} - - component: {fileID: 1501728743} - - component: {fileID: 1501728742} - - component: {fileID: 1501728741} - - component: {fileID: 1501728740} - m_Layer: 0 - m_Name: Obi Rope (2) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1501728739 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1501728738} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.4, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1640435994} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1501728740 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1501728738} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1501728743} - m_Target: {fileID: 1501728739} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1501728741 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1501728738} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1501728742 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1501728738} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 139 ---- !u!114 &1501728743 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1501728738} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: d03c0000d13c0000d23c0000d33c0000d43c0000d53c0000d63c0000d73c0000d83c0000d93c0000da3c0000db3c0000dc3c0000dd3c0000de3c0000df3c0000e03c0000e13c0000e23c0000e33c0000e43c0000e53c0000e63c0000e73c0000e83c0000e93c0000ea3c0000eb3c0000ec3c0000ed3c0000ee3c0000ef3c0000f03c0000f13c0000f23c0000f33c0000f43c0000f53c0000f63c0000f73c0000f83c0000f93c0000fa3c0000fb3c0000fc3c0000fd3c0000fe3c0000ff3c0000003d0000013d0000023d0000033d0000043d0000053d0000063d0000073d0000083d0000093d00000a3d00000b3d00000c3d00000d3d00000e3d00000f3d0000103d0000113d0000123d0000133d0000143d0000153d0000163d0000173d0000183d0000193d00001a3d00001b3d00001c3d00001d3d00001e3d00001f3d0000203d0000213d0000223d0000233d0000243d0000253d0000263d0000273d0000283d0000293d00002a3d00002b3d00002c3d00002d3d00002e3d00002f3d0000303d0000313d0000323d0000333d0000343d0000353d0000363d0000373d0000383d0000393d00003a3d00003b3d00003c3d00003d3d00003e3d00003f3d0000 - m_AlignBytes: 16 - groupID: 140 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 15568 - particle2: 15569 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 15569 - particle2: 15570 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 15570 - particle2: 15571 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 15571 - particle2: 15572 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 15572 - particle2: 15573 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 15573 - particle2: 15574 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 15574 - particle2: 15575 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 15575 - particle2: 15576 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 15576 - particle2: 15577 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 15577 - particle2: 15578 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 15578 - particle2: 15579 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1503252369 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1503252370} - - component: {fileID: 1503252374} - - component: {fileID: 1503252373} - - component: {fileID: 1503252372} - - component: {fileID: 1503252371} - m_Layer: 0 - m_Name: Obi Rope (8) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1503252370 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1503252369} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.6, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 472161722} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1503252371 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1503252369} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1503252374} - m_Target: {fileID: 1503252370} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1503252372 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1503252369} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1503252373 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1503252369} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 140 ---- !u!114 &1503252374 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1503252369} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 403d0000413d0000423d0000433d0000443d0000453d0000463d0000473d0000483d0000493d00004a3d00004b3d00004c3d00004d3d00004e3d00004f3d0000503d0000513d0000523d0000533d0000543d0000553d0000563d0000573d0000583d0000593d00005a3d00005b3d00005c3d00005d3d00005e3d00005f3d0000603d0000613d0000623d0000633d0000643d0000653d0000663d0000673d0000683d0000693d00006a3d00006b3d00006c3d00006d3d00006e3d00006f3d0000703d0000713d0000723d0000733d0000743d0000753d0000763d0000773d0000783d0000793d00007a3d00007b3d00007c3d00007d3d00007e3d00007f3d0000803d0000813d0000823d0000833d0000843d0000853d0000863d0000873d0000883d0000893d00008a3d00008b3d00008c3d00008d3d00008e3d00008f3d0000903d0000913d0000923d0000933d0000943d0000953d0000963d0000973d0000983d0000993d00009a3d00009b3d00009c3d00009d3d00009e3d00009f3d0000a03d0000a13d0000a23d0000a33d0000a43d0000a53d0000a63d0000a73d0000a83d0000a93d0000aa3d0000ab3d0000ac3d0000ad3d0000ae3d0000af3d0000 - m_AlignBytes: 16 - groupID: 141 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 15680 - particle2: 15681 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 15681 - particle2: 15682 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 15682 - particle2: 15683 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 15683 - particle2: 15684 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 15684 - particle2: 15685 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 15685 - particle2: 15686 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 15686 - particle2: 15687 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 15687 - particle2: 15688 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 15688 - particle2: 15689 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 15689 - particle2: 15690 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 15690 - particle2: 15691 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1517801621 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1517801622} - - component: {fileID: 1517801626} - - component: {fileID: 1517801625} - - component: {fileID: 1517801624} - - component: {fileID: 1517801623} - m_Layer: 0 - m_Name: Obi Rope (7) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1517801622 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1517801621} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.4, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 779073863} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1517801623 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1517801621} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1517801626} - m_Target: {fileID: 1517801622} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1517801624 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1517801621} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1517801625 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1517801621} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 141 ---- !u!114 &1517801626 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1517801621} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: b03d0000b13d0000b23d0000b33d0000b43d0000b53d0000b63d0000b73d0000b83d0000b93d0000ba3d0000bb3d0000bc3d0000bd3d0000be3d0000bf3d0000c03d0000c13d0000c23d0000c33d0000c43d0000c53d0000c63d0000c73d0000c83d0000c93d0000ca3d0000cb3d0000cc3d0000cd3d0000ce3d0000cf3d0000d03d0000d13d0000d23d0000d33d0000d43d0000d53d0000d63d0000d73d0000d83d0000d93d0000da3d0000db3d0000dc3d0000dd3d0000de3d0000df3d0000e03d0000e13d0000e23d0000e33d0000e43d0000e53d0000e63d0000e73d0000e83d0000e93d0000ea3d0000eb3d0000ec3d0000ed3d0000ee3d0000ef3d0000f03d0000f13d0000f23d0000f33d0000f43d0000f53d0000f63d0000f73d0000f83d0000f93d0000fa3d0000fb3d0000fc3d0000fd3d0000fe3d0000ff3d0000003e0000013e0000023e0000033e0000043e0000053e0000063e0000073e0000083e0000093e00000a3e00000b3e00000c3e00000d3e00000e3e00000f3e0000103e0000113e0000123e0000133e0000143e0000153e0000163e0000173e0000183e0000193e00001a3e00001b3e00001c3e00001d3e00001e3e00001f3e0000 - m_AlignBytes: 16 - groupID: 142 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 15792 - particle2: 15793 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 15793 - particle2: 15794 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 15794 - particle2: 15795 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 15795 - particle2: 15796 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 15796 - particle2: 15797 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 15797 - particle2: 15798 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 15798 - particle2: 15799 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 15799 - particle2: 15800 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 15800 - particle2: 15801 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 15801 - particle2: 15802 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 15802 - particle2: 15803 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1521845707 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1521845708} - - component: {fileID: 1521845712} - - component: {fileID: 1521845711} - - component: {fileID: 1521845710} - - component: {fileID: 1521845709} - m_Layer: 0 - m_Name: Obi Rope (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1521845708 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1521845707} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.2, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 893001395} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1521845709 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1521845707} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1521845712} - m_Target: {fileID: 1521845708} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1521845710 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1521845707} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1521845711 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1521845707} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 142 ---- !u!114 &1521845712 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1521845707} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 203e0000213e0000223e0000233e0000243e0000253e0000263e0000273e0000283e0000293e00002a3e00002b3e00002c3e00002d3e00002e3e00002f3e0000303e0000313e0000323e0000333e0000343e0000353e0000363e0000373e0000383e0000393e00003a3e00003b3e00003c3e00003d3e00003e3e00003f3e0000403e0000413e0000423e0000433e0000443e0000453e0000463e0000473e0000483e0000493e00004a3e00004b3e00004c3e00004d3e00004e3e00004f3e0000503e0000513e0000523e0000533e0000543e0000553e0000563e0000573e0000583e0000593e00005a3e00005b3e00005c3e00005d3e00005e3e00005f3e0000603e0000613e0000623e0000633e0000643e0000653e0000663e0000673e0000683e0000693e00006a3e00006b3e00006c3e00006d3e00006e3e00006f3e0000703e0000713e0000723e0000733e0000743e0000753e0000763e0000773e0000783e0000793e00007a3e00007b3e00007c3e00007d3e00007e3e00007f3e0000803e0000813e0000823e0000833e0000843e0000853e0000863e0000873e0000883e0000893e00008a3e00008b3e00008c3e00008d3e00008e3e00008f3e0000 - m_AlignBytes: 16 - groupID: 143 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 15904 - particle2: 15905 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 15905 - particle2: 15906 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 15906 - particle2: 15907 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 15907 - particle2: 15908 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 15908 - particle2: 15909 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 15909 - particle2: 15910 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 15910 - particle2: 15911 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 15911 - particle2: 15912 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 15912 - particle2: 15913 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 15913 - particle2: 15914 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 15914 - particle2: 15915 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1523215162 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1523215163} - - component: {fileID: 1523215167} - - component: {fileID: 1523215166} - - component: {fileID: 1523215165} - - component: {fileID: 1523215164} - m_Layer: 0 - m_Name: Obi Rope (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1523215163 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1523215162} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.2, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 426164209} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1523215164 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1523215162} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1523215167} - m_Target: {fileID: 1523215163} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1523215165 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1523215162} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1523215166 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1523215162} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 143 ---- !u!114 &1523215167 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1523215162} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 903e0000913e0000923e0000933e0000943e0000953e0000963e0000973e0000983e0000993e00009a3e00009b3e00009c3e00009d3e00009e3e00009f3e0000a03e0000a13e0000a23e0000a33e0000a43e0000a53e0000a63e0000a73e0000a83e0000a93e0000aa3e0000ab3e0000ac3e0000ad3e0000ae3e0000af3e0000b03e0000b13e0000b23e0000b33e0000b43e0000b53e0000b63e0000b73e0000b83e0000b93e0000ba3e0000bb3e0000bc3e0000bd3e0000be3e0000bf3e0000c03e0000c13e0000c23e0000c33e0000c43e0000c53e0000c63e0000c73e0000c83e0000c93e0000ca3e0000cb3e0000cc3e0000cd3e0000ce3e0000cf3e0000d03e0000d13e0000d23e0000d33e0000d43e0000d53e0000d63e0000d73e0000d83e0000d93e0000da3e0000db3e0000dc3e0000dd3e0000de3e0000df3e0000e03e0000e13e0000e23e0000e33e0000e43e0000e53e0000e63e0000e73e0000e83e0000e93e0000ea3e0000eb3e0000ec3e0000ed3e0000ee3e0000ef3e0000f03e0000f13e0000f23e0000f33e0000f43e0000f53e0000f63e0000f73e0000f83e0000f93e0000fa3e0000fb3e0000fc3e0000fd3e0000fe3e0000ff3e0000 - m_AlignBytes: 16 - groupID: 144 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 16016 - particle2: 16017 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 16017 - particle2: 16018 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 16018 - particle2: 16019 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 16019 - particle2: 16020 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 16020 - particle2: 16021 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 16021 - particle2: 16022 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 16022 - particle2: 16023 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 16023 - particle2: 16024 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 16024 - particle2: 16025 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 16025 - particle2: 16026 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 16026 - particle2: 16027 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1537736704 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1537736705} - - component: {fileID: 1537736709} - - component: {fileID: 1537736708} - - component: {fileID: 1537736707} - - component: {fileID: 1537736706} - m_Layer: 0 - m_Name: Obi Rope (7) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1537736705 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1537736704} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.4, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 472161722} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1537736706 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1537736704} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1537736709} - m_Target: {fileID: 1537736705} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1537736707 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1537736704} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1537736708 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1537736704} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 144 ---- !u!114 &1537736709 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1537736704} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 003f0000013f0000023f0000033f0000043f0000053f0000063f0000073f0000083f0000093f00000a3f00000b3f00000c3f00000d3f00000e3f00000f3f0000103f0000113f0000123f0000133f0000143f0000153f0000163f0000173f0000183f0000193f00001a3f00001b3f00001c3f00001d3f00001e3f00001f3f0000203f0000213f0000223f0000233f0000243f0000253f0000263f0000273f0000283f0000293f00002a3f00002b3f00002c3f00002d3f00002e3f00002f3f0000303f0000313f0000323f0000333f0000343f0000353f0000363f0000373f0000383f0000393f00003a3f00003b3f00003c3f00003d3f00003e3f00003f3f0000403f0000413f0000423f0000433f0000443f0000453f0000463f0000473f0000483f0000493f00004a3f00004b3f00004c3f00004d3f00004e3f00004f3f0000503f0000513f0000523f0000533f0000543f0000553f0000563f0000573f0000583f0000593f00005a3f00005b3f00005c3f00005d3f00005e3f00005f3f0000603f0000613f0000623f0000633f0000643f0000653f0000663f0000673f0000683f0000693f00006a3f00006b3f00006c3f00006d3f00006e3f00006f3f0000 - m_AlignBytes: 16 - groupID: 145 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 16128 - particle2: 16129 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 16129 - particle2: 16130 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 16130 - particle2: 16131 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 16131 - particle2: 16132 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 16132 - particle2: 16133 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 16133 - particle2: 16134 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 16134 - particle2: 16135 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 16135 - particle2: 16136 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 16136 - particle2: 16137 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 16137 - particle2: 16138 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 16138 - particle2: 16139 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1551337443 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1551337444} - - component: {fileID: 1551337448} - - component: {fileID: 1551337447} - - component: {fileID: 1551337446} - - component: {fileID: 1551337445} - m_Layer: 0 - m_Name: Obi Rope (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1551337444 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1551337443} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.2, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1240601735} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1551337445 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1551337443} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1551337448} - m_Target: {fileID: 1551337444} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1551337446 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1551337443} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1551337447 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1551337443} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 145 ---- !u!114 &1551337448 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1551337443} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 703f0000713f0000723f0000733f0000743f0000753f0000763f0000773f0000783f0000793f00007a3f00007b3f00007c3f00007d3f00007e3f00007f3f0000803f0000813f0000823f0000833f0000843f0000853f0000863f0000873f0000883f0000893f00008a3f00008b3f00008c3f00008d3f00008e3f00008f3f0000903f0000913f0000923f0000933f0000943f0000953f0000963f0000973f0000983f0000993f00009a3f00009b3f00009c3f00009d3f00009e3f00009f3f0000a03f0000a13f0000a23f0000a33f0000a43f0000a53f0000a63f0000a73f0000a83f0000a93f0000aa3f0000ab3f0000ac3f0000ad3f0000ae3f0000af3f0000b03f0000b13f0000b23f0000b33f0000b43f0000b53f0000b63f0000b73f0000b83f0000b93f0000ba3f0000bb3f0000bc3f0000bd3f0000be3f0000bf3f0000c03f0000c13f0000c23f0000c33f0000c43f0000c53f0000c63f0000c73f0000c83f0000c93f0000ca3f0000cb3f0000cc3f0000cd3f0000ce3f0000cf3f0000d03f0000d13f0000d23f0000d33f0000d43f0000d53f0000d63f0000d73f0000d83f0000d93f0000da3f0000db3f0000dc3f0000dd3f0000de3f0000df3f0000 - m_AlignBytes: 16 - groupID: 146 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 16240 - particle2: 16241 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 16241 - particle2: 16242 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 16242 - particle2: 16243 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 16243 - particle2: 16244 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 16244 - particle2: 16245 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 16245 - particle2: 16246 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 16246 - particle2: 16247 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 16247 - particle2: 16248 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 16248 - particle2: 16249 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 16249 - particle2: 16250 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 16250 - particle2: 16251 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1561375947 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1561375948} - - component: {fileID: 1561375949} - m_Layer: 0 - m_Name: FanRoot - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1561375948 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1561375947} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -0.25, y: 0, z: 2} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 792243030} - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!95 &1561375949 -Animator: - serializedVersion: 7 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1561375947} - m_Enabled: 1 - m_Avatar: {fileID: 0} - m_Controller: {fileID: 9100000, guid: 07415f30e4149416b920c1da07bdc3b7, type: 2} - m_CullingMode: 0 - m_UpdateMode: 0 - m_ApplyRootMotion: 0 - m_LinearVelocityBlending: 0 - m_StabilizeFeet: 0 - m_AnimatePhysics: 0 - m_WarningMessage: - m_HasTransformHierarchy: 1 - m_AllowConstantClipSamplingOptimization: 1 - m_KeepAnimatorStateOnDisable: 0 - m_WriteDefaultValuesOnDisable: 0 ---- !u!1 &1569249537 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1569249538} - - component: {fileID: 1569249542} - - component: {fileID: 1569249541} - - component: {fileID: 1569249540} - - component: {fileID: 1569249539} - m_Layer: 0 - m_Name: Obi Rope (2) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1569249538 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1569249537} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.4, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 249029318} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1569249539 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1569249537} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1569249542} - m_Target: {fileID: 1569249538} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1569249540 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1569249537} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1569249541 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1569249537} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 146 ---- !u!114 &1569249542 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1569249537} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: e03f0000e13f0000e23f0000e33f0000e43f0000e53f0000e63f0000e73f0000e83f0000e93f0000ea3f0000eb3f0000ec3f0000ed3f0000ee3f0000ef3f0000f03f0000f13f0000f23f0000f33f0000f43f0000f53f0000f63f0000f73f0000f83f0000f93f0000fa3f0000fb3f0000fc3f0000fd3f0000fe3f0000ff3f0000004000000140000002400000034000000440000005400000064000000740000008400000094000000a4000000b4000000c4000000d4000000e4000000f400000104000001140000012400000134000001440000015400000164000001740000018400000194000001a4000001b4000001c4000001d4000001e4000001f400000204000002140000022400000234000002440000025400000264000002740000028400000294000002a4000002b4000002c4000002d4000002e4000002f400000304000003140000032400000334000003440000035400000364000003740000038400000394000003a4000003b4000003c4000003d4000003e4000003f400000404000004140000042400000434000004440000045400000464000004740000048400000494000004a4000004b4000004c4000004d4000004e4000004f400000 - m_AlignBytes: 16 - groupID: 147 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 16352 - particle2: 16353 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 16353 - particle2: 16354 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 16354 - particle2: 16355 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 16355 - particle2: 16356 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 16356 - particle2: 16357 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 16357 - particle2: 16358 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 16358 - particle2: 16359 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 16359 - particle2: 16360 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 16360 - particle2: 16361 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 16361 - particle2: 16362 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 16362 - particle2: 16363 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1572775138 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1572775139} - - component: {fileID: 1572775143} - - component: {fileID: 1572775142} - - component: {fileID: 1572775141} - - component: {fileID: 1572775140} - m_Layer: 0 - m_Name: Obi Rope (2) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1572775139 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1572775138} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.4, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1628171963} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1572775140 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1572775138} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1572775143} - m_Target: {fileID: 1572775139} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1572775141 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1572775138} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1572775142 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1572775138} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 147 ---- !u!114 &1572775143 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1572775138} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 504000005140000052400000534000005440000055400000564000005740000058400000594000005a4000005b4000005c4000005d4000005e4000005f400000604000006140000062400000634000006440000065400000664000006740000068400000694000006a4000006b4000006c4000006d4000006e4000006f400000704000007140000072400000734000007440000075400000764000007740000078400000794000007a4000007b4000007c4000007d4000007e4000007f400000804000008140000082400000834000008440000085400000864000008740000088400000894000008a4000008b4000008c4000008d4000008e4000008f400000904000009140000092400000934000009440000095400000964000009740000098400000994000009a4000009b4000009c4000009d4000009e4000009f400000a0400000a1400000a2400000a3400000a4400000a5400000a6400000a7400000a8400000a9400000aa400000ab400000ac400000ad400000ae400000af400000b0400000b1400000b2400000b3400000b4400000b5400000b6400000b7400000b8400000b9400000ba400000bb400000bc400000bd400000be400000bf400000 - m_AlignBytes: 16 - groupID: 148 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 16464 - particle2: 16465 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 16465 - particle2: 16466 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 16466 - particle2: 16467 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 16467 - particle2: 16468 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 16468 - particle2: 16469 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 16469 - particle2: 16470 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 16470 - particle2: 16471 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 16471 - particle2: 16472 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 16472 - particle2: 16473 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 16473 - particle2: 16474 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 16474 - particle2: 16475 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1588242873 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1588242874} - - component: {fileID: 1588242878} - - component: {fileID: 1588242877} - - component: {fileID: 1588242876} - - component: {fileID: 1588242875} - m_Layer: 0 - m_Name: Obi Rope (4) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1588242874 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1588242873} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.8, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 648480057} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1588242875 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1588242873} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1588242878} - m_Target: {fileID: 1588242874} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1588242876 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1588242873} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1588242877 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1588242873} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 148 ---- !u!114 &1588242878 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1588242873} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: c0400000c1400000c2400000c3400000c4400000c5400000c6400000c7400000c8400000c9400000ca400000cb400000cc400000cd400000ce400000cf400000d0400000d1400000d2400000d3400000d4400000d5400000d6400000d7400000d8400000d9400000da400000db400000dc400000dd400000de400000df400000e0400000e1400000e2400000e3400000e4400000e5400000e6400000e7400000e8400000e9400000ea400000eb400000ec400000ed400000ee400000ef400000f0400000f1400000f2400000f3400000f4400000f5400000f6400000f7400000f8400000f9400000fa400000fb400000fc400000fd400000fe400000ff400000004100000141000002410000034100000441000005410000064100000741000008410000094100000a4100000b4100000c4100000d4100000e4100000f410000104100001141000012410000134100001441000015410000164100001741000018410000194100001a4100001b4100001c4100001d4100001e4100001f410000204100002141000022410000234100002441000025410000264100002741000028410000294100002a4100002b4100002c4100002d4100002e4100002f410000 - m_AlignBytes: 16 - groupID: 149 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 16576 - particle2: 16577 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 16577 - particle2: 16578 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 16578 - particle2: 16579 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 16579 - particle2: 16580 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 16580 - particle2: 16581 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 16581 - particle2: 16582 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 16582 - particle2: 16583 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 16583 - particle2: 16584 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 16584 - particle2: 16585 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 16585 - particle2: 16586 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 16586 - particle2: 16587 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1593990335 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1593990336} - - component: {fileID: 1593990340} - - component: {fileID: 1593990339} - - component: {fileID: 1593990338} - - component: {fileID: 1593990337} - m_Layer: 0 - m_Name: Obi Rope (2) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1593990336 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1593990335} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.4, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 648480057} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1593990337 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1593990335} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1593990340} - m_Target: {fileID: 1593990336} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1593990338 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1593990335} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1593990339 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1593990335} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 149 ---- !u!114 &1593990340 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1593990335} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 304100003141000032410000334100003441000035410000364100003741000038410000394100003a4100003b4100003c4100003d4100003e4100003f410000404100004141000042410000434100004441000045410000464100004741000048410000494100004a4100004b4100004c4100004d4100004e4100004f410000504100005141000052410000534100005441000055410000564100005741000058410000594100005a4100005b4100005c4100005d4100005e4100005f410000604100006141000062410000634100006441000065410000664100006741000068410000694100006a4100006b4100006c4100006d4100006e4100006f410000704100007141000072410000734100007441000075410000764100007741000078410000794100007a4100007b4100007c4100007d4100007e4100007f410000804100008141000082410000834100008441000085410000864100008741000088410000894100008a4100008b4100008c4100008d4100008e4100008f410000904100009141000092410000934100009441000095410000964100009741000098410000994100009a4100009b4100009c4100009d4100009e4100009f410000 - m_AlignBytes: 16 - groupID: 150 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 16688 - particle2: 16689 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 16689 - particle2: 16690 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 16690 - particle2: 16691 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 16691 - particle2: 16692 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 16692 - particle2: 16693 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 16693 - particle2: 16694 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 16694 - particle2: 16695 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 16695 - particle2: 16696 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 16696 - particle2: 16697 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 16697 - particle2: 16698 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 16698 - particle2: 16699 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1595267026 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1595267027} - - component: {fileID: 1595267031} - - component: {fileID: 1595267030} - - component: {fileID: 1595267029} - - component: {fileID: 1595267028} - m_Layer: 0 - m_Name: Obi Rope (8) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1595267027 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1595267026} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.6, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1240601735} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1595267028 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1595267026} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1595267031} - m_Target: {fileID: 1595267027} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1595267029 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1595267026} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1595267030 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1595267026} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 150 ---- !u!114 &1595267031 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1595267026} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: a0410000a1410000a2410000a3410000a4410000a5410000a6410000a7410000a8410000a9410000aa410000ab410000ac410000ad410000ae410000af410000b0410000b1410000b2410000b3410000b4410000b5410000b6410000b7410000b8410000b9410000ba410000bb410000bc410000bd410000be410000bf410000c0410000c1410000c2410000c3410000c4410000c5410000c6410000c7410000c8410000c9410000ca410000cb410000cc410000cd410000ce410000cf410000d0410000d1410000d2410000d3410000d4410000d5410000d6410000d7410000d8410000d9410000da410000db410000dc410000dd410000de410000df410000e0410000e1410000e2410000e3410000e4410000e5410000e6410000e7410000e8410000e9410000ea410000eb410000ec410000ed410000ee410000ef410000f0410000f1410000f2410000f3410000f4410000f5410000f6410000f7410000f8410000f9410000fa410000fb410000fc410000fd410000fe410000ff410000004200000142000002420000034200000442000005420000064200000742000008420000094200000a4200000b4200000c4200000d4200000e4200000f420000 - m_AlignBytes: 16 - groupID: 151 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 16800 - particle2: 16801 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 16801 - particle2: 16802 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 16802 - particle2: 16803 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 16803 - particle2: 16804 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 16804 - particle2: 16805 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 16805 - particle2: 16806 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 16806 - particle2: 16807 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 16807 - particle2: 16808 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 16808 - particle2: 16809 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 16809 - particle2: 16810 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 16810 - particle2: 16811 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1600426036 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1600426037} - - component: {fileID: 1600426041} - - component: {fileID: 1600426040} - - component: {fileID: 1600426039} - - component: {fileID: 1600426038} - m_Layer: 0 - m_Name: Obi Rope - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1600426037 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1600426036} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1977632070} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1600426038 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1600426036} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1600426041} - m_Target: {fileID: 1600426037} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1600426039 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1600426036} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1600426040 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1600426036} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 151 ---- !u!114 &1600426041 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1600426036} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 104200001142000012420000134200001442000015420000164200001742000018420000194200001a4200001b4200001c4200001d4200001e4200001f420000204200002142000022420000234200002442000025420000264200002742000028420000294200002a4200002b4200002c4200002d4200002e4200002f420000304200003142000032420000334200003442000035420000364200003742000038420000394200003a4200003b4200003c4200003d4200003e4200003f420000404200004142000042420000434200004442000045420000464200004742000048420000494200004a4200004b4200004c4200004d4200004e4200004f420000504200005142000052420000534200005442000055420000564200005742000058420000594200005a4200005b4200005c4200005d4200005e4200005f420000604200006142000062420000634200006442000065420000664200006742000068420000694200006a4200006b4200006c4200006d4200006e4200006f420000704200007142000072420000734200007442000075420000764200007742000078420000794200007a4200007b4200007c4200007d4200007e4200007f420000 - m_AlignBytes: 16 - groupID: 152 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 16912 - particle2: 16913 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 16913 - particle2: 16914 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 16914 - particle2: 16915 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 16915 - particle2: 16916 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 16916 - particle2: 16917 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 16917 - particle2: 16918 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 16918 - particle2: 16919 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 16919 - particle2: 16920 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 16920 - particle2: 16921 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 16921 - particle2: 16922 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 16922 - particle2: 16923 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1605421488 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1605421489} - - component: {fileID: 1605421493} - - component: {fileID: 1605421492} - - component: {fileID: 1605421491} - - component: {fileID: 1605421490} - m_Layer: 0 - m_Name: Obi Rope (2) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1605421489 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1605421488} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.4, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 893001395} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1605421490 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1605421488} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1605421493} - m_Target: {fileID: 1605421489} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1605421491 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1605421488} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1605421492 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1605421488} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 152 ---- !u!114 &1605421493 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1605421488} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 804200008142000082420000834200008442000085420000864200008742000088420000894200008a4200008b4200008c4200008d4200008e4200008f420000904200009142000092420000934200009442000095420000964200009742000098420000994200009a4200009b4200009c4200009d4200009e4200009f420000a0420000a1420000a2420000a3420000a4420000a5420000a6420000a7420000a8420000a9420000aa420000ab420000ac420000ad420000ae420000af420000b0420000b1420000b2420000b3420000b4420000b5420000b6420000b7420000b8420000b9420000ba420000bb420000bc420000bd420000be420000bf420000c0420000c1420000c2420000c3420000c4420000c5420000c6420000c7420000c8420000c9420000ca420000cb420000cc420000cd420000ce420000cf420000d0420000d1420000d2420000d3420000d4420000d5420000d6420000d7420000d8420000d9420000da420000db420000dc420000dd420000de420000df420000e0420000e1420000e2420000e3420000e4420000e5420000e6420000e7420000e8420000e9420000ea420000eb420000ec420000ed420000ee420000ef420000 - m_AlignBytes: 16 - groupID: 153 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 17024 - particle2: 17025 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 17025 - particle2: 17026 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 17026 - particle2: 17027 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 17027 - particle2: 17028 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 17028 - particle2: 17029 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 17029 - particle2: 17030 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 17030 - particle2: 17031 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 17031 - particle2: 17032 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 17032 - particle2: 17033 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 17033 - particle2: 17034 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 17034 - particle2: 17035 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1613103432 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1613103433} - - component: {fileID: 1613103437} - - component: {fileID: 1613103436} - - component: {fileID: 1613103435} - - component: {fileID: 1613103434} - m_Layer: 0 - m_Name: Obi Rope (2) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1613103433 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1613103432} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.4, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 940408952} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1613103434 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1613103432} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1613103437} - m_Target: {fileID: 1613103433} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1613103435 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1613103432} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1613103436 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1613103432} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 153 ---- !u!114 &1613103437 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1613103432} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: f0420000f1420000f2420000f3420000f4420000f5420000f6420000f7420000f8420000f9420000fa420000fb420000fc420000fd420000fe420000ff420000004300000143000002430000034300000443000005430000064300000743000008430000094300000a4300000b4300000c4300000d4300000e4300000f430000104300001143000012430000134300001443000015430000164300001743000018430000194300001a4300001b4300001c4300001d4300001e4300001f430000204300002143000022430000234300002443000025430000264300002743000028430000294300002a4300002b4300002c4300002d4300002e4300002f430000304300003143000032430000334300003443000035430000364300003743000038430000394300003a4300003b4300003c4300003d4300003e4300003f430000404300004143000042430000434300004443000045430000464300004743000048430000494300004a4300004b4300004c4300004d4300004e4300004f430000504300005143000052430000534300005443000055430000564300005743000058430000594300005a4300005b4300005c4300005d4300005e4300005f430000 - m_AlignBytes: 16 - groupID: 154 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 17136 - particle2: 17137 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 17137 - particle2: 17138 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 17138 - particle2: 17139 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 17139 - particle2: 17140 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 17140 - particle2: 17141 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 17141 - particle2: 17142 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 17142 - particle2: 17143 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 17143 - particle2: 17144 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 17144 - particle2: 17145 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 17145 - particle2: 17146 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 17146 - particle2: 17147 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1621912097 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1621912098} - - component: {fileID: 1621912102} - - component: {fileID: 1621912101} - - component: {fileID: 1621912100} - - component: {fileID: 1621912099} - m_Layer: 0 - m_Name: Obi Rope (4) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1621912098 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1621912097} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.8, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1062536481} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1621912099 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1621912097} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1621912102} - m_Target: {fileID: 1621912098} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1621912100 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1621912097} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1621912101 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1621912097} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 154 ---- !u!114 &1621912102 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1621912097} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 604300006143000062430000634300006443000065430000664300006743000068430000694300006a4300006b4300006c4300006d4300006e4300006f430000704300007143000072430000734300007443000075430000764300007743000078430000794300007a4300007b4300007c4300007d4300007e4300007f430000804300008143000082430000834300008443000085430000864300008743000088430000894300008a4300008b4300008c4300008d4300008e4300008f430000904300009143000092430000934300009443000095430000964300009743000098430000994300009a4300009b4300009c4300009d4300009e4300009f430000a0430000a1430000a2430000a3430000a4430000a5430000a6430000a7430000a8430000a9430000aa430000ab430000ac430000ad430000ae430000af430000b0430000b1430000b2430000b3430000b4430000b5430000b6430000b7430000b8430000b9430000ba430000bb430000bc430000bd430000be430000bf430000c0430000c1430000c2430000c3430000c4430000c5430000c6430000c7430000c8430000c9430000ca430000cb430000cc430000cd430000ce430000cf430000 - m_AlignBytes: 16 - groupID: 155 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 17248 - particle2: 17249 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 17249 - particle2: 17250 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 17250 - particle2: 17251 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 17251 - particle2: 17252 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 17252 - particle2: 17253 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 17253 - particle2: 17254 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 17254 - particle2: 17255 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 17255 - particle2: 17256 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 17256 - particle2: 17257 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 17257 - particle2: 17258 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 17258 - particle2: 17259 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1628171962 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1628171963} - m_Layer: 0 - m_Name: Row (3) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1628171963 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1628171962} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -0.6} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 449353293} - - {fileID: 1946747526} - - {fileID: 1572775139} - - {fileID: 1646474109} - - {fileID: 1824546302} - - {fileID: 549530596} - - {fileID: 1454186980} - - {fileID: 1734157832} - - {fileID: 1332770746} - - {fileID: 353133264} - m_Father: {fileID: 1027659676} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1632801443 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1632801444} - - component: {fileID: 1632801448} - - component: {fileID: 1632801447} - - component: {fileID: 1632801446} - - component: {fileID: 1632801445} - m_Layer: 0 - m_Name: Obi Rope (6) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1632801444 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1632801443} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.2, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1798495239} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1632801445 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1632801443} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1632801448} - m_Target: {fileID: 1632801444} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1632801446 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1632801443} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1632801447 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1632801443} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 155 ---- !u!114 &1632801448 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1632801443} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: d0430000d1430000d2430000d3430000d4430000d5430000d6430000d7430000d8430000d9430000da430000db430000dc430000dd430000de430000df430000e0430000e1430000e2430000e3430000e4430000e5430000e6430000e7430000e8430000e9430000ea430000eb430000ec430000ed430000ee430000ef430000f0430000f1430000f2430000f3430000f4430000f5430000f6430000f7430000f8430000f9430000fa430000fb430000fc430000fd430000fe430000ff430000004400000144000002440000034400000444000005440000064400000744000008440000094400000a4400000b4400000c4400000d4400000e4400000f440000104400001144000012440000134400001444000015440000164400001744000018440000194400001a4400001b4400001c4400001d4400001e4400001f440000204400002144000022440000234400002444000025440000264400002744000028440000294400002a4400002b4400002c4400002d4400002e4400002f440000304400003144000032440000334400003444000035440000364400003744000038440000394400003a4400003b4400003c4400003d4400003e4400003f440000 - m_AlignBytes: 16 - groupID: 156 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 17360 - particle2: 17361 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 17361 - particle2: 17362 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 17362 - particle2: 17363 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 17363 - particle2: 17364 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 17364 - particle2: 17365 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 17365 - particle2: 17366 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 17366 - particle2: 17367 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 17367 - particle2: 17368 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 17368 - particle2: 17369 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 17369 - particle2: 17370 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 17370 - particle2: 17371 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1634777943 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1634777944} - - component: {fileID: 1634777948} - - component: {fileID: 1634777947} - - component: {fileID: 1634777946} - - component: {fileID: 1634777945} - m_Layer: 0 - m_Name: Obi Rope (4) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1634777944 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1634777943} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.8, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1977632070} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1634777945 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1634777943} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1634777948} - m_Target: {fileID: 1634777944} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1634777946 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1634777943} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1634777947 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1634777943} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 156 ---- !u!114 &1634777948 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1634777943} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 404400004144000042440000434400004444000045440000464400004744000048440000494400004a4400004b4400004c4400004d4400004e4400004f440000504400005144000052440000534400005444000055440000564400005744000058440000594400005a4400005b4400005c4400005d4400005e4400005f440000604400006144000062440000634400006444000065440000664400006744000068440000694400006a4400006b4400006c4400006d4400006e4400006f440000704400007144000072440000734400007444000075440000764400007744000078440000794400007a4400007b4400007c4400007d4400007e4400007f440000804400008144000082440000834400008444000085440000864400008744000088440000894400008a4400008b4400008c4400008d4400008e4400008f440000904400009144000092440000934400009444000095440000964400009744000098440000994400009a4400009b4400009c4400009d4400009e4400009f440000a0440000a1440000a2440000a3440000a4440000a5440000a6440000a7440000a8440000a9440000aa440000ab440000ac440000ad440000ae440000af440000 - m_AlignBytes: 16 - groupID: 157 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 17472 - particle2: 17473 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 17473 - particle2: 17474 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 17474 - particle2: 17475 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 17475 - particle2: 17476 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 17476 - particle2: 17477 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 17477 - particle2: 17478 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 17478 - particle2: 17479 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 17479 - particle2: 17480 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 17480 - particle2: 17481 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 17481 - particle2: 17482 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 17482 - particle2: 17483 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1635734354 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1635734355} - - component: {fileID: 1635734359} - - component: {fileID: 1635734358} - - component: {fileID: 1635734357} - - component: {fileID: 1635734356} - m_Layer: 0 - m_Name: Obi Rope (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1635734355 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1635734354} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.2, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1464717035} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1635734356 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1635734354} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1635734359} - m_Target: {fileID: 1635734355} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1635734357 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1635734354} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1635734358 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1635734354} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 157 ---- !u!114 &1635734359 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1635734354} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: b0440000b1440000b2440000b3440000b4440000b5440000b6440000b7440000b8440000b9440000ba440000bb440000bc440000bd440000be440000bf440000c0440000c1440000c2440000c3440000c4440000c5440000c6440000c7440000c8440000c9440000ca440000cb440000cc440000cd440000ce440000cf440000d0440000d1440000d2440000d3440000d4440000d5440000d6440000d7440000d8440000d9440000da440000db440000dc440000dd440000de440000df440000e0440000e1440000e2440000e3440000e4440000e5440000e6440000e7440000e8440000e9440000ea440000eb440000ec440000ed440000ee440000ef440000f0440000f1440000f2440000f3440000f4440000f5440000f6440000f7440000f8440000f9440000fa440000fb440000fc440000fd440000fe440000ff440000004500000145000002450000034500000445000005450000064500000745000008450000094500000a4500000b4500000c4500000d4500000e4500000f450000104500001145000012450000134500001445000015450000164500001745000018450000194500001a4500001b4500001c4500001d4500001e4500001f450000 - m_AlignBytes: 16 - groupID: 158 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 17584 - particle2: 17585 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 17585 - particle2: 17586 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 17586 - particle2: 17587 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 17587 - particle2: 17588 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 17588 - particle2: 17589 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 17589 - particle2: 17590 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 17590 - particle2: 17591 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 17591 - particle2: 17592 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 17592 - particle2: 17593 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 17593 - particle2: 17594 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 17594 - particle2: 17595 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1640435993 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1640435994} - m_Layer: 0 - m_Name: Row (7) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1640435994 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1640435993} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -1.4} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 938771666} - - {fileID: 1374969021} - - {fileID: 1501728739} - - {fileID: 1297311441} - - {fileID: 1853955320} - - {fileID: 1808557641} - - {fileID: 1923931438} - - {fileID: 386305778} - - {fileID: 452192106} - - {fileID: 1822342381} - m_Father: {fileID: 1027659676} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1646474108 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1646474109} - - component: {fileID: 1646474113} - - component: {fileID: 1646474112} - - component: {fileID: 1646474111} - - component: {fileID: 1646474110} - m_Layer: 0 - m_Name: Obi Rope (3) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1646474109 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1646474108} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.6, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1628171963} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1646474110 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1646474108} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1646474113} - m_Target: {fileID: 1646474109} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1646474111 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1646474108} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1646474112 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1646474108} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 158 ---- !u!114 &1646474113 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1646474108} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 204500002145000022450000234500002445000025450000264500002745000028450000294500002a4500002b4500002c4500002d4500002e4500002f450000304500003145000032450000334500003445000035450000364500003745000038450000394500003a4500003b4500003c4500003d4500003e4500003f450000404500004145000042450000434500004445000045450000464500004745000048450000494500004a4500004b4500004c4500004d4500004e4500004f450000504500005145000052450000534500005445000055450000564500005745000058450000594500005a4500005b4500005c4500005d4500005e4500005f450000604500006145000062450000634500006445000065450000664500006745000068450000694500006a4500006b4500006c4500006d4500006e4500006f450000704500007145000072450000734500007445000075450000764500007745000078450000794500007a4500007b4500007c4500007d4500007e4500007f450000804500008145000082450000834500008445000085450000864500008745000088450000894500008a4500008b4500008c4500008d4500008e4500008f450000 - m_AlignBytes: 16 - groupID: 159 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 17696 - particle2: 17697 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 17697 - particle2: 17698 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 17698 - particle2: 17699 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 17699 - particle2: 17700 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 17700 - particle2: 17701 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 17701 - particle2: 17702 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 17702 - particle2: 17703 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 17703 - particle2: 17704 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 17704 - particle2: 17705 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 17705 - particle2: 17706 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 17706 - particle2: 17707 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1649225305 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1649225306} - - component: {fileID: 1649225310} - - component: {fileID: 1649225309} - - component: {fileID: 1649225308} - - component: {fileID: 1649225307} - m_Layer: 0 - m_Name: Obi Rope (8) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1649225306 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1649225305} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.6, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 940408952} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1649225307 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1649225305} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1649225310} - m_Target: {fileID: 1649225306} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1649225308 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1649225305} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1649225309 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1649225305} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 159 ---- !u!114 &1649225310 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1649225305} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 904500009145000092450000934500009445000095450000964500009745000098450000994500009a4500009b4500009c4500009d4500009e4500009f450000a0450000a1450000a2450000a3450000a4450000a5450000a6450000a7450000a8450000a9450000aa450000ab450000ac450000ad450000ae450000af450000b0450000b1450000b2450000b3450000b4450000b5450000b6450000b7450000b8450000b9450000ba450000bb450000bc450000bd450000be450000bf450000c0450000c1450000c2450000c3450000c4450000c5450000c6450000c7450000c8450000c9450000ca450000cb450000cc450000cd450000ce450000cf450000d0450000d1450000d2450000d3450000d4450000d5450000d6450000d7450000d8450000d9450000da450000db450000dc450000dd450000de450000df450000e0450000e1450000e2450000e3450000e4450000e5450000e6450000e7450000e8450000e9450000ea450000eb450000ec450000ed450000ee450000ef450000f0450000f1450000f2450000f3450000f4450000f5450000f6450000f7450000f8450000f9450000fa450000fb450000fc450000fd450000fe450000ff450000 - m_AlignBytes: 16 - groupID: 160 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 17808 - particle2: 17809 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 17809 - particle2: 17810 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 17810 - particle2: 17811 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 17811 - particle2: 17812 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 17812 - particle2: 17813 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 17813 - particle2: 17814 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 17814 - particle2: 17815 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 17815 - particle2: 17816 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 17816 - particle2: 17817 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 17817 - particle2: 17818 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 17818 - particle2: 17819 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1707229807 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1707229808} - - component: {fileID: 1707229812} - - component: {fileID: 1707229811} - - component: {fileID: 1707229810} - - component: {fileID: 1707229809} - m_Layer: 0 - m_Name: Obi Rope (4) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1707229808 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1707229807} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.8, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 54623967} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1707229809 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1707229807} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1707229812} - m_Target: {fileID: 1707229808} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1707229810 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1707229807} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1707229811 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1707229807} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 160 ---- !u!114 &1707229812 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1707229807} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 004600000146000002460000034600000446000005460000064600000746000008460000094600000a4600000b4600000c4600000d4600000e4600000f460000104600001146000012460000134600001446000015460000164600001746000018460000194600001a4600001b4600001c4600001d4600001e4600001f460000204600002146000022460000234600002446000025460000264600002746000028460000294600002a4600002b4600002c4600002d4600002e4600002f460000304600003146000032460000334600003446000035460000364600003746000038460000394600003a4600003b4600003c4600003d4600003e4600003f460000404600004146000042460000434600004446000045460000464600004746000048460000494600004a4600004b4600004c4600004d4600004e4600004f460000504600005146000052460000534600005446000055460000564600005746000058460000594600005a4600005b4600005c4600005d4600005e4600005f460000604600006146000062460000634600006446000065460000664600006746000068460000694600006a4600006b4600006c4600006d4600006e4600006f460000 - m_AlignBytes: 16 - groupID: 161 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 17920 - particle2: 17921 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 17921 - particle2: 17922 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 17922 - particle2: 17923 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 17923 - particle2: 17924 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 17924 - particle2: 17925 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 17925 - particle2: 17926 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 17926 - particle2: 17927 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 17927 - particle2: 17928 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 17928 - particle2: 17929 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 17929 - particle2: 17930 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 17930 - particle2: 17931 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1734157831 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1734157832} - - component: {fileID: 1734157836} - - component: {fileID: 1734157835} - - component: {fileID: 1734157834} - - component: {fileID: 1734157833} - m_Layer: 0 - m_Name: Obi Rope (7) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1734157832 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1734157831} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.4, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1628171963} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1734157833 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1734157831} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1734157836} - m_Target: {fileID: 1734157832} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1734157834 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1734157831} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1734157835 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1734157831} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 161 ---- !u!114 &1734157836 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1734157831} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 704600007146000072460000734600007446000075460000764600007746000078460000794600007a4600007b4600007c4600007d4600007e4600007f460000804600008146000082460000834600008446000085460000864600008746000088460000894600008a4600008b4600008c4600008d4600008e4600008f460000904600009146000092460000934600009446000095460000964600009746000098460000994600009a4600009b4600009c4600009d4600009e4600009f460000a0460000a1460000a2460000a3460000a4460000a5460000a6460000a7460000a8460000a9460000aa460000ab460000ac460000ad460000ae460000af460000b0460000b1460000b2460000b3460000b4460000b5460000b6460000b7460000b8460000b9460000ba460000bb460000bc460000bd460000be460000bf460000c0460000c1460000c2460000c3460000c4460000c5460000c6460000c7460000c8460000c9460000ca460000cb460000cc460000cd460000ce460000cf460000d0460000d1460000d2460000d3460000d4460000d5460000d6460000d7460000d8460000d9460000da460000db460000dc460000dd460000de460000df460000 - m_AlignBytes: 16 - groupID: 162 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 18032 - particle2: 18033 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 18033 - particle2: 18034 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 18034 - particle2: 18035 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 18035 - particle2: 18036 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 18036 - particle2: 18037 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 18037 - particle2: 18038 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 18038 - particle2: 18039 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 18039 - particle2: 18040 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 18040 - particle2: 18041 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 18041 - particle2: 18042 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 18042 - particle2: 18043 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1739484932 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1739484933} - - component: {fileID: 1739484937} - - component: {fileID: 1739484936} - - component: {fileID: 1739484935} - - component: {fileID: 1739484934} - m_Layer: 0 - m_Name: Obi Rope (4) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1739484933 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1739484932} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.8, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 510728467} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1739484934 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1739484932} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1739484937} - m_Target: {fileID: 1739484933} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1739484935 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1739484932} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1739484936 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1739484932} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 162 ---- !u!114 &1739484937 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1739484932} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: e0460000e1460000e2460000e3460000e4460000e5460000e6460000e7460000e8460000e9460000ea460000eb460000ec460000ed460000ee460000ef460000f0460000f1460000f2460000f3460000f4460000f5460000f6460000f7460000f8460000f9460000fa460000fb460000fc460000fd460000fe460000ff460000004700000147000002470000034700000447000005470000064700000747000008470000094700000a4700000b4700000c4700000d4700000e4700000f470000104700001147000012470000134700001447000015470000164700001747000018470000194700001a4700001b4700001c4700001d4700001e4700001f470000204700002147000022470000234700002447000025470000264700002747000028470000294700002a4700002b4700002c4700002d4700002e4700002f470000304700003147000032470000334700003447000035470000364700003747000038470000394700003a4700003b4700003c4700003d4700003e4700003f470000404700004147000042470000434700004447000045470000464700004747000048470000494700004a4700004b4700004c4700004d4700004e4700004f470000 - m_AlignBytes: 16 - groupID: 163 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 18144 - particle2: 18145 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 18145 - particle2: 18146 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 18146 - particle2: 18147 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 18147 - particle2: 18148 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 18148 - particle2: 18149 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 18149 - particle2: 18150 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 18150 - particle2: 18151 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 18151 - particle2: 18152 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 18152 - particle2: 18153 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 18153 - particle2: 18154 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 18154 - particle2: 18155 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1743992357 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1743992358} - - component: {fileID: 1743992362} - - component: {fileID: 1743992361} - - component: {fileID: 1743992360} - - component: {fileID: 1743992359} - m_Layer: 0 - m_Name: Obi Rope (7) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1743992358 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1743992357} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.4, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 249029318} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1743992359 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1743992357} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1743992362} - m_Target: {fileID: 1743992358} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1743992360 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1743992357} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1743992361 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1743992357} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 163 ---- !u!114 &1743992362 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1743992357} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 504700005147000052470000534700005447000055470000564700005747000058470000594700005a4700005b4700005c4700005d4700005e4700005f470000604700006147000062470000634700006447000065470000664700006747000068470000694700006a4700006b4700006c4700006d4700006e4700006f470000704700007147000072470000734700007447000075470000764700007747000078470000794700007a4700007b4700007c4700007d4700007e4700007f470000804700008147000082470000834700008447000085470000864700008747000088470000894700008a4700008b4700008c4700008d4700008e4700008f470000904700009147000092470000934700009447000095470000964700009747000098470000994700009a4700009b4700009c4700009d4700009e4700009f470000a0470000a1470000a2470000a3470000a4470000a5470000a6470000a7470000a8470000a9470000aa470000ab470000ac470000ad470000ae470000af470000b0470000b1470000b2470000b3470000b4470000b5470000b6470000b7470000b8470000b9470000ba470000bb470000bc470000bd470000be470000bf470000 - m_AlignBytes: 16 - groupID: 164 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 18256 - particle2: 18257 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 18257 - particle2: 18258 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 18258 - particle2: 18259 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 18259 - particle2: 18260 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 18260 - particle2: 18261 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 18261 - particle2: 18262 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 18262 - particle2: 18263 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 18263 - particle2: 18264 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 18264 - particle2: 18265 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 18265 - particle2: 18266 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 18266 - particle2: 18267 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1746497395 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1746497396} - - component: {fileID: 1746497400} - - component: {fileID: 1746497399} - - component: {fileID: 1746497398} - - component: {fileID: 1746497397} - m_Layer: 0 - m_Name: Obi Rope (2) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1746497396 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1746497395} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.4, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 713844502} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1746497397 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1746497395} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1746497400} - m_Target: {fileID: 1746497396} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1746497398 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1746497395} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1746497399 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1746497395} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 164 ---- !u!114 &1746497400 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1746497395} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: c0470000c1470000c2470000c3470000c4470000c5470000c6470000c7470000c8470000c9470000ca470000cb470000cc470000cd470000ce470000cf470000d0470000d1470000d2470000d3470000d4470000d5470000d6470000d7470000d8470000d9470000da470000db470000dc470000dd470000de470000df470000e0470000e1470000e2470000e3470000e4470000e5470000e6470000e7470000e8470000e9470000ea470000eb470000ec470000ed470000ee470000ef470000f0470000f1470000f2470000f3470000f4470000f5470000f6470000f7470000f8470000f9470000fa470000fb470000fc470000fd470000fe470000ff470000004800000148000002480000034800000448000005480000064800000748000008480000094800000a4800000b4800000c4800000d4800000e4800000f480000104800001148000012480000134800001448000015480000164800001748000018480000194800001a4800001b4800001c4800001d4800001e4800001f480000204800002148000022480000234800002448000025480000264800002748000028480000294800002a4800002b4800002c4800002d4800002e4800002f480000 - m_AlignBytes: 16 - groupID: 165 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 18368 - particle2: 18369 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 18369 - particle2: 18370 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 18370 - particle2: 18371 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 18371 - particle2: 18372 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 18372 - particle2: 18373 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 18373 - particle2: 18374 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 18374 - particle2: 18375 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 18375 - particle2: 18376 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 18376 - particle2: 18377 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 18377 - particle2: 18378 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 18378 - particle2: 18379 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1753057673 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1753057674} - - component: {fileID: 1753057678} - - component: {fileID: 1753057677} - - component: {fileID: 1753057676} - - component: {fileID: 1753057675} - m_Layer: 0 - m_Name: Obi Rope (9) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1753057674 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1753057673} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.8, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 426164209} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1753057675 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1753057673} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1753057678} - m_Target: {fileID: 1753057674} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1753057676 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1753057673} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1753057677 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1753057673} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 165 ---- !u!114 &1753057678 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1753057673} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 304800003148000032480000334800003448000035480000364800003748000038480000394800003a4800003b4800003c4800003d4800003e4800003f480000404800004148000042480000434800004448000045480000464800004748000048480000494800004a4800004b4800004c4800004d4800004e4800004f480000504800005148000052480000534800005448000055480000564800005748000058480000594800005a4800005b4800005c4800005d4800005e4800005f480000604800006148000062480000634800006448000065480000664800006748000068480000694800006a4800006b4800006c4800006d4800006e4800006f480000704800007148000072480000734800007448000075480000764800007748000078480000794800007a4800007b4800007c4800007d4800007e4800007f480000804800008148000082480000834800008448000085480000864800008748000088480000894800008a4800008b4800008c4800008d4800008e4800008f480000904800009148000092480000934800009448000095480000964800009748000098480000994800009a4800009b4800009c4800009d4800009e4800009f480000 - m_AlignBytes: 16 - groupID: 166 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 18480 - particle2: 18481 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 18481 - particle2: 18482 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 18482 - particle2: 18483 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 18483 - particle2: 18484 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 18484 - particle2: 18485 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 18485 - particle2: 18486 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 18486 - particle2: 18487 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 18487 - particle2: 18488 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 18488 - particle2: 18489 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 18489 - particle2: 18490 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 18490 - particle2: 18491 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1758285765 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1758285766} - - component: {fileID: 1758285770} - - component: {fileID: 1758285769} - - component: {fileID: 1758285768} - - component: {fileID: 1758285767} - m_Layer: 0 - m_Name: Obi Rope - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1758285766 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1758285765} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1306593279} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1758285767 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1758285765} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1758285770} - m_Target: {fileID: 1758285766} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1758285768 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1758285765} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1758285769 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1758285765} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 166 ---- !u!114 &1758285770 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1758285765} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: a0480000a1480000a2480000a3480000a4480000a5480000a6480000a7480000a8480000a9480000aa480000ab480000ac480000ad480000ae480000af480000b0480000b1480000b2480000b3480000b4480000b5480000b6480000b7480000b8480000b9480000ba480000bb480000bc480000bd480000be480000bf480000c0480000c1480000c2480000c3480000c4480000c5480000c6480000c7480000c8480000c9480000ca480000cb480000cc480000cd480000ce480000cf480000d0480000d1480000d2480000d3480000d4480000d5480000d6480000d7480000d8480000d9480000da480000db480000dc480000dd480000de480000df480000e0480000e1480000e2480000e3480000e4480000e5480000e6480000e7480000e8480000e9480000ea480000eb480000ec480000ed480000ee480000ef480000f0480000f1480000f2480000f3480000f4480000f5480000f6480000f7480000f8480000f9480000fa480000fb480000fc480000fd480000fe480000ff480000004900000149000002490000034900000449000005490000064900000749000008490000094900000a4900000b4900000c4900000d4900000e4900000f490000 - m_AlignBytes: 16 - groupID: 167 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 18592 - particle2: 18593 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 18593 - particle2: 18594 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 18594 - particle2: 18595 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 18595 - particle2: 18596 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 18596 - particle2: 18597 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 18597 - particle2: 18598 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 18598 - particle2: 18599 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 18599 - particle2: 18600 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 18600 - particle2: 18601 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 18601 - particle2: 18602 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 18602 - particle2: 18603 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1760688767 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1760688768} - m_Layer: 0 - m_Name: Group (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1760688768 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1760688767} - serializedVersion: 2 - m_LocalRotation: {x: 0.0008726948, y: 0, z: 0, w: 0.99999964} - m_LocalPosition: {x: -1.11, y: 1.59, z: -0.39} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 940408952} - - {fileID: 1464717035} - - {fileID: 510728467} - - {fileID: 1062536481} - - {fileID: 713844502} - - {fileID: 1977632070} - - {fileID: 54623967} - - {fileID: 648480057} - - {fileID: 426164209} - - {fileID: 1798495239} - m_Father: {fileID: 2102841797} - m_LocalEulerAnglesHint: {x: 0.1, y: 0, z: 0} ---- !u!1 &1771245891 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1771245892} - - component: {fileID: 1771245896} - - component: {fileID: 1771245895} - - component: {fileID: 1771245894} - - component: {fileID: 1771245893} - m_Layer: 0 - m_Name: Obi Rope (7) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1771245892 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1771245891} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.4, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 713844502} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1771245893 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1771245891} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1771245896} - m_Target: {fileID: 1771245892} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1771245894 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1771245891} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1771245895 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1771245891} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 167 ---- !u!114 &1771245896 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1771245891} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 104900001149000012490000134900001449000015490000164900001749000018490000194900001a4900001b4900001c4900001d4900001e4900001f490000204900002149000022490000234900002449000025490000264900002749000028490000294900002a4900002b4900002c4900002d4900002e4900002f490000304900003149000032490000334900003449000035490000364900003749000038490000394900003a4900003b4900003c4900003d4900003e4900003f490000404900004149000042490000434900004449000045490000464900004749000048490000494900004a4900004b4900004c4900004d4900004e4900004f490000504900005149000052490000534900005449000055490000564900005749000058490000594900005a4900005b4900005c4900005d4900005e4900005f490000604900006149000062490000634900006449000065490000664900006749000068490000694900006a4900006b4900006c4900006d4900006e4900006f490000704900007149000072490000734900007449000075490000764900007749000078490000794900007a4900007b4900007c4900007d4900007e4900007f490000 - m_AlignBytes: 16 - groupID: 168 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 18704 - particle2: 18705 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 18705 - particle2: 18706 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 18706 - particle2: 18707 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 18707 - particle2: 18708 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 18708 - particle2: 18709 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 18709 - particle2: 18710 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 18710 - particle2: 18711 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 18711 - particle2: 18712 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 18712 - particle2: 18713 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 18713 - particle2: 18714 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 18714 - particle2: 18715 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1772381103 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1772381104} - - component: {fileID: 1772381108} - - component: {fileID: 1772381107} - - component: {fileID: 1772381106} - - component: {fileID: 1772381105} - m_Layer: 0 - m_Name: Obi Rope (8) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1772381104 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1772381103} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.6, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1798495239} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1772381105 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1772381103} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1772381108} - m_Target: {fileID: 1772381104} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1772381106 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1772381103} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1772381107 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1772381103} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 168 ---- !u!114 &1772381108 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1772381103} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 804900008149000082490000834900008449000085490000864900008749000088490000894900008a4900008b4900008c4900008d4900008e4900008f490000904900009149000092490000934900009449000095490000964900009749000098490000994900009a4900009b4900009c4900009d4900009e4900009f490000a0490000a1490000a2490000a3490000a4490000a5490000a6490000a7490000a8490000a9490000aa490000ab490000ac490000ad490000ae490000af490000b0490000b1490000b2490000b3490000b4490000b5490000b6490000b7490000b8490000b9490000ba490000bb490000bc490000bd490000be490000bf490000c0490000c1490000c2490000c3490000c4490000c5490000c6490000c7490000c8490000c9490000ca490000cb490000cc490000cd490000ce490000cf490000d0490000d1490000d2490000d3490000d4490000d5490000d6490000d7490000d8490000d9490000da490000db490000dc490000dd490000de490000df490000e0490000e1490000e2490000e3490000e4490000e5490000e6490000e7490000e8490000e9490000ea490000eb490000ec490000ed490000ee490000ef490000 - m_AlignBytes: 16 - groupID: 169 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 18816 - particle2: 18817 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 18817 - particle2: 18818 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 18818 - particle2: 18819 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 18819 - particle2: 18820 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 18820 - particle2: 18821 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 18821 - particle2: 18822 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 18822 - particle2: 18823 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 18823 - particle2: 18824 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 18824 - particle2: 18825 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 18825 - particle2: 18826 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 18826 - particle2: 18827 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1789705480 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1789705481} - - component: {fileID: 1789705485} - - component: {fileID: 1789705484} - - component: {fileID: 1789705483} - - component: {fileID: 1789705482} - m_Layer: 0 - m_Name: Obi Rope (8) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1789705481 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1789705480} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.6, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 426164209} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1789705482 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1789705480} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1789705485} - m_Target: {fileID: 1789705481} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1789705483 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1789705480} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1789705484 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1789705480} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 169 ---- !u!114 &1789705485 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1789705480} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: f0490000f1490000f2490000f3490000f4490000f5490000f6490000f7490000f8490000f9490000fa490000fb490000fc490000fd490000fe490000ff490000004a0000014a0000024a0000034a0000044a0000054a0000064a0000074a0000084a0000094a00000a4a00000b4a00000c4a00000d4a00000e4a00000f4a0000104a0000114a0000124a0000134a0000144a0000154a0000164a0000174a0000184a0000194a00001a4a00001b4a00001c4a00001d4a00001e4a00001f4a0000204a0000214a0000224a0000234a0000244a0000254a0000264a0000274a0000284a0000294a00002a4a00002b4a00002c4a00002d4a00002e4a00002f4a0000304a0000314a0000324a0000334a0000344a0000354a0000364a0000374a0000384a0000394a00003a4a00003b4a00003c4a00003d4a00003e4a00003f4a0000404a0000414a0000424a0000434a0000444a0000454a0000464a0000474a0000484a0000494a00004a4a00004b4a00004c4a00004d4a00004e4a00004f4a0000504a0000514a0000524a0000534a0000544a0000554a0000564a0000574a0000584a0000594a00005a4a00005b4a00005c4a00005d4a00005e4a00005f4a0000 - m_AlignBytes: 16 - groupID: 170 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 18928 - particle2: 18929 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 18929 - particle2: 18930 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 18930 - particle2: 18931 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 18931 - particle2: 18932 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 18932 - particle2: 18933 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 18933 - particle2: 18934 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 18934 - particle2: 18935 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 18935 - particle2: 18936 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 18936 - particle2: 18937 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 18937 - particle2: 18938 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 18938 - particle2: 18939 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1796031223 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1796031224} - - component: {fileID: 1796031228} - - component: {fileID: 1796031227} - - component: {fileID: 1796031226} - - component: {fileID: 1796031225} - m_Layer: 0 - m_Name: Obi Rope (9) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1796031224 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1796031223} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.8, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 54623967} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1796031225 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1796031223} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1796031228} - m_Target: {fileID: 1796031224} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1796031226 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1796031223} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1796031227 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1796031223} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 170 ---- !u!114 &1796031228 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1796031223} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 604a0000614a0000624a0000634a0000644a0000654a0000664a0000674a0000684a0000694a00006a4a00006b4a00006c4a00006d4a00006e4a00006f4a0000704a0000714a0000724a0000734a0000744a0000754a0000764a0000774a0000784a0000794a00007a4a00007b4a00007c4a00007d4a00007e4a00007f4a0000804a0000814a0000824a0000834a0000844a0000854a0000864a0000874a0000884a0000894a00008a4a00008b4a00008c4a00008d4a00008e4a00008f4a0000904a0000914a0000924a0000934a0000944a0000954a0000964a0000974a0000984a0000994a00009a4a00009b4a00009c4a00009d4a00009e4a00009f4a0000a04a0000a14a0000a24a0000a34a0000a44a0000a54a0000a64a0000a74a0000a84a0000a94a0000aa4a0000ab4a0000ac4a0000ad4a0000ae4a0000af4a0000b04a0000b14a0000b24a0000b34a0000b44a0000b54a0000b64a0000b74a0000b84a0000b94a0000ba4a0000bb4a0000bc4a0000bd4a0000be4a0000bf4a0000c04a0000c14a0000c24a0000c34a0000c44a0000c54a0000c64a0000c74a0000c84a0000c94a0000ca4a0000cb4a0000cc4a0000cd4a0000ce4a0000cf4a0000 - m_AlignBytes: 16 - groupID: 171 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 19040 - particle2: 19041 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 19041 - particle2: 19042 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 19042 - particle2: 19043 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 19043 - particle2: 19044 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 19044 - particle2: 19045 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 19045 - particle2: 19046 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 19046 - particle2: 19047 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 19047 - particle2: 19048 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 19048 - particle2: 19049 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 19049 - particle2: 19050 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 19050 - particle2: 19051 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1798495238 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1798495239} - m_Layer: 0 - m_Name: Row (9) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1798495239 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1798495238} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -1.8} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 258800385} - - {fileID: 23157} - - {fileID: 1479240942} - - {fileID: 765011064} - - {fileID: 1022784183} - - {fileID: 1988484819} - - {fileID: 1632801444} - - {fileID: 469876705} - - {fileID: 1772381104} - - {fileID: 84035660} - m_Father: {fileID: 1760688768} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1808557640 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1808557641} - - component: {fileID: 1808557645} - - component: {fileID: 1808557644} - - component: {fileID: 1808557643} - - component: {fileID: 1808557642} - m_Layer: 0 - m_Name: Obi Rope (5) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1808557641 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1808557640} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1640435994} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1808557642 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1808557640} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1808557645} - m_Target: {fileID: 1808557641} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1808557643 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1808557640} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1808557644 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1808557640} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 171 ---- !u!114 &1808557645 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1808557640} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: d04a0000d14a0000d24a0000d34a0000d44a0000d54a0000d64a0000d74a0000d84a0000d94a0000da4a0000db4a0000dc4a0000dd4a0000de4a0000df4a0000e04a0000e14a0000e24a0000e34a0000e44a0000e54a0000e64a0000e74a0000e84a0000e94a0000ea4a0000eb4a0000ec4a0000ed4a0000ee4a0000ef4a0000f04a0000f14a0000f24a0000f34a0000f44a0000f54a0000f64a0000f74a0000f84a0000f94a0000fa4a0000fb4a0000fc4a0000fd4a0000fe4a0000ff4a0000004b0000014b0000024b0000034b0000044b0000054b0000064b0000074b0000084b0000094b00000a4b00000b4b00000c4b00000d4b00000e4b00000f4b0000104b0000114b0000124b0000134b0000144b0000154b0000164b0000174b0000184b0000194b00001a4b00001b4b00001c4b00001d4b00001e4b00001f4b0000204b0000214b0000224b0000234b0000244b0000254b0000264b0000274b0000284b0000294b00002a4b00002b4b00002c4b00002d4b00002e4b00002f4b0000304b0000314b0000324b0000334b0000344b0000354b0000364b0000374b0000384b0000394b00003a4b00003b4b00003c4b00003d4b00003e4b00003f4b0000 - m_AlignBytes: 16 - groupID: 172 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 19152 - particle2: 19153 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 19153 - particle2: 19154 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 19154 - particle2: 19155 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 19155 - particle2: 19156 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 19156 - particle2: 19157 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 19157 - particle2: 19158 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 19158 - particle2: 19159 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 19159 - particle2: 19160 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 19160 - particle2: 19161 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 19161 - particle2: 19162 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 19162 - particle2: 19163 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1812706182 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1812706183} - - component: {fileID: 1812706187} - - component: {fileID: 1812706186} - - component: {fileID: 1812706185} - - component: {fileID: 1812706184} - m_Layer: 0 - m_Name: Obi Rope (7) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1812706183 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1812706182} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.4, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1241971666} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1812706184 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1812706182} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1812706187} - m_Target: {fileID: 1812706183} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1812706185 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1812706182} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1812706186 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1812706182} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 172 ---- !u!114 &1812706187 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1812706182} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 404b0000414b0000424b0000434b0000444b0000454b0000464b0000474b0000484b0000494b00004a4b00004b4b00004c4b00004d4b00004e4b00004f4b0000504b0000514b0000524b0000534b0000544b0000554b0000564b0000574b0000584b0000594b00005a4b00005b4b00005c4b00005d4b00005e4b00005f4b0000604b0000614b0000624b0000634b0000644b0000654b0000664b0000674b0000684b0000694b00006a4b00006b4b00006c4b00006d4b00006e4b00006f4b0000704b0000714b0000724b0000734b0000744b0000754b0000764b0000774b0000784b0000794b00007a4b00007b4b00007c4b00007d4b00007e4b00007f4b0000804b0000814b0000824b0000834b0000844b0000854b0000864b0000874b0000884b0000894b00008a4b00008b4b00008c4b00008d4b00008e4b00008f4b0000904b0000914b0000924b0000934b0000944b0000954b0000964b0000974b0000984b0000994b00009a4b00009b4b00009c4b00009d4b00009e4b00009f4b0000a04b0000a14b0000a24b0000a34b0000a44b0000a54b0000a64b0000a74b0000a84b0000a94b0000aa4b0000ab4b0000ac4b0000ad4b0000ae4b0000af4b0000 - m_AlignBytes: 16 - groupID: 173 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 19264 - particle2: 19265 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 19265 - particle2: 19266 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 19266 - particle2: 19267 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 19267 - particle2: 19268 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 19268 - particle2: 19269 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 19269 - particle2: 19270 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 19270 - particle2: 19271 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 19271 - particle2: 19272 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 19272 - particle2: 19273 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 19273 - particle2: 19274 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 19274 - particle2: 19275 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1822342380 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1822342381} - - component: {fileID: 1822342385} - - component: {fileID: 1822342384} - - component: {fileID: 1822342383} - - component: {fileID: 1822342382} - m_Layer: 0 - m_Name: Obi Rope (9) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1822342381 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1822342380} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.8, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1640435994} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1822342382 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1822342380} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1822342385} - m_Target: {fileID: 1822342381} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1822342383 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1822342380} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1822342384 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1822342380} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 173 ---- !u!114 &1822342385 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1822342380} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: b04b0000b14b0000b24b0000b34b0000b44b0000b54b0000b64b0000b74b0000b84b0000b94b0000ba4b0000bb4b0000bc4b0000bd4b0000be4b0000bf4b0000c04b0000c14b0000c24b0000c34b0000c44b0000c54b0000c64b0000c74b0000c84b0000c94b0000ca4b0000cb4b0000cc4b0000cd4b0000ce4b0000cf4b0000d04b0000d14b0000d24b0000d34b0000d44b0000d54b0000d64b0000d74b0000d84b0000d94b0000da4b0000db4b0000dc4b0000dd4b0000de4b0000df4b0000e04b0000e14b0000e24b0000e34b0000e44b0000e54b0000e64b0000e74b0000e84b0000e94b0000ea4b0000eb4b0000ec4b0000ed4b0000ee4b0000ef4b0000f04b0000f14b0000f24b0000f34b0000f44b0000f54b0000f64b0000f74b0000f84b0000f94b0000fa4b0000fb4b0000fc4b0000fd4b0000fe4b0000ff4b0000004c0000014c0000024c0000034c0000044c0000054c0000064c0000074c0000084c0000094c00000a4c00000b4c00000c4c00000d4c00000e4c00000f4c0000104c0000114c0000124c0000134c0000144c0000154c0000164c0000174c0000184c0000194c00001a4c00001b4c00001c4c00001d4c00001e4c00001f4c0000 - m_AlignBytes: 16 - groupID: 174 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 19376 - particle2: 19377 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 19377 - particle2: 19378 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 19378 - particle2: 19379 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 19379 - particle2: 19380 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 19380 - particle2: 19381 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 19381 - particle2: 19382 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 19382 - particle2: 19383 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 19383 - particle2: 19384 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 19384 - particle2: 19385 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 19385 - particle2: 19386 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 19386 - particle2: 19387 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1824546301 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1824546302} - - component: {fileID: 1824546306} - - component: {fileID: 1824546305} - - component: {fileID: 1824546304} - - component: {fileID: 1824546303} - m_Layer: 0 - m_Name: Obi Rope (4) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1824546302 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1824546301} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.8, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1628171963} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1824546303 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1824546301} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1824546306} - m_Target: {fileID: 1824546302} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1824546304 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1824546301} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1824546305 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1824546301} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 174 ---- !u!114 &1824546306 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1824546301} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 204c0000214c0000224c0000234c0000244c0000254c0000264c0000274c0000284c0000294c00002a4c00002b4c00002c4c00002d4c00002e4c00002f4c0000304c0000314c0000324c0000334c0000344c0000354c0000364c0000374c0000384c0000394c00003a4c00003b4c00003c4c00003d4c00003e4c00003f4c0000404c0000414c0000424c0000434c0000444c0000454c0000464c0000474c0000484c0000494c00004a4c00004b4c00004c4c00004d4c00004e4c00004f4c0000504c0000514c0000524c0000534c0000544c0000554c0000564c0000574c0000584c0000594c00005a4c00005b4c00005c4c00005d4c00005e4c00005f4c0000604c0000614c0000624c0000634c0000644c0000654c0000664c0000674c0000684c0000694c00006a4c00006b4c00006c4c00006d4c00006e4c00006f4c0000704c0000714c0000724c0000734c0000744c0000754c0000764c0000774c0000784c0000794c00007a4c00007b4c00007c4c00007d4c00007e4c00007f4c0000804c0000814c0000824c0000834c0000844c0000854c0000864c0000874c0000884c0000894c00008a4c00008b4c00008c4c00008d4c00008e4c00008f4c0000 - m_AlignBytes: 16 - groupID: 175 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 19488 - particle2: 19489 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 19489 - particle2: 19490 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 19490 - particle2: 19491 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 19491 - particle2: 19492 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 19492 - particle2: 19493 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 19493 - particle2: 19494 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 19494 - particle2: 19495 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 19495 - particle2: 19496 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 19496 - particle2: 19497 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 19497 - particle2: 19498 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 19498 - particle2: 19499 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1853955319 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1853955320} - - component: {fileID: 1853955324} - - component: {fileID: 1853955323} - - component: {fileID: 1853955322} - - component: {fileID: 1853955321} - m_Layer: 0 - m_Name: Obi Rope (4) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1853955320 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1853955319} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.8, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1640435994} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1853955321 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1853955319} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1853955324} - m_Target: {fileID: 1853955320} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1853955322 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1853955319} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1853955323 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1853955319} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 175 ---- !u!114 &1853955324 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1853955319} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 904c0000914c0000924c0000934c0000944c0000954c0000964c0000974c0000984c0000994c00009a4c00009b4c00009c4c00009d4c00009e4c00009f4c0000a04c0000a14c0000a24c0000a34c0000a44c0000a54c0000a64c0000a74c0000a84c0000a94c0000aa4c0000ab4c0000ac4c0000ad4c0000ae4c0000af4c0000b04c0000b14c0000b24c0000b34c0000b44c0000b54c0000b64c0000b74c0000b84c0000b94c0000ba4c0000bb4c0000bc4c0000bd4c0000be4c0000bf4c0000c04c0000c14c0000c24c0000c34c0000c44c0000c54c0000c64c0000c74c0000c84c0000c94c0000ca4c0000cb4c0000cc4c0000cd4c0000ce4c0000cf4c0000d04c0000d14c0000d24c0000d34c0000d44c0000d54c0000d64c0000d74c0000d84c0000d94c0000da4c0000db4c0000dc4c0000dd4c0000de4c0000df4c0000e04c0000e14c0000e24c0000e34c0000e44c0000e54c0000e64c0000e74c0000e84c0000e94c0000ea4c0000eb4c0000ec4c0000ed4c0000ee4c0000ef4c0000f04c0000f14c0000f24c0000f34c0000f44c0000f54c0000f64c0000f74c0000f84c0000f94c0000fa4c0000fb4c0000fc4c0000fd4c0000fe4c0000ff4c0000 - m_AlignBytes: 16 - groupID: 176 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 19600 - particle2: 19601 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 19601 - particle2: 19602 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 19602 - particle2: 19603 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 19603 - particle2: 19604 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 19604 - particle2: 19605 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 19605 - particle2: 19606 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 19606 - particle2: 19607 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 19607 - particle2: 19608 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 19608 - particle2: 19609 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 19609 - particle2: 19610 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 19610 - particle2: 19611 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1886039166 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1886039167} - - component: {fileID: 1886039171} - - component: {fileID: 1886039170} - - component: {fileID: 1886039169} - - component: {fileID: 1886039168} - m_Layer: 0 - m_Name: Obi Rope (3) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1886039167 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1886039166} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.6, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1306593279} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1886039168 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1886039166} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1886039171} - m_Target: {fileID: 1886039167} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1886039169 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1886039166} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1886039170 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1886039166} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 176 ---- !u!114 &1886039171 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1886039166} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 004d0000014d0000024d0000034d0000044d0000054d0000064d0000074d0000084d0000094d00000a4d00000b4d00000c4d00000d4d00000e4d00000f4d0000104d0000114d0000124d0000134d0000144d0000154d0000164d0000174d0000184d0000194d00001a4d00001b4d00001c4d00001d4d00001e4d00001f4d0000204d0000214d0000224d0000234d0000244d0000254d0000264d0000274d0000284d0000294d00002a4d00002b4d00002c4d00002d4d00002e4d00002f4d0000304d0000314d0000324d0000334d0000344d0000354d0000364d0000374d0000384d0000394d00003a4d00003b4d00003c4d00003d4d00003e4d00003f4d0000404d0000414d0000424d0000434d0000444d0000454d0000464d0000474d0000484d0000494d00004a4d00004b4d00004c4d00004d4d00004e4d00004f4d0000504d0000514d0000524d0000534d0000544d0000554d0000564d0000574d0000584d0000594d00005a4d00005b4d00005c4d00005d4d00005e4d00005f4d0000604d0000614d0000624d0000634d0000644d0000654d0000664d0000674d0000684d0000694d00006a4d00006b4d00006c4d00006d4d00006e4d00006f4d0000 - m_AlignBytes: 16 - groupID: 177 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 19712 - particle2: 19713 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 19713 - particle2: 19714 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 19714 - particle2: 19715 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 19715 - particle2: 19716 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 19716 - particle2: 19717 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 19717 - particle2: 19718 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 19718 - particle2: 19719 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 19719 - particle2: 19720 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 19720 - particle2: 19721 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 19721 - particle2: 19722 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 19722 - particle2: 19723 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1895783474 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1895783475} - - component: {fileID: 1895783479} - - component: {fileID: 1895783478} - - component: {fileID: 1895783477} - - component: {fileID: 1895783476} - m_Layer: 0 - m_Name: Obi Rope (2) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1895783475 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1895783474} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.4, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 426164209} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1895783476 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1895783474} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1895783479} - m_Target: {fileID: 1895783475} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1895783477 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1895783474} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1895783478 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1895783474} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 177 ---- !u!114 &1895783479 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1895783474} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 704d0000714d0000724d0000734d0000744d0000754d0000764d0000774d0000784d0000794d00007a4d00007b4d00007c4d00007d4d00007e4d00007f4d0000804d0000814d0000824d0000834d0000844d0000854d0000864d0000874d0000884d0000894d00008a4d00008b4d00008c4d00008d4d00008e4d00008f4d0000904d0000914d0000924d0000934d0000944d0000954d0000964d0000974d0000984d0000994d00009a4d00009b4d00009c4d00009d4d00009e4d00009f4d0000a04d0000a14d0000a24d0000a34d0000a44d0000a54d0000a64d0000a74d0000a84d0000a94d0000aa4d0000ab4d0000ac4d0000ad4d0000ae4d0000af4d0000b04d0000b14d0000b24d0000b34d0000b44d0000b54d0000b64d0000b74d0000b84d0000b94d0000ba4d0000bb4d0000bc4d0000bd4d0000be4d0000bf4d0000c04d0000c14d0000c24d0000c34d0000c44d0000c54d0000c64d0000c74d0000c84d0000c94d0000ca4d0000cb4d0000cc4d0000cd4d0000ce4d0000cf4d0000d04d0000d14d0000d24d0000d34d0000d44d0000d54d0000d64d0000d74d0000d84d0000d94d0000da4d0000db4d0000dc4d0000dd4d0000de4d0000df4d0000 - m_AlignBytes: 16 - groupID: 178 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 19824 - particle2: 19825 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 19825 - particle2: 19826 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 19826 - particle2: 19827 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 19827 - particle2: 19828 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 19828 - particle2: 19829 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 19829 - particle2: 19830 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 19830 - particle2: 19831 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 19831 - particle2: 19832 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 19832 - particle2: 19833 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 19833 - particle2: 19834 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 19834 - particle2: 19835 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1898534084 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1898534085} - - component: {fileID: 1898534089} - - component: {fileID: 1898534088} - - component: {fileID: 1898534087} - - component: {fileID: 1898534086} - m_Layer: 0 - m_Name: Obi Rope (3) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1898534085 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1898534084} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.6, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 426164209} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1898534086 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1898534084} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1898534089} - m_Target: {fileID: 1898534085} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1898534087 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1898534084} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1898534088 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1898534084} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 178 ---- !u!114 &1898534089 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1898534084} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: e04d0000e14d0000e24d0000e34d0000e44d0000e54d0000e64d0000e74d0000e84d0000e94d0000ea4d0000eb4d0000ec4d0000ed4d0000ee4d0000ef4d0000f04d0000f14d0000f24d0000f34d0000f44d0000f54d0000f64d0000f74d0000f84d0000f94d0000fa4d0000fb4d0000fc4d0000fd4d0000fe4d0000ff4d0000004e0000014e0000024e0000034e0000044e0000054e0000064e0000074e0000084e0000094e00000a4e00000b4e00000c4e00000d4e00000e4e00000f4e0000104e0000114e0000124e0000134e0000144e0000154e0000164e0000174e0000184e0000194e00001a4e00001b4e00001c4e00001d4e00001e4e00001f4e0000204e0000214e0000224e0000234e0000244e0000254e0000264e0000274e0000284e0000294e00002a4e00002b4e00002c4e00002d4e00002e4e00002f4e0000304e0000314e0000324e0000334e0000344e0000354e0000364e0000374e0000384e0000394e00003a4e00003b4e00003c4e00003d4e00003e4e00003f4e0000404e0000414e0000424e0000434e0000444e0000454e0000464e0000474e0000484e0000494e00004a4e00004b4e00004c4e00004d4e00004e4e00004f4e0000 - m_AlignBytes: 16 - groupID: 179 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 19936 - particle2: 19937 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 19937 - particle2: 19938 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 19938 - particle2: 19939 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 19939 - particle2: 19940 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 19940 - particle2: 19941 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 19941 - particle2: 19942 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 19942 - particle2: 19943 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 19943 - particle2: 19944 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 19944 - particle2: 19945 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 19945 - particle2: 19946 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 19946 - particle2: 19947 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1901308915 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1901308916} - - component: {fileID: 1901308920} - - component: {fileID: 1901308919} - - component: {fileID: 1901308918} - - component: {fileID: 1901308917} - m_Layer: 0 - m_Name: Obi Rope (9) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1901308916 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1901308915} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.8, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1241971666} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1901308917 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1901308915} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1901308920} - m_Target: {fileID: 1901308916} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1901308918 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1901308915} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1901308919 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1901308915} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 179 ---- !u!114 &1901308920 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1901308915} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 504e0000514e0000524e0000534e0000544e0000554e0000564e0000574e0000584e0000594e00005a4e00005b4e00005c4e00005d4e00005e4e00005f4e0000604e0000614e0000624e0000634e0000644e0000654e0000664e0000674e0000684e0000694e00006a4e00006b4e00006c4e00006d4e00006e4e00006f4e0000704e0000714e0000724e0000734e0000744e0000754e0000764e0000774e0000784e0000794e00007a4e00007b4e00007c4e00007d4e00007e4e00007f4e0000804e0000814e0000824e0000834e0000844e0000854e0000864e0000874e0000884e0000894e00008a4e00008b4e00008c4e00008d4e00008e4e00008f4e0000904e0000914e0000924e0000934e0000944e0000954e0000964e0000974e0000984e0000994e00009a4e00009b4e00009c4e00009d4e00009e4e00009f4e0000a04e0000a14e0000a24e0000a34e0000a44e0000a54e0000a64e0000a74e0000a84e0000a94e0000aa4e0000ab4e0000ac4e0000ad4e0000ae4e0000af4e0000b04e0000b14e0000b24e0000b34e0000b44e0000b54e0000b64e0000b74e0000b84e0000b94e0000ba4e0000bb4e0000bc4e0000bd4e0000be4e0000bf4e0000 - m_AlignBytes: 16 - groupID: 180 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 20048 - particle2: 20049 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 20049 - particle2: 20050 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 20050 - particle2: 20051 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 20051 - particle2: 20052 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 20052 - particle2: 20053 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 20053 - particle2: 20054 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 20054 - particle2: 20055 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 20055 - particle2: 20056 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 20056 - particle2: 20057 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 20057 - particle2: 20058 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 20058 - particle2: 20059 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1919837742 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1919837743} - - component: {fileID: 1919837747} - - component: {fileID: 1919837746} - - component: {fileID: 1919837745} - - component: {fileID: 1919837744} - m_Layer: 0 - m_Name: Obi Rope (4) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1919837743 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1919837742} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.8, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 713844502} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1919837744 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1919837742} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1919837747} - m_Target: {fileID: 1919837743} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1919837745 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1919837742} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1919837746 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1919837742} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 180 ---- !u!114 &1919837747 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1919837742} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: c04e0000c14e0000c24e0000c34e0000c44e0000c54e0000c64e0000c74e0000c84e0000c94e0000ca4e0000cb4e0000cc4e0000cd4e0000ce4e0000cf4e0000d04e0000d14e0000d24e0000d34e0000d44e0000d54e0000d64e0000d74e0000d84e0000d94e0000da4e0000db4e0000dc4e0000dd4e0000de4e0000df4e0000e04e0000e14e0000e24e0000e34e0000e44e0000e54e0000e64e0000e74e0000e84e0000e94e0000ea4e0000eb4e0000ec4e0000ed4e0000ee4e0000ef4e0000f04e0000f14e0000f24e0000f34e0000f44e0000f54e0000f64e0000f74e0000f84e0000f94e0000fa4e0000fb4e0000fc4e0000fd4e0000fe4e0000ff4e0000004f0000014f0000024f0000034f0000044f0000054f0000064f0000074f0000084f0000094f00000a4f00000b4f00000c4f00000d4f00000e4f00000f4f0000104f0000114f0000124f0000134f0000144f0000154f0000164f0000174f0000184f0000194f00001a4f00001b4f00001c4f00001d4f00001e4f00001f4f0000204f0000214f0000224f0000234f0000244f0000254f0000264f0000274f0000284f0000294f00002a4f00002b4f00002c4f00002d4f00002e4f00002f4f0000 - m_AlignBytes: 16 - groupID: 181 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 20160 - particle2: 20161 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 20161 - particle2: 20162 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 20162 - particle2: 20163 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 20163 - particle2: 20164 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 20164 - particle2: 20165 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 20165 - particle2: 20166 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 20166 - particle2: 20167 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 20167 - particle2: 20168 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 20168 - particle2: 20169 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 20169 - particle2: 20170 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 20170 - particle2: 20171 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1923931437 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1923931438} - - component: {fileID: 1923931442} - - component: {fileID: 1923931441} - - component: {fileID: 1923931440} - - component: {fileID: 1923931439} - m_Layer: 0 - m_Name: Obi Rope (6) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1923931438 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1923931437} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.2, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1640435994} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1923931439 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1923931437} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1923931442} - m_Target: {fileID: 1923931438} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1923931440 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1923931437} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1923931441 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1923931437} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 181 ---- !u!114 &1923931442 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1923931437} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 304f0000314f0000324f0000334f0000344f0000354f0000364f0000374f0000384f0000394f00003a4f00003b4f00003c4f00003d4f00003e4f00003f4f0000404f0000414f0000424f0000434f0000444f0000454f0000464f0000474f0000484f0000494f00004a4f00004b4f00004c4f00004d4f00004e4f00004f4f0000504f0000514f0000524f0000534f0000544f0000554f0000564f0000574f0000584f0000594f00005a4f00005b4f00005c4f00005d4f00005e4f00005f4f0000604f0000614f0000624f0000634f0000644f0000654f0000664f0000674f0000684f0000694f00006a4f00006b4f00006c4f00006d4f00006e4f00006f4f0000704f0000714f0000724f0000734f0000744f0000754f0000764f0000774f0000784f0000794f00007a4f00007b4f00007c4f00007d4f00007e4f00007f4f0000804f0000814f0000824f0000834f0000844f0000854f0000864f0000874f0000884f0000894f00008a4f00008b4f00008c4f00008d4f00008e4f00008f4f0000904f0000914f0000924f0000934f0000944f0000954f0000964f0000974f0000984f0000994f00009a4f00009b4f00009c4f00009d4f00009e4f00009f4f0000 - m_AlignBytes: 16 - groupID: 182 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 20272 - particle2: 20273 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 20273 - particle2: 20274 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 20274 - particle2: 20275 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 20275 - particle2: 20276 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 20276 - particle2: 20277 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 20277 - particle2: 20278 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 20278 - particle2: 20279 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 20279 - particle2: 20280 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 20280 - particle2: 20281 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 20281 - particle2: 20282 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 20282 - particle2: 20283 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1937961234 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1937961235} - - component: {fileID: 1937961239} - - component: {fileID: 1937961238} - - component: {fileID: 1937961237} - - component: {fileID: 1937961236} - m_Layer: 0 - m_Name: Obi Rope (4) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1937961235 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1937961234} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.8, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1240601735} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1937961236 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1937961234} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1937961239} - m_Target: {fileID: 1937961235} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1937961237 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1937961234} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1937961238 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1937961234} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 182 ---- !u!114 &1937961239 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1937961234} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: a04f0000a14f0000a24f0000a34f0000a44f0000a54f0000a64f0000a74f0000a84f0000a94f0000aa4f0000ab4f0000ac4f0000ad4f0000ae4f0000af4f0000b04f0000b14f0000b24f0000b34f0000b44f0000b54f0000b64f0000b74f0000b84f0000b94f0000ba4f0000bb4f0000bc4f0000bd4f0000be4f0000bf4f0000c04f0000c14f0000c24f0000c34f0000c44f0000c54f0000c64f0000c74f0000c84f0000c94f0000ca4f0000cb4f0000cc4f0000cd4f0000ce4f0000cf4f0000d04f0000d14f0000d24f0000d34f0000d44f0000d54f0000d64f0000d74f0000d84f0000d94f0000da4f0000db4f0000dc4f0000dd4f0000de4f0000df4f0000e04f0000e14f0000e24f0000e34f0000e44f0000e54f0000e64f0000e74f0000e84f0000e94f0000ea4f0000eb4f0000ec4f0000ed4f0000ee4f0000ef4f0000f04f0000f14f0000f24f0000f34f0000f44f0000f54f0000f64f0000f74f0000f84f0000f94f0000fa4f0000fb4f0000fc4f0000fd4f0000fe4f0000ff4f0000005000000150000002500000035000000450000005500000065000000750000008500000095000000a5000000b5000000c5000000d5000000e5000000f500000 - m_AlignBytes: 16 - groupID: 183 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 20384 - particle2: 20385 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 20385 - particle2: 20386 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 20386 - particle2: 20387 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 20387 - particle2: 20388 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 20388 - particle2: 20389 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 20389 - particle2: 20390 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 20390 - particle2: 20391 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 20391 - particle2: 20392 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 20392 - particle2: 20393 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 20393 - particle2: 20394 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 20394 - particle2: 20395 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1946747525 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1946747526} - - component: {fileID: 1946747530} - - component: {fileID: 1946747529} - - component: {fileID: 1946747528} - - component: {fileID: 1946747527} - m_Layer: 0 - m_Name: Obi Rope (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1946747526 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1946747525} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.2, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1628171963} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1946747527 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1946747525} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1946747530} - m_Target: {fileID: 1946747526} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1946747528 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1946747525} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1946747529 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1946747525} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 183 ---- !u!114 &1946747530 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1946747525} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 105000001150000012500000135000001450000015500000165000001750000018500000195000001a5000001b5000001c5000001d5000001e5000001f500000205000002150000022500000235000002450000025500000265000002750000028500000295000002a5000002b5000002c5000002d5000002e5000002f500000305000003150000032500000335000003450000035500000365000003750000038500000395000003a5000003b5000003c5000003d5000003e5000003f500000405000004150000042500000435000004450000045500000465000004750000048500000495000004a5000004b5000004c5000004d5000004e5000004f500000505000005150000052500000535000005450000055500000565000005750000058500000595000005a5000005b5000005c5000005d5000005e5000005f500000605000006150000062500000635000006450000065500000665000006750000068500000695000006a5000006b5000006c5000006d5000006e5000006f500000705000007150000072500000735000007450000075500000765000007750000078500000795000007a5000007b5000007c5000007d5000007e5000007f500000 - m_AlignBytes: 16 - groupID: 184 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 20496 - particle2: 20497 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 20497 - particle2: 20498 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 20498 - particle2: 20499 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 20499 - particle2: 20500 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 20500 - particle2: 20501 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 20501 - particle2: 20502 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 20502 - particle2: 20503 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 20503 - particle2: 20504 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 20504 - particle2: 20505 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 20505 - particle2: 20506 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 20506 - particle2: 20507 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1948354617 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1948354618} - - component: {fileID: 1948354622} - - component: {fileID: 1948354621} - - component: {fileID: 1948354620} - - component: {fileID: 1948354619} - m_Layer: 0 - m_Name: Obi Rope (4) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1948354618 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1948354617} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.8, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 426164209} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1948354619 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1948354617} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1948354622} - m_Target: {fileID: 1948354618} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1948354620 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1948354617} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1948354621 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1948354617} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 184 ---- !u!114 &1948354622 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1948354617} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 805000008150000082500000835000008450000085500000865000008750000088500000895000008a5000008b5000008c5000008d5000008e5000008f500000905000009150000092500000935000009450000095500000965000009750000098500000995000009a5000009b5000009c5000009d5000009e5000009f500000a0500000a1500000a2500000a3500000a4500000a5500000a6500000a7500000a8500000a9500000aa500000ab500000ac500000ad500000ae500000af500000b0500000b1500000b2500000b3500000b4500000b5500000b6500000b7500000b8500000b9500000ba500000bb500000bc500000bd500000be500000bf500000c0500000c1500000c2500000c3500000c4500000c5500000c6500000c7500000c8500000c9500000ca500000cb500000cc500000cd500000ce500000cf500000d0500000d1500000d2500000d3500000d4500000d5500000d6500000d7500000d8500000d9500000da500000db500000dc500000dd500000de500000df500000e0500000e1500000e2500000e3500000e4500000e5500000e6500000e7500000e8500000e9500000ea500000eb500000ec500000ed500000ee500000ef500000 - m_AlignBytes: 16 - groupID: 185 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 20608 - particle2: 20609 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 20609 - particle2: 20610 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 20610 - particle2: 20611 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 20611 - particle2: 20612 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 20612 - particle2: 20613 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 20613 - particle2: 20614 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 20614 - particle2: 20615 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 20615 - particle2: 20616 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 20616 - particle2: 20617 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 20617 - particle2: 20618 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 20618 - particle2: 20619 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1948398664 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1948398665} - - component: {fileID: 1948398669} - - component: {fileID: 1948398668} - - component: {fileID: 1948398667} - - component: {fileID: 1948398666} - m_Layer: 0 - m_Name: Obi Rope (9) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1948398665 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1948398664} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.8, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 893001395} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1948398666 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1948398664} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1948398669} - m_Target: {fileID: 1948398665} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1948398667 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1948398664} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1948398668 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1948398664} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 185 ---- !u!114 &1948398669 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1948398664} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: f0500000f1500000f2500000f3500000f4500000f5500000f6500000f7500000f8500000f9500000fa500000fb500000fc500000fd500000fe500000ff500000005100000151000002510000035100000451000005510000065100000751000008510000095100000a5100000b5100000c5100000d5100000e5100000f510000105100001151000012510000135100001451000015510000165100001751000018510000195100001a5100001b5100001c5100001d5100001e5100001f510000205100002151000022510000235100002451000025510000265100002751000028510000295100002a5100002b5100002c5100002d5100002e5100002f510000305100003151000032510000335100003451000035510000365100003751000038510000395100003a5100003b5100003c5100003d5100003e5100003f510000405100004151000042510000435100004451000045510000465100004751000048510000495100004a5100004b5100004c5100004d5100004e5100004f510000505100005151000052510000535100005451000055510000565100005751000058510000595100005a5100005b5100005c5100005d5100005e5100005f510000 - m_AlignBytes: 16 - groupID: 186 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 20720 - particle2: 20721 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 20721 - particle2: 20722 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 20722 - particle2: 20723 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 20723 - particle2: 20724 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 20724 - particle2: 20725 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 20725 - particle2: 20726 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 20726 - particle2: 20727 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 20727 - particle2: 20728 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 20728 - particle2: 20729 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 20729 - particle2: 20730 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 20730 - particle2: 20731 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1964761413 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1964761414} - - component: {fileID: 1964761418} - - component: {fileID: 1964761417} - - component: {fileID: 1964761416} - - component: {fileID: 1964761415} - m_Layer: 0 - m_Name: Obi Rope (8) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1964761414 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1964761413} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.6, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1306593279} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1964761415 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1964761413} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1964761418} - m_Target: {fileID: 1964761414} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1964761416 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1964761413} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1964761417 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1964761413} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 186 ---- !u!114 &1964761418 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1964761413} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 605100006151000062510000635100006451000065510000665100006751000068510000695100006a5100006b5100006c5100006d5100006e5100006f510000705100007151000072510000735100007451000075510000765100007751000078510000795100007a5100007b5100007c5100007d5100007e5100007f510000805100008151000082510000835100008451000085510000865100008751000088510000895100008a5100008b5100008c5100008d5100008e5100008f510000905100009151000092510000935100009451000095510000965100009751000098510000995100009a5100009b5100009c5100009d5100009e5100009f510000a0510000a1510000a2510000a3510000a4510000a5510000a6510000a7510000a8510000a9510000aa510000ab510000ac510000ad510000ae510000af510000b0510000b1510000b2510000b3510000b4510000b5510000b6510000b7510000b8510000b9510000ba510000bb510000bc510000bd510000be510000bf510000c0510000c1510000c2510000c3510000c4510000c5510000c6510000c7510000c8510000c9510000ca510000cb510000cc510000cd510000ce510000cf510000 - m_AlignBytes: 16 - groupID: 187 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 20832 - particle2: 20833 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 20833 - particle2: 20834 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 20834 - particle2: 20835 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 20835 - particle2: 20836 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 20836 - particle2: 20837 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 20837 - particle2: 20838 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 20838 - particle2: 20839 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 20839 - particle2: 20840 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 20840 - particle2: 20841 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 20841 - particle2: 20842 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 20842 - particle2: 20843 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1970184122 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1970184123} - - component: {fileID: 1970184127} - - component: {fileID: 1970184126} - - component: {fileID: 1970184125} - - component: {fileID: 1970184124} - m_Layer: 0 - m_Name: Obi Rope (8) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1970184123 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1970184122} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.6, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1464717035} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1970184124 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1970184122} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1970184127} - m_Target: {fileID: 1970184123} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1970184125 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1970184122} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1970184126 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1970184122} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 187 ---- !u!114 &1970184127 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1970184122} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: d0510000d1510000d2510000d3510000d4510000d5510000d6510000d7510000d8510000d9510000da510000db510000dc510000dd510000de510000df510000e0510000e1510000e2510000e3510000e4510000e5510000e6510000e7510000e8510000e9510000ea510000eb510000ec510000ed510000ee510000ef510000f0510000f1510000f2510000f3510000f4510000f5510000f6510000f7510000f8510000f9510000fa510000fb510000fc510000fd510000fe510000ff510000005200000152000002520000035200000452000005520000065200000752000008520000095200000a5200000b5200000c5200000d5200000e5200000f520000105200001152000012520000135200001452000015520000165200001752000018520000195200001a5200001b5200001c5200001d5200001e5200001f520000205200002152000022520000235200002452000025520000265200002752000028520000295200002a5200002b5200002c5200002d5200002e5200002f520000305200003152000032520000335200003452000035520000365200003752000038520000395200003a5200003b5200003c5200003d5200003e5200003f520000 - m_AlignBytes: 16 - groupID: 188 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 20944 - particle2: 20945 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 20945 - particle2: 20946 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 20946 - particle2: 20947 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 20947 - particle2: 20948 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 20948 - particle2: 20949 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 20949 - particle2: 20950 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 20950 - particle2: 20951 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 20951 - particle2: 20952 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 20952 - particle2: 20953 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 20953 - particle2: 20954 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 20954 - particle2: 20955 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1977632069 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1977632070} - m_Layer: 0 - m_Name: Row (5) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1977632070 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1977632069} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -1} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 1600426037} - - {fileID: 1001012758} - - {fileID: 274966134} - - {fileID: 1189976174} - - {fileID: 1634777944} - - {fileID: 489080965} - - {fileID: 535373372} - - {fileID: 399904146} - - {fileID: 557556286} - - {fileID: 1472901347} - m_Father: {fileID: 1760688768} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1988484818 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1988484819} - - component: {fileID: 1988484823} - - component: {fileID: 1988484822} - - component: {fileID: 1988484821} - - component: {fileID: 1988484820} - m_Layer: 0 - m_Name: Obi Rope (5) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1988484819 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1988484818} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1798495239} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1988484820 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1988484818} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1988484823} - m_Target: {fileID: 1988484819} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1988484821 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1988484818} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1988484822 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1988484818} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 188 ---- !u!114 &1988484823 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1988484818} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 405200004152000042520000435200004452000045520000465200004752000048520000495200004a5200004b5200004c5200004d5200004e5200004f520000505200005152000052520000535200005452000055520000565200005752000058520000595200005a5200005b5200005c5200005d5200005e5200005f520000605200006152000062520000635200006452000065520000665200006752000068520000695200006a5200006b5200006c5200006d5200006e5200006f520000705200007152000072520000735200007452000075520000765200007752000078520000795200007a5200007b5200007c5200007d5200007e5200007f520000805200008152000082520000835200008452000085520000865200008752000088520000895200008a5200008b5200008c5200008d5200008e5200008f520000905200009152000092520000935200009452000095520000965200009752000098520000995200009a5200009b5200009c5200009d5200009e5200009f520000a0520000a1520000a2520000a3520000a4520000a5520000a6520000a7520000a8520000a9520000aa520000ab520000ac520000ad520000ae520000af520000 - m_AlignBytes: 16 - groupID: 189 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 21056 - particle2: 21057 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 21057 - particle2: 21058 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 21058 - particle2: 21059 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 21059 - particle2: 21060 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 21060 - particle2: 21061 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 21061 - particle2: 21062 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 21062 - particle2: 21063 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 21063 - particle2: 21064 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 21064 - particle2: 21065 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 21065 - particle2: 21066 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 21066 - particle2: 21067 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &1994012441 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1994012442} - - component: {fileID: 1994012446} - - component: {fileID: 1994012445} - - component: {fileID: 1994012444} - - component: {fileID: 1994012443} - m_Layer: 0 - m_Name: Obi Rope (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1994012442 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1994012441} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.2, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 779073863} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1994012443 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1994012441} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1994012446} - m_Target: {fileID: 1994012442} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1994012444 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1994012441} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &1994012445 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1994012441} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 189 ---- !u!114 &1994012446 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1994012441} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: b0520000b1520000b2520000b3520000b4520000b5520000b6520000b7520000b8520000b9520000ba520000bb520000bc520000bd520000be520000bf520000c0520000c1520000c2520000c3520000c4520000c5520000c6520000c7520000c8520000c9520000ca520000cb520000cc520000cd520000ce520000cf520000d0520000d1520000d2520000d3520000d4520000d5520000d6520000d7520000d8520000d9520000da520000db520000dc520000dd520000de520000df520000e0520000e1520000e2520000e3520000e4520000e5520000e6520000e7520000e8520000e9520000ea520000eb520000ec520000ed520000ee520000ef520000f0520000f1520000f2520000f3520000f4520000f5520000f6520000f7520000f8520000f9520000fa520000fb520000fc520000fd520000fe520000ff520000005300000153000002530000035300000453000005530000065300000753000008530000095300000a5300000b5300000c5300000d5300000e5300000f530000105300001153000012530000135300001453000015530000165300001753000018530000195300001a5300001b5300001c5300001d5300001e5300001f530000 - m_AlignBytes: 16 - groupID: 190 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 21168 - particle2: 21169 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 21169 - particle2: 21170 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 21170 - particle2: 21171 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 21171 - particle2: 21172 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 21172 - particle2: 21173 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 21173 - particle2: 21174 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 21174 - particle2: 21175 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 21175 - particle2: 21176 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 21176 - particle2: 21177 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 21177 - particle2: 21178 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 21178 - particle2: 21179 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &2009678976 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2009678977} - m_Layer: 0 - m_Name: Row - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &2009678977 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2009678976} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 163656624} - - {fileID: 2054724672} - - {fileID: 964498383} - - {fileID: 666418979} - - {fileID: 769380902} - - {fileID: 1437781649} - - {fileID: 1061430265} - - {fileID: 161507646} - - {fileID: 824780549} - - {fileID: 347068007} - m_Father: {fileID: 1027659676} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &2017265026 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2017265027} - - component: {fileID: 2017265031} - - component: {fileID: 2017265030} - - component: {fileID: 2017265029} - - component: {fileID: 2017265028} - m_Layer: 0 - m_Name: Obi Rope (9) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &2017265027 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2017265026} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.8, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 713844502} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &2017265028 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2017265026} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 2017265031} - m_Target: {fileID: 2017265027} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &2017265029 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2017265026} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &2017265030 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2017265026} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 190 ---- !u!114 &2017265031 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2017265026} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 205300002153000022530000235300002453000025530000265300002753000028530000295300002a5300002b5300002c5300002d5300002e5300002f530000305300003153000032530000335300003453000035530000365300003753000038530000395300003a5300003b5300003c5300003d5300003e5300003f530000405300004153000042530000435300004453000045530000465300004753000048530000495300004a5300004b5300004c5300004d5300004e5300004f530000505300005153000052530000535300005453000055530000565300005753000058530000595300005a5300005b5300005c5300005d5300005e5300005f530000605300006153000062530000635300006453000065530000665300006753000068530000695300006a5300006b5300006c5300006d5300006e5300006f530000705300007153000072530000735300007453000075530000765300007753000078530000795300007a5300007b5300007c5300007d5300007e5300007f530000805300008153000082530000835300008453000085530000865300008753000088530000895300008a5300008b5300008c5300008d5300008e5300008f530000 - m_AlignBytes: 16 - groupID: 191 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 21280 - particle2: 21281 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 21281 - particle2: 21282 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 21282 - particle2: 21283 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 21283 - particle2: 21284 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 21284 - particle2: 21285 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 21285 - particle2: 21286 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 21286 - particle2: 21287 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 21287 - particle2: 21288 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 21288 - particle2: 21289 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 21289 - particle2: 21290 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 21290 - particle2: 21291 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &2028909268 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2028909269} - - component: {fileID: 2028909273} - - component: {fileID: 2028909272} - - component: {fileID: 2028909271} - - component: {fileID: 2028909270} - m_Layer: 0 - m_Name: Obi Rope - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &2028909269 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2028909268} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 893001395} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &2028909270 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2028909268} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 2028909273} - m_Target: {fileID: 2028909269} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &2028909271 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2028909268} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &2028909272 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2028909268} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 191 ---- !u!114 &2028909273 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2028909268} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 905300009153000092530000935300009453000095530000965300009753000098530000995300009a5300009b5300009c5300009d5300009e5300009f530000a0530000a1530000a2530000a3530000a4530000a5530000a6530000a7530000a8530000a9530000aa530000ab530000ac530000ad530000ae530000af530000b0530000b1530000b2530000b3530000b4530000b5530000b6530000b7530000b8530000b9530000ba530000bb530000bc530000bd530000be530000bf530000c0530000c1530000c2530000c3530000c4530000c5530000c6530000c7530000c8530000c9530000ca530000cb530000cc530000cd530000ce530000cf530000d0530000d1530000d2530000d3530000d4530000d5530000d6530000d7530000d8530000d9530000da530000db530000dc530000dd530000de530000df530000e0530000e1530000e2530000e3530000e4530000e5530000e6530000e7530000e8530000e9530000ea530000eb530000ec530000ed530000ee530000ef530000f0530000f1530000f2530000f3530000f4530000f5530000f6530000f7530000f8530000f9530000fa530000fb530000fc530000fd530000fe530000ff530000 - m_AlignBytes: 16 - groupID: 192 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 21392 - particle2: 21393 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 21393 - particle2: 21394 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 21394 - particle2: 21395 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 21395 - particle2: 21396 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 21396 - particle2: 21397 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 21397 - particle2: 21398 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 21398 - particle2: 21399 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 21399 - particle2: 21400 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 21400 - particle2: 21401 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 21401 - particle2: 21402 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 21402 - particle2: 21403 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &2033391598 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2033391599} - - component: {fileID: 2033391603} - - component: {fileID: 2033391602} - - component: {fileID: 2033391601} - - component: {fileID: 2033391600} - m_Layer: 0 - m_Name: Obi Rope (9) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &2033391599 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2033391598} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.8, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 940408952} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &2033391600 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2033391598} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 2033391603} - m_Target: {fileID: 2033391599} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &2033391601 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2033391598} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &2033391602 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2033391598} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 192 ---- !u!114 &2033391603 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2033391598} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 005400000154000002540000035400000454000005540000065400000754000008540000095400000a5400000b5400000c5400000d5400000e5400000f540000105400001154000012540000135400001454000015540000165400001754000018540000195400001a5400001b5400001c5400001d5400001e5400001f540000205400002154000022540000235400002454000025540000265400002754000028540000295400002a5400002b5400002c5400002d5400002e5400002f540000305400003154000032540000335400003454000035540000365400003754000038540000395400003a5400003b5400003c5400003d5400003e5400003f540000405400004154000042540000435400004454000045540000465400004754000048540000495400004a5400004b5400004c5400004d5400004e5400004f540000505400005154000052540000535400005454000055540000565400005754000058540000595400005a5400005b5400005c5400005d5400005e5400005f540000605400006154000062540000635400006454000065540000665400006754000068540000695400006a5400006b5400006c5400006d5400006e5400006f540000 - m_AlignBytes: 16 - groupID: 193 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 21504 - particle2: 21505 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 21505 - particle2: 21506 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 21506 - particle2: 21507 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 21507 - particle2: 21508 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 21508 - particle2: 21509 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 21509 - particle2: 21510 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 21510 - particle2: 21511 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 21511 - particle2: 21512 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 21512 - particle2: 21513 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 21513 - particle2: 21514 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 21514 - particle2: 21515 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &2039851349 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2039851350} - - component: {fileID: 2039851354} - - component: {fileID: 2039851353} - - component: {fileID: 2039851352} - - component: {fileID: 2039851351} - m_Layer: 0 - m_Name: Obi Rope (2) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &2039851350 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2039851349} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.4, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 54623967} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &2039851351 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2039851349} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 2039851354} - m_Target: {fileID: 2039851350} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &2039851352 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2039851349} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &2039851353 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2039851349} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 193 ---- !u!114 &2039851354 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2039851349} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 705400007154000072540000735400007454000075540000765400007754000078540000795400007a5400007b5400007c5400007d5400007e5400007f540000805400008154000082540000835400008454000085540000865400008754000088540000895400008a5400008b5400008c5400008d5400008e5400008f540000905400009154000092540000935400009454000095540000965400009754000098540000995400009a5400009b5400009c5400009d5400009e5400009f540000a0540000a1540000a2540000a3540000a4540000a5540000a6540000a7540000a8540000a9540000aa540000ab540000ac540000ad540000ae540000af540000b0540000b1540000b2540000b3540000b4540000b5540000b6540000b7540000b8540000b9540000ba540000bb540000bc540000bd540000be540000bf540000c0540000c1540000c2540000c3540000c4540000c5540000c6540000c7540000c8540000c9540000ca540000cb540000cc540000cd540000ce540000cf540000d0540000d1540000d2540000d3540000d4540000d5540000d6540000d7540000d8540000d9540000da540000db540000dc540000dd540000de540000df540000 - m_AlignBytes: 16 - groupID: 194 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 21616 - particle2: 21617 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 21617 - particle2: 21618 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 21618 - particle2: 21619 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 21619 - particle2: 21620 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 21620 - particle2: 21621 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 21621 - particle2: 21622 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 21622 - particle2: 21623 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 21623 - particle2: 21624 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 21624 - particle2: 21625 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 21625 - particle2: 21626 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 21626 - particle2: 21627 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &2054724671 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2054724672} - - component: {fileID: 2054724676} - - component: {fileID: 2054724675} - - component: {fileID: 2054724674} - - component: {fileID: 2054724673} - m_Layer: 0 - m_Name: Obi Rope (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &2054724672 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2054724671} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.2, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 2009678977} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &2054724673 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2054724671} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 2054724676} - m_Target: {fileID: 2054724672} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &2054724674 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2054724671} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &2054724675 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2054724671} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 194 ---- !u!114 &2054724676 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2054724671} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: e0540000e1540000e2540000e3540000e4540000e5540000e6540000e7540000e8540000e9540000ea540000eb540000ec540000ed540000ee540000ef540000f0540000f1540000f2540000f3540000f4540000f5540000f6540000f7540000f8540000f9540000fa540000fb540000fc540000fd540000fe540000ff540000005500000155000002550000035500000455000005550000065500000755000008550000095500000a5500000b5500000c5500000d5500000e5500000f550000105500001155000012550000135500001455000015550000165500001755000018550000195500001a5500001b5500001c5500001d5500001e5500001f550000205500002155000022550000235500002455000025550000265500002755000028550000295500002a5500002b5500002c5500002d5500002e5500002f550000305500003155000032550000335500003455000035550000365500003755000038550000395500003a5500003b5500003c5500003d5500003e5500003f550000405500004155000042550000435500004455000045550000465500004755000048550000495500004a5500004b5500004c5500004d5500004e5500004f550000 - m_AlignBytes: 16 - groupID: 195 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 21728 - particle2: 21729 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 21729 - particle2: 21730 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 21730 - particle2: 21731 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 21731 - particle2: 21732 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 21732 - particle2: 21733 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 21733 - particle2: 21734 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 21734 - particle2: 21735 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 21735 - particle2: 21736 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 21736 - particle2: 21737 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 21737 - particle2: 21738 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 21738 - particle2: 21739 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &2058503949 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2058503950} - - component: {fileID: 2058503954} - - component: {fileID: 2058503953} - - component: {fileID: 2058503952} - - component: {fileID: 2058503951} - m_Layer: 0 - m_Name: Obi Rope (7) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &2058503950 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2058503949} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.4, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1062536481} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &2058503951 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2058503949} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 2058503954} - m_Target: {fileID: 2058503950} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &2058503952 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2058503949} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &2058503953 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2058503949} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 195 ---- !u!114 &2058503954 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2058503949} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 505500005155000052550000535500005455000055550000565500005755000058550000595500005a5500005b5500005c5500005d5500005e5500005f550000605500006155000062550000635500006455000065550000665500006755000068550000695500006a5500006b5500006c5500006d5500006e5500006f550000705500007155000072550000735500007455000075550000765500007755000078550000795500007a5500007b5500007c5500007d5500007e5500007f550000805500008155000082550000835500008455000085550000865500008755000088550000895500008a5500008b5500008c5500008d5500008e5500008f550000905500009155000092550000935500009455000095550000965500009755000098550000995500009a5500009b5500009c5500009d5500009e5500009f550000a0550000a1550000a2550000a3550000a4550000a5550000a6550000a7550000a8550000a9550000aa550000ab550000ac550000ad550000ae550000af550000b0550000b1550000b2550000b3550000b4550000b5550000b6550000b7550000b8550000b9550000ba550000bb550000bc550000bd550000be550000bf550000 - m_AlignBytes: 16 - groupID: 196 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 21840 - particle2: 21841 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 21841 - particle2: 21842 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 21842 - particle2: 21843 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 21843 - particle2: 21844 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 21844 - particle2: 21845 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 21845 - particle2: 21846 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 21846 - particle2: 21847 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 21847 - particle2: 21848 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 21848 - particle2: 21849 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 21849 - particle2: 21850 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 21850 - particle2: 21851 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &2078944945 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2078944946} - - component: {fileID: 2078944950} - - component: {fileID: 2078944949} - - component: {fileID: 2078944948} - - component: {fileID: 2078944947} - m_Layer: 0 - m_Name: Obi Rope (5) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &2078944946 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2078944945} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 426164209} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &2078944947 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2078944945} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 2078944950} - m_Target: {fileID: 2078944946} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &2078944948 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2078944945} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &2078944949 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2078944945} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 196 ---- !u!114 &2078944950 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2078944945} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: c0550000c1550000c2550000c3550000c4550000c5550000c6550000c7550000c8550000c9550000ca550000cb550000cc550000cd550000ce550000cf550000d0550000d1550000d2550000d3550000d4550000d5550000d6550000d7550000d8550000d9550000da550000db550000dc550000dd550000de550000df550000e0550000e1550000e2550000e3550000e4550000e5550000e6550000e7550000e8550000e9550000ea550000eb550000ec550000ed550000ee550000ef550000f0550000f1550000f2550000f3550000f4550000f5550000f6550000f7550000f8550000f9550000fa550000fb550000fc550000fd550000fe550000ff550000005600000156000002560000035600000456000005560000065600000756000008560000095600000a5600000b5600000c5600000d5600000e5600000f560000105600001156000012560000135600001456000015560000165600001756000018560000195600001a5600001b5600001c5600001d5600001e5600001f560000205600002156000022560000235600002456000025560000265600002756000028560000295600002a5600002b5600002c5600002d5600002e5600002f560000 - m_AlignBytes: 16 - groupID: 197 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 21952 - particle2: 21953 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 21953 - particle2: 21954 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 21954 - particle2: 21955 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 21955 - particle2: 21956 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 21956 - particle2: 21957 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 21957 - particle2: 21958 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 21958 - particle2: 21959 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 21959 - particle2: 21960 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 21960 - particle2: 21961 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 21961 - particle2: 21962 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 21962 - particle2: 21963 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &2102841794 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2102841797} - - component: {fileID: 2102841796} - m_Layer: 0 - m_Name: Obi Solver - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &2102841796 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2102841794} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9d174fab52f0c4b8399f25d5c3ea524c, type: 3} - m_Name: - m_EditorClassIdentifier: - simulateWhenInvisible: 1 - m_Backend: 0 - substeps: 2 - maxStepsPerFrame: 1 - synchronization: 0 - parameters: - mode: 0 - interpolation: 0 - gravity: {x: 0, y: -9.81, z: 0} - ambientWind: {x: 0, y: 0, z: 0} - foamGravityScale: 1 - damping: 0 - maxAnisotropy: 3 - sleepThreshold: 0.001 - maxVelocity: 50 - maxAngularVelocity: 10 - collisionMargin: 0.02 - maxDepenetration: 5 - colliderCCD: 1 - particleCCD: 0 - shockPropagation: 0 - surfaceCollisionIterations: 8 - surfaceCollisionTolerance: 0.005 - diffusionMask: {x: 1, y: 1, z: 1, w: 1} - m_MaxSurfaceChunks: 32768 - maxQueryResults: 8192 - maxFoamParticles: 8192 - maxParticleNeighbors: 128 - maxParticleContacts: 6 - useLimits: 0 - killOffLimitsParticles: 0 - boundaryLimits: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 5, y: 5, z: 5} - gravity: {x: 0, y: -9.81, z: 0} - gravitySpace: 1 - ambientWind: {x: 0, y: 0, z: 0} - windSpace: 1 - foamSubsteps: 1 - foamMinNeighbors: 3 - foamCollisions: 0 - maxFoamVelocityStretch: 0.3 - foamRadiusScale: 1 - foamFade: {x: 0.05, y: 0.8} - foamAccelAgingRange: {x: 0.5, y: 0.8} - foamAccelAging: 4 - foamVolumeDensity: 0.1 - foamAmbientDensity: 0.02 - foamScatterColor: {r: 0.8, g: 0.75, b: 0.7, a: 1} - foamAmbientColor: {r: 0.4, g: 0.5, b: 0.6, a: 1} - worldLinearInertiaScale: 0 - worldAngularInertiaScale: 0 - synchronousSpatialQueries: 0 - distanceConstraintParameters: - evaluationOrder: 0 - iterations: 1 - SORFactor: 1 - enabled: 1 - bendingConstraintParameters: - evaluationOrder: 0 - iterations: 1 - SORFactor: 1 - enabled: 1 - particleCollisionConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 - particleFrictionConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 - collisionConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 - frictionConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 - skinConstraintParameters: - evaluationOrder: 0 - iterations: 3 - SORFactor: 1 - enabled: 0 - volumeConstraintParameters: - evaluationOrder: 1 - iterations: 3 - SORFactor: 1 - enabled: 0 - shapeMatchingConstraintParameters: - evaluationOrder: 1 - iterations: 3 - SORFactor: 1 - enabled: 0 - tetherConstraintParameters: - evaluationOrder: 1 - iterations: 2 - SORFactor: 1 - enabled: 0 - pinConstraintParameters: - evaluationOrder: 0 - iterations: 1 - SORFactor: 1 - enabled: 1 - pinholeConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 - stitchConstraintParameters: - evaluationOrder: 1 - iterations: 5 - SORFactor: 1 - enabled: 0 - densityConstraintParameters: - evaluationOrder: 1 - iterations: 2 - SORFactor: 1 - enabled: 0 - stretchShearConstraintParameters: - evaluationOrder: 0 - iterations: 10 - SORFactor: 1 - enabled: 0 - bendTwistConstraintParameters: - evaluationOrder: 0 - iterations: 20 - SORFactor: 1 - enabled: 0 - chainConstraintParameters: - evaluationOrder: 0 - iterations: 3 - SORFactor: 1 - enabled: 0 ---- !u!4 &2102841797 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2102841794} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 1027659676} - - {fileID: 1760688768} - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &2120568195 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2120568196} - - component: {fileID: 2120568200} - - component: {fileID: 2120568199} - - component: {fileID: 2120568198} - - component: {fileID: 2120568197} - m_Layer: 0 - m_Name: Obi Rope (3) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &2120568196 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2120568195} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.6, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 54623967} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &2120568197 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2120568195} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 2120568200} - m_Target: {fileID: 2120568196} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &2120568198 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2120568195} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &2120568199 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2120568195} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 197 ---- !u!114 &2120568200 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2120568195} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 305600003156000032560000335600003456000035560000365600003756000038560000395600003a5600003b5600003c5600003d5600003e5600003f560000405600004156000042560000435600004456000045560000465600004756000048560000495600004a5600004b5600004c5600004d5600004e5600004f560000505600005156000052560000535600005456000055560000565600005756000058560000595600005a5600005b5600005c5600005d5600005e5600005f560000605600006156000062560000635600006456000065560000665600006756000068560000695600006a5600006b5600006c5600006d5600006e5600006f560000705600007156000072560000735600007456000075560000765600007756000078560000795600007a5600007b5600007c5600007d5600007e5600007f560000805600008156000082560000835600008456000085560000865600008756000088560000895600008a5600008b5600008c5600008d5600008e5600008f560000905600009156000092560000935600009456000095560000965600009756000098560000995600009a5600009b5600009c5600009d5600009e5600009f560000 - m_AlignBytes: 16 - groupID: 198 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 22064 - particle2: 22065 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 22065 - particle2: 22066 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 22066 - particle2: 22067 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 22067 - particle2: 22068 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 22068 - particle2: 22069 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 22069 - particle2: 22070 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 22070 - particle2: 22071 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 22071 - particle2: 22072 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 22072 - particle2: 22073 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 22073 - particle2: 22074 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 22074 - particle2: 22075 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &2127388784 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2127388785} - - component: {fileID: 2127388789} - - component: {fileID: 2127388788} - - component: {fileID: 2127388787} - - component: {fileID: 2127388786} - m_Layer: 0 - m_Name: Obi Rope (3) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &2127388785 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2127388784} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 0.6, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1464717035} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &2127388786 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2127388784} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 2127388789} - m_Target: {fileID: 2127388785} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &2127388787 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2127388784} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &2127388788 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2127388784} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 198 ---- !u!114 &2127388789 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2127388784} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: a0560000a1560000a2560000a3560000a4560000a5560000a6560000a7560000a8560000a9560000aa560000ab560000ac560000ad560000ae560000af560000b0560000b1560000b2560000b3560000b4560000b5560000b6560000b7560000b8560000b9560000ba560000bb560000bc560000bd560000be560000bf560000c0560000c1560000c2560000c3560000c4560000c5560000c6560000c7560000c8560000c9560000ca560000cb560000cc560000cd560000ce560000cf560000d0560000d1560000d2560000d3560000d4560000d5560000d6560000d7560000d8560000d9560000da560000db560000dc560000dd560000de560000df560000e0560000e1560000e2560000e3560000e4560000e5560000e6560000e7560000e8560000e9560000ea560000eb560000ec560000ed560000ee560000ef560000f0560000f1560000f2560000f3560000f4560000f5560000f6560000f7560000f8560000f9560000fa560000fb560000fc560000fd560000fe560000ff560000005700000157000002570000035700000457000005570000065700000757000008570000095700000a5700000b5700000c5700000d5700000e5700000f570000 - m_AlignBytes: 16 - groupID: 199 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 22176 - particle2: 22177 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 22177 - particle2: 22178 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 22178 - particle2: 22179 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 22179 - particle2: 22180 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 22180 - particle2: 22181 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 22181 - particle2: 22182 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 22182 - particle2: 22183 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 22183 - particle2: 22184 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 22184 - particle2: 22185 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 22185 - particle2: 22186 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 22186 - particle2: 22187 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &2145370370 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2145370371} - - component: {fileID: 2145370375} - - component: {fileID: 2145370374} - - component: {fileID: 2145370373} - - component: {fileID: 2145370372} - m_Layer: 0 - m_Name: Obi Rope (6) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &2145370371 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2145370370} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 1.2, y: 2, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 426164209} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &2145370372 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2145370370} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 2145370375} - m_Target: {fileID: 2145370371} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &2145370373 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2145370370} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.5 ---- !u!114 &2145370374 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2145370370} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 199 ---- !u!114 &2145370375 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2145370370} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 105700001157000012570000135700001457000015570000165700001757000018570000195700001a5700001b5700001c5700001d5700001e5700001f570000205700002157000022570000235700002457000025570000265700002757000028570000295700002a5700002b5700002c5700002d5700002e5700002f570000305700003157000032570000335700003457000035570000365700003757000038570000395700003a5700003b5700003c5700003d5700003e5700003f570000405700004157000042570000435700004457000045570000465700004757000048570000495700004a5700004b5700004c5700004d5700004e5700004f570000505700005157000052570000535700005457000055570000565700005757000058570000595700005a5700005b5700005c5700005d5700005e5700005f570000605700006157000062570000635700006457000065570000665700006757000068570000695700006a5700006b5700006c5700006d5700006e5700006f570000705700007157000072570000735700007457000075570000765700007757000078570000795700007a5700007b5700007c5700007d5700007e5700007f570000 - m_AlignBytes: 16 - groupID: 200 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 22288 - particle2: 22289 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 22289 - particle2: 22290 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 22290 - particle2: 22291 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 22291 - particle2: 22292 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 22292 - particle2: 22293 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 22293 - particle2: 22294 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 22294 - particle2: 22295 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 22295 - particle2: 22296 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 22296 - particle2: 22297 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 22297 - particle2: 22298 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 22298 - particle2: 22299 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.025 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &2045321430961851743 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2045321430962147711} - - component: {fileID: 2045321430962147714} - - component: {fileID: 2045321430962147713} - - component: {fileID: 2045321430962147712} - m_Layer: 0 - m_Name: Wind - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &2045321430962147711 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2045321430961851743} - serializedVersion: 2 - m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 792243030} - m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} ---- !u!114 &2045321430962147712 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2045321430961851743} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6757b231cedd544c583ef8aeaf773b2a, type: 3} - m_Name: - m_EditorClassIdentifier: - thickness: 0 - inverted: 0 - material: {fileID: 0} - filter: -65535 - m_SourceCollider: {fileID: 2045321430962147714} - m_DistanceField: {fileID: 0} ---- !u!114 &2045321430962147713 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2045321430961851743} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4978a525b6164476d96f5d28d8b309f8, type: 3} - m_Name: - m_EditorClassIdentifier: - m_SourceCollider: {fileID: 2045321430962147712} - type: 0 - mode: 2 - intensity: 10 - dampingDir: 0 - damping: 0 - minDistance: 0 - maxDistance: 0.1 - falloffPower: 1 - color: {r: 0, g: 0, b: 0, a: 0} - pulseIntensity: 0 - pulseFrequency: 0 - pulseSeed: 0 ---- !u!136 &2045321430962147714 -CapsuleCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2045321430961851743} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: 1.5 - m_Height: 5 - m_Direction: 2 - m_Center: {x: 0, y: 0, z: 2.5} ---- !u!1660057539 &9223372036854775807 -SceneRoots: - m_ObjectHideFlags: 0 - m_Roots: - - {fileID: 1002464896} - - {fileID: 421764872} - - {fileID: 1175446146} - - {fileID: 2102841797} - - {fileID: 920811577} - - {fileID: 1561375948} diff --git a/Assets/Obi/Samples/RopeAndRod/ComputeRopes.unity.meta b/Assets/Obi/Samples/RopeAndRod/ComputeRopes.unity.meta deleted file mode 100644 index d25af1a9d..000000000 --- a/Assets/Obi/Samples/RopeAndRod/ComputeRopes.unity.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 8fafd98b75e9b44ee8b37edf6f1adcd5 -labels: -- ObiRope -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Samples/RopeAndRod/Crane.unity b/Assets/Obi/Samples/RopeAndRod/Crane.unity index 6e63fe874..d08cd0dc3 100644 --- a/Assets/Obi/Samples/RopeAndRod/Crane.unity +++ b/Assets/Obi/Samples/RopeAndRod/Crane.unity @@ -94,7 +94,7 @@ LightmapSettings: m_TrainingDataDestination: TrainingData m_LightProbeSampleCountMultiplier: 4 m_LightingDataAsset: {fileID: 0} - m_LightingSettings: {fileID: 664654699} + m_LightingSettings: {fileID: 4890085278179872738, guid: f69d9bf90d79f8e4f9b48ca794a1f860, type: 2} --- !u!196 &5 NavMeshSettings: serializedVersion: 2 @@ -129,6 +129,7 @@ GameObject: m_Component: - component: {fileID: 60958072} - component: {fileID: 60958074} + - component: {fileID: 60958073} - component: {fileID: 60958075} m_Layer: 0 m_Name: Crane @@ -162,6 +163,21 @@ Transform: - {fileID: 1346965650} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &60958073 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 60958071} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1d9704d540ac448439a425526f6b2986, type: 3} + m_Name: + m_EditorClassIdentifier: + solvers: + - {fileID: 60958074} + substeps: 3 --- !u!114 &60958074 MonoBehaviour: m_ObjectHideFlags: 0 @@ -176,57 +192,23 @@ MonoBehaviour: m_EditorClassIdentifier: simulateWhenInvisible: 1 m_Backend: 1 - substeps: 4 - maxStepsPerFrame: 1 - synchronization: 0 parameters: mode: 0 interpolation: 0 gravity: {x: 0, y: -9.81, z: 0} - ambientWind: {x: 0, y: 0, z: 0} - foamGravityScale: 1 damping: 0.3 maxAnisotropy: 3 sleepThreshold: 0.001 - maxVelocity: 50 - maxAngularVelocity: 10 collisionMargin: 0.005 maxDepenetration: 5 - colliderCCD: 1 - particleCCD: 0 + continuousCollisionDetection: 1 shockPropagation: 0 surfaceCollisionIterations: 8 surfaceCollisionTolerance: 0.005 - diffusionMask: {x: 1, y: 1, z: 1, w: 1} - m_MaxSurfaceChunks: 32768 - maxQueryResults: 8192 - maxFoamParticles: 8192 - maxParticleNeighbors: 128 - maxParticleContacts: 6 - useLimits: 0 - killOffLimitsParticles: 0 - boundaryLimits: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 5, y: 5, z: 5} gravity: {x: 0, y: -9.81, z: 0} gravitySpace: 1 - ambientWind: {x: 0, y: 0, z: 0} - windSpace: 0 - foamSubsteps: 1 - foamMinNeighbors: 3 - foamCollisions: 0 - maxFoamVelocityStretch: 0.3 - foamRadiusScale: 1 - foamFade: {x: 0.05, y: 0.8} - foamAccelAgingRange: {x: 0.5, y: 0.8} - foamAccelAging: 4 - foamVolumeDensity: 0.1 - foamAmbientDensity: 0.02 - foamScatterColor: {r: 0.8, g: 0.75, b: 0.7, a: 1} - foamAmbientColor: {r: 0.4, g: 0.5, b: 0.6, a: 1} worldLinearInertiaScale: 0 worldAngularInertiaScale: 0 - synchronousSpatialQueries: 0 distanceConstraintParameters: evaluationOrder: 0 iterations: 2 @@ -282,11 +264,6 @@ MonoBehaviour: iterations: 1 SORFactor: 1 enabled: 1 - pinholeConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 stitchConstraintParameters: evaluationOrder: 1 iterations: 2 @@ -324,7 +301,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 5551d37f45fd044ff8768019501c20a5, type: 3} m_Name: m_EditorClassIdentifier: - speed: 1 --- !u!1 &71297249 GameObject: m_ObjectHideFlags: 0 @@ -683,6 +659,52 @@ PrefabInstance: insertIndex: -1 addedObject: {fileID: 506459883} m_SourcePrefab: {fileID: 100100000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} +--- !u!1 &459217661 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 459217663} + - component: {fileID: 459217662} + m_Layer: 0 + m_Name: BurstCollisionWorld + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &459217662 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 459217661} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f1a161c4294214a4fbcb7e9e94800494, type: 3} + m_Name: + m_EditorClassIdentifier: + cellSpans: + m_AlignBytes: 16 +--- !u!4 &459217663 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 459217661} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &476562058 GameObject: m_ObjectHideFlags: 0 @@ -808,7 +830,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 0} filter: -65535 m_SourceCollider: {fileID: 476562060} @@ -853,72 +874,10 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 0} filter: -65535 m_SourceCollider: {fileID: 506459882} m_DistanceField: {fileID: 11400000, guid: 5eb5ff1af3a3f4a14977448198c232ae, type: 2} ---- !u!850595691 &664654699 -LightingSettings: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Settings.lighting - serializedVersion: 9 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 1 - m_RealtimeEnvironmentLighting: 1 - m_BounceScale: 1 - m_AlbedoBoost: 1 - m_IndirectOutputScale: 1 - m_UsingShadowmask: 0 - m_BakeBackend: 1 - m_LightmapMaxSize: 1024 - m_LightmapSizeFixed: 0 - m_UseMipmapLimits: 1 - m_BakeResolution: 40 - m_Padding: 2 - m_LightmapCompression: 3 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 0 - m_CompAOExponentDirect: 0 - m_ExtractAO: 0 - m_MixedBakeMode: 1 - m_LightmapsBakeMode: 1 - m_FilterMode: 1 - m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} - m_ExportTrainingData: 0 - m_EnableWorkerProcessBaking: 1 - m_TrainingDataDestination: TrainingData - m_RealtimeResolution: 2 - m_ForceWhiteAlbedo: 0 - m_ForceUpdates: 0 - m_PVRCulling: 1 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 512 - m_PVREnvironmentSampleCount: 512 - m_PVREnvironmentReferencePointCount: 2048 - m_LightProbeSampleCountMultiplier: 4 - m_PVRBounces: 2 - m_PVRMinBounces: 2 - m_PVREnvironmentImportanceSampling: 0 - m_PVRFilteringMode: 2 - m_PVRDenoiserTypeDirect: 0 - m_PVRDenoiserTypeIndirect: 0 - m_PVRDenoiserTypeAO: 0 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 5 - m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_RespectSceneVisibilityWhenBakingGI: 0 --- !u!1 &665462091 GameObject: m_ObjectHideFlags: 0 @@ -1099,6 +1058,7 @@ GameObject: - component: {fileID: 1002464895} - component: {fileID: 1002464893} - component: {fileID: 1002464892} + - component: {fileID: 1002464897} m_Layer: 0 m_Name: Main Camera m_TagString: MainCamera @@ -1188,6 +1148,26 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1002464897 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1002464891} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 62e83a599724f45a4aa337d74764e572, type: 3} + m_Name: + m_EditorClassIdentifier: + skin: {fileID: 11400000, guid: b90d3c214c99743b0865fc0e0d1f1a15, type: 2} + threadColor: {r: 0, g: 1, b: 1, a: 1} + taskColor: {r: 0, g: 1, b: 0, a: 1} + parallelTaskColor: {r: 1, g: 0.8, b: 0.2, a: 1} + renderTaskColor: {r: 0.2, g: 0.7, b: 1, a: 1} + defaultTaskColor: {r: 1, g: 0.5, b: 0.2, a: 1} + showPercentages: 0 + profileThrottle: 30 --- !u!1 &1060357566 GameObject: m_ObjectHideFlags: 0 @@ -1355,7 +1335,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 0} filter: -65535 m_SourceCollider: {fileID: 1060357568} @@ -1645,6 +1624,8 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 1346965650} + - component: {fileID: 1346965645} + - component: {fileID: 1346965644} - component: {fileID: 1346965646} - component: {fileID: 1346965643} - component: {fileID: 1346965642} @@ -1674,15 +1655,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} m_Name: m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 10 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 uvAnchor: 1 uvScale: {x: 1, y: 3} normalizeV: 0 @@ -1703,7 +1675,62 @@ MonoBehaviour: decimation: 0 smoothing: 0 twist: 0 - indexInSystem: 0 +--- !u!23 &1346965644 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1346965641} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1346965645 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1346965641} + m_Mesh: {fileID: 1984461382} --- !u!114 &1346965646 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1716,15 +1743,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} m_Name: m_EditorClassIdentifier: - solverIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b0000007c0000007d0000007e0000007f000000800000008100000082000000830000008400000085000000860000008700000088000000890000008a0000008b0000008c0000008d0000008e0000008f00000090000000910000009200000093000000940000009500000096000000 - m_AlignBytes: 16 - groupID: 1 + solverIndices: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b0000007c0000007d0000007e0000007f000000800000008100000082000000830000008400000085000000860000008700000088000000890000008a0000008b0000008c0000008d0000008e0000008f00000090000000910000009200000093000000940000009500000096000000 m_CollisionMaterial: {fileID: 0} m_SurfaceCollisions: 1 - m_MassScale: 1 m_SelfCollisions: 1 - restLength_: 7.7972555 + restLength_: 7.78888 elements: - particle1: 0 particle2: 1 @@ -1788,127 +1811,127 @@ MonoBehaviour: tearResistance: 1 - particle1: 12 particle2: 13 - restLength: 0.14537738 + restLength: 0.14537717 constraintForce: 0 tearResistance: 1 - particle1: 13 particle2: 14 - restLength: 0.1453759 + restLength: 0.145376 constraintForce: 0 tearResistance: 1 - particle1: 14 particle2: 15 - restLength: 0.1453736 + restLength: 0.14537315 constraintForce: 0 tearResistance: 1 - particle1: 15 particle2: 16 - restLength: 0.1453681 + restLength: 0.14536862 constraintForce: 0 tearResistance: 1 - particle1: 16 particle2: 17 - restLength: 0.14536066 + restLength: 0.14536047 constraintForce: 0 tearResistance: 1 - particle1: 17 particle2: 18 - restLength: 0.14534824 + restLength: 0.14534782 constraintForce: 0 tearResistance: 1 - particle1: 18 particle2: 19 - restLength: 0.14533304 + restLength: 0.14533179 constraintForce: 0 tearResistance: 1 - particle1: 19 particle2: 20 - restLength: 0.15357469 + restLength: 0.15333234 constraintForce: 0 tearResistance: 1 - particle1: 20 particle2: 21 - restLength: 0.15364002 + restLength: 0.15336941 constraintForce: 0 tearResistance: 1 - particle1: 21 particle2: 22 - restLength: 0.15353157 + restLength: 0.15329686 constraintForce: 0 tearResistance: 1 - particle1: 22 particle2: 23 - restLength: 0.15287247 + restLength: 0.15281764 constraintForce: 0 tearResistance: 1 - particle1: 23 particle2: 24 - restLength: 0.16127203 + restLength: 0.16120628 constraintForce: 0 tearResistance: 1 - particle1: 24 particle2: 25 - restLength: 0.16471474 + restLength: 0.16455178 constraintForce: 0 tearResistance: 1 - particle1: 25 particle2: 26 - restLength: 0.16590177 + restLength: 0.16564642 constraintForce: 0 tearResistance: 1 - particle1: 26 particle2: 27 - restLength: 0.16516913 + restLength: 0.16537806 constraintForce: 0 tearResistance: 1 - particle1: 27 particle2: 28 - restLength: 0.16577673 + restLength: 0.16589169 constraintForce: 0 tearResistance: 1 - particle1: 28 particle2: 29 - restLength: 0.16574559 + restLength: 0.16580167 constraintForce: 0 tearResistance: 1 - particle1: 29 particle2: 30 - restLength: 0.16543151 + restLength: 0.16541299 constraintForce: 0 tearResistance: 1 - particle1: 30 particle2: 31 - restLength: 0.16553983 + restLength: 0.1656078 constraintForce: 0 tearResistance: 1 - particle1: 31 particle2: 32 - restLength: 0.16564094 + restLength: 0.16568695 constraintForce: 0 tearResistance: 1 - particle1: 32 particle2: 33 - restLength: 0.16553965 + restLength: 0.16556904 constraintForce: 0 tearResistance: 1 - particle1: 33 particle2: 34 - restLength: 0.1649676 + restLength: 0.164986 constraintForce: 0 tearResistance: 1 - particle1: 34 particle2: 35 - restLength: 0.1661948 + restLength: 0.16632591 constraintForce: 0 tearResistance: 1 - particle1: 35 particle2: 36 - restLength: 0.164499 + restLength: 0.16450676 constraintForce: 0 tearResistance: 1 - particle1: 36 particle2: 37 - restLength: 0.16432038 + restLength: 0.16437778 constraintForce: 0 tearResistance: 1 - particle1: 37 @@ -1958,27 +1981,24 @@ MonoBehaviour: tearResistance: 1 - particle1: 46 particle2: 47 - restLength: 0.14609504 + restLength: 0.14413904 constraintForce: 0 tearResistance: 1 - particle1: 47 particle2: 48 - restLength: 0.1464947 + restLength: 0.14454886 constraintForce: 0 tearResistance: 1 - particle1: 48 particle2: 49 - restLength: 0.14654693 + restLength: 0.14459378 constraintForce: 0 tearResistance: 1 - particle1: 49 particle2: 50 - restLength: 0.1460539 + restLength: 0.14410257 constraintForce: 0 tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.01 m_RopeBlueprint: {fileID: 11400000, guid: d3d21d979f26f472ca2945f4e727239c, type: 2} tearingEnabled: 0 tearResistanceMultiplier: 1000 @@ -1988,8 +2008,8 @@ MonoBehaviour: _stretchCompliance: 0 _maxCompression: 0 _bendConstraintsEnabled: 1 - _bendCompliance: 0.0001 - _maxBending: 0.02 + _bendCompliance: 0.1 + _maxBending: 0.01 _plasticYield: 0 _plasticCreep: 0 --- !u!114 &1346965647 @@ -2009,9 +2029,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: 1448059488115486757, guid: d3d21d979f26f472ca2945f4e727239c, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &1346965648 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2029,9 +2048,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: 8966044903772103319, guid: d3d21d979f26f472ca2945f4e727239c, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &1346965649 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2049,9 +2067,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: -4315519228067560828, guid: d3d21d979f26f472ca2945f4e727239c, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!4 &1346965650 Transform: m_ObjectHideFlags: 0 @@ -2084,9 +2101,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: 1429558885246807610, guid: d3d21d979f26f472ca2945f4e727239c, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &1346965652 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2104,9 +2120,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: 7435677298537737283, guid: d3d21d979f26f472ca2945f4e727239c, type: 2} m_AttachmentType: 1 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &1346965653 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2134,17 +2149,10 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c8b45ebbf86be4df6b0e6cd933812af2, type: 3} m_Name: m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 1679a1802f2014f3ebb22f30f3a94662, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - k__BackingField: {r: 1, g: 1, b: 1, a: 1} - k__BackingField: 1 + render: 1 + shader: {fileID: 4800000, guid: 801733041f66b49e1b3c2101471db877, type: 3} + particleColor: {r: 1, g: 1, b: 1, a: 1} + radiusScale: 1 --- !u!1 &1623874905 GameObject: m_ObjectHideFlags: 0 @@ -2667,7 +2675,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 11400000, guid: 56297c6e785b44eb28e469b62cedc016, type: 2} filter: -65535 m_SourceCollider: {fileID: 1704083323} @@ -2849,7 +2856,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 0} filter: -65535 m_SourceCollider: {fileID: 1779091964} @@ -2967,52 +2973,184 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1929056557} m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0} ---- !u!1 &2043533587 -GameObject: +--- !u!43 &1984461382 +Mesh: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2043533589} - - component: {fileID: 2043533588} - m_Layer: 0 - m_Name: BurstCollisionWorld - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &2043533588 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2043533587} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f1a161c4294214a4fbcb7e9e94800494, type: 3} - m_Name: - m_EditorClassIdentifier: - cellSpans: - m_AlignBytes: 16 ---- !u!4 &2043533589 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2043533587} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Name: extrudedMesh + serializedVersion: 12 + m_SubMeshes: + - serializedVersion: 2 + firstByte: 0 + indexCount: 0 + topology: 0 + baseVertex: 0 + firstVertex: 0 + vertexCount: 0 + localAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_Shapes: + vertices: [] + shapes: [] + channels: [] + fullWeights: [] + m_BindPose: [] + m_BoneNameHashes: + m_RootBoneNameHash: 0 + m_BonesAABB: [] + m_VariableBoneCountWeights: + m_Data: + m_MeshCompression: 0 + m_IsReadable: 1 + m_KeepVertices: 1 + m_KeepIndices: 1 + m_IndexFormat: 0 + m_IndexBuffer: + m_VertexData: + serializedVersion: 3 + m_VertexCount: 0 + m_Channels: + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + m_DataSize: 0 + _typelessdata: + m_CompressedMesh: + m_Vertices: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_UV: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Normals: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Tangents: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Weights: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_NormalSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_TangentSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_FloatColors: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_BoneIndices: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_Triangles: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_UVInfo: 0 + m_LocalAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_MeshUsageFlags: 0 + m_CookingOptions: 30 + m_BakedConvexCollisionMesh: + m_BakedTriangleCollisionMesh: + 'm_MeshMetrics[0]': 1 + 'm_MeshMetrics[1]': 1 + m_MeshOptimizationFlags: 1 + m_StreamData: + serializedVersion: 2 + offset: 0 + size: 0 + path: + m_MeshLodInfo: + serializedVersion: 2 + m_LodSelectionCurve: + serializedVersion: 1 + m_LodSlope: 0 + m_LodBias: 0 + m_NumLevels: 1 + m_SubMeshes: + - serializedVersion: 2 + m_Levels: + - serializedVersion: 1 + m_IndexStart: 0 + m_IndexCount: 0 --- !u!1 &2087273467 GameObject: m_ObjectHideFlags: 0 @@ -3135,4 +3273,4 @@ SceneRoots: - {fileID: 1060357570} - {fileID: 282899377} - {fileID: 1327725109} - - {fileID: 2043533589} + - {fileID: 459217663} diff --git a/Assets/Obi/Samples/RopeAndRod/CraneSettings.lighting b/Assets/Obi/Samples/RopeAndRod/CraneSettings.lighting new file mode 100644 index 000000000..7b83816d2 --- /dev/null +++ b/Assets/Obi/Samples/RopeAndRod/CraneSettings.lighting @@ -0,0 +1,63 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!850595691 &4890085278179872738 +LightingSettings: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: CraneSettings + serializedVersion: 9 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 1 + m_RealtimeEnvironmentLighting: 1 + m_BounceScale: 1 + m_AlbedoBoost: 1 + m_IndirectOutputScale: 1 + m_UsingShadowmask: 0 + m_BakeBackend: 1 + m_LightmapMaxSize: 1024 + m_LightmapSizeFixed: 0 + m_UseMipmapLimits: 1 + m_BakeResolution: 40 + m_Padding: 2 + m_LightmapCompression: 3 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 0 + m_CompAOExponentDirect: 0 + m_ExtractAO: 0 + m_MixedBakeMode: 1 + m_LightmapsBakeMode: 1 + m_FilterMode: 1 + m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + m_ExportTrainingData: 0 + m_EnableWorkerProcessBaking: 1 + m_TrainingDataDestination: TrainingData + m_RealtimeResolution: 2 + m_ForceWhiteAlbedo: 0 + m_ForceUpdates: 0 + m_PVRCulling: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVREnvironmentSampleCount: 512 + m_PVREnvironmentReferencePointCount: 2048 + m_LightProbeSampleCountMultiplier: 4 + m_PVRBounces: 2 + m_PVRMinBounces: 2 + m_PVREnvironmentImportanceSampling: 0 + m_PVRFilteringMode: 2 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_RespectSceneVisibilityWhenBakingGI: 0 diff --git a/Assets/Obi/Samples/RopeAndRod/CraneSettings.lighting.meta b/Assets/Obi/Samples/RopeAndRod/CraneSettings.lighting.meta new file mode 100644 index 000000000..36965af7a --- /dev/null +++ b/Assets/Obi/Samples/RopeAndRod/CraneSettings.lighting.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f69d9bf90d79f8e4f9b48ca794a1f860 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 4890085278179872738 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Samples/RopeAndRod/ElectricalWires.unity b/Assets/Obi/Samples/RopeAndRod/ElectricalWires.unity index 6b120e289..9ecb8d095 100644 --- a/Assets/Obi/Samples/RopeAndRod/ElectricalWires.unity +++ b/Assets/Obi/Samples/RopeAndRod/ElectricalWires.unity @@ -94,7 +94,7 @@ LightmapSettings: m_TrainingDataDestination: TrainingData m_LightProbeSampleCountMultiplier: 4 m_LightingDataAsset: {fileID: 0} - m_LightingSettings: {fileID: 1941304692} + m_LightingSettings: {fileID: 4890085278179872738, guid: 289c1df880d076c408af89fa15a84db6, type: 2} --- !u!196 &5 NavMeshSettings: serializedVersion: 2 @@ -244,7 +244,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 0} filter: -65535 m_SourceCollider: {fileID: 153317912} @@ -344,7 +343,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 11400000, guid: d368f2c47473d4bfb8dd9f08073cb403, type: 2} filter: -65535 m_SourceCollider: {fileID: 506459882} @@ -460,6 +458,8 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 574933238} + - component: {fileID: 574933237} + - component: {fileID: 574933236} - component: {fileID: 574933229} - component: {fileID: 574933235} - component: {fileID: 574933234} @@ -487,13 +487,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} m_Name: m_EditorClassIdentifier: - solverIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000 - m_AlignBytes: 16 - groupID: 1 + solverIndices: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000 m_CollisionMaterial: {fileID: 0} m_SurfaceCollisions: 0 - m_MassScale: 1 m_SelfCollisions: 0 restLength_: 2 elements: @@ -552,12 +548,9 @@ MonoBehaviour: restLength: 0.17657018 constraintForce: 0 tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 m_RopeBlueprint: {fileID: 11400000, guid: 61d053dd5abd943919947f833abd0569, type: 2} tearingEnabled: 1 - tearResistanceMultiplier: 600 + tearResistanceMultiplier: 450 tearRate: 1 _distanceConstraintsEnabled: 1 _stretchingScale: 1 @@ -565,7 +558,7 @@ MonoBehaviour: _maxCompression: 0 _bendConstraintsEnabled: 1 _bendCompliance: 0 - _maxBending: 0.01 + _maxBending: 0 _plasticYield: 0 _plasticCreep: 0 --- !u!114 &574933230 @@ -585,9 +578,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: 5567824606580605130, guid: 61d053dd5abd943919947f833abd0569, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &574933231 MonoBehaviour: m_ObjectHideFlags: 0 @@ -605,9 +597,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: 1812756508894959938, guid: 61d053dd5abd943919947f833abd0569, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &574933232 MonoBehaviour: m_ObjectHideFlags: 0 @@ -625,9 +616,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: -2436371210810594525, guid: 61d053dd5abd943919947f833abd0569, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &574933233 MonoBehaviour: m_ObjectHideFlags: 0 @@ -645,9 +635,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: 1986289758551400005, guid: 61d053dd5abd943919947f833abd0569, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &574933234 MonoBehaviour: m_ObjectHideFlags: 0 @@ -660,15 +649,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} m_Name: m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 uvAnchor: 0 uvScale: {x: 1, y: 3} normalizeV: 1 @@ -689,7 +669,62 @@ MonoBehaviour: decimation: 0 smoothing: 0 twist: 0 - indexInSystem: 0 +--- !u!23 &574933236 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 574933228} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &574933237 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 574933228} + m_Mesh: {fileID: 1984461382} --- !u!4 &574933238 Transform: m_ObjectHideFlags: 0 @@ -801,6 +836,184 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 593691592} m_CullTransparentMesh: 0 +--- !u!43 &651587430 +Mesh: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: extrudedMesh + serializedVersion: 12 + m_SubMeshes: + - serializedVersion: 2 + firstByte: 0 + indexCount: 0 + topology: 0 + baseVertex: 0 + firstVertex: 0 + vertexCount: 0 + localAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_Shapes: + vertices: [] + shapes: [] + channels: [] + fullWeights: [] + m_BindPose: [] + m_BoneNameHashes: + m_RootBoneNameHash: 0 + m_BonesAABB: [] + m_VariableBoneCountWeights: + m_Data: + m_MeshCompression: 0 + m_IsReadable: 1 + m_KeepVertices: 1 + m_KeepIndices: 1 + m_IndexFormat: 0 + m_IndexBuffer: + m_VertexData: + serializedVersion: 3 + m_VertexCount: 0 + m_Channels: + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + m_DataSize: 0 + _typelessdata: + m_CompressedMesh: + m_Vertices: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_UV: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Normals: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Tangents: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Weights: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_NormalSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_TangentSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_FloatColors: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_BoneIndices: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_Triangles: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_UVInfo: 0 + m_LocalAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_MeshUsageFlags: 0 + m_CookingOptions: 30 + m_BakedConvexCollisionMesh: + m_BakedTriangleCollisionMesh: + 'm_MeshMetrics[0]': 1 + 'm_MeshMetrics[1]': 1 + m_MeshOptimizationFlags: 1 + m_StreamData: + serializedVersion: 2 + offset: 0 + size: 0 + path: + m_MeshLodInfo: + serializedVersion: 2 + m_LodSelectionCurve: + serializedVersion: 1 + m_LodSlope: 0 + m_LodBias: 0 + m_NumLevels: 1 + m_SubMeshes: + - serializedVersion: 2 + m_Levels: + - serializedVersion: 1 + m_IndexStart: 0 + m_IndexCount: 0 --- !u!1 &1002464891 GameObject: m_ObjectHideFlags: 0 @@ -813,6 +1026,7 @@ GameObject: - component: {fileID: 1002464895} - component: {fileID: 1002464893} - component: {fileID: 1002464892} + - component: {fileID: 1002464897} m_Layer: 0 m_Name: Main Camera m_TagString: MainCamera @@ -902,6 +1116,26 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1002464897 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1002464891} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 62e83a599724f45a4aa337d74764e572, type: 3} + m_Name: + m_EditorClassIdentifier: + skin: {fileID: 11400000, guid: b90d3c214c99743b0865fc0e0d1f1a15, type: 2} + threadColor: {r: 0, g: 1, b: 1, a: 1} + taskColor: {r: 0, g: 1, b: 0, a: 1} + parallelTaskColor: {r: 1, g: 0.8, b: 0.2, a: 1} + renderTaskColor: {r: 0.2, g: 0.7, b: 1, a: 1} + defaultTaskColor: {r: 1, g: 0.5, b: 0.2, a: 1} + showPercentages: 0 + profileThrottle: 30 --- !u!1 &1083562909 GameObject: m_ObjectHideFlags: 0 @@ -1268,7 +1502,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 0} filter: -65535 m_SourceCollider: {fileID: 1189404433} @@ -1282,6 +1515,8 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 1346965650} + - component: {fileID: 1346965645} + - component: {fileID: 1346965644} - component: {fileID: 1346965642} - component: {fileID: 1346965646} - component: {fileID: 1346965643} @@ -1309,13 +1544,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} m_Name: m_EditorClassIdentifier: - solverIndices: - serializedContents: 700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b0000007c0000007d0000007e0000007f000000800000008100000082000000830000008400000085000000860000008700000088000000890000008a0000008b0000008c0000008d0000008e0000008f000000900000009100000092000000930000009400000095000000960000009700000098000000990000009a0000009b0000009c0000009d0000009e0000009f000000a0000000a1000000a2000000a3000000a4000000a5000000a6000000a7000000a8000000a9000000aa000000ab000000ac000000ad000000ae000000af000000b0000000b1000000b2000000b3000000b4000000b5000000b6000000b7000000b8000000b9000000ba000000bb000000bc000000bd000000be000000bf000000c0000000c1000000c2000000c3000000c4000000c5000000c6000000c7000000c8000000c9000000ca000000cb000000cc000000cd000000ce000000cf000000d0000000d1000000d2000000d3000000d4000000d5000000d6000000d7000000d8000000d9000000da000000db000000dc000000dd000000de000000df000000 - m_AlignBytes: 16 - groupID: 2 + solverIndices: 700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b0000007c0000007d0000007e0000007f000000800000008100000082000000830000008400000085000000860000008700000088000000890000008a0000008b0000008c0000008d0000008e0000008f000000900000009100000092000000930000009400000095000000960000009700000098000000990000009a0000009b0000009c0000009d0000009e0000009f000000a0000000a1000000a2000000a3000000a4000000a5000000a6000000a7000000a8000000a9000000aa000000ab000000ac000000ad000000ae000000af000000b0000000b1000000b2000000b3000000b4000000b5000000b6000000b7000000b8000000b9000000ba000000bb000000bc000000bd000000be000000bf000000c0000000c1000000c2000000c3000000c4000000c5000000c6000000c7000000c8000000c9000000ca000000cb000000cc000000cd000000ce000000cf000000d0000000d1000000d2000000d3000000d4000000d5000000d6000000d7000000d8000000d9000000da000000db000000dc000000dd000000de000000df000000 m_CollisionMaterial: {fileID: 0} m_SurfaceCollisions: 0 - m_MassScale: 1 m_SelfCollisions: 0 restLength_: 2 elements: @@ -1374,9 +1605,6 @@ MonoBehaviour: restLength: 0.17657018 constraintForce: 0 tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 m_RopeBlueprint: {fileID: 11400000, guid: 61d053dd5abd943919947f833abd0569, type: 2} tearingEnabled: 1 tearResistanceMultiplier: 450 @@ -1402,20 +1630,67 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} m_Name: m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 uvAnchor: 0 uvScale: {x: 1, y: 3} normalizeV: 1 section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} thicknessScale: 0.8 +--- !u!23 &1346965644 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1346965641} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1346965645 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1346965641} + m_Mesh: {fileID: 651587430} --- !u!114 &1346965646 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1431,7 +1706,6 @@ MonoBehaviour: decimation: 0 smoothing: 0 twist: 0 - indexInSystem: 1 --- !u!114 &1346965647 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1449,9 +1723,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: -2436371210810594525, guid: 61d053dd5abd943919947f833abd0569, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &1346965648 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1469,9 +1742,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: 1986289758551400005, guid: 61d053dd5abd943919947f833abd0569, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &1346965649 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1489,9 +1761,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: 5567824606580605130, guid: 61d053dd5abd943919947f833abd0569, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!4 &1346965650 Transform: m_ObjectHideFlags: 0 @@ -1524,9 +1795,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: 1812756508894959938, guid: 61d053dd5abd943919947f833abd0569, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &1346965652 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1544,6 +1814,230 @@ MonoBehaviour: plugTears: 1 plugStart: 0 plugEnd: 0 +--- !u!1 &1395255069 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1395255071} + - component: {fileID: 1395255070} + m_Layer: 0 + m_Name: BurstCollisionWorld + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1395255070 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1395255069} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f1a161c4294214a4fbcb7e9e94800494, type: 3} + m_Name: + m_EditorClassIdentifier: + cellSpans: + m_AlignBytes: 16 +--- !u!4 &1395255071 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1395255069} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!43 &1413863089 +Mesh: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: extrudedMesh + serializedVersion: 12 + m_SubMeshes: + - serializedVersion: 2 + firstByte: 0 + indexCount: 0 + topology: 0 + baseVertex: 0 + firstVertex: 0 + vertexCount: 0 + localAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_Shapes: + vertices: [] + shapes: [] + channels: [] + fullWeights: [] + m_BindPose: [] + m_BoneNameHashes: + m_RootBoneNameHash: 0 + m_BonesAABB: [] + m_VariableBoneCountWeights: + m_Data: + m_MeshCompression: 0 + m_IsReadable: 1 + m_KeepVertices: 1 + m_KeepIndices: 1 + m_IndexFormat: 0 + m_IndexBuffer: + m_VertexData: + serializedVersion: 3 + m_VertexCount: 0 + m_Channels: + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + m_DataSize: 0 + _typelessdata: + m_CompressedMesh: + m_Vertices: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_UV: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Normals: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Tangents: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Weights: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_NormalSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_TangentSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_FloatColors: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_BoneIndices: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_Triangles: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_UVInfo: 0 + m_LocalAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_MeshUsageFlags: 0 + m_CookingOptions: 30 + m_BakedConvexCollisionMesh: + m_BakedTriangleCollisionMesh: + 'm_MeshMetrics[0]': 1 + 'm_MeshMetrics[1]': 1 + m_MeshOptimizationFlags: 1 + m_StreamData: + serializedVersion: 2 + offset: 0 + size: 0 + path: + m_MeshLodInfo: + serializedVersion: 2 + m_LodSelectionCurve: + serializedVersion: 1 + m_LodSlope: 0 + m_LodBias: 0 + m_NumLevels: 1 + m_SubMeshes: + - serializedVersion: 2 + m_Levels: + - serializedVersion: 1 + m_IndexStart: 0 + m_IndexCount: 0 --- !u!1 &1544324415 GameObject: m_ObjectHideFlags: 0 @@ -1553,6 +2047,8 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 1544324425} + - component: {fileID: 1544324424} + - component: {fileID: 1544324423} - component: {fileID: 1544324416} - component: {fileID: 1544324422} - component: {fileID: 1544324421} @@ -1580,13 +2076,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} m_Name: m_EditorClassIdentifier: - solverIndices: - serializedContents: e0000000e1000000e2000000e3000000e4000000e5000000e6000000e7000000e8000000e9000000ea000000eb000000ec000000ed000000ee000000ef000000f0000000f1000000f2000000f3000000f4000000f5000000f6000000f7000000f8000000f9000000fa000000fb000000fc000000fd000000fe000000ff000000000100000101000002010000030100000401000005010000060100000701000008010000090100000a0100000b0100000c0100000d0100000e0100000f010000100100001101000012010000130100001401000015010000160100001701000018010000190100001a0100001b0100001c0100001d0100001e0100001f010000200100002101000022010000230100002401000025010000260100002701000028010000290100002a0100002b0100002c0100002d0100002e0100002f010000300100003101000032010000330100003401000035010000360100003701000038010000390100003a0100003b0100003c0100003d0100003e0100003f010000400100004101000042010000430100004401000045010000460100004701000048010000490100004a0100004b0100004c0100004d0100004e0100004f010000 - m_AlignBytes: 16 - groupID: 3 + solverIndices: e0000000e1000000e2000000e3000000e4000000e5000000e6000000e7000000e8000000e9000000ea000000eb000000ec000000ed000000ee000000ef000000f0000000f1000000f2000000f3000000f4000000f5000000f6000000f7000000f8000000f9000000fa000000fb000000fc000000fd000000fe000000ff000000000100000101000002010000030100000401000005010000060100000701000008010000090100000a0100000b0100000c0100000d0100000e0100000f010000100100001101000012010000130100001401000015010000160100001701000018010000190100001a0100001b0100001c0100001d0100001e0100001f010000200100002101000022010000230100002401000025010000260100002701000028010000290100002a0100002b0100002c0100002d0100002e0100002f010000300100003101000032010000330100003401000035010000360100003701000038010000390100003a0100003b0100003c0100003d0100003e0100003f010000400100004101000042010000430100004401000045010000460100004701000048010000490100004a0100004b0100004c0100004d0100004e0100004f010000 m_CollisionMaterial: {fileID: 0} m_SurfaceCollisions: 0 - m_MassScale: 1 m_SelfCollisions: 0 restLength_: 2 elements: @@ -1645,12 +2137,9 @@ MonoBehaviour: restLength: 0.17657018 constraintForce: 0 tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 m_RopeBlueprint: {fileID: 11400000, guid: 61d053dd5abd943919947f833abd0569, type: 2} tearingEnabled: 1 - tearResistanceMultiplier: 530 + tearResistanceMultiplier: 450 tearRate: 1 _distanceConstraintsEnabled: 1 _stretchingScale: 1 @@ -1678,9 +2167,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: 5567824606580605130, guid: 61d053dd5abd943919947f833abd0569, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &1544324418 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1698,9 +2186,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: 1812756508894959938, guid: 61d053dd5abd943919947f833abd0569, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &1544324419 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1718,9 +2205,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: -2436371210810594525, guid: 61d053dd5abd943919947f833abd0569, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &1544324420 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1738,9 +2224,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: 1986289758551400005, guid: 61d053dd5abd943919947f833abd0569, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &1544324421 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1753,15 +2238,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} m_Name: m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 uvAnchor: 0 uvScale: {x: 1, y: 3} normalizeV: 1 @@ -1782,7 +2258,62 @@ MonoBehaviour: decimation: 0 smoothing: 0 twist: 0 - indexInSystem: 2 +--- !u!23 &1544324423 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1544324415} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1544324424 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1544324415} + m_Mesh: {fileID: 1413863089} --- !u!4 &1544324425 Transform: m_ObjectHideFlags: 0 @@ -1815,6 +2346,184 @@ MonoBehaviour: plugTears: 1 plugStart: 0 plugEnd: 0 +--- !u!43 &1557977618 +Mesh: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: extrudedMesh + serializedVersion: 12 + m_SubMeshes: + - serializedVersion: 2 + firstByte: 0 + indexCount: 0 + topology: 0 + baseVertex: 0 + firstVertex: 0 + vertexCount: 0 + localAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_Shapes: + vertices: [] + shapes: [] + channels: [] + fullWeights: [] + m_BindPose: [] + m_BoneNameHashes: + m_RootBoneNameHash: 0 + m_BonesAABB: [] + m_VariableBoneCountWeights: + m_Data: + m_MeshCompression: 0 + m_IsReadable: 1 + m_KeepVertices: 1 + m_KeepIndices: 1 + m_IndexFormat: 0 + m_IndexBuffer: + m_VertexData: + serializedVersion: 3 + m_VertexCount: 0 + m_Channels: + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + m_DataSize: 0 + _typelessdata: + m_CompressedMesh: + m_Vertices: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_UV: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Normals: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Tangents: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Weights: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_NormalSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_TangentSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_FloatColors: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_BoneIndices: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_Triangles: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_UVInfo: 0 + m_LocalAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_MeshUsageFlags: 0 + m_CookingOptions: 30 + m_BakedConvexCollisionMesh: + m_BakedTriangleCollisionMesh: + 'm_MeshMetrics[0]': 1 + 'm_MeshMetrics[1]': 1 + m_MeshOptimizationFlags: 1 + m_StreamData: + serializedVersion: 2 + offset: 0 + size: 0 + path: + m_MeshLodInfo: + serializedVersion: 2 + m_LodSelectionCurve: + serializedVersion: 1 + m_LodSlope: 0 + m_LodBias: 0 + m_NumLevels: 1 + m_SubMeshes: + - serializedVersion: 2 + m_Levels: + - serializedVersion: 1 + m_IndexStart: 0 + m_IndexCount: 0 --- !u!1 &1634024679 GameObject: m_ObjectHideFlags: 0 @@ -1824,6 +2533,8 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 1634024689} + - component: {fileID: 1634024688} + - component: {fileID: 1634024687} - component: {fileID: 1634024680} - component: {fileID: 1634024686} - component: {fileID: 1634024685} @@ -1851,13 +2562,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} m_Name: m_EditorClassIdentifier: - solverIndices: - serializedContents: 500100005101000052010000530100005401000055010000560100005701000058010000590100005a0100005b0100005c0100005d0100005e0100005f010000600100006101000062010000630100006401000065010000660100006701000068010000690100006a0100006b0100006c0100006d0100006e0100006f010000700100007101000072010000730100007401000075010000760100007701000078010000790100007a0100007b0100007c0100007d0100007e0100007f010000800100008101000082010000830100008401000085010000860100008701000088010000890100008a0100008b0100008c0100008d0100008e0100008f010000900100009101000092010000930100009401000095010000960100009701000098010000990100009a0100009b0100009c0100009d0100009e0100009f010000a0010000a1010000a2010000a3010000a4010000a5010000a6010000a7010000a8010000a9010000aa010000ab010000ac010000ad010000ae010000af010000b0010000b1010000b2010000b3010000b4010000b5010000b6010000b7010000b8010000b9010000ba010000bb010000bc010000bd010000be010000bf010000 - m_AlignBytes: 16 - groupID: 4 + solverIndices: 500100005101000052010000530100005401000055010000560100005701000058010000590100005a0100005b0100005c0100005d0100005e0100005f010000600100006101000062010000630100006401000065010000660100006701000068010000690100006a0100006b0100006c0100006d0100006e0100006f010000700100007101000072010000730100007401000075010000760100007701000078010000790100007a0100007b0100007c0100007d0100007e0100007f010000800100008101000082010000830100008401000085010000860100008701000088010000890100008a0100008b0100008c0100008d0100008e0100008f010000900100009101000092010000930100009401000095010000960100009701000098010000990100009a0100009b0100009c0100009d0100009e0100009f010000a0010000a1010000a2010000a3010000a4010000a5010000a6010000a7010000a8010000a9010000aa010000ab010000ac010000ad010000ae010000af010000b0010000b1010000b2010000b3010000b4010000b5010000b6010000b7010000b8010000b9010000ba010000bb010000bc010000bd010000be010000bf010000 m_CollisionMaterial: {fileID: 0} m_SurfaceCollisions: 0 - m_MassScale: 1 m_SelfCollisions: 0 restLength_: 2 elements: @@ -1916,12 +2623,9 @@ MonoBehaviour: restLength: 0.17657018 constraintForce: 0 tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 m_RopeBlueprint: {fileID: 11400000, guid: 61d053dd5abd943919947f833abd0569, type: 2} tearingEnabled: 1 - tearResistanceMultiplier: 300 + tearResistanceMultiplier: 450 tearRate: 1 _distanceConstraintsEnabled: 1 _stretchingScale: 1 @@ -1929,7 +2633,7 @@ MonoBehaviour: _maxCompression: 0 _bendConstraintsEnabled: 1 _bendCompliance: 0 - _maxBending: 0.03 + _maxBending: 0 _plasticYield: 0 _plasticCreep: 0 --- !u!114 &1634024681 @@ -1949,9 +2653,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: 5567824606580605130, guid: 61d053dd5abd943919947f833abd0569, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &1634024682 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1969,9 +2672,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: 1812756508894959938, guid: 61d053dd5abd943919947f833abd0569, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &1634024683 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1989,9 +2691,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: -2436371210810594525, guid: 61d053dd5abd943919947f833abd0569, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &1634024684 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2009,9 +2710,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: 1986289758551400005, guid: 61d053dd5abd943919947f833abd0569, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &1634024685 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2024,15 +2724,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} m_Name: m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 uvAnchor: 0 uvScale: {x: 1, y: 3} normalizeV: 1 @@ -2053,7 +2744,62 @@ MonoBehaviour: decimation: 0 smoothing: 0 twist: 0 - indexInSystem: 3 +--- !u!23 &1634024687 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1634024679} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1634024688 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1634024679} + m_Mesh: {fileID: 2025647389} --- !u!4 &1634024689 Transform: m_ObjectHideFlags: 0 @@ -2086,67 +2832,362 @@ MonoBehaviour: plugTears: 1 plugStart: 0 plugEnd: 0 ---- !u!850595691 &1941304692 -LightingSettings: +--- !u!43 &1777534752 +Mesh: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: Settings.lighting - serializedVersion: 9 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 1 - m_RealtimeEnvironmentLighting: 1 - m_BounceScale: 1 - m_AlbedoBoost: 1 - m_IndirectOutputScale: 1 - m_UsingShadowmask: 0 - m_BakeBackend: 1 - m_LightmapMaxSize: 1024 - m_LightmapSizeFixed: 0 - m_UseMipmapLimits: 1 - m_BakeResolution: 40 - m_Padding: 2 - m_LightmapCompression: 3 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 0 - m_CompAOExponentDirect: 0 - m_ExtractAO: 0 - m_MixedBakeMode: 1 - m_LightmapsBakeMode: 1 - m_FilterMode: 1 - m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} - m_ExportTrainingData: 0 - m_EnableWorkerProcessBaking: 1 - m_TrainingDataDestination: TrainingData - m_RealtimeResolution: 2 - m_ForceWhiteAlbedo: 0 - m_ForceUpdates: 0 - m_PVRCulling: 1 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 512 - m_PVREnvironmentSampleCount: 512 - m_PVREnvironmentReferencePointCount: 2048 - m_LightProbeSampleCountMultiplier: 4 - m_PVRBounces: 2 - m_PVRMinBounces: 2 - m_PVREnvironmentImportanceSampling: 0 - m_PVRFilteringMode: 2 - m_PVRDenoiserTypeDirect: 0 - m_PVRDenoiserTypeIndirect: 0 - m_PVRDenoiserTypeAO: 0 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 5 - m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_RespectSceneVisibilityWhenBakingGI: 0 + m_Name: extrudedMesh + serializedVersion: 12 + m_SubMeshes: + - serializedVersion: 2 + firstByte: 0 + indexCount: 0 + topology: 0 + baseVertex: 0 + firstVertex: 0 + vertexCount: 0 + localAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_Shapes: + vertices: [] + shapes: [] + channels: [] + fullWeights: [] + m_BindPose: [] + m_BoneNameHashes: + m_RootBoneNameHash: 0 + m_BonesAABB: [] + m_VariableBoneCountWeights: + m_Data: + m_MeshCompression: 0 + m_IsReadable: 1 + m_KeepVertices: 1 + m_KeepIndices: 1 + m_IndexFormat: 0 + m_IndexBuffer: + m_VertexData: + serializedVersion: 3 + m_VertexCount: 0 + m_Channels: + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + m_DataSize: 0 + _typelessdata: + m_CompressedMesh: + m_Vertices: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_UV: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Normals: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Tangents: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Weights: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_NormalSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_TangentSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_FloatColors: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_BoneIndices: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_Triangles: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_UVInfo: 0 + m_LocalAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_MeshUsageFlags: 0 + m_CookingOptions: 30 + m_BakedConvexCollisionMesh: + m_BakedTriangleCollisionMesh: + 'm_MeshMetrics[0]': 1 + 'm_MeshMetrics[1]': 1 + m_MeshOptimizationFlags: 1 + m_StreamData: + serializedVersion: 2 + offset: 0 + size: 0 + path: + m_MeshLodInfo: + serializedVersion: 2 + m_LodSelectionCurve: + serializedVersion: 1 + m_LodSlope: 0 + m_LodBias: 0 + m_NumLevels: 1 + m_SubMeshes: + - serializedVersion: 2 + m_Levels: + - serializedVersion: 1 + m_IndexStart: 0 + m_IndexCount: 0 +--- !u!43 &1984461382 +Mesh: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: extrudedMesh + serializedVersion: 12 + m_SubMeshes: + - serializedVersion: 2 + firstByte: 0 + indexCount: 0 + topology: 0 + baseVertex: 0 + firstVertex: 0 + vertexCount: 0 + localAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_Shapes: + vertices: [] + shapes: [] + channels: [] + fullWeights: [] + m_BindPose: [] + m_BoneNameHashes: + m_RootBoneNameHash: 0 + m_BonesAABB: [] + m_VariableBoneCountWeights: + m_Data: + m_MeshCompression: 0 + m_IsReadable: 1 + m_KeepVertices: 1 + m_KeepIndices: 1 + m_IndexFormat: 0 + m_IndexBuffer: + m_VertexData: + serializedVersion: 3 + m_VertexCount: 0 + m_Channels: + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + m_DataSize: 0 + _typelessdata: + m_CompressedMesh: + m_Vertices: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_UV: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Normals: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Tangents: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Weights: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_NormalSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_TangentSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_FloatColors: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_BoneIndices: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_Triangles: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_UVInfo: 0 + m_LocalAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_MeshUsageFlags: 0 + m_CookingOptions: 30 + m_BakedConvexCollisionMesh: + m_BakedTriangleCollisionMesh: + 'm_MeshMetrics[0]': 1 + 'm_MeshMetrics[1]': 1 + m_MeshOptimizationFlags: 1 + m_StreamData: + serializedVersion: 2 + offset: 0 + size: 0 + path: + m_MeshLodInfo: + serializedVersion: 2 + m_LodSelectionCurve: + serializedVersion: 1 + m_LodSlope: 0 + m_LodBias: 0 + m_NumLevels: 1 + m_SubMeshes: + - serializedVersion: 2 + m_Levels: + - serializedVersion: 1 + m_IndexStart: 0 + m_IndexCount: 0 --- !u!1 &2021410671 GameObject: m_ObjectHideFlags: 0 @@ -2215,6 +3256,184 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!43 &2025647389 +Mesh: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: extrudedMesh + serializedVersion: 12 + m_SubMeshes: + - serializedVersion: 2 + firstByte: 0 + indexCount: 0 + topology: 0 + baseVertex: 0 + firstVertex: 0 + vertexCount: 0 + localAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_Shapes: + vertices: [] + shapes: [] + channels: [] + fullWeights: [] + m_BindPose: [] + m_BoneNameHashes: + m_RootBoneNameHash: 0 + m_BonesAABB: [] + m_VariableBoneCountWeights: + m_Data: + m_MeshCompression: 0 + m_IsReadable: 1 + m_KeepVertices: 1 + m_KeepIndices: 1 + m_IndexFormat: 0 + m_IndexBuffer: + m_VertexData: + serializedVersion: 3 + m_VertexCount: 0 + m_Channels: + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + m_DataSize: 0 + _typelessdata: + m_CompressedMesh: + m_Vertices: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_UV: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Normals: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Tangents: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Weights: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_NormalSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_TangentSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_FloatColors: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_BoneIndices: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_Triangles: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_UVInfo: 0 + m_LocalAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_MeshUsageFlags: 0 + m_CookingOptions: 30 + m_BakedConvexCollisionMesh: + m_BakedTriangleCollisionMesh: + 'm_MeshMetrics[0]': 1 + 'm_MeshMetrics[1]': 1 + m_MeshOptimizationFlags: 1 + m_StreamData: + serializedVersion: 2 + offset: 0 + size: 0 + path: + m_MeshLodInfo: + serializedVersion: 2 + m_LodSelectionCurve: + serializedVersion: 1 + m_LodSlope: 0 + m_LodBias: 0 + m_NumLevels: 1 + m_SubMeshes: + - serializedVersion: 2 + m_Levels: + - serializedVersion: 1 + m_IndexStart: 0 + m_IndexCount: 0 --- !u!1 &2025663232 GameObject: m_ObjectHideFlags: 0 @@ -2224,6 +3443,8 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 2025663242} + - component: {fileID: 2025663241} + - component: {fileID: 2025663240} - component: {fileID: 2025663233} - component: {fileID: 2025663239} - component: {fileID: 2025663238} @@ -2251,13 +3472,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} m_Name: m_EditorClassIdentifier: - solverIndices: - serializedContents: c0010000c1010000c2010000c3010000c4010000c5010000c6010000c7010000c8010000c9010000ca010000cb010000cc010000cd010000ce010000cf010000d0010000d1010000d2010000d3010000d4010000d5010000d6010000d7010000d8010000d9010000da010000db010000dc010000dd010000de010000df010000e0010000e1010000e2010000e3010000e4010000e5010000e6010000e7010000e8010000e9010000ea010000eb010000ec010000ed010000ee010000ef010000f0010000f1010000f2010000f3010000f4010000f5010000f6010000f7010000f8010000f9010000fa010000fb010000fc010000fd010000fe010000ff010000000200000102000002020000030200000402000005020000060200000702000008020000090200000a0200000b0200000c0200000d0200000e0200000f020000100200001102000012020000130200001402000015020000160200001702000018020000190200001a0200001b0200001c0200001d0200001e0200001f020000200200002102000022020000230200002402000025020000260200002702000028020000290200002a0200002b0200002c0200002d0200002e0200002f020000 - m_AlignBytes: 16 - groupID: 5 + solverIndices: c0010000c1010000c2010000c3010000c4010000c5010000c6010000c7010000c8010000c9010000ca010000cb010000cc010000cd010000ce010000cf010000d0010000d1010000d2010000d3010000d4010000d5010000d6010000d7010000d8010000d9010000da010000db010000dc010000dd010000de010000df010000e0010000e1010000e2010000e3010000e4010000e5010000e6010000e7010000e8010000e9010000ea010000eb010000ec010000ed010000ee010000ef010000f0010000f1010000f2010000f3010000f4010000f5010000f6010000f7010000f8010000f9010000fa010000fb010000fc010000fd010000fe010000ff010000000200000102000002020000030200000402000005020000060200000702000008020000090200000a0200000b0200000c0200000d0200000e0200000f020000100200001102000012020000130200001402000015020000160200001702000018020000190200001a0200001b0200001c0200001d0200001e0200001f020000200200002102000022020000230200002402000025020000260200002702000028020000290200002a0200002b0200002c0200002d0200002e0200002f020000 m_CollisionMaterial: {fileID: 0} m_SurfaceCollisions: 0 - m_MassScale: 1 m_SelfCollisions: 0 restLength_: 2 elements: @@ -2316,12 +3533,9 @@ MonoBehaviour: restLength: 0.17657018 constraintForce: 0 tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 m_RopeBlueprint: {fileID: 11400000, guid: 61d053dd5abd943919947f833abd0569, type: 2} tearingEnabled: 1 - tearResistanceMultiplier: 400 + tearResistanceMultiplier: 450 tearRate: 1 _distanceConstraintsEnabled: 1 _stretchingScale: 1 @@ -2329,7 +3543,7 @@ MonoBehaviour: _maxCompression: 0 _bendConstraintsEnabled: 1 _bendCompliance: 0 - _maxBending: 0.02 + _maxBending: 0 _plasticYield: 0 _plasticCreep: 0 --- !u!114 &2025663234 @@ -2349,9 +3563,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: 5567824606580605130, guid: 61d053dd5abd943919947f833abd0569, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &2025663235 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2369,9 +3582,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: 1812756508894959938, guid: 61d053dd5abd943919947f833abd0569, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &2025663236 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2389,9 +3601,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: -2436371210810594525, guid: 61d053dd5abd943919947f833abd0569, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &2025663237 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2409,9 +3620,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: 1986289758551400005, guid: 61d053dd5abd943919947f833abd0569, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &2025663238 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2424,15 +3634,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} m_Name: m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 uvAnchor: 0 uvScale: {x: 1, y: 3} normalizeV: 1 @@ -2453,7 +3654,62 @@ MonoBehaviour: decimation: 0 smoothing: 0 twist: 0 - indexInSystem: 4 +--- !u!23 &2025663240 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2025663232} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &2025663241 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2025663232} + m_Mesh: {fileID: 1557977618} --- !u!4 &2025663242 Transform: m_ObjectHideFlags: 0 @@ -2495,6 +3751,8 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 2060423119} + - component: {fileID: 2060423118} + - component: {fileID: 2060423117} - component: {fileID: 2060423110} - component: {fileID: 2060423116} - component: {fileID: 2060423115} @@ -2522,13 +3780,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} m_Name: m_EditorClassIdentifier: - solverIndices: - serializedContents: 300200003102000032020000330200003402000035020000360200003702000038020000390200003a0200003b0200003c0200003d0200003e0200003f020000400200004102000042020000430200004402000045020000460200004702000048020000490200004a0200004b0200004c0200004d0200004e0200004f020000500200005102000052020000530200005402000055020000560200005702000058020000590200005a0200005b0200005c0200005d0200005e0200005f020000600200006102000062020000630200006402000065020000660200006702000068020000690200006a0200006b0200006c0200006d0200006e0200006f020000700200007102000072020000730200007402000075020000760200007702000078020000790200007a0200007b0200007c0200007d0200007e0200007f020000800200008102000082020000830200008402000085020000860200008702000088020000890200008a0200008b0200008c0200008d0200008e0200008f020000900200009102000092020000930200009402000095020000960200009702000098020000990200009a0200009b0200009c0200009d0200009e0200009f020000 - m_AlignBytes: 16 - groupID: 6 + solverIndices: 300200003102000032020000330200003402000035020000360200003702000038020000390200003a0200003b0200003c0200003d0200003e0200003f020000400200004102000042020000430200004402000045020000460200004702000048020000490200004a0200004b0200004c0200004d0200004e0200004f020000500200005102000052020000530200005402000055020000560200005702000058020000590200005a0200005b0200005c0200005d0200005e0200005f020000600200006102000062020000630200006402000065020000660200006702000068020000690200006a0200006b0200006c0200006d0200006e0200006f020000700200007102000072020000730200007402000075020000760200007702000078020000790200007a0200007b0200007c0200007d0200007e0200007f020000800200008102000082020000830200008402000085020000860200008702000088020000890200008a0200008b0200008c0200008d0200008e0200008f020000900200009102000092020000930200009402000095020000960200009702000098020000990200009a0200009b0200009c0200009d0200009e0200009f020000 m_CollisionMaterial: {fileID: 0} m_SurfaceCollisions: 0 - m_MassScale: 1 m_SelfCollisions: 0 restLength_: 2 elements: @@ -2587,12 +3841,9 @@ MonoBehaviour: restLength: 0.17657018 constraintForce: 0 tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 m_RopeBlueprint: {fileID: 11400000, guid: 61d053dd5abd943919947f833abd0569, type: 2} tearingEnabled: 1 - tearResistanceMultiplier: 580 + tearResistanceMultiplier: 450 tearRate: 1 _distanceConstraintsEnabled: 1 _stretchingScale: 1 @@ -2600,7 +3851,7 @@ MonoBehaviour: _maxCompression: 0 _bendConstraintsEnabled: 1 _bendCompliance: 0 - _maxBending: 0.01 + _maxBending: 0 _plasticYield: 0 _plasticCreep: 0 --- !u!114 &2060423111 @@ -2620,9 +3871,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: 5567824606580605130, guid: 61d053dd5abd943919947f833abd0569, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &2060423112 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2640,9 +3890,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: 1812756508894959938, guid: 61d053dd5abd943919947f833abd0569, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &2060423113 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2660,9 +3909,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: -2436371210810594525, guid: 61d053dd5abd943919947f833abd0569, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &2060423114 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2680,9 +3928,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: 1986289758551400005, guid: 61d053dd5abd943919947f833abd0569, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &2060423115 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2695,15 +3942,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} m_Name: m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 uvAnchor: 0 uvScale: {x: 1, y: 3} normalizeV: 1 @@ -2724,7 +3962,62 @@ MonoBehaviour: decimation: 0 smoothing: 0 twist: 0 - indexInSystem: 5 +--- !u!23 &2060423117 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2060423109} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &2060423118 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2060423109} + m_Mesh: {fileID: 1777534752} --- !u!4 &2060423119 Transform: m_ObjectHideFlags: 0 @@ -2859,52 +4152,6 @@ RectTransform: m_AnchoredPosition: {x: 5.076124, y: 0.007500887} m_SizeDelta: {x: 200, y: 150} m_Pivot: {x: 0.5, y: 0.5} ---- !u!1 &2082090384 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2082090386} - - component: {fileID: 2082090385} - m_Layer: 0 - m_Name: BurstCollisionWorld - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &2082090385 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2082090384} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f1a161c4294214a4fbcb7e9e94800494, type: 3} - m_Name: - m_EditorClassIdentifier: - cellSpans: - m_AlignBytes: 16 ---- !u!4 &2082090386 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2082090384} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &2102841794 GameObject: m_ObjectHideFlags: 0 @@ -2915,6 +4162,7 @@ GameObject: m_Component: - component: {fileID: 2102841797} - component: {fileID: 2102841796} + - component: {fileID: 2102841795} m_Layer: 0 m_Name: Obi Solver m_TagString: Untagged @@ -2922,6 +4170,21 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 +--- !u!114 &2102841795 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2102841794} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1d9704d540ac448439a425526f6b2986, type: 3} + m_Name: + m_EditorClassIdentifier: + solvers: + - {fileID: 2102841796} + substeps: 2 --- !u!114 &2102841796 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2936,57 +4199,23 @@ MonoBehaviour: m_EditorClassIdentifier: simulateWhenInvisible: 1 m_Backend: 1 - substeps: 2 - maxStepsPerFrame: 1 - synchronization: 0 parameters: mode: 0 interpolation: 0 gravity: {x: 0, y: -9.81, z: 0} - ambientWind: {x: 0, y: 0, z: 0} - foamGravityScale: 1 damping: 0.3 maxAnisotropy: 3 sleepThreshold: 0.001 - maxVelocity: 50 - maxAngularVelocity: 10 collisionMargin: 0.02 maxDepenetration: 5 - colliderCCD: 1 - particleCCD: 0 + continuousCollisionDetection: 1 shockPropagation: 0 surfaceCollisionIterations: 8 surfaceCollisionTolerance: 0.005 - diffusionMask: {x: 1, y: 1, z: 1, w: 1} - m_MaxSurfaceChunks: 32768 - maxQueryResults: 8192 - maxFoamParticles: 8192 - maxParticleNeighbors: 128 - maxParticleContacts: 6 - useLimits: 0 - killOffLimitsParticles: 0 - boundaryLimits: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 5, y: 5, z: 5} gravity: {x: 0, y: -9.81, z: 0} gravitySpace: 1 - ambientWind: {x: 0, y: 0, z: 0} - windSpace: 1 - foamSubsteps: 1 - foamMinNeighbors: 3 - foamCollisions: 0 - maxFoamVelocityStretch: 0.3 - foamRadiusScale: 1 - foamFade: {x: 0.05, y: 0.8} - foamAccelAgingRange: {x: 0.5, y: 0.8} - foamAccelAging: 4 - foamVolumeDensity: 0.1 - foamAmbientDensity: 0.02 - foamScatterColor: {r: 0.8, g: 0.75, b: 0.7, a: 1} - foamAmbientColor: {r: 0.4, g: 0.5, b: 0.6, a: 1} worldLinearInertiaScale: 0 worldAngularInertiaScale: 0 - synchronousSpatialQueries: 0 distanceConstraintParameters: evaluationOrder: 0 iterations: 8 @@ -3042,11 +4271,6 @@ MonoBehaviour: iterations: 10 SORFactor: 1 enabled: 0 - pinholeConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 stitchConstraintParameters: evaluationOrder: 1 iterations: 5 @@ -3105,4 +4329,4 @@ SceneRoots: - {fileID: 153317914} - {fileID: 2021410674} - {fileID: 526830948} - - {fileID: 2082090386} + - {fileID: 1395255071} diff --git a/Assets/Obi/Samples/RopeAndRod/ElectricalWiresSettings.lighting b/Assets/Obi/Samples/RopeAndRod/ElectricalWiresSettings.lighting new file mode 100644 index 000000000..de39cee14 --- /dev/null +++ b/Assets/Obi/Samples/RopeAndRod/ElectricalWiresSettings.lighting @@ -0,0 +1,63 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!850595691 &4890085278179872738 +LightingSettings: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: ElectricalWiresSettings + serializedVersion: 9 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 1 + m_RealtimeEnvironmentLighting: 1 + m_BounceScale: 1 + m_AlbedoBoost: 1 + m_IndirectOutputScale: 1 + m_UsingShadowmask: 0 + m_BakeBackend: 1 + m_LightmapMaxSize: 1024 + m_LightmapSizeFixed: 0 + m_UseMipmapLimits: 1 + m_BakeResolution: 40 + m_Padding: 2 + m_LightmapCompression: 3 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 0 + m_CompAOExponentDirect: 0 + m_ExtractAO: 0 + m_MixedBakeMode: 1 + m_LightmapsBakeMode: 1 + m_FilterMode: 1 + m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + m_ExportTrainingData: 0 + m_EnableWorkerProcessBaking: 1 + m_TrainingDataDestination: TrainingData + m_RealtimeResolution: 2 + m_ForceWhiteAlbedo: 0 + m_ForceUpdates: 0 + m_PVRCulling: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVREnvironmentSampleCount: 512 + m_PVREnvironmentReferencePointCount: 2048 + m_LightProbeSampleCountMultiplier: 4 + m_PVRBounces: 2 + m_PVRMinBounces: 2 + m_PVREnvironmentImportanceSampling: 0 + m_PVRFilteringMode: 2 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_RespectSceneVisibilityWhenBakingGI: 0 diff --git a/Assets/Obi/Samples/RopeAndRod/ElectricalWiresSettings.lighting.meta b/Assets/Obi/Samples/RopeAndRod/ElectricalWiresSettings.lighting.meta new file mode 100644 index 000000000..b433fbfa3 --- /dev/null +++ b/Assets/Obi/Samples/RopeAndRod/ElectricalWiresSettings.lighting.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 289c1df880d076c408af89fa15a84db6 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 4890085278179872738 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Samples/RopeAndRod/Firehose.unity b/Assets/Obi/Samples/RopeAndRod/Firehose.unity index 76312c327..ffd7368d3 100644 --- a/Assets/Obi/Samples/RopeAndRod/Firehose.unity +++ b/Assets/Obi/Samples/RopeAndRod/Firehose.unity @@ -43,7 +43,7 @@ RenderSettings: LightmapSettings: m_ObjectHideFlags: 0 serializedVersion: 13 - m_BakeOnSceneLoad: 0 + m_BakeOnSceneLoad: 1 m_GISettings: serializedVersion: 2 m_BounceScale: 1 @@ -119,52 +119,6 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} ---- !u!1 &415326630 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 415326632} - - component: {fileID: 415326631} - m_Layer: 0 - m_Name: BurstCollisionWorld - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &415326631 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 415326630} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f1a161c4294214a4fbcb7e9e94800494, type: 3} - m_Name: - m_EditorClassIdentifier: - cellSpans: - m_AlignBytes: 16 ---- !u!4 &415326632 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 415326630} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &421764872 PrefabInstance: m_ObjectHideFlags: 0 @@ -260,7 +214,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 11400000, guid: 56297c6e785b44eb28e469b62cedc016, type: 2} filter: -65535 m_SourceCollider: {fileID: 506459882} @@ -367,6 +320,52 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0, y: 0} +--- !u!1 &931329520 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 931329522} + - component: {fileID: 931329521} + m_Layer: 0 + m_Name: BurstCollisionWorld + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &931329521 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 931329520} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f1a161c4294214a4fbcb7e9e94800494, type: 3} + m_Name: + m_EditorClassIdentifier: + cellSpans: + m_AlignBytes: 16 +--- !u!4 &931329522 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 931329520} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1002464891 GameObject: m_ObjectHideFlags: 0 @@ -379,6 +378,7 @@ GameObject: - component: {fileID: 1002464895} - component: {fileID: 1002464893} - component: {fileID: 1002464892} + - component: {fileID: 1002464897} m_Layer: 0 m_Name: Main Camera m_TagString: MainCamera @@ -468,6 +468,26 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1002464897 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1002464891} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 62e83a599724f45a4aa337d74764e572, type: 3} + m_Name: + m_EditorClassIdentifier: + skin: {fileID: 11400000, guid: b90d3c214c99743b0865fc0e0d1f1a15, type: 2} + threadColor: {r: 0, g: 1, b: 1, a: 1} + taskColor: {r: 0, g: 1, b: 0, a: 1} + parallelTaskColor: {r: 1, g: 0.8, b: 0.2, a: 1} + renderTaskColor: {r: 0.2, g: 0.7, b: 1, a: 1} + defaultTaskColor: {r: 1, g: 0.5, b: 0.2, a: 1} + showPercentages: 0 + profileThrottle: 30 --- !u!1 &1145597567 GameObject: m_ObjectHideFlags: 0 @@ -674,7 +694,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 0} filter: -65535 m_SourceCollider: {fileID: 1165207594} @@ -785,13 +804,14 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 1346965650} + - component: {fileID: 1346965645} + - component: {fileID: 1346965644} - component: {fileID: 1346965642} - component: {fileID: 1346965646} - component: {fileID: 1346965643} - component: {fileID: 1346965647} - component: {fileID: 1346965649} - component: {fileID: 1346965648} - - component: {fileID: 1346965651} m_Layer: 10 m_Name: Obi Rope m_TagString: Untagged @@ -811,13 +831,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} m_Name: m_EditorClassIdentifier: - solverIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f0000002000000021000000220000002300000024000000250000002600000027000000 - m_AlignBytes: 16 - groupID: 1 + solverIndices: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f0000002000000021000000220000002300000024000000250000002600000027000000 m_CollisionMaterial: {fileID: 0} m_SurfaceCollisions: 0 - m_MassScale: 1 m_SelfCollisions: 1 restLength_: 5.4620275 elements: @@ -1016,9 +1032,6 @@ MonoBehaviour: restLength: 0.13828081 constraintForce: 0 tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 m_RopeBlueprint: {fileID: 11400000, guid: b2fe09b5a1ae2424597b4776dc36fa5c, type: 2} tearingEnabled: 1 tearResistanceMultiplier: 450 @@ -1044,20 +1057,67 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} m_Name: m_EditorClassIdentifier: - material: {fileID: 2100000, guid: f342c944c10cc4c9188a4f352c6a6eee, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 uvAnchor: 0 uvScale: {x: 1, y: 8} normalizeV: 1 section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} thicknessScale: 0.8 +--- !u!23 &1346965644 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1346965641} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: f342c944c10cc4c9188a4f352c6a6eee, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1346965645 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1346965641} + m_Mesh: {fileID: 1984461382} --- !u!114 &1346965646 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1073,7 +1133,6 @@ MonoBehaviour: decimation: 0 smoothing: 0 twist: 0 - indexInSystem: 0 --- !u!114 &1346965647 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1096,7 +1155,7 @@ MonoBehaviour: flowSpeedMax: 7 minEmitRate: 50 maxEmitRate: 1000 - smoother: {fileID: 1346965646} + smoother: {fileID: 0} --- !u!114 &1346965648 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1114,9 +1173,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: 5505919189061892379, guid: b2fe09b5a1ae2424597b4776dc36fa5c, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &1346965649 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1134,9 +1192,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: -2867197770825267649, guid: b2fe09b5a1ae2424597b4776dc36fa5c, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!4 &1346965650 Transform: m_ObjectHideFlags: 0 @@ -1152,29 +1209,6 @@ Transform: m_Children: [] m_Father: {fileID: 2102841797} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1346965651 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1346965641} - m_Enabled: 0 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c8b45ebbf86be4df6b0e6cd933812af2, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 1679a1802f2014f3ebb22f30f3a94662, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - k__BackingField: {r: 1, g: 1, b: 1, a: 1} - k__BackingField: 1 --- !u!1 &1396980384 GameObject: m_ObjectHideFlags: 0 @@ -6023,6 +6057,184 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} +--- !u!43 &1984461382 +Mesh: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: extrudedMesh + serializedVersion: 12 + m_SubMeshes: + - serializedVersion: 2 + firstByte: 0 + indexCount: 0 + topology: 0 + baseVertex: 0 + firstVertex: 0 + vertexCount: 0 + localAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_Shapes: + vertices: [] + shapes: [] + channels: [] + fullWeights: [] + m_BindPose: [] + m_BoneNameHashes: + m_RootBoneNameHash: 0 + m_BonesAABB: [] + m_VariableBoneCountWeights: + m_Data: + m_MeshCompression: 0 + m_IsReadable: 1 + m_KeepVertices: 1 + m_KeepIndices: 1 + m_IndexFormat: 0 + m_IndexBuffer: + m_VertexData: + serializedVersion: 3 + m_VertexCount: 0 + m_Channels: + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + m_DataSize: 0 + _typelessdata: + m_CompressedMesh: + m_Vertices: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_UV: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Normals: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Tangents: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Weights: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_NormalSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_TangentSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_FloatColors: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_BoneIndices: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_Triangles: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_UVInfo: 0 + m_LocalAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_MeshUsageFlags: 0 + m_CookingOptions: 30 + m_BakedConvexCollisionMesh: + m_BakedTriangleCollisionMesh: + 'm_MeshMetrics[0]': 1 + 'm_MeshMetrics[1]': 1 + m_MeshOptimizationFlags: 1 + m_StreamData: + serializedVersion: 2 + offset: 0 + size: 0 + path: + m_MeshLodInfo: + serializedVersion: 2 + m_LodSelectionCurve: + serializedVersion: 1 + m_LodSlope: 0 + m_LodBias: 0 + m_NumLevels: 1 + m_SubMeshes: + - serializedVersion: 2 + m_Levels: + - serializedVersion: 1 + m_IndexStart: 0 + m_IndexCount: 0 --- !u!1 &2021410671 GameObject: m_ObjectHideFlags: 0 @@ -6101,6 +6313,7 @@ GameObject: m_Component: - component: {fileID: 2102841797} - component: {fileID: 2102841796} + - component: {fileID: 2102841795} - component: {fileID: 2102841800} - component: {fileID: 2102841799} - component: {fileID: 2102841798} @@ -6111,6 +6324,21 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 +--- !u!114 &2102841795 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2102841794} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1d9704d540ac448439a425526f6b2986, type: 3} + m_Name: + m_EditorClassIdentifier: + solvers: + - {fileID: 2102841796} + substeps: 8 --- !u!114 &2102841796 MonoBehaviour: m_ObjectHideFlags: 0 @@ -6125,57 +6353,23 @@ MonoBehaviour: m_EditorClassIdentifier: simulateWhenInvisible: 1 m_Backend: 1 - substeps: 4 - maxStepsPerFrame: 1 - synchronization: 0 parameters: mode: 0 interpolation: 0 gravity: {x: 0, y: -9.81, z: 0} - ambientWind: {x: 0, y: 0, z: 0} - foamGravityScale: 1 damping: 0.3 maxAnisotropy: 3 sleepThreshold: 0.0001 - maxVelocity: 50 - maxAngularVelocity: 20 collisionMargin: 0.02 maxDepenetration: 5 - colliderCCD: 1 - particleCCD: 0 + continuousCollisionDetection: 1 shockPropagation: 0 surfaceCollisionIterations: 8 surfaceCollisionTolerance: 0.005 - diffusionMask: {x: 1, y: 1, z: 1, w: 1} - m_MaxSurfaceChunks: 32768 - maxQueryResults: 8192 - maxFoamParticles: 8192 - maxParticleNeighbors: 128 - maxParticleContacts: 6 - useLimits: 0 - killOffLimitsParticles: 0 - boundaryLimits: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 5, y: 5, z: 5} gravity: {x: 0, y: -9.81, z: 0} gravitySpace: 1 - ambientWind: {x: 0, y: 0, z: 0} - windSpace: 1 - foamSubsteps: 1 - foamMinNeighbors: 3 - foamCollisions: 0 - maxFoamVelocityStretch: 0.3 - foamRadiusScale: 1 - foamFade: {x: 0.05, y: 0.8} - foamAccelAgingRange: {x: 0.5, y: 0.8} - foamAccelAging: 4 - foamVolumeDensity: 0.1 - foamAmbientDensity: 0.02 - foamScatterColor: {r: 0.8, g: 0.75, b: 0.7, a: 1} - foamAmbientColor: {r: 0.4, g: 0.5, b: 0.6, a: 1} worldLinearInertiaScale: 0 worldAngularInertiaScale: 0 - synchronousSpatialQueries: 0 distanceConstraintParameters: evaluationOrder: 0 iterations: 2 @@ -6231,11 +6425,6 @@ MonoBehaviour: iterations: 10 SORFactor: 1 enabled: 0 - pinholeConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 stitchConstraintParameters: evaluationOrder: 1 iterations: 5 @@ -6440,4 +6629,4 @@ SceneRoots: - {fileID: 526830948} - {fileID: 1165207597} - {fileID: 1396980388} - - {fileID: 415326632} + - {fileID: 931329522} diff --git a/Assets/Obi/Samples/RopeAndRod/FreightLift.unity b/Assets/Obi/Samples/RopeAndRod/FreightLift.unity index 09cd29fe5..f0597097c 100644 --- a/Assets/Obi/Samples/RopeAndRod/FreightLift.unity +++ b/Assets/Obi/Samples/RopeAndRod/FreightLift.unity @@ -94,7 +94,7 @@ LightmapSettings: m_TrainingDataDestination: TrainingData m_LightProbeSampleCountMultiplier: 4 m_LightingDataAsset: {fileID: 0} - m_LightingSettings: {fileID: 1093393307} + m_LightingSettings: {fileID: 4890085278179872738, guid: e875863d740c9574291a23470db6c52d, type: 2} --- !u!196 &5 NavMeshSettings: serializedVersion: 2 @@ -286,7 +286,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 0} filter: -65535 m_SourceCollider: {fileID: 99547756} @@ -458,7 +457,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 0} filter: -65535 m_SourceCollider: {fileID: 254982893} @@ -558,7 +556,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 11400000, guid: d368f2c47473d4bfb8dd9f08073cb403, type: 2} filter: -65535 m_SourceCollider: {fileID: 506459882} @@ -730,7 +727,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 0} filter: -65535 m_SourceCollider: {fileID: 522272190} @@ -744,6 +740,8 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 597266341} + - component: {fileID: 597266352} + - component: {fileID: 597266351} - component: {fileID: 597266344} - component: {fileID: 597266343} - component: {fileID: 597266342} @@ -785,15 +783,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} m_Name: m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 uvAnchor: 0 uvScale: {x: 1, y: 3} normalizeV: 0 @@ -814,7 +803,6 @@ MonoBehaviour: decimation: 0.02 smoothing: 0 twist: 0 - indexInSystem: 0 --- !u!114 &597266344 MonoBehaviour: m_ObjectHideFlags: 0 @@ -827,15 +815,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} m_Name: m_EditorClassIdentifier: - solverIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000 - m_AlignBytes: 16 - groupID: 1 + solverIndices: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000 m_CollisionMaterial: {fileID: 0} m_SurfaceCollisions: 0 - m_MassScale: 1 m_SelfCollisions: 1 - restLength_: 2.000002 + restLength_: 2 elements: - particle1: 0 particle2: 1 @@ -844,87 +828,84 @@ MonoBehaviour: tearResistance: 1 - particle1: 1 particle2: 2 - restLength: 0.11680669 + restLength: 0.11669767 constraintForce: 0 tearResistance: 1 - particle1: 2 particle2: 3 - restLength: 0.11829093 + restLength: 0.11849612 constraintForce: 0 tearResistance: 1 - particle1: 3 particle2: 4 - restLength: 0.117395446 + restLength: 0.11731398 constraintForce: 0 tearResistance: 1 - particle1: 4 particle2: 5 - restLength: 0.11783301 + restLength: 0.117768645 constraintForce: 0 tearResistance: 1 - particle1: 5 particle2: 6 - restLength: 0.11791115 + restLength: 0.11787382 constraintForce: 0 tearResistance: 1 - particle1: 6 particle2: 7 - restLength: 0.1178735 + restLength: 0.1178714 constraintForce: 0 tearResistance: 1 - particle1: 7 particle2: 8 - restLength: 0.117807046 + restLength: 0.11784513 constraintForce: 0 tearResistance: 1 - particle1: 8 particle2: 9 - restLength: 0.11774122 + restLength: 0.11781409 constraintForce: 0 tearResistance: 1 - particle1: 9 particle2: 10 - restLength: 0.11778654 + restLength: 0.117773324 constraintForce: 0 tearResistance: 1 - particle1: 10 particle2: 11 - restLength: 0.117860526 + restLength: 0.11769721 constraintForce: 0 tearResistance: 1 - particle1: 11 particle2: 12 - restLength: 0.11791558 + restLength: 0.117714405 constraintForce: 0 tearResistance: 1 - particle1: 12 particle2: 13 - restLength: 0.11788291 + restLength: 0.11811137 constraintForce: 0 tearResistance: 1 - particle1: 13 particle2: 14 - restLength: 0.11756081 + restLength: 0.11810517 constraintForce: 0 tearResistance: 1 - particle1: 14 particle2: 15 - restLength: 0.11787611 + restLength: 0.11729765 constraintForce: 0 tearResistance: 1 - particle1: 15 particle2: 16 - restLength: 0.11770154 + restLength: 0.11854333 constraintForce: 0 tearResistance: 1 - particle1: 16 particle2: 17 - restLength: 0.11705878 + restLength: 0.11637664 constraintForce: 0 tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 m_RopeBlueprint: {fileID: 11400000, guid: df057526865004da9ac53f3c8bc43d9f, type: 2} tearingEnabled: 0 tearResistanceMultiplier: 1000 @@ -955,9 +936,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: 1119723573710947368, guid: df057526865004da9ac53f3c8bc43d9f, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &597266346 MonoBehaviour: m_ObjectHideFlags: 0 @@ -975,9 +955,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: 1023878380947534591, guid: df057526865004da9ac53f3c8bc43d9f, type: 2} m_AttachmentType: 1 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &597266347 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1007,6 +986,62 @@ MonoBehaviour: m_CursorMu: 0.95 m_SourceMu: 0.95 direction: 0 +--- !u!23 &597266351 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 597266340} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &597266352 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 597266340} + m_Mesh: {fileID: 2025647389} --- !u!1 &849349590 GameObject: m_ObjectHideFlags: 0 @@ -1253,7 +1288,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 0} filter: -65535 m_SourceCollider: {fileID: 865561432} @@ -1369,6 +1403,8 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 977238587} + - component: {fileID: 977238598} + - component: {fileID: 977238597} - component: {fileID: 977238590} - component: {fileID: 977238589} - component: {fileID: 977238588} @@ -1411,15 +1447,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} m_Name: m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 uvAnchor: 0 uvScale: {x: 1, y: 3} normalizeV: 0 @@ -1440,7 +1467,6 @@ MonoBehaviour: decimation: 0.02 smoothing: 0 twist: 0 - indexInSystem: 1 --- !u!114 &977238590 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1453,15 +1479,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} m_Name: m_EditorClassIdentifier: - solverIndices: - serializedContents: 760000007700000078000000790000007a0000007b0000007c0000007d0000007e0000007f000000800000008100000082000000830000008400000085000000860000008700000088000000890000008a0000008b0000008c0000008d0000008e0000008f000000900000009100000092000000930000009400000095000000960000009700000098000000990000009a0000009b0000009c0000009d0000009e0000009f000000a0000000a1000000a2000000a3000000a4000000a5000000a6000000a7000000a8000000a9000000aa000000ab000000ac000000ad000000ae000000af000000b0000000b1000000b2000000b3000000b4000000b5000000b6000000b7000000b8000000b9000000ba000000bb000000bc000000bd000000be000000bf000000c0000000c1000000c2000000c3000000c4000000c5000000c6000000c7000000c8000000c9000000ca000000cb000000cc000000cd000000ce000000cf000000d0000000d1000000d2000000d3000000d4000000d5000000d6000000d7000000d8000000d9000000da000000db000000dc000000dd000000de000000df000000e0000000e1000000e2000000e3000000e4000000e5000000e6000000e7000000e8000000e9000000ea000000eb000000 - m_AlignBytes: 16 - groupID: 2 + solverIndices: 760000007700000078000000790000007a0000007b0000007c0000007d0000007e0000007f000000800000008100000082000000830000008400000085000000860000008700000088000000890000008a0000008b0000008c0000008d0000008e0000008f000000900000009100000092000000930000009400000095000000960000009700000098000000990000009a0000009b0000009c0000009d0000009e0000009f000000a0000000a1000000a2000000a3000000a4000000a5000000a6000000a7000000a8000000a9000000aa000000ab000000ac000000ad000000ae000000af000000b0000000b1000000b2000000b3000000b4000000b5000000b6000000b7000000b8000000b9000000ba000000bb000000bc000000bd000000be000000bf000000c0000000c1000000c2000000c3000000c4000000c5000000c6000000c7000000c8000000c9000000ca000000cb000000cc000000cd000000ce000000cf000000d0000000d1000000d2000000d3000000d4000000d5000000d6000000d7000000d8000000d9000000da000000db000000dc000000dd000000de000000df000000e0000000e1000000e2000000e3000000e4000000e5000000e6000000e7000000e8000000e9000000ea000000eb000000 m_CollisionMaterial: {fileID: 0} m_SurfaceCollisions: 0 - m_MassScale: 1 m_SelfCollisions: 1 - restLength_: 2.000002 + restLength_: 2 elements: - particle1: 118 particle2: 119 @@ -1470,87 +1492,84 @@ MonoBehaviour: tearResistance: 1 - particle1: 119 particle2: 120 - restLength: 0.11680669 + restLength: 0.11669767 constraintForce: 0 tearResistance: 1 - particle1: 120 particle2: 121 - restLength: 0.11829093 + restLength: 0.11849612 constraintForce: 0 tearResistance: 1 - particle1: 121 particle2: 122 - restLength: 0.117395446 + restLength: 0.11731398 constraintForce: 0 tearResistance: 1 - particle1: 122 particle2: 123 - restLength: 0.11783301 + restLength: 0.117768645 constraintForce: 0 tearResistance: 1 - particle1: 123 particle2: 124 - restLength: 0.11791115 + restLength: 0.11787382 constraintForce: 0 tearResistance: 1 - particle1: 124 particle2: 125 - restLength: 0.1178735 + restLength: 0.1178714 constraintForce: 0 tearResistance: 1 - particle1: 125 particle2: 126 - restLength: 0.117807046 + restLength: 0.11784513 constraintForce: 0 tearResistance: 1 - particle1: 126 particle2: 127 - restLength: 0.11774122 + restLength: 0.11781409 constraintForce: 0 tearResistance: 1 - particle1: 127 particle2: 128 - restLength: 0.11778654 + restLength: 0.117773324 constraintForce: 0 tearResistance: 1 - particle1: 128 particle2: 129 - restLength: 0.117860526 + restLength: 0.11769721 constraintForce: 0 tearResistance: 1 - particle1: 129 particle2: 130 - restLength: 0.11791558 + restLength: 0.117714405 constraintForce: 0 tearResistance: 1 - particle1: 130 particle2: 131 - restLength: 0.11788291 + restLength: 0.11811137 constraintForce: 0 tearResistance: 1 - particle1: 131 particle2: 132 - restLength: 0.11756081 + restLength: 0.11810517 constraintForce: 0 tearResistance: 1 - particle1: 132 particle2: 133 - restLength: 0.11787611 + restLength: 0.11729765 constraintForce: 0 tearResistance: 1 - particle1: 133 particle2: 134 - restLength: 0.11770154 + restLength: 0.11854333 constraintForce: 0 tearResistance: 1 - particle1: 134 particle2: 135 - restLength: 0.11705878 + restLength: 0.11637664 constraintForce: 0 tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 m_RopeBlueprint: {fileID: 11400000, guid: df057526865004da9ac53f3c8bc43d9f, type: 2} tearingEnabled: 0 tearResistanceMultiplier: 1000 @@ -1581,9 +1600,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: 1119723573710947368, guid: df057526865004da9ac53f3c8bc43d9f, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &977238592 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1601,9 +1619,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: 1023878380947534591, guid: df057526865004da9ac53f3c8bc43d9f, type: 2} m_AttachmentType: 1 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &977238593 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1645,17 +1662,66 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c8b45ebbf86be4df6b0e6cd933812af2, type: 3} m_Name: m_EditorClassIdentifier: - material: {fileID: 0} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - k__BackingField: {r: 1, g: 1, b: 1, a: 1} - k__BackingField: 1 + render: 1 + shader: {fileID: 4800000, guid: 801733041f66b49e1b3c2101471db877, type: 3} + particleColor: {r: 1, g: 1, b: 1, a: 1} + radiusScale: 1 +--- !u!23 &977238597 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 977238586} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &977238598 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 977238586} + m_Mesh: {fileID: 1984461382} --- !u!1 &1002464891 GameObject: m_ObjectHideFlags: 0 @@ -1668,6 +1734,7 @@ GameObject: - component: {fileID: 1002464895} - component: {fileID: 1002464893} - component: {fileID: 1002464892} + - component: {fileID: 1002464897} m_Layer: 0 m_Name: Main Camera m_TagString: MainCamera @@ -1757,6 +1824,26 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1002464897 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1002464891} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 62e83a599724f45a4aa337d74764e572, type: 3} + m_Name: + m_EditorClassIdentifier: + skin: {fileID: 11400000, guid: b90d3c214c99743b0865fc0e0d1f1a15, type: 2} + threadColor: {r: 0, g: 1, b: 1, a: 1} + taskColor: {r: 0, g: 1, b: 0, a: 1} + parallelTaskColor: {r: 1, g: 0.8, b: 0.2, a: 1} + renderTaskColor: {r: 0.2, g: 0.7, b: 1, a: 1} + defaultTaskColor: {r: 1, g: 0.5, b: 0.2, a: 1} + showPercentages: 0 + profileThrottle: 30 --- !u!1 &1007350292 GameObject: m_ObjectHideFlags: 0 @@ -1792,67 +1879,6 @@ Transform: - {fileID: 977238587} m_Father: {fileID: 2102841797} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!850595691 &1093393307 -LightingSettings: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Settings.lighting - serializedVersion: 9 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 1 - m_RealtimeEnvironmentLighting: 1 - m_BounceScale: 1 - m_AlbedoBoost: 1 - m_IndirectOutputScale: 1 - m_UsingShadowmask: 0 - m_BakeBackend: 1 - m_LightmapMaxSize: 1024 - m_LightmapSizeFixed: 0 - m_UseMipmapLimits: 1 - m_BakeResolution: 40 - m_Padding: 2 - m_LightmapCompression: 3 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 0 - m_CompAOExponentDirect: 0 - m_ExtractAO: 0 - m_MixedBakeMode: 1 - m_LightmapsBakeMode: 1 - m_FilterMode: 1 - m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} - m_ExportTrainingData: 0 - m_EnableWorkerProcessBaking: 1 - m_TrainingDataDestination: TrainingData - m_RealtimeResolution: 2 - m_ForceWhiteAlbedo: 0 - m_ForceUpdates: 0 - m_PVRCulling: 1 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 512 - m_PVREnvironmentSampleCount: 512 - m_PVREnvironmentReferencePointCount: 2048 - m_LightProbeSampleCountMultiplier: 4 - m_PVRBounces: 2 - m_PVRMinBounces: 2 - m_PVREnvironmentImportanceSampling: 0 - m_PVRFilteringMode: 2 - m_PVRDenoiserTypeDirect: 0 - m_PVRDenoiserTypeIndirect: 0 - m_PVRDenoiserTypeAO: 0 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 5 - m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_RespectSceneVisibilityWhenBakingGI: 0 --- !u!1 &1175446144 GameObject: m_ObjectHideFlags: 0 @@ -1959,6 +1985,8 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 1398407820} + - component: {fileID: 1398407831} + - component: {fileID: 1398407830} - component: {fileID: 1398407823} - component: {fileID: 1398407822} - component: {fileID: 1398407821} @@ -2001,15 +2029,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} m_Name: m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 uvAnchor: 0 uvScale: {x: 1, y: 3} normalizeV: 0 @@ -2030,7 +2049,6 @@ MonoBehaviour: decimation: 0.02 smoothing: 0 twist: 0 - indexInSystem: 2 --- !u!114 &1398407823 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2043,15 +2061,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} m_Name: m_EditorClassIdentifier: - solverIndices: - serializedContents: ec000000ed000000ee000000ef000000f0000000f1000000f2000000f3000000f4000000f5000000f6000000f7000000f8000000f9000000fa000000fb000000fc000000fd000000fe000000ff000000000100000101000002010000030100000401000005010000060100000701000008010000090100000a0100000b0100000c0100000d0100000e0100000f010000100100001101000012010000130100001401000015010000160100001701000018010000190100001a0100001b0100001c0100001d0100001e0100001f010000200100002101000022010000230100002401000025010000260100002701000028010000290100002a0100002b0100002c0100002d0100002e0100002f010000300100003101000032010000330100003401000035010000360100003701000038010000390100003a0100003b0100003c0100003d0100003e0100003f010000400100004101000042010000430100004401000045010000460100004701000048010000490100004a0100004b0100004c0100004d0100004e0100004f010000500100005101000052010000530100005401000055010000560100005701000058010000590100005a0100005b0100005c0100005d0100005e0100005f0100006001000061010000 - m_AlignBytes: 16 - groupID: 3 + solverIndices: ec000000ed000000ee000000ef000000f0000000f1000000f2000000f3000000f4000000f5000000f6000000f7000000f8000000f9000000fa000000fb000000fc000000fd000000fe000000ff000000000100000101000002010000030100000401000005010000060100000701000008010000090100000a0100000b0100000c0100000d0100000e0100000f010000100100001101000012010000130100001401000015010000160100001701000018010000190100001a0100001b0100001c0100001d0100001e0100001f010000200100002101000022010000230100002401000025010000260100002701000028010000290100002a0100002b0100002c0100002d0100002e0100002f010000300100003101000032010000330100003401000035010000360100003701000038010000390100003a0100003b0100003c0100003d0100003e0100003f010000400100004101000042010000430100004401000045010000460100004701000048010000490100004a0100004b0100004c0100004d0100004e0100004f010000500100005101000052010000530100005401000055010000560100005701000058010000590100005a0100005b0100005c0100005d0100005e0100005f0100006001000061010000 m_CollisionMaterial: {fileID: 0} m_SurfaceCollisions: 0 - m_MassScale: 1 m_SelfCollisions: 1 - restLength_: 2.000002 + restLength_: 2 elements: - particle1: 236 particle2: 237 @@ -2060,87 +2074,84 @@ MonoBehaviour: tearResistance: 1 - particle1: 237 particle2: 238 - restLength: 0.11680669 + restLength: 0.11669767 constraintForce: 0 tearResistance: 1 - particle1: 238 particle2: 239 - restLength: 0.11829093 + restLength: 0.11849612 constraintForce: 0 tearResistance: 1 - particle1: 239 particle2: 240 - restLength: 0.117395446 + restLength: 0.11731398 constraintForce: 0 tearResistance: 1 - particle1: 240 particle2: 241 - restLength: 0.11783301 + restLength: 0.117768645 constraintForce: 0 tearResistance: 1 - particle1: 241 particle2: 242 - restLength: 0.11791115 + restLength: 0.11787382 constraintForce: 0 tearResistance: 1 - particle1: 242 particle2: 243 - restLength: 0.1178735 + restLength: 0.1178714 constraintForce: 0 tearResistance: 1 - particle1: 243 particle2: 244 - restLength: 0.117807046 + restLength: 0.11784513 constraintForce: 0 tearResistance: 1 - particle1: 244 particle2: 245 - restLength: 0.11774122 + restLength: 0.11781409 constraintForce: 0 tearResistance: 1 - particle1: 245 particle2: 246 - restLength: 0.11778654 + restLength: 0.117773324 constraintForce: 0 tearResistance: 1 - particle1: 246 particle2: 247 - restLength: 0.117860526 + restLength: 0.11769721 constraintForce: 0 tearResistance: 1 - particle1: 247 particle2: 248 - restLength: 0.11791558 + restLength: 0.117714405 constraintForce: 0 tearResistance: 1 - particle1: 248 particle2: 249 - restLength: 0.11788291 + restLength: 0.11811137 constraintForce: 0 tearResistance: 1 - particle1: 249 particle2: 250 - restLength: 0.11756081 + restLength: 0.11810517 constraintForce: 0 tearResistance: 1 - particle1: 250 particle2: 251 - restLength: 0.11787611 + restLength: 0.11729765 constraintForce: 0 tearResistance: 1 - particle1: 251 particle2: 252 - restLength: 0.11770154 + restLength: 0.11854333 constraintForce: 0 tearResistance: 1 - particle1: 252 particle2: 253 - restLength: 0.11705878 + restLength: 0.11637664 constraintForce: 0 tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 m_RopeBlueprint: {fileID: 11400000, guid: df057526865004da9ac53f3c8bc43d9f, type: 2} tearingEnabled: 0 tearResistanceMultiplier: 1000 @@ -2171,9 +2182,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: 1119723573710947368, guid: df057526865004da9ac53f3c8bc43d9f, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &1398407825 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2191,9 +2201,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: 1023878380947534591, guid: df057526865004da9ac53f3c8bc43d9f, type: 2} m_AttachmentType: 1 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &1398407826 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2235,18 +2244,245 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c8b45ebbf86be4df6b0e6cd933812af2, type: 3} m_Name: m_EditorClassIdentifier: - material: {fileID: 0} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - k__BackingField: {r: 1, g: 1, b: 1, a: 1} - k__BackingField: 1 ---- !u!1 &1834593282 + render: 1 + shader: {fileID: 4800000, guid: 801733041f66b49e1b3c2101471db877, type: 3} + particleColor: {r: 1, g: 1, b: 1, a: 1} + radiusScale: 1 +--- !u!23 &1398407830 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1398407819} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1398407831 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1398407819} + m_Mesh: {fileID: 1413863089} +--- !u!43 &1413863089 +Mesh: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: extrudedMesh + serializedVersion: 12 + m_SubMeshes: + - serializedVersion: 2 + firstByte: 0 + indexCount: 0 + topology: 0 + baseVertex: 0 + firstVertex: 0 + vertexCount: 0 + localAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_Shapes: + vertices: [] + shapes: [] + channels: [] + fullWeights: [] + m_BindPose: [] + m_BoneNameHashes: + m_RootBoneNameHash: 0 + m_BonesAABB: [] + m_VariableBoneCountWeights: + m_Data: + m_MeshCompression: 0 + m_IsReadable: 1 + m_KeepVertices: 1 + m_KeepIndices: 1 + m_IndexFormat: 0 + m_IndexBuffer: + m_VertexData: + serializedVersion: 3 + m_VertexCount: 0 + m_Channels: + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + m_DataSize: 0 + _typelessdata: + m_CompressedMesh: + m_Vertices: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_UV: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Normals: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Tangents: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Weights: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_NormalSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_TangentSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_FloatColors: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_BoneIndices: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_Triangles: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_UVInfo: 0 + m_LocalAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_MeshUsageFlags: 0 + m_CookingOptions: 30 + m_BakedConvexCollisionMesh: + m_BakedTriangleCollisionMesh: + 'm_MeshMetrics[0]': 1 + 'm_MeshMetrics[1]': 1 + m_MeshOptimizationFlags: 1 + m_StreamData: + serializedVersion: 2 + offset: 0 + size: 0 + path: + m_MeshLodInfo: + serializedVersion: 2 + m_LodSelectionCurve: + serializedVersion: 1 + m_LodSlope: 0 + m_LodBias: 0 + m_NumLevels: 1 + m_SubMeshes: + - serializedVersion: 2 + m_Levels: + - serializedVersion: 1 + m_IndexStart: 0 + m_IndexCount: 0 +--- !u!1 &1621829079 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -2254,8 +2490,8 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 1834593284} - - component: {fileID: 1834593283} + - component: {fileID: 1621829081} + - component: {fileID: 1621829080} m_Layer: 0 m_Name: BurstCollisionWorld m_TagString: Untagged @@ -2263,13 +2499,13 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!114 &1834593283 +--- !u!114 &1621829080 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1834593282} + m_GameObject: {fileID: 1621829079} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: f1a161c4294214a4fbcb7e9e94800494, type: 3} @@ -2277,13 +2513,13 @@ MonoBehaviour: m_EditorClassIdentifier: cellSpans: m_AlignBytes: 16 ---- !u!4 &1834593284 +--- !u!4 &1621829081 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1834593282} + m_GameObject: {fileID: 1621829079} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} @@ -2292,6 +2528,540 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!43 &1777534752 +Mesh: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: extrudedMesh + serializedVersion: 12 + m_SubMeshes: + - serializedVersion: 2 + firstByte: 0 + indexCount: 0 + topology: 0 + baseVertex: 0 + firstVertex: 0 + vertexCount: 0 + localAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_Shapes: + vertices: [] + shapes: [] + channels: [] + fullWeights: [] + m_BindPose: [] + m_BoneNameHashes: + m_RootBoneNameHash: 0 + m_BonesAABB: [] + m_VariableBoneCountWeights: + m_Data: + m_MeshCompression: 0 + m_IsReadable: 1 + m_KeepVertices: 1 + m_KeepIndices: 1 + m_IndexFormat: 0 + m_IndexBuffer: + m_VertexData: + serializedVersion: 3 + m_VertexCount: 0 + m_Channels: + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + m_DataSize: 0 + _typelessdata: + m_CompressedMesh: + m_Vertices: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_UV: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Normals: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Tangents: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Weights: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_NormalSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_TangentSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_FloatColors: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_BoneIndices: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_Triangles: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_UVInfo: 0 + m_LocalAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_MeshUsageFlags: 0 + m_CookingOptions: 30 + m_BakedConvexCollisionMesh: + m_BakedTriangleCollisionMesh: + 'm_MeshMetrics[0]': 1 + 'm_MeshMetrics[1]': 1 + m_MeshOptimizationFlags: 1 + m_StreamData: + serializedVersion: 2 + offset: 0 + size: 0 + path: + m_MeshLodInfo: + serializedVersion: 2 + m_LodSelectionCurve: + serializedVersion: 1 + m_LodSlope: 0 + m_LodBias: 0 + m_NumLevels: 1 + m_SubMeshes: + - serializedVersion: 2 + m_Levels: + - serializedVersion: 1 + m_IndexStart: 0 + m_IndexCount: 0 +--- !u!43 &1984461382 +Mesh: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: extrudedMesh + serializedVersion: 12 + m_SubMeshes: + - serializedVersion: 2 + firstByte: 0 + indexCount: 0 + topology: 0 + baseVertex: 0 + firstVertex: 0 + vertexCount: 0 + localAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_Shapes: + vertices: [] + shapes: [] + channels: [] + fullWeights: [] + m_BindPose: [] + m_BoneNameHashes: + m_RootBoneNameHash: 0 + m_BonesAABB: [] + m_VariableBoneCountWeights: + m_Data: + m_MeshCompression: 0 + m_IsReadable: 1 + m_KeepVertices: 1 + m_KeepIndices: 1 + m_IndexFormat: 0 + m_IndexBuffer: + m_VertexData: + serializedVersion: 3 + m_VertexCount: 0 + m_Channels: + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + m_DataSize: 0 + _typelessdata: + m_CompressedMesh: + m_Vertices: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_UV: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Normals: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Tangents: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Weights: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_NormalSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_TangentSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_FloatColors: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_BoneIndices: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_Triangles: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_UVInfo: 0 + m_LocalAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_MeshUsageFlags: 0 + m_CookingOptions: 30 + m_BakedConvexCollisionMesh: + m_BakedTriangleCollisionMesh: + 'm_MeshMetrics[0]': 1 + 'm_MeshMetrics[1]': 1 + m_MeshOptimizationFlags: 1 + m_StreamData: + serializedVersion: 2 + offset: 0 + size: 0 + path: + m_MeshLodInfo: + serializedVersion: 2 + m_LodSelectionCurve: + serializedVersion: 1 + m_LodSlope: 0 + m_LodBias: 0 + m_NumLevels: 1 + m_SubMeshes: + - serializedVersion: 2 + m_Levels: + - serializedVersion: 1 + m_IndexStart: 0 + m_IndexCount: 0 +--- !u!43 &2025647389 +Mesh: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: extrudedMesh + serializedVersion: 12 + m_SubMeshes: + - serializedVersion: 2 + firstByte: 0 + indexCount: 0 + topology: 0 + baseVertex: 0 + firstVertex: 0 + vertexCount: 0 + localAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_Shapes: + vertices: [] + shapes: [] + channels: [] + fullWeights: [] + m_BindPose: [] + m_BoneNameHashes: + m_RootBoneNameHash: 0 + m_BonesAABB: [] + m_VariableBoneCountWeights: + m_Data: + m_MeshCompression: 0 + m_IsReadable: 1 + m_KeepVertices: 1 + m_KeepIndices: 1 + m_IndexFormat: 0 + m_IndexBuffer: + m_VertexData: + serializedVersion: 3 + m_VertexCount: 0 + m_Channels: + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + m_DataSize: 0 + _typelessdata: + m_CompressedMesh: + m_Vertices: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_UV: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Normals: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Tangents: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Weights: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_NormalSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_TangentSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_FloatColors: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_BoneIndices: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_Triangles: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_UVInfo: 0 + m_LocalAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_MeshUsageFlags: 0 + m_CookingOptions: 30 + m_BakedConvexCollisionMesh: + m_BakedTriangleCollisionMesh: + 'm_MeshMetrics[0]': 1 + 'm_MeshMetrics[1]': 1 + m_MeshOptimizationFlags: 1 + m_StreamData: + serializedVersion: 2 + offset: 0 + size: 0 + path: + m_MeshLodInfo: + serializedVersion: 2 + m_LodSelectionCurve: + serializedVersion: 1 + m_LodSlope: 0 + m_LodBias: 0 + m_NumLevels: 1 + m_SubMeshes: + - serializedVersion: 2 + m_Levels: + - serializedVersion: 1 + m_IndexStart: 0 + m_IndexCount: 0 --- !u!1 &2091522316 GameObject: m_ObjectHideFlags: 0 @@ -2301,6 +3071,8 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 2091522317} + - component: {fileID: 2091522324} + - component: {fileID: 2091522323} - component: {fileID: 2091522320} - component: {fileID: 2091522319} - component: {fileID: 2091522318} @@ -2343,15 +3115,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} m_Name: m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 uvAnchor: 0 uvScale: {x: 1, y: 3} normalizeV: 0 @@ -2372,7 +3135,6 @@ MonoBehaviour: decimation: 0.02 smoothing: 0 twist: 0 - indexInSystem: 3 --- !u!114 &2091522320 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2385,15 +3147,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} m_Name: m_EditorClassIdentifier: - solverIndices: - serializedContents: 62010000630100006401000065010000660100006701000068010000690100006a0100006b0100006c0100006d0100006e0100006f010000700100007101000072010000730100007401000075010000760100007701000078010000790100007a0100007b0100007c0100007d0100007e0100007f010000800100008101000082010000830100008401000085010000860100008701000088010000890100008a0100008b0100008c0100008d0100008e0100008f010000900100009101000092010000930100009401000095010000960100009701000098010000990100009a0100009b0100009c0100009d0100009e0100009f010000a0010000a1010000a2010000a3010000a4010000a5010000a6010000a7010000a8010000a9010000aa010000ab010000ac010000ad010000ae010000af010000b0010000b1010000b2010000b3010000b4010000b5010000b6010000b7010000b8010000b9010000ba010000bb010000bc010000bd010000be010000bf010000c0010000c1010000c2010000c3010000c4010000c5010000c6010000c7010000c8010000c9010000ca010000cb010000cc010000cd010000ce010000cf010000d0010000d1010000d2010000d3010000d4010000d5010000d6010000d7010000 - m_AlignBytes: 16 - groupID: 4 + solverIndices: 62010000630100006401000065010000660100006701000068010000690100006a0100006b0100006c0100006d0100006e0100006f010000700100007101000072010000730100007401000075010000760100007701000078010000790100007a0100007b0100007c0100007d0100007e0100007f010000800100008101000082010000830100008401000085010000860100008701000088010000890100008a0100008b0100008c0100008d0100008e0100008f010000900100009101000092010000930100009401000095010000960100009701000098010000990100009a0100009b0100009c0100009d0100009e0100009f010000a0010000a1010000a2010000a3010000a4010000a5010000a6010000a7010000a8010000a9010000aa010000ab010000ac010000ad010000ae010000af010000b0010000b1010000b2010000b3010000b4010000b5010000b6010000b7010000b8010000b9010000ba010000bb010000bc010000bd010000be010000bf010000c0010000c1010000c2010000c3010000c4010000c5010000c6010000c7010000c8010000c9010000ca010000cb010000cc010000cd010000ce010000cf010000d0010000d1010000d2010000d3010000d4010000d5010000d6010000d7010000 m_CollisionMaterial: {fileID: 0} m_SurfaceCollisions: 0 - m_MassScale: 1 m_SelfCollisions: 1 - restLength_: 2.000002 + restLength_: 2 elements: - particle1: 354 particle2: 355 @@ -2402,87 +3160,84 @@ MonoBehaviour: tearResistance: 1 - particle1: 355 particle2: 356 - restLength: 0.11680669 + restLength: 0.11669767 constraintForce: 0 tearResistance: 1 - particle1: 356 particle2: 357 - restLength: 0.11829093 + restLength: 0.11849612 constraintForce: 0 tearResistance: 1 - particle1: 357 particle2: 358 - restLength: 0.117395446 + restLength: 0.11731398 constraintForce: 0 tearResistance: 1 - particle1: 358 particle2: 359 - restLength: 0.11783301 + restLength: 0.117768645 constraintForce: 0 tearResistance: 1 - particle1: 359 particle2: 360 - restLength: 0.11791115 + restLength: 0.11787382 constraintForce: 0 tearResistance: 1 - particle1: 360 particle2: 361 - restLength: 0.1178735 + restLength: 0.1178714 constraintForce: 0 tearResistance: 1 - particle1: 361 particle2: 362 - restLength: 0.117807046 + restLength: 0.11784513 constraintForce: 0 tearResistance: 1 - particle1: 362 particle2: 363 - restLength: 0.11774122 + restLength: 0.11781409 constraintForce: 0 tearResistance: 1 - particle1: 363 particle2: 364 - restLength: 0.11778654 + restLength: 0.117773324 constraintForce: 0 tearResistance: 1 - particle1: 364 particle2: 365 - restLength: 0.117860526 + restLength: 0.11769721 constraintForce: 0 tearResistance: 1 - particle1: 365 particle2: 366 - restLength: 0.11791558 + restLength: 0.117714405 constraintForce: 0 tearResistance: 1 - particle1: 366 particle2: 367 - restLength: 0.11788291 + restLength: 0.11811137 constraintForce: 0 tearResistance: 1 - particle1: 367 particle2: 368 - restLength: 0.11756081 + restLength: 0.11810517 constraintForce: 0 tearResistance: 1 - particle1: 368 particle2: 369 - restLength: 0.11787611 + restLength: 0.11729765 constraintForce: 0 tearResistance: 1 - particle1: 369 particle2: 370 - restLength: 0.11770154 + restLength: 0.11854333 constraintForce: 0 tearResistance: 1 - particle1: 370 particle2: 371 - restLength: 0.11705878 + restLength: 0.11637664 constraintForce: 0 tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 m_RopeBlueprint: {fileID: 11400000, guid: df057526865004da9ac53f3c8bc43d9f, type: 2} tearingEnabled: 0 tearResistanceMultiplier: 1000 @@ -2513,9 +3268,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: 1119723573710947368, guid: df057526865004da9ac53f3c8bc43d9f, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &2091522322 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2533,9 +3287,64 @@ MonoBehaviour: m_ParticleGroup: {fileID: 1023878380947534591, guid: df057526865004da9ac53f3c8bc43d9f, type: 2} m_AttachmentType: 1 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity +--- !u!23 &2091522323 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2091522316} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &2091522324 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2091522316} + m_Mesh: {fileID: 1777534752} --- !u!114 &2091522325 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2577,17 +3386,10 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c8b45ebbf86be4df6b0e6cd933812af2, type: 3} m_Name: m_EditorClassIdentifier: - material: {fileID: 0} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - k__BackingField: {r: 1, g: 1, b: 1, a: 1} - k__BackingField: 1 + render: 1 + shader: {fileID: 4800000, guid: 801733041f66b49e1b3c2101471db877, type: 3} + particleColor: {r: 1, g: 1, b: 1, a: 1} + radiusScale: 1 --- !u!1 &2102841794 GameObject: m_ObjectHideFlags: 0 @@ -2598,6 +3400,7 @@ GameObject: m_Component: - component: {fileID: 2102841797} - component: {fileID: 2102841796} + - component: {fileID: 2102841795} m_Layer: 0 m_Name: Obi Solver m_TagString: Untagged @@ -2605,6 +3408,21 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 +--- !u!114 &2102841795 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2102841794} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1d9704d540ac448439a425526f6b2986, type: 3} + m_Name: + m_EditorClassIdentifier: + solvers: + - {fileID: 2102841796} + substeps: 2 --- !u!114 &2102841796 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2619,57 +3437,23 @@ MonoBehaviour: m_EditorClassIdentifier: simulateWhenInvisible: 1 m_Backend: 1 - substeps: 4 - maxStepsPerFrame: 1 - synchronization: 0 parameters: mode: 0 interpolation: 0 gravity: {x: 0, y: -9.81, z: 0} - ambientWind: {x: 0, y: 0, z: 0} - foamGravityScale: 1 damping: 0 maxAnisotropy: 3 sleepThreshold: 0.001 - maxVelocity: 50 - maxAngularVelocity: 10 collisionMargin: 0.02 maxDepenetration: 5 - colliderCCD: 1 - particleCCD: 0 + continuousCollisionDetection: 1 shockPropagation: 0 surfaceCollisionIterations: 8 surfaceCollisionTolerance: 0.005 - diffusionMask: {x: 1, y: 1, z: 1, w: 1} - m_MaxSurfaceChunks: 32768 - maxQueryResults: 8192 - maxFoamParticles: 8192 - maxParticleNeighbors: 128 - maxParticleContacts: 6 - useLimits: 0 - killOffLimitsParticles: 0 - boundaryLimits: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 5, y: 5, z: 5} gravity: {x: 0, y: -9.81, z: 0} gravitySpace: 1 - ambientWind: {x: 0, y: 0, z: 0} - windSpace: 1 - foamSubsteps: 1 - foamMinNeighbors: 3 - foamCollisions: 0 - maxFoamVelocityStretch: 0.3 - foamRadiusScale: 1 - foamFade: {x: 0.05, y: 0.8} - foamAccelAgingRange: {x: 0.5, y: 0.8} - foamAccelAging: 4 - foamVolumeDensity: 0.1 - foamAmbientDensity: 0.02 - foamScatterColor: {r: 0.8, g: 0.75, b: 0.7, a: 1} - foamAmbientColor: {r: 0.4, g: 0.5, b: 0.6, a: 1} worldLinearInertiaScale: 0 worldAngularInertiaScale: 0 - synchronousSpatialQueries: 0 distanceConstraintParameters: evaluationOrder: 0 iterations: 10 @@ -2725,11 +3509,6 @@ MonoBehaviour: iterations: 5 SORFactor: 1 enabled: 1 - pinholeConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 stitchConstraintParameters: evaluationOrder: 1 iterations: 5 @@ -2784,4 +3563,4 @@ SceneRoots: - {fileID: 865561430} - {fileID: 522272187} - {fileID: 99547753} - - {fileID: 1834593284} + - {fileID: 1621829081} diff --git a/Assets/Obi/Samples/RopeAndRod/FreightLiftSettings.lighting b/Assets/Obi/Samples/RopeAndRod/FreightLiftSettings.lighting new file mode 100644 index 000000000..e6cd64023 --- /dev/null +++ b/Assets/Obi/Samples/RopeAndRod/FreightLiftSettings.lighting @@ -0,0 +1,63 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!850595691 &4890085278179872738 +LightingSettings: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: FreightLiftSettings + serializedVersion: 9 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 1 + m_RealtimeEnvironmentLighting: 1 + m_BounceScale: 1 + m_AlbedoBoost: 1 + m_IndirectOutputScale: 1 + m_UsingShadowmask: 0 + m_BakeBackend: 1 + m_LightmapMaxSize: 1024 + m_LightmapSizeFixed: 0 + m_UseMipmapLimits: 1 + m_BakeResolution: 40 + m_Padding: 2 + m_LightmapCompression: 3 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 0 + m_CompAOExponentDirect: 0 + m_ExtractAO: 0 + m_MixedBakeMode: 1 + m_LightmapsBakeMode: 1 + m_FilterMode: 1 + m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + m_ExportTrainingData: 0 + m_EnableWorkerProcessBaking: 1 + m_TrainingDataDestination: TrainingData + m_RealtimeResolution: 2 + m_ForceWhiteAlbedo: 0 + m_ForceUpdates: 0 + m_PVRCulling: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVREnvironmentSampleCount: 512 + m_PVREnvironmentReferencePointCount: 2048 + m_LightProbeSampleCountMultiplier: 4 + m_PVRBounces: 2 + m_PVRMinBounces: 2 + m_PVREnvironmentImportanceSampling: 0 + m_PVRFilteringMode: 2 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_RespectSceneVisibilityWhenBakingGI: 0 diff --git a/Assets/Obi/Samples/RopeAndRod/FreightLiftSettings.lighting.meta b/Assets/Obi/Samples/RopeAndRod/FreightLiftSettings.lighting.meta new file mode 100644 index 000000000..75f792b4d --- /dev/null +++ b/Assets/Obi/Samples/RopeAndRod/FreightLiftSettings.lighting.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e875863d740c9574291a23470db6c52d +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 4890085278179872738 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Samples/RopeAndRod/Plectoneme.unity b/Assets/Obi/Samples/RopeAndRod/Plectoneme.unity index b52ba0974..554db55a9 100644 --- a/Assets/Obi/Samples/RopeAndRod/Plectoneme.unity +++ b/Assets/Obi/Samples/RopeAndRod/Plectoneme.unity @@ -43,7 +43,7 @@ RenderSettings: LightmapSettings: m_ObjectHideFlags: 0 serializedVersion: 13 - m_BakeOnSceneLoad: 0 + m_BakeOnSceneLoad: 1 m_GISettings: serializedVersion: 2 m_BounceScale: 1 @@ -119,6 +119,52 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} +--- !u!1 &117150008 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 117150010} + - component: {fileID: 117150009} + m_Layer: 0 + m_Name: BurstCollisionWorld + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &117150009 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 117150008} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f1a161c4294214a4fbcb7e9e94800494, type: 3} + m_Name: + m_EditorClassIdentifier: + cellSpans: + m_AlignBytes: 16 +--- !u!4 &117150010 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 117150008} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &326895829 GameObject: m_ObjectHideFlags: 0 @@ -258,7 +304,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 11400000, guid: d368f2c47473d4bfb8dd9f08073cb403, type: 2} filter: -65535 m_SourceCollider: {fileID: 506459882} @@ -386,6 +431,7 @@ GameObject: - component: {fileID: 1002464895} - component: {fileID: 1002464893} - component: {fileID: 1002464892} + - component: {fileID: 1002464897} m_Layer: 0 m_Name: Main Camera m_TagString: MainCamera @@ -475,6 +521,26 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1002464897 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1002464891} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 62e83a599724f45a4aa337d74764e572, type: 3} + m_Name: + m_EditorClassIdentifier: + skin: {fileID: 11400000, guid: b90d3c214c99743b0865fc0e0d1f1a15, type: 2} + threadColor: {r: 0, g: 1, b: 1, a: 1} + taskColor: {r: 0, g: 1, b: 0, a: 1} + parallelTaskColor: {r: 1, g: 0.8, b: 0.2, a: 1} + renderTaskColor: {r: 0.2, g: 0.7, b: 1, a: 1} + defaultTaskColor: {r: 1, g: 0.5, b: 0.2, a: 1} + showPercentages: 0 + profileThrottle: 30 --- !u!1 &1072598549 GameObject: m_ObjectHideFlags: 0 @@ -484,6 +550,8 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 1072598560} + - component: {fileID: 1072598559} + - component: {fileID: 1072598558} - component: {fileID: 1072598551} - component: {fileID: 1072598550} - component: {fileID: 1072598553} @@ -509,13 +577,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 8f2bc32c4faf04f039a86a6e3cea12a1, type: 3} m_Name: m_EditorClassIdentifier: - solverIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000 - m_AlignBytes: 16 - groupID: 1 + solverIndices: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000 m_CollisionMaterial: {fileID: 0} m_SurfaceCollisions: 0 - m_MassScale: 1 m_SelfCollisions: 1 restLength_: 1.9999998 elements: @@ -719,9 +783,6 @@ MonoBehaviour: restLength: 0.049322546 constraintForce: 0 tearResistance: 0 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 m_RodBlueprint: {fileID: 11400000, guid: 74806658f50d141e88786022b12fc58b, type: 2} _stretchShearConstraintsEnabled: 1 _stretchCompliance: 0 @@ -747,17 +808,10 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c8b45ebbf86be4df6b0e6cd933812af2, type: 3} m_Name: m_EditorClassIdentifier: - material: {fileID: 2100000, guid: fb88690dea2394644849cde5abd037f9, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - k__BackingField: {r: 1, g: 1, b: 1, a: 1} - k__BackingField: 1 + render: 1 + shader: {fileID: 4800000, guid: 801733041f66b49e1b3c2101471db877, type: 3} + particleColor: {r: 1, g: 1, b: 1, a: 1} + radiusScale: 1 --- !u!114 &1072598552 MonoBehaviour: m_ObjectHideFlags: 0 @@ -770,15 +824,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} m_Name: m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 9bc0d93bc33e445c7a765578064cdd1e, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 uvAnchor: 0 uvScale: {x: 1, y: 6} normalizeV: 1 @@ -799,7 +844,6 @@ MonoBehaviour: decimation: 0 smoothing: 0 twist: 0 - indexInSystem: 0 --- !u!114 &1072598554 MonoBehaviour: m_ObjectHideFlags: 0 @@ -817,9 +861,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: 5048701005528565804, guid: 74806658f50d141e88786022b12fc58b, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 1 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &1072598555 MonoBehaviour: m_ObjectHideFlags: 0 @@ -837,9 +880,64 @@ MonoBehaviour: m_ParticleGroup: {fileID: -3402949915523605302, guid: 74806658f50d141e88786022b12fc58b, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 1 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity +--- !u!23 &1072598558 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1072598549} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9bc0d93bc33e445c7a765578064cdd1e, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1072598559 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1072598549} + m_Mesh: {fileID: 1619481825} --- !u!4 &1072598560 Transform: m_ObjectHideFlags: 0 @@ -1007,52 +1105,184 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 56.052002, y: -22.431002, z: 23.642} ---- !u!1 &1624468059 -GameObject: +--- !u!43 &1619481825 +Mesh: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1624468061} - - component: {fileID: 1624468060} - m_Layer: 0 - m_Name: BurstCollisionWorld - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1624468060 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1624468059} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f1a161c4294214a4fbcb7e9e94800494, type: 3} - m_Name: - m_EditorClassIdentifier: - cellSpans: - m_AlignBytes: 16 ---- !u!4 &1624468061 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1624468059} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Name: extrudedMesh + serializedVersion: 12 + m_SubMeshes: + - serializedVersion: 2 + firstByte: 0 + indexCount: 0 + topology: 0 + baseVertex: 0 + firstVertex: 0 + vertexCount: 0 + localAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_Shapes: + vertices: [] + shapes: [] + channels: [] + fullWeights: [] + m_BindPose: [] + m_BoneNameHashes: + m_RootBoneNameHash: 0 + m_BonesAABB: [] + m_VariableBoneCountWeights: + m_Data: + m_MeshCompression: 0 + m_IsReadable: 1 + m_KeepVertices: 1 + m_KeepIndices: 1 + m_IndexFormat: 0 + m_IndexBuffer: + m_VertexData: + serializedVersion: 3 + m_VertexCount: 0 + m_Channels: + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + m_DataSize: 0 + _typelessdata: + m_CompressedMesh: + m_Vertices: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_UV: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Normals: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Tangents: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Weights: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_NormalSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_TangentSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_FloatColors: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_BoneIndices: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_Triangles: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_UVInfo: 0 + m_LocalAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_MeshUsageFlags: 0 + m_CookingOptions: 30 + m_BakedConvexCollisionMesh: + m_BakedTriangleCollisionMesh: + 'm_MeshMetrics[0]': 1 + 'm_MeshMetrics[1]': 1 + m_MeshOptimizationFlags: 1 + m_StreamData: + serializedVersion: 2 + offset: 0 + size: 0 + path: + m_MeshLodInfo: + serializedVersion: 2 + m_LodSelectionCurve: + serializedVersion: 1 + m_LodSlope: 0 + m_LodBias: 0 + m_NumLevels: 1 + m_SubMeshes: + - serializedVersion: 2 + m_Levels: + - serializedVersion: 1 + m_IndexStart: 0 + m_IndexCount: 0 --- !u!1 &1718836709 GameObject: m_ObjectHideFlags: 0 @@ -1063,6 +1293,7 @@ GameObject: m_Component: - component: {fileID: 1718836712} - component: {fileID: 1718836711} + - component: {fileID: 1718836710} m_Layer: 0 m_Name: Solver m_TagString: Untagged @@ -1070,6 +1301,21 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 +--- !u!114 &1718836710 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1718836709} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 434ec3c1822e84ae79a7f64f950b1bf9, type: 3} + m_Name: + m_EditorClassIdentifier: + solvers: + - {fileID: 1718836711} + substeps: 2 --- !u!114 &1718836711 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1084,57 +1330,23 @@ MonoBehaviour: m_EditorClassIdentifier: simulateWhenInvisible: 1 m_Backend: 1 - substeps: 4 - maxStepsPerFrame: 1 - synchronization: 0 parameters: mode: 0 interpolation: 1 gravity: {x: 0, y: -9.81, z: 0} - ambientWind: {x: 0, y: 0, z: 0} - foamGravityScale: 1 damping: 0 maxAnisotropy: 3 sleepThreshold: 0.001 - maxVelocity: 50 - maxAngularVelocity: 10 collisionMargin: 0.02 maxDepenetration: 5 - colliderCCD: 1 - particleCCD: 0 + continuousCollisionDetection: 1 shockPropagation: 0 surfaceCollisionIterations: 8 surfaceCollisionTolerance: 0.005 - diffusionMask: {x: 1, y: 1, z: 1, w: 1} - m_MaxSurfaceChunks: 32768 - maxQueryResults: 8192 - maxFoamParticles: 8192 - maxParticleNeighbors: 128 - maxParticleContacts: 6 - useLimits: 0 - killOffLimitsParticles: 0 - boundaryLimits: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 5, y: 5, z: 5} gravity: {x: 0, y: -9.81, z: 0} gravitySpace: 1 - ambientWind: {x: 0, y: 0, z: 0} - windSpace: 1 - foamSubsteps: 1 - foamMinNeighbors: 3 - foamCollisions: 0 - maxFoamVelocityStretch: 0.3 - foamRadiusScale: 1 - foamFade: {x: 0.05, y: 0.8} - foamAccelAgingRange: {x: 0.5, y: 0.8} - foamAccelAging: 4 - foamVolumeDensity: 0.1 - foamAmbientDensity: 0.02 - foamScatterColor: {r: 0.8, g: 0.75, b: 0.7, a: 1} - foamAmbientColor: {r: 0.4, g: 0.5, b: 0.6, a: 1} worldLinearInertiaScale: 0 worldAngularInertiaScale: 0 - synchronousSpatialQueries: 0 distanceConstraintParameters: evaluationOrder: 0 iterations: 3 @@ -1190,11 +1402,6 @@ MonoBehaviour: iterations: 10 SORFactor: 1 enabled: 0 - pinholeConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 stitchConstraintParameters: evaluationOrder: 1 iterations: 2 @@ -1357,4 +1564,4 @@ SceneRoots: - {fileID: 326895831} - {fileID: 1174747260} - {fileID: 1718836712} - - {fileID: 1624468061} + - {fileID: 117150010} diff --git a/Assets/Obi/Samples/RopeAndRod/Ratchet.unity b/Assets/Obi/Samples/RopeAndRod/Ratchet.unity deleted file mode 100644 index a3081ca7d..000000000 --- a/Assets/Obi/Samples/RopeAndRod/Ratchet.unity +++ /dev/null @@ -1,2395 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!29 &1 -OcclusionCullingSettings: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_OcclusionBakeSettings: - smallestOccluder: 5 - smallestHole: 0.25 - backfaceThreshold: 100 - m_SceneGUID: 00000000000000000000000000000000 - m_OcclusionCullingData: {fileID: 0} ---- !u!104 &2 -RenderSettings: - m_ObjectHideFlags: 0 - serializedVersion: 10 - m_Fog: 0 - m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - m_FogMode: 3 - m_FogDensity: 0.01 - m_LinearFogStart: 0 - m_LinearFogEnd: 300 - m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} - m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} - m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} - m_AmbientIntensity: 1 - m_AmbientMode: 0 - m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} - m_HaloStrength: 0.5 - m_FlareStrength: 1 - m_FlareFadeSpeed: 3 - m_HaloTexture: {fileID: 0} - m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} - m_DefaultReflectionMode: 0 - m_DefaultReflectionResolution: 128 - m_ReflectionBounces: 1 - m_ReflectionIntensity: 1 - m_CustomReflection: {fileID: 0} - m_Sun: {fileID: 0} - m_UseRadianceAmbientProbe: 0 ---- !u!157 &3 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 13 - m_BakeOnSceneLoad: 0 - m_GISettings: - serializedVersion: 2 - m_BounceScale: 1 - m_IndirectOutputScale: 1 - m_AlbedoBoost: 1 - m_EnvironmentLightingMode: 0 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 0 - m_LightmapEditorSettings: - serializedVersion: 12 - m_Resolution: 2 - m_BakeResolution: 40 - m_AtlasSize: 1024 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 1 - m_CompAOExponentDirect: 0 - m_ExtractAmbientOcclusion: 0 - m_Padding: 2 - m_LightmapParameters: {fileID: 0} - m_LightmapsBakeMode: 1 - m_TextureCompression: 1 - m_ReflectionCompression: 2 - m_MixedBakeMode: 2 - m_BakeBackend: 1 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 512 - m_PVRBounces: 2 - m_PVREnvironmentSampleCount: 256 - m_PVREnvironmentReferencePointCount: 2048 - m_PVRFilteringMode: 1 - m_PVRDenoiserTypeDirect: 1 - m_PVRDenoiserTypeIndirect: 1 - m_PVRDenoiserTypeAO: 1 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVREnvironmentMIS: 1 - m_PVRCulling: 1 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 5 - m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_ExportTrainingData: 0 - m_TrainingDataDestination: TrainingData - m_LightProbeSampleCountMultiplier: 4 - m_LightingDataAsset: {fileID: 20201, guid: 0000000000000000f000000000000000, type: 0} - m_LightingSettings: {fileID: 0} ---- !u!196 &4 -NavMeshSettings: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_BuildSettings: - serializedVersion: 3 - agentTypeID: 0 - agentRadius: 0.5 - agentHeight: 2 - agentSlope: 45 - agentClimb: 0.4 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - minRegionArea: 2 - manualCellSize: 0 - cellSize: 0.16666667 - manualTileSize: 0 - tileSize: 256 - buildHeightMesh: 0 - maxJobWorkers: 0 - preserveTilesOutsideBounds: 0 - debug: - m_Flags: 0 - m_NavMeshData: {fileID: 0} ---- !u!1 &29733818 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 29733821} - - component: {fileID: 29733820} - - component: {fileID: 29733819} - m_Layer: 0 - m_Name: Main Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!81 &29733819 -AudioListener: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 29733818} - m_Enabled: 1 ---- !u!20 &29733820 -Camera: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 29733818} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} - m_projectionMatrixMode: 1 - m_GateFitMode: 2 - m_FOVAxisMode: 0 - m_Iso: 200 - m_ShutterSpeed: 0.005 - m_Aperture: 16 - m_FocusDistance: 10 - m_FocalLength: 50 - m_BladeCount: 5 - m_Curvature: {x: 2, y: 11} - m_BarrelClipping: 0.25 - m_Anamorphism: 0 - m_SensorSize: {x: 36, y: 24} - m_LensShift: {x: 0, y: 0} - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - far clip plane: 1000 - field of view: 70 - orthographic: 0 - orthographic size: 5 - m_Depth: -1 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 3 - m_HDR: 1 - m_AllowMSAA: 1 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!4 &29733821 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 29733818} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 2.31, z: -5.02} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &166485227 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 166485230} - - component: {fileID: 166485229} - - component: {fileID: 166485228} - m_Layer: 0 - m_Name: EventSystem - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &166485228 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 166485227} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3} - m_Name: - m_EditorClassIdentifier: - m_SendPointerHoverToParent: 1 - m_HorizontalAxis: Horizontal - m_VerticalAxis: Vertical - m_SubmitButton: Submit - m_CancelButton: Cancel - m_InputActionsPerSecond: 10 - m_RepeatDelay: 0.5 - m_ForceModuleActive: 0 ---- !u!114 &166485229 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 166485227} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} - m_Name: - m_EditorClassIdentifier: - m_FirstSelected: {fileID: 0} - m_sendNavigationEvents: 1 - m_DragThreshold: 5 ---- !u!4 &166485230 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 166485227} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1001 &369923343 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 400000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: m_RootOrder - value: 3 - objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: m_LocalRotation.y - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 2300000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: 'm_Materials.Array.data[0]' - value: - objectReference: {fileID: 2100000, guid: a0a5f9e13fa7c47f78547e54896609da, type: 2} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: - - targetCorrespondingSourceObject: {fileID: 100000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - insertIndex: -1 - addedObject: {fileID: 369923346} - - targetCorrespondingSourceObject: {fileID: 100000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - insertIndex: -1 - addedObject: {fileID: 369923345} - m_SourcePrefab: {fileID: 100100000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} ---- !u!1 &369923344 stripped -GameObject: - m_CorrespondingSourceObject: {fileID: 100000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - m_PrefabInstance: {fileID: 369923343} - m_PrefabAsset: {fileID: 0} ---- !u!114 &369923345 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 369923344} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6757b231cedd544c583ef8aeaf773b2a, type: 3} - m_Name: - m_EditorClassIdentifier: - thickness: 0 - inverted: 0 - material: {fileID: 0} - filter: -65535 - m_SourceCollider: {fileID: 369923346} - m_DistanceField: {fileID: 11400000, guid: 5eb5ff1af3a3f4a14977448198c232ae, type: 2} ---- !u!64 &369923346 -MeshCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 369923344} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 5 - m_Convex: 0 - m_CookingOptions: 30 - m_Mesh: {fileID: 4300000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} ---- !u!1 &423933290 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 423933291} - - component: {fileID: 423933294} - - component: {fileID: 423933293} - - component: {fileID: 423933292} - m_Layer: 5 - m_Name: Canvas - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &423933291 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 423933290} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0.036} - m_LocalScale: {x: 0.0199, y: 0.0199, z: 0.0199} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 1545171020} - m_Father: {fileID: 1884244937} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0.36, y: 1.02} - m_SizeDelta: {x: 200, y: 150} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &423933292 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 423933290} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} - m_Name: - m_EditorClassIdentifier: - m_IgnoreReversedGraphics: 1 - m_BlockingObjects: 0 - m_BlockingMask: - serializedVersion: 2 - m_Bits: 4294967295 ---- !u!114 &423933293 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 423933290} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} - m_Name: - m_EditorClassIdentifier: - m_UiScaleMode: 0 - m_ReferencePixelsPerUnit: 100 - m_ScaleFactor: 1 - m_ReferenceResolution: {x: 800, y: 600} - m_ScreenMatchMode: 0 - m_MatchWidthOrHeight: 0 - m_PhysicalUnit: 3 - m_FallbackScreenDPI: 96 - m_DefaultSpriteDPI: 96 - m_DynamicPixelsPerUnit: 1 - m_PresetInfoIsWorld: 1 ---- !u!223 &423933294 -Canvas: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 423933290} - m_Enabled: 1 - serializedVersion: 3 - m_RenderMode: 2 - m_Camera: {fileID: 0} - m_PlaneDistance: 100 - m_PixelPerfect: 0 - m_ReceivesEvents: 1 - m_OverrideSorting: 0 - m_OverridePixelPerfect: 0 - m_SortingBucketNormalizedSize: 0 - m_VertexColorAlwaysGammaSpace: 0 - m_AdditionalShaderChannelsFlag: 25 - m_UpdateRectTransformForStandalone: 0 - m_SortingLayerID: 0 - m_SortingOrder: 0 - m_TargetDisplay: 0 ---- !u!1 &624448749 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 624448750} - m_Layer: 0 - m_Name: WallAnchor - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &624448750 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 624448749} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -4.925, y: 1.538, z: 0} - m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &772880994 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 772880995} - - component: {fileID: 772880998} - - component: {fileID: 772880997} - - component: {fileID: 772880996} - m_Layer: 0 - m_Name: Box (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &772880995 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 772880994} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -0.225, y: -0.05, z: 0} - m_LocalScale: {x: 0.05, y: 0.05, z: 0.15} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1411294826} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!65 &772880996 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 772880994} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &772880997 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 772880994} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &772880998 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 772880994} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!1 &916892760 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 916892761} - - component: {fileID: 916892765} - - component: {fileID: 916892764} - - component: {fileID: 916892770} - - component: {fileID: 916892771} - - component: {fileID: 916892777} - - component: {fileID: 916892778} - - component: {fileID: 916892779} - m_Layer: 0 - m_Name: Obi Rope - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &916892761 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 916892760} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: -0.7071068, w: 0.7071068} - m_LocalPosition: {x: -2.42, y: 1.54, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1732458100} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: -90} ---- !u!114 &916892764 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 916892760} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 1 - twist: 0 - indexInSystem: 0 ---- !u!114 &916892765 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 916892760} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000 - m_AlignBytes: 16 - groupID: 1 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 1 - restLength_: 4.999999 - elements: - - particle1: 0 - particle2: 1 - restLength: 0.1660099 - constraintForce: 0 - tearResistance: 1 - - particle1: 1 - particle2: 2 - restLength: 0.16711497 - constraintForce: 0 - tearResistance: 1 - - particle1: 2 - particle2: 3 - restLength: 0.16527379 - constraintForce: 0 - tearResistance: 1 - - particle1: 3 - particle2: 4 - restLength: 0.16605663 - constraintForce: 0 - tearResistance: 1 - - particle1: 4 - particle2: 5 - restLength: 0.16722488 - constraintForce: 0 - tearResistance: 1 - - particle1: 5 - particle2: 6 - restLength: 0.16830611 - constraintForce: 0 - tearResistance: 1 - - particle1: 6 - particle2: 7 - restLength: 0.16523468 - constraintForce: 0 - tearResistance: 1 - - particle1: 7 - particle2: 8 - restLength: 0.16700381 - constraintForce: 0 - tearResistance: 1 - - particle1: 8 - particle2: 9 - restLength: 0.16745025 - constraintForce: 0 - tearResistance: 1 - - particle1: 9 - particle2: 10 - restLength: 0.1660304 - constraintForce: 0 - tearResistance: 1 - - particle1: 10 - particle2: 11 - restLength: 0.167286 - constraintForce: 0 - tearResistance: 1 - - particle1: 11 - particle2: 12 - restLength: 0.16652985 - constraintForce: 0 - tearResistance: 1 - - particle1: 12 - particle2: 13 - restLength: 0.1668426 - constraintForce: 0 - tearResistance: 1 - - particle1: 13 - particle2: 14 - restLength: 0.16688348 - constraintForce: 0 - tearResistance: 1 - - particle1: 14 - particle2: 15 - restLength: 0.1667524 - constraintForce: 0 - tearResistance: 1 - - particle1: 15 - particle2: 16 - restLength: 0.16675252 - constraintForce: 0 - tearResistance: 1 - - particle1: 16 - particle2: 17 - restLength: 0.16688359 - constraintForce: 0 - tearResistance: 1 - - particle1: 17 - particle2: 18 - restLength: 0.16684228 - constraintForce: 0 - tearResistance: 1 - - particle1: 18 - particle2: 19 - restLength: 0.16653013 - constraintForce: 0 - tearResistance: 1 - - particle1: 19 - particle2: 20 - restLength: 0.16728568 - constraintForce: 0 - tearResistance: 1 - - particle1: 20 - particle2: 21 - restLength: 0.16603076 - constraintForce: 0 - tearResistance: 1 - - particle1: 21 - particle2: 22 - restLength: 0.16745031 - constraintForce: 0 - tearResistance: 1 - - particle1: 22 - particle2: 23 - restLength: 0.16700375 - constraintForce: 0 - tearResistance: 1 - - particle1: 23 - particle2: 24 - restLength: 0.1652348 - constraintForce: 0 - tearResistance: 1 - - particle1: 24 - particle2: 25 - restLength: 0.16830587 - constraintForce: 0 - tearResistance: 1 - - particle1: 25 - particle2: 26 - restLength: 0.16722488 - constraintForce: 0 - tearResistance: 1 - - particle1: 26 - particle2: 27 - restLength: 0.16605711 - constraintForce: 0 - tearResistance: 1 - - particle1: 27 - particle2: 28 - restLength: 0.1652739 - constraintForce: 0 - tearResistance: 1 - - particle1: 28 - particle2: 29 - restLength: 0.16711473 - constraintForce: 0 - tearResistance: 1 - - particle1: 29 - particle2: 30 - restLength: 0.16600966 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: 558d68cba3927468abede77a3852186b, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1200 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0.0005 - _maxBending: 0.03 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!114 &916892770 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 916892760} - m_Enabled: 0 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c8b45ebbf86be4df6b0e6cd933812af2, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: fb88690dea2394644849cde5abd037f9, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - k__BackingField: {r: 1, g: 1, b: 1, a: 1} - k__BackingField: 1 ---- !u!114 &916892771 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 916892760} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 2aadf7c5471054b0db8c70bd317bc272, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Rope: {fileID: 916892765} - m_Target: {fileID: 1983413666} - m_Position: 0.908 - m_LimitRange: 1 - m_Range: {x: 0, y: 1} - m_Friction: 0 - m_MotorSpeed: 0 - m_MotorForce: Infinity - m_Compliance: 0 - m_ClampAtEnds: 1 - currentEdge: - edgeIndex: -1 - coordinate: 0 - firstEdge: - edgeIndex: 0 - coordinate: 0 - lastEdge: - edgeIndex: 0 - coordinate: 0 - breakThreshold: Infinity ---- !u!114 &916892777 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 916892760} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 18} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 1 ---- !u!114 &916892778 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 916892760} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 916892765} - m_Target: {fileID: 1884244937} - m_ParticleGroup: {fileID: 6183219346962753922, guid: 558d68cba3927468abede77a3852186b, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &916892779 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 916892760} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 916892765} - m_Target: {fileID: 1539654790} - m_ParticleGroup: {fileID: -3232934742127723785, guid: 558d68cba3927468abede77a3852186b, type: 2} - m_AttachmentType: 1 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!1 &998811098 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 998811099} - m_Layer: 0 - m_Name: Anchor - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &998811099 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 998811098} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -0.5, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1539654790} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1034742885 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1034742889} - - component: {fileID: 1034742888} - - component: {fileID: 1034742887} - - component: {fileID: 1034742886} - m_Layer: 5 - m_Name: Canvas - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1034742886 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1034742885} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} - m_Name: - m_EditorClassIdentifier: - m_IgnoreReversedGraphics: 1 - m_BlockingObjects: 0 - m_BlockingMask: - serializedVersion: 2 - m_Bits: 4294967295 ---- !u!114 &1034742887 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1034742885} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} - m_Name: - m_EditorClassIdentifier: - m_UiScaleMode: 0 - m_ReferencePixelsPerUnit: 100 - m_ScaleFactor: 1 - m_ReferenceResolution: {x: 800, y: 600} - m_ScreenMatchMode: 0 - m_MatchWidthOrHeight: 0 - m_PhysicalUnit: 3 - m_FallbackScreenDPI: 96 - m_DefaultSpriteDPI: 96 - m_DynamicPixelsPerUnit: 1 - m_PresetInfoIsWorld: 0 ---- !u!223 &1034742888 -Canvas: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1034742885} - m_Enabled: 1 - serializedVersion: 3 - m_RenderMode: 0 - m_Camera: {fileID: 0} - m_PlaneDistance: 100 - m_PixelPerfect: 0 - m_ReceivesEvents: 1 - m_OverrideSorting: 0 - m_OverridePixelPerfect: 0 - m_SortingBucketNormalizedSize: 0 - m_VertexColorAlwaysGammaSpace: 0 - m_AdditionalShaderChannelsFlag: 25 - m_UpdateRectTransformForStandalone: 0 - m_SortingLayerID: 0 - m_SortingOrder: 0 - m_TargetDisplay: 0 ---- !u!224 &1034742889 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1034742885} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0, y: 0, z: 0} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 2041761281} - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0, y: 0} ---- !u!1 &1218650852 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1218650854} - - component: {fileID: 1218650853} - m_Layer: 0 - m_Name: ComputeCollisionWorld - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1218650853 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1218650852} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: ce0ddc77554954cd78643d83b0505396, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!4 &1218650854 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1218650852} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1290715903 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1290715907} - - component: {fileID: 1290715906} - - component: {fileID: 1290715905} - - component: {fileID: 1290715904} - m_Layer: 0 - m_Name: Box - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!65 &1290715904 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1290715903} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &1290715905 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1290715903} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &1290715906 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1290715903} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1290715907 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1290715903} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -0.125, y: 0, z: 0} - m_LocalScale: {x: 0.25, y: 0.05, z: 0.15} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1411294826} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1411294825 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1411294826} - m_Layer: 0 - m_Name: RatchetVisualizer - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1411294826 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1411294825} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0.178, y: 1.696, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 1290715907} - - {fileID: 772880995} - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1539654782 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1539654790} - - component: {fileID: 1539654789} - - component: {fileID: 1539654788} - - component: {fileID: 1539654787} - - component: {fileID: 1539654785} - - component: {fileID: 1539654784} - - component: {fileID: 1539654783} - - component: {fileID: 1539654791} - - component: {fileID: 1539654792} - - component: {fileID: 1539654793} - m_Layer: 0 - m_Name: Load - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1539654783 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1539654782} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6757b231cedd544c583ef8aeaf773b2a, type: 3} - m_Name: - m_EditorClassIdentifier: - thickness: 0 - inverted: 0 - material: {fileID: 0} - filter: 1 - m_SourceCollider: {fileID: 1539654787} - m_DistanceField: {fileID: 0} ---- !u!114 &1539654784 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1539654782} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 62359d80fdc0e4315ab6331b78ec5b90, type: 3} - m_Name: - m_EditorClassIdentifier: - kinematicForParticles: 0 ---- !u!54 &1539654785 -Rigidbody: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1539654782} - serializedVersion: 5 - m_Mass: 10 - m_LinearDamping: 0 - m_AngularDamping: 0.05 - m_CenterOfMass: {x: 0, y: 0, z: 0} - m_InertiaTensor: {x: 1, y: 1, z: 1} - m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ImplicitCom: 1 - m_ImplicitTensor: 1 - m_UseGravity: 1 - m_IsKinematic: 0 - m_Interpolate: 0 - m_Constraints: 0 - m_CollisionDetection: 0 ---- !u!65 &1539654787 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1539654782} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &1539654788 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1539654782} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &1539654789 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1539654782} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1539654790 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1539654782} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -4.675, y: 1.538, z: 0} - m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 998811099} - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!145 &1539654791 -SpringJoint: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1539654782} - serializedVersion: 4 - m_ConnectedBody: {fileID: 0} - m_ConnectedArticulationBody: {fileID: 0} - m_Anchor: {x: -0.5, y: 0, z: 0} - m_AutoConfigureConnectedAnchor: 1 - m_ConnectedAnchor: {x: 0, y: 0, z: 0} - m_Spring: 800 - m_Damper: 0.01 - m_MinDistance: 0 - m_MaxDistance: 0 - m_Tolerance: 0.025 - m_BreakForce: Infinity - m_BreakTorque: Infinity - m_EnableCollision: 0 - m_EnablePreprocessing: 1 - m_MassScale: 1 - m_ConnectedMassScale: 1 ---- !u!120 &1539654792 -LineRenderer: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1539654782} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 0 - m_LightProbeUsage: 0 - m_ReflectionProbeUsage: 0 - m_RayTracingMode: 0 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10306, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_Positions: - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 1} - m_Parameters: - serializedVersion: 3 - widthMultiplier: 0.1 - widthCurve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 1 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - colorGradient: - serializedVersion: 2 - key0: {r: 0, g: 1, b: 0.12997723, a: 1} - key1: {r: 0, g: 1, b: 0.12997723, a: 1} - key2: {r: 0, g: 0, b: 0, a: 0} - key3: {r: 0, g: 0, b: 0, a: 0} - key4: {r: 0, g: 0, b: 0, a: 0} - key5: {r: 0, g: 0, b: 0, a: 0} - key6: {r: 0, g: 0, b: 0, a: 0} - key7: {r: 0, g: 0, b: 0, a: 0} - ctime0: 0 - ctime1: 65535 - ctime2: 56861 - ctime3: 0 - ctime4: 0 - ctime5: 0 - ctime6: 0 - ctime7: 0 - atime0: 0 - atime1: 65535 - atime2: 0 - atime3: 0 - atime4: 0 - atime5: 0 - atime6: 0 - atime7: 0 - m_Mode: 1 - m_ColorSpace: -1 - m_NumColorKeys: 2 - m_NumAlphaKeys: 2 - numCornerVertices: 0 - numCapVertices: 0 - alignment: 0 - textureMode: 0 - textureScale: {x: 1, y: 1} - shadowBias: 0.5 - generateLightingData: 0 - m_MaskInteraction: 0 - m_UseWorldSpace: 1 - m_Loop: 0 - m_ApplyActiveColorSpace: 0 ---- !u!114 &1539654793 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1539654782} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 411d9eba4bb0042bf9302873985bc6e0, type: 3} - m_Name: - m_EditorClassIdentifier: - transformA: {fileID: 624448750} - transformB: {fileID: 998811099} ---- !u!1 &1545171019 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1545171020} - - component: {fileID: 1545171022} - - component: {fileID: 1545171021} - m_Layer: 5 - m_Name: Text - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1545171020 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1545171019} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 423933291} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 160, y: 30} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1545171021 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1545171019} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 25 - m_FontStyle: 1 - m_BestFit: 0 - m_MinSize: 0 - m_MaxSize: 265 - m_Alignment: 4 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: Drag Me! --> ---- !u!222 &1545171022 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1545171019} - m_CullTransparentMesh: 0 ---- !u!1 &1732458098 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1732458100} - - component: {fileID: 1732458099} - m_Layer: 0 - m_Name: Obi Solver - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1732458099 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1732458098} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9d174fab52f0c4b8399f25d5c3ea524c, type: 3} - m_Name: - m_EditorClassIdentifier: - simulateWhenInvisible: 1 - m_Backend: 0 - substeps: 7 - maxStepsPerFrame: 1 - synchronization: 2 - parameters: - mode: 0 - interpolation: 0 - gravity: {x: 0, y: -9.81, z: 0} - ambientWind: {x: 0, y: 0, z: 0} - foamGravityScale: 1 - damping: 0.158 - maxAnisotropy: 3 - sleepThreshold: 0 - maxVelocity: 50 - maxAngularVelocity: 20 - collisionMargin: 0.02 - maxDepenetration: 10000 - colliderCCD: 1 - particleCCD: 0 - shockPropagation: 0 - surfaceCollisionIterations: 8 - surfaceCollisionTolerance: 0.005 - diffusionMask: {x: 1, y: 1, z: 1, w: 1} - m_MaxSurfaceChunks: 32768 - maxQueryResults: 8192 - maxFoamParticles: 8192 - maxParticleNeighbors: 128 - maxParticleContacts: 6 - useLimits: 0 - killOffLimitsParticles: 0 - boundaryLimits: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 5, y: 5, z: 5} - gravity: {x: 0, y: -8, z: 0} - gravitySpace: 1 - ambientWind: {x: 0, y: 0, z: 0} - windSpace: 1 - foamSubsteps: 1 - foamMinNeighbors: 3 - foamCollisions: 0 - maxFoamVelocityStretch: 0.3 - foamRadiusScale: 1 - foamFade: {x: 0.05, y: 0.8} - foamAccelAgingRange: {x: 0.5, y: 0.8} - foamAccelAging: 4 - foamVolumeDensity: 0.1 - foamAmbientDensity: 0.02 - foamScatterColor: {r: 0.8, g: 0.75, b: 0.7, a: 1} - foamAmbientColor: {r: 0.4, g: 0.5, b: 0.6, a: 1} - worldLinearInertiaScale: 0 - worldAngularInertiaScale: 0 - synchronousSpatialQueries: 0 - distanceConstraintParameters: - evaluationOrder: 0 - iterations: 2 - SORFactor: 1 - enabled: 1 - bendingConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 - particleCollisionConstraintParameters: - evaluationOrder: 0 - iterations: 1 - SORFactor: 1 - enabled: 1 - particleFrictionConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 - collisionConstraintParameters: - evaluationOrder: 0 - iterations: 1 - SORFactor: 1 - enabled: 1 - frictionConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 - skinConstraintParameters: - evaluationOrder: 0 - iterations: 1 - SORFactor: 1 - enabled: 1 - volumeConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 - shapeMatchingConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 - tetherConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 - pinConstraintParameters: - evaluationOrder: 1 - iterations: 2 - SORFactor: 1 - enabled: 1 - pinholeConstraintParameters: - evaluationOrder: 1 - iterations: 2 - SORFactor: 1 - enabled: 1 - stitchConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 - densityConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 - stretchShearConstraintParameters: - evaluationOrder: 0 - iterations: 1 - SORFactor: 1 - enabled: 1 - bendTwistConstraintParameters: - evaluationOrder: 0 - iterations: 1 - SORFactor: 1 - enabled: 1 - chainConstraintParameters: - evaluationOrder: 0 - iterations: 1 - SORFactor: 1 - enabled: 0 ---- !u!4 &1732458100 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1732458098} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 916892761} - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1884244931 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1884244937} - - component: {fileID: 1884244936} - - component: {fileID: 1884244935} - - component: {fileID: 1884244934} - - component: {fileID: 1884244933} - - component: {fileID: 1884244932} - m_Layer: 0 - m_Name: Handle - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1884244932 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1884244931} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: cbe5860a158ab4ff9852d93167f38e5a, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!114 &1884244933 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1884244931} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6da1d294c86704f3394415f542741ebe, type: 3} - m_Name: - m_EditorClassIdentifier: - minX: 0.5 - maxX: 4 - minY: 1 - maxY: 3 - minZ: 0 - maxZ: 0 ---- !u!65 &1884244934 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1884244931} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &1884244935 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1884244931} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &1884244936 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1884244931} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1884244937 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1884244931} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0.83, y: 1.55, z: -0.018} - m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 423933291} - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1983413661 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1983413666} - - component: {fileID: 1983413665} - - component: {fileID: 1983413664} - - component: {fileID: 1983413663} - - component: {fileID: 1983413662} - - component: {fileID: 1983413667} - - component: {fileID: 1983413668} - m_Layer: 0 - m_Name: Ratchet - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1983413662 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1983413661} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: de82c5da5889a437bbca59463285c6a3, type: 3} - m_Name: - m_EditorClassIdentifier: - pinhole: {fileID: 916892771} - direction: 1 - teethSeparation: 0.1 ---- !u!65 &1983413663 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1983413661} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &1983413664 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1983413661} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &1983413665 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1983413661} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1983413666 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1983413661} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0.13, y: 0.81, z: 0} - m_LocalScale: {x: 0.1, y: 1.7098151, z: 0.2} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1983413667 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1983413661} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6757b231cedd544c583ef8aeaf773b2a, type: 3} - m_Name: - m_EditorClassIdentifier: - thickness: 0 - inverted: 0 - material: {fileID: 0} - filter: 1 - m_SourceCollider: {fileID: 1983413663} - m_DistanceField: {fileID: 0} ---- !u!114 &1983413668 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1983413661} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 89f7ec50c6e36440593469d980ba7830, type: 3} - m_Name: - m_EditorClassIdentifier: - ratchet: {fileID: 1983413662} - ratchetVisualizer: {fileID: 1411294826} - minAngle: 0 - maxAngle: -25 ---- !u!1 &2041761280 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2041761281} - - component: {fileID: 2041761283} - - component: {fileID: 2041761282} - m_Layer: 5 - m_Name: Text - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &2041761281 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2041761280} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1034742889} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 100.29999, y: 24.400024} - m_SizeDelta: {x: 160, y: 30} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &2041761282 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2041761280} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 18 - m_FontStyle: 1 - m_BestFit: 0 - m_MinSize: 5 - m_MaxSize: 200 - m_Alignment: 0 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 1 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: Click and drag the cube to pull the rope. Hit Space to unlock the ratchet - mechanism, hit Space again to lock it back. ---- !u!222 &2041761283 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2041761280} - m_CullTransparentMesh: 0 ---- !u!1 &2078422900 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2078422902} - - component: {fileID: 2078422901} - m_Layer: 0 - m_Name: Directional Light - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!108 &2078422901 -Light: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2078422900} - m_Enabled: 1 - serializedVersion: 11 - m_Type: 1 - m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} - m_Intensity: 1 - m_Range: 10 - m_SpotAngle: 30 - m_InnerSpotAngle: 21.80208 - m_CookieSize: 10 - m_Shadows: - m_Type: 2 - m_Resolution: -1 - m_CustomResolution: -1 - m_Strength: 1 - m_Bias: 0.05 - m_NormalBias: 0.4 - m_NearPlane: 0.2 - m_CullingMatrixOverride: - e00: 1 - e01: 0 - e02: 0 - e03: 0 - e10: 0 - e11: 1 - e12: 0 - e13: 0 - e20: 0 - e21: 0 - e22: 1 - e23: 0 - e30: 0 - e31: 0 - e32: 0 - e33: 1 - m_UseCullingMatrixOverride: 0 - m_Cookie: {fileID: 0} - m_DrawHalo: 0 - m_Flare: {fileID: 0} - m_RenderMode: 0 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingLayerMask: 1 - m_Lightmapping: 4 - m_LightShadowCasterMode: 0 - m_AreaSize: {x: 1, y: 1} - m_BounceIntensity: 1 - m_ColorTemperature: 6570 - m_UseColorTemperature: 0 - m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} - m_UseBoundingSphereOverride: 0 - m_UseViewFrustumForShadowCasterCull: 1 - m_ForceVisible: 0 - m_ShadowRadius: 0 - m_ShadowAngle: 0 - m_LightUnit: 1 - m_LuxAtDistance: 1 - m_EnableSpotReflector: 1 ---- !u!4 &2078422902 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2078422900} - serializedVersion: 2 - m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} - m_LocalPosition: {x: 0, y: 3, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} ---- !u!1660057539 &9223372036854775807 -SceneRoots: - m_ObjectHideFlags: 0 - m_Roots: - - {fileID: 29733821} - - {fileID: 2078422902} - - {fileID: 1732458100} - - {fileID: 369923343} - - {fileID: 1034742889} - - {fileID: 166485230} - - {fileID: 1983413666} - - {fileID: 1411294826} - - {fileID: 624448750} - - {fileID: 1539654790} - - {fileID: 1884244937} - - {fileID: 1218650854} diff --git a/Assets/Obi/Samples/RopeAndRod/RenderModes.unity b/Assets/Obi/Samples/RopeAndRod/RenderModes.unity deleted file mode 100644 index e843a1801..000000000 --- a/Assets/Obi/Samples/RopeAndRod/RenderModes.unity +++ /dev/null @@ -1,1651 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!29 &1 -OcclusionCullingSettings: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_OcclusionBakeSettings: - smallestOccluder: 5 - smallestHole: 0.25 - backfaceThreshold: 100 - m_SceneGUID: 00000000000000000000000000000000 - m_OcclusionCullingData: {fileID: 0} ---- !u!104 &2 -RenderSettings: - m_ObjectHideFlags: 0 - serializedVersion: 10 - m_Fog: 0 - m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - m_FogMode: 3 - m_FogDensity: 0.01 - m_LinearFogStart: 0 - m_LinearFogEnd: 300 - m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} - m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} - m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} - m_AmbientIntensity: 1 - m_AmbientMode: 0 - m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} - m_HaloStrength: 0.5 - m_FlareStrength: 1 - m_FlareFadeSpeed: 3 - m_HaloTexture: {fileID: 0} - m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} - m_DefaultReflectionMode: 0 - m_DefaultReflectionResolution: 128 - m_ReflectionBounces: 1 - m_ReflectionIntensity: 1 - m_CustomReflection: {fileID: 0} - m_Sun: {fileID: 0} - m_UseRadianceAmbientProbe: 0 ---- !u!157 &4 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 13 - m_BakeOnSceneLoad: 0 - m_GISettings: - serializedVersion: 2 - m_BounceScale: 1 - m_IndirectOutputScale: 1 - m_AlbedoBoost: 1 - m_EnvironmentLightingMode: 0 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 1 - m_LightmapEditorSettings: - serializedVersion: 12 - m_Resolution: 2 - m_BakeResolution: 40 - m_AtlasSize: 1024 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 0 - m_CompAOExponentDirect: 0 - m_ExtractAmbientOcclusion: 0 - m_Padding: 2 - m_LightmapParameters: {fileID: 0} - m_LightmapsBakeMode: 1 - m_TextureCompression: 1 - m_ReflectionCompression: 2 - m_MixedBakeMode: 1 - m_BakeBackend: 0 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 500 - m_PVRBounces: 2 - m_PVREnvironmentSampleCount: 500 - m_PVREnvironmentReferencePointCount: 2048 - m_PVRFilteringMode: 2 - m_PVRDenoiserTypeDirect: 0 - m_PVRDenoiserTypeIndirect: 0 - m_PVRDenoiserTypeAO: 0 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVREnvironmentMIS: 0 - m_PVRCulling: 1 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 5 - m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_ExportTrainingData: 0 - m_TrainingDataDestination: TrainingData - m_LightProbeSampleCountMultiplier: 4 - m_LightingDataAsset: {fileID: 0} - m_LightingSettings: {fileID: 4890085278179872738, guid: d03718b1550344932a85912567fb2a98, type: 2} ---- !u!196 &5 -NavMeshSettings: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_BuildSettings: - serializedVersion: 3 - agentTypeID: 0 - agentRadius: 0.5 - agentHeight: 2 - agentSlope: 45 - agentClimb: 0.4 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - minRegionArea: 2 - manualCellSize: 0 - cellSize: 0.16666667 - manualTileSize: 0 - tileSize: 256 - buildHeightMesh: 0 - maxJobWorkers: 0 - preserveTilesOutsideBounds: 0 - debug: - m_Flags: 0 - m_NavMeshData: {fileID: 0} ---- !u!1001 &421764872 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 400000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: m_RootOrder - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: m_LocalRotation.y - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 2300000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: 'm_Materials.Array.data[0]' - value: - objectReference: {fileID: 2100000, guid: a0a5f9e13fa7c47f78547e54896609da, type: 2} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: - - targetCorrespondingSourceObject: {fileID: 100000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - insertIndex: -1 - addedObject: {fileID: 506459882} - - targetCorrespondingSourceObject: {fileID: 100000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - insertIndex: -1 - addedObject: {fileID: 506459883} - m_SourcePrefab: {fileID: 100100000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} ---- !u!1 &506459881 stripped -GameObject: - m_CorrespondingSourceObject: {fileID: 100000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - m_PrefabInstance: {fileID: 421764872} - m_PrefabAsset: {fileID: 0} ---- !u!64 &506459882 -MeshCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 506459881} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 5 - m_Convex: 0 - m_CookingOptions: 30 - m_Mesh: {fileID: 4300000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} ---- !u!114 &506459883 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 506459881} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6757b231cedd544c583ef8aeaf773b2a, type: 3} - m_Name: - m_EditorClassIdentifier: - thickness: 0 - inverted: 0 - material: {fileID: 0} - filter: -65535 - m_SourceCollider: {fileID: 506459882} - m_DistanceField: {fileID: 0} ---- !u!1 &592657015 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 592657017} - - component: {fileID: 592657016} - m_Layer: 0 - m_Name: BurstCollisionWorld - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &592657016 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 592657015} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f1a161c4294214a4fbcb7e9e94800494, type: 3} - m_Name: - m_EditorClassIdentifier: - cellSpans: - m_AlignBytes: 16 ---- !u!4 &592657017 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 592657015} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &605701979 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 605701980} - - component: {fileID: 605701984} - - component: {fileID: 605701983} - - component: {fileID: 605701981} - - component: {fileID: 605701985} - m_Layer: 10 - m_Name: Obi Rope (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &605701980 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 605701979} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0.31999993, y: 3, z: -0.5} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 2102841797} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &605701981 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 605701979} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 605701984} - m_Target: {fileID: 605701980} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &605701983 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 605701979} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 2 ---- !u!114 &605701984 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 605701979} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000 - m_AlignBytes: 16 - groupID: 1 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 0 - particle2: 1 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 1 - particle2: 2 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 2 - particle2: 3 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 3 - particle2: 4 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 4 - particle2: 5 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 5 - particle2: 6 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 6 - particle2: 7 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 7 - particle2: 8 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 8 - particle2: 9 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 9 - particle2: 10 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 10 - particle2: 11 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.01 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!114 &605701985 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 605701979} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 18f853588397d4a80a561203ed92fc8a, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 4cc7d840058664f0f9a679178b33b5e4, type: 2} - renderParams: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 4} - normalizeV: 1 - thicknessScale: 0.8 ---- !u!1 &766988467 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 766988468} - - component: {fileID: 766988472} - - component: {fileID: 766988471} - - component: {fileID: 766988469} - - component: {fileID: 766988473} - m_Layer: 10 - m_Name: Obi Rope (3) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &766988468 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 766988467} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 2.32, y: 3, z: 1.5} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 2102841797} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &766988469 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 766988467} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 766988472} - m_Target: {fileID: 766988468} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &766988471 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 766988467} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 0 ---- !u!114 &766988472 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 766988467} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b0000007c0000007d0000007e0000007f000000800000008100000082000000830000008400000085000000860000008700000088000000890000008a0000008b0000008c0000008d0000008e0000008f000000900000009100000092000000930000009400000095000000960000009700000098000000990000009a0000009b0000009c0000009d0000009e0000009f000000a0000000a1000000a2000000a3000000a4000000a5000000a6000000a7000000a8000000a9000000aa000000ab000000ac000000ad000000ae000000af000000b0000000b1000000b2000000b3000000b4000000b5000000b6000000b7000000b8000000b9000000ba000000bb000000bc000000bd000000be000000bf000000c0000000c1000000c2000000c3000000c4000000c5000000c6000000c7000000c8000000c9000000ca000000cb000000cc000000cd000000ce000000cf000000d0000000d1000000d2000000d3000000d4000000d5000000d6000000d7000000d8000000d9000000da000000db000000dc000000dd000000de000000df000000 - m_AlignBytes: 16 - groupID: 2 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 112 - particle2: 113 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 113 - particle2: 114 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 114 - particle2: 115 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 115 - particle2: 116 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 116 - particle2: 117 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 117 - particle2: 118 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 118 - particle2: 119 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 119 - particle2: 120 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 120 - particle2: 121 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 121 - particle2: 122 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 122 - particle2: 123 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.01 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!114 &766988473 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 766988467} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 09ac962c0743c400aa230ebf871b6156, type: 3} - m_Name: - m_EditorClassIdentifier: - linkMesh: {fileID: 4300000, guid: 70b5250dc71ea4b35987751a9843d8d6, type: 3} - linkMaterial: {fileID: 2100000, guid: edc856900ac3941a98996e21e91e215e, type: 2} - linkScale: {x: 30, y: 30, z: 30} - twistAnchor: 0 - linkTwist: 45 - linkModifiers: [] - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 ---- !u!1 &948693937 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 948693938} - - component: {fileID: 948693942} - - component: {fileID: 948693941} - - component: {fileID: 948693940} - - component: {fileID: 948693939} - m_Layer: 5 - m_Name: FPSDisplay - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &948693938 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 948693937} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1067532270} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 99, y: -31} - m_SizeDelta: {x: 160, y: 30} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &948693939 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 948693937} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: cfabb0440166ab443bba8876756fdfa9, type: 3} - m_Name: - m_EditorClassIdentifier: - m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5} - m_EffectDistance: {x: 1, y: -1} - m_UseGraphicAlpha: 1 ---- !u!114 &948693940 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 948693937} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f14f49b61044e49ebb2f29511f2b3f41, type: 3} - m_Name: - m_EditorClassIdentifier: - updateInterval: 0.5 - showMedian: 0 - medianLearnrate: 0.05 ---- !u!114 &948693941 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 948693937} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 20 - m_FontStyle: 0 - m_BestFit: 0 - m_MinSize: 1 - m_MaxSize: 40 - m_Alignment: 0 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 1 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: ---- !u!222 &948693942 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 948693937} - m_CullTransparentMesh: 0 ---- !u!1 &1002464891 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1002464896} - - component: {fileID: 1002464895} - - component: {fileID: 1002464893} - - component: {fileID: 1002464892} - m_Layer: 0 - m_Name: Main Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!81 &1002464892 -AudioListener: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1002464891} - m_Enabled: 1 ---- !u!124 &1002464893 -Behaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1002464891} - m_Enabled: 1 ---- !u!20 &1002464895 -Camera: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1002464891} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844} - m_projectionMatrixMode: 1 - m_GateFitMode: 2 - m_FOVAxisMode: 0 - m_Iso: 200 - m_ShutterSpeed: 0.005 - m_Aperture: 16 - m_FocusDistance: 10 - m_FocalLength: 50 - m_BladeCount: 5 - m_Curvature: {x: 2, y: 11} - m_BarrelClipping: 0.25 - m_Anamorphism: 0 - m_SensorSize: {x: 36, y: 24} - m_LensShift: {x: 0, y: 0} - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - far clip plane: 1000 - field of view: 75 - orthographic: 0 - orthographic size: 5 - m_Depth: -1 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 3 - m_HDR: 0 - m_AllowMSAA: 1 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!4 &1002464896 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1002464891} - serializedVersion: 2 - m_LocalRotation: {x: 0.15073282, y: -0.2883767, z: 0.0460241, w: 0.94445765} - m_LocalPosition: {x: 1.9, y: 3.95, z: -3.31} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 18.136, y: -33.959, z: 0} ---- !u!1 &1067532266 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1067532270} - - component: {fileID: 1067532269} - - component: {fileID: 1067532268} - - component: {fileID: 1067532267} - m_Layer: 5 - m_Name: Canvas - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1067532267 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1067532266} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} - m_Name: - m_EditorClassIdentifier: - m_IgnoreReversedGraphics: 1 - m_BlockingObjects: 0 - m_BlockingMask: - serializedVersion: 2 - m_Bits: 4294967295 ---- !u!114 &1067532268 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1067532266} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} - m_Name: - m_EditorClassIdentifier: - m_UiScaleMode: 0 - m_ReferencePixelsPerUnit: 100 - m_ScaleFactor: 1 - m_ReferenceResolution: {x: 800, y: 600} - m_ScreenMatchMode: 0 - m_MatchWidthOrHeight: 0 - m_PhysicalUnit: 3 - m_FallbackScreenDPI: 96 - m_DefaultSpriteDPI: 96 - m_DynamicPixelsPerUnit: 1 - m_PresetInfoIsWorld: 0 ---- !u!223 &1067532269 -Canvas: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1067532266} - m_Enabled: 1 - serializedVersion: 3 - m_RenderMode: 0 - m_Camera: {fileID: 0} - m_PlaneDistance: 100 - m_PixelPerfect: 0 - m_ReceivesEvents: 1 - m_OverrideSorting: 0 - m_OverridePixelPerfect: 0 - m_SortingBucketNormalizedSize: 0 - m_VertexColorAlwaysGammaSpace: 0 - m_AdditionalShaderChannelsFlag: 0 - m_UpdateRectTransformForStandalone: 0 - m_SortingLayerID: 0 - m_SortingOrder: 0 - m_TargetDisplay: 0 ---- !u!224 &1067532270 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1067532266} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0, y: 0, z: 0} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 948693938} - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0, y: 0} ---- !u!1 &1095269776 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1095269777} - - component: {fileID: 1095269781} - - component: {fileID: 1095269780} - - component: {fileID: 1095269778} - - component: {fileID: 1095269782} - m_Layer: 10 - m_Name: Obi Rope (2) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1095269777 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1095269776} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 1.42, y: 3, z: 0.6} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 2102841797} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1095269778 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1095269776} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1095269781} - m_Target: {fileID: 1095269777} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1095269780 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1095269776} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 1 ---- !u!114 &1095269781 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1095269776} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: e0000000e1000000e2000000e3000000e4000000e5000000e6000000e7000000e8000000e9000000ea000000eb000000ec000000ed000000ee000000ef000000f0000000f1000000f2000000f3000000f4000000f5000000f6000000f7000000f8000000f9000000fa000000fb000000fc000000fd000000fe000000ff000000000100000101000002010000030100000401000005010000060100000701000008010000090100000a0100000b0100000c0100000d0100000e0100000f010000100100001101000012010000130100001401000015010000160100001701000018010000190100001a0100001b0100001c0100001d0100001e0100001f010000200100002101000022010000230100002401000025010000260100002701000028010000290100002a0100002b0100002c0100002d0100002e0100002f010000300100003101000032010000330100003401000035010000360100003701000038010000390100003a0100003b0100003c0100003d0100003e0100003f010000400100004101000042010000430100004401000045010000460100004701000048010000490100004a0100004b0100004c0100004d0100004e0100004f010000 - m_AlignBytes: 16 - groupID: 3 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 224 - particle2: 225 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 225 - particle2: 226 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 226 - particle2: 227 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 227 - particle2: 228 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 228 - particle2: 229 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 229 - particle2: 230 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 230 - particle2: 231 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 231 - particle2: 232 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 232 - particle2: 233 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 233 - particle2: 234 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 234 - particle2: 235 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.01 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!114 &1095269782 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1095269776} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4ec7e70e3318044b69e11352b1f2136b, type: 3} - m_Name: - m_EditorClassIdentifier: - k__BackingField: {fileID: 1250516326192719629, guid: 92fe50136a7db4cc7bf5dceedcfc586e, type: 3} - k__BackingField: - - {fileID: 2100000, guid: ad417cd62ee7d4209afa3e3d86bee647, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - axis: 2 - volumeScaling: 0 - stretchWithRope: 1 - spanEntireLength: 1 - instances: 1 - instanceSpacing: 0.3 - offset: 0 - scale: {x: 1, y: 1, z: 1} ---- !u!1 &1175446144 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1175446146} - - component: {fileID: 1175446145} - m_Layer: 0 - m_Name: Directional Light - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!108 &1175446145 -Light: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1175446144} - m_Enabled: 1 - serializedVersion: 11 - m_Type: 1 - m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} - m_Intensity: 1 - m_Range: 10 - m_SpotAngle: 30 - m_InnerSpotAngle: 21.802082 - m_CookieSize: 10 - m_Shadows: - m_Type: 2 - m_Resolution: -1 - m_CustomResolution: -1 - m_Strength: 1 - m_Bias: 0.076 - m_NormalBias: 0.01 - m_NearPlane: 0.2 - m_CullingMatrixOverride: - e00: 1 - e01: 0 - e02: 0 - e03: 0 - e10: 0 - e11: 1 - e12: 0 - e13: 0 - e20: 0 - e21: 0 - e22: 1 - e23: 0 - e30: 0 - e31: 0 - e32: 0 - e33: 1 - m_UseCullingMatrixOverride: 0 - m_Cookie: {fileID: 0} - m_DrawHalo: 0 - m_Flare: {fileID: 0} - m_RenderMode: 0 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingLayerMask: 1 - m_Lightmapping: 4 - m_LightShadowCasterMode: 0 - m_AreaSize: {x: 1, y: 1} - m_BounceIntensity: 1 - m_ColorTemperature: 6570 - m_UseColorTemperature: 0 - m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} - m_UseBoundingSphereOverride: 0 - m_UseViewFrustumForShadowCasterCull: 1 - m_ForceVisible: 0 - m_ShadowRadius: 0 - m_ShadowAngle: 0 - m_LightUnit: 1 - m_LuxAtDistance: 1 - m_EnableSpotReflector: 1 ---- !u!4 &1175446146 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1175446144} - serializedVersion: 2 - m_LocalRotation: {x: 0.41595167, y: -0.26247028, z: 0.26683384, w: 0.82879025} - m_LocalPosition: {x: 0, y: 3, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 56.052002, y: -22.431002, z: 23.642} ---- !u!1 &1201406215 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1201406216} - - component: {fileID: 1201406217} - - component: {fileID: 1201406222} - - component: {fileID: 1201406219} - - component: {fileID: 1201406218} - m_Layer: 10 - m_Name: Obi Rope - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1201406216 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1201406215} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -0.68000007, y: 3, z: -1.5} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 2102841797} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1201406217 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1201406215} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 500100005101000052010000530100005401000055010000560100005701000058010000590100005a0100005b0100005c0100005d0100005e0100005f010000600100006101000062010000630100006401000065010000660100006701000068010000690100006a0100006b0100006c0100006d0100006e0100006f010000700100007101000072010000730100007401000075010000760100007701000078010000790100007a0100007b0100007c0100007d0100007e0100007f010000800100008101000082010000830100008401000085010000860100008701000088010000890100008a0100008b0100008c0100008d0100008e0100008f010000900100009101000092010000930100009401000095010000960100009701000098010000990100009a0100009b0100009c0100009d0100009e0100009f010000a0010000a1010000a2010000a3010000a4010000a5010000a6010000a7010000a8010000a9010000aa010000ab010000ac010000ad010000ae010000af010000b0010000b1010000b2010000b3010000b4010000b5010000b6010000b7010000b8010000b9010000ba010000bb010000bc010000bd010000be010000bf010000 - m_AlignBytes: 16 - groupID: 4 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 0 - restLength_: 2 - elements: - - particle1: 336 - particle2: 337 - restLength: 0.18133646 - constraintForce: 0 - tearResistance: 1 - - particle1: 337 - particle2: 338 - restLength: 0.18116945 - constraintForce: 0 - tearResistance: 1 - - particle1: 338 - particle2: 339 - restLength: 0.18210343 - constraintForce: 0 - tearResistance: 1 - - particle1: 339 - particle2: 340 - restLength: 0.18220028 - constraintForce: 0 - tearResistance: 1 - - particle1: 340 - particle2: 341 - restLength: 0.18192291 - constraintForce: 0 - tearResistance: 1 - - particle1: 341 - particle2: 342 - restLength: 0.18203682 - constraintForce: 0 - tearResistance: 1 - - particle1: 342 - particle2: 343 - restLength: 0.18204802 - constraintForce: 0 - tearResistance: 1 - - particle1: 343 - particle2: 344 - restLength: 0.18179289 - constraintForce: 0 - tearResistance: 1 - - particle1: 344 - particle2: 345 - restLength: 0.18189213 - constraintForce: 0 - tearResistance: 1 - - particle1: 345 - particle2: 346 - restLength: 0.18271154 - constraintForce: 0 - tearResistance: 1 - - particle1: 346 - particle2: 347 - restLength: 0.18078607 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0 - _maxBending: 0.01 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!114 &1201406218 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1201406215} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1201406217} - m_Target: {fileID: 1201406216} - m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1201406219 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1201406215} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 3} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.8 ---- !u!114 &1201406222 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1201406215} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 3 ---- !u!1 &2102841794 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2102841797} - - component: {fileID: 2102841796} - - component: {fileID: 2102841798} - m_Layer: 0 - m_Name: Obi Solver - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &2102841796 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2102841794} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9d174fab52f0c4b8399f25d5c3ea524c, type: 3} - m_Name: - m_EditorClassIdentifier: - simulateWhenInvisible: 1 - m_Backend: 1 - substeps: 4 - maxStepsPerFrame: 1 - synchronization: 0 - parameters: - mode: 0 - interpolation: 0 - gravity: {x: 0, y: -9.81, z: 0} - ambientWind: {x: 0, y: 0, z: 0} - foamGravityScale: 1 - damping: 0 - maxAnisotropy: 3 - sleepThreshold: 0.0002 - maxVelocity: 50 - maxAngularVelocity: 10 - collisionMargin: 0.02 - maxDepenetration: 10 - colliderCCD: 1 - particleCCD: 0 - shockPropagation: 0 - surfaceCollisionIterations: 8 - surfaceCollisionTolerance: 0.005 - diffusionMask: {x: 1, y: 1, z: 1, w: 1} - m_MaxSurfaceChunks: 32768 - maxQueryResults: 8192 - maxFoamParticles: 8192 - maxParticleNeighbors: 128 - maxParticleContacts: 6 - useLimits: 0 - killOffLimitsParticles: 0 - boundaryLimits: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 5, y: 5, z: 5} - gravity: {x: 0, y: -9.81, z: 0} - gravitySpace: 1 - ambientWind: {x: 0, y: 0, z: 0} - windSpace: 1 - foamSubsteps: 1 - foamMinNeighbors: 3 - foamCollisions: 0 - maxFoamVelocityStretch: 0.3 - foamRadiusScale: 1 - foamFade: {x: 0.05, y: 0.8} - foamAccelAgingRange: {x: 0.5, y: 0.8} - foamAccelAging: 4 - foamVolumeDensity: 0.1 - foamAmbientDensity: 0.02 - foamScatterColor: {r: 0.8, g: 0.75, b: 0.7, a: 1} - foamAmbientColor: {r: 0.4, g: 0.5, b: 0.6, a: 1} - worldLinearInertiaScale: 0 - worldAngularInertiaScale: 0 - synchronousSpatialQueries: 0 - distanceConstraintParameters: - evaluationOrder: 0 - iterations: 2 - SORFactor: 1 - enabled: 1 - bendingConstraintParameters: - evaluationOrder: 0 - iterations: 4 - SORFactor: 1 - enabled: 1 - particleCollisionConstraintParameters: - evaluationOrder: 1 - iterations: 2 - SORFactor: 1 - enabled: 1 - particleFrictionConstraintParameters: - evaluationOrder: 1 - iterations: 2 - SORFactor: 1 - enabled: 1 - collisionConstraintParameters: - evaluationOrder: 1 - iterations: 2 - SORFactor: 1 - enabled: 1 - frictionConstraintParameters: - evaluationOrder: 1 - iterations: 2 - SORFactor: 1 - enabled: 1 - skinConstraintParameters: - evaluationOrder: 0 - iterations: 3 - SORFactor: 1 - enabled: 0 - volumeConstraintParameters: - evaluationOrder: 1 - iterations: 3 - SORFactor: 1 - enabled: 0 - shapeMatchingConstraintParameters: - evaluationOrder: 1 - iterations: 3 - SORFactor: 1 - enabled: 0 - tetherConstraintParameters: - evaluationOrder: 1 - iterations: 3 - SORFactor: 1 - enabled: 0 - pinConstraintParameters: - evaluationOrder: 1 - iterations: 5 - SORFactor: 1 - enabled: 1 - pinholeConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 - stitchConstraintParameters: - evaluationOrder: 0 - iterations: 5 - SORFactor: 1 - enabled: 1 - densityConstraintParameters: - evaluationOrder: 1 - iterations: 2 - SORFactor: 1 - enabled: 0 - stretchShearConstraintParameters: - evaluationOrder: 0 - iterations: 3 - SORFactor: 1 - enabled: 0 - bendTwistConstraintParameters: - evaluationOrder: 0 - iterations: 3 - SORFactor: 1 - enabled: 0 - chainConstraintParameters: - evaluationOrder: 0 - iterations: 3 - SORFactor: 1 - enabled: 0 ---- !u!4 &2102841797 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2102841794} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 1201406216} - - {fileID: 605701980} - - {fileID: 1095269777} - - {fileID: 766988468} - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &2102841798 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2102841794} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: ef31b6ca9a4124cb893de1adabbfab18, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!1660057539 &9223372036854775807 -SceneRoots: - m_ObjectHideFlags: 0 - m_Roots: - - {fileID: 1002464896} - - {fileID: 421764872} - - {fileID: 1175446146} - - {fileID: 2102841797} - - {fileID: 1067532270} - - {fileID: 592657017} diff --git a/Assets/Obi/Samples/RopeAndRod/Rocker.unity b/Assets/Obi/Samples/RopeAndRod/Rocker.unity index 5544e89e1..b92f38608 100644 --- a/Assets/Obi/Samples/RopeAndRod/Rocker.unity +++ b/Assets/Obi/Samples/RopeAndRod/Rocker.unity @@ -43,7 +43,7 @@ RenderSettings: LightmapSettings: m_ObjectHideFlags: 0 serializedVersion: 13 - m_BakeOnSceneLoad: 0 + m_BakeOnSceneLoad: 1 m_GISettings: serializedVersion: 2 m_BounceScale: 1 @@ -392,7 +392,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 0} filter: -65535 m_SourceCollider: {fileID: 371642825} @@ -492,7 +491,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 0} filter: -65535 m_SourceCollider: {fileID: 506459882} @@ -620,6 +618,7 @@ GameObject: - component: {fileID: 1002464895} - component: {fileID: 1002464893} - component: {fileID: 1002464892} + - component: {fileID: 1002464897} m_Layer: 0 m_Name: Main Camera m_TagString: MainCamera @@ -709,6 +708,26 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1002464897 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1002464891} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 62e83a599724f45a4aa337d74764e572, type: 3} + m_Name: + m_EditorClassIdentifier: + skin: {fileID: 11400000, guid: b90d3c214c99743b0865fc0e0d1f1a15, type: 2} + threadColor: {r: 0, g: 1, b: 1, a: 1} + taskColor: {r: 0, g: 1, b: 0, a: 1} + parallelTaskColor: {r: 1, g: 0.8, b: 0.2, a: 1} + renderTaskColor: {r: 0.2, g: 0.7, b: 1, a: 1} + defaultTaskColor: {r: 1, g: 0.5, b: 0.2, a: 1} + showPercentages: 0 + profileThrottle: 30 --- !u!1 &1175446144 GameObject: m_ObjectHideFlags: 0 @@ -949,6 +968,8 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 1346965650} + - component: {fileID: 1346965645} + - component: {fileID: 1346965644} - component: {fileID: 1346965642} - component: {fileID: 1346965646} - component: {fileID: 1346965643} @@ -973,13 +994,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} m_Name: m_EditorClassIdentifier: - solverIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000 - m_AlignBytes: 16 - groupID: 1 + solverIndices: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000 m_CollisionMaterial: {fileID: 0} m_SurfaceCollisions: 0 - m_MassScale: 1 m_SelfCollisions: 0 restLength_: 2.017229 elements: @@ -1038,9 +1055,6 @@ MonoBehaviour: restLength: 0.18289638 constraintForce: 0 tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 m_RopeBlueprint: {fileID: 11400000, guid: ca9e262f11fb246cbb6d2177bacb27ea, type: 2} tearingEnabled: 1 tearResistanceMultiplier: 1000 @@ -1066,20 +1080,67 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} m_Name: m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 uvAnchor: 0 uvScale: {x: 1, y: 3} normalizeV: 1 section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} thicknessScale: 0.8 +--- !u!23 &1346965644 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1346965641} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1346965645 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1346965641} + m_Mesh: {fileID: 1984461382} --- !u!114 &1346965646 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1095,7 +1156,6 @@ MonoBehaviour: decimation: 0 smoothing: 0 twist: 0 - indexInSystem: 0 --- !u!114 &1346965647 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1113,9 +1173,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: -3735696104525882986, guid: ca9e262f11fb246cbb6d2177bacb27ea, type: 2} m_AttachmentType: 1 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &1346965648 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1133,9 +1192,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: 8673311686603544650, guid: ca9e262f11fb246cbb6d2177bacb27ea, type: 2} m_AttachmentType: 1 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!4 &1346965650 Transform: m_ObjectHideFlags: 0 @@ -1276,7 +1334,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 0} filter: -65535 m_SourceCollider: {fileID: 1356049004} @@ -1483,7 +1540,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 0} filter: -131071 m_SourceCollider: {fileID: 1499352031} @@ -1655,11 +1711,188 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 0} filter: -131071 m_SourceCollider: {fileID: 1817376324} m_DistanceField: {fileID: 0} +--- !u!43 &1984461382 +Mesh: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: extrudedMesh + serializedVersion: 12 + m_SubMeshes: + - serializedVersion: 2 + firstByte: 0 + indexCount: 0 + topology: 0 + baseVertex: 0 + firstVertex: 0 + vertexCount: 0 + localAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_Shapes: + vertices: [] + shapes: [] + channels: [] + fullWeights: [] + m_BindPose: [] + m_BoneNameHashes: + m_RootBoneNameHash: 0 + m_BonesAABB: [] + m_VariableBoneCountWeights: + m_Data: + m_MeshCompression: 0 + m_IsReadable: 1 + m_KeepVertices: 1 + m_KeepIndices: 1 + m_IndexFormat: 0 + m_IndexBuffer: + m_VertexData: + serializedVersion: 3 + m_VertexCount: 0 + m_Channels: + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + m_DataSize: 0 + _typelessdata: + m_CompressedMesh: + m_Vertices: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_UV: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Normals: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Tangents: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Weights: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_NormalSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_TangentSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_FloatColors: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_BoneIndices: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_Triangles: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_UVInfo: 0 + m_LocalAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_MeshUsageFlags: 0 + m_CookingOptions: 30 + m_BakedConvexCollisionMesh: + m_BakedTriangleCollisionMesh: + 'm_MeshMetrics[0]': 1 + 'm_MeshMetrics[1]': 1 + m_MeshOptimizationFlags: 1 + m_StreamData: + serializedVersion: 2 + offset: 0 + size: 0 + path: + m_MeshLodInfo: + serializedVersion: 2 + m_LodSelectionCurve: + serializedVersion: 1 + m_LodSlope: 0 + m_LodBias: 0 + m_NumLevels: 1 + m_SubMeshes: + - serializedVersion: 2 + m_Levels: + - serializedVersion: 1 + m_IndexStart: 0 + m_IndexCount: 0 --- !u!1 &2102841794 GameObject: m_ObjectHideFlags: 0 @@ -1670,6 +1903,7 @@ GameObject: m_Component: - component: {fileID: 2102841797} - component: {fileID: 2102841796} + - component: {fileID: 2102841795} m_Layer: 0 m_Name: Obi Solver m_TagString: Untagged @@ -1677,6 +1911,21 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 +--- !u!114 &2102841795 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2102841794} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1d9704d540ac448439a425526f6b2986, type: 3} + m_Name: + m_EditorClassIdentifier: + solvers: + - {fileID: 2102841796} + substeps: 1 --- !u!114 &2102841796 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1691,57 +1940,23 @@ MonoBehaviour: m_EditorClassIdentifier: simulateWhenInvisible: 1 m_Backend: 1 - substeps: 4 - maxStepsPerFrame: 1 - synchronization: 0 parameters: mode: 0 interpolation: 0 gravity: {x: 0, y: -9.81, z: 0} - ambientWind: {x: 0, y: 0, z: 0} - foamGravityScale: 1 damping: 0 maxAnisotropy: 3 sleepThreshold: 0.001 - maxVelocity: 50 - maxAngularVelocity: 20 collisionMargin: 0.02 maxDepenetration: 5 - colliderCCD: 1 - particleCCD: 0 + continuousCollisionDetection: 1 shockPropagation: 0 surfaceCollisionIterations: 8 surfaceCollisionTolerance: 0.005 - diffusionMask: {x: 1, y: 1, z: 1, w: 1} - m_MaxSurfaceChunks: 32768 - maxQueryResults: 8192 - maxFoamParticles: 8192 - maxParticleNeighbors: 128 - maxParticleContacts: 6 - useLimits: 0 - killOffLimitsParticles: 0 - boundaryLimits: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 5, y: 5, z: 5} gravity: {x: 0, y: -9.81, z: 0} gravitySpace: 1 - ambientWind: {x: 0, y: 0, z: 0} - windSpace: 1 - foamSubsteps: 1 - foamMinNeighbors: 3 - foamCollisions: 0 - maxFoamVelocityStretch: 0.3 - foamRadiusScale: 1 - foamFade: {x: 0.05, y: 0.8} - foamAccelAgingRange: {x: 0.5, y: 0.8} - foamAccelAging: 4 - foamVolumeDensity: 0.1 - foamAmbientDensity: 0.02 - foamScatterColor: {r: 0.8, g: 0.75, b: 0.7, a: 1} - foamAmbientColor: {r: 0.4, g: 0.5, b: 0.6, a: 1} worldLinearInertiaScale: 0 worldAngularInertiaScale: 0 - synchronousSpatialQueries: 0 distanceConstraintParameters: evaluationOrder: 0 iterations: 20 @@ -1797,11 +2012,6 @@ MonoBehaviour: iterations: 10 SORFactor: 1 enabled: 1 - pinholeConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 stitchConstraintParameters: evaluationOrder: 1 iterations: 5 @@ -1999,7 +2209,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0.02 - inverted: 0 material: {fileID: 11400000, guid: d368f2c47473d4bfb8dd9f08073cb403, type: 2} filter: -65535 m_SourceCollider: {fileID: 2124930374} diff --git a/Assets/Obi/Samples/RopeAndRod/RopeAndJoints.unity b/Assets/Obi/Samples/RopeAndRod/RopeAndJoints.unity index d655d9715..0638a66a0 100644 --- a/Assets/Obi/Samples/RopeAndRod/RopeAndJoints.unity +++ b/Assets/Obi/Samples/RopeAndRod/RopeAndJoints.unity @@ -43,7 +43,7 @@ RenderSettings: LightmapSettings: m_ObjectHideFlags: 0 serializedVersion: 13 - m_BakeOnSceneLoad: 0 + m_BakeOnSceneLoad: 1 m_GISettings: serializedVersion: 2 m_BounceScale: 1 @@ -504,7 +504,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 0} filter: -65535 m_SourceCollider: {fileID: 506459882} @@ -718,7 +717,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 0} filter: -65535 m_SourceCollider: {fileID: 916249662} @@ -735,6 +733,7 @@ GameObject: - component: {fileID: 1002464895} - component: {fileID: 1002464893} - component: {fileID: 1002464892} + - component: {fileID: 1002464897} m_Layer: 0 m_Name: Main Camera m_TagString: MainCamera @@ -824,6 +823,26 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 1.3510001, y: 19.827002, z: 0} +--- !u!114 &1002464897 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1002464891} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 62e83a599724f45a4aa337d74764e572, type: 3} + m_Name: + m_EditorClassIdentifier: + skin: {fileID: 11400000, guid: b90d3c214c99743b0865fc0e0d1f1a15, type: 2} + threadColor: {r: 0, g: 1, b: 1, a: 1} + taskColor: {r: 0, g: 1, b: 0, a: 1} + parallelTaskColor: {r: 1, g: 0.8, b: 0.2, a: 1} + renderTaskColor: {r: 0.2, g: 0.7, b: 1, a: 1} + defaultTaskColor: {r: 1, g: 0.5, b: 0.2, a: 1} + showPercentages: 0 + profileThrottle: 30 --- !u!1 &1013469396 GameObject: m_ObjectHideFlags: 0 @@ -1005,6 +1024,8 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 1201406216} + - component: {fileID: 1201406221} + - component: {fileID: 1201406220} - component: {fileID: 1201406219} - component: {fileID: 1201406218} - component: {fileID: 1201406217} @@ -1046,15 +1067,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} m_Name: m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 uvAnchor: 0 uvScale: {x: 1, y: 5} normalizeV: 1 @@ -1075,7 +1087,6 @@ MonoBehaviour: decimation: 0 smoothing: 0 twist: 0 - indexInSystem: 0 --- !u!114 &1201406219 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1088,13 +1099,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} m_Name: m_EditorClassIdentifier: - solverIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b000000 - m_AlignBytes: 16 - groupID: 1 + solverIndices: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b000000 m_CollisionMaterial: {fileID: 0} m_SurfaceCollisions: 0 - m_MassScale: 1 m_SelfCollisions: 0 restLength_: 2.1155076 elements: @@ -1213,9 +1220,6 @@ MonoBehaviour: restLength: 0.079887465 constraintForce: 0 tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 m_RopeBlueprint: {fileID: 11400000, guid: aa522e16fa3d944afa90688caef811d1, type: 2} tearingEnabled: 0 tearResistanceMultiplier: 1000 @@ -1229,6 +1233,62 @@ MonoBehaviour: _maxBending: 0 _plasticYield: 0 _plasticCreep: 0 +--- !u!23 &1201406220 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1201406215} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1201406221 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1201406215} + m_Mesh: {fileID: 1413863089} --- !u!114 &1201406222 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1246,9 +1306,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: 4437340670510581073, guid: aa522e16fa3d944afa90688caef811d1, type: 2} m_AttachmentType: 1 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &1201406223 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1266,9 +1325,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: 7605297887885229143, guid: aa522e16fa3d944afa90688caef811d1, type: 2} m_AttachmentType: 1 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &1201406224 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1286,9 +1344,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: -4396955149452082975, guid: aa522e16fa3d944afa90688caef811d1, type: 2} m_AttachmentType: 1 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &1201406225 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1306,9 +1363,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: 1364724456080004343, guid: aa522e16fa3d944afa90688caef811d1, type: 2} m_AttachmentType: 1 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!1 &1238800304 GameObject: m_ObjectHideFlags: 0 @@ -1351,6 +1407,8 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 1295941532} + - component: {fileID: 1295941527} + - component: {fileID: 1295941526} - component: {fileID: 1295941525} - component: {fileID: 1295941524} - component: {fileID: 1295941523} @@ -1377,15 +1435,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} m_Name: m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 uvAnchor: 0 uvScale: {x: 1, y: 4} normalizeV: 1 @@ -1406,7 +1455,6 @@ MonoBehaviour: decimation: 0 smoothing: 0 twist: 0 - indexInSystem: 1 --- !u!114 &1295941525 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1419,13 +1467,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} m_Name: m_EditorClassIdentifier: - solverIndices: - serializedContents: 7c0000007d0000007e0000007f000000800000008100000082000000830000008400000085000000860000008700000088000000890000008a0000008b0000008c0000008d0000008e0000008f000000900000009100000092000000930000009400000095000000960000009700000098000000990000009a0000009b0000009c0000009d0000009e0000009f000000a0000000a1000000a2000000a3000000a4000000a5000000a6000000a7000000a8000000a9000000aa000000ab000000ac000000ad000000ae000000af000000b0000000b1000000b2000000b3000000b4000000b5000000b6000000b7000000b8000000b9000000ba000000bb000000bc000000bd000000be000000bf000000c0000000c1000000c2000000c3000000c4000000c5000000c6000000c7000000c8000000c9000000ca000000cb000000cc000000cd000000ce000000cf000000d0000000d1000000d2000000d3000000d4000000d5000000d6000000d7000000d8000000d9000000da000000db000000dc000000dd000000de000000df000000e0000000e1000000e2000000e3000000e4000000e5000000e6000000e7000000e8000000e9000000ea000000eb000000ec000000ed000000ee000000ef000000 - m_AlignBytes: 16 - groupID: 2 + solverIndices: 7c0000007d0000007e0000007f000000800000008100000082000000830000008400000085000000860000008700000088000000890000008a0000008b0000008c0000008d0000008e0000008f000000900000009100000092000000930000009400000095000000960000009700000098000000990000009a0000009b0000009c0000009d0000009e0000009f000000a0000000a1000000a2000000a3000000a4000000a5000000a6000000a7000000a8000000a9000000aa000000ab000000ac000000ad000000ae000000af000000b0000000b1000000b2000000b3000000b4000000b5000000b6000000b7000000b8000000b9000000ba000000bb000000bc000000bd000000be000000bf000000c0000000c1000000c2000000c3000000c4000000c5000000c6000000c7000000c8000000c9000000ca000000cb000000cc000000cd000000ce000000cf000000d0000000d1000000d2000000d3000000d4000000d5000000d6000000d7000000d8000000d9000000da000000db000000dc000000dd000000de000000df000000e0000000e1000000e2000000e3000000e4000000e5000000e6000000e7000000e8000000e9000000ea000000eb000000ec000000ed000000ee000000ef000000 m_CollisionMaterial: {fileID: 0} m_SurfaceCollisions: 0 - m_MassScale: 1 m_SelfCollisions: 0 restLength_: 1.2510417 elements: @@ -1504,9 +1548,6 @@ MonoBehaviour: restLength: 0.07021886 constraintForce: 0 tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 m_RopeBlueprint: {fileID: 11400000, guid: 26f4e1ad2bfa7442fa1380d8f5ea809b, type: 2} tearingEnabled: 0 tearResistanceMultiplier: 1000 @@ -1520,6 +1561,62 @@ MonoBehaviour: _maxBending: 0 _plasticYield: 0 _plasticCreep: 0 +--- !u!23 &1295941526 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1295941522} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1295941527 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1295941522} + m_Mesh: {fileID: 1984461382} --- !u!114 &1295941528 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1537,9 +1634,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: 6085013363271969740, guid: 26f4e1ad2bfa7442fa1380d8f5ea809b, type: 2} m_AttachmentType: 1 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &1295941529 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1557,9 +1653,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: 2668437529162069470, guid: 26f4e1ad2bfa7442fa1380d8f5ea809b, type: 2} m_AttachmentType: 1 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &1295941530 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1577,9 +1672,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: 8493842404228815792, guid: 26f4e1ad2bfa7442fa1380d8f5ea809b, type: 2} m_AttachmentType: 1 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &1295941531 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1597,9 +1691,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: -981642940510787340, guid: 26f4e1ad2bfa7442fa1380d8f5ea809b, type: 2} m_AttachmentType: 1 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!4 &1295941532 Transform: m_ObjectHideFlags: 0 @@ -1701,7 +1794,7 @@ MonoBehaviour: m_PersistentCalls: m_Calls: - m_Target: {fileID: 2102841798} - m_TargetAssemblyTypeName: SlowmoToggler, Assembly-CSharp + m_TargetAssemblyTypeName: m_MethodName: Slowmo m_Mode: 0 m_Arguments: @@ -1713,6 +1806,184 @@ MonoBehaviour: m_BoolArgument: 0 m_CallState: 2 m_IsOn: 0 +--- !u!43 &1413863089 +Mesh: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: extrudedMesh + serializedVersion: 12 + m_SubMeshes: + - serializedVersion: 2 + firstByte: 0 + indexCount: 0 + topology: 0 + baseVertex: 0 + firstVertex: 0 + vertexCount: 0 + localAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_Shapes: + vertices: [] + shapes: [] + channels: [] + fullWeights: [] + m_BindPose: [] + m_BoneNameHashes: + m_RootBoneNameHash: 0 + m_BonesAABB: [] + m_VariableBoneCountWeights: + m_Data: + m_MeshCompression: 0 + m_IsReadable: 1 + m_KeepVertices: 1 + m_KeepIndices: 1 + m_IndexFormat: 0 + m_IndexBuffer: + m_VertexData: + serializedVersion: 3 + m_VertexCount: 0 + m_Channels: + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + m_DataSize: 0 + _typelessdata: + m_CompressedMesh: + m_Vertices: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_UV: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Normals: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Tangents: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Weights: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_NormalSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_TangentSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_FloatColors: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_BoneIndices: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_Triangles: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_UVInfo: 0 + m_LocalAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_MeshUsageFlags: 0 + m_CookingOptions: 30 + m_BakedConvexCollisionMesh: + m_BakedTriangleCollisionMesh: + 'm_MeshMetrics[0]': 1 + 'm_MeshMetrics[1]': 1 + m_MeshOptimizationFlags: 1 + m_StreamData: + serializedVersion: 2 + offset: 0 + size: 0 + path: + m_MeshLodInfo: + serializedVersion: 2 + m_LodSelectionCurve: + serializedVersion: 1 + m_LodSlope: 0 + m_LodBias: 0 + m_NumLevels: 1 + m_SubMeshes: + - serializedVersion: 2 + m_Levels: + - serializedVersion: 1 + m_IndexStart: 0 + m_IndexCount: 0 --- !u!1 &1556965137 GameObject: m_ObjectHideFlags: 0 @@ -2176,11 +2447,188 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 0} filter: -65534 m_SourceCollider: {fileID: 1966636102} m_DistanceField: {fileID: 0} +--- !u!43 &1984461382 +Mesh: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: extrudedMesh + serializedVersion: 12 + m_SubMeshes: + - serializedVersion: 2 + firstByte: 0 + indexCount: 0 + topology: 0 + baseVertex: 0 + firstVertex: 0 + vertexCount: 0 + localAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_Shapes: + vertices: [] + shapes: [] + channels: [] + fullWeights: [] + m_BindPose: [] + m_BoneNameHashes: + m_RootBoneNameHash: 0 + m_BonesAABB: [] + m_VariableBoneCountWeights: + m_Data: + m_MeshCompression: 0 + m_IsReadable: 1 + m_KeepVertices: 1 + m_KeepIndices: 1 + m_IndexFormat: 0 + m_IndexBuffer: + m_VertexData: + serializedVersion: 3 + m_VertexCount: 0 + m_Channels: + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + m_DataSize: 0 + _typelessdata: + m_CompressedMesh: + m_Vertices: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_UV: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Normals: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Tangents: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Weights: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_NormalSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_TangentSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_FloatColors: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_BoneIndices: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_Triangles: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_UVInfo: 0 + m_LocalAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_MeshUsageFlags: 0 + m_CookingOptions: 30 + m_BakedConvexCollisionMesh: + m_BakedTriangleCollisionMesh: + 'm_MeshMetrics[0]': 1 + 'm_MeshMetrics[1]': 1 + m_MeshOptimizationFlags: 1 + m_StreamData: + serializedVersion: 2 + offset: 0 + size: 0 + path: + m_MeshLodInfo: + serializedVersion: 2 + m_LodSelectionCurve: + serializedVersion: 1 + m_LodSlope: 0 + m_LodBias: 0 + m_NumLevels: 1 + m_SubMeshes: + - serializedVersion: 2 + m_Levels: + - serializedVersion: 1 + m_IndexStart: 0 + m_IndexCount: 0 --- !u!1 &2019980191 GameObject: m_ObjectHideFlags: 0 @@ -2451,7 +2899,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 0} filter: -65535 m_SourceCollider: {fileID: 2019980193} @@ -2543,6 +2990,7 @@ GameObject: - component: {fileID: 2102841797} - component: {fileID: 2102841796} - component: {fileID: 2102841798} + - component: {fileID: 2102841795} m_Layer: 0 m_Name: Obi Solver m_TagString: Untagged @@ -2550,6 +2998,21 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 +--- !u!114 &2102841795 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2102841794} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1d9704d540ac448439a425526f6b2986, type: 3} + m_Name: + m_EditorClassIdentifier: + solvers: + - {fileID: 2102841796} + substeps: 4 --- !u!114 &2102841796 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2564,57 +3027,23 @@ MonoBehaviour: m_EditorClassIdentifier: simulateWhenInvisible: 1 m_Backend: 1 - substeps: 4 - maxStepsPerFrame: 1 - synchronization: 0 parameters: mode: 0 interpolation: 1 gravity: {x: 0, y: -9.81, z: 0} - ambientWind: {x: 0, y: 0, z: 0} - foamGravityScale: 1 damping: 0.3 maxAnisotropy: 3 sleepThreshold: 0.001 - maxVelocity: 50 - maxAngularVelocity: 20 collisionMargin: 0.02 maxDepenetration: 10 - colliderCCD: 1 - particleCCD: 0 + continuousCollisionDetection: 1 shockPropagation: 0 surfaceCollisionIterations: 8 surfaceCollisionTolerance: 0.005 - diffusionMask: {x: 1, y: 1, z: 1, w: 1} - m_MaxSurfaceChunks: 32768 - maxQueryResults: 8192 - maxFoamParticles: 8192 - maxParticleNeighbors: 128 - maxParticleContacts: 6 - useLimits: 0 - killOffLimitsParticles: 0 - boundaryLimits: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 5, y: 5, z: 5} gravity: {x: 0, y: -9.81, z: 0} gravitySpace: 1 - ambientWind: {x: 0, y: 0, z: 0} - windSpace: 1 - foamSubsteps: 1 - foamMinNeighbors: 3 - foamCollisions: 0 - maxFoamVelocityStretch: 0.3 - foamRadiusScale: 1 - foamFade: {x: 0.05, y: 0.8} - foamAccelAgingRange: {x: 0.5, y: 0.8} - foamAccelAging: 4 - foamVolumeDensity: 0.1 - foamAmbientDensity: 0.02 - foamScatterColor: {r: 0.8, g: 0.75, b: 0.7, a: 1} - foamAmbientColor: {r: 0.4, g: 0.5, b: 0.6, a: 1} worldLinearInertiaScale: 0 worldAngularInertiaScale: 0 - synchronousSpatialQueries: 0 distanceConstraintParameters: evaluationOrder: 0 iterations: 1 @@ -2670,11 +3099,6 @@ MonoBehaviour: iterations: 1 SORFactor: 1 enabled: 1 - pinholeConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 stitchConstraintParameters: evaluationOrder: 1 iterations: 5 diff --git a/Assets/Obi/Samples/RopeAndRod/RopeCutting.unity b/Assets/Obi/Samples/RopeAndRod/RopeCutting.unity index d4dbfdf59..812b52a2d 100644 --- a/Assets/Obi/Samples/RopeAndRod/RopeCutting.unity +++ b/Assets/Obi/Samples/RopeAndRod/RopeCutting.unity @@ -94,7 +94,7 @@ LightmapSettings: m_TrainingDataDestination: TrainingData m_LightProbeSampleCountMultiplier: 4 m_LightingDataAsset: {fileID: 0} - m_LightingSettings: {fileID: 1570830420} + m_LightingSettings: {fileID: 4890085278179872738, guid: d34219ba938489546b7eb199fd0d5c4f, type: 2} --- !u!196 &5 NavMeshSettings: serializedVersion: 2 @@ -128,6 +128,8 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 21365383} + - component: {fileID: 21365391} + - component: {fileID: 21365390} - component: {fileID: 21365389} - component: {fileID: 21365388} - component: {fileID: 21365387} @@ -187,9 +189,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: -8864857226987616246, guid: f92460ac39eb444ad8f2bfb5714bb425, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &21365386 MonoBehaviour: m_ObjectHideFlags: 0 @@ -207,9 +208,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &21365387 MonoBehaviour: m_ObjectHideFlags: 0 @@ -222,15 +222,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} m_Name: m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 uvAnchor: 0 uvScale: {x: 1, y: 16} normalizeV: 1 @@ -251,7 +242,6 @@ MonoBehaviour: decimation: 0.05 smoothing: 1 twist: 0 - indexInSystem: 0 --- !u!114 &21365389 MonoBehaviour: m_ObjectHideFlags: 0 @@ -264,249 +254,242 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} m_Name: m_EditorClassIdentifier: - solverIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b0000007c0000007d0000007e0000007f000000800000008100000082000000830000008400000085000000860000008700000088000000890000008a0000008b0000008c0000008d0000008e0000008f000000900000009100000092000000 - m_AlignBytes: 16 - groupID: 1 + solverIndices: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b0000007c0000007d0000007e0000007f000000800000008100000082000000830000008400000085000000860000008700000088000000890000008a0000008b0000008c0000008d0000008e0000008f000000900000009100000092000000 m_CollisionMaterial: {fileID: 0} m_SurfaceCollisions: 1 - m_MassScale: 1 m_SelfCollisions: 1 - restLength_: 5.39185 + restLength_: 5.3759427 elements: - particle1: 0 particle2: 1 - restLength: 0.11771238 + restLength: 0.11737857 constraintForce: 0 tearResistance: 1 - particle1: 1 particle2: 2 - restLength: 0.11794325 + restLength: 0.11757569 constraintForce: 0 tearResistance: 1 - particle1: 2 particle2: 3 - restLength: 0.117595166 + restLength: 0.117257625 constraintForce: 0 tearResistance: 1 - particle1: 3 particle2: 4 - restLength: 0.11768351 + restLength: 0.117347114 constraintForce: 0 tearResistance: 1 - particle1: 4 particle2: 5 - restLength: 0.11783673 + restLength: 0.11749813 constraintForce: 0 tearResistance: 1 - particle1: 5 particle2: 6 - restLength: 0.117969744 + restLength: 0.117627345 constraintForce: 0 tearResistance: 1 - particle1: 6 particle2: 7 - restLength: 0.11802316 + restLength: 0.1176776 constraintForce: 0 tearResistance: 1 - particle1: 7 particle2: 8 - restLength: 0.11796464 + restLength: 0.11761664 constraintForce: 0 tearResistance: 1 - particle1: 8 particle2: 9 - restLength: 0.1178521 + restLength: 0.117508255 constraintForce: 0 tearResistance: 1 - particle1: 9 particle2: 10 - restLength: 0.117975526 + restLength: 0.11763225 constraintForce: 0 tearResistance: 1 - particle1: 10 particle2: 11 - restLength: 0.11801252 + restLength: 0.11766701 constraintForce: 0 tearResistance: 1 - particle1: 11 particle2: 12 - restLength: 0.11794836 + restLength: 0.117603354 constraintForce: 0 tearResistance: 1 - particle1: 12 particle2: 13 - restLength: 0.11783 + restLength: 0.11748713 constraintForce: 0 tearResistance: 1 - particle1: 13 particle2: 14 - restLength: 0.117713265 + restLength: 0.11737358 constraintForce: 0 tearResistance: 1 - particle1: 14 particle2: 15 - restLength: 0.117651865 + restLength: 0.11731443 constraintForce: 0 tearResistance: 1 - particle1: 15 particle2: 16 - restLength: 0.117673375 + restLength: 0.117334664 constraintForce: 0 tearResistance: 1 - particle1: 16 particle2: 17 - restLength: 0.117791526 + restLength: 0.117409684 constraintForce: 0 tearResistance: 1 - particle1: 17 particle2: 18 - restLength: 0.11774277 + restLength: 0.117427535 constraintForce: 0 tearResistance: 1 - particle1: 18 particle2: 19 - restLength: 0.11769215 + restLength: 0.1173339 constraintForce: 0 tearResistance: 1 - particle1: 19 particle2: 20 - restLength: 0.11750718 + restLength: 0.11715327 constraintForce: 0 tearResistance: 1 - particle1: 20 particle2: 21 - restLength: 0.11741844 + restLength: 0.11707407 constraintForce: 0 tearResistance: 1 - particle1: 21 particle2: 22 - restLength: 0.1176177 + restLength: 0.11728205 constraintForce: 0 tearResistance: 1 - particle1: 22 particle2: 23 - restLength: 0.11827736 + restLength: 0.11794879 constraintForce: 0 tearResistance: 1 - particle1: 23 particle2: 24 - restLength: 0.11706203 + restLength: 0.11673033 constraintForce: 0 tearResistance: 1 - particle1: 24 particle2: 25 - restLength: 0.11636803 + restLength: 0.116027325 constraintForce: 0 tearResistance: 1 - particle1: 25 particle2: 26 - restLength: 0.11621493 + restLength: 0.115863316 constraintForce: 0 tearResistance: 1 - particle1: 26 particle2: 27 - restLength: 0.11634967 + restLength: 0.11598866 constraintForce: 0 tearResistance: 1 - particle1: 27 particle2: 28 - restLength: 0.11650062 + restLength: 0.11614065 constraintForce: 0 tearResistance: 1 - particle1: 28 particle2: 29 - restLength: 0.11651943 + restLength: 0.11616688 constraintForce: 0 tearResistance: 1 - particle1: 29 particle2: 30 - restLength: 0.11646894 + restLength: 0.11612464 constraintForce: 0 tearResistance: 1 - particle1: 30 particle2: 31 - restLength: 0.11646836 + restLength: 0.116126075 constraintForce: 0 tearResistance: 1 - particle1: 31 particle2: 32 - restLength: 0.11656151 + restLength: 0.1162187 constraintForce: 0 tearResistance: 1 - particle1: 32 particle2: 33 - restLength: 0.11671458 + restLength: 0.116368376 constraintForce: 0 tearResistance: 1 - particle1: 33 particle2: 34 - restLength: 0.11685168 + restLength: 0.11650247 constraintForce: 0 tearResistance: 1 - particle1: 34 particle2: 35 - restLength: 0.11689511 + restLength: 0.11654539 constraintForce: 0 tearResistance: 1 - particle1: 35 particle2: 36 - restLength: 0.1167252 + restLength: 0.11637627 constraintForce: 0 tearResistance: 1 - particle1: 36 particle2: 37 - restLength: 0.11671828 + restLength: 0.116367616 constraintForce: 0 tearResistance: 1 - particle1: 37 particle2: 38 - restLength: 0.11685561 + restLength: 0.116505764 constraintForce: 0 tearResistance: 1 - particle1: 38 particle2: 39 - restLength: 0.11681989 + restLength: 0.11647182 constraintForce: 0 tearResistance: 1 - particle1: 39 particle2: 40 - restLength: 0.11662538 + restLength: 0.11628203 constraintForce: 0 tearResistance: 1 - particle1: 40 particle2: 41 - restLength: 0.11642074 + restLength: 0.11606255 constraintForce: 0 tearResistance: 1 - particle1: 41 particle2: 42 - restLength: 0.117048115 + restLength: 0.11669507 constraintForce: 0 tearResistance: 1 - particle1: 42 particle2: 43 - restLength: 0.11699504 + restLength: 0.116644375 constraintForce: 0 tearResistance: 1 - particle1: 43 particle2: 44 - restLength: 0.11687661 + restLength: 0.11652727 constraintForce: 0 tearResistance: 1 - particle1: 44 particle2: 45 - restLength: 0.11661551 + restLength: 0.116267465 constraintForce: 0 tearResistance: 1 - particle1: 45 particle2: 46 - restLength: 0.11574278 + restLength: 0.115411185 constraintForce: 0 tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 m_RopeBlueprint: {fileID: 11400000, guid: f92460ac39eb444ad8f2bfb5714bb425, type: 2} tearingEnabled: 0 tearResistanceMultiplier: 1000 @@ -520,6 +503,62 @@ MonoBehaviour: _maxBending: 0.025 _plasticYield: 0 _plasticCreep: 0 +--- !u!23 &21365390 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 21365382} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &21365391 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 21365382} + m_Mesh: {fileID: 1619481825} --- !u!114 &21365392 MonoBehaviour: m_ObjectHideFlags: 0 @@ -628,7 +667,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 11400000, guid: d368f2c47473d4bfb8dd9f08073cb403, type: 2} filter: -65535 m_SourceCollider: {fileID: 506459882} @@ -642,6 +680,8 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 648289271} + - component: {fileID: 648289279} + - component: {fileID: 648289278} - component: {fileID: 648289277} - component: {fileID: 648289276} - component: {fileID: 648289275} @@ -701,9 +741,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: -8864857226987616246, guid: f92460ac39eb444ad8f2bfb5714bb425, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &648289274 MonoBehaviour: m_ObjectHideFlags: 0 @@ -721,9 +760,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &648289275 MonoBehaviour: m_ObjectHideFlags: 0 @@ -736,15 +774,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} m_Name: m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 uvAnchor: 0 uvScale: {x: 1, y: 16} normalizeV: 1 @@ -765,7 +794,6 @@ MonoBehaviour: decimation: 0.05 smoothing: 1 twist: 0 - indexInSystem: 2 --- !u!114 &648289277 MonoBehaviour: m_ObjectHideFlags: 0 @@ -778,249 +806,242 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} m_Name: m_EditorClassIdentifier: - solverIndices: - serializedContents: 930000009400000095000000960000009700000098000000990000009a0000009b0000009c0000009d0000009e0000009f000000a0000000a1000000a2000000a3000000a4000000a5000000a6000000a7000000a8000000a9000000aa000000ab000000ac000000ad000000ae000000af000000b0000000b1000000b2000000b3000000b4000000b5000000b6000000b7000000b8000000b9000000ba000000bb000000bc000000bd000000be000000bf000000c0000000c1000000c2000000c3000000c4000000c5000000c6000000c7000000c8000000c9000000ca000000cb000000cc000000cd000000ce000000cf000000d0000000d1000000d2000000d3000000d4000000d5000000d6000000d7000000d8000000d9000000da000000db000000dc000000dd000000de000000df000000e0000000e1000000e2000000e3000000e4000000e5000000e6000000e7000000e8000000e9000000ea000000eb000000ec000000ed000000ee000000ef000000f0000000f1000000f2000000f3000000f4000000f5000000f6000000f7000000f8000000f9000000fa000000fb000000fc000000fd000000fe000000ff000000000100000101000002010000030100000401000005010000060100000701000008010000090100000a0100000b0100000c0100000d0100000e0100000f010000100100001101000012010000130100001401000015010000160100001701000018010000190100001a0100001b0100001c0100001d0100001e0100001f010000200100002101000022010000230100002401000025010000 - m_AlignBytes: 16 - groupID: 2 + solverIndices: 930000009400000095000000960000009700000098000000990000009a0000009b0000009c0000009d0000009e0000009f000000a0000000a1000000a2000000a3000000a4000000a5000000a6000000a7000000a8000000a9000000aa000000ab000000ac000000ad000000ae000000af000000b0000000b1000000b2000000b3000000b4000000b5000000b6000000b7000000b8000000b9000000ba000000bb000000bc000000bd000000be000000bf000000c0000000c1000000c2000000c3000000c4000000c5000000c6000000c7000000c8000000c9000000ca000000cb000000cc000000cd000000ce000000cf000000d0000000d1000000d2000000d3000000d4000000d5000000d6000000d7000000d8000000d9000000da000000db000000dc000000dd000000de000000df000000e0000000e1000000e2000000e3000000e4000000e5000000e6000000e7000000e8000000e9000000ea000000eb000000ec000000ed000000ee000000ef000000f0000000f1000000f2000000f3000000f4000000f5000000f6000000f7000000f8000000f9000000fa000000fb000000fc000000fd000000fe000000ff000000000100000101000002010000030100000401000005010000060100000701000008010000090100000a0100000b0100000c0100000d0100000e0100000f010000100100001101000012010000130100001401000015010000160100001701000018010000190100001a0100001b0100001c0100001d0100001e0100001f010000200100002101000022010000230100002401000025010000 m_CollisionMaterial: {fileID: 0} m_SurfaceCollisions: 1 - m_MassScale: 1 m_SelfCollisions: 1 - restLength_: 5.39185 + restLength_: 5.3759427 elements: - particle1: 147 particle2: 148 - restLength: 0.11771238 + restLength: 0.11737857 constraintForce: 0 tearResistance: 1 - particle1: 148 particle2: 149 - restLength: 0.11794325 + restLength: 0.11757569 constraintForce: 0 tearResistance: 1 - particle1: 149 particle2: 150 - restLength: 0.117595166 + restLength: 0.117257625 constraintForce: 0 tearResistance: 1 - particle1: 150 particle2: 151 - restLength: 0.11768351 + restLength: 0.117347114 constraintForce: 0 tearResistance: 1 - particle1: 151 particle2: 152 - restLength: 0.11783673 + restLength: 0.11749813 constraintForce: 0 tearResistance: 1 - particle1: 152 particle2: 153 - restLength: 0.117969744 + restLength: 0.117627345 constraintForce: 0 tearResistance: 1 - particle1: 153 particle2: 154 - restLength: 0.11802316 + restLength: 0.1176776 constraintForce: 0 tearResistance: 1 - particle1: 154 particle2: 155 - restLength: 0.11796464 + restLength: 0.11761664 constraintForce: 0 tearResistance: 1 - particle1: 155 particle2: 156 - restLength: 0.1178521 + restLength: 0.117508255 constraintForce: 0 tearResistance: 1 - particle1: 156 particle2: 157 - restLength: 0.117975526 + restLength: 0.11763225 constraintForce: 0 tearResistance: 1 - particle1: 157 particle2: 158 - restLength: 0.11801252 + restLength: 0.11766701 constraintForce: 0 tearResistance: 1 - particle1: 158 particle2: 159 - restLength: 0.11794836 + restLength: 0.117603354 constraintForce: 0 tearResistance: 1 - particle1: 159 particle2: 160 - restLength: 0.11783 + restLength: 0.11748713 constraintForce: 0 tearResistance: 1 - particle1: 160 particle2: 161 - restLength: 0.117713265 + restLength: 0.11737358 constraintForce: 0 tearResistance: 1 - particle1: 161 particle2: 162 - restLength: 0.117651865 + restLength: 0.11731443 constraintForce: 0 tearResistance: 1 - particle1: 162 particle2: 163 - restLength: 0.117673375 + restLength: 0.117334664 constraintForce: 0 tearResistance: 1 - particle1: 163 particle2: 164 - restLength: 0.117791526 + restLength: 0.117409684 constraintForce: 0 tearResistance: 1 - particle1: 164 particle2: 165 - restLength: 0.11774277 + restLength: 0.117427535 constraintForce: 0 tearResistance: 1 - particle1: 165 particle2: 166 - restLength: 0.11769215 + restLength: 0.1173339 constraintForce: 0 tearResistance: 1 - particle1: 166 particle2: 167 - restLength: 0.11750718 + restLength: 0.11715327 constraintForce: 0 tearResistance: 1 - particle1: 167 particle2: 168 - restLength: 0.11741844 + restLength: 0.11707407 constraintForce: 0 tearResistance: 1 - particle1: 168 particle2: 169 - restLength: 0.1176177 + restLength: 0.11728205 constraintForce: 0 tearResistance: 1 - particle1: 169 particle2: 170 - restLength: 0.11827736 + restLength: 0.11794879 constraintForce: 0 tearResistance: 1 - particle1: 170 particle2: 171 - restLength: 0.11706203 + restLength: 0.11673033 constraintForce: 0 tearResistance: 1 - particle1: 171 particle2: 172 - restLength: 0.11636803 + restLength: 0.116027325 constraintForce: 0 tearResistance: 1 - particle1: 172 particle2: 173 - restLength: 0.11621493 + restLength: 0.115863316 constraintForce: 0 tearResistance: 1 - particle1: 173 particle2: 174 - restLength: 0.11634967 + restLength: 0.11598866 constraintForce: 0 tearResistance: 1 - particle1: 174 particle2: 175 - restLength: 0.11650062 + restLength: 0.11614065 constraintForce: 0 tearResistance: 1 - particle1: 175 particle2: 176 - restLength: 0.11651943 + restLength: 0.11616688 constraintForce: 0 tearResistance: 1 - particle1: 176 particle2: 177 - restLength: 0.11646894 + restLength: 0.11612464 constraintForce: 0 tearResistance: 1 - particle1: 177 particle2: 178 - restLength: 0.11646836 + restLength: 0.116126075 constraintForce: 0 tearResistance: 1 - particle1: 178 particle2: 179 - restLength: 0.11656151 + restLength: 0.1162187 constraintForce: 0 tearResistance: 1 - particle1: 179 particle2: 180 - restLength: 0.11671458 + restLength: 0.116368376 constraintForce: 0 tearResistance: 1 - particle1: 180 particle2: 181 - restLength: 0.11685168 + restLength: 0.11650247 constraintForce: 0 tearResistance: 1 - particle1: 181 particle2: 182 - restLength: 0.11689511 + restLength: 0.11654539 constraintForce: 0 tearResistance: 1 - particle1: 182 particle2: 183 - restLength: 0.1167252 + restLength: 0.11637627 constraintForce: 0 tearResistance: 1 - particle1: 183 particle2: 184 - restLength: 0.11671828 + restLength: 0.116367616 constraintForce: 0 tearResistance: 1 - particle1: 184 particle2: 185 - restLength: 0.11685561 + restLength: 0.116505764 constraintForce: 0 tearResistance: 1 - particle1: 185 particle2: 186 - restLength: 0.11681989 + restLength: 0.11647182 constraintForce: 0 tearResistance: 1 - particle1: 186 particle2: 187 - restLength: 0.11662538 + restLength: 0.11628203 constraintForce: 0 tearResistance: 1 - particle1: 187 particle2: 188 - restLength: 0.11642074 + restLength: 0.11606255 constraintForce: 0 tearResistance: 1 - particle1: 188 particle2: 189 - restLength: 0.117048115 + restLength: 0.11669507 constraintForce: 0 tearResistance: 1 - particle1: 189 particle2: 190 - restLength: 0.11699504 + restLength: 0.116644375 constraintForce: 0 tearResistance: 1 - particle1: 190 particle2: 191 - restLength: 0.11687661 + restLength: 0.11652727 constraintForce: 0 tearResistance: 1 - particle1: 191 particle2: 192 - restLength: 0.11661551 + restLength: 0.116267465 constraintForce: 0 tearResistance: 1 - particle1: 192 particle2: 193 - restLength: 0.11574278 + restLength: 0.115411185 constraintForce: 0 tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 m_RopeBlueprint: {fileID: 11400000, guid: f92460ac39eb444ad8f2bfb5714bb425, type: 2} tearingEnabled: 0 tearResistanceMultiplier: 1000 @@ -1034,6 +1055,62 @@ MonoBehaviour: _maxBending: 0.025 _plasticYield: 0 _plasticCreep: 0 +--- !u!23 &648289278 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 648289270} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &648289279 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 648289270} + m_Mesh: {fileID: 2122469315} --- !u!114 &648289280 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1047,7 +1124,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: category: 0 ---- !u!1 &949374097 +--- !u!1 &926308008 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -1055,8 +1132,8 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 949374099} - - component: {fileID: 949374098} + - component: {fileID: 926308010} + - component: {fileID: 926308009} m_Layer: 0 m_Name: BurstCollisionWorld m_TagString: Untagged @@ -1064,13 +1141,13 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!114 &949374098 +--- !u!114 &926308009 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 949374097} + m_GameObject: {fileID: 926308008} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: f1a161c4294214a4fbcb7e9e94800494, type: 3} @@ -1078,13 +1155,13 @@ MonoBehaviour: m_EditorClassIdentifier: cellSpans: m_AlignBytes: 16 ---- !u!4 &949374099 +--- !u!4 &926308010 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 949374097} + m_GameObject: {fileID: 926308008} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} @@ -1105,6 +1182,7 @@ GameObject: - component: {fileID: 1002464895} - component: {fileID: 1002464893} - component: {fileID: 1002464892} + - component: {fileID: 1002464897} m_Layer: 0 m_Name: Main Camera m_TagString: MainCamera @@ -1194,6 +1272,26 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1002464897 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1002464891} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 62e83a599724f45a4aa337d74764e572, type: 3} + m_Name: + m_EditorClassIdentifier: + skin: {fileID: 11400000, guid: b90d3c214c99743b0865fc0e0d1f1a15, type: 2} + threadColor: {r: 0, g: 1, b: 1, a: 1} + taskColor: {r: 0, g: 1, b: 0, a: 1} + parallelTaskColor: {r: 1, g: 0.8, b: 0.2, a: 1} + renderTaskColor: {r: 0.2, g: 0.7, b: 1, a: 1} + defaultTaskColor: {r: 1, g: 0.5, b: 0.2, a: 1} + showPercentages: 0 + profileThrottle: 30 --- !u!1 &1175446144 GameObject: m_ObjectHideFlags: 0 @@ -1300,6 +1398,8 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 1346965650} + - component: {fileID: 1346965645} + - component: {fileID: 1346965644} - component: {fileID: 1346965642} - component: {fileID: 1346965647} - component: {fileID: 1346965646} @@ -1326,249 +1426,242 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} m_Name: m_EditorClassIdentifier: - solverIndices: - serializedContents: 260100002701000028010000290100002a0100002b0100002c0100002d0100002e0100002f010000300100003101000032010000330100003401000035010000360100003701000038010000390100003a0100003b0100003c0100003d0100003e0100003f010000400100004101000042010000430100004401000045010000460100004701000048010000490100004a0100004b0100004c0100004d0100004e0100004f010000500100005101000052010000530100005401000055010000560100005701000058010000590100005a0100005b0100005c0100005d0100005e0100005f010000600100006101000062010000630100006401000065010000660100006701000068010000690100006a0100006b0100006c0100006d0100006e0100006f010000700100007101000072010000730100007401000075010000760100007701000078010000790100007a0100007b0100007c0100007d0100007e0100007f010000800100008101000082010000830100008401000085010000860100008701000088010000890100008a0100008b0100008c0100008d0100008e0100008f010000900100009101000092010000930100009401000095010000960100009701000098010000990100009a0100009b0100009c0100009d0100009e0100009f010000a0010000a1010000a2010000a3010000a4010000a5010000a6010000a7010000a8010000a9010000aa010000ab010000ac010000ad010000ae010000af010000b0010000b1010000b2010000b3010000b4010000b5010000b6010000b7010000b8010000 - m_AlignBytes: 16 - groupID: 3 + solverIndices: 260100002701000028010000290100002a0100002b0100002c0100002d0100002e0100002f010000300100003101000032010000330100003401000035010000360100003701000038010000390100003a0100003b0100003c0100003d0100003e0100003f010000400100004101000042010000430100004401000045010000460100004701000048010000490100004a0100004b0100004c0100004d0100004e0100004f010000500100005101000052010000530100005401000055010000560100005701000058010000590100005a0100005b0100005c0100005d0100005e0100005f010000600100006101000062010000630100006401000065010000660100006701000068010000690100006a0100006b0100006c0100006d0100006e0100006f010000700100007101000072010000730100007401000075010000760100007701000078010000790100007a0100007b0100007c0100007d0100007e0100007f010000800100008101000082010000830100008401000085010000860100008701000088010000890100008a0100008b0100008c0100008d0100008e0100008f010000900100009101000092010000930100009401000095010000960100009701000098010000990100009a0100009b0100009c0100009d0100009e0100009f010000a0010000a1010000a2010000a3010000a4010000a5010000a6010000a7010000a8010000a9010000aa010000ab010000ac010000ad010000ae010000af010000b0010000b1010000b2010000b3010000b4010000b5010000b6010000b7010000b8010000 m_CollisionMaterial: {fileID: 0} m_SurfaceCollisions: 1 - m_MassScale: 1 m_SelfCollisions: 1 - restLength_: 5.39185 + restLength_: 5.3759427 elements: - particle1: 294 particle2: 295 - restLength: 0.11771238 + restLength: 0.11737857 constraintForce: 0 tearResistance: 1 - particle1: 295 particle2: 296 - restLength: 0.11794325 + restLength: 0.11757569 constraintForce: 0 tearResistance: 1 - particle1: 296 particle2: 297 - restLength: 0.117595166 + restLength: 0.117257625 constraintForce: 0 tearResistance: 1 - particle1: 297 particle2: 298 - restLength: 0.11768351 + restLength: 0.117347114 constraintForce: 0 tearResistance: 1 - particle1: 298 particle2: 299 - restLength: 0.11783673 + restLength: 0.11749813 constraintForce: 0 tearResistance: 1 - particle1: 299 particle2: 300 - restLength: 0.117969744 + restLength: 0.117627345 constraintForce: 0 tearResistance: 1 - particle1: 300 particle2: 301 - restLength: 0.11802316 + restLength: 0.1176776 constraintForce: 0 tearResistance: 1 - particle1: 301 particle2: 302 - restLength: 0.11796464 + restLength: 0.11761664 constraintForce: 0 tearResistance: 1 - particle1: 302 particle2: 303 - restLength: 0.1178521 + restLength: 0.117508255 constraintForce: 0 tearResistance: 1 - particle1: 303 particle2: 304 - restLength: 0.117975526 + restLength: 0.11763225 constraintForce: 0 tearResistance: 1 - particle1: 304 particle2: 305 - restLength: 0.11801252 + restLength: 0.11766701 constraintForce: 0 tearResistance: 1 - particle1: 305 particle2: 306 - restLength: 0.11794836 + restLength: 0.117603354 constraintForce: 0 tearResistance: 1 - particle1: 306 particle2: 307 - restLength: 0.11783 + restLength: 0.11748713 constraintForce: 0 tearResistance: 1 - particle1: 307 particle2: 308 - restLength: 0.117713265 + restLength: 0.11737358 constraintForce: 0 tearResistance: 1 - particle1: 308 particle2: 309 - restLength: 0.117651865 + restLength: 0.11731443 constraintForce: 0 tearResistance: 1 - particle1: 309 particle2: 310 - restLength: 0.117673375 + restLength: 0.117334664 constraintForce: 0 tearResistance: 1 - particle1: 310 particle2: 311 - restLength: 0.117791526 + restLength: 0.117409684 constraintForce: 0 tearResistance: 1 - particle1: 311 particle2: 312 - restLength: 0.11774277 + restLength: 0.117427535 constraintForce: 0 tearResistance: 1 - particle1: 312 particle2: 313 - restLength: 0.11769215 + restLength: 0.1173339 constraintForce: 0 tearResistance: 1 - particle1: 313 particle2: 314 - restLength: 0.11750718 + restLength: 0.11715327 constraintForce: 0 tearResistance: 1 - particle1: 314 particle2: 315 - restLength: 0.11741844 + restLength: 0.11707407 constraintForce: 0 tearResistance: 1 - particle1: 315 particle2: 316 - restLength: 0.1176177 + restLength: 0.11728205 constraintForce: 0 tearResistance: 1 - particle1: 316 particle2: 317 - restLength: 0.11827736 + restLength: 0.11794879 constraintForce: 0 tearResistance: 1 - particle1: 317 particle2: 318 - restLength: 0.11706203 + restLength: 0.11673033 constraintForce: 0 tearResistance: 1 - particle1: 318 particle2: 319 - restLength: 0.11636803 + restLength: 0.116027325 constraintForce: 0 tearResistance: 1 - particle1: 319 particle2: 320 - restLength: 0.11621493 + restLength: 0.115863316 constraintForce: 0 tearResistance: 1 - particle1: 320 particle2: 321 - restLength: 0.11634967 + restLength: 0.11598866 constraintForce: 0 tearResistance: 1 - particle1: 321 particle2: 322 - restLength: 0.11650062 + restLength: 0.11614065 constraintForce: 0 tearResistance: 1 - particle1: 322 particle2: 323 - restLength: 0.11651943 + restLength: 0.11616688 constraintForce: 0 tearResistance: 1 - particle1: 323 particle2: 324 - restLength: 0.11646894 + restLength: 0.11612464 constraintForce: 0 tearResistance: 1 - particle1: 324 particle2: 325 - restLength: 0.11646836 + restLength: 0.116126075 constraintForce: 0 tearResistance: 1 - particle1: 325 particle2: 326 - restLength: 0.11656151 + restLength: 0.1162187 constraintForce: 0 tearResistance: 1 - particle1: 326 particle2: 327 - restLength: 0.11671458 + restLength: 0.116368376 constraintForce: 0 tearResistance: 1 - particle1: 327 particle2: 328 - restLength: 0.11685168 + restLength: 0.11650247 constraintForce: 0 tearResistance: 1 - particle1: 328 particle2: 329 - restLength: 0.11689511 + restLength: 0.11654539 constraintForce: 0 tearResistance: 1 - particle1: 329 particle2: 330 - restLength: 0.1167252 + restLength: 0.11637627 constraintForce: 0 tearResistance: 1 - particle1: 330 particle2: 331 - restLength: 0.11671828 + restLength: 0.116367616 constraintForce: 0 tearResistance: 1 - particle1: 331 particle2: 332 - restLength: 0.11685561 + restLength: 0.116505764 constraintForce: 0 tearResistance: 1 - particle1: 332 particle2: 333 - restLength: 0.11681989 + restLength: 0.11647182 constraintForce: 0 tearResistance: 1 - particle1: 333 particle2: 334 - restLength: 0.11662538 + restLength: 0.11628203 constraintForce: 0 tearResistance: 1 - particle1: 334 particle2: 335 - restLength: 0.11642074 + restLength: 0.11606255 constraintForce: 0 tearResistance: 1 - particle1: 335 particle2: 336 - restLength: 0.117048115 + restLength: 0.11669507 constraintForce: 0 tearResistance: 1 - particle1: 336 particle2: 337 - restLength: 0.11699504 + restLength: 0.116644375 constraintForce: 0 tearResistance: 1 - particle1: 337 particle2: 338 - restLength: 0.11687661 + restLength: 0.11652727 constraintForce: 0 tearResistance: 1 - particle1: 338 particle2: 339 - restLength: 0.11661551 + restLength: 0.116267465 constraintForce: 0 tearResistance: 1 - particle1: 339 particle2: 340 - restLength: 0.11574278 + restLength: 0.115411185 constraintForce: 0 tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 m_RopeBlueprint: {fileID: 11400000, guid: f92460ac39eb444ad8f2bfb5714bb425, type: 2} tearingEnabled: 0 tearResistanceMultiplier: 1000 @@ -1599,9 +1692,64 @@ MonoBehaviour: m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity +--- !u!23 &1346965644 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1346965641} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1346965645 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1346965641} + m_Mesh: {fileID: 1427008878} --- !u!114 &1346965646 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1614,15 +1762,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} m_Name: m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 uvAnchor: 0 uvScale: {x: 1, y: 16} normalizeV: 1 @@ -1643,7 +1782,6 @@ MonoBehaviour: decimation: 0.05 smoothing: 1 twist: 0 - indexInSystem: 1 --- !u!114 &1346965648 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1661,9 +1799,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: -8864857226987616246, guid: f92460ac39eb444ad8f2bfb5714bb425, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &1346965649 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1705,67 +1842,362 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: category: 0 ---- !u!850595691 &1570830420 -LightingSettings: +--- !u!43 &1427008878 +Mesh: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: Settings.lighting - serializedVersion: 9 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 1 - m_RealtimeEnvironmentLighting: 1 - m_BounceScale: 1 - m_AlbedoBoost: 1 - m_IndirectOutputScale: 1 - m_UsingShadowmask: 0 - m_BakeBackend: 1 - m_LightmapMaxSize: 1024 - m_LightmapSizeFixed: 0 - m_UseMipmapLimits: 1 - m_BakeResolution: 40 - m_Padding: 2 - m_LightmapCompression: 3 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 0 - m_CompAOExponentDirect: 0 - m_ExtractAO: 0 - m_MixedBakeMode: 1 - m_LightmapsBakeMode: 1 - m_FilterMode: 1 - m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} - m_ExportTrainingData: 0 - m_EnableWorkerProcessBaking: 1 - m_TrainingDataDestination: TrainingData - m_RealtimeResolution: 2 - m_ForceWhiteAlbedo: 0 - m_ForceUpdates: 0 - m_PVRCulling: 1 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 512 - m_PVREnvironmentSampleCount: 512 - m_PVREnvironmentReferencePointCount: 2048 - m_LightProbeSampleCountMultiplier: 4 - m_PVRBounces: 2 - m_PVRMinBounces: 2 - m_PVREnvironmentImportanceSampling: 0 - m_PVRFilteringMode: 2 - m_PVRDenoiserTypeDirect: 0 - m_PVRDenoiserTypeIndirect: 0 - m_PVRDenoiserTypeAO: 0 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 5 - m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_RespectSceneVisibilityWhenBakingGI: 0 + m_Name: extrudedMesh + serializedVersion: 12 + m_SubMeshes: + - serializedVersion: 2 + firstByte: 0 + indexCount: 0 + topology: 0 + baseVertex: 0 + firstVertex: 0 + vertexCount: 0 + localAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_Shapes: + vertices: [] + shapes: [] + channels: [] + fullWeights: [] + m_BindPose: [] + m_BoneNameHashes: + m_RootBoneNameHash: 0 + m_BonesAABB: [] + m_VariableBoneCountWeights: + m_Data: + m_MeshCompression: 0 + m_IsReadable: 1 + m_KeepVertices: 1 + m_KeepIndices: 1 + m_IndexFormat: 0 + m_IndexBuffer: + m_VertexData: + serializedVersion: 3 + m_VertexCount: 0 + m_Channels: + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + m_DataSize: 0 + _typelessdata: + m_CompressedMesh: + m_Vertices: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_UV: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Normals: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Tangents: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Weights: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_NormalSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_TangentSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_FloatColors: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_BoneIndices: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_Triangles: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_UVInfo: 0 + m_LocalAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_MeshUsageFlags: 0 + m_CookingOptions: 30 + m_BakedConvexCollisionMesh: + m_BakedTriangleCollisionMesh: + 'm_MeshMetrics[0]': 1 + 'm_MeshMetrics[1]': 1 + m_MeshOptimizationFlags: 1 + m_StreamData: + serializedVersion: 2 + offset: 0 + size: 0 + path: + m_MeshLodInfo: + serializedVersion: 2 + m_LodSelectionCurve: + serializedVersion: 1 + m_LodSlope: 0 + m_LodBias: 0 + m_NumLevels: 1 + m_SubMeshes: + - serializedVersion: 2 + m_Levels: + - serializedVersion: 1 + m_IndexStart: 0 + m_IndexCount: 0 +--- !u!43 &1619481825 +Mesh: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: extrudedMesh + serializedVersion: 12 + m_SubMeshes: + - serializedVersion: 2 + firstByte: 0 + indexCount: 0 + topology: 0 + baseVertex: 0 + firstVertex: 0 + vertexCount: 0 + localAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_Shapes: + vertices: [] + shapes: [] + channels: [] + fullWeights: [] + m_BindPose: [] + m_BoneNameHashes: + m_RootBoneNameHash: 0 + m_BonesAABB: [] + m_VariableBoneCountWeights: + m_Data: + m_MeshCompression: 0 + m_IsReadable: 1 + m_KeepVertices: 1 + m_KeepIndices: 1 + m_IndexFormat: 0 + m_IndexBuffer: + m_VertexData: + serializedVersion: 3 + m_VertexCount: 0 + m_Channels: + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + m_DataSize: 0 + _typelessdata: + m_CompressedMesh: + m_Vertices: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_UV: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Normals: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Tangents: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Weights: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_NormalSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_TangentSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_FloatColors: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_BoneIndices: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_Triangles: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_UVInfo: 0 + m_LocalAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_MeshUsageFlags: 0 + m_CookingOptions: 30 + m_BakedConvexCollisionMesh: + m_BakedTriangleCollisionMesh: + 'm_MeshMetrics[0]': 1 + 'm_MeshMetrics[1]': 1 + m_MeshOptimizationFlags: 1 + m_StreamData: + serializedVersion: 2 + offset: 0 + size: 0 + path: + m_MeshLodInfo: + serializedVersion: 2 + m_LodSelectionCurve: + serializedVersion: 1 + m_LodSlope: 0 + m_LodBias: 0 + m_NumLevels: 1 + m_SubMeshes: + - serializedVersion: 2 + m_Levels: + - serializedVersion: 1 + m_IndexStart: 0 + m_IndexCount: 0 --- !u!1 &1896057539 GameObject: m_ObjectHideFlags: 0 @@ -1957,6 +2389,7 @@ GameObject: m_Component: - component: {fileID: 2102841797} - component: {fileID: 2102841796} + - component: {fileID: 2102841795} m_Layer: 0 m_Name: Obi Solver m_TagString: Untagged @@ -1964,6 +2397,21 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 +--- !u!114 &2102841795 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2102841794} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1d9704d540ac448439a425526f6b2986, type: 3} + m_Name: + m_EditorClassIdentifier: + solvers: + - {fileID: 2102841796} + substeps: 3 --- !u!114 &2102841796 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1978,57 +2426,23 @@ MonoBehaviour: m_EditorClassIdentifier: simulateWhenInvisible: 1 m_Backend: 1 - substeps: 4 - maxStepsPerFrame: 1 - synchronization: 0 parameters: mode: 0 interpolation: 0 gravity: {x: 0, y: -9.81, z: 0} - ambientWind: {x: 0, y: 0, z: 0} - foamGravityScale: 1 damping: 0.2 maxAnisotropy: 3 sleepThreshold: 0.0001 - maxVelocity: 50 - maxAngularVelocity: 10 collisionMargin: 0.025 maxDepenetration: 10 - colliderCCD: 1 - particleCCD: 0 + continuousCollisionDetection: 1 shockPropagation: 0 surfaceCollisionIterations: 8 surfaceCollisionTolerance: 0.01 - diffusionMask: {x: 1, y: 1, z: 1, w: 1} - m_MaxSurfaceChunks: 32768 - maxQueryResults: 8192 - maxFoamParticles: 8192 - maxParticleNeighbors: 128 - maxParticleContacts: 6 - useLimits: 0 - killOffLimitsParticles: 0 - boundaryLimits: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 5, y: 5, z: 5} gravity: {x: 0, y: -9.81, z: 0} gravitySpace: 1 - ambientWind: {x: 0, y: 0, z: 0} - windSpace: 1 - foamSubsteps: 1 - foamMinNeighbors: 3 - foamCollisions: 0 - maxFoamVelocityStretch: 0.3 - foamRadiusScale: 1 - foamFade: {x: 0.05, y: 0.8} - foamAccelAgingRange: {x: 0.5, y: 0.8} - foamAccelAging: 4 - foamVolumeDensity: 0.1 - foamAmbientDensity: 0.02 - foamScatterColor: {r: 0.8, g: 0.75, b: 0.7, a: 1} - foamAmbientColor: {r: 0.4, g: 0.5, b: 0.6, a: 1} worldLinearInertiaScale: 0 worldAngularInertiaScale: 0 - synchronousSpatialQueries: 0 distanceConstraintParameters: evaluationOrder: 0 iterations: 2 @@ -2084,11 +2498,6 @@ MonoBehaviour: iterations: 5 SORFactor: 1 enabled: 0 - pinholeConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 stitchConstraintParameters: evaluationOrder: 0 iterations: 5 @@ -2132,6 +2541,184 @@ Transform: - {fileID: 21365383} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!43 &2122469315 +Mesh: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: extrudedMesh + serializedVersion: 12 + m_SubMeshes: + - serializedVersion: 2 + firstByte: 0 + indexCount: 0 + topology: 0 + baseVertex: 0 + firstVertex: 0 + vertexCount: 0 + localAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_Shapes: + vertices: [] + shapes: [] + channels: [] + fullWeights: [] + m_BindPose: [] + m_BoneNameHashes: + m_RootBoneNameHash: 0 + m_BonesAABB: [] + m_VariableBoneCountWeights: + m_Data: + m_MeshCompression: 0 + m_IsReadable: 1 + m_KeepVertices: 1 + m_KeepIndices: 1 + m_IndexFormat: 0 + m_IndexBuffer: + m_VertexData: + serializedVersion: 3 + m_VertexCount: 0 + m_Channels: + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + m_DataSize: 0 + _typelessdata: + m_CompressedMesh: + m_Vertices: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_UV: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Normals: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Tangents: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Weights: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_NormalSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_TangentSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_FloatColors: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_BoneIndices: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_Triangles: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_UVInfo: 0 + m_LocalAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_MeshUsageFlags: 0 + m_CookingOptions: 30 + m_BakedConvexCollisionMesh: + m_BakedTriangleCollisionMesh: + 'm_MeshMetrics[0]': 1 + 'm_MeshMetrics[1]': 1 + m_MeshOptimizationFlags: 1 + m_StreamData: + serializedVersion: 2 + offset: 0 + size: 0 + path: + m_MeshLodInfo: + serializedVersion: 2 + m_LodSelectionCurve: + serializedVersion: 1 + m_LodSlope: 0 + m_LodBias: 0 + m_NumLevels: 1 + m_SubMeshes: + - serializedVersion: 2 + m_Levels: + - serializedVersion: 1 + m_IndexStart: 0 + m_IndexCount: 0 --- !u!1660057539 &9223372036854775807 SceneRoots: m_ObjectHideFlags: 0 @@ -2140,5 +2727,5 @@ SceneRoots: - {fileID: 421764872} - {fileID: 1175446146} - {fileID: 2102841797} + - {fileID: 926308010} - {fileID: 1896057543} - - {fileID: 949374099} diff --git a/Assets/Obi/Samples/RopeAndRod/RopeCuttingSettings.lighting b/Assets/Obi/Samples/RopeAndRod/RopeCuttingSettings.lighting new file mode 100644 index 000000000..67d9bbfc6 --- /dev/null +++ b/Assets/Obi/Samples/RopeAndRod/RopeCuttingSettings.lighting @@ -0,0 +1,63 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!850595691 &4890085278179872738 +LightingSettings: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: RopeCuttingSettings + serializedVersion: 9 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 1 + m_RealtimeEnvironmentLighting: 1 + m_BounceScale: 1 + m_AlbedoBoost: 1 + m_IndirectOutputScale: 1 + m_UsingShadowmask: 0 + m_BakeBackend: 1 + m_LightmapMaxSize: 1024 + m_LightmapSizeFixed: 0 + m_UseMipmapLimits: 1 + m_BakeResolution: 40 + m_Padding: 2 + m_LightmapCompression: 3 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 0 + m_CompAOExponentDirect: 0 + m_ExtractAO: 0 + m_MixedBakeMode: 1 + m_LightmapsBakeMode: 1 + m_FilterMode: 1 + m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + m_ExportTrainingData: 0 + m_EnableWorkerProcessBaking: 1 + m_TrainingDataDestination: TrainingData + m_RealtimeResolution: 2 + m_ForceWhiteAlbedo: 0 + m_ForceUpdates: 0 + m_PVRCulling: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVREnvironmentSampleCount: 512 + m_PVREnvironmentReferencePointCount: 2048 + m_LightProbeSampleCountMultiplier: 4 + m_PVRBounces: 2 + m_PVRMinBounces: 2 + m_PVREnvironmentImportanceSampling: 0 + m_PVRFilteringMode: 2 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_RespectSceneVisibilityWhenBakingGI: 0 diff --git a/Assets/Obi/Samples/RopeAndRod/RopeCuttingSettings.lighting.meta b/Assets/Obi/Samples/RopeAndRod/RopeCuttingSettings.lighting.meta new file mode 100644 index 000000000..166aabc9d --- /dev/null +++ b/Assets/Obi/Samples/RopeAndRod/RopeCuttingSettings.lighting.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d34219ba938489546b7eb199fd0d5c4f +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 4890085278179872738 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Samples/RopeAndRod/RopeGrapplingHook.unity b/Assets/Obi/Samples/RopeAndRod/RopeGrapplingHook.unity index d48f8ed97..9a54a833c 100644 --- a/Assets/Obi/Samples/RopeAndRod/RopeGrapplingHook.unity +++ b/Assets/Obi/Samples/RopeAndRod/RopeGrapplingHook.unity @@ -43,7 +43,7 @@ RenderSettings: LightmapSettings: m_ObjectHideFlags: 0 serializedVersion: 13 - m_BakeOnSceneLoad: 0 + m_BakeOnSceneLoad: 1 m_GISettings: serializedVersion: 2 m_BounceScale: 1 @@ -152,7 +152,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0.05 - inverted: 0 material: {fileID: 0} filter: -65535 m_SourceCollider: {fileID: 694935032} @@ -475,7 +474,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 0} filter: -65535 m_SourceCollider: {fileID: 1006563105} @@ -689,17 +687,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 82b0f164ac14247fd8a566109fbbe771, type: 3} m_Name: m_EditorClassIdentifier: - floorRaycastDistance: 1.2 acceleration: 20 maxSpeed: 10 - damping: 0.008 - jumpPower: 8 - airAcceleration: 16 - airMaxSpeed: 12 - extraGravity: -12 - centerOfMass: {x: 0, y: -0.25, z: 0} - P: 2 - D: 0.1 + jumpPower: 4 --- !u!114 &1247776994 MonoBehaviour: m_ObjectHideFlags: 0 @@ -726,7 +716,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 0} filter: -131071 m_SourceCollider: {fileID: 1247776990} @@ -941,7 +930,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0.05 - inverted: 0 material: {fileID: 0} filter: -65535 m_SourceCollider: {fileID: 1641461106} @@ -1182,7 +1170,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0.05 - inverted: 0 material: {fileID: 0} filter: -65535 m_SourceCollider: {fileID: 1735419979} @@ -1397,6 +1384,7 @@ GameObject: m_Component: - component: {fileID: 2108375383} - component: {fileID: 2108375382} + - component: {fileID: 2108375381} m_Layer: 0 m_Name: Obi Solver m_TagString: Untagged @@ -1404,6 +1392,21 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 +--- !u!114 &2108375381 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2108375380} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1d9704d540ac448439a425526f6b2986, type: 3} + m_Name: + m_EditorClassIdentifier: + solvers: + - {fileID: 2108375382} + substeps: 8 --- !u!114 &2108375382 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1418,57 +1421,23 @@ MonoBehaviour: m_EditorClassIdentifier: simulateWhenInvisible: 1 m_Backend: 1 - substeps: 8 - maxStepsPerFrame: 1 - synchronization: 0 parameters: mode: 0 interpolation: 0 gravity: {x: 0, y: -9.81, z: 0} - ambientWind: {x: 0, y: 0, z: 0} - foamGravityScale: 1 damping: 0 maxAnisotropy: 3 sleepThreshold: 0.0001 - maxVelocity: 50 - maxAngularVelocity: 10 collisionMargin: 0.02 maxDepenetration: 10 - colliderCCD: 1 - particleCCD: 0 + continuousCollisionDetection: 1 shockPropagation: 0 surfaceCollisionIterations: 8 surfaceCollisionTolerance: 0.005 - diffusionMask: {x: 1, y: 1, z: 1, w: 1} - m_MaxSurfaceChunks: 32768 - maxQueryResults: 8192 - maxFoamParticles: 8192 - maxParticleNeighbors: 128 - maxParticleContacts: 6 - useLimits: 0 - killOffLimitsParticles: 0 - boundaryLimits: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 5, y: 5, z: 5} gravity: {x: 0, y: -9.81, z: 0} gravitySpace: 1 - ambientWind: {x: 0, y: 0, z: 0} - windSpace: 1 - foamSubsteps: 1 - foamMinNeighbors: 3 - foamCollisions: 0 - maxFoamVelocityStretch: 0.3 - foamRadiusScale: 1 - foamFade: {x: 0.05, y: 0.8} - foamAccelAgingRange: {x: 0.5, y: 0.8} - foamAccelAging: 4 - foamVolumeDensity: 0.1 - foamAmbientDensity: 0.02 - foamScatterColor: {r: 0.8, g: 0.75, b: 0.7, a: 1} - foamAmbientColor: {r: 0.4, g: 0.5, b: 0.6, a: 1} worldLinearInertiaScale: 0 worldAngularInertiaScale: 0 - synchronousSpatialQueries: 0 distanceConstraintParameters: evaluationOrder: 0 iterations: 2 @@ -1524,11 +1493,6 @@ MonoBehaviour: iterations: 1 SORFactor: 1 enabled: 1 - pinholeConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 stitchConstraintParameters: evaluationOrder: 1 iterations: 2 diff --git a/Assets/Obi/Samples/RopeAndRod/RopeNet.unity b/Assets/Obi/Samples/RopeAndRod/RopeNet.unity index 78f41e4e0..5a7c82467 100644 --- a/Assets/Obi/Samples/RopeAndRod/RopeNet.unity +++ b/Assets/Obi/Samples/RopeAndRod/RopeNet.unity @@ -94,7 +94,7 @@ LightmapSettings: m_TrainingDataDestination: TrainingData m_LightProbeSampleCountMultiplier: 4 m_LightingDataAsset: {fileID: 20201, guid: 0000000000000000f000000000000000, type: 0} - m_LightingSettings: {fileID: 752305721} + m_LightingSettings: {fileID: 4890085278179872738, guid: 95604fce3b44fab4eb718db56f30a177, type: 2} --- !u!196 &4 NavMeshSettings: serializedVersion: 2 @@ -204,7 +204,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 0} filter: -65535 m_SourceCollider: {fileID: 65402946} @@ -323,67 +322,6 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!850595691 &752305721 -LightingSettings: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Settings.lighting - serializedVersion: 9 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 0 - m_RealtimeEnvironmentLighting: 1 - m_BounceScale: 1 - m_AlbedoBoost: 1 - m_IndirectOutputScale: 1 - m_UsingShadowmask: 1 - m_BakeBackend: 1 - m_LightmapMaxSize: 1024 - m_LightmapSizeFixed: 0 - m_UseMipmapLimits: 1 - m_BakeResolution: 40 - m_Padding: 2 - m_LightmapCompression: 3 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 1 - m_CompAOExponentDirect: 0 - m_ExtractAO: 0 - m_MixedBakeMode: 2 - m_LightmapsBakeMode: 1 - m_FilterMode: 1 - m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} - m_ExportTrainingData: 0 - m_EnableWorkerProcessBaking: 1 - m_TrainingDataDestination: TrainingData - m_RealtimeResolution: 2 - m_ForceWhiteAlbedo: 0 - m_ForceUpdates: 0 - m_PVRCulling: 1 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 512 - m_PVREnvironmentSampleCount: 256 - m_PVREnvironmentReferencePointCount: 2048 - m_LightProbeSampleCountMultiplier: 4 - m_PVRBounces: 2 - m_PVRMinBounces: 2 - m_PVREnvironmentImportanceSampling: 1 - m_PVRFilteringMode: 1 - m_PVRDenoiserTypeDirect: 1 - m_PVRDenoiserTypeIndirect: 1 - m_PVRDenoiserTypeAO: 1 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 5 - m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_RespectSceneVisibilityWhenBakingGI: 0 --- !u!1 &1750272832 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Obi/Samples/RopeAndRod/RopeNetSettings.lighting b/Assets/Obi/Samples/RopeAndRod/RopeNetSettings.lighting new file mode 100644 index 000000000..7c9fb3db7 --- /dev/null +++ b/Assets/Obi/Samples/RopeAndRod/RopeNetSettings.lighting @@ -0,0 +1,63 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!850595691 &4890085278179872738 +LightingSettings: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: RopeNetSettings + serializedVersion: 9 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_RealtimeEnvironmentLighting: 1 + m_BounceScale: 1 + m_AlbedoBoost: 1 + m_IndirectOutputScale: 1 + m_UsingShadowmask: 1 + m_BakeBackend: 1 + m_LightmapMaxSize: 1024 + m_LightmapSizeFixed: 0 + m_UseMipmapLimits: 1 + m_BakeResolution: 40 + m_Padding: 2 + m_LightmapCompression: 3 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAO: 0 + m_MixedBakeMode: 2 + m_LightmapsBakeMode: 1 + m_FilterMode: 1 + m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + m_ExportTrainingData: 0 + m_EnableWorkerProcessBaking: 1 + m_TrainingDataDestination: TrainingData + m_RealtimeResolution: 2 + m_ForceWhiteAlbedo: 0 + m_ForceUpdates: 0 + m_PVRCulling: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVREnvironmentSampleCount: 256 + m_PVREnvironmentReferencePointCount: 2048 + m_LightProbeSampleCountMultiplier: 4 + m_PVRBounces: 2 + m_PVRMinBounces: 2 + m_PVREnvironmentImportanceSampling: 1 + m_PVRFilteringMode: 1 + m_PVRDenoiserTypeDirect: 1 + m_PVRDenoiserTypeIndirect: 1 + m_PVRDenoiserTypeAO: 1 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_RespectSceneVisibilityWhenBakingGI: 0 diff --git a/Assets/Obi/Samples/RopeAndRod/RopeNetSettings.lighting.meta b/Assets/Obi/Samples/RopeAndRod/RopeNetSettings.lighting.meta new file mode 100644 index 000000000..a8bce3604 --- /dev/null +++ b/Assets/Obi/Samples/RopeAndRod/RopeNetSettings.lighting.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 95604fce3b44fab4eb718db56f30a177 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 4890085278179872738 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Samples/RopeAndRod/RopeShowcase.unity b/Assets/Obi/Samples/RopeAndRod/RopeShowcase.unity index 71581ed3d..551f05709 100644 --- a/Assets/Obi/Samples/RopeAndRod/RopeShowcase.unity +++ b/Assets/Obi/Samples/RopeAndRod/RopeShowcase.unity @@ -43,7 +43,7 @@ RenderSettings: LightmapSettings: m_ObjectHideFlags: 0 serializedVersion: 13 - m_BakeOnSceneLoad: 0 + m_BakeOnSceneLoad: 1 m_GISettings: serializedVersion: 2 m_BounceScale: 1 @@ -369,7 +369,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0.05 - inverted: 0 material: {fileID: 0} filter: -65535 m_SourceCollider: {fileID: 206877716} @@ -513,7 +512,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0.05 - inverted: 0 material: {fileID: 0} filter: -65535 m_SourceCollider: {fileID: 256028322} @@ -527,6 +525,8 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 283112603} + - component: {fileID: 283112608} + - component: {fileID: 283112607} - component: {fileID: 283112605} - component: {fileID: 283112604} - component: {fileID: 283112606} @@ -571,9 +571,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: -8864857226987616246, guid: 9d8ad1e0aac8f48deb9f3cda92974152, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &283112605 MonoBehaviour: m_ObjectHideFlags: 0 @@ -591,9 +590,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: -2639811391673711616, guid: 9d8ad1e0aac8f48deb9f3cda92974152, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &283112606 MonoBehaviour: m_ObjectHideFlags: 0 @@ -606,13 +604,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} m_Name: m_EditorClassIdentifier: - solverIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f00000070000000710000007200000073000000740000007500000076000000770000007800000079000000 - m_AlignBytes: 16 - groupID: 1 + solverIndices: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f00000070000000710000007200000073000000740000007500000076000000770000007800000079000000 m_CollisionMaterial: {fileID: 0} m_SurfaceCollisions: 0 - m_MassScale: 1 m_SelfCollisions: 0 restLength_: 4.014817 elements: @@ -721,9 +715,6 @@ MonoBehaviour: restLength: 0.1872108 constraintForce: 0 tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 m_RopeBlueprint: {fileID: 11400000, guid: 9d8ad1e0aac8f48deb9f3cda92974152, type: 2} tearingEnabled: 0 tearResistanceMultiplier: 1000 @@ -737,6 +728,62 @@ MonoBehaviour: _maxBending: 0.04 _plasticYield: 0 _plasticCreep: 0 +--- !u!23 &283112607 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 283112602} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &283112608 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 283112602} + m_Mesh: {fileID: 1984461382} --- !u!114 &283112609 MonoBehaviour: m_ObjectHideFlags: 0 @@ -749,15 +796,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} m_Name: m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 uvAnchor: 0 uvScale: {x: 1, y: 6} normalizeV: 1 @@ -778,7 +816,6 @@ MonoBehaviour: decimation: 0 smoothing: 0 twist: 0 - indexInSystem: 0 --- !u!1001 &421764872 PrefabInstance: m_ObjectHideFlags: 0 @@ -1009,7 +1046,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 0} filter: -65535 m_SourceCollider: {fileID: 506459882} @@ -1256,7 +1292,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 0} filter: -65535 m_SourceCollider: {fileID: 656652122} @@ -1270,6 +1305,8 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 913365225} + - component: {fileID: 913365230} + - component: {fileID: 913365229} - component: {fileID: 913365226} - component: {fileID: 913365231} - component: {fileID: 913365228} @@ -1309,13 +1346,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} m_Name: m_EditorClassIdentifier: - solverIndices: - serializedContents: 7a0000007b0000007c0000007d0000007e0000007f000000800000008100000082000000830000008400000085000000860000008700000088000000890000008a0000008b0000008c0000008d0000008e0000008f000000900000009100000092000000930000009400000095000000960000009700000098000000990000009a0000009b0000009c0000009d0000009e0000009f000000a0000000a1000000a2000000a3000000a4000000a5000000a6000000a7000000a8000000a9000000aa000000ab000000ac000000ad000000ae000000af000000b0000000b1000000b2000000b3000000b4000000b5000000b6000000b7000000b8000000b9000000ba000000bb000000bc000000bd000000be000000bf000000c0000000c1000000c2000000c3000000c4000000c5000000c6000000c7000000c8000000c9000000ca000000cb000000cc000000cd000000ce000000cf000000d0000000d1000000d2000000d3000000d4000000d5000000d6000000d7000000d8000000d9000000da000000db000000dc000000dd000000de000000df000000e0000000e1000000e2000000e3000000e4000000e5000000e6000000e7000000e8000000e9000000 - m_AlignBytes: 16 - groupID: 2 + solverIndices: 7a0000007b0000007c0000007d0000007e0000007f000000800000008100000082000000830000008400000085000000860000008700000088000000890000008a0000008b0000008c0000008d0000008e0000008f000000900000009100000092000000930000009400000095000000960000009700000098000000990000009a0000009b0000009c0000009d0000009e0000009f000000a0000000a1000000a2000000a3000000a4000000a5000000a6000000a7000000a8000000a9000000aa000000ab000000ac000000ad000000ae000000af000000b0000000b1000000b2000000b3000000b4000000b5000000b6000000b7000000b8000000b9000000ba000000bb000000bc000000bd000000be000000bf000000c0000000c1000000c2000000c3000000c4000000c5000000c6000000c7000000c8000000c9000000ca000000cb000000cc000000cd000000ce000000cf000000d0000000d1000000d2000000d3000000d4000000d5000000d6000000d7000000d8000000d9000000da000000db000000dc000000dd000000de000000df000000e0000000e1000000e2000000e3000000e4000000e5000000e6000000e7000000e8000000e9000000 m_CollisionMaterial: {fileID: 0} m_SurfaceCollisions: 0 - m_MassScale: 1 m_SelfCollisions: 0 restLength_: 2 elements: @@ -1374,9 +1407,6 @@ MonoBehaviour: restLength: 0.18078607 constraintForce: 0 tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} tearingEnabled: 0 tearResistanceMultiplier: 1000 @@ -1407,9 +1437,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &913365228 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1422,20 +1451,67 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} m_Name: m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 uvAnchor: 0 uvScale: {x: 1, y: 6} normalizeV: 1 section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} thicknessScale: 0.8 +--- !u!23 &913365229 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 913365224} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &913365230 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 913365224} + m_Mesh: {fileID: 1413863089} --- !u!114 &913365231 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1451,7 +1527,6 @@ MonoBehaviour: decimation: 0 smoothing: 0 twist: 0 - indexInSystem: 1 --- !u!114 &913365232 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1469,9 +1544,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: 8225853497016287227, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!1 &948693937 GameObject: m_ObjectHideFlags: 0 @@ -1595,6 +1669,7 @@ GameObject: - component: {fileID: 1002464895} - component: {fileID: 1002464893} - component: {fileID: 1002464892} + - component: {fileID: 1002464897} m_Layer: 0 m_Name: Main Camera m_TagString: MainCamera @@ -1684,6 +1759,26 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1002464897 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1002464891} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 62e83a599724f45a4aa337d74764e572, type: 3} + m_Name: + m_EditorClassIdentifier: + skin: {fileID: 11400000, guid: b90d3c214c99743b0865fc0e0d1f1a15, type: 2} + threadColor: {r: 0, g: 1, b: 1, a: 1} + taskColor: {r: 0, g: 1, b: 0, a: 1} + parallelTaskColor: {r: 1, g: 0.8, b: 0.2, a: 1} + renderTaskColor: {r: 0.2, g: 0.7, b: 1, a: 1} + defaultTaskColor: {r: 1, g: 0.5, b: 0.2, a: 1} + showPercentages: 0 + profileThrottle: 30 --- !u!1 &1067532266 GameObject: m_ObjectHideFlags: 0 @@ -1892,6 +1987,8 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 1201406216} + - component: {fileID: 1201406220} + - component: {fileID: 1201406221} - component: {fileID: 1201406217} - component: {fileID: 1201406222} - component: {fileID: 1201406219} @@ -1930,13 +2027,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} m_Name: m_EditorClassIdentifier: - solverIndices: - serializedContents: ea000000eb000000ec000000ed000000ee000000ef000000f0000000f1000000f2000000f3000000f4000000f5000000f6000000f7000000f8000000f9000000fa000000fb000000fc000000fd000000fe000000ff000000000100000101000002010000030100000401000005010000060100000701000008010000090100000a0100000b0100000c0100000d0100000e0100000f010000100100001101000012010000130100001401000015010000160100001701000018010000190100001a0100001b0100001c0100001d0100001e0100001f010000200100002101000022010000230100002401000025010000260100002701000028010000290100002a0100002b0100002c0100002d0100002e0100002f010000300100003101000032010000330100003401000035010000360100003701000038010000390100003a0100003b0100003c0100003d0100003e0100003f010000400100004101000042010000430100004401000045010000460100004701000048010000490100004a0100004b0100004c0100004d0100004e0100004f01000050010000510100005201000053010000540100005501000056010000570100005801000059010000 - m_AlignBytes: 16 - groupID: 3 + solverIndices: ea000000eb000000ec000000ed000000ee000000ef000000f0000000f1000000f2000000f3000000f4000000f5000000f6000000f7000000f8000000f9000000fa000000fb000000fc000000fd000000fe000000ff000000000100000101000002010000030100000401000005010000060100000701000008010000090100000a0100000b0100000c0100000d0100000e0100000f010000100100001101000012010000130100001401000015010000160100001701000018010000190100001a0100001b0100001c0100001d0100001e0100001f010000200100002101000022010000230100002401000025010000260100002701000028010000290100002a0100002b0100002c0100002d0100002e0100002f010000300100003101000032010000330100003401000035010000360100003701000038010000390100003a0100003b0100003c0100003d0100003e0100003f010000400100004101000042010000430100004401000045010000460100004701000048010000490100004a0100004b0100004c0100004d0100004e0100004f01000050010000510100005201000053010000540100005501000056010000570100005801000059010000 m_CollisionMaterial: {fileID: 0} m_SurfaceCollisions: 0 - m_MassScale: 1 m_SelfCollisions: 0 restLength_: 2 elements: @@ -1995,9 +2088,6 @@ MonoBehaviour: restLength: 0.18078607 constraintForce: 0 tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} tearingEnabled: 0 tearResistanceMultiplier: 1000 @@ -2028,9 +2118,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &1201406219 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2043,20 +2132,67 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} m_Name: m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 uvAnchor: 0 uvScale: {x: 1, y: 6} normalizeV: 1 section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} thicknessScale: 1 +--- !u!23 &1201406220 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1201406215} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1201406221 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1201406215} + m_Mesh: {fileID: 1557977618} --- !u!114 &1201406222 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2072,7 +2208,6 @@ MonoBehaviour: decimation: 0 smoothing: 0 twist: 0 - indexInSystem: 2 --- !u!1 &1346965641 GameObject: m_ObjectHideFlags: 0 @@ -2082,6 +2217,8 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 1346965650} + - component: {fileID: 1346965645} + - component: {fileID: 1346965644} - component: {fileID: 1346965642} - component: {fileID: 1346965647} - component: {fileID: 1346965646} @@ -2106,13 +2243,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} m_Name: m_EditorClassIdentifier: - solverIndices: - serializedContents: 5a0100005b0100005c0100005d0100005e0100005f010000600100006101000062010000630100006401000065010000660100006701000068010000690100006a0100006b0100006c0100006d0100006e0100006f010000700100007101000072010000730100007401000075010000760100007701000078010000790100007a0100007b0100007c0100007d0100007e0100007f010000800100008101000082010000830100008401000085010000860100008701000088010000890100008a0100008b0100008c0100008d0100008e0100008f010000900100009101000092010000930100009401000095010000960100009701000098010000990100009a0100009b0100009c0100009d0100009e0100009f010000a0010000a1010000a2010000a3010000a4010000a5010000a6010000a7010000a8010000a9010000aa010000ab010000ac010000ad010000ae010000af010000b0010000b1010000b2010000b3010000b4010000b5010000b6010000b7010000b8010000b9010000ba010000bb010000bc010000bd010000be010000bf010000c0010000c1010000c2010000c3010000c4010000c5010000c6010000c7010000c8010000c9010000 - m_AlignBytes: 16 - groupID: 4 + solverIndices: 5a0100005b0100005c0100005d0100005e0100005f010000600100006101000062010000630100006401000065010000660100006701000068010000690100006a0100006b0100006c0100006d0100006e0100006f010000700100007101000072010000730100007401000075010000760100007701000078010000790100007a0100007b0100007c0100007d0100007e0100007f010000800100008101000082010000830100008401000085010000860100008701000088010000890100008a0100008b0100008c0100008d0100008e0100008f010000900100009101000092010000930100009401000095010000960100009701000098010000990100009a0100009b0100009c0100009d0100009e0100009f010000a0010000a1010000a2010000a3010000a4010000a5010000a6010000a7010000a8010000a9010000aa010000ab010000ac010000ad010000ae010000af010000b0010000b1010000b2010000b3010000b4010000b5010000b6010000b7010000b8010000b9010000ba010000bb010000bc010000bd010000be010000bf010000c0010000c1010000c2010000c3010000c4010000c5010000c6010000c7010000c8010000c9010000 m_CollisionMaterial: {fileID: 0} m_SurfaceCollisions: 0 - m_MassScale: 1 m_SelfCollisions: 0 restLength_: 2 elements: @@ -2171,9 +2304,6 @@ MonoBehaviour: restLength: 0.18078607 constraintForce: 0 tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} tearingEnabled: 0 tearResistanceMultiplier: 1000 @@ -2204,9 +2334,64 @@ MonoBehaviour: m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity +--- !u!23 &1346965644 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1346965641} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1346965645 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1346965641} + m_Mesh: {fileID: 1777534752} --- !u!114 &1346965646 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2219,15 +2404,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} m_Name: m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 uvAnchor: 0 uvScale: {x: 1, y: 6} normalizeV: 1 @@ -2248,7 +2424,6 @@ MonoBehaviour: decimation: 0 smoothing: 0 twist: 0 - indexInSystem: 3 --- !u!114 &1346965648 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2266,9 +2441,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: 8225853497016287227, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!4 &1346965650 Transform: m_ObjectHideFlags: 0 @@ -2319,6 +2493,184 @@ Transform: - {fileID: 458966911} m_Father: {fileID: 2102841797} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!43 &1413863089 +Mesh: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: extrudedMesh + serializedVersion: 12 + m_SubMeshes: + - serializedVersion: 2 + firstByte: 0 + indexCount: 0 + topology: 0 + baseVertex: 0 + firstVertex: 0 + vertexCount: 0 + localAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_Shapes: + vertices: [] + shapes: [] + channels: [] + fullWeights: [] + m_BindPose: [] + m_BoneNameHashes: + m_RootBoneNameHash: 0 + m_BonesAABB: [] + m_VariableBoneCountWeights: + m_Data: + m_MeshCompression: 0 + m_IsReadable: 1 + m_KeepVertices: 1 + m_KeepIndices: 1 + m_IndexFormat: 0 + m_IndexBuffer: + m_VertexData: + serializedVersion: 3 + m_VertexCount: 0 + m_Channels: + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + m_DataSize: 0 + _typelessdata: + m_CompressedMesh: + m_Vertices: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_UV: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Normals: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Tangents: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Weights: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_NormalSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_TangentSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_FloatColors: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_BoneIndices: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_Triangles: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_UVInfo: 0 + m_LocalAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_MeshUsageFlags: 0 + m_CookingOptions: 30 + m_BakedConvexCollisionMesh: + m_BakedTriangleCollisionMesh: + 'm_MeshMetrics[0]': 1 + 'm_MeshMetrics[1]': 1 + m_MeshOptimizationFlags: 1 + m_StreamData: + serializedVersion: 2 + offset: 0 + size: 0 + path: + m_MeshLodInfo: + serializedVersion: 2 + m_LodSelectionCurve: + serializedVersion: 1 + m_LodSlope: 0 + m_LodBias: 0 + m_NumLevels: 1 + m_SubMeshes: + - serializedVersion: 2 + m_Levels: + - serializedVersion: 1 + m_IndexStart: 0 + m_IndexCount: 0 --- !u!1 &1415489121 GameObject: m_ObjectHideFlags: 0 @@ -2353,6 +2705,184 @@ Transform: - {fileID: 283112603} m_Father: {fileID: 2102841797} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!43 &1557977618 +Mesh: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: extrudedMesh + serializedVersion: 12 + m_SubMeshes: + - serializedVersion: 2 + firstByte: 0 + indexCount: 0 + topology: 0 + baseVertex: 0 + firstVertex: 0 + vertexCount: 0 + localAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_Shapes: + vertices: [] + shapes: [] + channels: [] + fullWeights: [] + m_BindPose: [] + m_BoneNameHashes: + m_RootBoneNameHash: 0 + m_BonesAABB: [] + m_VariableBoneCountWeights: + m_Data: + m_MeshCompression: 0 + m_IsReadable: 1 + m_KeepVertices: 1 + m_KeepIndices: 1 + m_IndexFormat: 0 + m_IndexBuffer: + m_VertexData: + serializedVersion: 3 + m_VertexCount: 0 + m_Channels: + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + m_DataSize: 0 + _typelessdata: + m_CompressedMesh: + m_Vertices: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_UV: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Normals: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Tangents: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Weights: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_NormalSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_TangentSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_FloatColors: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_BoneIndices: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_Triangles: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_UVInfo: 0 + m_LocalAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_MeshUsageFlags: 0 + m_CookingOptions: 30 + m_BakedConvexCollisionMesh: + m_BakedTriangleCollisionMesh: + 'm_MeshMetrics[0]': 1 + 'm_MeshMetrics[1]': 1 + m_MeshOptimizationFlags: 1 + m_StreamData: + serializedVersion: 2 + offset: 0 + size: 0 + path: + m_MeshLodInfo: + serializedVersion: 2 + m_LodSelectionCurve: + serializedVersion: 1 + m_LodSlope: 0 + m_LodBias: 0 + m_NumLevels: 1 + m_SubMeshes: + - serializedVersion: 2 + m_Levels: + - serializedVersion: 1 + m_IndexStart: 0 + m_IndexCount: 0 --- !u!1 &1742644163 GameObject: m_ObjectHideFlags: 0 @@ -2362,6 +2892,8 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 1742644164} + - component: {fileID: 1742644169} + - component: {fileID: 1742644168} - component: {fileID: 1742644165} - component: {fileID: 1742644170} - component: {fileID: 1742644167} @@ -2401,13 +2933,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} m_Name: m_EditorClassIdentifier: - solverIndices: - serializedContents: ca010000cb010000cc010000cd010000ce010000cf010000d0010000d1010000d2010000d3010000d4010000d5010000d6010000d7010000d8010000d9010000da010000db010000dc010000dd010000de010000df010000e0010000e1010000e2010000e3010000e4010000e5010000e6010000e7010000e8010000e9010000ea010000eb010000ec010000ed010000ee010000ef010000f0010000f1010000f2010000f3010000f4010000f5010000f6010000f7010000f8010000f9010000fa010000fb010000fc010000fd010000fe010000ff010000000200000102000002020000030200000402000005020000060200000702000008020000090200000a0200000b0200000c0200000d0200000e0200000f020000100200001102000012020000130200001402000015020000160200001702000018020000190200001a0200001b0200001c0200001d0200001e0200001f020000200200002102000022020000230200002402000025020000260200002702000028020000290200002a0200002b0200002c0200002d0200002e0200002f02000030020000310200003202000033020000340200003502000036020000370200003802000039020000 - m_AlignBytes: 16 - groupID: 5 + solverIndices: ca010000cb010000cc010000cd010000ce010000cf010000d0010000d1010000d2010000d3010000d4010000d5010000d6010000d7010000d8010000d9010000da010000db010000dc010000dd010000de010000df010000e0010000e1010000e2010000e3010000e4010000e5010000e6010000e7010000e8010000e9010000ea010000eb010000ec010000ed010000ee010000ef010000f0010000f1010000f2010000f3010000f4010000f5010000f6010000f7010000f8010000f9010000fa010000fb010000fc010000fd010000fe010000ff010000000200000102000002020000030200000402000005020000060200000702000008020000090200000a0200000b0200000c0200000d0200000e0200000f020000100200001102000012020000130200001402000015020000160200001702000018020000190200001a0200001b0200001c0200001d0200001e0200001f020000200200002102000022020000230200002402000025020000260200002702000028020000290200002a0200002b0200002c0200002d0200002e0200002f02000030020000310200003202000033020000340200003502000036020000370200003802000039020000 m_CollisionMaterial: {fileID: 0} m_SurfaceCollisions: 0 - m_MassScale: 1 m_SelfCollisions: 0 restLength_: 2 elements: @@ -2466,9 +2994,6 @@ MonoBehaviour: restLength: 0.18078607 constraintForce: 0 tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 m_RopeBlueprint: {fileID: 11400000, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} tearingEnabled: 0 tearResistanceMultiplier: 1000 @@ -2499,9 +3024,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: -2639811391673711616, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &1742644167 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2514,20 +3038,67 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} m_Name: m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 uvAnchor: 0 uvScale: {x: 1, y: 6} normalizeV: 1 section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} thicknessScale: 0.8 +--- !u!23 &1742644168 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1742644163} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1742644169 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1742644163} + m_Mesh: {fileID: 2025647389} --- !u!114 &1742644170 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2543,7 +3114,6 @@ MonoBehaviour: decimation: 0 smoothing: 0 twist: 0 - indexInSystem: 4 --- !u!114 &1742644171 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2561,9 +3131,186 @@ MonoBehaviour: m_ParticleGroup: {fileID: 8225853497016287227, guid: d82adbfa2e0744621823a657cc1d4d9a, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity +--- !u!43 &1777534752 +Mesh: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: extrudedMesh + serializedVersion: 12 + m_SubMeshes: + - serializedVersion: 2 + firstByte: 0 + indexCount: 0 + topology: 0 + baseVertex: 0 + firstVertex: 0 + vertexCount: 0 + localAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_Shapes: + vertices: [] + shapes: [] + channels: [] + fullWeights: [] + m_BindPose: [] + m_BoneNameHashes: + m_RootBoneNameHash: 0 + m_BonesAABB: [] + m_VariableBoneCountWeights: + m_Data: + m_MeshCompression: 0 + m_IsReadable: 1 + m_KeepVertices: 1 + m_KeepIndices: 1 + m_IndexFormat: 0 + m_IndexBuffer: + m_VertexData: + serializedVersion: 3 + m_VertexCount: 0 + m_Channels: + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + m_DataSize: 0 + _typelessdata: + m_CompressedMesh: + m_Vertices: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_UV: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Normals: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Tangents: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Weights: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_NormalSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_TangentSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_FloatColors: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_BoneIndices: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_Triangles: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_UVInfo: 0 + m_LocalAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_MeshUsageFlags: 0 + m_CookingOptions: 30 + m_BakedConvexCollisionMesh: + m_BakedTriangleCollisionMesh: + 'm_MeshMetrics[0]': 1 + 'm_MeshMetrics[1]': 1 + m_MeshOptimizationFlags: 1 + m_StreamData: + serializedVersion: 2 + offset: 0 + size: 0 + path: + m_MeshLodInfo: + serializedVersion: 2 + m_LodSelectionCurve: + serializedVersion: 1 + m_LodSlope: 0 + m_LodBias: 0 + m_NumLevels: 1 + m_SubMeshes: + - serializedVersion: 2 + m_Levels: + - serializedVersion: 1 + m_IndexStart: 0 + m_IndexCount: 0 --- !u!1 &1872762458 GameObject: m_ObjectHideFlags: 0 @@ -2698,6 +3445,362 @@ Animator: m_AllowConstantClipSamplingOptimization: 1 m_KeepAnimatorStateOnDisable: 0 m_WriteDefaultValuesOnDisable: 0 +--- !u!43 &1984461382 +Mesh: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: extrudedMesh + serializedVersion: 12 + m_SubMeshes: + - serializedVersion: 2 + firstByte: 0 + indexCount: 0 + topology: 0 + baseVertex: 0 + firstVertex: 0 + vertexCount: 0 + localAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_Shapes: + vertices: [] + shapes: [] + channels: [] + fullWeights: [] + m_BindPose: [] + m_BoneNameHashes: + m_RootBoneNameHash: 0 + m_BonesAABB: [] + m_VariableBoneCountWeights: + m_Data: + m_MeshCompression: 0 + m_IsReadable: 1 + m_KeepVertices: 1 + m_KeepIndices: 1 + m_IndexFormat: 0 + m_IndexBuffer: + m_VertexData: + serializedVersion: 3 + m_VertexCount: 0 + m_Channels: + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + m_DataSize: 0 + _typelessdata: + m_CompressedMesh: + m_Vertices: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_UV: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Normals: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Tangents: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Weights: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_NormalSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_TangentSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_FloatColors: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_BoneIndices: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_Triangles: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_UVInfo: 0 + m_LocalAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_MeshUsageFlags: 0 + m_CookingOptions: 30 + m_BakedConvexCollisionMesh: + m_BakedTriangleCollisionMesh: + 'm_MeshMetrics[0]': 1 + 'm_MeshMetrics[1]': 1 + m_MeshOptimizationFlags: 1 + m_StreamData: + serializedVersion: 2 + offset: 0 + size: 0 + path: + m_MeshLodInfo: + serializedVersion: 2 + m_LodSelectionCurve: + serializedVersion: 1 + m_LodSlope: 0 + m_LodBias: 0 + m_NumLevels: 1 + m_SubMeshes: + - serializedVersion: 2 + m_Levels: + - serializedVersion: 1 + m_IndexStart: 0 + m_IndexCount: 0 +--- !u!43 &2025647389 +Mesh: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: extrudedMesh + serializedVersion: 12 + m_SubMeshes: + - serializedVersion: 2 + firstByte: 0 + indexCount: 0 + topology: 0 + baseVertex: 0 + firstVertex: 0 + vertexCount: 0 + localAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_Shapes: + vertices: [] + shapes: [] + channels: [] + fullWeights: [] + m_BindPose: [] + m_BoneNameHashes: + m_RootBoneNameHash: 0 + m_BonesAABB: [] + m_VariableBoneCountWeights: + m_Data: + m_MeshCompression: 0 + m_IsReadable: 1 + m_KeepVertices: 1 + m_KeepIndices: 1 + m_IndexFormat: 0 + m_IndexBuffer: + m_VertexData: + serializedVersion: 3 + m_VertexCount: 0 + m_Channels: + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + m_DataSize: 0 + _typelessdata: + m_CompressedMesh: + m_Vertices: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_UV: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Normals: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Tangents: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Weights: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_NormalSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_TangentSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_FloatColors: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_BoneIndices: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_Triangles: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_UVInfo: 0 + m_LocalAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_MeshUsageFlags: 0 + m_CookingOptions: 30 + m_BakedConvexCollisionMesh: + m_BakedTriangleCollisionMesh: + 'm_MeshMetrics[0]': 1 + 'm_MeshMetrics[1]': 1 + m_MeshOptimizationFlags: 1 + m_StreamData: + serializedVersion: 2 + offset: 0 + size: 0 + path: + m_MeshLodInfo: + serializedVersion: 2 + m_LodSelectionCurve: + serializedVersion: 1 + m_LodSlope: 0 + m_LodBias: 0 + m_NumLevels: 1 + m_SubMeshes: + - serializedVersion: 2 + m_Levels: + - serializedVersion: 1 + m_IndexStart: 0 + m_IndexCount: 0 --- !u!1 &2102841794 GameObject: m_ObjectHideFlags: 0 @@ -2709,6 +3812,7 @@ GameObject: - component: {fileID: 2102841797} - component: {fileID: 2102841796} - component: {fileID: 2102841798} + - component: {fileID: 2102841795} m_Layer: 0 m_Name: Obi Solver m_TagString: Untagged @@ -2716,6 +3820,21 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 +--- !u!114 &2102841795 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2102841794} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1d9704d540ac448439a425526f6b2986, type: 3} + m_Name: + m_EditorClassIdentifier: + solvers: + - {fileID: 2102841796} + substeps: 3 --- !u!114 &2102841796 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2730,57 +3849,23 @@ MonoBehaviour: m_EditorClassIdentifier: simulateWhenInvisible: 1 m_Backend: 1 - substeps: 4 - maxStepsPerFrame: 1 - synchronization: 0 parameters: mode: 0 interpolation: 0 gravity: {x: 0, y: -9.81, z: 0} - ambientWind: {x: 0, y: 0, z: 0} - foamGravityScale: 1 damping: 0 maxAnisotropy: 3 sleepThreshold: 0.001 - maxVelocity: 50 - maxAngularVelocity: 10 collisionMargin: 0.02 maxDepenetration: 10 - colliderCCD: 1 - particleCCD: 0 + continuousCollisionDetection: 1 shockPropagation: 0 surfaceCollisionIterations: 8 surfaceCollisionTolerance: 0.005 - diffusionMask: {x: 1, y: 1, z: 1, w: 1} - m_MaxSurfaceChunks: 32768 - maxQueryResults: 8192 - maxFoamParticles: 8192 - maxParticleNeighbors: 128 - maxParticleContacts: 6 - useLimits: 0 - killOffLimitsParticles: 0 - boundaryLimits: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 5, y: 5, z: 5} gravity: {x: 0, y: -9.81, z: 0} gravitySpace: 1 - ambientWind: {x: 0, y: 0, z: 0} - windSpace: 1 - foamSubsteps: 1 - foamMinNeighbors: 3 - foamCollisions: 0 - maxFoamVelocityStretch: 0.3 - foamRadiusScale: 1 - foamFade: {x: 0.05, y: 0.8} - foamAccelAgingRange: {x: 0.5, y: 0.8} - foamAccelAging: 4 - foamVolumeDensity: 0.1 - foamAmbientDensity: 0.02 - foamScatterColor: {r: 0.8, g: 0.75, b: 0.7, a: 1} - foamAmbientColor: {r: 0.4, g: 0.5, b: 0.6, a: 1} worldLinearInertiaScale: 0 worldAngularInertiaScale: 0 - synchronousSpatialQueries: 0 distanceConstraintParameters: evaluationOrder: 0 iterations: 2 @@ -2836,11 +3921,6 @@ MonoBehaviour: iterations: 5 SORFactor: 1 enabled: 1 - pinholeConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 stitchConstraintParameters: evaluationOrder: 0 iterations: 5 diff --git a/Assets/Obi/Samples/RopeAndRod/RopesColliding.unity b/Assets/Obi/Samples/RopeAndRod/RopesColliding.unity deleted file mode 100644 index bdf94f79b..000000000 --- a/Assets/Obi/Samples/RopeAndRod/RopesColliding.unity +++ /dev/null @@ -1,2402 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!29 &1 -OcclusionCullingSettings: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_OcclusionBakeSettings: - smallestOccluder: 5 - smallestHole: 0.25 - backfaceThreshold: 100 - m_SceneGUID: 00000000000000000000000000000000 - m_OcclusionCullingData: {fileID: 0} ---- !u!104 &2 -RenderSettings: - m_ObjectHideFlags: 0 - serializedVersion: 10 - m_Fog: 0 - m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - m_FogMode: 3 - m_FogDensity: 0.01 - m_LinearFogStart: 0 - m_LinearFogEnd: 300 - m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} - m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} - m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} - m_AmbientIntensity: 1 - m_AmbientMode: 0 - m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} - m_HaloStrength: 0.5 - m_FlareStrength: 1 - m_FlareFadeSpeed: 3 - m_HaloTexture: {fileID: 0} - m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} - m_DefaultReflectionMode: 0 - m_DefaultReflectionResolution: 128 - m_ReflectionBounces: 1 - m_ReflectionIntensity: 1 - m_CustomReflection: {fileID: 0} - m_Sun: {fileID: 0} - m_UseRadianceAmbientProbe: 0 ---- !u!157 &4 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 13 - m_BakeOnSceneLoad: 0 - m_GISettings: - serializedVersion: 2 - m_BounceScale: 1 - m_IndirectOutputScale: 1 - m_AlbedoBoost: 1 - m_EnvironmentLightingMode: 0 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 1 - m_LightmapEditorSettings: - serializedVersion: 12 - m_Resolution: 2 - m_BakeResolution: 40 - m_AtlasSize: 1024 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 0 - m_CompAOExponentDirect: 0 - m_ExtractAmbientOcclusion: 0 - m_Padding: 2 - m_LightmapParameters: {fileID: 0} - m_LightmapsBakeMode: 1 - m_TextureCompression: 1 - m_ReflectionCompression: 2 - m_MixedBakeMode: 1 - m_BakeBackend: 0 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 500 - m_PVRBounces: 2 - m_PVREnvironmentSampleCount: 500 - m_PVREnvironmentReferencePointCount: 2048 - m_PVRFilteringMode: 2 - m_PVRDenoiserTypeDirect: 0 - m_PVRDenoiserTypeIndirect: 0 - m_PVRDenoiserTypeAO: 0 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVREnvironmentMIS: 0 - m_PVRCulling: 1 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 5 - m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_ExportTrainingData: 0 - m_TrainingDataDestination: TrainingData - m_LightProbeSampleCountMultiplier: 4 - m_LightingDataAsset: {fileID: 0} - m_LightingSettings: {fileID: 4890085278179872738, guid: cfd0a31533ca84d319eb2d45c71f457d, type: 2} ---- !u!196 &5 -NavMeshSettings: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_BuildSettings: - serializedVersion: 3 - agentTypeID: 0 - agentRadius: 0.5 - agentHeight: 2 - agentSlope: 45 - agentClimb: 0.4 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - minRegionArea: 2 - manualCellSize: 0 - cellSize: 0.16666667 - manualTileSize: 0 - tileSize: 256 - buildHeightMesh: 0 - maxJobWorkers: 0 - preserveTilesOutsideBounds: 0 - debug: - m_Flags: 0 - m_NavMeshData: {fileID: 0} ---- !u!1001 &421764872 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 400000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: m_RootOrder - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: m_LocalRotation.y - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 400000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 2300000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - propertyPath: 'm_Materials.Array.data[0]' - value: - objectReference: {fileID: 2100000, guid: a0a5f9e13fa7c47f78547e54896609da, type: 2} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: - - targetCorrespondingSourceObject: {fileID: 100000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - insertIndex: -1 - addedObject: {fileID: 506459882} - - targetCorrespondingSourceObject: {fileID: 100000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - insertIndex: -1 - addedObject: {fileID: 506459883} - m_SourcePrefab: {fileID: 100100000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} ---- !u!1 &506459881 stripped -GameObject: - m_CorrespondingSourceObject: {fileID: 100000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} - m_PrefabInstance: {fileID: 421764872} - m_PrefabAsset: {fileID: 0} ---- !u!64 &506459882 -MeshCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 506459881} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 5 - m_Convex: 0 - m_CookingOptions: 30 - m_Mesh: {fileID: 4300000, guid: 64df75de10b494f109b074d28a8eade0, type: 3} ---- !u!114 &506459883 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 506459881} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6757b231cedd544c583ef8aeaf773b2a, type: 3} - m_Name: - m_EditorClassIdentifier: - thickness: 0 - inverted: 0 - material: {fileID: 11400000, guid: 56297c6e785b44eb28e469b62cedc016, type: 2} - filter: -65535 - m_SourceCollider: {fileID: 506459882} - m_DistanceField: {fileID: 0} ---- !u!1 &526830944 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 526830948} - - component: {fileID: 526830947} - - component: {fileID: 526830946} - - component: {fileID: 526830945} - m_Layer: 5 - m_Name: Canvas - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &526830945 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 526830944} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} - m_Name: - m_EditorClassIdentifier: - m_IgnoreReversedGraphics: 1 - m_BlockingObjects: 0 - m_BlockingMask: - serializedVersion: 2 - m_Bits: 4294967295 ---- !u!114 &526830946 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 526830944} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} - m_Name: - m_EditorClassIdentifier: - m_UiScaleMode: 0 - m_ReferencePixelsPerUnit: 100 - m_ScaleFactor: 1 - m_ReferenceResolution: {x: 800, y: 600} - m_ScreenMatchMode: 0 - m_MatchWidthOrHeight: 0 - m_PhysicalUnit: 3 - m_FallbackScreenDPI: 96 - m_DefaultSpriteDPI: 96 - m_DynamicPixelsPerUnit: 1 - m_PresetInfoIsWorld: 0 ---- !u!223 &526830947 -Canvas: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 526830944} - m_Enabled: 1 - serializedVersion: 3 - m_RenderMode: 0 - m_Camera: {fileID: 0} - m_PlaneDistance: 100 - m_PixelPerfect: 0 - m_ReceivesEvents: 1 - m_OverrideSorting: 0 - m_OverridePixelPerfect: 0 - m_SortingBucketNormalizedSize: 0 - m_VertexColorAlwaysGammaSpace: 0 - m_AdditionalShaderChannelsFlag: 0 - m_UpdateRectTransformForStandalone: 0 - m_SortingLayerID: 0 - m_SortingOrder: 0 - m_TargetDisplay: 0 ---- !u!224 &526830948 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 526830944} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0, y: 0, z: 0} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 1145597568} - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0, y: 0} ---- !u!1 &895366425 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 895366426} - - component: {fileID: 895366433} - - component: {fileID: 895366432} - - component: {fileID: 895366431} - - component: {fileID: 895366434} - m_Layer: 10 - m_Name: Obi Rope (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &895366426 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 895366425} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: 0.6813427, z: -0, w: 0.7319646} - m_LocalPosition: {x: 0.17620039, y: 0.88, z: -2.2439194} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 2102841797} - m_LocalEulerAnglesHint: {x: 0, y: 85.897, z: 0} ---- !u!114 &895366431 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 895366425} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: f342c944c10cc4c9188a4f352c6a6eee, type: 2} - renderParameters: - layer: 10 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 8} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.8 ---- !u!114 &895366432 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 895366425} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 0 ---- !u!114 &895366433 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 895366425} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f0000002000000021000000220000002300000024000000250000002600000027000000 - m_AlignBytes: 16 - groupID: 1 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 1 - restLength_: 5.4620275 - elements: - - particle1: 0 - particle2: 1 - restLength: 0.11343384 - constraintForce: 0 - tearResistance: 1 - - particle1: 1 - particle2: 2 - restLength: 0.1400795 - constraintForce: 0 - tearResistance: 1 - - particle1: 2 - particle2: 3 - restLength: 0.13731146 - constraintForce: 0 - tearResistance: 1 - - particle1: 3 - particle2: 4 - restLength: 0.14056301 - constraintForce: 0 - tearResistance: 1 - - particle1: 4 - particle2: 5 - restLength: 0.14499426 - constraintForce: 0 - tearResistance: 1 - - particle1: 5 - particle2: 6 - restLength: 0.1369896 - constraintForce: 0 - tearResistance: 1 - - particle1: 6 - particle2: 7 - restLength: 0.14367747 - constraintForce: 0 - tearResistance: 1 - - particle1: 7 - particle2: 8 - restLength: 0.13849878 - constraintForce: 0 - tearResistance: 1 - - particle1: 8 - particle2: 9 - restLength: 0.14347577 - constraintForce: 0 - tearResistance: 1 - - particle1: 9 - particle2: 10 - restLength: 0.13862038 - constraintForce: 0 - tearResistance: 1 - - particle1: 10 - particle2: 11 - restLength: 0.14278126 - constraintForce: 0 - tearResistance: 1 - - particle1: 11 - particle2: 12 - restLength: 0.1394751 - constraintForce: 0 - tearResistance: 1 - - particle1: 12 - particle2: 13 - restLength: 0.14137006 - constraintForce: 0 - tearResistance: 1 - - particle1: 13 - particle2: 14 - restLength: 0.14105272 - constraintForce: 0 - tearResistance: 1 - - particle1: 14 - particle2: 15 - restLength: 0.14048934 - constraintForce: 0 - tearResistance: 1 - - particle1: 15 - particle2: 16 - restLength: 0.14181376 - constraintForce: 0 - tearResistance: 1 - - particle1: 16 - particle2: 17 - restLength: 0.14023328 - constraintForce: 0 - tearResistance: 1 - - particle1: 17 - particle2: 18 - restLength: 0.14107311 - constraintForce: 0 - tearResistance: 1 - - particle1: 18 - particle2: 19 - restLength: 0.14103353 - constraintForce: 0 - tearResistance: 1 - - particle1: 19 - particle2: 20 - restLength: 0.14082837 - constraintForce: 0 - tearResistance: 1 - - particle1: 20 - particle2: 21 - restLength: 0.14076781 - constraintForce: 0 - tearResistance: 1 - - particle1: 21 - particle2: 22 - restLength: 0.14133894 - constraintForce: 0 - tearResistance: 1 - - particle1: 22 - particle2: 23 - restLength: 0.14049971 - constraintForce: 0 - tearResistance: 1 - - particle1: 23 - particle2: 24 - restLength: 0.14129508 - constraintForce: 0 - tearResistance: 1 - - particle1: 24 - particle2: 25 - restLength: 0.14103425 - constraintForce: 0 - tearResistance: 1 - - particle1: 25 - particle2: 26 - restLength: 0.14002609 - constraintForce: 0 - tearResistance: 1 - - particle1: 26 - particle2: 27 - restLength: 0.14223284 - constraintForce: 0 - tearResistance: 1 - - particle1: 27 - particle2: 28 - restLength: 0.13930953 - constraintForce: 0 - tearResistance: 1 - - particle1: 28 - particle2: 29 - restLength: 0.14266565 - constraintForce: 0 - tearResistance: 1 - - particle1: 29 - particle2: 30 - restLength: 0.13980219 - constraintForce: 0 - tearResistance: 1 - - particle1: 30 - particle2: 31 - restLength: 0.14202453 - constraintForce: 0 - tearResistance: 1 - - particle1: 31 - particle2: 32 - restLength: 0.14010233 - constraintForce: 0 - tearResistance: 1 - - particle1: 32 - particle2: 33 - restLength: 0.14205298 - constraintForce: 0 - tearResistance: 1 - - particle1: 33 - particle2: 34 - restLength: 0.13910069 - constraintForce: 0 - tearResistance: 1 - - particle1: 34 - particle2: 35 - restLength: 0.14355478 - constraintForce: 0 - tearResistance: 1 - - particle1: 35 - particle2: 36 - restLength: 0.13863954 - constraintForce: 0 - tearResistance: 1 - - particle1: 36 - particle2: 37 - restLength: 0.14013106 - constraintForce: 0 - tearResistance: 1 - - particle1: 37 - particle2: 38 - restLength: 0.14137465 - constraintForce: 0 - tearResistance: 1 - - particle1: 38 - particle2: 39 - restLength: 0.13828081 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: b2fe09b5a1ae2424597b4776dc36fa5c, type: 2} - tearingEnabled: 1 - tearResistanceMultiplier: 450 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0.001 - _maxBending: 0.02 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!114 &895366434 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 895366425} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fbbc507232dcc4cb1ae27d9474ddbe70, type: 3} - m_Name: - m_EditorClassIdentifier: - neutralColor: {r: 1, g: 1, b: 1, a: 1} - highlightColor: {r: 1, g: 0, b: 0, a: 1} ---- !u!1 &1002464891 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1002464896} - - component: {fileID: 1002464895} - - component: {fileID: 1002464893} - - component: {fileID: 1002464892} - m_Layer: 0 - m_Name: Main Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!81 &1002464892 -AudioListener: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1002464891} - m_Enabled: 1 ---- !u!124 &1002464893 -Behaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1002464891} - m_Enabled: 1 ---- !u!20 &1002464895 -Camera: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1002464891} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844} - m_projectionMatrixMode: 1 - m_GateFitMode: 2 - m_FOVAxisMode: 0 - m_Iso: 200 - m_ShutterSpeed: 0.005 - m_Aperture: 16 - m_FocusDistance: 10 - m_FocalLength: 50 - m_BladeCount: 5 - m_Curvature: {x: 2, y: 11} - m_BarrelClipping: 0.25 - m_Anamorphism: 0 - m_SensorSize: {x: 36, y: 24} - m_LensShift: {x: 0, y: 0} - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - far clip plane: 1000 - field of view: 75 - orthographic: 0 - orthographic size: 5 - m_Depth: -1 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 3 - m_HDR: 0 - m_AllowMSAA: 1 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!4 &1002464896 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1002464891} - serializedVersion: 2 - m_LocalRotation: {x: 0.32325152, y: -0, z: -0, w: 0.9463131} - m_LocalPosition: {x: 0, y: 3.95, z: -4.42} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 37.719, y: 0, z: 0} ---- !u!1 &1143169366 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1143169367} - - component: {fileID: 1143169370} - - component: {fileID: 1143169369} - - component: {fileID: 1143169368} - - component: {fileID: 1143169371} - m_Layer: 10 - m_Name: Obi Rope (2) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1143169367 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1143169366} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 2.19, y: 0.27, z: 0.93} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 2102841797} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1143169368 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1143169366} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: f342c944c10cc4c9188a4f352c6a6eee, type: 2} - renderParameters: - layer: 10 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 8} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.8 ---- !u!114 &1143169369 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1143169366} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 1 ---- !u!114 &1143169370 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1143169366} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 28000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000 - m_AlignBytes: 16 - groupID: 2 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 1 - restLength_: 5.4620275 - elements: - - particle1: 40 - particle2: 41 - restLength: 0.11343384 - constraintForce: 0 - tearResistance: 1 - - particle1: 41 - particle2: 42 - restLength: 0.1400795 - constraintForce: 0 - tearResistance: 1 - - particle1: 42 - particle2: 43 - restLength: 0.13731146 - constraintForce: 0 - tearResistance: 1 - - particle1: 43 - particle2: 44 - restLength: 0.14056301 - constraintForce: 0 - tearResistance: 1 - - particle1: 44 - particle2: 45 - restLength: 0.14499426 - constraintForce: 0 - tearResistance: 1 - - particle1: 45 - particle2: 46 - restLength: 0.1369896 - constraintForce: 0 - tearResistance: 1 - - particle1: 46 - particle2: 47 - restLength: 0.14367747 - constraintForce: 0 - tearResistance: 1 - - particle1: 47 - particle2: 48 - restLength: 0.13849878 - constraintForce: 0 - tearResistance: 1 - - particle1: 48 - particle2: 49 - restLength: 0.14347577 - constraintForce: 0 - tearResistance: 1 - - particle1: 49 - particle2: 50 - restLength: 0.13862038 - constraintForce: 0 - tearResistance: 1 - - particle1: 50 - particle2: 51 - restLength: 0.14278126 - constraintForce: 0 - tearResistance: 1 - - particle1: 51 - particle2: 52 - restLength: 0.1394751 - constraintForce: 0 - tearResistance: 1 - - particle1: 52 - particle2: 53 - restLength: 0.14137006 - constraintForce: 0 - tearResistance: 1 - - particle1: 53 - particle2: 54 - restLength: 0.14105272 - constraintForce: 0 - tearResistance: 1 - - particle1: 54 - particle2: 55 - restLength: 0.14048934 - constraintForce: 0 - tearResistance: 1 - - particle1: 55 - particle2: 56 - restLength: 0.14181376 - constraintForce: 0 - tearResistance: 1 - - particle1: 56 - particle2: 57 - restLength: 0.14023328 - constraintForce: 0 - tearResistance: 1 - - particle1: 57 - particle2: 58 - restLength: 0.14107311 - constraintForce: 0 - tearResistance: 1 - - particle1: 58 - particle2: 59 - restLength: 0.14103353 - constraintForce: 0 - tearResistance: 1 - - particle1: 59 - particle2: 60 - restLength: 0.14082837 - constraintForce: 0 - tearResistance: 1 - - particle1: 60 - particle2: 61 - restLength: 0.14076781 - constraintForce: 0 - tearResistance: 1 - - particle1: 61 - particle2: 62 - restLength: 0.14133894 - constraintForce: 0 - tearResistance: 1 - - particle1: 62 - particle2: 63 - restLength: 0.14049971 - constraintForce: 0 - tearResistance: 1 - - particle1: 63 - particle2: 64 - restLength: 0.14129508 - constraintForce: 0 - tearResistance: 1 - - particle1: 64 - particle2: 65 - restLength: 0.14103425 - constraintForce: 0 - tearResistance: 1 - - particle1: 65 - particle2: 66 - restLength: 0.14002609 - constraintForce: 0 - tearResistance: 1 - - particle1: 66 - particle2: 67 - restLength: 0.14223284 - constraintForce: 0 - tearResistance: 1 - - particle1: 67 - particle2: 68 - restLength: 0.13930953 - constraintForce: 0 - tearResistance: 1 - - particle1: 68 - particle2: 69 - restLength: 0.14266565 - constraintForce: 0 - tearResistance: 1 - - particle1: 69 - particle2: 70 - restLength: 0.13980219 - constraintForce: 0 - tearResistance: 1 - - particle1: 70 - particle2: 71 - restLength: 0.14202453 - constraintForce: 0 - tearResistance: 1 - - particle1: 71 - particle2: 72 - restLength: 0.14010233 - constraintForce: 0 - tearResistance: 1 - - particle1: 72 - particle2: 73 - restLength: 0.14205298 - constraintForce: 0 - tearResistance: 1 - - particle1: 73 - particle2: 74 - restLength: 0.13910069 - constraintForce: 0 - tearResistance: 1 - - particle1: 74 - particle2: 75 - restLength: 0.14355478 - constraintForce: 0 - tearResistance: 1 - - particle1: 75 - particle2: 76 - restLength: 0.13863954 - constraintForce: 0 - tearResistance: 1 - - particle1: 76 - particle2: 77 - restLength: 0.14013106 - constraintForce: 0 - tearResistance: 1 - - particle1: 77 - particle2: 78 - restLength: 0.14137465 - constraintForce: 0 - tearResistance: 1 - - particle1: 78 - particle2: 79 - restLength: 0.13828081 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: b2fe09b5a1ae2424597b4776dc36fa5c, type: 2} - tearingEnabled: 1 - tearResistanceMultiplier: 450 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0.001 - _maxBending: 0.02 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!114 &1143169371 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1143169366} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fbbc507232dcc4cb1ae27d9474ddbe70, type: 3} - m_Name: - m_EditorClassIdentifier: - neutralColor: {r: 1, g: 1, b: 1, a: 1} - highlightColor: {r: 1, g: 0, b: 0, a: 1} ---- !u!1 &1145597567 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1145597568} - - component: {fileID: 1145597570} - - component: {fileID: 1145597569} - m_Layer: 5 - m_Name: Text - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1145597568 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1145597567} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 526830948} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 103, y: 26} - m_SizeDelta: {x: 160, y: 23.1} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1145597569 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1145597567} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 18 - m_FontStyle: 1 - m_BestFit: 0 - m_MinSize: 1 - m_MaxSize: 20 - m_Alignment: 3 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 1 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: Click and drag the ropes to manipulate them. ---- !u!222 &1145597570 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1145597567} - m_CullTransparentMesh: 0 ---- !u!1 &1175446144 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1175446146} - - component: {fileID: 1175446145} - m_Layer: 0 - m_Name: Directional Light - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!108 &1175446145 -Light: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1175446144} - m_Enabled: 1 - serializedVersion: 11 - m_Type: 1 - m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} - m_Intensity: 1 - m_Range: 10 - m_SpotAngle: 30 - m_InnerSpotAngle: 21.802082 - m_CookieSize: 10 - m_Shadows: - m_Type: 2 - m_Resolution: -1 - m_CustomResolution: -1 - m_Strength: 1 - m_Bias: 0.03 - m_NormalBias: 0.01 - m_NearPlane: 0.2 - m_CullingMatrixOverride: - e00: 1 - e01: 0 - e02: 0 - e03: 0 - e10: 0 - e11: 1 - e12: 0 - e13: 0 - e20: 0 - e21: 0 - e22: 1 - e23: 0 - e30: 0 - e31: 0 - e32: 0 - e33: 1 - m_UseCullingMatrixOverride: 0 - m_Cookie: {fileID: 0} - m_DrawHalo: 0 - m_Flare: {fileID: 0} - m_RenderMode: 0 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingLayerMask: 1 - m_Lightmapping: 4 - m_LightShadowCasterMode: 0 - m_AreaSize: {x: 1, y: 1} - m_BounceIntensity: 1 - m_ColorTemperature: 6570 - m_UseColorTemperature: 0 - m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} - m_UseBoundingSphereOverride: 0 - m_UseViewFrustumForShadowCasterCull: 1 - m_ForceVisible: 0 - m_ShadowRadius: 0 - m_ShadowAngle: 0 - m_LightUnit: 1 - m_LuxAtDistance: 1 - m_EnableSpotReflector: 1 ---- !u!4 &1175446146 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1175446144} - serializedVersion: 2 - m_LocalRotation: {x: 0.41595167, y: -0.26247028, z: 0.26683384, w: 0.82879025} - m_LocalPosition: {x: 0, y: 3, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 56.052002, y: -22.431002, z: 23.642} ---- !u!1 &1188186442 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1188186444} - - component: {fileID: 1188186443} - m_Layer: 0 - m_Name: BurstCollisionWorld - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1188186443 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1188186442} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f1a161c4294214a4fbcb7e9e94800494, type: 3} - m_Name: - m_EditorClassIdentifier: - cellSpans: - m_AlignBytes: 16 ---- !u!4 &1188186444 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1188186442} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1346965641 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1346965650} - - component: {fileID: 1346965642} - - component: {fileID: 1346965646} - - component: {fileID: 1346965643} - - component: {fileID: 1346965651} - m_Layer: 10 - m_Name: Obi Rope - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1346965642 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1346965641} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f0000007000000071000000720000007300000074000000750000007600000077000000 - m_AlignBytes: 16 - groupID: 3 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 1 - restLength_: 5.4620275 - elements: - - particle1: 80 - particle2: 81 - restLength: 0.11343384 - constraintForce: 0 - tearResistance: 1 - - particle1: 81 - particle2: 82 - restLength: 0.1400795 - constraintForce: 0 - tearResistance: 1 - - particle1: 82 - particle2: 83 - restLength: 0.13731146 - constraintForce: 0 - tearResistance: 1 - - particle1: 83 - particle2: 84 - restLength: 0.14056301 - constraintForce: 0 - tearResistance: 1 - - particle1: 84 - particle2: 85 - restLength: 0.14499426 - constraintForce: 0 - tearResistance: 1 - - particle1: 85 - particle2: 86 - restLength: 0.1369896 - constraintForce: 0 - tearResistance: 1 - - particle1: 86 - particle2: 87 - restLength: 0.14367747 - constraintForce: 0 - tearResistance: 1 - - particle1: 87 - particle2: 88 - restLength: 0.13849878 - constraintForce: 0 - tearResistance: 1 - - particle1: 88 - particle2: 89 - restLength: 0.14347577 - constraintForce: 0 - tearResistance: 1 - - particle1: 89 - particle2: 90 - restLength: 0.13862038 - constraintForce: 0 - tearResistance: 1 - - particle1: 90 - particle2: 91 - restLength: 0.14278126 - constraintForce: 0 - tearResistance: 1 - - particle1: 91 - particle2: 92 - restLength: 0.1394751 - constraintForce: 0 - tearResistance: 1 - - particle1: 92 - particle2: 93 - restLength: 0.14137006 - constraintForce: 0 - tearResistance: 1 - - particle1: 93 - particle2: 94 - restLength: 0.14105272 - constraintForce: 0 - tearResistance: 1 - - particle1: 94 - particle2: 95 - restLength: 0.14048934 - constraintForce: 0 - tearResistance: 1 - - particle1: 95 - particle2: 96 - restLength: 0.14181376 - constraintForce: 0 - tearResistance: 1 - - particle1: 96 - particle2: 97 - restLength: 0.14023328 - constraintForce: 0 - tearResistance: 1 - - particle1: 97 - particle2: 98 - restLength: 0.14107311 - constraintForce: 0 - tearResistance: 1 - - particle1: 98 - particle2: 99 - restLength: 0.14103353 - constraintForce: 0 - tearResistance: 1 - - particle1: 99 - particle2: 100 - restLength: 0.14082837 - constraintForce: 0 - tearResistance: 1 - - particle1: 100 - particle2: 101 - restLength: 0.14076781 - constraintForce: 0 - tearResistance: 1 - - particle1: 101 - particle2: 102 - restLength: 0.14133894 - constraintForce: 0 - tearResistance: 1 - - particle1: 102 - particle2: 103 - restLength: 0.14049971 - constraintForce: 0 - tearResistance: 1 - - particle1: 103 - particle2: 104 - restLength: 0.14129508 - constraintForce: 0 - tearResistance: 1 - - particle1: 104 - particle2: 105 - restLength: 0.14103425 - constraintForce: 0 - tearResistance: 1 - - particle1: 105 - particle2: 106 - restLength: 0.14002609 - constraintForce: 0 - tearResistance: 1 - - particle1: 106 - particle2: 107 - restLength: 0.14223284 - constraintForce: 0 - tearResistance: 1 - - particle1: 107 - particle2: 108 - restLength: 0.13930953 - constraintForce: 0 - tearResistance: 1 - - particle1: 108 - particle2: 109 - restLength: 0.14266565 - constraintForce: 0 - tearResistance: 1 - - particle1: 109 - particle2: 110 - restLength: 0.13980219 - constraintForce: 0 - tearResistance: 1 - - particle1: 110 - particle2: 111 - restLength: 0.14202453 - constraintForce: 0 - tearResistance: 1 - - particle1: 111 - particle2: 112 - restLength: 0.14010233 - constraintForce: 0 - tearResistance: 1 - - particle1: 112 - particle2: 113 - restLength: 0.14205298 - constraintForce: 0 - tearResistance: 1 - - particle1: 113 - particle2: 114 - restLength: 0.13910069 - constraintForce: 0 - tearResistance: 1 - - particle1: 114 - particle2: 115 - restLength: 0.14355478 - constraintForce: 0 - tearResistance: 1 - - particle1: 115 - particle2: 116 - restLength: 0.13863954 - constraintForce: 0 - tearResistance: 1 - - particle1: 116 - particle2: 117 - restLength: 0.14013106 - constraintForce: 0 - tearResistance: 1 - - particle1: 117 - particle2: 118 - restLength: 0.14137465 - constraintForce: 0 - tearResistance: 1 - - particle1: 118 - particle2: 119 - restLength: 0.13828081 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: b2fe09b5a1ae2424597b4776dc36fa5c, type: 2} - tearingEnabled: 1 - tearResistanceMultiplier: 450 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0.001 - _maxBending: 0.02 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!114 &1346965643 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1346965641} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: f342c944c10cc4c9188a4f352c6a6eee, type: 2} - renderParameters: - layer: 10 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 8} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.8 ---- !u!114 &1346965646 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1346965641} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 2 ---- !u!4 &1346965650 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1346965641} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: 0.6813427, z: -0, w: 0.7319646} - m_LocalPosition: {x: 1.21, y: 0.88, z: -2.26} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 2102841797} - m_LocalEulerAnglesHint: {x: 0, y: 85.897, z: 0} ---- !u!114 &1346965651 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1346965641} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fbbc507232dcc4cb1ae27d9474ddbe70, type: 3} - m_Name: - m_EditorClassIdentifier: - neutralColor: {r: 1, g: 1, b: 1, a: 1} - highlightColor: {r: 1, g: 0, b: 0, a: 1} ---- !u!1 &1695657319 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1695657320} - - component: {fileID: 1695657323} - - component: {fileID: 1695657322} - - component: {fileID: 1695657321} - - component: {fileID: 1695657324} - m_Layer: 10 - m_Name: Obi Rope (3) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1695657320 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1695657319} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 2.144, y: 0.27, z: -1.646} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 2102841797} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1695657321 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1695657319} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: f342c944c10cc4c9188a4f352c6a6eee, type: 2} - renderParameters: - layer: 10 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 8} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.8 ---- !u!114 &1695657322 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1695657319} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 3 ---- !u!114 &1695657323 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1695657319} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 78000000790000007a0000007b0000007c0000007d0000007e0000007f000000800000008100000082000000830000008400000085000000860000008700000088000000890000008a0000008b0000008c0000008d0000008e0000008f000000900000009100000092000000930000009400000095000000960000009700000098000000990000009a0000009b0000009c0000009d0000009e0000009f000000 - m_AlignBytes: 16 - groupID: 4 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 1 - restLength_: 5.4620275 - elements: - - particle1: 120 - particle2: 121 - restLength: 0.11343384 - constraintForce: 0 - tearResistance: 1 - - particle1: 121 - particle2: 122 - restLength: 0.1400795 - constraintForce: 0 - tearResistance: 1 - - particle1: 122 - particle2: 123 - restLength: 0.13731146 - constraintForce: 0 - tearResistance: 1 - - particle1: 123 - particle2: 124 - restLength: 0.14056301 - constraintForce: 0 - tearResistance: 1 - - particle1: 124 - particle2: 125 - restLength: 0.14499426 - constraintForce: 0 - tearResistance: 1 - - particle1: 125 - particle2: 126 - restLength: 0.1369896 - constraintForce: 0 - tearResistance: 1 - - particle1: 126 - particle2: 127 - restLength: 0.14367747 - constraintForce: 0 - tearResistance: 1 - - particle1: 127 - particle2: 128 - restLength: 0.13849878 - constraintForce: 0 - tearResistance: 1 - - particle1: 128 - particle2: 129 - restLength: 0.14347577 - constraintForce: 0 - tearResistance: 1 - - particle1: 129 - particle2: 130 - restLength: 0.13862038 - constraintForce: 0 - tearResistance: 1 - - particle1: 130 - particle2: 131 - restLength: 0.14278126 - constraintForce: 0 - tearResistance: 1 - - particle1: 131 - particle2: 132 - restLength: 0.1394751 - constraintForce: 0 - tearResistance: 1 - - particle1: 132 - particle2: 133 - restLength: 0.14137006 - constraintForce: 0 - tearResistance: 1 - - particle1: 133 - particle2: 134 - restLength: 0.14105272 - constraintForce: 0 - tearResistance: 1 - - particle1: 134 - particle2: 135 - restLength: 0.14048934 - constraintForce: 0 - tearResistance: 1 - - particle1: 135 - particle2: 136 - restLength: 0.14181376 - constraintForce: 0 - tearResistance: 1 - - particle1: 136 - particle2: 137 - restLength: 0.14023328 - constraintForce: 0 - tearResistance: 1 - - particle1: 137 - particle2: 138 - restLength: 0.14107311 - constraintForce: 0 - tearResistance: 1 - - particle1: 138 - particle2: 139 - restLength: 0.14103353 - constraintForce: 0 - tearResistance: 1 - - particle1: 139 - particle2: 140 - restLength: 0.14082837 - constraintForce: 0 - tearResistance: 1 - - particle1: 140 - particle2: 141 - restLength: 0.14076781 - constraintForce: 0 - tearResistance: 1 - - particle1: 141 - particle2: 142 - restLength: 0.14133894 - constraintForce: 0 - tearResistance: 1 - - particle1: 142 - particle2: 143 - restLength: 0.14049971 - constraintForce: 0 - tearResistance: 1 - - particle1: 143 - particle2: 144 - restLength: 0.14129508 - constraintForce: 0 - tearResistance: 1 - - particle1: 144 - particle2: 145 - restLength: 0.14103425 - constraintForce: 0 - tearResistance: 1 - - particle1: 145 - particle2: 146 - restLength: 0.14002609 - constraintForce: 0 - tearResistance: 1 - - particle1: 146 - particle2: 147 - restLength: 0.14223284 - constraintForce: 0 - tearResistance: 1 - - particle1: 147 - particle2: 148 - restLength: 0.13930953 - constraintForce: 0 - tearResistance: 1 - - particle1: 148 - particle2: 149 - restLength: 0.14266565 - constraintForce: 0 - tearResistance: 1 - - particle1: 149 - particle2: 150 - restLength: 0.13980219 - constraintForce: 0 - tearResistance: 1 - - particle1: 150 - particle2: 151 - restLength: 0.14202453 - constraintForce: 0 - tearResistance: 1 - - particle1: 151 - particle2: 152 - restLength: 0.14010233 - constraintForce: 0 - tearResistance: 1 - - particle1: 152 - particle2: 153 - restLength: 0.14205298 - constraintForce: 0 - tearResistance: 1 - - particle1: 153 - particle2: 154 - restLength: 0.13910069 - constraintForce: 0 - tearResistance: 1 - - particle1: 154 - particle2: 155 - restLength: 0.14355478 - constraintForce: 0 - tearResistance: 1 - - particle1: 155 - particle2: 156 - restLength: 0.13863954 - constraintForce: 0 - tearResistance: 1 - - particle1: 156 - particle2: 157 - restLength: 0.14013106 - constraintForce: 0 - tearResistance: 1 - - particle1: 157 - particle2: 158 - restLength: 0.14137465 - constraintForce: 0 - tearResistance: 1 - - particle1: 158 - particle2: 159 - restLength: 0.13828081 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: b2fe09b5a1ae2424597b4776dc36fa5c, type: 2} - tearingEnabled: 1 - tearResistanceMultiplier: 450 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0.001 - _maxBending: 0.02 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!114 &1695657324 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1695657319} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fbbc507232dcc4cb1ae27d9474ddbe70, type: 3} - m_Name: - m_EditorClassIdentifier: - neutralColor: {r: 1, g: 1, b: 1, a: 1} - highlightColor: {r: 1, g: 0, b: 0, a: 1} ---- !u!1 &2021410671 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2021410674} - - component: {fileID: 2021410673} - - component: {fileID: 2021410672} - m_Layer: 0 - m_Name: EventSystem - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &2021410672 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2021410671} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3} - m_Name: - m_EditorClassIdentifier: - m_SendPointerHoverToParent: 1 - m_HorizontalAxis: Horizontal - m_VerticalAxis: Vertical - m_SubmitButton: Submit - m_CancelButton: Cancel - m_InputActionsPerSecond: 10 - m_RepeatDelay: 0.5 - m_ForceModuleActive: 0 ---- !u!114 &2021410673 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2021410671} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} - m_Name: - m_EditorClassIdentifier: - m_FirstSelected: {fileID: 0} - m_sendNavigationEvents: 1 - m_DragThreshold: 5 ---- !u!4 &2021410674 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2021410671} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &2102841794 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2102841797} - - component: {fileID: 2102841796} - - component: {fileID: 2102841800} - - component: {fileID: 2102841799} - - component: {fileID: 2102841798} - - component: {fileID: 2102841801} - - component: {fileID: 2102841802} - m_Layer: 0 - m_Name: Obi Solver - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &2102841796 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2102841794} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9d174fab52f0c4b8399f25d5c3ea524c, type: 3} - m_Name: - m_EditorClassIdentifier: - simulateWhenInvisible: 1 - m_Backend: 1 - substeps: 4 - maxStepsPerFrame: 1 - synchronization: 0 - parameters: - mode: 0 - interpolation: 0 - gravity: {x: 0, y: -9.81, z: 0} - ambientWind: {x: 0, y: 0, z: 0} - foamGravityScale: 1 - damping: 0.3 - maxAnisotropy: 3 - sleepThreshold: 0.0001 - maxVelocity: 50 - maxAngularVelocity: 20 - collisionMargin: 0.02 - maxDepenetration: 5 - colliderCCD: 1 - particleCCD: 1 - shockPropagation: 0 - surfaceCollisionIterations: 8 - surfaceCollisionTolerance: 0.005 - diffusionMask: {x: 1, y: 1, z: 1, w: 1} - m_MaxSurfaceChunks: 32768 - maxQueryResults: 8192 - maxFoamParticles: 8192 - maxParticleNeighbors: 128 - maxParticleContacts: 6 - useLimits: 0 - killOffLimitsParticles: 0 - boundaryLimits: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 5, y: 5, z: 5} - gravity: {x: 0, y: -9.81, z: 0} - gravitySpace: 1 - ambientWind: {x: 0, y: 0, z: 0} - windSpace: 1 - foamSubsteps: 1 - foamMinNeighbors: 3 - foamCollisions: 0 - maxFoamVelocityStretch: 0.3 - foamRadiusScale: 1 - foamFade: {x: 0.05, y: 0.8} - foamAccelAgingRange: {x: 0.5, y: 0.8} - foamAccelAging: 4 - foamVolumeDensity: 0.1 - foamAmbientDensity: 0.02 - foamScatterColor: {r: 0.8, g: 0.75, b: 0.7, a: 1} - foamAmbientColor: {r: 0.4, g: 0.5, b: 0.6, a: 1} - worldLinearInertiaScale: 0 - worldAngularInertiaScale: 0 - synchronousSpatialQueries: 0 - distanceConstraintParameters: - evaluationOrder: 0 - iterations: 2 - SORFactor: 1 - enabled: 1 - bendingConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 - particleCollisionConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 - particleFrictionConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 - collisionConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 - frictionConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 - skinConstraintParameters: - evaluationOrder: 0 - iterations: 3 - SORFactor: 1 - enabled: 0 - volumeConstraintParameters: - evaluationOrder: 1 - iterations: 3 - SORFactor: 1 - enabled: 0 - shapeMatchingConstraintParameters: - evaluationOrder: 1 - iterations: 3 - SORFactor: 1 - enabled: 0 - tetherConstraintParameters: - evaluationOrder: 1 - iterations: 3 - SORFactor: 1 - enabled: 0 - pinConstraintParameters: - evaluationOrder: 1 - iterations: 10 - SORFactor: 1 - enabled: 0 - pinholeConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 - stitchConstraintParameters: - evaluationOrder: 1 - iterations: 5 - SORFactor: 1 - enabled: 0 - densityConstraintParameters: - evaluationOrder: 1 - iterations: 2 - SORFactor: 1 - enabled: 0 - stretchShearConstraintParameters: - evaluationOrder: 0 - iterations: 3 - SORFactor: 1 - enabled: 0 - bendTwistConstraintParameters: - evaluationOrder: 0 - iterations: 3 - SORFactor: 1 - enabled: 0 - chainConstraintParameters: - evaluationOrder: 0 - iterations: 3 - SORFactor: 1 - enabled: 0 ---- !u!4 &2102841797 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2102841794} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 1346965650} - - {fileID: 895366426} - - {fileID: 1143169367} - - {fileID: 1695657320} - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &2102841798 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2102841794} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 30e140e2334fb4e2f9430c6ed936e4ca, type: 3} - m_Name: - m_EditorClassIdentifier: - springStiffness: 1000 - springDamping: 50 - drawSpring: 1 ---- !u!114 &2102841799 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2102841794} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: db4318b9b044a420ba02ad5138d542e0, type: 3} - m_Name: - m_EditorClassIdentifier: - solver: {fileID: 2102841796} - radiusScale: 2 - OnParticlePicked: - m_PersistentCalls: - m_Calls: [] - OnParticleHeld: - m_PersistentCalls: - m_Calls: [] - OnParticleDragged: - m_PersistentCalls: - m_Calls: [] - OnParticleReleased: - m_PersistentCalls: - m_Calls: [] ---- !u!120 &2102841800 -LineRenderer: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2102841794} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 0 - m_LightProbeUsage: 0 - m_ReflectionProbeUsage: 0 - m_RayTracingMode: 0 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10306, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_Positions: - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 1} - m_Parameters: - serializedVersion: 3 - widthMultiplier: 0.05 - widthCurve: - serializedVersion: 2 - m_Curve: - - serializedVersion: 3 - time: 0 - value: 1 - inSlope: 0 - outSlope: 0 - tangentMode: 0 - weightedMode: 0 - inWeight: 0.33333334 - outWeight: 0.33333334 - m_PreInfinity: 2 - m_PostInfinity: 2 - m_RotationOrder: 4 - colorGradient: - serializedVersion: 2 - key0: {r: 1, g: 0, b: 0, a: 1} - key1: {r: 1, g: 0.09286968, b: 0, a: 1} - key2: {r: 0, g: 0, b: 0, a: 0} - key3: {r: 0, g: 0, b: 0, a: 0} - key4: {r: 0, g: 0, b: 0, a: 0} - key5: {r: 0, g: 0, b: 0, a: 0} - key6: {r: 0, g: 0, b: 0, a: 0} - key7: {r: 0, g: 0, b: 0, a: 0} - ctime0: 0 - ctime1: 65535 - ctime2: 0 - ctime3: 0 - ctime4: 0 - ctime5: 0 - ctime6: 0 - ctime7: 0 - atime0: 0 - atime1: 65535 - atime2: 0 - atime3: 0 - atime4: 0 - atime5: 0 - atime6: 0 - atime7: 0 - m_Mode: 0 - m_ColorSpace: -1 - m_NumColorKeys: 2 - m_NumAlphaKeys: 2 - numCornerVertices: 0 - numCapVertices: 0 - alignment: 0 - textureMode: 0 - textureScale: {x: 1, y: 1} - shadowBias: 0.5 - generateLightingData: 0 - m_MaskInteraction: 0 - m_UseWorldSpace: 1 - m_Loop: 0 - m_ApplyActiveColorSpace: 0 ---- !u!114 &2102841801 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2102841794} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: a5a3cc3afb7a14486848b022c300ea32, type: 3} - m_Name: - m_EditorClassIdentifier: - callback: - m_PersistentCalls: - m_Calls: - - m_Target: {fileID: 2102841802} - m_TargetAssemblyTypeName: Obi.Samples.HighlightCollidingRopes, Assembly-CSharp - m_MethodName: Highlight - m_Mode: 0 - m_Arguments: - m_ObjectArgument: {fileID: 0} - m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine - m_IntArgument: 0 - m_FloatArgument: 0 - m_StringArgument: - m_BoolArgument: 0 - m_CallState: 2 ---- !u!114 &2102841802 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2102841794} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 50979842bbc734acdb11f0f01062fe92, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!1660057539 &9223372036854775807 -SceneRoots: - m_ObjectHideFlags: 0 - m_Roots: - - {fileID: 1002464896} - - {fileID: 421764872} - - {fileID: 1175446146} - - {fileID: 2102841797} - - {fileID: 2021410674} - - {fileID: 526830948} - - {fileID: 1188186444} diff --git a/Assets/Obi/Samples/RopeAndRod/RopesColliding.unity.meta b/Assets/Obi/Samples/RopeAndRod/RopesColliding.unity.meta deleted file mode 100644 index b1191a520..000000000 --- a/Assets/Obi/Samples/RopeAndRod/RopesColliding.unity.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: bdc1c69fe6cef4fc393005981e6d3623 -labels: -- ObiRope -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/CableCarRope.asset b/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/CableCarRope.asset deleted file mode 100644 index eba4519bd..000000000 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/CableCarRope.asset +++ /dev/null @@ -1,2790 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &-7671420094400086755 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 775ad4994fda946d1a5936c7e2dfc785, type: 3} - m_Name: cp32 - m_EditorClassIdentifier: - particleIndices: 28000000 - m_Blueprint: {fileID: 11400000} ---- !u!114 &-6013852427284171944 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 775ad4994fda946d1a5936c7e2dfc785, type: 3} - m_Name: cp4 - m_EditorClassIdentifier: - particleIndices: 19000000 - m_Blueprint: {fileID: 11400000} ---- !u!114 &-793357204084665196 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 775ad4994fda946d1a5936c7e2dfc785, type: 3} - m_Name: cp2 - m_EditorClassIdentifier: - particleIndices: 4b000000 - m_Blueprint: {fileID: 11400000} ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8f7e67b5626124d0db9886e6cd2aacff, type: 3} - m_Name: CableCarRope - m_EditorClassIdentifier: - m_Checksum: 2078965017 - m_Empty: 0 - m_Edited: 0 - m_ActiveParticleCount: 97 - m_InitialActiveParticleCount: 97 - _bounds: - m_Center: {x: 0.27428722, y: 0, z: -0.8180511} - m_Extent: {x: 3.3653975, y: 0, z: 2.6264405} - positions: - - {x: -1.6547692, y: 0, z: 1.6917566} - - {x: -1.7953173, y: 0, z: 1.5704652} - - {x: -1.9314678, y: 0, z: 1.443791} - - {x: -2.0625005, y: 0, z: 1.3122748} - - {x: -2.1888175, y: 0, z: 1.1757231} - - {x: -2.3101618, y: 0, z: 1.0350726} - - {x: -2.4272132, y: 0, z: 0.8907374} - - {x: -2.5406966, y: 0, z: 0.74351734} - - {x: -2.6515298, y: 0, z: 0.59435135} - - {x: -2.7609143, y: 0, z: 0.44400948} - - {x: -2.8698747, y: 0, z: 0.2935176} - - {x: -2.9795702, y: 0, z: 0.14354794} - - {x: -3.0911102, y: 0, z: -0.0054477826} - - {x: -2.9199383, y: 0, z: -0.10833817} - - {x: -2.7479436, y: 0, z: -0.20928983} - - {x: -2.5753129, y: 0, z: -0.30825955} - - {x: -2.4014676, y: 0, z: -0.40568763} - - {x: -2.226681, y: 0, z: -0.5015902} - - {x: -2.0514107, y: 0, z: -0.5959872} - - {x: -1.87536, y: 0, z: -0.6894276} - - {x: -1.6989415, y: 0, z: -0.78223515} - - {x: -1.5227215, y: 0, z: -0.87485546} - - {x: -1.3468884, y: 0, z: -0.96817625} - - {x: -1.1717303, y: 0, z: -1.0633278} - - {x: -0.9982708, y: 0, z: -1.161367} - - {x: -0.8273939, y: 0, z: -1.2637306} - - {x: -0.64856976, y: 0, z: -1.3520432} - - {x: -0.46967044, y: 0, z: -1.4397827} - - {x: -0.29057223, y: 0, z: -1.5270861} - - {x: -0.111218005, y: 0, z: -1.6140645} - - {x: 0.068180576, y: 0, z: -1.7007072} - - {x: 0.24776202, y: 0, z: -1.7871795} - - {x: 0.42736718, y: 0, z: -1.8735079} - - {x: 0.60699224, y: 0, z: -1.9597967} - - {x: 0.7865938, y: 0, z: -2.046132} - - {x: 0.96616894, y: 0, z: -2.1326177} - - {x: 1.1455568, y: 0, z: -2.219278} - - {x: 1.3249133, y: 0, z: -2.3062847} - - {x: 1.5039856, y: 0, z: -2.3936045} - - {x: 1.6828775, y: 0, z: -2.481369} - - {x: 1.8617015, y: 0, z: -2.5697057} - - {x: 1.9745048, y: 0, z: -2.7052023} - - {x: 2.0917573, y: 0, z: -2.8373861} - - {x: 2.2140326, y: 0, z: -2.9639072} - - {x: 2.3422933, y: 0, z: -3.0842524} - - {x: 2.4740083, y: 0, z: -3.2010238} - - {x: 2.6038496, y: 0, z: -3.3200932} - - {x: 2.7288418, y: 0, z: -3.4444916} - - {x: 2.87687, y: 0, z: -3.3446496} - - {x: 3.015068, y: 0, z: -3.2318838} - - {x: 3.144004, y: 0, z: -3.1086097} - - {x: 3.266579, y: 0, z: -2.9789212} - - {x: 3.3872747, y: 0, z: -2.847511} - - {x: 3.510594, y: 0, z: -2.7185428} - - {x: 3.639685, y: 0, z: -2.5951595} - - {x: 3.599913, y: 0, z: -2.404679} - - {x: 3.558123, y: 0, z: -2.2145045} - - {x: 3.5145442, y: 0, z: -2.0246644} - - {x: 3.4693482, y: 0, z: -1.8351698} - - {x: 3.422666, y: 0, z: -1.6460234} - - {x: 3.3745964, y: 0, z: -1.457223} - - {x: 3.325218, y: 0, z: -1.2687837} - - {x: 3.2745957, y: 0, z: -1.0807422} - - {x: 3.222741, y: 0, z: -0.8930025} - - {x: 3.169674, y: 0, z: -0.7055662} - - {x: 3.115404, y: 0, z: -0.51844877} - - {x: 3.0599282, y: 0, z: -0.33167204} - - {x: 3.0032268, y: 0, z: -0.14525539} - - {x: 2.945264, y: 0, z: 0.040779658} - - {x: 2.8859904, y: 0, z: 0.22639482} - - {x: 2.82533, y: 0, z: 0.41155836} - - {x: 2.7631838, y: 0, z: 0.59621966} - - {x: 2.6994216, y: 0, z: 0.7803085} - - {x: 2.633878, y: 0, z: 0.96370584} - - {x: 2.5663407, y: 0, z: 1.1462233} - - {x: 2.4965467, y: 0, z: 1.3275301} - - {x: 2.3077447, y: 0, z: 1.3536078} - - {x: 2.1160479, y: 0, z: 1.3802018} - - {x: 1.9265863, y: 0, z: 1.4064023} - - {x: 1.7363355, y: 0, z: 1.432529} - - {x: 1.5458374, y: 0, z: 1.4584436} - - {x: 1.3552749, y: 0, z: 1.4840757} - - {x: 1.1646835, y: 0, z: 1.5093833} - - {x: 0.97404706, y: 0, z: 1.5343355} - - {x: 0.7833461, y: 0, z: 1.5589027} - - {x: 0.59256124, y: 0, z: 1.5830553} - - {x: 0.4017059, y: 0, z: 1.6067576} - - {x: 0.21079339, y: 0, z: 1.6299722} - - {x: 0.019866562, y: 0, z: 1.6526549} - - {x: -0.1709497, y: 0, z: 1.6747481} - - {x: -0.36193743, y: 0, z: 1.6962361} - - {x: -0.55306107, y: 0, z: 1.7170587} - - {x: -0.74427223, y: 0, z: 1.7371461} - - {x: -0.9355326, y: 0, z: 1.7564204} - - {x: -1.1268104, y: 0, z: 1.7747916} - - {x: -1.3180895, y: 0, z: 1.7921556} - - {x: -1.5093733, y: 0, z: 1.8083892} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - restPositions: - - {x: -1.6547692, y: 0, z: 1.6917566, w: 1} - - {x: -1.7953173, y: 0, z: 1.5704652, w: 1} - - {x: -1.9314678, y: 0, z: 1.443791, w: 1} - - {x: -2.0625005, y: 0, z: 1.3122748, w: 1} - - {x: -2.1888175, y: 0, z: 1.1757231, w: 1} - - {x: -2.3101618, y: 0, z: 1.0350726, w: 1} - - {x: -2.4272132, y: 0, z: 0.8907374, w: 1} - - {x: -2.5406966, y: 0, z: 0.74351734, w: 1} - - {x: -2.6515298, y: 0, z: 0.59435135, w: 1} - - {x: -2.7609143, y: 0, z: 0.44400948, w: 1} - - {x: -2.8698747, y: 0, z: 0.2935176, w: 1} - - {x: -2.9795702, y: 0, z: 0.14354794, w: 1} - - {x: -3.0911102, y: 0, z: -0.0054477826, w: 1} - - {x: -2.9199383, y: 0, z: -0.10833817, w: 1} - - {x: -2.7479436, y: 0, z: -0.20928983, w: 1} - - {x: -2.5753129, y: 0, z: -0.30825955, w: 1} - - {x: -2.4014676, y: 0, z: -0.40568763, w: 1} - - {x: -2.226681, y: 0, z: -0.5015902, w: 1} - - {x: -2.0514107, y: 0, z: -0.5959872, w: 1} - - {x: -1.87536, y: 0, z: -0.6894276, w: 1} - - {x: -1.6989415, y: 0, z: -0.78223515, w: 1} - - {x: -1.5227215, y: 0, z: -0.87485546, w: 1} - - {x: -1.3468884, y: 0, z: -0.96817625, w: 1} - - {x: -1.1717303, y: 0, z: -1.0633278, w: 1} - - {x: -0.9982708, y: 0, z: -1.161367, w: 1} - - {x: -0.8273939, y: 0, z: -1.2637306, w: 1} - - {x: -0.64856976, y: 0, z: -1.3520432, w: 1} - - {x: -0.46967044, y: 0, z: -1.4397827, w: 1} - - {x: -0.29057223, y: 0, z: -1.5270861, w: 1} - - {x: -0.111218005, y: 0, z: -1.6140645, w: 1} - - {x: 0.068180576, y: 0, z: -1.7007072, w: 1} - - {x: 0.24776202, y: 0, z: -1.7871795, w: 1} - - {x: 0.42736718, y: 0, z: -1.8735079, w: 1} - - {x: 0.60699224, y: 0, z: -1.9597967, w: 1} - - {x: 0.7865938, y: 0, z: -2.046132, w: 1} - - {x: 0.96616894, y: 0, z: -2.1326177, w: 1} - - {x: 1.1455568, y: 0, z: -2.219278, w: 1} - - {x: 1.3249133, y: 0, z: -2.3062847, w: 1} - - {x: 1.5039856, y: 0, z: -2.3936045, w: 1} - - {x: 1.6828775, y: 0, z: -2.481369, w: 1} - - {x: 1.8617015, y: 0, z: -2.5697057, w: 1} - - {x: 1.9745048, y: 0, z: -2.7052023, w: 1} - - {x: 2.0917573, y: 0, z: -2.8373861, w: 1} - - {x: 2.2140326, y: 0, z: -2.9639072, w: 1} - - {x: 2.3422933, y: 0, z: -3.0842524, w: 1} - - {x: 2.4740083, y: 0, z: -3.2010238, w: 1} - - {x: 2.6038496, y: 0, z: -3.3200932, w: 1} - - {x: 2.7288418, y: 0, z: -3.4444916, w: 1} - - {x: 2.87687, y: 0, z: -3.3446496, w: 1} - - {x: 3.015068, y: 0, z: -3.2318838, w: 1} - - {x: 3.144004, y: 0, z: -3.1086097, w: 1} - - {x: 3.266579, y: 0, z: -2.9789212, w: 1} - - {x: 3.3872747, y: 0, z: -2.847511, w: 1} - - {x: 3.510594, y: 0, z: -2.7185428, w: 1} - - {x: 3.639685, y: 0, z: -2.5951595, w: 1} - - {x: 3.599913, y: 0, z: -2.404679, w: 1} - - {x: 3.558123, y: 0, z: -2.2145045, w: 1} - - {x: 3.5145442, y: 0, z: -2.0246644, w: 1} - - {x: 3.4693482, y: 0, z: -1.8351698, w: 1} - - {x: 3.422666, y: 0, z: -1.6460234, w: 1} - - {x: 3.3745964, y: 0, z: -1.457223, w: 1} - - {x: 3.325218, y: 0, z: -1.2687837, w: 1} - - {x: 3.2745957, y: 0, z: -1.0807422, w: 1} - - {x: 3.222741, y: 0, z: -0.8930025, w: 1} - - {x: 3.169674, y: 0, z: -0.7055662, w: 1} - - {x: 3.115404, y: 0, z: -0.51844877, w: 1} - - {x: 3.0599282, y: 0, z: -0.33167204, w: 1} - - {x: 3.0032268, y: 0, z: -0.14525539, w: 1} - - {x: 2.945264, y: 0, z: 0.040779658, w: 1} - - {x: 2.8859904, y: 0, z: 0.22639482, w: 1} - - {x: 2.82533, y: 0, z: 0.41155836, w: 1} - - {x: 2.7631838, y: 0, z: 0.59621966, w: 1} - - {x: 2.6994216, y: 0, z: 0.7803085, w: 1} - - {x: 2.633878, y: 0, z: 0.96370584, w: 1} - - {x: 2.5663407, y: 0, z: 1.1462233, w: 1} - - {x: 2.4965467, y: 0, z: 1.3275301, w: 1} - - {x: 2.3077447, y: 0, z: 1.3536078, w: 1} - - {x: 2.1160479, y: 0, z: 1.3802018, w: 1} - - {x: 1.9265863, y: 0, z: 1.4064023, w: 1} - - {x: 1.7363355, y: 0, z: 1.432529, w: 1} - - {x: 1.5458374, y: 0, z: 1.4584436, w: 1} - - {x: 1.3552749, y: 0, z: 1.4840757, w: 1} - - {x: 1.1646835, y: 0, z: 1.5093833, w: 1} - - {x: 0.97404706, y: 0, z: 1.5343355, w: 1} - - {x: 0.7833461, y: 0, z: 1.5589027, w: 1} - - {x: 0.59256124, y: 0, z: 1.5830553, w: 1} - - {x: 0.4017059, y: 0, z: 1.6067576, w: 1} - - {x: 0.21079339, y: 0, z: 1.6299722, w: 1} - - {x: 0.019866562, y: 0, z: 1.6526549, w: 1} - - {x: -0.1709497, y: 0, z: 1.6747481, w: 1} - - {x: -0.36193743, y: 0, z: 1.6962361, w: 1} - - {x: -0.55306107, y: 0, z: 1.7170587, w: 1} - - {x: -0.74427223, y: 0, z: 1.7371461, w: 1} - - {x: -0.9355326, y: 0, z: 1.7564204, w: 1} - - {x: -1.1268104, y: 0, z: 1.7747916, w: 1} - - {x: -1.3180895, y: 0, z: 1.7921556, w: 1} - - {x: -1.5093733, y: 0, z: 1.8083892, w: 1} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - restNormals: [] - orientations: [] - restOrientations: [] - velocities: - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - angularVelocities: [] - invMasses: - - 9.999999 - - 10 - - 10.000001 - - 9.999999 - - 9.999999 - - 10.000001 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - invRotationalMasses: [] - filters: 0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - principalRadii: - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.039999995, y: 0.039999995, z: 0.039999995} - - {x: 0.040000003, y: 0.040000003, z: 0.040000003} - - {x: 0.040000003, y: 0.040000003, z: 0.040000003} - - {x: 0.039999995, y: 0.039999995, z: 0.039999995} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0.04, y: 0.04, z: 0.04} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - colors: - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 0.99999994, g: 0.99999994, b: 0.99999994, a: 0.99999994} - - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - - {r: 0.99999994, g: 0.99999994, b: 0.99999994, a: 0.99999994} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - points: - edges: 000000000100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000a0000000a0000000b0000000b0000000c0000000c0000000d0000000d0000000e0000000e0000000f0000000f00000010000000100000001100000011000000120000001200000013000000130000001400000014000000150000001500000016000000160000001700000017000000180000001800000019000000190000001a0000001a0000001b0000001b0000001c0000001c0000001d0000001d0000001e0000001e0000001f0000001f00000020000000200000002100000021000000220000002200000023000000230000002400000024000000250000002500000026000000260000002700000027000000280000002800000029000000290000002a0000002a0000002b0000002b0000002c0000002c0000002d0000002d0000002e0000002e0000002f0000002f00000030000000300000003100000031000000320000003200000033000000330000003400000034000000350000003500000036000000360000003700000037000000380000003800000039000000390000003a0000003a0000003b0000003b0000003c0000003c0000003d0000003d0000003e0000003e0000003f0000003f00000040000000400000004100000041000000420000004200000043000000430000004400000044000000450000004500000046000000460000004700000047000000480000004800000049000000490000004a0000004a0000004b0000004b0000004c0000004c0000004d0000004d0000004e0000004e0000004f0000004f00000050000000500000005100000051000000520000005200000053000000530000005400000054000000550000005500000056000000560000005700000057000000580000005800000059000000590000005a0000005a0000005b0000005b0000005c0000005c0000005d0000005d0000005e0000005e0000005f0000005f000000600000006000000000000000 - triangles: - distanceConstraintsData: - batches: - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000 - m_ConstraintCount: 73 - m_ActiveConstraintCount: 48 - m_InitialActiveConstraintCount: 48 - particleIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - restLengths: - serializedContents: - - 0.18564853 - - 0.18565044 - - 0.18576063 - - 0.18588233 - - 0.18592378 - - 0.1858063 - - 0.19971544 - - 0.19898842 - - 0.19936812 - - 0.19931118 - - 0.19907784 - - 0.19933437 - - 0.19919144 - - 0.19925661 - - 0.19933179 - - 0.1993162 - - 0.199276 - - 0.19931632 - - 0.19934614 - - 0.19926094 - - 0.17630634 - - 0.17595129 - - 0.17602395 - - 0.17634629 - - 0.17836717 - - 0.178448 - - 0.17843884 - - 0.19458835 - - 0.19477776 - - 0.19482192 - - 0.1948015 - - 0.19476943 - - 0.19482858 - - 0.19484922 - - 0.19484958 - - 0.19483826 - - 0.1947577 - - 0.19427651 - - 0.19353278 - - 0.19203633 - - 0.19227861 - - 0.19226244 - - 0.19230759 - - 0.19231874 - - 0.192091 - - 0.19225457 - - 0.19222912 - - 0.19206558 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - m_AlignBytes: 16 - stiffnesses: - serializedContents: - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - m_AlignBytes: 16 - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000 - m_ConstraintCount: 73 - m_ActiveConstraintCount: 48 - m_InitialActiveConstraintCount: 48 - particleIndices: - serializedContents: 0100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - restLengths: - serializedContents: - - 0.18596585 - - 0.18601711 - - 0.18583234 - - 0.18583456 - - 0.18579607 - - 0.1861207 - - 0.19943272 - - 0.19928476 - - 0.19907406 - - 0.19934076 - - 0.19906293 - - 0.1992483 - - 0.19944213 - - 0.19924371 - - 0.19922554 - - 0.1992752 - - 0.19927499 - - 0.19922356 - - 0.19922769 - - 0.1994527 - - 0.1766938 - - 0.17587988 - - 0.17617115 - - 0.17855187 - - 0.17838444 - - 0.17842674 - - 0.17857191 - - 0.19471198 - - 0.19480988 - - 0.19482367 - - 0.19473623 - - 0.19480366 - - 0.19484122 - - 0.1948556 - - 0.19484664 - - 0.19481866 - - 0.19461222 - - 0.19059443 - - 0.19126464 - - 0.1922527 - - 0.19226435 - - 0.19227688 - - 0.19232152 - - 0.1922695 - - 0.19219275 - - 0.19226341 - - 0.19215801 - - 0.19197142 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - m_AlignBytes: 16 - stiffnesses: - serializedContents: - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - m_AlignBytes: 16 - - m_IDs: 00000000 - m_IDToIndex: 00000000 - m_ConstraintCount: 1 - m_ActiveConstraintCount: 1 - m_InitialActiveConstraintCount: 1 - particleIndices: - serializedContents: 6000000000000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - restLengths: - serializedContents: - - 0.18639506 - m_AlignBytes: 16 - stiffnesses: - serializedContents: - - {x: 0, y: 0} - m_AlignBytes: 16 - bendConstraintsData: - batches: - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f00000030000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f00000030000000 - m_ConstraintCount: 49 - m_ActiveConstraintCount: 32 - m_InitialActiveConstraintCount: 32 - particleIndices: - serializedContents: 000000000200000001000000030000000500000004000000060000000800000007000000090000000b0000000a0000000c0000000e0000000d0000000f0000001100000010000000120000001400000013000000150000001700000016000000180000001a000000190000001b0000001d0000001c0000001e000000200000001f0000002100000023000000220000002400000026000000250000002700000029000000280000002a0000002c0000002b0000002d0000002f0000002e000000300000003200000031000000330000003500000034000000360000003800000037000000390000003b0000003a0000003c0000003e0000003d0000003f0000004100000040000000420000004400000043000000450000004700000046000000480000004a000000490000004b0000004d0000004c0000004e000000500000004f0000005100000053000000520000005400000056000000550000005700000059000000580000005a0000005c0000005b0000005d0000005f0000005e000000600000006200000061000000630000006500000064000000660000006800000067000000690000006b0000006a0000006c0000006e0000006d0000006f0000007100000070000000720000007400000073000000750000007700000076000000780000007a000000790000007b0000007d0000007c0000007e000000800000007f0000008100000083000000820000008400000086000000850000008700000089000000880000008a0000008c0000008b0000008d0000008f0000008e000000900000009200000091000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - restBends: - serializedContents: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - m_AlignBytes: 16 - bendingStiffnesses: - serializedContents: - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - m_AlignBytes: 16 - plasticity: - serializedContents: - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - m_AlignBytes: 16 - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000 - m_ConstraintCount: 48 - m_ActiveConstraintCount: 32 - m_InitialActiveConstraintCount: 32 - particleIndices: - serializedContents: 0100000003000000020000000400000006000000050000000700000009000000080000000a0000000c0000000b0000000d0000000f0000000e000000100000001200000011000000130000001500000014000000160000001800000017000000190000001b0000001a0000001c0000001e0000001d0000001f0000002100000020000000220000002400000023000000250000002700000026000000280000002a000000290000002b0000002d0000002c0000002e000000300000002f0000003100000033000000320000003400000036000000350000003700000039000000380000003a0000003c0000003b0000003d0000003f0000003e000000400000004200000041000000430000004500000044000000460000004800000047000000490000004b0000004a0000004c0000004e0000004d0000004f0000005100000050000000520000005400000053000000550000005700000056000000580000005a000000590000005b0000005d0000005c0000005e000000600000005f0000006100000063000000620000006400000066000000650000006700000069000000680000006a0000006c0000006b0000006d0000006f0000006e000000700000007200000071000000730000007500000074000000760000007800000077000000790000007b0000007a0000007c0000007e0000007d0000007f0000008100000080000000820000008400000083000000850000008700000086000000880000008a000000890000008b0000008d0000008c0000008e000000900000008f000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - restBends: - serializedContents: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - m_AlignBytes: 16 - bendingStiffnesses: - serializedContents: - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - m_AlignBytes: 16 - plasticity: - serializedContents: - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - m_AlignBytes: 16 - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000 - m_ConstraintCount: 48 - m_ActiveConstraintCount: 31 - m_InitialActiveConstraintCount: 31 - particleIndices: - serializedContents: 020000000400000003000000050000000700000006000000080000000a000000090000000b0000000d0000000c0000000e000000100000000f0000001100000013000000120000001400000016000000150000001700000019000000180000001a0000001c0000001b0000001d0000001f0000001e000000200000002200000021000000230000002500000024000000260000002800000027000000290000002b0000002a0000002c0000002e0000002d0000002f0000003100000030000000320000003400000033000000350000003700000036000000380000003a000000390000003b0000003d0000003c0000003e000000400000003f0000004100000043000000420000004400000046000000450000004700000049000000480000004a0000004c0000004b0000004d0000004f0000004e000000500000005200000051000000530000005500000054000000560000005800000057000000590000005b0000005a0000005c0000005e0000005d0000005f0000006100000060000000620000006400000063000000650000006700000066000000680000006a000000690000006b0000006d0000006c0000006e000000700000006f0000007100000073000000720000007400000076000000750000007700000079000000780000007a0000007c0000007b0000007d0000007f0000007e000000800000008200000081000000830000008500000084000000860000008800000087000000890000008b0000008a0000008c0000008e0000008d0000008f0000009100000090000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - restBends: - serializedContents: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - m_AlignBytes: 16 - bendingStiffnesses: - serializedContents: - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - m_AlignBytes: 16 - plasticity: - serializedContents: - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - m_AlignBytes: 16 - - m_IDs: 00000000 - m_IDToIndex: 00000000 - m_ConstraintCount: 1 - m_ActiveConstraintCount: 1 - m_InitialActiveConstraintCount: 1 - particleIndices: - serializedContents: 5f0000000000000060000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - restBends: - serializedContents: - - 0 - m_AlignBytes: 16 - bendingStiffnesses: - serializedContents: - - {x: 0, y: 0} - m_AlignBytes: 16 - plasticity: - serializedContents: - - {x: 0, y: 0} - m_AlignBytes: 16 - - m_IDs: 00000000 - m_IDToIndex: 00000000 - m_ConstraintCount: 1 - m_ActiveConstraintCount: 1 - m_InitialActiveConstraintCount: 1 - particleIndices: - serializedContents: 600000000100000000000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - restBends: - serializedContents: - - 0 - m_AlignBytes: 16 - bendingStiffnesses: - serializedContents: - - {x: 0, y: 0} - m_AlignBytes: 16 - plasticity: - serializedContents: - - {x: 0, y: 0} - m_AlignBytes: 16 - skinConstraintsData: - batches: [] - tetherConstraintsData: - batches: [] - stretchShearConstraintsData: - batches: [] - bendTwistConstraintsData: - batches: [] - shapeMatchingConstraintsData: - batches: [] - aerodynamicConstraintsData: - batches: - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b0000007c0000007d0000007e0000007f000000800000008100000082000000830000008400000085000000860000008700000088000000890000008a0000008b0000008c0000008d0000008e0000008f000000900000009100000092000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b0000007c0000007d0000007e0000007f000000800000008100000082000000830000008400000085000000860000008700000088000000890000008a0000008b0000008c0000008d0000008e0000008f000000900000009100000092000000 - m_ConstraintCount: 147 - m_ActiveConstraintCount: 97 - m_InitialActiveConstraintCount: 97 - particleIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b0000007c0000007d0000007e0000007f000000800000008100000082000000830000008400000085000000860000008700000088000000890000008a0000008b0000008c0000008d0000008e0000008f000000900000009100000092000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - aerodynamicCoeffs: - serializedContents: - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.07999999 - - 1 - - 1 - - 0.080000006 - - 1 - - 1 - - 0.080000006 - - 1 - - 1 - - 0.07999999 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0.08 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - m_AlignBytes: 16 - chainConstraintsData: - batches: [] - volumeConstraintsData: - batches: [] - groups: - - {fileID: 135749586216130241} - - {fileID: 8813747759735635217} - - {fileID: -6013852427284171944} - - {fileID: -7671420094400086755} - - {fileID: 218208082314265139} - - {fileID: 1548941265819301156} - - {fileID: -793357204084665196} - path: - m_Names: - - cp1 - - cp0 - - cp4 - - cp32 - - cp31 - - cp3 - - cp2 - m_Points: - data: - - tangentMode: 2 - inTangent: {x: 1.4677799, y: 0, z: -0.1198585} - position: {x: -1.5093733, y: 0, z: 1.8083892} - outTangent: {x: -0.7622293, y: 0, z: -0.59003043} - - tangentMode: 2 - inTangent: {x: 0.49660897, y: 0, z: 0.6533305} - position: {x: -3.0911102, y: 0, z: -0.0054477826} - outTangent: {x: 0.9949527, y: 0, z: -0.6052146} - - tangentMode: 2 - inTangent: {x: -0.56121105, y: 0, z: 0.3483219} - position: {x: -0.8273939, y: 0, z: -1.2637306} - outTangent: {x: 0.92255735, y: 0, z: -0.457299} - - tangentMode: 2 - inTangent: {x: -0.9289887, y: 0, z: 0.4605987} - position: {x: 1.8617015, y: 0, z: -2.5697057} - outTangent: {x: 0.41431952, y: 0, z: -0.51047516} - - tangentMode: 2 - inTangent: {x: -0.32629395, y: 0, z: 0.33847427} - position: {x: 2.7288418, y: 0, z: -3.4444916} - outTangent: {x: 0.39941335, y: 0, z: 0.24359727} - - tangentMode: 2 - inTangent: {x: -0.3435409, y: 0, z: -0.31051826} - position: {x: 3.639685, y: 0, z: -2.5951595} - outTangent: {x: -0.24850488, y: 0, z: 1.225011} - - tangentMode: 2 - inTangent: {x: 0.41437054, y: 0, z: -1.0532876} - position: {x: 2.4965467, y: 0, z: 1.3275301} - outTangent: {x: -0.73371625, y: 0, z: 0.100637674} - m_Normals: - data: - - {x: 0, y: 1, z: 0} - - {x: 0, y: 1, z: 0} - - {x: 0, y: 1, z: 0} - - {x: 0, y: 1, z: 0} - - {x: 0, y: 1, z: 0} - - {x: 0, y: 1, z: 0} - - {x: 0, y: 1, z: 0} - m_Colors: - data: - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - m_Thickness: - data: - - 1 - - 1 - - 1 - - 1 - - 1 - - 1 - - 1 - m_Masses: - data: - - 0.1 - - 0.1 - - 0.1 - - 0.1 - - 0.1 - - 0.1 - - 0.1 - m_RotationalMasses: - data: - - 1 - - 1 - - 1 - - 1 - - 1 - - 1 - - 1 - m_Filters: - data: 0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff - m_Closed: 1 - m_ArcLengthTable: - - 0 - - 0.13533048 - - 0.2662092 - - 0.3930676 - - 0.51632917 - - 0.6364078 - - 0.75370646 - - 0.8686161 - - 0.98151493 - - 1.0927676 - - 1.2027254 - - 1.3117267 - - 1.420097 - - 1.528151 - - 1.6361938 - - 1.7445226 - - 1.853429 - - 1.9632009 - - 2.0741255 - - 2.1864903 - - 2.300586 - - 2.416708 - - 2.5803764 - - 2.7387848 - - 2.8921363 - - 3.0406313 - - 3.1844676 - - 3.3238404 - - 3.458943 - - 3.5899658 - - 3.7170982 - - 3.8405273 - - 3.9604387 - - 4.077018 - - 4.1904488 - - 4.3009167 - - 4.408607 - - 4.5137076 - - 4.6164083 - - 4.7169027 - - 4.8153887 - - 4.91207 - - 5.007156 - - 5.153549 - - 5.298632 - - 5.442548 - - 5.58544 - - 5.7274523 - - 5.8687277 - - 6.009409 - - 6.1496396 - - 6.289562 - - 6.42932 - - 6.569055 - - 6.708911 - - 6.84903 - - 6.9895554 - - 7.13063 - - 7.2723966 - - 7.4149985 - - 7.558579 - - 7.7032814 - - 7.849249 - - 7.9966254 - - 8.086856 - - 8.170113 - - 8.247009 - - 8.318159 - - 8.384174 - - 8.445666 - - 8.503243 - - 8.55751 - - 8.609067 - - 8.65851 - - 8.70643 - - 8.753413 - - 8.800039 - - 8.8468895 - - 8.894542 - - 8.943577 - - 8.994577 - - 9.048133 - - 9.104835 - - 9.165279 - - 9.230069 - - 9.295789 - - 9.3594675 - - 9.42138 - - 9.481789 - - 9.540944 - - 9.599084 - - 9.656433 - - 9.713202 - - 9.76959 - - 9.825785 - - 9.881963 - - 9.938295 - - 9.9949465 - - 10.052079 - - 10.109854 - - 10.168433 - - 10.227983 - - 10.288677 - - 10.350694 - - 10.41422 - - 10.479452 - - 10.661017 - - 10.848141 - - 11.040159 - - 11.236406 - - 11.4362135 - - 11.638911 - - 11.843829 - - 12.050296 - - 12.257639 - - 12.465185 - - 12.672262 - - 12.878198 - - 13.082318 - - 13.283952 - - 13.482427 - - 13.677072 - - 13.867218 - - 14.0521965 - - 14.231342 - - 14.403991 - - 14.569483 - - 14.682489 - - 14.809294 - - 14.948967 - - 15.100578 - - 15.263198 - - 15.435897 - - 15.617744 - - 15.807813 - - 16.00517 - - 16.208893 - - 16.418049 - - 16.63171 - - 16.848951 - - 17.068844 - - 17.290462 - - 17.512882 - - 17.735178 - - 17.956429 - - 18.17571 - - 18.392105 - - 18.604694 - m_TotalSplineLenght: 18.604694 - OnPathChanged: - m_PersistentCalls: - m_Calls: [] - OnControlPointAdded: - m_PersistentCalls: - m_Calls: [] - OnControlPointRemoved: - m_PersistentCalls: - m_Calls: [] - OnControlPointRenamed: - m_PersistentCalls: - m_Calls: [] - thickness: 0.04 - resolution: 0.2 - m_InterParticleDistance: 0.19180097 - totalParticles: 147 - m_RestLength: 28.002403 - deformableEdges: 000000000100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000a0000000a0000000b0000000b0000000c0000000c0000000d0000000d0000000e0000000e0000000f0000000f00000010000000100000001100000011000000120000001200000013000000130000001400000014000000150000001500000016000000160000001700000017000000180000001800000019000000190000001a0000001a0000001b0000001b0000001c0000001c0000001d0000001d0000001e0000001e0000001f0000001f00000020000000200000002100000021000000220000002200000023000000230000002400000024000000250000002500000026000000260000002700000027000000280000002800000029000000290000002a0000002a0000002b0000002b0000002c0000002c0000002d0000002d0000002e0000002e0000002f0000002f00000030000000300000003100000031000000320000003200000033000000330000003400000034000000350000003500000036000000360000003700000037000000380000003800000039000000390000003a0000003a0000003b0000003b0000003c0000003c0000003d0000003d0000003e0000003e0000003f0000003f00000040000000400000004100000041000000420000004200000043000000430000004400000044000000450000004500000046000000460000004700000047000000480000004800000049000000490000004a0000004a0000004b0000004b0000004c0000004c0000004d0000004d0000004e0000004e0000004f0000004f00000050000000500000005100000051000000520000005200000053000000530000005400000054000000550000005500000056000000560000005700000057000000580000005800000059000000590000005a0000005a0000005b0000005b0000005c0000005c0000005d0000005d0000005e0000005e0000005f0000005f000000600000006000000000000000 - restLengths: - - 0.18564853 - - 0.18596585 - - 0.18565044 - - 0.18601711 - - 0.18576063 - - 0.18583234 - - 0.18588233 - - 0.18583456 - - 0.18592378 - - 0.18579607 - - 0.1858063 - - 0.1861207 - - 0.19971544 - - 0.19943272 - - 0.19898842 - - 0.19928476 - - 0.19936812 - - 0.19907406 - - 0.19931118 - - 0.19934076 - - 0.19907784 - - 0.19906293 - - 0.19933437 - - 0.1992483 - - 0.19919144 - - 0.19944213 - - 0.19925661 - - 0.19924371 - - 0.19933179 - - 0.19922554 - - 0.1993162 - - 0.1992752 - - 0.199276 - - 0.19927499 - - 0.19931632 - - 0.19922356 - - 0.19934614 - - 0.19922769 - - 0.19926094 - - 0.1994527 - - 0.17630634 - - 0.1766938 - - 0.17595129 - - 0.17587988 - - 0.17602395 - - 0.17617115 - - 0.17634629 - - 0.17855187 - - 0.17836717 - - 0.17838444 - - 0.178448 - - 0.17842674 - - 0.17843884 - - 0.17857191 - - 0.19458835 - - 0.19471198 - - 0.19477776 - - 0.19480988 - - 0.19482192 - - 0.19482367 - - 0.1948015 - - 0.19473623 - - 0.19476943 - - 0.19480366 - - 0.19482858 - - 0.19484122 - - 0.19484922 - - 0.1948556 - - 0.19484958 - - 0.19484664 - - 0.19483826 - - 0.19481866 - - 0.1947577 - - 0.19461222 - - 0.19427651 - - 0.19059443 - - 0.19353278 - - 0.19126464 - - 0.19203633 - - 0.1922527 - - 0.19227861 - - 0.19226435 - - 0.19226244 - - 0.19227688 - - 0.19230759 - - 0.19232152 - - 0.19231874 - - 0.1922695 - - 0.192091 - - 0.19219275 - - 0.19225457 - - 0.19226341 - - 0.19222912 - - 0.19215801 - - 0.19206558 - - 0.18639506 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0.19180097 - - 0 - pooledParticles: 50 ---- !u!114 &135749586216130241 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 775ad4994fda946d1a5936c7e2dfc785, type: 3} - m_Name: cp1 - m_EditorClassIdentifier: - particleIndices: 00000000 - m_Blueprint: {fileID: 11400000} ---- !u!114 &218208082314265139 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 775ad4994fda946d1a5936c7e2dfc785, type: 3} - m_Name: cp31 - m_EditorClassIdentifier: - particleIndices: 2f000000 - m_Blueprint: {fileID: 11400000} ---- !u!114 &1548941265819301156 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 775ad4994fda946d1a5936c7e2dfc785, type: 3} - m_Name: cp3 - m_EditorClassIdentifier: - particleIndices: 36000000 - m_Blueprint: {fileID: 11400000} ---- !u!114 &8813747759735635217 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 775ad4994fda946d1a5936c7e2dfc785, type: 3} - m_Name: cp0 - m_EditorClassIdentifier: - particleIndices: 0c000000 - m_Blueprint: {fileID: 11400000} diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Chain.asset b/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Chain.asset index f41a50046..39bd8fb65 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Chain.asset +++ b/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Chain.asset @@ -54,9 +54,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 8f7e67b5626124d0db9886e6cd2aacff, type: 3} m_Name: Chain m_EditorClassIdentifier: - m_Checksum: 2706284093 m_Empty: 0 - m_Edited: 0 m_ActiveParticleCount: 24 m_InitialActiveParticleCount: 24 _bounds: @@ -312,7 +310,6 @@ MonoBehaviour: - {x: 0, y: 0, z: 0, w: 0} - {x: 0, y: 0, z: 0, w: 0} - {x: 0, y: 0, z: 0, w: 0} - restNormals: [] orientations: [] restOrientations: [] velocities: @@ -1542,393 +1539,7 @@ MonoBehaviour: shapeMatchingConstraintsData: batches: [] aerodynamicConstraintsData: - batches: - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b000000 - m_ConstraintCount: 124 - m_ActiveConstraintCount: 24 - m_InitialActiveConstraintCount: 24 - particleIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - aerodynamicCoeffs: - serializedContents: - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.20000003 - - 1 - - 1 - - 0.20000003 - - 1 - - 1 - - 0.20000003 - - 1 - - 1 - - 0.20000005 - - 1 - - 1 - - 0.20000005 - - 1 - - 1 - - 0.20000005 - - 1 - - 1 - - 0.20000005 - - 1 - - 1 - - 0.20000005 - - 1 - - 1 - - 0.20000005 - - 1 - - 1 - - 0.20000005 - - 1 - - 1 - - 0.20000003 - - 1 - - 1 - - 0.20000003 - - 1 - - 1 - - 0.20000003 - - 1 - - 1 - - 0.20000003 - - 1 - - 1 - - 0.20000003 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - m_AlignBytes: 16 + batches: [] chainConstraintsData: batches: [] volumeConstraintsData: @@ -2078,7 +1689,6 @@ MonoBehaviour: m_InterParticleDistance: 0.22296134 totalParticles: 124 m_RestLength: 27.388588 - deformableEdges: 000000000100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000a0000000a0000000b0000000b0000000c0000000c0000000d0000000d0000000e0000000e0000000f0000000f000000100000001000000011000000110000001200000012000000130000001300000014000000140000001500000015000000160000001600000017000000 restLengths: - 0.20054139 - 0.20063484 diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Crane.asset b/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Crane.asset index dc5be0c6e..e88abc2c3 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Crane.asset +++ b/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Crane.asset @@ -26,14 +26,12 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 8f7e67b5626124d0db9886e6cd2aacff, type: 3} m_Name: Crane m_EditorClassIdentifier: - m_Checksum: 4194486687 m_Empty: 0 - m_Edited: 0 m_ActiveParticleCount: 51 m_InitialActiveParticleCount: 51 _bounds: - m_Center: {x: 0.9783744, y: -1.6003398, z: 0} - m_Extent: {x: 1.2935042, y: 1.818298, z: 0} + m_Center: {x: 0.9783744, y: -1.6007091, z: 0} + m_Extent: {x: 1.2935042, y: 1.8179287, z: 0} positions: - {x: -0.31512982, y: -3.4186378, z: 0} - {x: -0.3056823, y: -3.268208, z: 0} @@ -48,30 +46,30 @@ MonoBehaviour: - {x: -0.3023701, y: -1.9318516, z: 0} - {x: -0.2994541, y: -1.7853336, z: 0} - {x: -0.2993567, y: -1.6387947, z: 0} - - {x: -0.30226997, y: -1.4934465, z: 0} - - {x: -0.30640543, y: -1.3481294, z: 0} - - {x: -0.3102972, y: -1.2028079, z: 0} - - {x: -0.31236184, y: -1.0574545, z: 0} - - {x: -0.31086555, y: -0.9121015, z: 0} - - {x: -0.3039001, y: -0.76692027, z: 0} - - {x: -0.28939134, y: -0.62231326, z: 0} - - {x: -0.27967986, y: -0.46904594, z: 0} - - {x: -0.28175166, y: -0.31541988, z: 0} - - {x: -0.27775657, y: -0.1619403, z: 0} + - {x: -0.30232438, y: -1.4934478, z: 0} + - {x: -0.30660304, y: -1.3481348, z: 0} + - {x: -0.31069574, y: -1.2028192, z: 0} + - {x: -0.31298584, y: -1.0574687, z: 0} + - {x: -0.31170303, y: -0.91211385, z: 0} + - {x: -0.30489832, y: -0.7669254, z: 0} + - {x: -0.29045326, y: -0.62231326, z: 0} + - {x: -0.27953932, y: -0.46936983, z: 0} + - {x: -0.2792294, y: -0.31600073, z: 0} + - {x: -0.27395794, y: -0.16279453, z: 0} - {x: -0.24022967, y: -0.013745427, z: 0} - - {x: -0.10811734, y: 0.07874784, z: 0} - - {x: 0.049495958, y: 0.12659122, z: 0} - - {x: 0.21218093, y: 0.15910268, z: 0} - - {x: 0.3757028, y: 0.18237159, z: 0} - - {x: 0.54063326, y: 0.19910085, z: 0} - - {x: 0.7059974, y: 0.21033922, z: 0} - - {x: 0.87131095, y: 0.21658574, z: 0} - - {x: 1.0368451, y: 0.21795821, z: 0} - - {x: 1.2024431, y: 0.21418877, z: 0} - - {x: 1.3677056, y: 0.20461291, z: 0} - - {x: 1.5318352, y: 0.1880064, z: 0} - - {x: 1.6959254, y: 0.16164106, z: 0} - - {x: 1.8552414, y: 0.12067384, z: 0} + - {x: -0.10891642, y: 0.07976549, z: 0} + - {x: 0.04868553, y: 0.12708266, z: 0} + - {x: 0.21119903, y: 0.15914668, z: 0} + - {x: 0.37497035, y: 0.18214363, z: 0} + - {x: 0.54003805, y: 0.19865747, z: 0} + - {x: 0.7054689, y: 0.20974034, z: 0} + - {x: 0.8707676, y: 0.21588846, z: 0} + - {x: 1.03637, y: 0.21721959, z: 0} + - {x: 1.2020143, y: 0.2134598, z: 0} + - {x: 1.3673098, y: 0.2039462, z: 0} + - {x: 1.5314698, y: 0.18745771, z: 0} + - {x: 1.695718, y: 0.16125031, z: 0} + - {x: 1.8551009, y: 0.12051222, z: 0} - {x: 2.0035534, y: 0.04992962, z: 0} - {x: 2.1177197, y: -0.068810605, z: 0} - {x: 2.1932914, y: -0.21575461, z: 0} @@ -82,10 +80,10 @@ MonoBehaviour: - {x: 2.2623122, y: -1.0353558, z: 0} - {x: 2.248836, y: -1.2006693, z: 0} - {x: 2.2330368, y: -1.3651848, z: 0} - - {x: 2.2265196, y: -1.5111344, z: 0} - - {x: 2.2229218, y: -1.6575849, z: 0} - - {x: 2.2201767, y: -1.8041061, z: 0} - - {x: 2.2181082, y: -1.9501454, z: 0} + - {x: 2.2265346, y: -1.5091771, z: 0} + - {x: 2.2229314, y: -1.653681, z: 0} + - {x: 2.2201805, y: -1.7982486, z: 0} + - {x: 2.2181082, y: -1.9423363, z: 0} - {x: 0, y: 0, z: 0} - {x: 0, y: 0, z: 0} - {x: 0, y: 0, z: 0} @@ -200,30 +198,30 @@ MonoBehaviour: - {x: -0.3023701, y: -1.9318516, z: 0, w: 1} - {x: -0.2994541, y: -1.7853336, z: 0, w: 1} - {x: -0.2993567, y: -1.6387947, z: 0, w: 1} - - {x: -0.30226997, y: -1.4934465, z: 0, w: 1} - - {x: -0.30640543, y: -1.3481294, z: 0, w: 1} - - {x: -0.3102972, y: -1.2028079, z: 0, w: 1} - - {x: -0.31236184, y: -1.0574545, z: 0, w: 1} - - {x: -0.31086555, y: -0.9121015, z: 0, w: 1} - - {x: -0.3039001, y: -0.76692027, z: 0, w: 1} - - {x: -0.28939134, y: -0.62231326, z: 0, w: 1} - - {x: -0.27967986, y: -0.46904594, z: 0, w: 1} - - {x: -0.28175166, y: -0.31541988, z: 0, w: 1} - - {x: -0.27775657, y: -0.1619403, z: 0, w: 1} + - {x: -0.30232438, y: -1.4934478, z: 0, w: 1} + - {x: -0.30660304, y: -1.3481348, z: 0, w: 1} + - {x: -0.31069574, y: -1.2028192, z: 0, w: 1} + - {x: -0.31298584, y: -1.0574687, z: 0, w: 1} + - {x: -0.31170303, y: -0.91211385, z: 0, w: 1} + - {x: -0.30489832, y: -0.7669254, z: 0, w: 1} + - {x: -0.29045326, y: -0.62231326, z: 0, w: 1} + - {x: -0.27953932, y: -0.46936983, z: 0, w: 1} + - {x: -0.2792294, y: -0.31600073, z: 0, w: 1} + - {x: -0.27395794, y: -0.16279453, z: 0, w: 1} - {x: -0.24022967, y: -0.013745427, z: 0, w: 1} - - {x: -0.10811734, y: 0.07874784, z: 0, w: 1} - - {x: 0.049495958, y: 0.12659122, z: 0, w: 1} - - {x: 0.21218093, y: 0.15910268, z: 0, w: 1} - - {x: 0.3757028, y: 0.18237159, z: 0, w: 1} - - {x: 0.54063326, y: 0.19910085, z: 0, w: 1} - - {x: 0.7059974, y: 0.21033922, z: 0, w: 1} - - {x: 0.87131095, y: 0.21658574, z: 0, w: 1} - - {x: 1.0368451, y: 0.21795821, z: 0, w: 1} - - {x: 1.2024431, y: 0.21418877, z: 0, w: 1} - - {x: 1.3677056, y: 0.20461291, z: 0, w: 1} - - {x: 1.5318352, y: 0.1880064, z: 0, w: 1} - - {x: 1.6959254, y: 0.16164106, z: 0, w: 1} - - {x: 1.8552414, y: 0.12067384, z: 0, w: 1} + - {x: -0.10891642, y: 0.07976549, z: 0, w: 1} + - {x: 0.04868553, y: 0.12708266, z: 0, w: 1} + - {x: 0.21119903, y: 0.15914668, z: 0, w: 1} + - {x: 0.37497035, y: 0.18214363, z: 0, w: 1} + - {x: 0.54003805, y: 0.19865747, z: 0, w: 1} + - {x: 0.7054689, y: 0.20974034, z: 0, w: 1} + - {x: 0.8707676, y: 0.21588846, z: 0, w: 1} + - {x: 1.03637, y: 0.21721959, z: 0, w: 1} + - {x: 1.2020143, y: 0.2134598, z: 0, w: 1} + - {x: 1.3673098, y: 0.2039462, z: 0, w: 1} + - {x: 1.5314698, y: 0.18745771, z: 0, w: 1} + - {x: 1.695718, y: 0.16125031, z: 0, w: 1} + - {x: 1.8551009, y: 0.12051222, z: 0, w: 1} - {x: 2.0035534, y: 0.04992962, z: 0, w: 1} - {x: 2.1177197, y: -0.068810605, z: 0, w: 1} - {x: 2.1932914, y: -0.21575461, z: 0, w: 1} @@ -234,10 +232,10 @@ MonoBehaviour: - {x: 2.2623122, y: -1.0353558, z: 0, w: 1} - {x: 2.248836, y: -1.2006693, z: 0, w: 1} - {x: 2.2330368, y: -1.3651848, z: 0, w: 1} - - {x: 2.2265196, y: -1.5111344, z: 0, w: 1} - - {x: 2.2229218, y: -1.6575849, z: 0, w: 1} - - {x: 2.2201767, y: -1.8041061, z: 0, w: 1} - - {x: 2.2181082, y: -1.9501454, z: 0, w: 1} + - {x: 2.2265346, y: -1.5091771, z: 0, w: 1} + - {x: 2.2229314, y: -1.653681, z: 0, w: 1} + - {x: 2.2201805, y: -1.7982486, z: 0, w: 1} + - {x: 2.2181082, y: -1.9423363, z: 0, w: 1} - {x: 0, y: 0, z: 0, w: 0} - {x: 0, y: 0, z: 0, w: 0} - {x: 0, y: 0, z: 0, w: 0} @@ -338,7 +336,6 @@ MonoBehaviour: - {x: 0, y: 0, z: 0, w: 0} - {x: 0, y: 0, z: 0, w: 0} - {x: 0, y: 0, z: 0, w: 0} - restNormals: [] orientations: [] restOrientations: [] velocities: @@ -976,25 +973,25 @@ MonoBehaviour: - 0.1465397 - 0.14655772 - 0.146547 - - 0.14537738 - - 0.1453736 - - 0.14536066 - - 0.14533304 - - 0.15364002 - - 0.15287247 - - 0.16471474 - - 0.16516913 - - 0.16574559 - - 0.16553983 - - 0.16553965 - - 0.1661948 - - 0.16432038 + - 0.14537717 + - 0.14537315 + - 0.14536047 + - 0.14533179 + - 0.15336941 + - 0.15281764 + - 0.16455178 + - 0.16537806 + - 0.16580167 + - 0.1656078 + - 0.16556904 + - 0.16632591 + - 0.16437778 - 0.16523813 - 0.16566478 - 0.16564785 - 0.16586185 - - 0.14609504 - - 0.14654693 + - 0.14413904 + - 0.14459378 - 0 - 0 - 0 @@ -1143,25 +1140,25 @@ MonoBehaviour: - 0.14655413 - 0.14655447 - 0.146539 - - 0.1453759 - - 0.1453681 - - 0.14534824 - - 0.15357469 - - 0.15353157 - - 0.16127203 - - 0.16590177 - - 0.16577673 - - 0.16543151 - - 0.16564094 - - 0.1649676 - - 0.164499 + - 0.145376 + - 0.14536862 + - 0.14534782 + - 0.15333234 + - 0.15329686 + - 0.16120628 + - 0.16564642 + - 0.16589169 + - 0.16541299 + - 0.16568695 + - 0.164986 + - 0.16450676 - 0.1647215 - 0.16536571 - 0.1656973 - 0.1657586 - 0.1652724 - - 0.1464947 - - 0.1460539 + - 0.14454886 + - 0.14410257 - 0 - 0 - 0 @@ -1306,23 +1303,23 @@ MonoBehaviour: m_AlignBytes: 16 restBends: serializedContents: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 + - 0.00042131654 + - 0.0019198892 + - 0.001181275 + - 0.00042943415 + - 0.00043716797 + - 0.001190991 + - 0.0030162414 + - 0.009586283 + - 0.0053414763 + - 0.0018143662 + - 0.0016970462 + - 0.0032397506 + - 0.019705387 + - 0.007221373 + - 0.002470971 + - 0.0075102416 + - 0.00027710374 - 0 - 0 - 0 @@ -1476,23 +1473,23 @@ MonoBehaviour: m_AlignBytes: 16 restBends: serializedContents: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 + - 0.0017002142 + - 0.0015957004 + - 0.00059224834 + - 0.0009395445 + - 0.000061992956 + - 0.0018414557 + - 0.0035375215 + - 0.037427437 + - 0.0030513157 + - 0.001645499 + - 0.001921447 + - 0.0051078834 + - 0.015933849 + - 0.004931509 + - 0.0016639825 + - 0.0009812318 + - 1.0145596 - 0 - 0 - 0 @@ -1646,23 +1643,23 @@ MonoBehaviour: m_AlignBytes: 16 restBends: serializedContents: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 + - 0.0018389499 + - 0.001889506 + - 0.00006921082 + - 0.0010962501 + - 0.000600988 + - 0.0025540222 + - 0.0016547412 + - 0.017716777 + - 0.0022038233 + - 0.0016088501 + - 0.0023555602 + - 0.010594352 + - 0.010907751 + - 0.0034749473 + - 0.0008187811 + - 0.00028498602 + - 0.9827781 - 0 - 0 - 0 @@ -1811,474 +1808,7 @@ MonoBehaviour: shapeMatchingConstraintsData: batches: [] aerodynamicConstraintsData: - batches: - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b0000007c0000007d0000007e0000007f000000800000008100000082000000830000008400000085000000860000008700000088000000890000008a0000008b0000008c0000008d0000008e0000008f00000090000000910000009200000093000000940000009500000096000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b0000007c0000007d0000007e0000007f000000800000008100000082000000830000008400000085000000860000008700000088000000890000008a0000008b0000008c0000008d0000008e0000008f00000090000000910000009200000093000000940000009500000096000000 - m_ConstraintCount: 151 - m_ActiveConstraintCount: 51 - m_InitialActiveConstraintCount: 51 - particleIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b0000007c0000007d0000007e0000007f000000800000008100000082000000830000008400000085000000860000008700000088000000890000008a0000008b0000008c0000008d0000008e0000008f00000090000000910000009200000093000000940000009500000096000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - aerodynamicCoeffs: - serializedContents: - - 0.1 - - 1 - - 1 - - 0.099999994 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - m_AlignBytes: 16 + batches: [] chainConstraintsData: batches: [] volumeConstraintsData: @@ -2318,12 +1848,12 @@ MonoBehaviour: outTangent: {x: -0.004487418, y: 0.35511988, z: 0} - tangentMode: 0 inTangent: {x: -0.042096525, y: -0.31926423, z: 0} - position: {x: -0.28939134, y: -0.62231326, z: 0} + position: {x: -0.29045326, y: -0.62231326, z: 0} outTangent: {x: 0.03052252, y: 0.23148584, z: 0} - tangentMode: 0 - inTangent: {x: -0.076556884, y: -0.16405949, z: -0} + inTangent: {x: -0.06755149, y: -0.16796803, z: 0} position: {x: -0.24022967, y: -0.013745427, z: 0} - outTangent: {x: 0.11562002, y: 0.2477708, z: 0} + outTangent: {x: 0.09870601, y: 0.2454343, z: -0} - tangentMode: 0 inTangent: {x: -0.37514892, y: 0.274398, z: -0} position: {x: 2.0035534, y: 0.04992962, z: 0} @@ -2334,8 +1864,8 @@ MonoBehaviour: outTangent: {x: -0.00857234, y: -0.08916843, z: 0} - tangentMode: 0 inTangent: {x: -0.00015902519, y: 0.008308649, z: 0} - position: {x: 2.2181082, y: -1.9501454, z: 0} - outTangent: {x: 0.0047840523, y: -0.24995418, z: 0} + position: {x: 2.2181082, y: -1.9423363, z: 0} + outTangent: {x: 0.0047840523, y: -0.24995418, z: -0} m_Normals: data: - {x: 0, y: 1, z: 0} @@ -2433,112 +1963,112 @@ MonoBehaviour: - 1.6819742 - 1.7316145 - 1.7810686 - - 1.8317165 - - 1.8821856 - - 1.9324692 - - 1.9825602 - - 2.0324507 - - 2.0821328 - - 2.1315982 - - 2.1808393 - - 2.2298481 - - 2.2786179 - - 2.3271425 - - 2.3754168 - - 2.4234369 - - 2.471201 - - 2.5187082 - - 2.565961 - - 2.612963 - - 2.6597211 - - 2.7062454 - - 2.752549 - - 2.7986484 - - 2.831807 - - 2.864591 - - 2.897021 - - 2.929107 - - 2.960848 - - 2.9922366 - - 3.0232577 - - 3.0538924 - - 3.0841188 - - 3.1139145 - - 3.1432579 - - 3.1721313 - - 3.2005231 - - 3.2284303 - - 3.255861 - - 3.2828388 - - 3.3094049 - - 3.335622 - - 3.3615782 - - 3.3873882 - - 3.4131968 - - 3.4573665 - - 3.5149012 - - 3.5873144 - - 3.674112 - - 3.774054 - - 3.8855855 - - 4.007001 - - 4.1365166 - - 4.272305 - - 4.4125156 - - 4.5552864 - - 4.698753 - - 4.841055 - - 4.9803467 - - 5.114805 - - 5.242646 - - 5.362149 - - 5.471695 - - 5.569848 - - 5.6555047 - - 5.7282257 - - 5.7910023 - - 5.8537416 - - 5.9172816 - - 5.9822245 - - 6.0489507 - - 6.1176496 - - 6.1883507 - - 6.2609572 - - 6.335272 - - 6.411019 - - 6.487863 - - 6.565421 - - 6.643273 - - 6.720969 - - 6.7980375 - - 6.8739877 - - 6.9483147 - - 7.0205026 - - 7.0900273 - - 7.1563587 - - 7.218963 - - 7.2343645 - - 7.254603 - - 7.279116 - - 7.3073378 - - 7.3387012 - - 7.3726387 - - 7.408582 - - 7.4459634 - - 7.4842143 - - 7.5227666 - - 7.5610523 - - 7.5985026 - - 7.634549 - - 7.6686234 - - 7.700157 - - 7.7285814 - - 7.7533283 - - 7.773829 - - 7.7895155 - - 7.799819 - - 7.804171 - m_TotalSplineLenght: 7.804171 + - 1.8317167 + - 1.8821862 + - 1.9324706 + - 1.9825627 + - 2.0324547 + - 2.0821385 + - 2.1316059 + - 2.1808486 + - 2.229859 + - 2.2786303 + - 2.3271558 + - 2.3754306 + - 2.4234507 + - 2.4712138 + - 2.5187197 + - 2.5659702 + - 2.6129696 + - 2.6597252 + - 2.706247 + - 2.7525487 + - 2.7986474 + - 2.8317878 + - 2.8645167 + - 2.896855 + - 2.9288154 + - 2.960403 + - 2.9916165 + - 3.0224502 + - 3.0528944 + - 3.082937 + - 3.1125655 + - 3.1417682 + - 3.1705356 + - 3.1988626 + - 3.2267504 + - 3.2542086 + - 3.2812576 + - 3.3079312 + - 3.3342783 + - 3.3603663 + - 3.3862824 + - 3.4121354 + - 3.454768 + - 3.510719 + - 3.5818093 + - 3.6676068 + - 3.7668674 + - 3.8780124 + - 3.9993064 + - 4.128933 + - 4.265031 + - 4.405716 + - 4.5490923 + - 4.693261 + - 4.836329 + - 4.976415 + - 5.1116633 + - 5.2402554 + - 5.3604364 + - 5.4705553 + - 5.5691433 + - 5.6550694 + - 5.727879 + - 5.7906556 + - 5.853395 + - 5.916935 + - 5.981878 + - 6.048604 + - 6.117303 + - 6.188004 + - 6.2606106 + - 6.334925 + - 6.410672 + - 6.4875164 + - 6.5650744 + - 6.642926 + - 6.7206225 + - 6.797691 + - 6.873641 + - 6.947968 + - 7.020156 + - 7.0896807 + - 7.156012 + - 7.2186165 + - 7.2339664 + - 7.2540574 + - 7.278337 + - 7.3062496 + - 7.337238 + - 7.3707447 + - 7.406212 + - 7.4430814 + - 7.4807954 + - 7.5187955 + - 7.556524 + - 7.593422 + - 7.6289315 + - 7.662494 + - 7.6935515 + - 7.721545 + - 7.745917 + - 7.7661085 + - 7.7815614 + - 7.791717 + - 7.7960176 + m_TotalSplineLenght: 7.7960176 OnPathChanged: m_PersistentCalls: m_Calls: [] @@ -2553,10 +2083,9 @@ MonoBehaviour: m_Calls: [] thickness: 0.05 resolution: 0.3 - m_InterParticleDistance: 0.15608342 + m_InterParticleDistance: 0.15592036 totalParticles: 151 - m_RestLength: 23.405613 - deformableEdges: 000000000100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000a0000000a0000000b0000000b0000000c0000000c0000000d0000000d0000000e0000000e0000000f0000000f00000010000000100000001100000011000000120000001200000013000000130000001400000014000000150000001500000016000000160000001700000017000000180000001800000019000000190000001a0000001a0000001b0000001b0000001c0000001c0000001d0000001d0000001e0000001e0000001f0000001f00000020000000200000002100000021000000220000002200000023000000230000002400000024000000250000002500000026000000260000002700000027000000280000002800000029000000290000002a0000002a0000002b0000002b0000002c0000002c0000002d0000002d0000002e0000002e0000002f0000002f0000003000000030000000310000003100000032000000 + m_RestLength: 23.380884 restLengths: - 0.1507261 - 0.15123467 @@ -2570,31 +2099,31 @@ MonoBehaviour: - 0.14655447 - 0.146547 - 0.146539 - - 0.14537738 - - 0.1453759 - - 0.1453736 - - 0.1453681 - - 0.14536066 - - 0.14534824 - - 0.14533304 - - 0.15357469 - - 0.15364002 - - 0.15353157 - - 0.15287247 - - 0.16127203 - - 0.16471474 - - 0.16590177 - - 0.16516913 - - 0.16577673 - - 0.16574559 - - 0.16543151 - - 0.16553983 - - 0.16564094 - - 0.16553965 - - 0.1649676 - - 0.1661948 - - 0.164499 - - 0.16432038 + - 0.14537717 + - 0.145376 + - 0.14537315 + - 0.14536862 + - 0.14536047 + - 0.14534782 + - 0.14533179 + - 0.15333234 + - 0.15336941 + - 0.15329686 + - 0.15281764 + - 0.16120628 + - 0.16455178 + - 0.16564642 + - 0.16537806 + - 0.16589169 + - 0.16580167 + - 0.16541299 + - 0.1656078 + - 0.16568695 + - 0.16556904 + - 0.164986 + - 0.16632591 + - 0.16450676 + - 0.16437778 - 0.1647215 - 0.16523813 - 0.16536571 @@ -2604,110 +2133,110 @@ MonoBehaviour: - 0.1657586 - 0.16586185 - 0.1652724 - - 0.14609504 - - 0.1464947 - - 0.14654693 - - 0.1460539 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 - - 0.15608342 + - 0.14413904 + - 0.14454886 + - 0.14459378 + - 0.14410257 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 + - 0.15592036 - 0 pooledParticles: 100 --- !u!114 &221160992778322150 diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/CuttableRope.asset b/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/CuttableRope.asset index c8755b429..144451914 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/CuttableRope.asset +++ b/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/CuttableRope.asset @@ -40,61 +40,59 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 8f7e67b5626124d0db9886e6cd2aacff, type: 3} m_Name: CuttableRope m_EditorClassIdentifier: - m_Checksum: 2449783092 m_Empty: 0 - m_Edited: 0 m_ActiveParticleCount: 47 m_InitialActiveParticleCount: 47 _bounds: - m_Center: {x: 0, y: -1.1317979, z: 0} - m_Extent: {x: 1, y: 1.1317979, z: 0} + m_Center: {x: 0, y: -1.1273527, z: 0} + m_Extent: {x: 1, y: 1.1273527, z: 0} positions: - {x: -1, y: 0, z: 0} - - {x: -0.9775765, y: -0.11555687, z: 0} - - {x: -0.9593011, y: -0.23207563, z: 0} - - {x: -0.9436838, y: -0.34862915, z: 0} - - {x: -0.9295727, y: -0.46546358, z: 0} - - {x: -0.9161487, y: -0.5825332, z: 0} - - {x: -0.9027507, y: -0.69973963, z: 0} - - {x: -0.8888033, y: -0.8169358, z: 0} - - {x: -0.8737717, y: -0.9339388, z: 0} - - {x: -0.8571179, y: -1.0506083, z: 0} - - {x: -0.8382302, y: -1.167062, z: 0} - - {x: -0.8164768, y: -1.2830523, z: 0} - - {x: -0.7911396, y: -1.3982471, z: 0} - - {x: -0.7613677, y: -1.5122539, z: 0} - - {x: -0.7261233, y: -1.624567, z: 0} - - {x: -0.6841257, y: -1.7344677, z: 0} - - {x: -0.6338141, y: -1.8408433, z: 0} - - {x: -0.57337433, y: -1.9419466, z: 0} - - {x: -0.5011298, y: -2.0349202, z: 0} - - {x: -0.41592625, y: -2.11611, z: 0} - - {x: -0.31821865, y: -2.1813877, z: 0} - - {x: -0.21035275, y: -2.2277777, z: 0} - - {x: -0.095846556, y: -2.2546525, z: 0} - - {x: 0.022092208, y: -2.2635958, z: 0} - - {x: 0.13886301, y: -2.2553437, z: 0} - - {x: 0.25176537, y: -2.2271554, z: 0} - - {x: 0.35696575, y: -2.1777713, z: 0} - - {x: 0.4507142, y: -2.1088622, z: 0} - - {x: 0.531107, y: -2.024545, z: 0} - - {x: 0.5984538, y: -1.9294598, z: 0} - - {x: 0.6543842, y: -1.8272991, z: 0} - - {x: 0.70086133, y: -1.7205061, z: 0} - - {x: 0.7396646, y: -1.610593, z: 0} - - {x: 0.77225053, y: -1.4985195, z: 0} - - {x: 0.79977673, y: -1.3849562, z: 0} - - {x: 0.82317114, y: -1.270426, z: 0} - - {x: 0.843188, y: -1.15543, z: 0} - - {x: 0.86053014, y: -1.0400072, z: 0} - - {x: 0.8758011, y: -0.92415375, z: 0} - - {x: 0.8895153, y: -0.80814165, z: 0} - - {x: 0.90218335, y: -0.6922063, z: 0} - - {x: 0.914356, y: -0.5764237, z: 0} - - {x: 0.9267438, y: -0.46003297, z: 0} - - {x: 0.94006056, y: -0.34379828, z: 0} - - {x: 0.955386, y: -0.2279308, z: 0} - - {x: 0.97439444, y: -0.11287492, z: 0} + - {x: -0.97762287, y: -0.11522584, z: 0} + - {x: -0.95936936, y: -0.23137596, z: 0} + - {x: -0.9437566, y: -0.34758952, z: 0} + - {x: -0.92964494, y: -0.46408504, z: 0} + - {x: -0.9162184, y: -0.5808135, z: 0} + - {x: -0.9028167, y: -0.69767493, z: 0} + - {x: -0.8888646, y: -0.8145225, z: 0} + - {x: -0.87382543, y: -0.9311737, z: 0} + - {x: -0.85715926, y: -1.047494, z: 0} + - {x: -0.83825207, y: -1.1635969, z: 0} + - {x: -0.81646955, y: -1.2792301, z: 0} + - {x: -0.7910905, y: -1.3940624, z: 0} + - {x: -0.76125896, y: -1.5076991, z: 0} + - {x: -0.72593284, y: -1.6196305, z: 0} + - {x: -0.6838275, y: -1.7291285, z: 0} + - {x: -0.63338226, y: -1.8350657, z: 0} + - {x: -0.57281363, y: -1.9356464, z: 0} + - {x: -0.50040925, y: -2.0280955, z: 0} + - {x: -0.4151265, y: -2.1086814, z: 0} + - {x: -0.31745207, y: -2.17337, z: 0} + - {x: -0.20975508, y: -2.2192795, z: 0} + - {x: -0.09552427, y: -2.2458577, z: 0} + - {x: 0.022092208, y: -2.2547054, z: 0} + - {x: 0.13853739, y: -2.2465513, z: 0} + - {x: 0.25116643, y: -2.2186759, z: 0} + - {x: 0.35621136, y: -2.1697896, z: 0} + - {x: 0.44994435, y: -2.1014705, z: 0} + - {x: 0.5304258, y: -2.0177364, z: 0} + - {x: 0.5979065, y: -1.923179, z: 0} + - {x: 0.65397346, y: -1.8214862, z: 0} + - {x: 0.7005688, y: -1.7151183, z: 0} + - {x: 0.7394668, y: -1.6056024, z: 0} + - {x: 0.772125, y: -1.4939107, z: 0} + - {x: 0.79970485, y: -1.3807198, z: 0} + - {x: 0.82313854, y: -1.2665546, z: 0} + - {x: 0.8431833, y: -1.1519176, z: 0} + - {x: 0.8605447, y: -1.0368524, z: 0} + - {x: 0.87582904, y: -0.9213535, z: 0} + - {x: 0.8895526, y: -0.80569303, z: 0} + - {x: 0.9022278, y: -0.6901039, z: 0} + - {x: 0.91440463, y: -0.5746819, z: 0} + - {x: 0.9267968, y: -0.45864666, z: 0} + - {x: 0.9401173, y: -0.34276536, z: 0} + - {x: 0.95544344, y: -0.22725037, z: 0} + - {x: 0.9744411, y: -0.112545475, z: 0} - {x: 1, y: 0, z: 0} - {x: 0, y: 0, z: 0} - {x: 0, y: 0, z: 0} @@ -198,51 +196,51 @@ MonoBehaviour: - {x: 0, y: 0, z: 0} restPositions: - {x: -1, y: 0, z: 0, w: 1} - - {x: -0.9775765, y: -0.11555687, z: 0, w: 1} - - {x: -0.9593011, y: -0.23207563, z: 0, w: 1} - - {x: -0.9436838, y: -0.34862915, z: 0, w: 1} - - {x: -0.9295727, y: -0.46546358, z: 0, w: 1} - - {x: -0.9161487, y: -0.5825332, z: 0, w: 1} - - {x: -0.9027507, y: -0.69973963, z: 0, w: 1} - - {x: -0.8888033, y: -0.8169358, z: 0, w: 1} - - {x: -0.8737717, y: -0.9339388, z: 0, w: 1} - - {x: -0.8571179, y: -1.0506083, z: 0, w: 1} - - {x: -0.8382302, y: -1.167062, z: 0, w: 1} - - {x: -0.8164768, y: -1.2830523, z: 0, w: 1} - - {x: -0.7911396, y: -1.3982471, z: 0, w: 1} - - {x: -0.7613677, y: -1.5122539, z: 0, w: 1} - - {x: -0.7261233, y: -1.624567, z: 0, w: 1} - - {x: -0.6841257, y: -1.7344677, z: 0, w: 1} - - {x: -0.6338141, y: -1.8408433, z: 0, w: 1} - - {x: -0.57337433, y: -1.9419466, z: 0, w: 1} - - {x: -0.5011298, y: -2.0349202, z: 0, w: 1} - - {x: -0.41592625, y: -2.11611, z: 0, w: 1} - - {x: -0.31821865, y: -2.1813877, z: 0, w: 1} - - {x: -0.21035275, y: -2.2277777, z: 0, w: 1} - - {x: -0.095846556, y: -2.2546525, z: 0, w: 1} - - {x: 0.022092208, y: -2.2635958, z: 0, w: 1} - - {x: 0.13886301, y: -2.2553437, z: 0, w: 1} - - {x: 0.25176537, y: -2.2271554, z: 0, w: 1} - - {x: 0.35696575, y: -2.1777713, z: 0, w: 1} - - {x: 0.4507142, y: -2.1088622, z: 0, w: 1} - - {x: 0.531107, y: -2.024545, z: 0, w: 1} - - {x: 0.5984538, y: -1.9294598, z: 0, w: 1} - - {x: 0.6543842, y: -1.8272991, z: 0, w: 1} - - {x: 0.70086133, y: -1.7205061, z: 0, w: 1} - - {x: 0.7396646, y: -1.610593, z: 0, w: 1} - - {x: 0.77225053, y: -1.4985195, z: 0, w: 1} - - {x: 0.79977673, y: -1.3849562, z: 0, w: 1} - - {x: 0.82317114, y: -1.270426, z: 0, w: 1} - - {x: 0.843188, y: -1.15543, z: 0, w: 1} - - {x: 0.86053014, y: -1.0400072, z: 0, w: 1} - - {x: 0.8758011, y: -0.92415375, z: 0, w: 1} - - {x: 0.8895153, y: -0.80814165, z: 0, w: 1} - - {x: 0.90218335, y: -0.6922063, z: 0, w: 1} - - {x: 0.914356, y: -0.5764237, z: 0, w: 1} - - {x: 0.9267438, y: -0.46003297, z: 0, w: 1} - - {x: 0.94006056, y: -0.34379828, z: 0, w: 1} - - {x: 0.955386, y: -0.2279308, z: 0, w: 1} - - {x: 0.97439444, y: -0.11287492, z: 0, w: 1} + - {x: -0.97762287, y: -0.11522584, z: 0, w: 1} + - {x: -0.95936936, y: -0.23137596, z: 0, w: 1} + - {x: -0.9437566, y: -0.34758952, z: 0, w: 1} + - {x: -0.92964494, y: -0.46408504, z: 0, w: 1} + - {x: -0.9162184, y: -0.5808135, z: 0, w: 1} + - {x: -0.9028167, y: -0.69767493, z: 0, w: 1} + - {x: -0.8888646, y: -0.8145225, z: 0, w: 1} + - {x: -0.87382543, y: -0.9311737, z: 0, w: 1} + - {x: -0.85715926, y: -1.047494, z: 0, w: 1} + - {x: -0.83825207, y: -1.1635969, z: 0, w: 1} + - {x: -0.81646955, y: -1.2792301, z: 0, w: 1} + - {x: -0.7910905, y: -1.3940624, z: 0, w: 1} + - {x: -0.76125896, y: -1.5076991, z: 0, w: 1} + - {x: -0.72593284, y: -1.6196305, z: 0, w: 1} + - {x: -0.6838275, y: -1.7291285, z: 0, w: 1} + - {x: -0.63338226, y: -1.8350657, z: 0, w: 1} + - {x: -0.57281363, y: -1.9356464, z: 0, w: 1} + - {x: -0.50040925, y: -2.0280955, z: 0, w: 1} + - {x: -0.4151265, y: -2.1086814, z: 0, w: 1} + - {x: -0.31745207, y: -2.17337, z: 0, w: 1} + - {x: -0.20975508, y: -2.2192795, z: 0, w: 1} + - {x: -0.09552427, y: -2.2458577, z: 0, w: 1} + - {x: 0.022092208, y: -2.2547054, z: 0, w: 1} + - {x: 0.13853739, y: -2.2465513, z: 0, w: 1} + - {x: 0.25116643, y: -2.2186759, z: 0, w: 1} + - {x: 0.35621136, y: -2.1697896, z: 0, w: 1} + - {x: 0.44994435, y: -2.1014705, z: 0, w: 1} + - {x: 0.5304258, y: -2.0177364, z: 0, w: 1} + - {x: 0.5979065, y: -1.923179, z: 0, w: 1} + - {x: 0.65397346, y: -1.8214862, z: 0, w: 1} + - {x: 0.7005688, y: -1.7151183, z: 0, w: 1} + - {x: 0.7394668, y: -1.6056024, z: 0, w: 1} + - {x: 0.772125, y: -1.4939107, z: 0, w: 1} + - {x: 0.79970485, y: -1.3807198, z: 0, w: 1} + - {x: 0.82313854, y: -1.2665546, z: 0, w: 1} + - {x: 0.8431833, y: -1.1519176, z: 0, w: 1} + - {x: 0.8605447, y: -1.0368524, z: 0, w: 1} + - {x: 0.87582904, y: -0.9213535, z: 0, w: 1} + - {x: 0.8895526, y: -0.80569303, z: 0, w: 1} + - {x: 0.9022278, y: -0.6901039, z: 0, w: 1} + - {x: 0.91440463, y: -0.5746819, z: 0, w: 1} + - {x: 0.9267968, y: -0.45864666, z: 0, w: 1} + - {x: 0.9401173, y: -0.34276536, z: 0, w: 1} + - {x: 0.95544344, y: -0.22725037, z: 0, w: 1} + - {x: 0.9744411, y: -0.112545475, z: 0, w: 1} - {x: 1, y: 0, z: 0, w: 1} - {x: 0, y: 0, z: 0, w: 0} - {x: 0, y: 0, z: 0, w: 0} @@ -344,7 +342,6 @@ MonoBehaviour: - {x: 0, y: 0, z: 0, w: 0} - {x: 0, y: 0, z: 0, w: 0} - {x: 0, y: 0, z: 0, w: 0} - restNormals: [] orientations: [] restOrientations: [] velocities: @@ -503,13 +500,13 @@ MonoBehaviour: - 9.999999 - 10.000001 - 10 - - 10 - - 10 + - 10.000001 - 9.999999 - - 10.000001 - - 10.000001 - - 9.999998 - - 10.000001 + - 10 + - 10 + - 10 + - 10 + - 10 - 9.999999 - 9.999999 - 9.999999 @@ -648,52 +645,52 @@ MonoBehaviour: filters: 0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 principalRadii: - {x: 0.029999997, y: 0.029999997, z: 0.029999997} - - {x: 0.029992742, y: 0.029992742, z: 0.029992742} - - {x: 0.029973708, y: 0.029973708, z: 0.029973708} - - {x: 0.029945929, y: 0.029945929, z: 0.029945929} - - {x: 0.02991121, y: 0.02991121, z: 0.02991121} - - {x: 0.029870836, y: 0.029870836, z: 0.029870836} - - {x: 0.029825734, y: 0.029825734, z: 0.029825734} - - {x: 0.029776635, y: 0.029776635, z: 0.029776635} - - {x: 0.029724149, y: 0.029724149, z: 0.029724149} - - {x: 0.02966876, y: 0.02966876, z: 0.02966876} - - {x: 0.029610759, y: 0.029610759, z: 0.029610759} - - {x: 0.029550549, y: 0.029550549, z: 0.029550549} - - {x: 0.029488528, y: 0.029488528, z: 0.029488528} - - {x: 0.02942514, y: 0.02942514, z: 0.02942514} - - {x: 0.029360859, y: 0.029360859, z: 0.029360859} - - {x: 0.029296285, y: 0.029296285, z: 0.029296285} - - {x: 0.029232267, y: 0.029232267, z: 0.029232267} - - {x: 0.029170081, y: 0.029170081, z: 0.029170081} - - {x: 0.029111749, y: 0.029111749, z: 0.029111749} - - {x: 0.029059907, y: 0.029059907, z: 0.029059907} - - {x: 0.029017618, y: 0.029017618, z: 0.029017618} - - {x: 0.028987262, y: 0.028987262, z: 0.028987262} - - {x: 0.028969677, y: 0.028969677, z: 0.028969677} + - {x: 0.029992776, y: 0.029992776, z: 0.029992776} + - {x: 0.029973807, y: 0.029973807, z: 0.029973807} + - {x: 0.029946083, y: 0.029946083, z: 0.029946083} + - {x: 0.029911412, y: 0.029911412, z: 0.029911412} + - {x: 0.029871061, y: 0.029871061, z: 0.029871061} + - {x: 0.029825961, y: 0.029825961, z: 0.029825961} + - {x: 0.029776854, y: 0.029776854, z: 0.029776854} + - {x: 0.029724332, y: 0.029724332, z: 0.029724332} + - {x: 0.029668894, y: 0.029668894, z: 0.029668894} + - {x: 0.029610826, y: 0.029610826, z: 0.029610826} + - {x: 0.029550528, y: 0.029550528, z: 0.029550528} + - {x: 0.029488418, y: 0.029488418, z: 0.029488418} + - {x: 0.029424926, y: 0.029424926, z: 0.029424926} + - {x: 0.029360538, y: 0.029360538, z: 0.029360538} + - {x: 0.029295865, y: 0.029295865, z: 0.029295865} + - {x: 0.029231772, y: 0.029231772, z: 0.029231772} + - {x: 0.029169565, y: 0.029169565, z: 0.029169565} + - {x: 0.02911124, y: 0.02911124, z: 0.02911124} + - {x: 0.029059494, y: 0.029059494, z: 0.029059494} + - {x: 0.029017346, y: 0.029017346, z: 0.029017346} + - {x: 0.028987132, y: 0.028987132, z: 0.028987132} + - {x: 0.028969646, y: 0.028969646, z: 0.028969646} - {x: 0.028964136, y: 0.028964136, z: 0.028964136} - - {x: 0.028969733, y: 0.028969733, z: 0.028969733} - - {x: 0.02898749, y: 0.02898749, z: 0.02898749} - - {x: 0.029017903, y: 0.029017903, z: 0.029017903} - - {x: 0.029059635, y: 0.029059635, z: 0.029059635} - - {x: 0.029109906, y: 0.029109906, z: 0.029109906} - - {x: 0.02916572, y: 0.02916572, z: 0.02916572} - - {x: 0.029224731, y: 0.029224731, z: 0.029224731} - - {x: 0.029285384, y: 0.029285384, z: 0.029285384} - - {x: 0.029346699, y: 0.029346699, z: 0.029346699} - - {x: 0.029408017, y: 0.029408017, z: 0.029408017} - - {x: 0.029468851, y: 0.029468851, z: 0.029468851} - - {x: 0.029528778, y: 0.029528778, z: 0.029528778} - - {x: 0.029587386, y: 0.029587386, z: 0.029587386} - - {x: 0.029644474, y: 0.029644474, z: 0.029644474} - - {x: 0.029699815, y: 0.029699815, z: 0.029699815} - - {x: 0.02975299, y: 0.02975299, z: 0.02975299} - - {x: 0.029803533, y: 0.029803533, z: 0.029803533} - - {x: 0.029850937, y: 0.029850937, z: 0.029850937} - - {x: 0.029894827, y: 0.029894827, z: 0.029894827} - - {x: 0.029933902, y: 0.029933902, z: 0.029933902} - - {x: 0.029966593, y: 0.029966593, z: 0.029966593} - - {x: 0.029990276, y: 0.029990276, z: 0.029990276} - - {x: 0.03, y: 0.03, z: 0.03} + - {x: 0.0289697, y: 0.0289697, z: 0.0289697} + - {x: 0.028987357, y: 0.028987357, z: 0.028987357} + - {x: 0.029017627, y: 0.029017627, z: 0.029017627} + - {x: 0.029059224, y: 0.029059224, z: 0.029059224} + - {x: 0.029109413, y: 0.029109413, z: 0.029109413} + - {x: 0.029165206, y: 0.029165206, z: 0.029165206} + - {x: 0.029224247, y: 0.029224247, z: 0.029224247} + - {x: 0.029284962, y: 0.029284962, z: 0.029284962} + - {x: 0.029346356, y: 0.029346356, z: 0.029346356} + - {x: 0.02940776, y: 0.02940776, z: 0.02940776} + - {x: 0.029468678, y: 0.029468678, z: 0.029468678} + - {x: 0.029528687, y: 0.029528687, z: 0.029528687} + - {x: 0.029587371, y: 0.029587371, z: 0.029587371} + - {x: 0.029644525, y: 0.029644525, z: 0.029644525} + - {x: 0.02969992, y: 0.02969992, z: 0.02969992} + - {x: 0.029753137, y: 0.029753137, z: 0.029753137} + - {x: 0.029803708, y: 0.029803708, z: 0.029803708} + - {x: 0.02985112, y: 0.02985112, z: 0.02985112} + - {x: 0.029894998, y: 0.029894998, z: 0.029894998} + - {x: 0.029934045, y: 0.029934045, z: 0.029934045} + - {x: 0.02996669, y: 0.02996669, z: 0.02996669} + - {x: 0.029990312, y: 0.029990312, z: 0.029990312} + - {x: 0.029999997, y: 0.029999997, z: 0.029999997} - {x: 0, y: 0, z: 0} - {x: 0, y: 0, z: 0} - {x: 0, y: 0, z: 0} @@ -798,16 +795,16 @@ MonoBehaviour: - {r: 1, g: 1, b: 1, a: 1} - {r: 1, g: 1, b: 1, a: 1} - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 0.99999994, g: 0.99999994, b: 0.99999994, a: 0.99999994} - - {r: 0.99999994, g: 0.99999994, b: 0.99999994, a: 0.99999994} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - {r: 0.99999994, g: 0.99999994, b: 0.99999994, a: 0.99999994} - {r: 0.99999994, g: 0.99999994, b: 0.99999994, a: 0.99999994} - - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - {r: 0.99999994, g: 0.99999994, b: 0.99999994, a: 0.99999994} + - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} + - {r: 1, g: 1, b: 1, a: 1} + - {r: 1, g: 1, b: 1, a: 1} + - {r: 1, g: 1, b: 1, a: 1} + - {r: 1, g: 1, b: 1, a: 1} + - {r: 1, g: 1, b: 1, a: 1} - {r: 1, g: 1, b: 1, a: 1} - {r: 1, g: 1, b: 1, a: 1} - {r: 1, g: 1, b: 1, a: 1} @@ -960,29 +957,29 @@ MonoBehaviour: m_AlignBytes: 16 restLengths: serializedContents: - - 0.11771238 - - 0.117595166 - - 0.11783673 - - 0.11802316 - - 0.1178521 - - 0.11801252 - - 0.11783 - - 0.117651865 - - 0.117791526 - - 0.11769215 - - 0.11741844 - - 0.11827736 - - 0.11636803 - - 0.11634967 - - 0.11651943 - - 0.11646836 - - 0.11671458 - - 0.11689511 - - 0.11671828 - - 0.11681989 - - 0.11642074 - - 0.11699504 - - 0.11661551 + - 0.11737857 + - 0.117257625 + - 0.11749813 + - 0.1176776 + - 0.117508255 + - 0.11766701 + - 0.11748713 + - 0.11731443 + - 0.117409684 + - 0.1173339 + - 0.11707407 + - 0.11794879 + - 0.116027325 + - 0.11598866 + - 0.11616688 + - 0.116126075 + - 0.116368376 + - 0.11654539 + - 0.116367616 + - 0.11647182 + - 0.11606255 + - 0.116644375 + - 0.116267465 - 0 - 0 - 0 @@ -1123,29 +1120,29 @@ MonoBehaviour: m_AlignBytes: 16 restLengths: serializedContents: - - 0.11794325 - - 0.11768351 - - 0.117969744 - - 0.11796464 - - 0.117975526 - - 0.11794836 - - 0.117713265 - - 0.117673375 - - 0.11774277 - - 0.11750718 - - 0.1176177 - - 0.11706203 - - 0.11621493 - - 0.11650062 - - 0.11646894 - - 0.11656151 - - 0.11685168 - - 0.1167252 - - 0.11685561 - - 0.11662538 - - 0.117048115 - - 0.11687661 - - 0.11574278 + - 0.11757569 + - 0.117347114 + - 0.117627345 + - 0.11761664 + - 0.11763225 + - 0.117603354 + - 0.11737358 + - 0.117334664 + - 0.117427535 + - 0.11715327 + - 0.11728205 + - 0.11673033 + - 0.115863316 + - 0.11614065 + - 0.11612464 + - 0.1162187 + - 0.11650247 + - 0.11637627 + - 0.116505764 + - 0.11628203 + - 0.11669507 + - 0.11652727 + - 0.115411185 - 0 - 0 - 0 @@ -1288,22 +1285,22 @@ MonoBehaviour: m_AlignBytes: 16 restBends: serializedContents: - - 0.0014194542 - - 0.00024210926 - - 0.00036713024 - - 0.00096763717 - - 0.0019094545 - - 0.003806077 - - 0.0067459983 - - 0.0060856836 - - 0.0075172884 - - 0.0056384974 - - 0.002761265 - - 0.0014144753 - - 0.00070518616 - - 0.00017277346 - - 0.00068064017 - - 0.34393272 + - 0.001408647 + - 0.00024118213 + - 0.00036826893 + - 0.00097113923 + - 0.0019177926 + - 0.0038177262 + - 0.006718761 + - 0.0060169417 + - 0.007446072 + - 0.0056387554 + - 0.0027720614 + - 0.0014197745 + - 0.0007073063 + - 0.00017521733 + - 0.0006796378 + - 0.34390527 - 0 - 0 - 0 @@ -1455,21 +1452,21 @@ MonoBehaviour: m_AlignBytes: 16 restBends: serializedContents: - - 0.0008860987 - - 0.000046456917 - - 0.0005520998 - - 0.0012237206 - - 0.0023903253 - - 0.004777825 - - 0.00714873 - - 0.0057450277 - - 0.007545219 - - 0.004477086 - - 0.0021940076 - - 0.0011364776 - - 0.00052166363 - - 0.00021504326 - - 0.0012570723 + - 0.0008804953 + - 0.000045054567 + - 0.000553439 + - 0.0012282074 + - 0.002400889 + - 0.0047867075 + - 0.007095421 + - 0.0056808805 + - 0.0074951337 + - 0.0044868477 + - 0.0022027292 + - 0.001140577 + - 0.0005230716 + - 0.00021661723 + - 0.0012532381 - 0.33333334 - 0 - 0 @@ -1619,21 +1616,21 @@ MonoBehaviour: m_AlignBytes: 16 restBends: serializedContents: - - 0.0005107663 - - 0.0001831381 - - 0.00074805453 - - 0.0015303227 - - 0.0030102404 - - 0.00583854 - - 0.0068715047 - - 0.006769389 - - 0.006796895 - - 0.003509056 - - 0.0017582284 - - 0.0009028378 - - 0.00034968293 - - 0.0003139878 - - 0.002316105 + - 0.0005091331 + - 0.00018352199 + - 0.0007505444 + - 0.0015367282 + - 0.003022704 + - 0.0058365334 + - 0.0068020825 + - 0.0066956216 + - 0.0067760325 + - 0.0035208783 + - 0.0017649935 + - 0.00090579706 + - 0.00035027033 + - 0.00031363 + - 0.0023024208 - 0 - 0 - 0 @@ -1781,462 +1778,7 @@ MonoBehaviour: shapeMatchingConstraintsData: batches: [] aerodynamicConstraintsData: - batches: - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b0000007c0000007d0000007e0000007f000000800000008100000082000000830000008400000085000000860000008700000088000000890000008a0000008b0000008c0000008d0000008e0000008f000000900000009100000092000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b0000007c0000007d0000007e0000007f000000800000008100000082000000830000008400000085000000860000008700000088000000890000008a0000008b0000008c0000008d0000008e0000008f000000900000009100000092000000 - m_ConstraintCount: 147 - m_ActiveConstraintCount: 47 - m_InitialActiveConstraintCount: 47 - particleIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b0000007c0000007d0000007e0000007f000000800000008100000082000000830000008400000085000000860000008700000088000000890000008a0000008b0000008c0000008d0000008e0000008f000000900000009100000092000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - aerodynamicCoeffs: - serializedContents: - - 0.059999995 - - 1 - - 1 - - 0.059985485 - - 1 - - 1 - - 0.059947416 - - 1 - - 1 - - 0.059891857 - - 1 - - 1 - - 0.05982242 - - 1 - - 1 - - 0.059741672 - - 1 - - 1 - - 0.059651468 - - 1 - - 1 - - 0.05955327 - - 1 - - 1 - - 0.059448298 - - 1 - - 1 - - 0.05933752 - - 1 - - 1 - - 0.059221517 - - 1 - - 1 - - 0.059101097 - - 1 - - 1 - - 0.058977056 - - 1 - - 1 - - 0.05885028 - - 1 - - 1 - - 0.058721717 - - 1 - - 1 - - 0.05859257 - - 1 - - 1 - - 0.058464535 - - 1 - - 1 - - 0.058340162 - - 1 - - 1 - - 0.058223497 - - 1 - - 1 - - 0.058119815 - - 1 - - 1 - - 0.058035236 - - 1 - - 1 - - 0.057974525 - - 1 - - 1 - - 0.057939354 - - 1 - - 1 - - 0.05792827 - - 1 - - 1 - - 0.057939466 - - 1 - - 1 - - 0.05797498 - - 1 - - 1 - - 0.058035806 - - 1 - - 1 - - 0.05811927 - - 1 - - 1 - - 0.058219813 - - 1 - - 1 - - 0.05833144 - - 1 - - 1 - - 0.058449462 - - 1 - - 1 - - 0.05857077 - - 1 - - 1 - - 0.058693398 - - 1 - - 1 - - 0.058816034 - - 1 - - 1 - - 0.058937702 - - 1 - - 1 - - 0.059057556 - - 1 - - 1 - - 0.059174772 - - 1 - - 1 - - 0.05928895 - - 1 - - 1 - - 0.05939963 - - 1 - - 1 - - 0.05950598 - - 1 - - 1 - - 0.059607066 - - 1 - - 1 - - 0.059701875 - - 1 - - 1 - - 0.059789654 - - 1 - - 1 - - 0.059867803 - - 1 - - 1 - - 0.059933186 - - 1 - - 1 - - 0.059980553 - - 1 - - 1 - - 0.06 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - m_AlignBytes: 16 + batches: [] chainConstraintsData: batches: [] volumeConstraintsData: @@ -2258,7 +1800,7 @@ MonoBehaviour: outTangent: {x: 0.1642955, y: -0.7486017, z: 0} - tangentMode: 1 inTangent: {x: -0.962546, y: 0.0066326223, z: 0} - position: {x: 0.022092208, y: -2.2635958, z: 0} + position: {x: 0.022092208, y: -2.2547054, z: 0} outTangent: {x: 0.9498895, y: -0.0065454063, z: 0} - tangentMode: 0 inTangent: {x: -0.1654113, y: -0.6018264, z: 0} @@ -2278,7 +1820,7 @@ MonoBehaviour: data: - 0.99999994 - 0.9654712 - - 1 + - 0.99999994 m_Masses: data: - 0.1 @@ -2294,49 +1836,49 @@ MonoBehaviour: m_Closed: 0 m_ArcLengthTable: - 0 - - 0.113977954 - - 0.2362057 - - 0.36548388 - - 0.50052226 - - 0.6399834 - - 0.78251255 - - 0.92676145 - - 1.0714108 - - 1.2151933 - - 1.3569213 - - 1.4955226 - - 1.630088 - - 1.7599373 - - 1.8847095 - - 2.0044835 - - 2.119928 - - 2.2324593 - - 2.3443565 - - 2.4587455 - - 2.579397 - - 2.7103815 - - 2.8394055 - - 2.9583156 - - 3.0718825 - - 3.184338 - - 3.298952 - - 3.4178705 - - 3.5422046 - - 3.6722372 - - 3.8076396 - - 3.9476476 - - 4.091192 - - 4.2369895 - - 4.383608 - - 4.5295115 - - 4.673094 - - 4.812706 - - 4.9466796 - - 5.0733523 - - 5.1910996 - - 5.298384 - - 5.393842 - m_TotalSplineLenght: 5.393842 + - 0.113920406 + - 0.23598218 + - 0.36499673 + - 0.49968532 + - 0.638722 + - 0.78076386 + - 0.92447466 + - 1.0685471 + - 1.2117265 + - 1.352838 + - 1.490823 + - 1.6247864 + - 1.754063 + - 1.8783082 + - 1.9976172 + - 2.1126747 + - 2.22491 + - 2.336607 + - 2.4508846 + - 2.571493 + - 2.702471 + - 2.8314886 + - 2.950353 + - 3.0638006 + - 3.176043 + - 3.2903454 + - 3.408862 + - 3.5327182 + - 3.6622136 + - 3.7970357 + - 3.9364362 + - 4.07936 + - 4.2245383 + - 4.370552 + - 4.5158772 + - 4.658921 + - 4.798045 + - 4.931594 + - 5.0579166 + - 5.1754003 + - 5.2825193 + - 5.3779206 + m_TotalSplineLenght: 5.3779206 OnPathChanged: m_PersistentCalls: m_Calls: [] @@ -2351,157 +1893,156 @@ MonoBehaviour: m_Calls: [] thickness: 0.03 resolution: 0.25 - m_InterParticleDistance: 0.11725744 + m_InterParticleDistance: 0.116911314 totalParticles: 147 - m_RestLength: 17.117582 - deformableEdges: 000000000100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000a0000000a0000000b0000000b0000000c0000000c0000000d0000000d0000000e0000000e0000000f0000000f00000010000000100000001100000011000000120000001200000013000000130000001400000014000000150000001500000016000000160000001700000017000000180000001800000019000000190000001a0000001a0000001b0000001b0000001c0000001c0000001d0000001d0000001e0000001e0000001f0000001f00000020000000200000002100000021000000220000002200000023000000230000002400000024000000250000002500000026000000260000002700000027000000280000002800000029000000290000002a0000002a0000002b0000002b0000002c0000002c0000002d0000002d0000002e000000 + m_RestLength: 17.067047 restLengths: - - 0.11771238 - - 0.11794325 - - 0.117595166 - - 0.11768351 - - 0.11783673 - - 0.117969744 - - 0.11802316 - - 0.11796464 - - 0.1178521 - - 0.117975526 - - 0.11801252 - - 0.11794836 - - 0.11783 - - 0.117713265 - - 0.117651865 - - 0.117673375 - - 0.117791526 - - 0.11774277 - - 0.11769215 - - 0.11750718 - - 0.11741844 - - 0.1176177 - - 0.11827736 - - 0.11706203 - - 0.11636803 - - 0.11621493 - - 0.11634967 - - 0.11650062 - - 0.11651943 - - 0.11646894 - - 0.11646836 - - 0.11656151 - - 0.11671458 - - 0.11685168 - - 0.11689511 - - 0.1167252 - - 0.11671828 - - 0.11685561 - - 0.11681989 - - 0.11662538 - - 0.11642074 - - 0.117048115 - - 0.11699504 - - 0.11687661 - - 0.11661551 - - 0.11574278 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 - - 0.11725744 + - 0.11737857 + - 0.11757569 + - 0.117257625 + - 0.117347114 + - 0.11749813 + - 0.117627345 + - 0.1176776 + - 0.11761664 + - 0.117508255 + - 0.11763225 + - 0.11766701 + - 0.117603354 + - 0.11748713 + - 0.11737358 + - 0.11731443 + - 0.117334664 + - 0.117409684 + - 0.117427535 + - 0.1173339 + - 0.11715327 + - 0.11707407 + - 0.11728205 + - 0.11794879 + - 0.11673033 + - 0.116027325 + - 0.115863316 + - 0.11598866 + - 0.11614065 + - 0.11616688 + - 0.11612464 + - 0.116126075 + - 0.1162187 + - 0.116368376 + - 0.11650247 + - 0.11654539 + - 0.11637627 + - 0.116367616 + - 0.116505764 + - 0.11647182 + - 0.11628203 + - 0.11606255 + - 0.11669507 + - 0.116644375 + - 0.11652727 + - 0.116267465 + - 0.115411185 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 + - 0.116911314 - 0 pooledParticles: 100 --- !u!114 &5589158130596133390 diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Firehose.asset b/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Firehose.asset index 6c0759535..1ae6e511a 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Firehose.asset +++ b/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Firehose.asset @@ -40,9 +40,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 8f7e67b5626124d0db9886e6cd2aacff, type: 3} m_Name: Firehose m_EditorClassIdentifier: - m_Checksum: 0 m_Empty: 0 - m_Edited: 0 m_ActiveParticleCount: 40 m_InitialActiveParticleCount: 40 _bounds: @@ -130,7 +128,6 @@ MonoBehaviour: - {x: 0.72034454, y: 0, z: 0, w: 1} - {x: 0.8617192, y: 0, z: 0, w: 1} - {x: 1, y: 0, z: 0, w: 1} - restNormals: [] orientations: [] restOrientations: [] velocities: @@ -722,7 +719,6 @@ MonoBehaviour: m_InterParticleDistance: 0.140052 totalParticles: 40 m_RestLength: 5.4620275 - deformableEdges: restLengths: - 0.11343384 - 0.1400795 diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Freightlift cable.asset b/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Freightlift cable.asset index 9abe25e41..822226765 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Freightlift cable.asset +++ b/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Freightlift cable.asset @@ -12,32 +12,30 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 8f7e67b5626124d0db9886e6cd2aacff, type: 3} m_Name: Freightlift cable m_EditorClassIdentifier: - m_Checksum: 3171106762 m_Empty: 0 - m_Edited: 0 m_ActiveParticleCount: 18 m_InitialActiveParticleCount: 18 _bounds: - m_Center: {x: 0, y: 0, z: -0.0004623294} - m_Extent: {x: 1, y: 0, z: 0.0004623294} + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 1, y: 0, z: 0} positions: - {x: -1, y: 0, z: 0} - {x: -0.88329995, y: 0, z: 0} - - {x: -0.76649326, y: 0, z: -0.000036758112} - - {x: -0.64820236, y: 0, z: -0.00011725743} - - {x: -0.53080696, y: 0, z: -0.00021712962} - - {x: -0.412974, y: 0, z: -0.00032654963} - - {x: -0.2950629, y: 0, z: -0.00043869345} - - {x: -0.17718945, y: 0, z: -0.0005487039} - - {x: -0.059382457, y: 0, z: -0.0006525628} - - {x: 0.05835873, y: 0, z: -0.0007464512} - - {x: 0.17614524, y: 0, z: -0.00082634087} - - {x: 0.29400575, y: 0, z: -0.0008873419} - - {x: 0.41192132, y: 0, z: -0.00092308887} - - {x: 0.5298042, y: 0, z: -0.0009246588} - - {x: 0.64736503, y: 0, z: -0.00087855017} - - {x: 0.7652411, y: 0, z: -0.00076061714} - - {x: 0.8829424, y: 0, z: -0.0005206029} + - {x: -0.7666023, y: 0, z: 0} + - {x: -0.64810616, y: 0, z: 0} + - {x: -0.5307922, y: 0, z: 0} + - {x: -0.41302353, y: 0, z: 0} + - {x: -0.2951497, y: 0, z: 0} + - {x: -0.17727831, y: 0, z: 0} + - {x: -0.05943318, y: 0, z: 0} + - {x: 0.058380906, y: 0, z: 0} + - {x: 0.17615423, y: 0, z: 0} + - {x: 0.29385144, y: 0, z: 0} + - {x: 0.41156584, y: 0, z: 0} + - {x: 0.5296772, y: 0, z: 0} + - {x: 0.6477824, y: 0, z: 0} + - {x: 0.76508003, y: 0, z: 0} + - {x: 0.88362336, y: 0, z: 0} - {x: 1, y: 0, z: 0} - {x: 0, y: 0, z: 0} - {x: 0, y: 0, z: 0} @@ -142,21 +140,21 @@ MonoBehaviour: restPositions: - {x: -1, y: 0, z: 0, w: 1} - {x: -0.88329995, y: 0, z: 0, w: 1} - - {x: -0.76649326, y: 0, z: -0.000036758112, w: 1} - - {x: -0.64820236, y: 0, z: -0.00011725743, w: 1} - - {x: -0.53080696, y: 0, z: -0.00021712962, w: 1} - - {x: -0.412974, y: 0, z: -0.00032654963, w: 1} - - {x: -0.2950629, y: 0, z: -0.00043869345, w: 1} - - {x: -0.17718945, y: 0, z: -0.0005487039, w: 1} - - {x: -0.059382457, y: 0, z: -0.0006525628, w: 1} - - {x: 0.05835873, y: 0, z: -0.0007464512, w: 1} - - {x: 0.17614524, y: 0, z: -0.00082634087, w: 1} - - {x: 0.29400575, y: 0, z: -0.0008873419, w: 1} - - {x: 0.41192132, y: 0, z: -0.00092308887, w: 1} - - {x: 0.5298042, y: 0, z: -0.0009246588, w: 1} - - {x: 0.64736503, y: 0, z: -0.00087855017, w: 1} - - {x: 0.7652411, y: 0, z: -0.00076061714, w: 1} - - {x: 0.8829424, y: 0, z: -0.0005206029, w: 1} + - {x: -0.7666023, y: 0, z: 0, w: 1} + - {x: -0.64810616, y: 0, z: 0, w: 1} + - {x: -0.5307922, y: 0, z: 0, w: 1} + - {x: -0.41302353, y: 0, z: 0, w: 1} + - {x: -0.2951497, y: 0, z: 0, w: 1} + - {x: -0.17727831, y: 0, z: 0, w: 1} + - {x: -0.05943318, y: 0, z: 0, w: 1} + - {x: 0.058380906, y: 0, z: 0, w: 1} + - {x: 0.17615423, y: 0, z: 0, w: 1} + - {x: 0.29385144, y: 0, z: 0, w: 1} + - {x: 0.41156584, y: 0, z: 0, w: 1} + - {x: 0.5296772, y: 0, z: 0, w: 1} + - {x: 0.6477824, y: 0, z: 0, w: 1} + - {x: 0.76508003, y: 0, z: 0, w: 1} + - {x: 0.88362336, y: 0, z: 0, w: 1} - {x: 1, y: 0, z: 0, w: 1} - {x: 0, y: 0, z: 0, w: 0} - {x: 0, y: 0, z: 0, w: 0} @@ -258,7 +256,6 @@ MonoBehaviour: - {x: 0, y: 0, z: 0, w: 0} - {x: 0, y: 0, z: 0, w: 0} - {x: 0, y: 0, z: 0, w: 0} - restNormals: [] orientations: [] restOrientations: [] velocities: @@ -759,14 +756,14 @@ MonoBehaviour: restLengths: serializedContents: - 0.11670005 - - 0.11829093 - - 0.11783301 - - 0.1178735 - - 0.11774122 - - 0.117860526 - - 0.11788291 - - 0.11787611 - - 0.11705878 + - 0.11849612 + - 0.117768645 + - 0.1178714 + - 0.11781409 + - 0.11769721 + - 0.11811137 + - 0.11729765 + - 0.11637664 - 0 - 0 - 0 @@ -893,14 +890,14 @@ MonoBehaviour: m_AlignBytes: 16 restLengths: serializedContents: - - 0.11680669 - - 0.117395446 - - 0.11791115 - - 0.117807046 - - 0.11778654 - - 0.11791558 - - 0.11756081 - - 0.11770154 + - 0.11669767 + - 0.11731398 + - 0.11787382 + - 0.11784513 + - 0.117773324 + - 0.117714405 + - 0.11810517 + - 0.11854333 - 0 - 0 - 0 @@ -1028,12 +1025,12 @@ MonoBehaviour: m_AlignBytes: 16 restBends: serializedContents: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 + - 0.000000834465 + - 0.00015157461 + - 0.000008746982 + - 0.000025361776 + - 0.000002026558 + - 0.0007222295 - 0 - 0 - 0 @@ -1165,12 +1162,12 @@ MonoBehaviour: m_AlignBytes: 16 restBends: serializedContents: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 + - 0.0005994439 + - 0.00003501773 + - 0.000010348856 + - 0.000005722046 + - 0.00026917458 + - 0.37212557 - 0 - 0 - 0 @@ -1302,12 +1299,12 @@ MonoBehaviour: m_AlignBytes: 16 restBends: serializedContents: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 + - 0.0003940463 + - 0.0000008046627 + - 0.000013589859 + - 0.00013235211 + - 0.00041520596 + - 0.33333334 - 0 - 0 - 0 @@ -1434,375 +1431,7 @@ MonoBehaviour: shapeMatchingConstraintsData: batches: [] aerodynamicConstraintsData: - batches: - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000 - m_ConstraintCount: 118 - m_ActiveConstraintCount: 18 - m_InitialActiveConstraintCount: 18 - particleIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - aerodynamicCoeffs: - serializedContents: - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - m_AlignBytes: 16 + batches: [] chainConstraintsData: batches: [] volumeConstraintsData: @@ -1827,9 +1456,9 @@ MonoBehaviour: position: {x: -0.88329995, y: 0, z: 0} outTangent: {x: 0.4335778, y: 0, z: 0} - tangentMode: 0 - inTangent: {x: -0.29470557, y: 0, z: -0.0020900369} + inTangent: {x: -0.22383595, y: 0, z: 0} position: {x: 1, y: 0, z: 0} - outTangent: {x: 0.24999344, y: -0, z: 0.0017729407} + outTangent: {x: 0.25, y: -0, z: -0} m_Normals: data: - {x: 0, y: 1, z: 0} @@ -1881,28 +1510,28 @@ MonoBehaviour: - 0.10251689 - 0.1095339 - 0.116700046 - - 0.18337668 - - 0.25884405 - - 0.34207734 - - 0.4320518 - - 0.5277426 - - 0.6281251 - - 0.7321743 - - 0.8388655 - - 0.947174 - - 1.056075 - - 1.1645436 - - 1.2715552 - - 1.3760848 - - 1.4771078 - - 1.5735993 - - 1.6645347 - - 1.748889 - - 1.8256376 - - 1.8937557 - - 1.9522187 - - 2.000002 - m_TotalSplineLenght: 2.000002 + - 0.18383583 + - 0.2605888 + - 0.34579644 + - 0.43829617 + - 0.5369255 + - 0.64052194 + - 0.7479229 + - 0.8579659 + - 0.9694884 + - 1.0813278 + - 1.1923218 + - 1.3013076 + - 1.4071229 + - 1.508605 + - 1.6045915 + - 1.6939198 + - 1.7754273 + - 1.8479517 + - 1.9103302 + - 1.9614005 + - 2 + m_TotalSplineLenght: 2 OnPathChanged: m_PersistentCalls: m_Calls: [] @@ -1917,128 +1546,127 @@ MonoBehaviour: m_Calls: [] thickness: 0.05 resolution: 0.4 - m_InterParticleDistance: 0.11764717 + m_InterParticleDistance: 0.11764706 totalParticles: 118 - m_RestLength: 13.764719 - deformableEdges: 000000000100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000a0000000a0000000b0000000b0000000c0000000c0000000d0000000d0000000e0000000e0000000f0000000f000000100000001000000011000000 + m_RestLength: 13.764717 restLengths: - 0.11670005 - - 0.11680669 - - 0.11829093 - - 0.117395446 - - 0.11783301 - - 0.11791115 - - 0.1178735 - - 0.117807046 - - 0.11774122 - - 0.11778654 - - 0.117860526 - - 0.11791558 - - 0.11788291 - - 0.11756081 - - 0.11787611 - - 0.11770154 - - 0.11705878 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 - - 0.11764717 + - 0.11669767 + - 0.11849612 + - 0.11731398 + - 0.117768645 + - 0.11787382 + - 0.1178714 + - 0.11784513 + - 0.11781409 + - 0.117773324 + - 0.11769721 + - 0.117714405 + - 0.11811137 + - 0.11810517 + - 0.11729765 + - 0.11854333 + - 0.11637664 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 + - 0.11764706 - 0 pooledParticles: 100 --- !u!114 &1023878380947534591 diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Joints rope 1.asset b/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Joints rope 1.asset index e6b720a46..2e25ae882 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Joints rope 1.asset +++ b/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Joints rope 1.asset @@ -40,9 +40,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 8f7e67b5626124d0db9886e6cd2aacff, type: 3} m_Name: Joints rope 1 m_EditorClassIdentifier: - m_Checksum: 3329514432 m_Empty: 0 - m_Edited: 0 m_ActiveParticleCount: 24 m_InitialActiveParticleCount: 24 _bounds: @@ -298,7 +296,6 @@ MonoBehaviour: - {x: 0, y: 0, z: 0, w: 0} - {x: 0, y: 0, z: 0, w: 0} - {x: 0, y: 0, z: 0, w: 0} - restNormals: [] orientations: [] restOrientations: [] velocities: @@ -1528,393 +1525,7 @@ MonoBehaviour: shapeMatchingConstraintsData: batches: [] aerodynamicConstraintsData: - batches: - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b000000 - m_ConstraintCount: 124 - m_ActiveConstraintCount: 24 - m_InitialActiveConstraintCount: 24 - particleIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - aerodynamicCoeffs: - serializedContents: - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - m_AlignBytes: 16 + batches: [] chainConstraintsData: batches: [] volumeConstraintsData: @@ -2096,7 +1707,6 @@ MonoBehaviour: m_InterParticleDistance: 0.09209887 totalParticles: 124 m_RestLength: 11.325401 - deformableEdges: 000000000100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000a0000000a0000000b0000000b0000000c0000000c0000000d0000000d0000000e0000000e0000000f0000000f000000100000001000000011000000110000001200000012000000130000001300000014000000140000001500000015000000160000001600000017000000 restLengths: - 0.08187712 - 0.08188899 diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Joints rope 2.asset b/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Joints rope 2.asset index 9380ffa99..cb2a140a2 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Joints rope 2.asset +++ b/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Joints rope 2.asset @@ -26,9 +26,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 8f7e67b5626124d0db9886e6cd2aacff, type: 3} m_Name: Joints rope 2 m_EditorClassIdentifier: - m_Checksum: 4251140477 m_Empty: 0 - m_Edited: 0 m_ActiveParticleCount: 16 m_InitialActiveParticleCount: 16 _bounds: @@ -268,7 +266,6 @@ MonoBehaviour: - {x: 0, y: 0, z: 0, w: 0} - {x: 0, y: 0, z: 0, w: 0} - {x: 0, y: 0, z: 0, w: 0} - restNormals: [] orientations: [] restOrientations: [] velocities: @@ -1426,369 +1423,7 @@ MonoBehaviour: shapeMatchingConstraintsData: batches: [] aerodynamicConstraintsData: - batches: - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f00000070000000710000007200000073000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f00000070000000710000007200000073000000 - m_ConstraintCount: 116 - m_ActiveConstraintCount: 16 - m_InitialActiveConstraintCount: 16 - particleIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f00000070000000710000007200000073000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - aerodynamicCoeffs: - serializedContents: - - 0.1 - - 1 - - 1 - - 0.10000002 - - 1 - - 1 - - 0.10000002 - - 1 - - 1 - - 0.10000002 - - 1 - - 1 - - 0.10000002 - - 1 - - 1 - - 0.10000002 - - 1 - - 1 - - 0.10000002 - - 1 - - 1 - - 0.10000002 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - m_AlignBytes: 16 + batches: [] chainConstraintsData: batches: [] volumeConstraintsData: @@ -1938,7 +1573,6 @@ MonoBehaviour: m_InterParticleDistance: 0.08596755 totalParticles: 116 m_RestLength: 9.847806 - deformableEdges: 000000000100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000a0000000a0000000b0000000b0000000c0000000c0000000d0000000d0000000e0000000e0000000f000000 restLengths: - 0.05090946 - 0.050947905 diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Plectoneme rod.asset b/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Plectoneme rod.asset index a7bd63b88..2fdbb3b0b 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Plectoneme rod.asset +++ b/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Plectoneme rod.asset @@ -26,9 +26,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: e028b099aa5d14e399bc3d87df5b7737, type: 3} m_Name: Plectoneme rod m_EditorClassIdentifier: - m_Checksum: 2962538395 m_Empty: 0 - m_Edited: 0 m_ActiveParticleCount: 41 m_InitialActiveParticleCount: 41 _bounds: @@ -118,7 +116,6 @@ MonoBehaviour: - {x: 0.90037465, y: 0, z: 0, w: 1} - {x: 0.95067745, y: 0, z: 0, w: 1} - {x: 1, y: 0, z: 0, w: 1} - restNormals: [] orientations: - {x: 0, y: 0.7071068, z: 0, w: 0.7071068} - {x: 0, y: 0.7071068, z: 0, w: 0.7071068} @@ -371,7 +368,7 @@ MonoBehaviour: - 100 - 100 - 100 - filters: 0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff + filters: 0100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff000100ff00 principalRadii: - {x: 0.05, y: 0.05, z: 0.05} - {x: 0.049999997, y: 0.049999997, z: 0.049999997} @@ -800,144 +797,7 @@ MonoBehaviour: shapeMatchingConstraintsData: batches: [] aerodynamicConstraintsData: - batches: - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000 - m_ConstraintCount: 41 - m_ActiveConstraintCount: 41 - m_InitialActiveConstraintCount: 41 - particleIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - aerodynamicCoeffs: - serializedContents: - - 0.1 - - 1 - - 1 - - 0.099999994 - - 1 - - 1 - - 0.099999994 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.099999994 - - 1 - - 1 - - 0.099999994 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.099999994 - - 1 - - 1 - - 0.099999994 - - 1 - - 1 - - 0.099999994 - - 1 - - 1 - - 0.099999994 - - 1 - - 1 - - 0.10000002 - - 1 - - 1 - - 0.10000002 - - 1 - - 1 - - 0.099999994 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - m_AlignBytes: 16 + batches: [] chainConstraintsData: batches: - m_IDs: 00000000 @@ -1044,7 +904,6 @@ MonoBehaviour: m_InterParticleDistance: 0.049999997 totalParticles: 41 m_RestLength: 1.9999998 - deformableEdges: 000000000100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000a0000000a0000000b0000000b0000000c0000000c0000000d0000000d0000000e0000000e0000000f0000000f00000010000000100000001100000011000000120000001200000013000000130000001400000014000000150000001500000016000000160000001700000017000000180000001800000019000000190000001a0000001a0000001b0000001b0000001c0000001c0000001d0000001d0000001e0000001e0000001f0000001f0000002000000020000000210000002100000022000000220000002300000023000000240000002400000025000000250000002600000026000000270000002700000028000000 restLengths: - 0.049322546 - 0.050302863 diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/RatchetCable.asset b/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/RatchetCable.asset deleted file mode 100644 index 5e3bb5be6..000000000 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/RatchetCable.asset +++ /dev/null @@ -1,884 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &-3232934742127723785 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 775ad4994fda946d1a5936c7e2dfc785, type: 3} - m_Name: start - m_EditorClassIdentifier: - particleIndices: 00000000 - m_Blueprint: {fileID: 11400000} ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8f7e67b5626124d0db9886e6cd2aacff, type: 3} - m_Name: RatchetCable - m_EditorClassIdentifier: - m_Checksum: 1380726484 - m_Empty: 0 - m_Edited: 0 - m_ActiveParticleCount: 31 - m_InitialActiveParticleCount: 31 - _bounds: - m_Center: {x: 0, y: 0.5, z: 0} - m_Extent: {x: 0, y: 2.5, z: 0} - positions: - - {x: 0, y: -2, z: 0} - - {x: 0, y: -1.8339901, z: 0} - - {x: 0, y: -1.6668751, z: 0} - - {x: 0, y: -1.5016013, z: 0} - - {x: 0, y: -1.3355447, z: 0} - - {x: 0, y: -1.1683198, z: 0} - - {x: 0, y: -1.0000137, z: 0} - - {x: 0, y: -0.834779, z: 0} - - {x: 0, y: -0.6677752, z: 0} - - {x: 0, y: -0.50032496, z: 0} - - {x: 0, y: -0.33429456, z: 0} - - {x: 0, y: -0.16700856, z: 0} - - {x: 0, y: -0.00047871275, z: 0} - - {x: 0, y: 0.16636388, z: 0} - - {x: 0, y: 0.33324736, z: 0} - - {x: 0, y: 0.49999976, z: 0} - - {x: 0, y: 0.6667523, z: 0} - - {x: 0, y: 0.83363587, z: 0} - - {x: 0, y: 1.0004781, z: 0} - - {x: 0, y: 1.1670083, z: 0} - - {x: 0, y: 1.334294, z: 0} - - {x: 0, y: 1.5003247, z: 0} - - {x: 0, y: 1.667775, z: 0} - - {x: 0, y: 1.8347788, z: 0} - - {x: 0, y: 2.0000136, z: 0} - - {x: 0, y: 2.1683195, z: 0} - - {x: 0, y: 2.3355443, z: 0} - - {x: 0, y: 2.5016015, z: 0} - - {x: 0, y: 2.6668754, z: 0} - - {x: 0, y: 2.83399, z: 0} - - {x: 0, y: 2.9999998, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - restPositions: - - {x: 0, y: -2, z: 0, w: 1} - - {x: 0, y: -1.8339901, z: 0, w: 1} - - {x: 0, y: -1.6668751, z: 0, w: 1} - - {x: 0, y: -1.5016013, z: 0, w: 1} - - {x: 0, y: -1.3355447, z: 0, w: 1} - - {x: 0, y: -1.1683198, z: 0, w: 1} - - {x: 0, y: -1.0000137, z: 0, w: 1} - - {x: 0, y: -0.834779, z: 0, w: 1} - - {x: 0, y: -0.6677752, z: 0, w: 1} - - {x: 0, y: -0.50032496, z: 0, w: 1} - - {x: 0, y: -0.33429456, z: 0, w: 1} - - {x: 0, y: -0.16700856, z: 0, w: 1} - - {x: 0, y: -0.00047871275, z: 0, w: 1} - - {x: 0, y: 0.16636388, z: 0, w: 1} - - {x: 0, y: 0.33324736, z: 0, w: 1} - - {x: 0, y: 0.49999976, z: 0, w: 1} - - {x: 0, y: 0.6667523, z: 0, w: 1} - - {x: 0, y: 0.83363587, z: 0, w: 1} - - {x: 0, y: 1.0004781, z: 0, w: 1} - - {x: 0, y: 1.1670083, z: 0, w: 1} - - {x: 0, y: 1.334294, z: 0, w: 1} - - {x: 0, y: 1.5003247, z: 0, w: 1} - - {x: 0, y: 1.667775, z: 0, w: 1} - - {x: 0, y: 1.8347788, z: 0, w: 1} - - {x: 0, y: 2.0000136, z: 0, w: 1} - - {x: 0, y: 2.1683195, z: 0, w: 1} - - {x: 0, y: 2.3355443, z: 0, w: 1} - - {x: 0, y: 2.5016015, z: 0, w: 1} - - {x: 0, y: 2.6668754, z: 0, w: 1} - - {x: 0, y: 2.83399, z: 0, w: 1} - - {x: 0, y: 2.9999998, z: 0, w: 1} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - restNormals: [] - orientations: [] - restOrientations: [] - velocities: - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - angularVelocities: [] - invMasses: - - 1 - - 1 - - 0.9999999 - - 1.0000001 - - 1 - - 1 - - 1 - - 1.0000001 - - 0.9999999 - - 1.0000001 - - 1 - - 1 - - 1 - - 1 - - 1.0000001 - - 1.0000001 - - 1 - - 1 - - 1 - - 1 - - 1 - - 1 - - 1 - - 1 - - 1 - - 1 - - 1 - - 1 - - 1 - - 1 - - 1 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - invRotationalMasses: [] - filters: 0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff00000000000000000000000000000000000000000000000000000000000000000000000000000000 - principalRadii: - - {x: 0.05, y: 0.05, z: 0.05} - - {x: 0.05, y: 0.05, z: 0.05} - - {x: 0.05000001, y: 0.05000001, z: 0.05000001} - - {x: 0.049999997, y: 0.049999997, z: 0.049999997} - - {x: 0.05, y: 0.05, z: 0.05} - - {x: 0.05, y: 0.05, z: 0.05} - - {x: 0.05, y: 0.05, z: 0.05} - - {x: 0.049999997, y: 0.049999997, z: 0.049999997} - - {x: 0.05000001, y: 0.05000001, z: 0.05000001} - - {x: 0.049999997, y: 0.049999997, z: 0.049999997} - - {x: 0.05, y: 0.05, z: 0.05} - - {x: 0.05, y: 0.05, z: 0.05} - - {x: 0.05, y: 0.05, z: 0.05} - - {x: 0.05, y: 0.05, z: 0.05} - - {x: 0.049999997, y: 0.049999997, z: 0.049999997} - - {x: 0.049999997, y: 0.049999997, z: 0.049999997} - - {x: 0.05, y: 0.05, z: 0.05} - - {x: 0.05, y: 0.05, z: 0.05} - - {x: 0.05, y: 0.05, z: 0.05} - - {x: 0.05, y: 0.05, z: 0.05} - - {x: 0.05, y: 0.05, z: 0.05} - - {x: 0.05, y: 0.05, z: 0.05} - - {x: 0.05, y: 0.05, z: 0.05} - - {x: 0.05, y: 0.05, z: 0.05} - - {x: 0.05, y: 0.05, z: 0.05} - - {x: 0.05, y: 0.05, z: 0.05} - - {x: 0.05, y: 0.05, z: 0.05} - - {x: 0.05, y: 0.05, z: 0.05} - - {x: 0.05, y: 0.05, z: 0.05} - - {x: 0.05, y: 0.05, z: 0.05} - - {x: 0.05, y: 0.05, z: 0.05} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - colors: - - {r: 0.10980392, g: 0.6901961, b: 0.8784314, a: 1} - - {r: 0.116365515, g: 0.6851087, b: 0.8719565, a: 1} - - {r: 0.13208458, g: 0.6729213, b: 0.85644525, a: 1.0000001} - - {r: 0.15323167, g: 0.6565252, b: 0.8355775, a: 0.99999994} - - {r: 0.17835046, g: 0.63704985, b: 0.8107907, a: 1} - - {r: 0.20651987, g: 0.61520934, b: 0.7829937, a: 1} - - {r: 0.23708364, g: 0.59151226, b: 0.7528338, a: 1} - - {r: 0.26877022, g: 0.5669446, b: 0.72156584, a: 0.99999994} - - {r: 0.302132, g: 0.5410783, b: 0.6886452, a: 1.0000001} - - {r: 0.3366538, g: 0.5143124, b: 0.6545794, a: 0.99999994} - - {r: 0.37172142, g: 0.4871235, b: 0.6199753, a: 1} - - {r: 0.40771413, g: 0.45921725, b: 0.5844583, a: 1} - - {r: 0.4440449, g: 0.4310489, b: 0.5486077, a: 1} - - {r: 0.4808056, g: 0.4025472, b: 0.5123328, a: 1} - - {r: 0.51781046, g: 0.37385616, b: 0.4758169, a: 0.99999994} - - {r: 0.5549019, g: 0.34509802, b: 0.43921566, a: 0.99999994} - - {r: 0.5919934, g: 0.3163399, b: 0.40261444, a: 1} - - {r: 0.62899834, g: 0.2876489, b: 0.36609858, a: 1} - - {r: 0.66575897, g: 0.25914726, b: 0.32982376, a: 1} - - {r: 0.7020898, g: 0.23097885, b: 0.2939731, a: 1} - - {r: 0.7380824, g: 0.20307265, b: 0.2584561, a: 1} - - {r: 0.7731501, g: 0.17588367, b: 0.22385193, a: 1} - - {r: 0.80767196, g: 0.14911777, b: 0.18978626, a: 1} - - {r: 0.84103364, g: 0.12325145, b: 0.15686548, a: 1} - - {r: 0.8727203, g: 0.098683834, b: 0.12559761, a: 1} - - {r: 0.9032841, g: 0.0749868, b: 0.09543775, a: 1} - - {r: 0.93145347, g: 0.05314622, b: 0.06764065, a: 1} - - {r: 0.95657223, g: 0.033670846, b: 0.042853806, a: 1} - - {r: 0.9777194, g: 0.017274806, b: 0.021986116, a: 1} - - {r: 0.9934384, g: 0.005087384, b: 0.0064748526, a: 1} - - {r: 1, g: 0, b: 0, a: 1} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - points: - edges: 000000000100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000a0000000a0000000b0000000b0000000c0000000c0000000d0000000d0000000e0000000e0000000f0000000f00000010000000100000001100000011000000120000001200000013000000130000001400000014000000150000001500000016000000160000001700000017000000180000001800000019000000190000001a0000001a0000001b0000001b0000001c0000001c0000001d0000001d0000001e000000 - triangles: - distanceConstraintsData: - batches: - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f00000010000000110000001200000013000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f00000010000000110000001200000013000000 - m_ConstraintCount: 20 - m_ActiveConstraintCount: 15 - m_InitialActiveConstraintCount: 15 - particleIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - restLengths: - serializedContents: - - 0.1660099 - - 0.16527379 - - 0.16722488 - - 0.16523468 - - 0.16745025 - - 0.167286 - - 0.1668426 - - 0.1667524 - - 0.16688359 - - 0.16653013 - - 0.16603076 - - 0.16700375 - - 0.16830587 - - 0.16605711 - - 0.16711473 - - 0 - - 0 - - 0 - - 0 - - 0 - m_AlignBytes: 16 - stiffnesses: - serializedContents: - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - m_AlignBytes: 16 - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f00000010000000110000001200000013000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f00000010000000110000001200000013000000 - m_ConstraintCount: 20 - m_ActiveConstraintCount: 15 - m_InitialActiveConstraintCount: 15 - particleIndices: - serializedContents: 0100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - restLengths: - serializedContents: - - 0.16711497 - - 0.16605663 - - 0.16830611 - - 0.16700381 - - 0.1660304 - - 0.16652985 - - 0.16688348 - - 0.16675252 - - 0.16684228 - - 0.16728568 - - 0.16745031 - - 0.1652348 - - 0.16722488 - - 0.1652739 - - 0.16600966 - - 0 - - 0 - - 0 - - 0 - - 0 - m_AlignBytes: 16 - stiffnesses: - serializedContents: - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - m_AlignBytes: 16 - bendConstraintsData: - batches: - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c000000 - m_ConstraintCount: 13 - m_ActiveConstraintCount: 10 - m_InitialActiveConstraintCount: 10 - particleIndices: - serializedContents: 000000000200000001000000030000000500000004000000060000000800000007000000090000000b0000000a0000000c0000000e0000000d0000000f0000001100000010000000120000001400000013000000150000001700000016000000180000001a000000190000001b0000001d0000001c0000001e000000200000001f000000210000002300000022000000240000002600000025000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - restBends: - serializedContents: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - m_AlignBytes: 16 - bendingStiffnesses: - serializedContents: - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - m_AlignBytes: 16 - plasticity: - serializedContents: - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - m_AlignBytes: 16 - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c000000 - m_ConstraintCount: 13 - m_ActiveConstraintCount: 10 - m_InitialActiveConstraintCount: 10 - particleIndices: - serializedContents: 0100000003000000020000000400000006000000050000000700000009000000080000000a0000000c0000000b0000000d0000000f0000000e000000100000001200000011000000130000001500000014000000160000001800000017000000190000001b0000001a0000001c0000001e0000001d0000001f0000002100000020000000220000002400000023000000250000002700000026000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - restBends: - serializedContents: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - m_AlignBytes: 16 - bendingStiffnesses: - serializedContents: - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - m_AlignBytes: 16 - plasticity: - serializedContents: - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - m_AlignBytes: 16 - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c000000 - m_ConstraintCount: 13 - m_ActiveConstraintCount: 9 - m_InitialActiveConstraintCount: 9 - particleIndices: - serializedContents: 020000000400000003000000050000000700000006000000080000000a000000090000000b0000000d0000000c0000000e000000100000000f0000001100000013000000120000001400000016000000150000001700000019000000180000001a0000001c0000001b0000001d0000001f0000001e000000200000002200000021000000230000002500000024000000260000002800000027000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - restBends: - serializedContents: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - m_AlignBytes: 16 - bendingStiffnesses: - serializedContents: - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - m_AlignBytes: 16 - plasticity: - serializedContents: - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - m_AlignBytes: 16 - skinConstraintsData: - batches: [] - tetherConstraintsData: - batches: [] - stretchShearConstraintsData: - batches: [] - bendTwistConstraintsData: - batches: [] - shapeMatchingConstraintsData: - batches: [] - aerodynamicConstraintsData: - batches: - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000 - m_ConstraintCount: 41 - m_ActiveConstraintCount: 31 - m_InitialActiveConstraintCount: 31 - particleIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - aerodynamicCoeffs: - serializedContents: - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.10000002 - - 1 - - 1 - - 0.099999994 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.099999994 - - 1 - - 1 - - 0.10000002 - - 1 - - 1 - - 0.099999994 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.099999994 - - 1 - - 1 - - 0.099999994 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0.1 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - m_AlignBytes: 16 - chainConstraintsData: - batches: [] - volumeConstraintsData: - batches: [] - groups: - - {fileID: -3232934742127723785} - - {fileID: 6183219346962753922} - path: - m_Names: - - start - - end - m_Points: - data: - - tangentMode: 0 - inTangent: {x: 0, y: -0, z: 0} - position: {x: 0, y: -2, z: 0} - outTangent: {x: -0, y: 1, z: -0} - - tangentMode: 0 - inTangent: {x: 0, y: -1, z: 0} - position: {x: 0, y: 2.9999998, z: 0} - outTangent: {x: -0, y: 0, z: -0} - m_Normals: - data: - - {x: 0, y: 1, z: 0} - - {x: 0, y: 1, z: 0} - m_Colors: - data: - - {r: 0.10980392, g: 0.6901961, b: 0.8784314, a: 1} - - {r: 1, g: 0, b: 0, a: 1} - m_Thickness: - data: - - 1 - - 1 - m_Masses: - data: - - 1 - - 1 - m_RotationalMasses: - data: - - 1 - - 1 - m_Filters: - data: 0200ffff0200ffff - m_Closed: 0 - m_ArcLengthTable: - - 0 - - 0.15603067 - - 0.3366807 - - 0.5393586 - - 0.7614728 - - 1.0004319 - - 1.2536443 - - 1.5185186 - - 1.7924631 - - 2.0728862 - - 2.3571968 - - 2.6428032 - - 2.9271138 - - 3.207537 - - 3.4814813 - - 3.7463555 - - 3.999568 - - 4.238527 - - 4.460641 - - 4.6633186 - - 4.843969 - - 4.9999995 - m_TotalSplineLenght: 4.9999995 - OnPathChanged: - m_PersistentCalls: - m_Calls: [] - OnControlPointAdded: - m_PersistentCalls: - m_Calls: [] - OnControlPointRemoved: - m_PersistentCalls: - m_Calls: [] - OnControlPointRenamed: - m_PersistentCalls: - m_Calls: [] - thickness: 0.05 - resolution: 0.3 - m_InterParticleDistance: 0.16666666 - totalParticles: 41 - m_RestLength: 6.666664 - deformableEdges: 000000000100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000a0000000a0000000b0000000b0000000c0000000c0000000d0000000d0000000e0000000e0000000f0000000f00000010000000100000001100000011000000120000001200000013000000130000001400000014000000150000001500000016000000160000001700000017000000180000001800000019000000190000001a0000001a0000001b0000001b0000001c0000001c0000001d0000001d0000001e000000 - restLengths: - - 0.1660099 - - 0.16711497 - - 0.16527379 - - 0.16605663 - - 0.16722488 - - 0.16830611 - - 0.16523468 - - 0.16700381 - - 0.16745025 - - 0.1660304 - - 0.167286 - - 0.16652985 - - 0.1668426 - - 0.16688348 - - 0.1667524 - - 0.16675252 - - 0.16688359 - - 0.16684228 - - 0.16653013 - - 0.16728568 - - 0.16603076 - - 0.16745031 - - 0.16700375 - - 0.1652348 - - 0.16830587 - - 0.16722488 - - 0.16605711 - - 0.1652739 - - 0.16711473 - - 0.16600966 - - 0.16666666 - - 0.16666666 - - 0.16666666 - - 0.16666666 - - 0.16666666 - - 0.16666666 - - 0.16666666 - - 0.16666666 - - 0.16666666 - - 0.16666666 - - 0 - pooledParticles: 10 ---- !u!114 &6183219346962753922 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 775ad4994fda946d1a5936c7e2dfc785, type: 3} - m_Name: end - m_EditorClassIdentifier: - particleIndices: 1e000000 - m_Blueprint: {fileID: 11400000} diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Snake.asset b/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Snake.asset index 779af431d..89e3bf3a4 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Snake.asset +++ b/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Snake.asset @@ -26,9 +26,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 8f7e67b5626124d0db9886e6cd2aacff, type: 3} m_Name: Snake m_EditorClassIdentifier: - m_Checksum: 1208839425 m_Empty: 0 - m_Edited: 0 m_ActiveParticleCount: 27 m_InitialActiveParticleCount: 27 _bounds: @@ -290,7 +288,6 @@ MonoBehaviour: - {x: 0, y: 0, z: 0, w: 0} - {x: 0, y: 0, z: 0, w: 0} - {x: 0, y: 0, z: 0, w: 0} - restNormals: [] orientations: [] restOrientations: [] velocities: @@ -430,26 +427,26 @@ MonoBehaviour: - 10 - 10 - 10 - - 10.01664 - - 10.0662155 - - 10.148677 - - 10.265117 - - 10.417466 - - 10.60722 - - 10.8371525 - - 11.110949 - - 11.4355 - - 11.815787 - - 12.258996 - - 12.774428 - - 13.373356 - - 14.068928 - - 14.875339 - - 15.804824 - - 16.874622 - - 18.06043 - - 19.263605 - - 20 + - 10 + - 10 + - 10 + - 10 + - 10 + - 10 + - 10 + - 10 + - 10 + - 10 + - 10 + - 10 + - 10 + - 10 + - 10 + - 10 + - 10 + - 10 + - 10 + - 10 - 0 - 0 - 0 @@ -1547,402 +1544,7 @@ MonoBehaviour: shapeMatchingConstraintsData: batches: [] aerodynamicConstraintsData: - batches: - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b0000007c0000007d0000007e000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b0000007c0000007d0000007e000000 - m_ConstraintCount: 127 - m_ActiveConstraintCount: 27 - m_InitialActiveConstraintCount: 27 - particleIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b0000007c0000007d0000007e000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - aerodynamicCoeffs: - serializedContents: - - 0.2 - - 1 - - 1 - - 0.20000003 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.19946842 - - 1 - - 1 - - 0.19789504 - - 1 - - 1 - - 0.19531204 - - 1 - - 1 - - 0.19173537 - - 1 - - 1 - - 0.18717642 - - 1 - - 1 - - 0.18168132 - - 1 - - 1 - - 0.17528054 - - 1 - - 1 - - 0.1680042 - - 1 - - 1 - - 0.15983036 - - 1 - - 1 - - 0.15082408 - - 1 - - 1 - - 0.1410328 - - 1 - - 1 - - 0.13050044 - - 1 - - 1 - - 0.11928175 - - 1 - - 1 - - 0.107451595 - - 1 - - 1 - - 0.09512116 - - 1 - - 1 - - 0.08246982 - - 1 - - 1 - - 0.069633886 - - 1 - - 1 - - 0.057182938 - - 1 - - 1 - - 0.046116363 - - 1 - - 1 - - 0.04 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - m_AlignBytes: 16 + batches: [] chainConstraintsData: batches: [] volumeConstraintsData: @@ -1989,7 +1591,7 @@ MonoBehaviour: data: - 0.1 - 0.1 - - 0.05 + - 0.1 m_RotationalMasses: data: - 1 @@ -2060,7 +1662,6 @@ MonoBehaviour: m_InterParticleDistance: 0.15824494 totalParticles: 127 m_RestLength: 19.938877 - deformableEdges: 000000000100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000a0000000a0000000b0000000b0000000c0000000c0000000d0000000d0000000e0000000e0000000f0000000f00000010000000100000001100000011000000120000001200000013000000130000001400000014000000150000001500000016000000160000001700000017000000180000001800000019000000190000001a000000 restLengths: - 0.1524441 - 0.15290284 diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/SpringRod.asset b/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/SpringRod.asset index 40734f6cc..ff0b0c429 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/SpringRod.asset +++ b/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/SpringRod.asset @@ -208,9 +208,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: e028b099aa5d14e399bc3d87df5b7737, type: 3} m_Name: SpringRod m_EditorClassIdentifier: - m_Checksum: 3530553094 m_Empty: 0 - m_Edited: 0 m_ActiveParticleCount: 59 m_InitialActiveParticleCount: 59 _bounds: @@ -336,7 +334,6 @@ MonoBehaviour: - {x: -0.6423058, y: 2.7999995, z: -0.27828628, w: 1} - {x: -0.48284987, y: 2.8499994, z: -0.50604236, w: 1} - {x: -0.24786891, y: 2.8999994, z: -0.6546457, w: 1} - restNormals: [] orientations: - {x: -0.088398315, y: -0.10040869, z: -0.008956829, w: 0.990971} - {x: -0.08490821, y: -0.2934198, z: -0.026174147, w: 0.95184577} @@ -638,65 +635,65 @@ MonoBehaviour: - 1 - 1 invRotationalMasses: - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 - - 0.5 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 filters: 0100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000 principalRadii: - {x: 0.1, y: 0.1, z: 0.1} @@ -819,7 +816,7 @@ MonoBehaviour: - {r: 1, g: 1, b: 1, a: 1} - {r: 1, g: 1, b: 1, a: 1} points: - edges: 000000000100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000a0000000a0000000b0000000b0000000c0000000c0000000d0000000d0000000e0000000e0000000f0000000f00000010000000100000001100000011000000120000001200000013000000130000001400000014000000150000001500000016000000160000001700000017000000180000001800000019000000190000001a0000001a0000001b0000001b0000001c0000001c0000001d0000001d0000001e0000001e0000001f0000001f00000020000000200000002100000021000000220000002200000023000000230000002400000024000000250000002500000026000000260000002700000027000000280000002800000029000000290000002a0000002a0000002b0000002b0000002c0000002c0000002d0000002d0000002e0000002e0000002f0000002f00000030000000300000003100000031000000320000003200000033000000330000003400000034000000350000003500000036000000360000003700000037000000380000003800000039000000390000003a000000 + edges: triangles: distanceConstraintsData: batches: [] @@ -1129,36 +1126,7 @@ MonoBehaviour: - {x: 0, y: 0, z: 0} m_AlignBytes: 16 plasticity: - serializedContents: - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} + serializedContents: [] m_AlignBytes: 16 - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c000000 m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c000000 @@ -1236,232 +1204,12 @@ MonoBehaviour: - {x: 0, y: 0, z: 0} m_AlignBytes: 16 plasticity: - serializedContents: - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} + serializedContents: [] m_AlignBytes: 16 shapeMatchingConstraintsData: batches: [] aerodynamicConstraintsData: - batches: - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a000000 - m_ConstraintCount: 59 - m_ActiveConstraintCount: 59 - m_InitialActiveConstraintCount: 59 - particleIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - aerodynamicCoeffs: - serializedContents: - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - m_AlignBytes: 16 + batches: [] chainConstraintsData: batches: - m_IDs: 00000000 @@ -1802,36 +1550,36 @@ MonoBehaviour: - 1 m_RotationalMasses: data: - - 2 - - 2 - - 2 - - 2 - - 2 - - 2 - - 2 - - 2 - - 2 - - 2 - - 2 - - 2 - - 2 - - 2 - - 2 - - 2 - - 2 - - 2 - - 2 - - 2 - - 2 - - 2 - - 2 - - 2 - - 2 - - 2 - - 2 - - 2 - - 2 - - 2 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 m_Filters: data: 010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000 m_Closed: 0 @@ -2464,7 +2212,6 @@ MonoBehaviour: m_InterParticleDistance: 0.28434873 totalParticles: 59 m_RestLength: 16.384266 - deformableEdges: 000000000100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000a0000000a0000000b0000000b0000000c0000000c0000000d0000000d0000000e0000000e0000000f0000000f00000010000000100000001100000011000000120000001200000013000000130000001400000014000000150000001500000016000000160000001700000017000000180000001800000019000000190000001a0000001a0000001b0000001b0000001c0000001c0000001d0000001d0000001e0000001e0000001f0000001f00000020000000200000002100000021000000220000002200000023000000230000002400000024000000250000002500000026000000260000002700000027000000280000002800000029000000290000002a0000002a0000002b0000002b0000002c0000002c0000002d0000002d0000002e0000002e0000002f0000002f00000030000000300000003100000031000000320000003200000033000000330000003400000034000000350000003500000036000000360000003700000037000000380000003800000039000000390000003a000000 restLengths: - 0.28248742 - 0.28248742 diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Straight long rope.asset b/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Straight long rope.asset index 16674a607..c4b8acb3a 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Straight long rope.asset +++ b/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Straight long rope.asset @@ -40,9 +40,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 8f7e67b5626124d0db9886e6cd2aacff, type: 3} m_Name: Straight long rope m_EditorClassIdentifier: - m_Checksum: 540814145 m_Empty: 0 - m_Edited: 0 m_ActiveParticleCount: 12 m_InitialActiveParticleCount: 12 _bounds: @@ -274,7 +272,6 @@ MonoBehaviour: - {x: 0, y: 0, z: 0, w: 0} - {x: 0, y: 0, z: 0, w: 0} - {x: 0, y: 0, z: 0, w: 0} - restNormals: [] orientations: [] restOrientations: [] velocities: @@ -1008,10 +1005,10 @@ MonoBehaviour: m_AlignBytes: 16 restBends: serializedContents: - - 0 - - 0 - - 0 - - 0 + - 0.00005567074 + - 0.00009247661 + - 0.000085026026 + - 0.0006418228 - 0 - 0 - 0 @@ -1139,10 +1136,10 @@ MonoBehaviour: m_AlignBytes: 16 restBends: serializedContents: - - 0 - - 0 - - 0 - - 0 + - 0.00031131506 + - 0.00003796816 + - 0.000033080578 + - 0.3935954 - 0 - 0 - 0 @@ -1270,10 +1267,10 @@ MonoBehaviour: m_AlignBytes: 16 restBends: serializedContents: - - 0 - - 0 - - 0 - - 0 + - 0.000032275915 + - 0.0000037252903 + - 0.0002731681 + - 0.33333334 - 0 - 0 - 0 @@ -1396,357 +1393,7 @@ MonoBehaviour: shapeMatchingConstraintsData: batches: [] aerodynamicConstraintsData: - batches: - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000 - m_ConstraintCount: 112 - m_ActiveConstraintCount: 12 - m_InitialActiveConstraintCount: 12 - particleIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - aerodynamicCoeffs: - serializedContents: - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - m_AlignBytes: 16 + batches: [] chainConstraintsData: batches: [] volumeConstraintsData: @@ -1864,7 +1511,6 @@ MonoBehaviour: m_InterParticleDistance: 0.18181819 totalParticles: 112 m_RestLength: 20.181805 - deformableEdges: 000000000100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000a0000000a0000000b000000 restLengths: - 0.18133646 - 0.18116945 diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Straight short rope.asset b/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Straight short rope.asset index 034a84723..f2b79041b 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Straight short rope.asset +++ b/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Straight short rope.asset @@ -26,9 +26,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 8f7e67b5626124d0db9886e6cd2aacff, type: 3} m_Name: Straight short rope m_EditorClassIdentifier: - m_Checksum: 350243151 m_Empty: 0 - m_Edited: 0 m_ActiveParticleCount: 12 m_InitialActiveParticleCount: 12 _bounds: @@ -260,7 +258,6 @@ MonoBehaviour: - {x: 0, y: 0, z: 0, w: 0} - {x: 0, y: 0, z: 0, w: 0} - {x: 0, y: 0, z: 0, w: 0} - restNormals: [] orientations: [] restOrientations: [] velocities: @@ -1382,357 +1379,7 @@ MonoBehaviour: shapeMatchingConstraintsData: batches: [] aerodynamicConstraintsData: - batches: - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000 - m_ConstraintCount: 112 - m_ActiveConstraintCount: 12 - m_InitialActiveConstraintCount: 12 - particleIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - aerodynamicCoeffs: - serializedContents: - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.19999999 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - m_AlignBytes: 16 + batches: [] chainConstraintsData: batches: [] volumeConstraintsData: @@ -1818,7 +1465,6 @@ MonoBehaviour: m_InterParticleDistance: 0.1833847 totalParticles: 112 m_RestLength: 20.355694 - deformableEdges: 000000000100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000a0000000a0000000b000000 restLengths: - 0.18298253 - 0.18343952 diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/TangledRopeA.asset b/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/TangledRopeA.asset deleted file mode 100644 index fb0fca7d2..000000000 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/TangledRopeA.asset +++ /dev/null @@ -1,1608 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &-5578146735436999353 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 775ad4994fda946d1a5936c7e2dfc785, type: 3} - m_Name: start - m_EditorClassIdentifier: - particleIndices: 00000000 - m_Blueprint: {fileID: 11400000} ---- !u!114 &-4709438462163914631 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 775ad4994fda946d1a5936c7e2dfc785, type: 3} - m_Name: end2 - m_EditorClassIdentifier: - particleIndices: 18000000 - m_Blueprint: {fileID: 11400000} ---- !u!114 &-2046351418314356755 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 775ad4994fda946d1a5936c7e2dfc785, type: 3} - m_Name: midpoint - m_EditorClassIdentifier: - particleIndices: 15000000 - m_Blueprint: {fileID: 11400000} ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8f7e67b5626124d0db9886e6cd2aacff, type: 3} - m_Name: TangledRopeA - m_EditorClassIdentifier: - m_Checksum: 4166290955 - m_Empty: 0 - m_Edited: 0 - m_ActiveParticleCount: 27 - m_InitialActiveParticleCount: 27 - _bounds: - m_Center: {x: -3.0646935, y: 0.21265927, z: -0.003018573} - m_Extent: {x: 3.9353065, y: 0.36265928, z: 0.003018573} - positions: - - {x: -7, y: -0.15, z: 0} - - {x: -7.0000005, y: 0.05002283, z: 0} - - {x: -7, y: 0.25, z: 0} - - {x: -6.7429385, y: 0.49070227, z: -0.0025341383} - - {x: -6.372149, y: 0.5592373, z: -0.0050449185} - - {x: -5.994808, y: 0.5753186, z: -0.006037146} - - {x: -5.612949, y: 0.57531786, z: -0.005935318} - - {x: -5.2272964, y: 0.5753169, z: -0.0056863534} - - {x: -4.8442507, y: 0.5753157, z: -0.005347624} - - {x: -4.4598093, y: 0.5753144, z: -0.004946141} - - {x: -4.075023, y: 0.57531303, z: -0.0045018787} - - {x: -3.6909413, y: 0.57531154, z: -0.0040297816} - - {x: -3.3069186, y: 0.57531, z: -0.0035397327} - - {x: -2.9226773, y: 0.57530844, z: -0.0030403098} - - {x: -2.538409, y: 0.57530683, z: -0.0025399735} - - {x: -2.1543005, y: 0.57530516, z: -0.0020471876} - - {x: -1.7706202, y: 0.57530355, z: -0.0015712235} - - {x: -1.385769, y: 0.5753019, z: -0.0011208237} - - {x: -1.0010612, y: 0.5753003, z: -0.0007115061} - - {x: -0.6177507, y: 0.57529867, z: -0.00036399008} - - {x: -0.2325017, y: 0.5752971, z: -0.000106789805} - - {x: 0.14938739, y: 0.5752957, z: -0.00000020822299} - - {x: 0.42413607, y: 0.5346117, z: -0.00000026092542} - - {x: 0.6867492, y: 0.4435634, z: -0.00000032949225} - - {x: 0.8677804, y: 0.25, z: -0.00000038109664} - - {x: 0.8628189, y: 0.04811287, z: -0.00000028328986} - - {x: 0.870613, y: -0.15, z: -0.00000003061261} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - restPositions: - - {x: -7, y: -0.15, z: 0, w: 1} - - {x: -7.0000005, y: 0.05002283, z: 0, w: 1} - - {x: -7, y: 0.25, z: 0, w: 1} - - {x: -6.7429385, y: 0.49070227, z: -0.0025341383, w: 1} - - {x: -6.372149, y: 0.5592373, z: -0.0050449185, w: 1} - - {x: -5.994808, y: 0.5753186, z: -0.006037146, w: 1} - - {x: -5.612949, y: 0.57531786, z: -0.005935318, w: 1} - - {x: -5.2272964, y: 0.5753169, z: -0.0056863534, w: 1} - - {x: -4.8442507, y: 0.5753157, z: -0.005347624, w: 1} - - {x: -4.4598093, y: 0.5753144, z: -0.004946141, w: 1} - - {x: -4.075023, y: 0.57531303, z: -0.0045018787, w: 1} - - {x: -3.6909413, y: 0.57531154, z: -0.0040297816, w: 1} - - {x: -3.3069186, y: 0.57531, z: -0.0035397327, w: 1} - - {x: -2.9226773, y: 0.57530844, z: -0.0030403098, w: 1} - - {x: -2.538409, y: 0.57530683, z: -0.0025399735, w: 1} - - {x: -2.1543005, y: 0.57530516, z: -0.0020471876, w: 1} - - {x: -1.7706202, y: 0.57530355, z: -0.0015712235, w: 1} - - {x: -1.385769, y: 0.5753019, z: -0.0011208237, w: 1} - - {x: -1.0010612, y: 0.5753003, z: -0.0007115061, w: 1} - - {x: -0.6177507, y: 0.57529867, z: -0.00036399008, w: 1} - - {x: -0.2325017, y: 0.5752971, z: -0.000106789805, w: 1} - - {x: 0.14938739, y: 0.5752957, z: -0.00000020822299, w: 1} - - {x: 0.42413607, y: 0.5346117, z: -0.00000026092542, w: 1} - - {x: 0.6867492, y: 0.4435634, z: -0.00000032949225, w: 1} - - {x: 0.8677804, y: 0.25, z: -0.00000038109664, w: 1} - - {x: 0.8628189, y: 0.04811287, z: -0.00000028328986, w: 1} - - {x: 0.870613, y: -0.15, z: -0.00000003061261, w: 1} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - restNormals: [] - orientations: [] - restOrientations: [] - velocities: - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - angularVelocities: [] - invMasses: - - 5 - - 4.9999995 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - invRotationalMasses: [] - filters: 0100fdff0100fdff0100fdff0100fdff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100fdff0100fdff0100fdff0100fdff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - principalRadii: - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.20000003, y: 0.20000003, z: 0.20000003} - - {x: 0.20000003, y: 0.20000003, z: 0.20000003} - - {x: 0.20000003, y: 0.20000003, z: 0.20000003} - - {x: 0.20000003, y: 0.20000003, z: 0.20000003} - - {x: 0.20000003, y: 0.20000003, z: 0.20000003} - - {x: 0.20000003, y: 0.20000003, z: 0.20000003} - - {x: 0.20000003, y: 0.20000003, z: 0.20000003} - - {x: 0.20000003, y: 0.20000003, z: 0.20000003} - - {x: 0.20000003, y: 0.20000003, z: 0.20000003} - - {x: 0.20000003, y: 0.20000003, z: 0.20000003} - - {x: 0.20000003, y: 0.20000003, z: 0.20000003} - - {x: 0.20000003, y: 0.20000003, z: 0.20000003} - - {x: 0.20000003, y: 0.20000003, z: 0.20000003} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - colors: - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - points: - edges: 000000000100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000a0000000a0000000b0000000b0000000c0000000c0000000d0000000d0000000e0000000e0000000f0000000f00000010000000100000001100000011000000120000001200000013000000130000001400000014000000150000001500000016000000160000001700000017000000180000001800000019000000190000001a000000 - triangles: - distanceConstraintsData: - batches: - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000 - m_ConstraintCount: 38 - m_ActiveConstraintCount: 13 - m_InitialActiveConstraintCount: 13 - particleIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - restLengths: - serializedContents: - - 0.20002283 - - 0.35217127 - - 0.37768462 - - 0.38565263 - - 0.38444158 - - 0.38408214 - - 0.38424167 - - 0.38410887 - - 0.3848515 - - 0.38331065 - - 0.3818891 - - 0.27794865 - - 0.20194809 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - m_AlignBytes: 16 - stiffnesses: - serializedContents: - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - m_AlignBytes: 16 - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000 - m_ConstraintCount: 38 - m_ActiveConstraintCount: 13 - m_InitialActiveConstraintCount: 13 - particleIndices: - serializedContents: 0100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - restLengths: - serializedContents: - - 0.19997717 - - 0.37707853 - - 0.3818593 - - 0.38304582 - - 0.3847864 - - 0.384023 - - 0.3842686 - - 0.38368052 - - 0.38470802 - - 0.3852491 - - 0.27774453 - - 0.26502654 - - 0.19826613 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - m_AlignBytes: 16 - stiffnesses: - serializedContents: - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - m_AlignBytes: 16 - bendConstraintsData: - batches: - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000 - m_ConstraintCount: 25 - m_ActiveConstraintCount: 9 - m_InitialActiveConstraintCount: 9 - particleIndices: - serializedContents: 000000000200000001000000030000000500000004000000060000000800000007000000090000000b0000000a0000000c0000000e0000000d0000000f0000001100000010000000120000001400000013000000150000001700000016000000180000001a000000190000001b0000001d0000001c0000001e000000200000001f0000002100000023000000220000002400000026000000250000002700000029000000280000002a0000002c0000002b0000002d0000002f0000002e000000300000003200000031000000330000003500000034000000360000003800000037000000390000003b0000003a0000003c0000003e0000003d0000003f0000004100000040000000420000004400000043000000450000004700000046000000480000004a00000049000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - restBends: - serializedContents: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - m_AlignBytes: 16 - bendingStiffnesses: - serializedContents: - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - m_AlignBytes: 16 - plasticity: - serializedContents: - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - m_AlignBytes: 16 - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000 - m_ConstraintCount: 25 - m_ActiveConstraintCount: 8 - m_InitialActiveConstraintCount: 8 - particleIndices: - serializedContents: 0100000003000000020000000400000006000000050000000700000009000000080000000a0000000c0000000b0000000d0000000f0000000e000000100000001200000011000000130000001500000014000000160000001800000017000000190000001b0000001a0000001c0000001e0000001d0000001f0000002100000020000000220000002400000023000000250000002700000026000000280000002a000000290000002b0000002d0000002c0000002e000000300000002f0000003100000033000000320000003400000036000000350000003700000039000000380000003a0000003c0000003b0000003d0000003f0000003e000000400000004200000041000000430000004500000044000000460000004800000047000000490000004b0000004a000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - restBends: - serializedContents: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - m_AlignBytes: 16 - bendingStiffnesses: - serializedContents: - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - m_AlignBytes: 16 - plasticity: - serializedContents: - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - m_AlignBytes: 16 - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000 - m_ConstraintCount: 25 - m_ActiveConstraintCount: 8 - m_InitialActiveConstraintCount: 8 - particleIndices: - serializedContents: 020000000400000003000000050000000700000006000000080000000a000000090000000b0000000d0000000c0000000e000000100000000f0000001100000013000000120000001400000016000000150000001700000019000000180000001a0000001c0000001b0000001d0000001f0000001e000000200000002200000021000000230000002500000024000000260000002800000027000000290000002b0000002a0000002c0000002e0000002d0000002f0000003100000030000000320000003400000033000000350000003700000036000000380000003a000000390000003b0000003d0000003c0000003e000000400000003f0000004100000043000000420000004400000046000000450000004700000049000000480000004a0000004c0000004b000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - restBends: - serializedContents: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - m_AlignBytes: 16 - bendingStiffnesses: - serializedContents: - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - m_AlignBytes: 16 - plasticity: - serializedContents: - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - m_AlignBytes: 16 - skinConstraintsData: - batches: [] - tetherConstraintsData: - batches: [] - stretchShearConstraintsData: - batches: [] - bendTwistConstraintsData: - batches: [] - shapeMatchingConstraintsData: - batches: [] - aerodynamicConstraintsData: - batches: - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c000000 - m_ConstraintCount: 77 - m_ActiveConstraintCount: 27 - m_InitialActiveConstraintCount: 27 - particleIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - aerodynamicCoeffs: - serializedContents: - - 0.4 - - 1 - - 1 - - 0.40000007 - - 1 - - 1 - - 0.40000007 - - 1 - - 1 - - 0.40000007 - - 1 - - 1 - - 0.40000007 - - 1 - - 1 - - 0.40000007 - - 1 - - 1 - - 0.40000007 - - 1 - - 1 - - 0.40000007 - - 1 - - 1 - - 0.40000007 - - 1 - - 1 - - 0.40000007 - - 1 - - 1 - - 0.40000007 - - 1 - - 1 - - 0.40000007 - - 1 - - 1 - - 0.40000007 - - 1 - - 1 - - 0.40000007 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - m_AlignBytes: 16 - chainConstraintsData: - batches: [] - volumeConstraintsData: - batches: [] - groups: - - {fileID: -5578146735436999353} - - {fileID: 4876123546338928666} - - {fileID: 8187103611661320772} - - {fileID: -2046351418314356755} - - {fileID: -4709438462163914631} - - {fileID: 870036912147276740} - path: - m_Names: - - start - - start2 - - midpoint - - midpoint - - end2 - - end - m_Points: - data: - - tangentMode: 0 - inTangent: {x: -0, y: -0.25000024, z: -0} - position: {x: -7, y: -0.15, z: 0} - outTangent: {x: 0, y: 0.31, z: 0} - - tangentMode: 0 - inTangent: {x: -0, y: -0.24487238, z: -0} - position: {x: -7, y: 0.25, z: 0} - outTangent: {x: 0, y: 0.25371605, z: 0} - - tangentMode: 0 - inTangent: {x: -0.49832296, y: 0.0000006556511, z: 0.00000002188608} - position: {x: -5.994808, y: 0.5753186, z: -0.006037146} - outTangent: {x: 1.5384912, y: -0.0000020242162, z: -0.00000006756972} - - tangentMode: 0 - inTangent: {x: -1.4941434, y: 0.0000053208882, z: 0.000000114554} - position: {x: 0.14938739, y: 0.5752957, z: -0.00000020822299} - outTangent: {x: 0.1841115, y: -0.0000006556511, z: -0.000000014115585} - - tangentMode: 0 - inTangent: {x: -0, y: 0.20370655, z: -0} - position: {x: 0.8677804, y: 0.25, z: -0.00000038109664} - outTangent: {x: 0, y: -0.20338234, z: 0} - - tangentMode: 0 - inTangent: {x: -0.024279416, y: 0, z: 0} - position: {x: 0.870613, y: -0.15, z: -0.00000003061261} - outTangent: {x: 0.25, y: -0, z: -0} - m_Normals: - data: - - {x: 0, y: 1, z: 0} - - {x: 0, y: 1.0000001, z: 0} - - {x: 0, y: 1.0000001, z: 0} - - {x: 0, y: 1, z: 0} - - {x: 0, y: 1, z: 0} - - {x: 0, y: 1, z: 0} - m_Colors: - data: - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - m_Thickness: - data: - - 1 - - 1.0000001 - - 1.0000001 - - 1 - - 1 - - 1 - m_Masses: - data: - - 0.2 - - 0.2 - - 0.2 - - 0.2 - - 0.2 - - 0.2 - m_RotationalMasses: - data: - - 1 - - 1.0000001 - - 1.0000001 - - 1 - - 1 - - 1 - m_Filters: - data: 0100fdff0100fdff0100ffff0100ffff0100fdff0100fdff - m_Closed: 0 - m_ArcLengthTable: - - 0 - - 0.04121668 - - 0.076668724 - - 0.106916316 - - 0.1325196 - - 0.15403877 - - 0.17203398 - - 0.1870654 - - 0.19969317 - - 0.2104775 - - 0.21997853 - - 0.22875643 - - 0.23737137 - - 0.24638352 - - 0.25635302 - - 0.26784006 - - 0.28140482 - - 0.29760745 - - 0.3170081 - - 0.340167 - - 0.36764422 - - 0.4 - - 0.43523905 - - 0.46939337 - - 0.503775 - - 0.5394845 - - 0.5773406 - - 0.61788493 - - 0.661429 - - 0.70811003 - - 0.7579393 - - 0.810838 - - 0.8666635 - - 0.92522717 - - 0.9863068 - - 1.0496556 - - 1.115008 - - 1.1820844 - - 1.2505945 - - 1.3202392 - - 1.3907127 - - 1.4617041 - - 1.532898 - - 1.7630391 - - 2.0125155 - - 2.2792602 - - 2.5612059 - - 2.8562858 - - 3.1624331 - - 3.4775803 - - 3.7996604 - - 4.1266065 - - 4.4563513 - - 4.7868285 - - 5.11597 - - 5.4417095 - - 5.7619796 - - 6.074713 - - 6.3778434 - - 6.669303 - - 6.9470253 - - 7.208943 - - 7.452989 - - 7.6770964 - - 7.7057 - - 7.738573 - - 7.7751975 - - 7.815042 - - 7.8575697 - - 7.9022427 - - 7.948525 - - 7.9958844 - - 8.043796 - - 8.0917425 - - 8.139222 - - 8.18575 - - 8.230867 - - 8.274151 - - 8.315233 - - 8.353826 - - 8.38976 - - 8.423055 - - 8.454007 - - 8.483311 - - 8.512139 - - 8.541128 - - 8.569904 - - 8.598346 - - 8.62633 - - 8.653734 - - 8.680434 - - 8.7063055 - - 8.731224 - - 8.755065 - - 8.777704 - - 8.799017 - - 8.81888 - - 8.837172 - - 8.85377 - - 8.868559 - - 8.881427 - - 8.892273 - - 8.901021 - - 8.907654 - - 8.912338 - - 8.91585 - m_TotalSplineLenght: 8.91585 - OnPathChanged: - m_PersistentCalls: - m_Calls: [] - OnControlPointAdded: - m_PersistentCalls: - m_Calls: [] - OnControlPointRemoved: - m_PersistentCalls: - m_Calls: [] - OnControlPointRenamed: - m_PersistentCalls: - m_Calls: [] - thickness: 0.2 - resolution: 0.5 - m_InterParticleDistance: 0.3429173 - totalParticles: 77 - m_RestLength: 26.01791 - deformableEdges: 000000000100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000a0000000a0000000b0000000b0000000c0000000c0000000d0000000d0000000e0000000e0000000f0000000f00000010000000100000001100000011000000120000001200000013000000130000001400000014000000150000001500000016000000160000001700000017000000180000001800000019000000190000001a000000 - restLengths: - - 0.20002283 - - 0.19997717 - - 0.35217127 - - 0.37707853 - - 0.37768462 - - 0.3818593 - - 0.38565263 - - 0.38304582 - - 0.38444158 - - 0.3847864 - - 0.38408214 - - 0.384023 - - 0.38424167 - - 0.3842686 - - 0.38410887 - - 0.38368052 - - 0.3848515 - - 0.38470802 - - 0.38331065 - - 0.3852491 - - 0.3818891 - - 0.27774453 - - 0.27794865 - - 0.26502654 - - 0.20194809 - - 0.19826613 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0.3429173 - - 0 - pooledParticles: 50 ---- !u!114 &870036912147276740 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 775ad4994fda946d1a5936c7e2dfc785, type: 3} - m_Name: end - m_EditorClassIdentifier: - particleIndices: 1a000000 - m_Blueprint: {fileID: 11400000} ---- !u!114 &4876123546338928666 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 775ad4994fda946d1a5936c7e2dfc785, type: 3} - m_Name: start2 - m_EditorClassIdentifier: - particleIndices: 02000000 - m_Blueprint: {fileID: 11400000} ---- !u!114 &8187103611661320772 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 775ad4994fda946d1a5936c7e2dfc785, type: 3} - m_Name: midpoint - m_EditorClassIdentifier: - particleIndices: 05000000 - m_Blueprint: {fileID: 11400000} diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/TangledRopeB.asset b/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/TangledRopeB.asset deleted file mode 100644 index 8a2b6527c..000000000 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/TangledRopeB.asset +++ /dev/null @@ -1,2167 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &-5578146735436999353 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 775ad4994fda946d1a5936c7e2dfc785, type: 3} - m_Name: start - m_EditorClassIdentifier: - particleIndices: 00000000 - m_Blueprint: {fileID: 11400000} ---- !u!114 &-2046351418314356755 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 775ad4994fda946d1a5936c7e2dfc785, type: 3} - m_Name: midpoint - m_EditorClassIdentifier: - particleIndices: 2d000000 - m_Blueprint: {fileID: 11400000} ---- !u!114 &-989080574850500197 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 775ad4994fda946d1a5936c7e2dfc785, type: 3} - m_Name: midpoint - m_EditorClassIdentifier: - particleIndices: 1e000000 - m_Blueprint: {fileID: 11400000} ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8f7e67b5626124d0db9886e6cd2aacff, type: 3} - m_Name: TangledRopeB - m_EditorClassIdentifier: - m_Checksum: 4272761147 - m_Empty: 0 - m_Edited: 0 - m_ActiveParticleCount: 52 - m_InitialActiveParticleCount: 52 - _bounds: - m_Center: {x: -3.1451473, y: 0.42696542, z: 0.326636} - m_Extent: {x: 3.982854, y: 0.60912204, z: 0.33384508} - positions: - - {x: -7.128001, y: -0.18215662, z: -0.0072091073} - - {x: -7.110644, y: 0.046492063, z: -0.004235216} - - {x: -7.112087, y: 0.27946392, z: -0.003168466} - - {x: -6.967004, y: 0.44524708, z: -0.0024608832} - - {x: -6.746515, y: 0.51886034, z: -0.0014611222} - - {x: -6.517232, y: 0.5587801, z: -0.0005535499} - - {x: -6.2856317, y: 0.5753186, z: 0.00000030310753} - - {x: -6.0508056, y: 0.5967075, z: 0.014578037} - - {x: -5.8127785, y: 0.6303738, z: 0.038619842} - - {x: -5.5786123, y: 0.6664038, z: 0.065557696} - - {x: -5.343291, y: 0.703556, z: 0.094631754} - - {x: -5.1080875, y: 0.7407634, z: 0.12516959} - - {x: -4.8731565, y: 0.7774795, z: 0.15687881} - - {x: -4.6383657, y: 0.81334656, z: 0.18962723} - - {x: -4.4035645, y: 0.8480662, z: 0.22335649} - - {x: -4.1686616, y: 0.8813429, z: 0.258047} - - {x: -3.9336097, y: 0.91285694, z: 0.29370862} - - {x: -3.698405, y: 0.9422396, z: 0.33037657} - - {x: -3.463059, y: 0.969048, z: 0.36811695} - - {x: -3.2275805, y: 0.9927272, z: 0.4070361} - - {x: -2.9919763, y: 1.0125476, z: 0.4472947} - - {x: -2.7562726, y: 1.0274978, z: 0.4891299} - - {x: -2.5206366, y: 1.0360874, z: 0.53288245} - - {x: -2.2856746, y: 1.0359741, z: 0.5790347} - - {x: -2.0532713, y: 1.0232084, z: 0.62824124} - - {x: -1.8372118, y: 0.9835624, z: 0.6604811} - - {x: -1.6321735, y: 0.90108556, z: 0.6579455} - - {x: -1.4562513, y: 0.7728136, z: 0.61916214} - - {x: -1.3404022, y: 0.59954304, z: 0.54878366} - - {x: -1.3546207, y: 0.3996303, z: 0.47116175} - - {x: -1.534322, y: 0.28091896, z: 0.4576921} - - {x: -1.7630432, y: 0.21777476, z: 0.43006274} - - {x: -1.9682634, y: 0.18458468, z: 0.31211793} - - {x: -2.0959961, y: 0.2574428, z: 0.13303305} - - {x: -2.0606725, y: 0.46086863, z: 0.023625536} - - {x: -1.955595, y: 0.6764369, z: -0.000000012831828} - - {x: -1.8296608, y: 0.82206404, z: -0.00000003718497} - - {x: -1.6540803, y: 0.90137595, z: -0.00000007430123} - - {x: -1.461545, y: 0.920599, z: -0.00000011435198} - - {x: -1.2272371, y: 0.8977013, z: -0.00000014885372} - - {x: -0.9958299, y: 0.85044724, z: -0.0000001686406} - - {x: -0.7672874, y: 0.7920108, z: -0.00000018060453} - - {x: -0.5398485, y: 0.7285715, z: -0.0000001880549} - - {x: -0.31268987, y: 0.66505486, z: -0.00000019312797} - - {x: -0.0838832, y: 0.60781837, z: -0.00000019809042} - - {x: 0.14938739, y: 0.5752957, z: -0.00000020822299} - - {x: 0.35008463, y: 0.5520913, z: -0.000055381635} - - {x: 0.5452084, y: 0.49813592, z: -0.00015747292} - - {x: 0.7269932, y: 0.40972093, z: -0.0002730452} - - {x: 0.83770674, y: 0.25, z: -0.00035118576} - - {x: 0.8315842, y: 0.048615772, z: -0.00025259334} - - {x: 0.8333746, y: -0.15, z: -0.0000010117751} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - restPositions: - - {x: -7.128001, y: -0.18215662, z: -0.0072091073, w: 1} - - {x: -7.110644, y: 0.046492063, z: -0.004235216, w: 1} - - {x: -7.112087, y: 0.27946392, z: -0.003168466, w: 1} - - {x: -6.967004, y: 0.44524708, z: -0.0024608832, w: 1} - - {x: -6.746515, y: 0.51886034, z: -0.0014611222, w: 1} - - {x: -6.517232, y: 0.5587801, z: -0.0005535499, w: 1} - - {x: -6.2856317, y: 0.5753186, z: 0.00000030310753, w: 1} - - {x: -6.0508056, y: 0.5967075, z: 0.014578037, w: 1} - - {x: -5.8127785, y: 0.6303738, z: 0.038619842, w: 1} - - {x: -5.5786123, y: 0.6664038, z: 0.065557696, w: 1} - - {x: -5.343291, y: 0.703556, z: 0.094631754, w: 1} - - {x: -5.1080875, y: 0.7407634, z: 0.12516959, w: 1} - - {x: -4.8731565, y: 0.7774795, z: 0.15687881, w: 1} - - {x: -4.6383657, y: 0.81334656, z: 0.18962723, w: 1} - - {x: -4.4035645, y: 0.8480662, z: 0.22335649, w: 1} - - {x: -4.1686616, y: 0.8813429, z: 0.258047, w: 1} - - {x: -3.9336097, y: 0.91285694, z: 0.29370862, w: 1} - - {x: -3.698405, y: 0.9422396, z: 0.33037657, w: 1} - - {x: -3.463059, y: 0.969048, z: 0.36811695, w: 1} - - {x: -3.2275805, y: 0.9927272, z: 0.4070361, w: 1} - - {x: -2.9919763, y: 1.0125476, z: 0.4472947, w: 1} - - {x: -2.7562726, y: 1.0274978, z: 0.4891299, w: 1} - - {x: -2.5206366, y: 1.0360874, z: 0.53288245, w: 1} - - {x: -2.2856746, y: 1.0359741, z: 0.5790347, w: 1} - - {x: -2.0532713, y: 1.0232084, z: 0.62824124, w: 1} - - {x: -1.8372118, y: 0.9835624, z: 0.6604811, w: 1} - - {x: -1.6321735, y: 0.90108556, z: 0.6579455, w: 1} - - {x: -1.4562513, y: 0.7728136, z: 0.61916214, w: 1} - - {x: -1.3404022, y: 0.59954304, z: 0.54878366, w: 1} - - {x: -1.3546207, y: 0.3996303, z: 0.47116175, w: 1} - - {x: -1.534322, y: 0.28091896, z: 0.4576921, w: 1} - - {x: -1.7630432, y: 0.21777476, z: 0.43006274, w: 1} - - {x: -1.9682634, y: 0.18458468, z: 0.31211793, w: 1} - - {x: -2.0959961, y: 0.2574428, z: 0.13303305, w: 1} - - {x: -2.0606725, y: 0.46086863, z: 0.023625536, w: 1} - - {x: -1.955595, y: 0.6764369, z: -0.000000012831828, w: 1} - - {x: -1.8296608, y: 0.82206404, z: -0.00000003718497, w: 1} - - {x: -1.6540803, y: 0.90137595, z: -0.00000007430123, w: 1} - - {x: -1.461545, y: 0.920599, z: -0.00000011435198, w: 1} - - {x: -1.2272371, y: 0.8977013, z: -0.00000014885372, w: 1} - - {x: -0.9958299, y: 0.85044724, z: -0.0000001686406, w: 1} - - {x: -0.7672874, y: 0.7920108, z: -0.00000018060453, w: 1} - - {x: -0.5398485, y: 0.7285715, z: -0.0000001880549, w: 1} - - {x: -0.31268987, y: 0.66505486, z: -0.00000019312797, w: 1} - - {x: -0.0838832, y: 0.60781837, z: -0.00000019809042, w: 1} - - {x: 0.14938739, y: 0.5752957, z: -0.00000020822299, w: 1} - - {x: 0.35008463, y: 0.5520913, z: -0.000055381635, w: 1} - - {x: 0.5452084, y: 0.49813592, z: -0.00015747292, w: 1} - - {x: 0.7269932, y: 0.40972093, z: -0.0002730452, w: 1} - - {x: 0.83770674, y: 0.25, z: -0.00035118576, w: 1} - - {x: 0.8315842, y: 0.048615772, z: -0.00025259334, w: 1} - - {x: 0.8333746, y: -0.15, z: -0.0000010117751, w: 1} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - restNormals: [] - orientations: [] - restOrientations: [] - velocities: - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - angularVelocities: [] - invMasses: - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 5 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - invRotationalMasses: [] - filters: 0100fdff0100fdff0100fdff0100fdff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100fdff0100fdff0100fdff0100fdff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - principalRadii: - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.20000003, y: 0.20000003, z: 0.20000003} - - {x: 0.20000003, y: 0.20000003, z: 0.20000003} - - {x: 0.20000003, y: 0.20000003, z: 0.20000003} - - {x: 0.20000003, y: 0.20000003, z: 0.20000003} - - {x: 0.20000003, y: 0.20000003, z: 0.20000003} - - {x: 0.20000003, y: 0.20000003, z: 0.20000003} - - {x: 0.20000003, y: 0.20000003, z: 0.20000003} - - {x: 0.20000003, y: 0.20000003, z: 0.20000003} - - {x: 0.20000003, y: 0.20000003, z: 0.20000003} - - {x: 0.20000003, y: 0.20000003, z: 0.20000003} - - {x: 0.20000003, y: 0.20000003, z: 0.20000003} - - {x: 0.20000003, y: 0.20000003, z: 0.20000003} - - {x: 0.20000003, y: 0.20000003, z: 0.20000003} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0.2, y: 0.2, z: 0.2} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - colors: - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - points: - edges: 000000000100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000a0000000a0000000b0000000b0000000c0000000c0000000d0000000d0000000e0000000e0000000f0000000f00000010000000100000001100000011000000120000001200000013000000130000001400000014000000150000001500000016000000160000001700000017000000180000001800000019000000190000001a0000001a0000001b0000001b0000001c0000001c0000001d0000001d0000001e0000001e0000001f0000001f00000020000000200000002100000021000000220000002200000023000000230000002400000024000000250000002500000026000000260000002700000027000000280000002800000029000000290000002a0000002a0000002b0000002b0000002c0000002c0000002d0000002d0000002e0000002e0000002f0000002f00000030000000300000003100000031000000320000003200000033000000 - triangles: - distanceConstraintsData: - batches: - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000 - m_ConstraintCount: 51 - m_ActiveConstraintCount: 26 - m_InitialActiveConstraintCount: 26 - particleIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - restLengths: - serializedContents: - - 0.22932585 - - 0.22030348 - - 0.23273383 - - 0.23624836 - - 0.2384483 - - 0.24007817 - - 0.23976159 - - 0.23977098 - - 0.23985231 - - 0.23984471 - - 0.23985398 - - 0.23945183 - - 0.22202003 - - 0.2211481 - - 0.21492423 - - 0.23888057 - - 0.2317226 - - 0.24097537 - - 0.19266264 - - 0.23542406 - - 0.2358951 - - 0.23587158 - - 0.23552683 - - 0.20244622 - - 0.1943406 - - 0.198624 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - m_AlignBytes: 16 - stiffnesses: - serializedContents: - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - m_AlignBytes: 16 - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f0000003000000031000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f0000003000000031000000 - m_ConstraintCount: 50 - m_ActiveConstraintCount: 25 - m_InitialActiveConstraintCount: 25 - particleIndices: - serializedContents: 0100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f0000003000000031000000320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - restLengths: - serializedContents: - - 0.23297876 - - 0.23245499 - - 0.2321907 - - 0.24159537 - - 0.24000376 - - 0.23988771 - - 0.23973894 - - 0.23982133 - - 0.2398558 - - 0.2398395 - - 0.23981741 - - 0.23789816 - - 0.22101939 - - 0.21999277 - - 0.21579246 - - 0.23901443 - - 0.23366606 - - 0.19252713 - - 0.19349253 - - 0.23618267 - - 0.2361207 - - 0.23585697 - - 0.20203424 - - 0.20214584 - - 0.2014773 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - m_AlignBytes: 16 - stiffnesses: - serializedContents: - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - m_AlignBytes: 16 - bendConstraintsData: - batches: - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f0000002000000021000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f0000002000000021000000 - m_ConstraintCount: 34 - m_ActiveConstraintCount: 17 - m_InitialActiveConstraintCount: 17 - particleIndices: - serializedContents: 000000000200000001000000030000000500000004000000060000000800000007000000090000000b0000000a0000000c0000000e0000000d0000000f0000001100000010000000120000001400000013000000150000001700000016000000180000001a000000190000001b0000001d0000001c0000001e000000200000001f0000002100000023000000220000002400000026000000250000002700000029000000280000002a0000002c0000002b0000002d0000002f0000002e000000300000003200000031000000330000003500000034000000360000003800000037000000390000003b0000003a0000003c0000003e0000003d0000003f0000004100000040000000420000004400000043000000450000004700000046000000480000004a000000490000004b0000004d0000004c0000004e000000500000004f0000005100000053000000520000005400000056000000550000005700000059000000580000005a0000005c0000005b0000005d0000005f0000005e000000600000006200000061000000630000006500000064000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - restBends: - serializedContents: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - m_AlignBytes: 16 - bendingStiffnesses: - serializedContents: - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - m_AlignBytes: 16 - plasticity: - serializedContents: - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - m_AlignBytes: 16 - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f00000020000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f00000020000000 - m_ConstraintCount: 33 - m_ActiveConstraintCount: 17 - m_InitialActiveConstraintCount: 17 - particleIndices: - serializedContents: 0100000003000000020000000400000006000000050000000700000009000000080000000a0000000c0000000b0000000d0000000f0000000e000000100000001200000011000000130000001500000014000000160000001800000017000000190000001b0000001a0000001c0000001e0000001d0000001f0000002100000020000000220000002400000023000000250000002700000026000000280000002a000000290000002b0000002d0000002c0000002e000000300000002f0000003100000033000000320000003400000036000000350000003700000039000000380000003a0000003c0000003b0000003d0000003f0000003e000000400000004200000041000000430000004500000044000000460000004800000047000000490000004b0000004a0000004c0000004e0000004d0000004f0000005100000050000000520000005400000053000000550000005700000056000000580000005a000000590000005b0000005d0000005c0000005e000000600000005f000000610000006300000062000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - restBends: - serializedContents: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - m_AlignBytes: 16 - bendingStiffnesses: - serializedContents: - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - m_AlignBytes: 16 - plasticity: - serializedContents: - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - m_AlignBytes: 16 - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f00000020000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f00000020000000 - m_ConstraintCount: 33 - m_ActiveConstraintCount: 16 - m_InitialActiveConstraintCount: 16 - particleIndices: - serializedContents: 020000000400000003000000050000000700000006000000080000000a000000090000000b0000000d0000000c0000000e000000100000000f0000001100000013000000120000001400000016000000150000001700000019000000180000001a0000001c0000001b0000001d0000001f0000001e000000200000002200000021000000230000002500000024000000260000002800000027000000290000002b0000002a0000002c0000002e0000002d0000002f0000003100000030000000320000003400000033000000350000003700000036000000380000003a000000390000003b0000003d0000003c0000003e000000400000003f0000004100000043000000420000004400000046000000450000004700000049000000480000004a0000004c0000004b0000004d0000004f0000004e000000500000005200000051000000530000005500000054000000560000005800000057000000590000005b0000005a0000005c0000005e0000005d0000005f0000006100000060000000620000006400000063000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - restBends: - serializedContents: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - m_AlignBytes: 16 - bendingStiffnesses: - serializedContents: - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - m_AlignBytes: 16 - plasticity: - serializedContents: - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - m_AlignBytes: 16 - skinConstraintsData: - batches: [] - tetherConstraintsData: - batches: [] - stretchShearConstraintsData: - batches: [] - bendTwistConstraintsData: - batches: [] - shapeMatchingConstraintsData: - batches: [] - aerodynamicConstraintsData: - batches: - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000 - m_ConstraintCount: 102 - m_ActiveConstraintCount: 52 - m_InitialActiveConstraintCount: 52 - particleIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - aerodynamicCoeffs: - serializedContents: - - 0.4 - - 1 - - 1 - - 0.40000007 - - 1 - - 1 - - 0.40000007 - - 1 - - 1 - - 0.40000007 - - 1 - - 1 - - 0.40000007 - - 1 - - 1 - - 0.40000007 - - 1 - - 1 - - 0.40000007 - - 1 - - 1 - - 0.40000007 - - 1 - - 1 - - 0.40000007 - - 1 - - 1 - - 0.40000007 - - 1 - - 1 - - 0.40000007 - - 1 - - 1 - - 0.40000007 - - 1 - - 1 - - 0.40000007 - - 1 - - 1 - - 0.40000007 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0.4 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - m_AlignBytes: 16 - chainConstraintsData: - batches: [] - volumeConstraintsData: - batches: [] - groups: - - {fileID: -5578146735436999353} - - {fileID: 946642936072572879} - - {fileID: 8187103611661320772} - - {fileID: 167881786889062980} - - {fileID: -989080574850500197} - - {fileID: 7678280758968765964} - - {fileID: 8483651149211343572} - - {fileID: -2046351418314356755} - - {fileID: 7266446776975833462} - - {fileID: 870036912147276740} - path: - m_Names: - - start - - start2 - - midpoint - - midpoint - - midpoint - - midpoint - - midpoint - - midpoint - - end2 - - end - m_Points: - data: - - tangentMode: 0 - inTangent: {x: -0.25, y: -0, z: -0} - position: {x: -7.128001, y: -0.18215662, z: -0.0072091073} - outTangent: {x: 0.025, y: 0, z: 0} - - tangentMode: 0 - inTangent: {x: 0, y: -0.25, z: 0} - position: {x: -7.112087, y: 0.27946392, z: -0.003168466} - outTangent: {x: -0, y: 0.22555779, z: -0} - - tangentMode: 0 - inTangent: {x: -0.20267248, y: 0.00000071525574, z: 0.000000015592377} - position: {x: -6.2856317, y: 0.5753186, z: 0.00000030310753} - outTangent: {x: 0.41597176, y: -0.0000014680147, z: -0.000000032002315} - - tangentMode: 0 - inTangent: {x: -1.1864614, y: 0.10884279, z: -0.2632654} - position: {x: -2.0532713, y: 1.0232084, z: 0.62824124} - outTangent: {x: 0.6693034, y: -0.061400115, z: 0.14851254} - - tangentMode: 0 - inTangent: {x: 0.44121885, y: 0.12349558, z: -0.048229456} - position: {x: -1.534322, y: 0.28091896, z: 0.4576921} - outTangent: {x: -0.41183907, y: -0.11527228, z: 0.045017965} - - tangentMode: 0 - inTangent: {x: -0.35811067, y: -0.64493895, z: 0.00000006169988} - position: {x: -1.955595, y: 0.6764369, z: -0.000000012831828} - outTangent: {x: 0.12015426, y: 0.21639168, z: -0.00000002070171} - - tangentMode: 0 - inTangent: {x: -0.15856731, y: 0.0012403727, z: 0.00000003133149} - position: {x: -1.461545, y: 0.920599, z: -0.00000011435198} - outTangent: {x: 0.4626102, y: -0.0036187097, z: -0.00000009140766} - - tangentMode: 0 - inTangent: {x: -0.3226446, y: 0.0000011413737, z: 0.00000002473672} - position: {x: 0.14938739, y: 0.5752957, z: -0.00000020822299} - outTangent: {x: 0.21903828, y: -0.0000007748604, z: -0.000000016793365} - - tangentMode: 0 - inTangent: {x: -0, y: 0.19749527, z: -0} - position: {x: 0.83770674, y: 0.25, z: -0.00035118576} - outTangent: {x: 0, y: -0.20007968, z: 0} - - tangentMode: 0 - inTangent: {x: -0.0205369, y: 0, z: 0} - position: {x: 0.8333746, y: -0.15, z: -0.0000010117751} - outTangent: {x: 0.25, y: -0, z: -0} - m_Normals: - data: - - {x: 0, y: 1, z: 0} - - {x: 0, y: 1.0000001, z: 0} - - {x: 0, y: 1.0000001, z: 0} - - {x: 0, y: 1, z: 0} - - {x: 0, y: 1, z: 0} - - {x: 0, y: 1, z: 0} - - {x: 0, y: 1, z: 0} - - {x: 0, y: 1, z: 0} - - {x: 0, y: 1, z: 0} - - {x: 0, y: 1, z: 0} - m_Colors: - data: - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - m_Thickness: - data: - - 1 - - 1.0000001 - - 1.0000001 - - 1 - - 1 - - 1 - - 1 - - 1 - - 1 - - 1 - m_Masses: - data: - - 0.2 - - 0.2 - - 0.2 - - 0.2 - - 0.2 - - 0.2 - - 0.2 - - 0.2 - - 0.2 - - 0.2 - m_RotationalMasses: - data: - - 1 - - 1.0000001 - - 1.0000001 - - 1 - - 1 - - 1 - - 1 - - 1 - - 1 - - 1 - m_Filters: - data: 0100fdff0100fdff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100fdff0100fdff - m_Closed: 0 - m_ArcLengthTable: - - 0 - - 0.0037205683 - - 0.008849709 - - 0.016145132 - - 0.025771715 - - 0.037721887 - - 0.051931433 - - 0.06831314 - - 0.086768895 - - 0.107194826 - - 0.12948374 - - 0.15352644 - - 0.17921244 - - 0.20643044 - - 0.23506862 - - 0.26501483 - - 0.29615673 - - 0.3283819 - - 0.36157787 - - 0.39563224 - - 0.43043274 - - 0.4658673 - - 0.49740747 - - 0.5289569 - - 0.5621655 - - 0.5980528 - - 0.63709 - - 0.6793595 - - 0.7246906 - - 0.772752 - - 0.82310903 - - 0.8752594 - - 0.92865527 - - 0.9827171 - - 1.0368432 - - 1.0904157 - - 1.142805 - - 1.1933724 - - 1.2414728 - - 1.2864566 - - 1.3276703 - - 1.3644593 - - 1.3961692 - - 1.4704173 - - 1.5730475 - - 1.7018433 - - 1.854423 - - 2.028349 - - 2.2211592 - - 2.4303818 - - 2.6535406 - - 2.888159 - - 3.1317625 - - 3.3818812 - - 3.636051 - - 3.8918173 - - 4.146738 - - 4.3983874 - - 4.644363 - - 4.8822927 - - 5.1098504 - - 5.3247747 - - 5.524903 - - 5.708228 - - 5.803719 - - 5.8939695 - - 5.979569 - - 6.0610023 - - 6.1386485 - - 6.2127833 - - 6.2835865 - - 6.3511567 - - 6.4155293 - - 6.4767027 - - 6.5346694 - - 6.5894575 - - 6.6411858 - - 6.690132 - - 6.736819 - - 6.782097 - - 6.827202 - - 6.8737264 - - 6.9234953 - - 6.9783883 - - 7.0401926 - - 7.101038 - - 7.1608686 - - 7.2197876 - - 7.277743 - - 7.3345656 - - 7.390011 - - 7.443796 - - 7.4956484 - - 7.5453553 - - 7.5928326 - - 7.638208 - - 7.681925 - - 7.7248454 - - 7.768304 - - 7.814051 - - 7.864078 - - 7.920398 - - 7.9848976 - - 8.059276 - - 8.145056 - - 8.243618 - - 8.27821 - - 8.311398 - - 8.343369 - - 8.3743 - - 8.404354 - - 8.433676 - - 8.462392 - - 8.490608 - - 8.518412 - - 8.545866 - - 8.573015 - - 8.599885 - - 8.626483 - - 8.652799 - - 8.678808 - - 8.704474 - - 8.729748 - - 8.754569 - - 8.77887 - - 8.802573 - - 8.825596 - - 8.894125 - - 8.9673 - - 9.044697 - - 9.125815 - - 9.210107 - - 9.296987 - - 9.385845 - - 9.476054 - - 9.566975 - - 9.657956 - - 9.748343 - - 9.837478 - - 9.9247 - - 10.009351 - - 10.090778 - - 10.168338 - - 10.241399 - - 10.309353 - - 10.371628 - - 10.427712 - - 10.477199 - - 10.510129 - - 10.546078 - - 10.584639 - - 10.625396 - - 10.667927 - - 10.711806 - - 10.756612 - - 10.801922 - - 10.847323 - - 10.892411 - - 10.936792 - - 10.980093 - - 11.021963 - - 11.06209 - - 11.100209 - - 11.136132 - - 11.169779 - - 11.201227 - - 11.230785 - - 11.259065 - - 11.28703 - - 11.315591 - - 11.344023 - - 11.372199 - - 11.399991 - - 11.427269 - - 11.453903 - - 11.479762 - - 11.504715 - - 11.52863 - - 11.551376 - - 11.572822 - - 11.592835 - - 11.611287 - - 11.628047 - - 11.642988 - - 11.655988 - - 11.66693 - - 11.675718 - - 11.682297 - - 11.68676 - - 11.689809 - m_TotalSplineLenght: 11.689809 - OnPathChanged: - m_PersistentCalls: - m_Calls: [] - OnControlPointAdded: - m_PersistentCalls: - m_Calls: [] - OnControlPointRemoved: - m_PersistentCalls: - m_Calls: [] - OnControlPointRenamed: - m_PersistentCalls: - m_Calls: [] - thickness: 0.2 - resolution: 0.8 - m_InterParticleDistance: 0.22921194 - totalParticles: 102 - m_RestLength: 23.08213 - deformableEdges: 000000000100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000a0000000a0000000b0000000b0000000c0000000c0000000d0000000d0000000e0000000e0000000f0000000f00000010000000100000001100000011000000120000001200000013000000130000001400000014000000150000001500000016000000160000001700000017000000180000001800000019000000190000001a0000001a0000001b0000001b0000001c0000001c0000001d0000001d0000001e0000001e0000001f0000001f00000020000000200000002100000021000000220000002200000023000000230000002400000024000000250000002500000026000000260000002700000027000000280000002800000029000000290000002a0000002a0000002b0000002b0000002c0000002c0000002d0000002d0000002e0000002e0000002f0000002f00000030000000300000003100000031000000320000003200000033000000 - restLengths: - - 0.22932585 - - 0.23297876 - - 0.22030348 - - 0.23245499 - - 0.23273383 - - 0.2321907 - - 0.23624836 - - 0.24159537 - - 0.2384483 - - 0.24000376 - - 0.24007817 - - 0.23988771 - - 0.23976159 - - 0.23973894 - - 0.23977098 - - 0.23982133 - - 0.23985231 - - 0.2398558 - - 0.23984471 - - 0.2398395 - - 0.23985398 - - 0.23981741 - - 0.23945183 - - 0.23789816 - - 0.22202003 - - 0.22101939 - - 0.2211481 - - 0.21999277 - - 0.21492423 - - 0.21579246 - - 0.23888057 - - 0.23901443 - - 0.2317226 - - 0.23366606 - - 0.24097537 - - 0.19252713 - - 0.19266264 - - 0.19349253 - - 0.23542406 - - 0.23618267 - - 0.2358951 - - 0.2361207 - - 0.23587158 - - 0.23585697 - - 0.23552683 - - 0.20203424 - - 0.20244622 - - 0.20214584 - - 0.1943406 - - 0.2014773 - - 0.198624 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0.22921194 - - 0 - pooledParticles: 50 ---- !u!114 &167881786889062980 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 775ad4994fda946d1a5936c7e2dfc785, type: 3} - m_Name: midpoint - m_EditorClassIdentifier: - particleIndices: 18000000 - m_Blueprint: {fileID: 11400000} ---- !u!114 &870036912147276740 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 775ad4994fda946d1a5936c7e2dfc785, type: 3} - m_Name: end - m_EditorClassIdentifier: - particleIndices: 33000000 - m_Blueprint: {fileID: 11400000} ---- !u!114 &946642936072572879 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 775ad4994fda946d1a5936c7e2dfc785, type: 3} - m_Name: start2 - m_EditorClassIdentifier: - particleIndices: 02000000 - m_Blueprint: {fileID: 11400000} ---- !u!114 &7266446776975833462 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 775ad4994fda946d1a5936c7e2dfc785, type: 3} - m_Name: end2 - m_EditorClassIdentifier: - particleIndices: 31000000 - m_Blueprint: {fileID: 11400000} ---- !u!114 &7678280758968765964 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 775ad4994fda946d1a5936c7e2dfc785, type: 3} - m_Name: midpoint - m_EditorClassIdentifier: - particleIndices: 23000000 - m_Blueprint: {fileID: 11400000} ---- !u!114 &8187103611661320772 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 775ad4994fda946d1a5936c7e2dfc785, type: 3} - m_Name: midpoint - m_EditorClassIdentifier: - particleIndices: 06000000 - m_Blueprint: {fileID: 11400000} ---- !u!114 &8483651149211343572 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 775ad4994fda946d1a5936c7e2dfc785, type: 3} - m_Name: midpoint - m_EditorClassIdentifier: - particleIndices: 26000000 - m_Blueprint: {fileID: 11400000} diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Tearable cable.asset b/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Tearable cable.asset index 1b41dc208..7ffeafc6f 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Tearable cable.asset +++ b/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Tearable cable.asset @@ -26,9 +26,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 8f7e67b5626124d0db9886e6cd2aacff, type: 3} m_Name: Tearable cable m_EditorClassIdentifier: - m_Checksum: 772348344 m_Empty: 0 - m_Edited: 0 m_ActiveParticleCount: 12 m_InitialActiveParticleCount: 12 _bounds: @@ -260,7 +258,6 @@ MonoBehaviour: - {x: 0, y: 0, z: 0, w: 0} - {x: 0, y: 0, z: 0, w: 0} - {x: 0, y: 0, z: 0, w: 0} - restNormals: [] orientations: [] restOrientations: [] velocities: @@ -1382,357 +1379,7 @@ MonoBehaviour: shapeMatchingConstraintsData: batches: [] aerodynamicConstraintsData: - batches: - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000 - m_ConstraintCount: 112 - m_ActiveConstraintCount: 12 - m_InitialActiveConstraintCount: 12 - particleIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - aerodynamicCoeffs: - serializedContents: - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - m_AlignBytes: 16 + batches: [] chainConstraintsData: batches: [] volumeConstraintsData: @@ -1882,7 +1529,6 @@ MonoBehaviour: m_InterParticleDistance: 0.18181817 totalParticles: 112 m_RestLength: 20.181805 - deformableEdges: 000000000100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000a0000000a0000000b000000 restLengths: - 0.18198538 - 0.18199486 diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Very long cable.asset b/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Very long cable.asset index c4cb04c62..0fbf4dfda 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Very long cable.asset +++ b/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Very long cable.asset @@ -40,9 +40,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 8f7e67b5626124d0db9886e6cd2aacff, type: 3} m_Name: Very long cable m_EditorClassIdentifier: - m_Checksum: 3372886816 m_Empty: 0 - m_Edited: 0 m_ActiveParticleCount: 22 m_InitialActiveParticleCount: 22 _bounds: @@ -294,7 +292,6 @@ MonoBehaviour: - {x: 0, y: 0, z: 0, w: 0} - {x: 0, y: 0, z: 0, w: 0} - {x: 0, y: 0, z: 0, w: 0} - restNormals: [] orientations: [] restOrientations: [] velocities: @@ -1506,387 +1503,7 @@ MonoBehaviour: shapeMatchingConstraintsData: batches: [] aerodynamicConstraintsData: - batches: - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f00000070000000710000007200000073000000740000007500000076000000770000007800000079000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f00000070000000710000007200000073000000740000007500000076000000770000007800000079000000 - m_ConstraintCount: 122 - m_ActiveConstraintCount: 22 - m_InitialActiveConstraintCount: 22 - particleIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f00000070000000710000007200000073000000740000007500000076000000770000007800000079000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - aerodynamicCoeffs: - serializedContents: - - 0.2 - - 1 - - 1 - - 0.19999999 - - 1 - - 1 - - 0.20000003 - - 1 - - 1 - - 0.19999999 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.19999999 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.20000003 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - m_AlignBytes: 16 + batches: [] chainConstraintsData: batches: [] volumeConstraintsData: @@ -1972,7 +1589,6 @@ MonoBehaviour: m_InterParticleDistance: 0.19118178 totalParticles: 122 m_RestLength: 23.132986 - deformableEdges: 000000000100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000a0000000a0000000b0000000b0000000c0000000c0000000d0000000d0000000e0000000e0000000f0000000f0000001000000010000000110000001100000012000000120000001300000013000000140000001400000015000000 restLengths: - 0.19104075 - 0.18882072 diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Vine 2.asset b/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Vine 2.asset deleted file mode 100644 index 7ca807ba7..000000000 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Vine 2.asset +++ /dev/null @@ -1,2400 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &-8989604677470270896 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 775ad4994fda946d1a5936c7e2dfc785, type: 3} - m_Name: center - m_EditorClassIdentifier: - particleIndices: 13000000 - m_Blueprint: {fileID: 11400000} ---- !u!114 &-5470652867224400354 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 775ad4994fda946d1a5936c7e2dfc785, type: 3} - m_Name: top - m_EditorClassIdentifier: - particleIndices: 26000000 - m_Blueprint: {fileID: 11400000} ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8f7e67b5626124d0db9886e6cd2aacff, type: 3} - m_Name: Vine 2 - m_EditorClassIdentifier: - m_Checksum: 2933237936 - m_Empty: 0 - m_Edited: 0 - m_ActiveParticleCount: 39 - m_InitialActiveParticleCount: 39 - _bounds: - m_Center: {x: -0.13760316, y: -2.5536022, z: 0} - m_Extent: {x: 1.1376032, y: 2.5536022, z: 0} - positions: - - {x: 0.96996313, y: -5.107205, z: 0} - - {x: 0.77585936, y: -5.0917664, z: 0} - - {x: 0.5853751, y: -5.0489855, z: 0} - - {x: 0.40092805, y: -4.9837627, z: 0} - - {x: 0.22411427, y: -4.900305, z: 0} - - {x: 0.0555973, y: -4.8018746, z: 0} - - {x: -0.104893796, y: -4.690529, z: 0} - - {x: -0.2571493, y: -4.568012, z: 0} - - {x: -0.40098032, y: -4.4356422, z: 0} - - {x: -0.5361557, y: -4.294423, z: 0} - - {x: -0.6623605, y: -4.1451325, z: 0} - - {x: -0.77916914, y: -3.9883897, z: 0} - - {x: -0.88602376, y: -3.8247135, z: 0} - - {x: -0.982217, y: -3.6545708, z: 0} - - {x: -1.0668766, y: -3.4784276, z: 0} - - {x: -1.1389573, y: -3.2968006, z: 0} - - {x: -1.1972404, y: -3.110317, z: 0} - - {x: -1.240356, y: -2.9197817, z: 0} - - {x: -1.2668345, y: -2.7262506, z: 0} - - {x: -1.2752063, y: -2.531094, z: 0} - - {x: -1.2646158, y: -2.3368843, z: 0} - - {x: -1.235973, y: -2.144515, z: 0} - - {x: -1.1906734, y: -1.9553604, z: 0} - - {x: -1.1301485, y: -1.7704902, z: 0} - - {x: -1.0557597, y: -1.5907209, z: 0} - - {x: -0.9687379, y: -1.4166888, z: 0} - - {x: -0.8701547, y: -1.2489107, z: 0} - - {x: -0.7609171, y: -1.0878459, z: 0} - - {x: -0.641774, y: -0.9339486, z: 0} - - {x: -0.5133291, y: -0.7877161, z: 0} - - {x: -0.37605792, y: -0.649738, z: 0} - - {x: -0.23032841, y: -0.5207493, z: 0} - - {x: -0.076431505, y: -0.4016968, z: 0} - - {x: 0.085382506, y: -0.2938171, z: 0} - - {x: 0.25483957, y: -0.19874041, z: 0} - - {x: 0.43221974, y: -0.11834692, z: 0} - - {x: 0.6166534, y: -0.055740125, z: 0} - - {x: 0.8066756, y: -0.014769094, z: 0} - - {x: 1, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - restPositions: - - {x: 0.96996313, y: -5.107205, z: 0, w: 1} - - {x: 0.77585936, y: -5.0917664, z: 0, w: 1} - - {x: 0.5853751, y: -5.0489855, z: 0, w: 1} - - {x: 0.40092805, y: -4.9837627, z: 0, w: 1} - - {x: 0.22411427, y: -4.900305, z: 0, w: 1} - - {x: 0.0555973, y: -4.8018746, z: 0, w: 1} - - {x: -0.104893796, y: -4.690529, z: 0, w: 1} - - {x: -0.2571493, y: -4.568012, z: 0, w: 1} - - {x: -0.40098032, y: -4.4356422, z: 0, w: 1} - - {x: -0.5361557, y: -4.294423, z: 0, w: 1} - - {x: -0.6623605, y: -4.1451325, z: 0, w: 1} - - {x: -0.77916914, y: -3.9883897, z: 0, w: 1} - - {x: -0.88602376, y: -3.8247135, z: 0, w: 1} - - {x: -0.982217, y: -3.6545708, z: 0, w: 1} - - {x: -1.0668766, y: -3.4784276, z: 0, w: 1} - - {x: -1.1389573, y: -3.2968006, z: 0, w: 1} - - {x: -1.1972404, y: -3.110317, z: 0, w: 1} - - {x: -1.240356, y: -2.9197817, z: 0, w: 1} - - {x: -1.2668345, y: -2.7262506, z: 0, w: 1} - - {x: -1.2752063, y: -2.531094, z: 0, w: 1} - - {x: -1.2646158, y: -2.3368843, z: 0, w: 1} - - {x: -1.235973, y: -2.144515, z: 0, w: 1} - - {x: -1.1906734, y: -1.9553604, z: 0, w: 1} - - {x: -1.1301485, y: -1.7704902, z: 0, w: 1} - - {x: -1.0557597, y: -1.5907209, z: 0, w: 1} - - {x: -0.9687379, y: -1.4166888, z: 0, w: 1} - - {x: -0.8701547, y: -1.2489107, z: 0, w: 1} - - {x: -0.7609171, y: -1.0878459, z: 0, w: 1} - - {x: -0.641774, y: -0.9339486, z: 0, w: 1} - - {x: -0.5133291, y: -0.7877161, z: 0, w: 1} - - {x: -0.37605792, y: -0.649738, z: 0, w: 1} - - {x: -0.23032841, y: -0.5207493, z: 0, w: 1} - - {x: -0.076431505, y: -0.4016968, z: 0, w: 1} - - {x: 0.085382506, y: -0.2938171, z: 0, w: 1} - - {x: 0.25483957, y: -0.19874041, z: 0, w: 1} - - {x: 0.43221974, y: -0.11834692, z: 0, w: 1} - - {x: 0.6166534, y: -0.055740125, z: 0, w: 1} - - {x: 0.8066756, y: -0.014769094, z: 0, w: 1} - - {x: 1, y: 0, z: 0, w: 1} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - - {x: 0, y: 0, z: 0, w: 0} - restNormals: [] - orientations: [] - restOrientations: [] - velocities: - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - angularVelocities: [] - invMasses: - - 10 - - 9.999999 - - 10 - - 10.000001 - - 10.000001 - - 9.999999 - - 9.999999 - - 9.999999 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - invRotationalMasses: [] - filters: 0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - principalRadii: - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.099999994, y: 0.099999994, z: 0.099999994} - - {x: 0.099999994, y: 0.099999994, z: 0.099999994} - - {x: 0.10000002, y: 0.10000002, z: 0.10000002} - - {x: 0.10000002, y: 0.10000002, z: 0.10000002} - - {x: 0.10000002, y: 0.10000002, z: 0.10000002} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - colors: - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 0.99999994, g: 0.99999994, b: 0.99999994, a: 0.99999994} - - {r: 0.99999994, g: 0.99999994, b: 0.99999994, a: 0.99999994} - - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - - {r: 0, g: 0, b: 0, a: 0} - points: - edges: 000000000100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000a0000000a0000000b0000000b0000000c0000000c0000000d0000000d0000000e0000000e0000000f0000000f00000010000000100000001100000011000000120000001200000013000000130000001400000014000000150000001500000016000000160000001700000017000000180000001800000019000000190000001a0000001a0000001b0000001b0000001c0000001c0000001d0000001d0000001e0000001e0000001f0000001f00000020000000200000002100000021000000220000002200000023000000230000002400000024000000250000002500000026000000 - triangles: - distanceConstraintsData: - batches: - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f0000004000000041000000420000004300000044000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f0000004000000041000000420000004300000044000000 - m_ConstraintCount: 69 - m_ActiveConstraintCount: 19 - m_InitialActiveConstraintCount: 19 - particleIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f00000020000000210000002200000023000000240000002500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - restLengths: - serializedContents: - - 0.19471678 - - 0.19563924 - - 0.19515753 - - 0.1954279 - - 0.19548716 - - 0.19548036 - - 0.19545245 - - 0.19540726 - - 0.19535266 - - 0.19533606 - - 0.19448991 - - 0.19452573 - - 0.19457635 - - 0.19461422 - - 0.19463308 - - 0.19461548 - - 0.19447827 - - 0.19474815 - - 0.19438897 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - m_AlignBytes: 16 - stiffnesses: - serializedContents: - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - m_AlignBytes: 16 - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f0000004000000041000000420000004300000044000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f0000004000000041000000420000004300000044000000 - m_ConstraintCount: 69 - m_ActiveConstraintCount: 19 - m_InitialActiveConstraintCount: 19 - particleIndices: - serializedContents: 0100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f0000002000000021000000220000002300000024000000250000002600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - restLengths: - serializedContents: - - 0.19522926 - - 0.1955207 - - 0.19533375 - - 0.19547167 - - 0.1954874 - - 0.19546823 - - 0.195432 - - 0.19537927 - - 0.195334 - - 0.19449836 - - 0.19450329 - - 0.19455256 - - 0.19459741 - - 0.19462651 - - 0.19463125 - - 0.19457068 - - 0.19430716 - - 0.19477007 - - 0.19388771 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - m_AlignBytes: 16 - stiffnesses: - serializedContents: - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - m_AlignBytes: 16 - bendConstraintsData: - batches: - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d000000 - m_ConstraintCount: 46 - m_ActiveConstraintCount: 13 - m_InitialActiveConstraintCount: 13 - particleIndices: - serializedContents: 000000000200000001000000030000000500000004000000060000000800000007000000090000000b0000000a0000000c0000000e0000000d0000000f0000001100000010000000120000001400000013000000150000001700000016000000180000001a000000190000001b0000001d0000001c0000001e000000200000001f0000002100000023000000220000002400000026000000250000002700000029000000280000002a0000002c0000002b0000002d0000002f0000002e000000300000003200000031000000330000003500000034000000360000003800000037000000390000003b0000003a0000003c0000003e0000003d0000003f0000004100000040000000420000004400000043000000450000004700000046000000480000004a000000490000004b0000004d0000004c0000004e000000500000004f0000005100000053000000520000005400000056000000550000005700000059000000580000005a0000005c0000005b0000005d0000005f0000005e000000600000006200000061000000630000006500000064000000660000006800000067000000690000006b0000006a0000006c0000006e0000006d0000006f0000007100000070000000720000007400000073000000750000007700000076000000780000007a000000790000007b0000007d0000007c0000007e000000800000007f000000810000008300000082000000840000008600000085000000870000008900000088000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - restBends: - serializedContents: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - m_AlignBytes: 16 - bendingStiffnesses: - serializedContents: - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - m_AlignBytes: 16 - plasticity: - serializedContents: - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - m_AlignBytes: 16 - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d000000 - m_ConstraintCount: 46 - m_ActiveConstraintCount: 12 - m_InitialActiveConstraintCount: 12 - particleIndices: - serializedContents: 0100000003000000020000000400000006000000050000000700000009000000080000000a0000000c0000000b0000000d0000000f0000000e000000100000001200000011000000130000001500000014000000160000001800000017000000190000001b0000001a0000001c0000001e0000001d0000001f0000002100000020000000220000002400000023000000250000002700000026000000280000002a000000290000002b0000002d0000002c0000002e000000300000002f0000003100000033000000320000003400000036000000350000003700000039000000380000003a0000003c0000003b0000003d0000003f0000003e000000400000004200000041000000430000004500000044000000460000004800000047000000490000004b0000004a0000004c0000004e0000004d0000004f0000005100000050000000520000005400000053000000550000005700000056000000580000005a000000590000005b0000005d0000005c0000005e000000600000005f0000006100000063000000620000006400000066000000650000006700000069000000680000006a0000006c0000006b0000006d0000006f0000006e000000700000007200000071000000730000007500000074000000760000007800000077000000790000007b0000007a0000007c0000007e0000007d0000007f0000008100000080000000820000008400000083000000850000008700000086000000880000008a00000089000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - restBends: - serializedContents: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - m_AlignBytes: 16 - bendingStiffnesses: - serializedContents: - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - m_AlignBytes: 16 - plasticity: - serializedContents: - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - m_AlignBytes: 16 - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c000000 - m_ConstraintCount: 45 - m_ActiveConstraintCount: 12 - m_InitialActiveConstraintCount: 12 - particleIndices: - serializedContents: 020000000400000003000000050000000700000006000000080000000a000000090000000b0000000d0000000c0000000e000000100000000f0000001100000013000000120000001400000016000000150000001700000019000000180000001a0000001c0000001b0000001d0000001f0000001e000000200000002200000021000000230000002500000024000000260000002800000027000000290000002b0000002a0000002c0000002e0000002d0000002f0000003100000030000000320000003400000033000000350000003700000036000000380000003a000000390000003b0000003d0000003c0000003e000000400000003f0000004100000043000000420000004400000046000000450000004700000049000000480000004a0000004c0000004b0000004d0000004f0000004e000000500000005200000051000000530000005500000054000000560000005800000057000000590000005b0000005a0000005c0000005e0000005d0000005f0000006100000060000000620000006400000063000000650000006700000066000000680000006a000000690000006b0000006d0000006c0000006e000000700000006f0000007100000073000000720000007400000076000000750000007700000079000000780000007a0000007c0000007b0000007d0000007f0000007e000000800000008200000081000000830000008500000084000000860000008800000087000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - restBends: - serializedContents: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - m_AlignBytes: 16 - bendingStiffnesses: - serializedContents: - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - m_AlignBytes: 16 - plasticity: - serializedContents: - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - m_AlignBytes: 16 - skinConstraintsData: - batches: [] - tetherConstraintsData: - batches: [] - stretchShearConstraintsData: - batches: [] - bendTwistConstraintsData: - batches: [] - shapeMatchingConstraintsData: - batches: [] - aerodynamicConstraintsData: - batches: - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b0000007c0000007d0000007e0000007f000000800000008100000082000000830000008400000085000000860000008700000088000000890000008a000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b0000007c0000007d0000007e0000007f000000800000008100000082000000830000008400000085000000860000008700000088000000890000008a000000 - m_ConstraintCount: 139 - m_ActiveConstraintCount: 39 - m_InitialActiveConstraintCount: 39 - particleIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b0000007c0000007d0000007e0000007f000000800000008100000082000000830000008400000085000000860000008700000088000000890000008a000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - aerodynamicCoeffs: - serializedContents: - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.19999999 - - 1 - - 1 - - 0.19999999 - - 1 - - 1 - - 0.20000003 - - 1 - - 1 - - 0.20000003 - - 1 - - 1 - - 0.20000003 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - - 0 - - 1 - - 1 - m_AlignBytes: 16 - chainConstraintsData: - batches: [] - volumeConstraintsData: - batches: [] - groups: - - {fileID: 6295150216905737680} - - {fileID: -8989604677470270896} - - {fileID: -5470652867224400354} - path: - m_Names: - - bottom - - center - - top - m_Points: - data: - - tangentMode: 0 - inTangent: {x: 0.25, y: -0, z: -0} - position: {x: 0.96996313, y: -5.107205, z: 0} - outTangent: {x: -1, y: 0, z: 0} - - tangentMode: 0 - inTangent: {x: -0.0075092316, y: -1.2843041, z: 0} - position: {x: -1.2752063, y: -2.531094, z: 0} - outTangent: {x: 0.0075092316, y: 1.284304, z: 0} - - tangentMode: 0 - inTangent: {x: -1, y: -0, z: 0} - position: {x: 1, y: 0, z: 0} - outTangent: {x: 0, y: 0, z: -0} - m_Normals: - data: - - {x: 0, y: 1, z: 0} - - {x: 0, y: 1, z: 0} - - {x: 0, y: 1, z: 0} - m_Colors: - data: - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - m_Thickness: - data: - - 1 - - 1 - - 1 - m_Masses: - data: - - 0.1 - - 0.1 - - 0.1 - m_RotationalMasses: - data: - - 1 - - 1 - - 1 - m_Filters: - data: 0200ffff0200ffff0200ffff - m_Closed: 0 - m_ArcLengthTable: - - 0 - - 0.14475408 - - 0.2938707 - - 0.44791108 - - 0.6071054 - - 0.771422 - - 0.9406286 - - 1.1143425 - - 1.2920725 - - 1.4732531 - - 1.6572719 - - 1.8434937 - - 2.0312822 - - 2.22002 - - 2.409129 - - 2.5980902 - - 2.7864668 - - 2.973928 - - 3.1602755 - - 3.345473 - - 3.5296776 - - 3.71327 - - 3.8966646 - - 4.080312 - - 4.2646503 - - 4.4498973 - - 4.6360765 - - 4.823048 - - 5.0105367 - - 5.1981564 - - 5.3854356 - - 5.571839 - - 5.756787 - - 5.9396753 - - 6.119896 - - 6.2968564 - - 6.470002 - - 6.6388435 - - 6.8029866 - - 6.962171 - - 7.116316 - - 7.2655764 - - 7.4104075 - m_TotalSplineLenght: 7.4104075 - OnPathChanged: - m_PersistentCalls: - m_Calls: [] - OnControlPointAdded: - m_PersistentCalls: - m_Calls: [] - OnControlPointRemoved: - m_PersistentCalls: - m_Calls: [] - OnControlPointRenamed: - m_PersistentCalls: - m_Calls: [] - thickness: 0.1 - resolution: 0.5 - m_InterParticleDistance: 0.19501072 - totalParticles: 139 - m_RestLength: 26.909239 - deformableEdges: 000000000100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000a0000000a0000000b0000000b0000000c0000000c0000000d0000000d0000000e0000000e0000000f0000000f00000010000000100000001100000011000000120000001200000013000000130000001400000014000000150000001500000016000000160000001700000017000000180000001800000019000000190000001a0000001a0000001b0000001b0000001c0000001c0000001d0000001d0000001e0000001e0000001f0000001f00000020000000200000002100000021000000220000002200000023000000230000002400000024000000250000002500000026000000 - restLengths: - - 0.19471678 - - 0.19522926 - - 0.19563924 - - 0.1955207 - - 0.19515753 - - 0.19533375 - - 0.1954279 - - 0.19547167 - - 0.19548716 - - 0.1954874 - - 0.19548036 - - 0.19546823 - - 0.19545245 - - 0.195432 - - 0.19540726 - - 0.19537927 - - 0.19535266 - - 0.195334 - - 0.19533606 - - 0.19449836 - - 0.19448991 - - 0.19450329 - - 0.19452573 - - 0.19455256 - - 0.19457635 - - 0.19459741 - - 0.19461422 - - 0.19462651 - - 0.19463308 - - 0.19463125 - - 0.19461548 - - 0.19457068 - - 0.19447827 - - 0.19430716 - - 0.19474815 - - 0.19477007 - - 0.19438897 - - 0.19388771 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0.19501072 - - 0 - pooledParticles: 100 ---- !u!114 &6295150216905737680 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 775ad4994fda946d1a5936c7e2dfc785, type: 3} - m_Name: bottom - m_EditorClassIdentifier: - particleIndices: 00000000 - m_Blueprint: {fileID: 11400000} diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Vine 2.asset.meta b/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Vine 2.asset.meta deleted file mode 100644 index 5abe169be..000000000 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Vine 2.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 47284b33117284d61b3df44d2620531e -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Vine.asset.meta b/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Vine.asset.meta deleted file mode 100644 index 0cabd5363..000000000 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Vine.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: b6dc10b6408e440aaa60cfca8e7dd7d1 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/WrappingRope.asset b/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/WrappingRope.asset index bccd6e55d..f8993f593 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/WrappingRope.asset +++ b/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/WrappingRope.asset @@ -26,245 +26,242 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 8f7e67b5626124d0db9886e6cd2aacff, type: 3} m_Name: WrappingRope m_EditorClassIdentifier: - m_Checksum: 3688547798 m_Empty: 0 - m_Edited: 0 m_ActiveParticleCount: 114 m_InitialActiveParticleCount: 114 _bounds: - m_Center: {x: -38.584393, y: 0.0000137847255, z: 0} - m_Extent: {x: 39.455006, y: 0.0000137847255, z: 0} + m_Center: {x: -38.609577, y: 0.000013784724, z: 0} + m_Extent: {x: 39.48019, y: 0.000013784724, z: 0} positions: - - {x: -78.0394, y: 0.000027569455, z: 0} - - {x: -77.38185, y: 0.000027351347, z: 0} - - {x: -76.75484, y: 0.000027135995, z: 0} - - {x: -75.949905, y: 0.00002685779, z: 0} - - {x: -75.33309, y: 0.000026643927, z: 0} - - {x: -74.64446, y: 0.000026404732, z: 0} - - {x: -73.88661, y: 0.00002614112, z: 0} - - {x: -73.19563, y: 0.000025900516, z: 0} - - {x: -72.53571, y: 0.00002567055, z: 0} - - {x: -71.83992, y: 0.00002542793, z: 0} - - {x: -71.109344, y: 0.000025173043, z: 0} - - {x: -70.36681, y: 0.000024913857, z: 0} - - {x: -69.71143, y: 0.000024685005, z: 0} - - {x: -69.034454, y: 0.000024448535, z: 0} - - {x: -68.33651, y: 0.000024204668, z: 0} - - {x: -67.61824, y: 0.000023953633, z: 0} - - {x: -66.880264, y: 0.000023695646, z: 0} - - {x: -66.19487, y: 0.00002345599, z: 0} - - {x: -65.52122, y: 0.000023220395, z: 0} - - {x: -64.83394, y: 0.000022979992, z: 0} - - {x: -64.13344, y: 0.000022734926, z: 0} - - {x: -63.420124, y: 0.000022485343, z: 0} - - {x: -62.694427, y: 0.00002223139, z: 0} - - {x: -61.992306, y: 0.000021985656, z: 0} - - {x: -61.315163, y: 0.000021748638, z: 0} - - {x: -60.62885, y: 0.000021508386, z: 0} - - {x: -59.933685, y: 0.00002126501, z: 0} - - {x: -59.229992, y: 0.000021018626, z: 0} - - {x: -58.51807, y: 0.000020769341, z: 0} - - {x: -57.798233, y: 0.000020517264, z: 0} - - {x: -57.102135, y: 0.000020273481, z: 0} - - {x: -56.418377, y: 0.000020034004, z: 0} - - {x: -55.728554, y: 0.000019792387, z: 0} - - {x: -55.032883, y: 0.000019548708, z: 0} - - {x: -54.331627, y: 0.000019303057, z: 0} - - {x: -53.62505, y: 0.000019055533, z: 0} - - {x: -52.913364, y: 0.000018806204, z: 0} - - {x: -52.20484, y: 0.000018557972, z: 0} - - {x: -51.517643, y: 0.000018317201, z: 0} - - {x: -50.826496, y: 0.000018075038, z: 0} - - {x: -50.131622, y: 0.00001783156, z: 0} - - {x: -49.433235, y: 0.000017586843, z: 0} - - {x: -48.731556, y: 0.000017340964, z: 0} - - {x: -48.026787, y: 0.000017093997, z: 0} - - {x: -47.319183, y: 0.000016846028, z: 0} - - {x: -46.61839, y: 0.000016600441, z: 0} - - {x: -45.925232, y: 0.000016357524, z: 0} - - {x: -45.22997, y: 0.000016113863, z: 0} - - {x: -44.532818, y: 0.000015869538, z: 0} - - {x: -43.833965, y: 0.000015624613, z: 0} - - {x: -43.13363, y: 0.000015379163, z: 0} - - {x: -42.431995, y: 0.000015133257, z: 0} - - {x: -41.72927, y: 0.000014886965, z: 0} - - {x: -41.02895, y: 0.000014641514, z: 0} - - {x: -40.33099, y: 0.000014396889, z: 0} - - {x: -39.63254, y: 0.000014152091, z: 0} - - {x: -38.933804, y: 0.000013907192, z: 0} - - {x: -38.234974, y: 0.00001366226, z: 0} - - {x: -37.536236, y: 0.00001341736, z: 0} - - {x: -36.837788, y: 0.000013172563, z: 0} - - {x: -36.139828, y: 0.000012927938, z: 0} - - {x: -35.439507, y: 0.000012682487, z: 0} - - {x: -34.736782, y: 0.000012436195, z: 0} - - {x: -34.03514, y: 0.000012190286, z: 0} - - {x: -33.3348, y: 0.000011944836, z: 0} - - {x: -32.63596, y: 0.000011699913, z: 0} - - {x: -31.93881, y: 0.000011455588, z: 0} - - {x: -31.243555, y: 0.000011211931, z: 0} - - {x: -30.55039, y: 0.000010969012, z: 0} - - {x: -29.849604, y: 0.000010723426, z: 0} - - {x: -29.141989, y: 0.0000104754545, z: 0} - - {x: -28.437225, y: 0.0000102284885, z: 0} - - {x: -27.735544, y: 0.000009982609, z: 0} - - {x: -27.037157, y: 0.0000097378925, z: 0} - - {x: -26.342283, y: 0.0000094944135, z: 0} - - {x: -25.651136, y: 0.0000092522505, z: 0} - - {x: -24.963936, y: 0.00000901148, z: 0} - - {x: -24.255404, y: 0.000008763244, z: 0} - - {x: -23.543732, y: 0.000008513922, z: 0} - - {x: -22.83715, y: 0.000008266394, z: 0} - - {x: -22.135895, y: 0.000008020745, z: 0} - - {x: -21.440226, y: 0.000007777066, z: 0} - - {x: -20.750393, y: 0.0000075354455, z: 0} - - {x: -20.066652, y: 0.0000072959747, z: 0} - - {x: -19.370548, y: 0.0000070521896, z: 0} - - {x: -18.650707, y: 0.000006800111, z: 0} - - {x: -17.93878, y: 0.0000065508225, z: 0} - - {x: -17.235085, y: 0.000006304439, z: 0} - - {x: -16.53993, y: 0.000006061068, z: 0} - - {x: -15.853621, y: 0.000005820816, z: 0} - - {x: -15.176478, y: 0.000005583798, z: 0} - - {x: -14.474341, y: 0.000005338059, z: 0} - - {x: -13.74865, y: 0.000005084108, z: 0} - - {x: -13.035345, y: 0.000004834527, z: 0} - - {x: -12.334836, y: 0.0000045894585, z: 0} - - {x: -11.6475525, y: 0.0000043490554, z: 0} - - {x: -10.973908, y: 0.000004113463, z: 0} - - {x: -10.288517, y: 0.0000038738076, z: 0} - - {x: -9.550542, y: 0.0000036158215, z: 0} - - {x: -8.832268, y: 0.000003364784, z: 0} - - {x: -8.134326, y: 0.0000031209188, z: 0} - - {x: -7.457354, y: 0.0000028844502, z: 0} - - {x: -6.801976, y: 0.0000026555983, z: 0} - - {x: -6.0594335, y: 0.0000023964103, z: 0} - - {x: -5.328869, y: 0.0000021415253, z: 0} - - {x: -4.633066, y: 0.0000018989022, z: 0} - - {x: -3.9731514, y: 0.0000016689376, z: 0} - - {x: -3.2821789, y: 0.0000014283355, z: 0} - - {x: -2.5243132, y: 0.0000011647192, z: 0} - - {x: -1.835691, y: 0.00000092552716, z: 0} - - {x: -1.2188883, y: 0.0000007116681, z: 0} - - {x: -0.41393957, y: 0.00000043345753, z: 0} - - {x: 0.21306933, y: 0.00000021810774, z: 0} + - {x: -78.089775, y: 0.000027569455, z: 0} + - {x: -77.431816, y: 0.000027351341, z: 0} + - {x: -76.8044, y: 0.000027135986, z: 0} + - {x: -75.99894, y: 0.000026857775, z: 0} + - {x: -75.381744, y: 0.000026643915, z: 0} + - {x: -74.69269, y: 0.000026404723, z: 0} + - {x: -73.934326, y: 0.000026141102, z: 0} + - {x: -73.24291, y: 0.000025900501, z: 0} + - {x: -72.58259, y: 0.000025670539, z: 0} + - {x: -71.88634, y: 0.000025427915, z: 0} + - {x: -71.1553, y: 0.000025173027, z: 0} + - {x: -70.412285, y: 0.000024913841, z: 0} + - {x: -69.75649, y: 0.000024684989, z: 0} + - {x: -69.079094, y: 0.000024448522, z: 0} + - {x: -68.38069, y: 0.00002420465, z: 0} + - {x: -67.661964, y: 0.000023953617, z: 0} + - {x: -66.923515, y: 0.00002369563, z: 0} + - {x: -66.23769, y: 0.000023455976, z: 0} + - {x: -65.56361, y: 0.00002322038, z: 0} + - {x: -64.87589, y: 0.00002297998, z: 0} + - {x: -64.174934, y: 0.00002273491, z: 0} + - {x: -63.461163, y: 0.000022485325, z: 0} + - {x: -62.735016, y: 0.000022231377, z: 0} + - {x: -62.032444, y: 0.000021985643, z: 0} + - {x: -61.35486, y: 0.000021748621, z: 0} + - {x: -60.668114, y: 0.000021508373, z: 0} + - {x: -59.972515, y: 0.000021265001, z: 0} + - {x: -59.26836, y: 0.000021018614, z: 0} + - {x: -58.555984, y: 0.000020769328, z: 0} + - {x: -57.835686, y: 0.00002051725, z: 0} + - {x: -57.139145, y: 0.000020273468, z: 0} + - {x: -56.454964, y: 0.000020033996, z: 0} + - {x: -55.764698, y: 0.000019792378, z: 0} + - {x: -55.068577, y: 0.0000195487, z: 0} + - {x: -54.366875, y: 0.00001930305, z: 0} + - {x: -53.65984, y: 0.000019055522, z: 0} + - {x: -52.947712, y: 0.000018806199, z: 0} + - {x: -52.238735, y: 0.000018557967, z: 0} + - {x: -51.551094, y: 0.000018317194, z: 0} + - {x: -50.859505, y: 0.000018075032, z: 0} + - {x: -50.164185, y: 0.000017831553, z: 0} + - {x: -49.465347, y: 0.000017586835, z: 0} + - {x: -48.76323, y: 0.00001734096, z: 0} + - {x: -48.05801, y: 0.000017093993, z: 0} + - {x: -47.349953, y: 0.000016846025, z: 0} + - {x: -46.64871, y: 0.000016600436, z: 0} + - {x: -45.955105, y: 0.000016357519, z: 0} + - {x: -45.259407, y: 0.000016113861, z: 0} + - {x: -44.56181, y: 0.000015869537, z: 0} + - {x: -43.86252, y: 0.000015624613, z: 0} + - {x: -43.16173, y: 0.000015379164, z: 0} + - {x: -42.45965, y: 0.000015133258, z: 0} + - {x: -41.756474, y: 0.000014886965, z: 0} + - {x: -41.055702, y: 0.000014641514, z: 0} + - {x: -40.357296, y: 0.000014396888, z: 0} + - {x: -39.6584, y: 0.000014152091, z: 0} + - {x: -38.959225, y: 0.000013907194, z: 0} + - {x: -38.259937, y: 0.00001366226, z: 0} + - {x: -37.560753, y: 0.00001341736, z: 0} + - {x: -36.861866, y: 0.000013172566, z: 0} + - {x: -36.163467, y: 0.000012927943, z: 0} + - {x: -35.462696, y: 0.000012682492, z: 0} + - {x: -34.759518, y: 0.0000124361995, z: 0} + - {x: -34.057438, y: 0.000012190293, z: 0} + - {x: -33.356644, y: 0.0000119448405, z: 0} + - {x: -32.657352, y: 0.000011699918, z: 0} + - {x: -31.959757, y: 0.000011455593, z: 0} + - {x: -31.264057, y: 0.000011211937, z: 0} + - {x: -30.570454, y: 0.000010969019, z: 0} + - {x: -29.869211, y: 0.000010723432, z: 0} + - {x: -29.16115, y: 0.000010475462, z: 0} + - {x: -28.455942, y: 0.000010228498, z: 0} + - {x: -27.753813, y: 0.000009982619, z: 0} + - {x: -27.05498, y: 0.000009737902, z: 0} + - {x: -26.35966, y: 0.0000094944235, z: 0} + - {x: -25.668076, y: 0.000009252262, z: 0} + - {x: -24.980436, y: 0.000009011492, z: 0} + - {x: -24.27145, y: 0.000008763256, z: 0} + - {x: -23.559328, y: 0.000008513935, z: 0} + - {x: -22.852287, y: 0.000008266405, z: 0} + - {x: -22.15059, y: 0.000008020758, z: 0} + - {x: -21.454475, y: 0.000007777079, z: 0} + - {x: -20.764206, y: 0.000007535461, z: 0} + - {x: -20.080023, y: 0.000007295988, z: 0} + - {x: -19.383484, y: 0.000007052207, z: 0} + - {x: -18.663177, y: 0.000006800126, z: 0} + - {x: -17.950798, y: 0.0000065508398, z: 0} + - {x: -17.246653, y: 0.000006304456, z: 0} + - {x: -16.551054, y: 0.000006061084, z: 0} + - {x: -15.864304, y: 0.0000058208325, z: 0} + - {x: -15.186728, y: 0.000005583814, z: 0} + - {x: -14.484152, y: 0.000005338079, z: 0} + - {x: -13.757996, y: 0.000005084128, z: 0} + - {x: -13.044234, y: 0.000004834546, z: 0} + - {x: -12.343276, y: 0.0000045894776, z: 0} + - {x: -11.655552, y: 0.000004349074, z: 0} + - {x: -10.981471, y: 0.0000041134795, z: 0} + - {x: -10.295646, y: 0.0000038738253, z: 0} + - {x: -9.557204, y: 0.0000036158406, z: 0} + - {x: -8.8384695, y: 0.0000033648028, z: 0} + - {x: -8.14008, y: 0.0000031209368, z: 0} + - {x: -7.4626703, y: 0.0000028844659, z: 0} + - {x: -6.8068767, y: 0.0000026556152, z: 0} + - {x: -6.063863, y: 0.000002396428, z: 0} + - {x: -5.33283, y: 0.0000021415422, z: 0} + - {x: -4.636578, y: 0.0000018989167, z: 0} + - {x: -3.9762478, y: 0.0000016689538, z: 0} + - {x: -3.284843, y: 0.0000014283543, z: 0} + - {x: -2.5264845, y: 0.0000011647342, z: 0} + - {x: -1.8374211, y: 0.0000009255407, z: 0} + - {x: -1.2202159, y: 0.00000071167756, z: 0} + - {x: -0.41476506, y: 0.00000043346907, z: 0} + - {x: 0.21265507, y: 0.00000021811312, z: 0} - {x: 0.87061304, y: -1.838695e-15, z: 0} restPositions: - - {x: -78.0394, y: 0.000027569455, z: 0, w: 1} - - {x: -77.38185, y: 0.000027351347, z: 0, w: 1} - - {x: -76.75484, y: 0.000027135995, z: 0, w: 1} - - {x: -75.949905, y: 0.00002685779, z: 0, w: 1} - - {x: -75.33309, y: 0.000026643927, z: 0, w: 1} - - {x: -74.64446, y: 0.000026404732, z: 0, w: 1} - - {x: -73.88661, y: 0.00002614112, z: 0, w: 1} - - {x: -73.19563, y: 0.000025900516, z: 0, w: 1} - - {x: -72.53571, y: 0.00002567055, z: 0, w: 1} - - {x: -71.83992, y: 0.00002542793, z: 0, w: 1} - - {x: -71.109344, y: 0.000025173043, z: 0, w: 1} - - {x: -70.36681, y: 0.000024913857, z: 0, w: 1} - - {x: -69.71143, y: 0.000024685005, z: 0, w: 1} - - {x: -69.034454, y: 0.000024448535, z: 0, w: 1} - - {x: -68.33651, y: 0.000024204668, z: 0, w: 1} - - {x: -67.61824, y: 0.000023953633, z: 0, w: 1} - - {x: -66.880264, y: 0.000023695646, z: 0, w: 1} - - {x: -66.19487, y: 0.00002345599, z: 0, w: 1} - - {x: -65.52122, y: 0.000023220395, z: 0, w: 1} - - {x: -64.83394, y: 0.000022979992, z: 0, w: 1} - - {x: -64.13344, y: 0.000022734926, z: 0, w: 1} - - {x: -63.420124, y: 0.000022485343, z: 0, w: 1} - - {x: -62.694427, y: 0.00002223139, z: 0, w: 1} - - {x: -61.992306, y: 0.000021985656, z: 0, w: 1} - - {x: -61.315163, y: 0.000021748638, z: 0, w: 1} - - {x: -60.62885, y: 0.000021508386, z: 0, w: 1} - - {x: -59.933685, y: 0.00002126501, z: 0, w: 1} - - {x: -59.229992, y: 0.000021018626, z: 0, w: 1} - - {x: -58.51807, y: 0.000020769341, z: 0, w: 1} - - {x: -57.798233, y: 0.000020517264, z: 0, w: 1} - - {x: -57.102135, y: 0.000020273481, z: 0, w: 1} - - {x: -56.418377, y: 0.000020034004, z: 0, w: 1} - - {x: -55.728554, y: 0.000019792387, z: 0, w: 1} - - {x: -55.032883, y: 0.000019548708, z: 0, w: 1} - - {x: -54.331627, y: 0.000019303057, z: 0, w: 1} - - {x: -53.62505, y: 0.000019055533, z: 0, w: 1} - - {x: -52.913364, y: 0.000018806204, z: 0, w: 1} - - {x: -52.20484, y: 0.000018557972, z: 0, w: 1} - - {x: -51.517643, y: 0.000018317201, z: 0, w: 1} - - {x: -50.826496, y: 0.000018075038, z: 0, w: 1} - - {x: -50.131622, y: 0.00001783156, z: 0, w: 1} - - {x: -49.433235, y: 0.000017586843, z: 0, w: 1} - - {x: -48.731556, y: 0.000017340964, z: 0, w: 1} - - {x: -48.026787, y: 0.000017093997, z: 0, w: 1} - - {x: -47.319183, y: 0.000016846028, z: 0, w: 1} - - {x: -46.61839, y: 0.000016600441, z: 0, w: 1} - - {x: -45.925232, y: 0.000016357524, z: 0, w: 1} - - {x: -45.22997, y: 0.000016113863, z: 0, w: 1} - - {x: -44.532818, y: 0.000015869538, z: 0, w: 1} - - {x: -43.833965, y: 0.000015624613, z: 0, w: 1} - - {x: -43.13363, y: 0.000015379163, z: 0, w: 1} - - {x: -42.431995, y: 0.000015133257, z: 0, w: 1} - - {x: -41.72927, y: 0.000014886965, z: 0, w: 1} - - {x: -41.02895, y: 0.000014641514, z: 0, w: 1} - - {x: -40.33099, y: 0.000014396889, z: 0, w: 1} - - {x: -39.63254, y: 0.000014152091, z: 0, w: 1} - - {x: -38.933804, y: 0.000013907192, z: 0, w: 1} - - {x: -38.234974, y: 0.00001366226, z: 0, w: 1} - - {x: -37.536236, y: 0.00001341736, z: 0, w: 1} - - {x: -36.837788, y: 0.000013172563, z: 0, w: 1} - - {x: -36.139828, y: 0.000012927938, z: 0, w: 1} - - {x: -35.439507, y: 0.000012682487, z: 0, w: 1} - - {x: -34.736782, y: 0.000012436195, z: 0, w: 1} - - {x: -34.03514, y: 0.000012190286, z: 0, w: 1} - - {x: -33.3348, y: 0.000011944836, z: 0, w: 1} - - {x: -32.63596, y: 0.000011699913, z: 0, w: 1} - - {x: -31.93881, y: 0.000011455588, z: 0, w: 1} - - {x: -31.243555, y: 0.000011211931, z: 0, w: 1} - - {x: -30.55039, y: 0.000010969012, z: 0, w: 1} - - {x: -29.849604, y: 0.000010723426, z: 0, w: 1} - - {x: -29.141989, y: 0.0000104754545, z: 0, w: 1} - - {x: -28.437225, y: 0.0000102284885, z: 0, w: 1} - - {x: -27.735544, y: 0.000009982609, z: 0, w: 1} - - {x: -27.037157, y: 0.0000097378925, z: 0, w: 1} - - {x: -26.342283, y: 0.0000094944135, z: 0, w: 1} - - {x: -25.651136, y: 0.0000092522505, z: 0, w: 1} - - {x: -24.963936, y: 0.00000901148, z: 0, w: 1} - - {x: -24.255404, y: 0.000008763244, z: 0, w: 1} - - {x: -23.543732, y: 0.000008513922, z: 0, w: 1} - - {x: -22.83715, y: 0.000008266394, z: 0, w: 1} - - {x: -22.135895, y: 0.000008020745, z: 0, w: 1} - - {x: -21.440226, y: 0.000007777066, z: 0, w: 1} - - {x: -20.750393, y: 0.0000075354455, z: 0, w: 1} - - {x: -20.066652, y: 0.0000072959747, z: 0, w: 1} - - {x: -19.370548, y: 0.0000070521896, z: 0, w: 1} - - {x: -18.650707, y: 0.000006800111, z: 0, w: 1} - - {x: -17.93878, y: 0.0000065508225, z: 0, w: 1} - - {x: -17.235085, y: 0.000006304439, z: 0, w: 1} - - {x: -16.53993, y: 0.000006061068, z: 0, w: 1} - - {x: -15.853621, y: 0.000005820816, z: 0, w: 1} - - {x: -15.176478, y: 0.000005583798, z: 0, w: 1} - - {x: -14.474341, y: 0.000005338059, z: 0, w: 1} - - {x: -13.74865, y: 0.000005084108, z: 0, w: 1} - - {x: -13.035345, y: 0.000004834527, z: 0, w: 1} - - {x: -12.334836, y: 0.0000045894585, z: 0, w: 1} - - {x: -11.6475525, y: 0.0000043490554, z: 0, w: 1} - - {x: -10.973908, y: 0.000004113463, z: 0, w: 1} - - {x: -10.288517, y: 0.0000038738076, z: 0, w: 1} - - {x: -9.550542, y: 0.0000036158215, z: 0, w: 1} - - {x: -8.832268, y: 0.000003364784, z: 0, w: 1} - - {x: -8.134326, y: 0.0000031209188, z: 0, w: 1} - - {x: -7.457354, y: 0.0000028844502, z: 0, w: 1} - - {x: -6.801976, y: 0.0000026555983, z: 0, w: 1} - - {x: -6.0594335, y: 0.0000023964103, z: 0, w: 1} - - {x: -5.328869, y: 0.0000021415253, z: 0, w: 1} - - {x: -4.633066, y: 0.0000018989022, z: 0, w: 1} - - {x: -3.9731514, y: 0.0000016689376, z: 0, w: 1} - - {x: -3.2821789, y: 0.0000014283355, z: 0, w: 1} - - {x: -2.5243132, y: 0.0000011647192, z: 0, w: 1} - - {x: -1.835691, y: 0.00000092552716, z: 0, w: 1} - - {x: -1.2188883, y: 0.0000007116681, z: 0, w: 1} - - {x: -0.41393957, y: 0.00000043345753, z: 0, w: 1} - - {x: 0.21306933, y: 0.00000021810774, z: 0, w: 1} + - {x: -78.089775, y: 0.000027569455, z: 0, w: 1} + - {x: -77.431816, y: 0.000027351341, z: 0, w: 1} + - {x: -76.8044, y: 0.000027135986, z: 0, w: 1} + - {x: -75.99894, y: 0.000026857775, z: 0, w: 1} + - {x: -75.381744, y: 0.000026643915, z: 0, w: 1} + - {x: -74.69269, y: 0.000026404723, z: 0, w: 1} + - {x: -73.934326, y: 0.000026141102, z: 0, w: 1} + - {x: -73.24291, y: 0.000025900501, z: 0, w: 1} + - {x: -72.58259, y: 0.000025670539, z: 0, w: 1} + - {x: -71.88634, y: 0.000025427915, z: 0, w: 1} + - {x: -71.1553, y: 0.000025173027, z: 0, w: 1} + - {x: -70.412285, y: 0.000024913841, z: 0, w: 1} + - {x: -69.75649, y: 0.000024684989, z: 0, w: 1} + - {x: -69.079094, y: 0.000024448522, z: 0, w: 1} + - {x: -68.38069, y: 0.00002420465, z: 0, w: 1} + - {x: -67.661964, y: 0.000023953617, z: 0, w: 1} + - {x: -66.923515, y: 0.00002369563, z: 0, w: 1} + - {x: -66.23769, y: 0.000023455976, z: 0, w: 1} + - {x: -65.56361, y: 0.00002322038, z: 0, w: 1} + - {x: -64.87589, y: 0.00002297998, z: 0, w: 1} + - {x: -64.174934, y: 0.00002273491, z: 0, w: 1} + - {x: -63.461163, y: 0.000022485325, z: 0, w: 1} + - {x: -62.735016, y: 0.000022231377, z: 0, w: 1} + - {x: -62.032444, y: 0.000021985643, z: 0, w: 1} + - {x: -61.35486, y: 0.000021748621, z: 0, w: 1} + - {x: -60.668114, y: 0.000021508373, z: 0, w: 1} + - {x: -59.972515, y: 0.000021265001, z: 0, w: 1} + - {x: -59.26836, y: 0.000021018614, z: 0, w: 1} + - {x: -58.555984, y: 0.000020769328, z: 0, w: 1} + - {x: -57.835686, y: 0.00002051725, z: 0, w: 1} + - {x: -57.139145, y: 0.000020273468, z: 0, w: 1} + - {x: -56.454964, y: 0.000020033996, z: 0, w: 1} + - {x: -55.764698, y: 0.000019792378, z: 0, w: 1} + - {x: -55.068577, y: 0.0000195487, z: 0, w: 1} + - {x: -54.366875, y: 0.00001930305, z: 0, w: 1} + - {x: -53.65984, y: 0.000019055522, z: 0, w: 1} + - {x: -52.947712, y: 0.000018806199, z: 0, w: 1} + - {x: -52.238735, y: 0.000018557967, z: 0, w: 1} + - {x: -51.551094, y: 0.000018317194, z: 0, w: 1} + - {x: -50.859505, y: 0.000018075032, z: 0, w: 1} + - {x: -50.164185, y: 0.000017831553, z: 0, w: 1} + - {x: -49.465347, y: 0.000017586835, z: 0, w: 1} + - {x: -48.76323, y: 0.00001734096, z: 0, w: 1} + - {x: -48.05801, y: 0.000017093993, z: 0, w: 1} + - {x: -47.349953, y: 0.000016846025, z: 0, w: 1} + - {x: -46.64871, y: 0.000016600436, z: 0, w: 1} + - {x: -45.955105, y: 0.000016357519, z: 0, w: 1} + - {x: -45.259407, y: 0.000016113861, z: 0, w: 1} + - {x: -44.56181, y: 0.000015869537, z: 0, w: 1} + - {x: -43.86252, y: 0.000015624613, z: 0, w: 1} + - {x: -43.16173, y: 0.000015379164, z: 0, w: 1} + - {x: -42.45965, y: 0.000015133258, z: 0, w: 1} + - {x: -41.756474, y: 0.000014886965, z: 0, w: 1} + - {x: -41.055702, y: 0.000014641514, z: 0, w: 1} + - {x: -40.357296, y: 0.000014396888, z: 0, w: 1} + - {x: -39.6584, y: 0.000014152091, z: 0, w: 1} + - {x: -38.959225, y: 0.000013907194, z: 0, w: 1} + - {x: -38.259937, y: 0.00001366226, z: 0, w: 1} + - {x: -37.560753, y: 0.00001341736, z: 0, w: 1} + - {x: -36.861866, y: 0.000013172566, z: 0, w: 1} + - {x: -36.163467, y: 0.000012927943, z: 0, w: 1} + - {x: -35.462696, y: 0.000012682492, z: 0, w: 1} + - {x: -34.759518, y: 0.0000124361995, z: 0, w: 1} + - {x: -34.057438, y: 0.000012190293, z: 0, w: 1} + - {x: -33.356644, y: 0.0000119448405, z: 0, w: 1} + - {x: -32.657352, y: 0.000011699918, z: 0, w: 1} + - {x: -31.959757, y: 0.000011455593, z: 0, w: 1} + - {x: -31.264057, y: 0.000011211937, z: 0, w: 1} + - {x: -30.570454, y: 0.000010969019, z: 0, w: 1} + - {x: -29.869211, y: 0.000010723432, z: 0, w: 1} + - {x: -29.16115, y: 0.000010475462, z: 0, w: 1} + - {x: -28.455942, y: 0.000010228498, z: 0, w: 1} + - {x: -27.753813, y: 0.000009982619, z: 0, w: 1} + - {x: -27.05498, y: 0.000009737902, z: 0, w: 1} + - {x: -26.35966, y: 0.0000094944235, z: 0, w: 1} + - {x: -25.668076, y: 0.000009252262, z: 0, w: 1} + - {x: -24.980436, y: 0.000009011492, z: 0, w: 1} + - {x: -24.27145, y: 0.000008763256, z: 0, w: 1} + - {x: -23.559328, y: 0.000008513935, z: 0, w: 1} + - {x: -22.852287, y: 0.000008266405, z: 0, w: 1} + - {x: -22.15059, y: 0.000008020758, z: 0, w: 1} + - {x: -21.454475, y: 0.000007777079, z: 0, w: 1} + - {x: -20.764206, y: 0.000007535461, z: 0, w: 1} + - {x: -20.080023, y: 0.000007295988, z: 0, w: 1} + - {x: -19.383484, y: 0.000007052207, z: 0, w: 1} + - {x: -18.663177, y: 0.000006800126, z: 0, w: 1} + - {x: -17.950798, y: 0.0000065508398, z: 0, w: 1} + - {x: -17.246653, y: 0.000006304456, z: 0, w: 1} + - {x: -16.551054, y: 0.000006061084, z: 0, w: 1} + - {x: -15.864304, y: 0.0000058208325, z: 0, w: 1} + - {x: -15.186728, y: 0.000005583814, z: 0, w: 1} + - {x: -14.484152, y: 0.000005338079, z: 0, w: 1} + - {x: -13.757996, y: 0.000005084128, z: 0, w: 1} + - {x: -13.044234, y: 0.000004834546, z: 0, w: 1} + - {x: -12.343276, y: 0.0000045894776, z: 0, w: 1} + - {x: -11.655552, y: 0.000004349074, z: 0, w: 1} + - {x: -10.981471, y: 0.0000041134795, z: 0, w: 1} + - {x: -10.295646, y: 0.0000038738253, z: 0, w: 1} + - {x: -9.557204, y: 0.0000036158406, z: 0, w: 1} + - {x: -8.8384695, y: 0.0000033648028, z: 0, w: 1} + - {x: -8.14008, y: 0.0000031209368, z: 0, w: 1} + - {x: -7.4626703, y: 0.0000028844659, z: 0, w: 1} + - {x: -6.8068767, y: 0.0000026556152, z: 0, w: 1} + - {x: -6.063863, y: 0.000002396428, z: 0, w: 1} + - {x: -5.33283, y: 0.0000021415422, z: 0, w: 1} + - {x: -4.636578, y: 0.0000018989167, z: 0, w: 1} + - {x: -3.9762478, y: 0.0000016689538, z: 0, w: 1} + - {x: -3.284843, y: 0.0000014283543, z: 0, w: 1} + - {x: -2.5264845, y: 0.0000011647342, z: 0, w: 1} + - {x: -1.8374211, y: 0.0000009255407, z: 0, w: 1} + - {x: -1.2202159, y: 0.00000071167756, z: 0, w: 1} + - {x: -0.41476506, y: 0.00000043346907, z: 0, w: 1} + - {x: 0.21265507, y: 0.00000021811312, z: 0, w: 1} - {x: 0.87061304, y: -1.838695e-15, z: 0, w: 1} - restNormals: [] orientations: [] restOrientations: [] velocities: @@ -386,21 +383,6 @@ MonoBehaviour: invMasses: - 10 - 10 - - 10.000001 - - 9.999999 - - 10 - - 10.000001 - - 9.999999 - - 10 - - 10.000001 - - 9.999999 - - 10 - - 9.999999 - - 9.999999 - - 9.999999 - - 10 - - 9.999999 - - 10 - 10 - 10.000001 - 10 @@ -412,30 +394,44 @@ MonoBehaviour: - 10 - 10.000001 - 10.000001 - - 10 - - 9.999999 - 9.999999 - 10.000001 - - 10 + - 9.999999 + - 9.999999 - 10 - 10.000001 - 9.999999 + - 10 - 10.000001 - 10 + - 9.999999 + - 10 + - 10 + - 10 + - 10.000001 - 10 - 10 - 10 - 10 - 9.999999 - - 10.000001 - - 9.999999 + - 10 + - 10 + - 10 - 10 - 9.999999 - 10 - 10 + - 10 - 10.000001 + - 9.999999 - 10.000001 - - 10.000001 + - 9.999999 + - 10 + - 10 + - 10 + - 10 + - 10 + - 10 - 10 - 10 - 10 @@ -498,26 +494,12 @@ MonoBehaviour: - 10 - 10 - 10 + - 10 invRotationalMasses: [] filters: 0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff0100ffff principalRadii: - {x: 0.35, y: 0.35, z: 0.35} - {x: 0.35, y: 0.35, z: 0.35} - - {x: 0.34999996, y: 0.34999996, z: 0.34999996} - - {x: 0.35000002, y: 0.35000002, z: 0.35000002} - - {x: 0.35, y: 0.35, z: 0.35} - - {x: 0.34999996, y: 0.34999996, z: 0.34999996} - - {x: 0.35, y: 0.35, z: 0.35} - - {x: 0.35, y: 0.35, z: 0.35} - - {x: 0.34999996, y: 0.34999996, z: 0.34999996} - - {x: 0.35, y: 0.35, z: 0.35} - - {x: 0.35, y: 0.35, z: 0.35} - - {x: 0.35, y: 0.35, z: 0.35} - - {x: 0.35, y: 0.35, z: 0.35} - - {x: 0.35, y: 0.35, z: 0.35} - - {x: 0.35, y: 0.35, z: 0.35} - - {x: 0.35, y: 0.35, z: 0.35} - - {x: 0.35, y: 0.35, z: 0.35} - {x: 0.35, y: 0.35, z: 0.35} - {x: 0.34999996, y: 0.34999996, z: 0.34999996} - {x: 0.35, y: 0.35, z: 0.35} @@ -525,34 +507,48 @@ MonoBehaviour: - {x: 0.35, y: 0.35, z: 0.35} - {x: 0.34999996, y: 0.34999996, z: 0.34999996} - {x: 0.35000002, y: 0.35000002, z: 0.35000002} - - {x: 0.35000002, y: 0.35000002, z: 0.35000002} + - {x: 0.35, y: 0.35, z: 0.35} - {x: 0.35, y: 0.35, z: 0.35} - {x: 0.34999996, y: 0.34999996, z: 0.34999996} - {x: 0.34999996, y: 0.34999996, z: 0.34999996} - - {x: 0.35, y: 0.35, z: 0.35} - - {x: 0.35000002, y: 0.35000002, z: 0.35000002} - - {x: 0.35000002, y: 0.35000002, z: 0.35000002} - - {x: 0.34999996, y: 0.34999996, z: 0.34999996} - - {x: 0.35, y: 0.35, z: 0.35} - - {x: 0.35, y: 0.35, z: 0.35} - - {x: 0.34999996, y: 0.34999996, z: 0.34999996} - {x: 0.35000002, y: 0.35000002, z: 0.35000002} - {x: 0.34999996, y: 0.34999996, z: 0.34999996} - {x: 0.35, y: 0.35, z: 0.35} - {x: 0.35, y: 0.35, z: 0.35} - {x: 0.35, y: 0.35, z: 0.35} - - {x: 0.35, y: 0.35, z: 0.35} - - {x: 0.35, y: 0.35, z: 0.35} - - {x: 0.35000002, y: 0.35000002, z: 0.35000002} - {x: 0.34999996, y: 0.34999996, z: 0.34999996} - {x: 0.35000002, y: 0.35000002, z: 0.35000002} - {x: 0.35, y: 0.35, z: 0.35} + - {x: 0.34999996, y: 0.34999996, z: 0.34999996} + - {x: 0.35, y: 0.35, z: 0.35} - {x: 0.35000002, y: 0.35000002, z: 0.35000002} - {x: 0.35, y: 0.35, z: 0.35} - {x: 0.35, y: 0.35, z: 0.35} + - {x: 0.35, y: 0.35, z: 0.35} - {x: 0.34999996, y: 0.34999996, z: 0.34999996} + - {x: 0.35, y: 0.35, z: 0.35} + - {x: 0.35, y: 0.35, z: 0.35} + - {x: 0.35, y: 0.35, z: 0.35} + - {x: 0.35, y: 0.35, z: 0.35} + - {x: 0.35000002, y: 0.35000002, z: 0.35000002} + - {x: 0.35, y: 0.35, z: 0.35} + - {x: 0.35, y: 0.35, z: 0.35} + - {x: 0.35, y: 0.35, z: 0.35} + - {x: 0.35, y: 0.35, z: 0.35} + - {x: 0.35000002, y: 0.35000002, z: 0.35000002} + - {x: 0.35, y: 0.35, z: 0.35} + - {x: 0.35, y: 0.35, z: 0.35} + - {x: 0.35, y: 0.35, z: 0.35} - {x: 0.34999996, y: 0.34999996, z: 0.34999996} + - {x: 0.35000002, y: 0.35000002, z: 0.35000002} - {x: 0.34999996, y: 0.34999996, z: 0.34999996} + - {x: 0.35000002, y: 0.35000002, z: 0.35000002} + - {x: 0.35, y: 0.35, z: 0.35} + - {x: 0.35, y: 0.35, z: 0.35} + - {x: 0.35, y: 0.35, z: 0.35} + - {x: 0.35, y: 0.35, z: 0.35} + - {x: 0.35, y: 0.35, z: 0.35} + - {x: 0.35, y: 0.35, z: 0.35} - {x: 0.35, y: 0.35, z: 0.35} - {x: 0.35, y: 0.35, z: 0.35} - {x: 0.35, y: 0.35, z: 0.35} @@ -615,24 +611,10 @@ MonoBehaviour: - {x: 0.35, y: 0.35, z: 0.35} - {x: 0.35, y: 0.35, z: 0.35} - {x: 0.35, y: 0.35, z: 0.35} + - {x: 0.35, y: 0.35, z: 0.35} colors: - {r: 1, g: 1, b: 1, a: 1} - {r: 1, g: 1, b: 1, a: 1} - - {r: 0.99999994, g: 0.99999994, b: 0.99999994, a: 0.99999994} - - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 0.99999994, g: 0.99999994, b: 0.99999994, a: 0.99999994} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 0.99999994, g: 0.99999994, b: 0.99999994, a: 0.99999994} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - {r: 1, g: 1, b: 1, a: 1} - {r: 0.99999994, g: 0.99999994, b: 0.99999994, a: 0.99999994} - {r: 1, g: 1, b: 1, a: 1} @@ -640,34 +622,48 @@ MonoBehaviour: - {r: 1, g: 1, b: 1, a: 1} - {r: 0.99999994, g: 0.99999994, b: 0.99999994, a: 0.99999994} - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} + - {r: 1, g: 1, b: 1, a: 1} - {r: 1, g: 1, b: 1, a: 1} - {r: 0.99999994, g: 0.99999994, b: 0.99999994, a: 0.99999994} - {r: 0.99999994, g: 0.99999994, b: 0.99999994, a: 0.99999994} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - - {r: 0.99999994, g: 0.99999994, b: 0.99999994, a: 0.99999994} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 0.99999994, g: 0.99999994, b: 0.99999994, a: 0.99999994} - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - {r: 0.99999994, g: 0.99999994, b: 0.99999994, a: 0.99999994} - {r: 1, g: 1, b: 1, a: 1} - {r: 1, g: 1, b: 1, a: 1} - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - {r: 0.99999994, g: 0.99999994, b: 0.99999994, a: 0.99999994} - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - {r: 1, g: 1, b: 1, a: 1} + - {r: 0.99999994, g: 0.99999994, b: 0.99999994, a: 0.99999994} + - {r: 1, g: 1, b: 1, a: 1} - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - {r: 1, g: 1, b: 1, a: 1} - {r: 1, g: 1, b: 1, a: 1} + - {r: 1, g: 1, b: 1, a: 1} - {r: 0.99999994, g: 0.99999994, b: 0.99999994, a: 0.99999994} + - {r: 1, g: 1, b: 1, a: 1} + - {r: 1, g: 1, b: 1, a: 1} + - {r: 1, g: 1, b: 1, a: 1} + - {r: 1, g: 1, b: 1, a: 1} + - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} + - {r: 1, g: 1, b: 1, a: 1} + - {r: 1, g: 1, b: 1, a: 1} + - {r: 1, g: 1, b: 1, a: 1} + - {r: 1, g: 1, b: 1, a: 1} + - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} + - {r: 1, g: 1, b: 1, a: 1} + - {r: 1, g: 1, b: 1, a: 1} + - {r: 1, g: 1, b: 1, a: 1} - {r: 0.99999994, g: 0.99999994, b: 0.99999994, a: 0.99999994} + - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - {r: 0.99999994, g: 0.99999994, b: 0.99999994, a: 0.99999994} + - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} + - {r: 1, g: 1, b: 1, a: 1} + - {r: 1, g: 1, b: 1, a: 1} + - {r: 1, g: 1, b: 1, a: 1} + - {r: 1, g: 1, b: 1, a: 1} + - {r: 1, g: 1, b: 1, a: 1} + - {r: 1, g: 1, b: 1, a: 1} - {r: 1, g: 1, b: 1, a: 1} - {r: 1, g: 1, b: 1, a: 1} - {r: 1, g: 1, b: 1, a: 1} @@ -730,6 +726,7 @@ MonoBehaviour: - {r: 1, g: 1, b: 1, a: 1} - {r: 1, g: 1, b: 1, a: 1} - {r: 1, g: 1, b: 1, a: 1} + - {r: 1, g: 1, b: 1, a: 1} points: edges: 000000000100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000a0000000a0000000b0000000b0000000c0000000c0000000d0000000d0000000e0000000e0000000f0000000f00000010000000100000001100000011000000120000001200000013000000130000001400000014000000150000001500000016000000160000001700000017000000180000001800000019000000190000001a0000001a0000001b0000001b0000001c0000001c0000001d0000001d0000001e0000001e0000001f0000001f00000020000000200000002100000021000000220000002200000023000000230000002400000024000000250000002500000026000000260000002700000027000000280000002800000029000000290000002a0000002a0000002b0000002b0000002c0000002c0000002d0000002d0000002e0000002e0000002f0000002f00000030000000300000003100000031000000320000003200000033000000330000003400000034000000350000003500000036000000360000003700000037000000380000003800000039000000390000003a0000003a0000003b0000003b0000003c0000003c0000003d0000003d0000003e0000003e0000003f0000003f00000040000000400000004100000041000000420000004200000043000000430000004400000044000000450000004500000046000000460000004700000047000000480000004800000049000000490000004a0000004a0000004b0000004b0000004c0000004c0000004d0000004d0000004e0000004e0000004f0000004f00000050000000500000005100000051000000520000005200000053000000530000005400000054000000550000005500000056000000560000005700000057000000580000005800000059000000590000005a0000005a0000005b0000005b0000005c0000005c0000005d0000005d0000005e0000005e0000005f0000005f00000060000000600000006100000061000000620000006200000063000000630000006400000064000000650000006500000066000000660000006700000067000000680000006800000069000000690000006a0000006a0000006b0000006b0000006c0000006c0000006d0000006d0000006e0000006e0000006f0000006f000000700000007000000071000000 triangles: @@ -748,63 +745,63 @@ MonoBehaviour: m_AlignBytes: 16 restLengths: serializedContents: - - 0.657547 - - 0.80493164 - - 0.68862915 - - 0.690979 - - 0.69579315 - - 0.7425308 - - 0.67697906 - - 0.71826935 - - 0.6853943 - - 0.68727875 - - 0.71331406 - - 0.70212173 - - 0.6863136 - - 0.7036934 - - 0.7198372 - - 0.6837578 - - 0.6956711 - - 0.7065773 - - 0.7085228 - - 0.69114685 - - 0.69838715 - - 0.70476913 - - 0.7007942 - - 0.6952629 - - 0.69885254 - - 0.70163345 - - 0.7003212 - - 0.6984482 - - 0.69882965 - - 0.6984482 - - 0.7003212 - - 0.7016411 - - 0.6988411 - - 0.6952553 - - 0.7007866 - - 0.7047634 - - 0.69838715 - - 0.69114685 - - 0.70853233 - - 0.7065811 - - 0.6956692 - - 0.6837406 - - 0.719841 - - 0.7036953 - - 0.6863098 - - 0.702137 - - 0.7133045 - - 0.6872835 - - 0.6853914 - - 0.7182741 - - 0.6769719 - - 0.74254274 - - 0.6958027 - - 0.69097257 - - 0.68862224 - - 0.8049487 - - 0.6575437 + - 0.657959 + - 0.80545807 + - 0.6890564 + - 0.6914139 + - 0.6962509 + - 0.7430115 + - 0.6773987 + - 0.7187271 + - 0.68582153 + - 0.6877136 + - 0.7137718 + - 0.70257187 + - 0.6867447 + - 0.70415497 + - 0.72029877 + - 0.6841812 + - 0.6961212 + - 0.70703506 + - 0.70897675 + - 0.69158936 + - 0.6988373 + - 0.70521927 + - 0.70124435 + - 0.6956978 + - 0.6992912 + - 0.7020836 + - 0.70077133 + - 0.6988945 + - 0.6992874 + - 0.6988869 + - 0.70077133 + - 0.7020798 + - 0.6992912 + - 0.6956997 + - 0.70124245 + - 0.7052078 + - 0.69883347 + - 0.69158363 + - 0.7089863 + - 0.7070408 + - 0.6961155 + - 0.6841831 + - 0.7203064 + - 0.70414543 + - 0.6867504 + - 0.7025757 + - 0.7137613 + - 0.6877241 + - 0.68582535 + - 0.71873474 + - 0.6774101 + - 0.74301386 + - 0.69625187 + - 0.6914048 + - 0.68906343 + - 0.80545086 + - 0.657958 m_AlignBytes: 16 stiffnesses: serializedContents: @@ -879,62 +876,62 @@ MonoBehaviour: m_AlignBytes: 16 restLengths: serializedContents: - - 0.62701416 - - 0.61681366 - - 0.75785065 - - 0.65991974 - - 0.73057556 - - 0.65538025 - - 0.69794464 - - 0.7379761 - - 0.67365265 - - 0.7005005 - - 0.72569656 - - 0.6771431 - - 0.6951637 - - 0.7119217 - - 0.6960983 - - 0.68982315 - - 0.7012558 - - 0.7116852 - - 0.68719864 - - 0.6948738 - - 0.7016792 - - 0.70760345 - - 0.6931572 - - 0.6971512 - - 0.70033646 - - 0.70272446 - - 0.6979599 - - 0.6987381 - - 0.6987381 - - 0.6979599 - - 0.70272446 - - 0.7003403 - - 0.6971493 - - 0.6931648 - - 0.7076149 - - 0.70168114 - - 0.6948738 - - 0.68720055 - - 0.7116718 - - 0.7012558 - - 0.6898327 - - 0.69610405 - - 0.7119274 - - 0.6951542 - - 0.67714214 - - 0.7256918 - - 0.7005091 - - 0.67364407 - - 0.7379751 - - 0.6979418 - - 0.65537786 - - 0.7305646 - - 0.65991473 - - 0.75786567 - - 0.6168027 - - 0.6270089 + - 0.6274185 + - 0.6171951 + - 0.7583618 + - 0.6603241 + - 0.73104095 + - 0.65579224 + - 0.6984024 + - 0.7384491 + - 0.6740875 + - 0.70095825 + - 0.7261467 + - 0.6775856 + - 0.6955986 + - 0.71237564 + - 0.69654083 + - 0.69026566 + - 0.7017021 + - 0.7121277 + - 0.68764114 + - 0.6953201 + - 0.7021179 + - 0.7080574 + - 0.6936035 + - 0.6975975 + - 0.7007866 + - 0.7031746 + - 0.6984062 + - 0.6991768 + - 0.6991844 + - 0.6983986 + - 0.7031784 + - 0.7007942 + - 0.6975956 + - 0.6936035 + - 0.7080612 + - 0.70212936 + - 0.6953201 + - 0.68763924 + - 0.71212196 + - 0.7016964 + - 0.6902695 + - 0.6965389 + - 0.71237946 + - 0.6955986 + - 0.67757607 + - 0.72615623 + - 0.70095825 + - 0.67408085 + - 0.73844147 + - 0.69838905 + - 0.65579367 + - 0.73103285 + - 0.6603303 + - 0.7583585 + - 0.61720514 + - 0.6274201 m_AlignBytes: 16 stiffnesses: serializedContents: @@ -1010,44 +1007,44 @@ MonoBehaviour: m_AlignBytes: 16 restBends: serializedContents: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 + - 0.010177612 + - 0.023956299 + - 0.010360718 + - 0.0039901733 + - 0.007003784 + - 0.017547607 + - 0.00440979 + - 0.007858276 + - 0.0029525757 + - 0.0026397705 + - 0.0020332336 + - 0.0017776489 + - 0.0071144104 + - 0.0011711121 + - 0.0009460449 + - 0.0006980896 + - 0.00049972534 + - 0.0008010864 + - 0.00009536743 + - 0.00009918213 + - 0.0008010864 + - 0.00049972534 + - 0.0006980896 + - 0.00095176697 + - 0.0011711121 + - 0.0071163177 + - 0.001783371 + - 0.002029419 + - 0.0026416779 + - 0.002948761 + - 0.007860184 + - 0.0044116974 + - 0.017539024 + - 0.00699234 + - 0.003993511 + - 0.010358095 + - 0.023952723 + - 0.010179281 m_AlignBytes: 16 bendingStiffnesses: serializedContents: @@ -1144,43 +1141,43 @@ MonoBehaviour: m_AlignBytes: 16 restBends: serializedContents: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 + - 0.05934906 + - 0.023101807 + - 0.011978149 + - 0.029067993 + - 0.0067749023 + - 0.0039138794 + - 0.004272461 + - 0.008327484 + - 0.0028495789 + - 0.007923126 + - 0.001953125 + - 0.0016975403 + - 0.0013198853 + - 0.0010948181 + - 0.0022697449 + - 0.00063323975 + - 0.0004310608 + - 0.00078964233 + - 0.000038146973 + - 0.00016403198 + - 0.00036621094 + - 0.0005645752 + - 0.0025463104 + - 0.0010261536 + - 0.0012435913 + - 0.0010433197 + - 0.0018596649 + - 0.0041179657 + - 0.0027446747 + - 0.0030584335 + - 0.004131317 + - 0.004548073 + - 0.0065689087 + - 0.0072050095 + - 0.011593819 + - 0.022318125 + - 0.06274855 m_AlignBytes: 16 bendingStiffnesses: serializedContents: @@ -1275,43 +1272,43 @@ MonoBehaviour: m_AlignBytes: 16 restBends: serializedContents: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 + - 0.0627594 + - 0.022315979 + - 0.01159668 + - 0.0072021484 + - 0.006576538 + - 0.004547119 + - 0.0041275024 + - 0.0030517578 + - 0.0027389526 + - 0.004119873 + - 0.0018615723 + - 0.0010490417 + - 0.0012435913 + - 0.001033783 + - 0.0025482178 + - 0.0005645752 + - 0.00036239624 + - 0.00016403198 + - 0.000030517578 + - 0.00078964233 + - 0.0004272461 + - 0.0006313324 + - 0.0022735596 + - 0.0010986328 + - 0.0013141632 + - 0.0016937256 + - 0.001947403 + - 0.007921219 + - 0.0028495789 + - 0.008333206 + - 0.0042686462 + - 0.0039138794 + - 0.0067825317 + - 0.029073238 + - 0.011973858 + - 0.02309823 + - 0.059343547 m_AlignBytes: 16 bendingStiffnesses: serializedContents: @@ -1404,363 +1401,7 @@ MonoBehaviour: shapeMatchingConstraintsData: batches: [] aerodynamicConstraintsData: - batches: - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f0000007000000071000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f0000007000000071000000 - m_ConstraintCount: 114 - m_ActiveConstraintCount: 114 - m_InitialActiveConstraintCount: 114 - particleIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f0000007000000071000000 - m_AlignBytes: 16 - lambdas: - serializedContents: [] - m_AlignBytes: 16 - aerodynamicCoeffs: - serializedContents: - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.6999999 - - 1 - - 1 - - 0.70000005 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.6999999 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.6999999 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.6999999 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.70000005 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.6999999 - - 1 - - 1 - - 0.70000005 - - 1 - - 1 - - 0.70000005 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.6999999 - - 1 - - 1 - - 0.6999999 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.70000005 - - 1 - - 1 - - 0.70000005 - - 1 - - 1 - - 0.6999999 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.6999999 - - 1 - - 1 - - 0.70000005 - - 1 - - 1 - - 0.6999999 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.70000005 - - 1 - - 1 - - 0.6999999 - - 1 - - 1 - - 0.70000005 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.70000005 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.6999999 - - 1 - - 1 - - 0.6999999 - - 1 - - 1 - - 0.6999999 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.6999999 - - 1 - - 1 - - 0.6999999 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - - 0.7 - - 1 - - 1 - m_AlignBytes: 16 + batches: [] chainConstraintsData: batches: [] volumeConstraintsData: @@ -1776,7 +1417,7 @@ MonoBehaviour: data: - tangentMode: 0 inTangent: {x: -0.25, y: 0, z: 0} - position: {x: -78.0394, y: 0.000027569455, z: 0} + position: {x: -78.089775, y: 0.000027569455, z: 0} outTangent: {x: 0.25, y: 0, z: 0} - tangentMode: 0 inTangent: {x: -0.25, y: 0, z: 0} @@ -1807,28 +1448,28 @@ MonoBehaviour: m_Closed: 0 m_ArcLengthTable: - 0 - - 0.5505357 - - 2.0631967 - - 4.4367065 - - 7.569789 - - 11.361167 - - 15.709566 - - 20.513708 - - 25.672318 - - 31.084118 - - 36.64783 - - 42.262188 - - 47.8259 - - 53.2377 - - 58.39631 - - 63.20045 - - 67.54885 - - 71.34023 - - 74.47331 - - 76.846825 - - 78.35948 - - 78.91002 - m_TotalSplineLenght: 78.91002 + - 0.5508675 + - 2.0644803 + - 4.439497 + - 7.5745754 + - 11.368374 + - 15.719553 + - 20.526768 + - 25.688679 + - 31.103943 + - 36.67122 + - 42.28917 + - 47.856445 + - 53.27171 + - 58.43362 + - 63.240837 + - 67.59201 + - 71.38581 + - 74.52089 + - 76.895905 + - 78.409515 + - 78.96038 + m_TotalSplineLenght: 78.96038 OnPathChanged: m_PersistentCalls: m_Calls: [] @@ -1843,124 +1484,123 @@ MonoBehaviour: m_Calls: [] thickness: 0.35 resolution: 0.5 - m_InterParticleDistance: 0.6983188 + m_InterParticleDistance: 0.69876444 totalParticles: 114 - m_RestLength: 78.910034 - deformableEdges: 000000000100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000a0000000a0000000b0000000b0000000c0000000c0000000d0000000d0000000e0000000e0000000f0000000f00000010000000100000001100000011000000120000001200000013000000130000001400000014000000150000001500000016000000160000001700000017000000180000001800000019000000190000001a0000001a0000001b0000001b0000001c0000001c0000001d0000001d0000001e0000001e0000001f0000001f00000020000000200000002100000021000000220000002200000023000000230000002400000024000000250000002500000026000000260000002700000027000000280000002800000029000000290000002a0000002a0000002b0000002b0000002c0000002c0000002d0000002d0000002e0000002e0000002f0000002f00000030000000300000003100000031000000320000003200000033000000330000003400000034000000350000003500000036000000360000003700000037000000380000003800000039000000390000003a0000003a0000003b0000003b0000003c0000003c0000003d0000003d0000003e0000003e0000003f0000003f00000040000000400000004100000041000000420000004200000043000000430000004400000044000000450000004500000046000000460000004700000047000000480000004800000049000000490000004a0000004a0000004b0000004b0000004c0000004c0000004d0000004d0000004e0000004e0000004f0000004f00000050000000500000005100000051000000520000005200000053000000530000005400000054000000550000005500000056000000560000005700000057000000580000005800000059000000590000005a0000005a0000005b0000005b0000005c0000005c0000005d0000005d0000005e0000005e0000005f0000005f00000060000000600000006100000061000000620000006200000063000000630000006400000064000000650000006500000066000000660000006700000067000000680000006800000069000000690000006a0000006a0000006b0000006b0000006c0000006c0000006d0000006d0000006e0000006e0000006f0000006f000000700000007000000071000000 + m_RestLength: 78.96037 restLengths: - - 0.657547 - - 0.62701416 - - 0.80493164 - - 0.61681366 - - 0.68862915 - - 0.75785065 - - 0.690979 - - 0.65991974 - - 0.69579315 - - 0.73057556 - - 0.7425308 - - 0.65538025 - - 0.67697906 - - 0.69794464 - - 0.71826935 - - 0.7379761 - - 0.6853943 - - 0.67365265 - - 0.68727875 - - 0.7005005 - - 0.71331406 - - 0.72569656 - - 0.70212173 - - 0.6771431 - - 0.6863136 - - 0.6951637 - - 0.7036934 - - 0.7119217 - - 0.7198372 - - 0.6960983 - - 0.6837578 - - 0.68982315 - - 0.6956711 - - 0.7012558 - - 0.7065773 - - 0.7116852 - - 0.7085228 - - 0.68719864 - - 0.69114685 - - 0.6948738 - - 0.69838715 - - 0.7016792 - - 0.70476913 - - 0.70760345 - - 0.7007942 - - 0.6931572 - - 0.6952629 - - 0.6971512 - - 0.69885254 - - 0.70033646 - - 0.70163345 - - 0.70272446 - - 0.7003212 - - 0.6979599 - - 0.6984482 - - 0.6987381 - - 0.69882965 - - 0.6987381 - - 0.6984482 - - 0.6979599 - - 0.7003212 - - 0.70272446 - - 0.7016411 - - 0.7003403 - - 0.6988411 - - 0.6971493 - - 0.6952553 - - 0.6931648 + - 0.657959 + - 0.6274185 + - 0.80545807 + - 0.6171951 + - 0.6890564 + - 0.7583618 + - 0.6914139 + - 0.6603241 + - 0.6962509 + - 0.73104095 + - 0.7430115 + - 0.65579224 + - 0.6773987 + - 0.6984024 + - 0.7187271 + - 0.7384491 + - 0.68582153 + - 0.6740875 + - 0.6877136 + - 0.70095825 + - 0.7137718 + - 0.7261467 + - 0.70257187 + - 0.6775856 + - 0.6867447 + - 0.6955986 + - 0.70415497 + - 0.71237564 + - 0.72029877 + - 0.69654083 + - 0.6841812 + - 0.69026566 + - 0.6961212 + - 0.7017021 + - 0.70703506 + - 0.7121277 + - 0.70897675 + - 0.68764114 + - 0.69158936 + - 0.6953201 + - 0.6988373 + - 0.7021179 + - 0.70521927 + - 0.7080574 + - 0.70124435 + - 0.6936035 + - 0.6956978 + - 0.6975975 + - 0.6992912 - 0.7007866 - - 0.7076149 - - 0.7047634 - - 0.70168114 - - 0.69838715 - - 0.6948738 - - 0.69114685 - - 0.68720055 - - 0.70853233 - - 0.7116718 - - 0.7065811 - - 0.7012558 - - 0.6956692 - - 0.6898327 - - 0.6837406 - - 0.69610405 - - 0.719841 - - 0.7119274 - - 0.7036953 - - 0.6951542 - - 0.6863098 - - 0.67714214 - - 0.702137 - - 0.7256918 - - 0.7133045 - - 0.7005091 - - 0.6872835 - - 0.67364407 - - 0.6853914 - - 0.7379751 - - 0.7182741 - - 0.6979418 - - 0.6769719 - - 0.65537786 - - 0.74254274 - - 0.7305646 - - 0.6958027 - - 0.65991473 - - 0.69097257 - - 0.75786567 - - 0.68862224 - - 0.6168027 - - 0.8049487 - - 0.6270089 - - 0.6575437 + - 0.7020836 + - 0.7031746 + - 0.70077133 + - 0.6984062 + - 0.6988945 + - 0.6991768 + - 0.6992874 + - 0.6991844 + - 0.6988869 + - 0.6983986 + - 0.70077133 + - 0.7031784 + - 0.7020798 + - 0.7007942 + - 0.6992912 + - 0.6975956 + - 0.6956997 + - 0.6936035 + - 0.70124245 + - 0.7080612 + - 0.7052078 + - 0.70212936 + - 0.69883347 + - 0.6953201 + - 0.69158363 + - 0.68763924 + - 0.7089863 + - 0.71212196 + - 0.7070408 + - 0.7016964 + - 0.6961155 + - 0.6902695 + - 0.6841831 + - 0.6965389 + - 0.7203064 + - 0.71237946 + - 0.70414543 + - 0.6955986 + - 0.6867504 + - 0.67757607 + - 0.7025757 + - 0.72615623 + - 0.7137613 + - 0.70095825 + - 0.6877241 + - 0.67408085 + - 0.68582535 + - 0.73844147 + - 0.71873474 + - 0.69838905 + - 0.6774101 + - 0.65579367 + - 0.74301386 + - 0.73103285 + - 0.69625187 + - 0.6603303 + - 0.6914048 + - 0.7583585 + - 0.68906343 + - 0.61720514 + - 0.80545086 + - 0.6274201 + - 0.657958 - 0 pooledParticles: 0 --- !u!114 &870036912147276740 diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/WrappingRope.asset.meta b/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/WrappingRope.asset.meta index a0c762b5a..3dd9abe0b 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/WrappingRope.asset.meta +++ b/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/WrappingRope.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 7e05f85bfaeb24a649317f63f656b6bb +guid: 4d31372b30ca34527b534f09a803ab15 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Materials/ChainRed.mat b/Assets/Obi/Samples/RopeAndRod/SampleResources/Materials/ChainRed.mat index a78cc0ce2..c9914abd1 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Materials/ChainRed.mat +++ b/Assets/Obi/Samples/RopeAndRod/SampleResources/Materials/ChainRed.mat @@ -15,7 +15,7 @@ Material: - _EMISSION m_InvalidKeywords: [] m_LightmapFlags: 1 - m_EnableInstancingVariants: 1 + m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Materials/ChainWhite.mat b/Assets/Obi/Samples/RopeAndRod/SampleResources/Materials/ChainWhite.mat index 721b0b5be..e285c8ed1 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Materials/ChainWhite.mat +++ b/Assets/Obi/Samples/RopeAndRod/SampleResources/Materials/ChainWhite.mat @@ -15,7 +15,7 @@ Material: - _EMISSION m_InvalidKeywords: [] m_LightmapFlags: 1 - m_EnableInstancingVariants: 1 + m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Materials/GreenRope.mat b/Assets/Obi/Samples/RopeAndRod/SampleResources/Materials/GreenRope.mat index 4d30cc707..564826cab 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Materials/GreenRope.mat +++ b/Assets/Obi/Samples/RopeAndRod/SampleResources/Materials/GreenRope.mat @@ -84,7 +84,7 @@ Material: - _UVSec: 0 - _ZWrite: 1 m_Colors: - - _Color: {r: 0.17942329, g: 0.6037736, b: 0.19514, a: 1} + - _Color: {r: 0.17283745, g: 0.8161765, b: 0.12002597, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _EmissionColorUI: {r: 1, g: 1, b: 1, a: 1} - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Models/shark.obj b/Assets/Obi/Samples/RopeAndRod/SampleResources/Models/shark.obj deleted file mode 100644 index 610580231..000000000 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Models/shark.obj +++ /dev/null @@ -1,11018 +0,0 @@ -# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware -# File Created: 14.08.2013 08:29:42 - -mtllib Shark.mtl - -# -# object great_white_shark -# - -v -0.788411 0.469182 -1.440535 -v 0.000000 0.623859 -3.313810 -v 0.000000 -0.034299 3.374330 -v 0.000000 -0.081471 2.547170 -v 0.000000 -0.063084 1.550987 -v 0.000000 -0.017118 0.830714 -v 0.000000 0.108771 -0.306628 -v 0.000000 0.396600 -2.259508 -v -0.364643 0.257481 -1.408966 -v 0.000000 0.230286 -1.381465 -v -0.544076 0.183225 -0.218446 -v -0.735302 0.134406 4.623686 -v -0.414110 0.043194 4.052600 -v -0.747287 0.139504 4.972197 -v -0.404189 0.103425 4.687736 -v -0.402782 0.090898 5.051456 -v -0.412100 0.088168 5.375933 -v 0.000000 1.022311 7.616058 -v -0.556226 1.107240 7.438728 -v -0.418169 1.099366 7.397717 -v -0.286445 1.068475 7.528789 -v -0.200882 1.005523 7.491678 -v -0.154214 1.035241 7.595179 -v -0.624665 1.045620 7.475090 -v -0.191222 0.368383 7.402486 -v -0.353348 0.425440 7.343808 -v -0.502583 0.581995 7.493086 -v -0.483014 0.727825 7.632405 -v -0.546659 0.957004 7.598269 -v -0.737711 1.087773 7.336395 -v -0.707222 0.942385 7.480309 -v -0.333362 0.701560 7.709418 -v -0.446846 0.867865 7.695375 -v -0.352898 0.545944 7.566257 -v -0.186938 0.511459 7.622266 -v -0.309029 0.838555 7.771639 -v -0.176666 0.660913 7.769929 -v -0.852437 0.877975 7.242527 -v -0.809891 0.994402 7.320856 -v -0.621224 0.768148 7.532959 -v -0.513143 0.449863 7.281170 -v -0.654713 0.505378 7.182827 -v -0.799028 0.563536 7.062317 -v -1.088825 0.706516 6.780196 -v -0.906284 0.744328 7.117725 -v -0.944777 0.634093 6.919909 -v -1.037318 0.815014 6.965506 -v -0.974609 0.929158 7.092916 -v -0.764309 0.689413 7.259150 -v -0.743522 0.817339 7.399426 -v -0.636788 0.634198 7.391329 -v -1.129229 0.901795 6.814305 -v -1.057061 0.570982 6.645980 -v -0.391109 0.237226 6.724459 -v -0.364754 0.314584 7.053168 -v -0.704672 0.387481 6.907848 -v -0.872015 0.453121 6.788566 -v -0.952931 0.367417 6.476990 -v -1.114394 0.510601 6.321710 -v -1.187012 0.402556 5.719851 -v -1.161938 0.378760 5.431072 -v -1.350176 0.590287 5.316800 -v -0.956741 0.219469 5.228363 -v -1.131980 0.361318 5.145022 -v -1.375073 0.558442 5.038369 -v -0.768929 0.154534 5.287313 -v -0.988043 0.300676 6.149660 -v -1.136354 0.461563 6.013940 -v -0.757535 0.304333 6.585647 -v -0.417476 0.168907 6.376730 -v -0.991814 0.230911 5.525332 -v -0.798575 0.165532 5.592230 -v -1.019765 0.246109 5.831659 -v -0.801251 0.226954 6.246830 -v -0.816815 0.177946 5.910890 -v -0.433403 0.097885 6.029599 -v -0.429011 0.075928 5.694320 -v 0.000000 3.827382 -5.507077 -v -0.144524 3.506025 -7.491770 -v -0.201791 3.578382 -6.814765 -v 0.000000 3.647791 -6.819415 -v -0.276314 3.645885 -6.171391 -v 0.000000 3.737124 -6.176731 -v 0.000000 1.747917 -7.716083 -v 0.000000 3.521364 -8.029909 -v 0.000000 4.218249 -3.387337 -v -0.539111 1.525422 -6.898022 -v -0.521816 1.454388 -7.379246 -v -0.510107 1.427016 -7.335085 -v -0.550610 1.636725 7.701257 -v -0.184183 1.470114 7.965120 -v -0.356142 1.480919 7.919915 -v -0.271136 1.575414 7.905256 -v -0.501439 1.483811 7.832011 -v -0.555953 1.557243 7.735547 -v -0.724057 1.452509 7.561075 -v -0.980422 1.417958 7.084308 -v -0.908534 1.447106 7.257532 -v -0.939935 1.419018 7.282726 -v -0.822492 1.446200 7.407862 -v -0.850670 1.419285 7.434948 -v -0.621158 1.471109 7.707720 -v -0.746773 1.423541 7.592715 -v -0.635186 1.442246 7.745333 -v -0.189242 1.413585 8.025587 -v -0.878852 1.403629 7.462059 -v -0.803563 1.388582 7.674817 -v -0.769487 1.406245 7.624363 -v -0.918289 1.385893 7.504447 -v -1.015227 1.382398 7.345387 -v -0.364442 1.431606 7.972756 -v -0.511598 1.442937 7.876547 -v -0.649219 1.425013 7.782948 -v -0.837635 1.408706 7.725255 -v -0.957725 1.405943 7.546875 -v -1.059111 1.400230 7.382830 -v -1.275143 1.454124 7.240187 -v -1.152580 1.355795 7.198538 -v -0.971344 1.402285 7.307949 -v -1.041840 1.358458 7.135857 -v -1.151396 1.271503 6.999184 -v -0.672117 1.404860 7.841801 -v -1.056155 1.484394 7.651218 -v -1.163909 1.469577 7.469476 -v -1.326932 1.620414 7.238987 -v -1.224995 1.634760 7.523807 -v -1.250408 1.787088 7.546576 -v -0.383821 1.376660 8.110682 -v -0.537700 1.393838 7.991468 -v -0.695014 1.422606 7.900669 -v -0.553632 1.412414 8.061825 -v -0.923319 1.481865 7.854587 -v -1.127282 1.641951 7.738727 -v -1.342574 2.172348 7.480217 -v -1.294769 2.532102 7.506557 -v -1.352066 2.338263 7.427687 -v -1.257386 1.939413 7.569346 -v -1.147958 1.787607 7.788406 -v -0.815891 1.631877 8.227547 -v -0.999347 1.628508 7.993338 -v -0.751804 1.495320 8.051482 -v -0.394889 1.398048 8.195772 -v -0.200110 1.357512 8.185737 -v 0.000000 1.349277 8.212379 -v -1.214207 2.188770 7.717457 -v -1.069025 1.938126 8.114807 -v -1.031270 1.766277 8.069627 -v -1.162103 1.946081 7.809398 -v -1.182947 2.233161 7.851377 -v -1.126709 2.097102 7.969667 -v -1.106549 2.226930 8.054207 -v -1.163681 2.397018 7.859357 -v -1.171106 2.320122 7.879097 -v -1.195835 2.586792 7.648397 -v -1.113602 2.548758 7.921816 -v -1.079027 2.416320 8.074515 -v -0.987455 2.446020 8.310556 -v -0.906179 2.177211 8.611516 -v -0.722897 2.153667 8.926217 -v -0.684620 1.892397 8.714986 -v -0.402494 2.128944 9.369587 -v -0.526007 2.129730 9.235456 -v -0.502418 2.300541 9.309047 -v -0.497417 1.972806 9.076187 -v -1.079963 2.751930 7.629907 -v -0.872609 2.624709 8.328406 -v -0.982538 2.695557 7.985207 -v -0.820370 2.897052 7.620287 -v -1.144595 2.758947 7.307598 -v -1.181666 2.724576 6.953297 -v -0.926009 2.982201 6.948767 -v -0.974306 3.031329 6.566297 -v -1.290257 2.689050 6.502546 -v -1.061330 3.240360 5.690906 -v -1.015304 3.131259 6.143333 -v -1.250426 2.812626 6.026449 -v -0.637892 3.182538 6.960979 -v -0.604655 3.123378 7.283537 -v -0.876698 2.945331 7.290977 -v -0.562742 3.045708 7.599047 -v -0.752195 2.827005 7.953977 -v -0.679889 2.762688 8.306867 -v -0.704027 3.366156 6.209093 -v 0.000000 3.326490 6.964999 -v 0.000000 3.400518 6.638300 -v -0.343268 3.480714 6.239543 -v 0.000000 3.501936 6.245602 -v -0.359057 3.592857 5.786156 -v -0.365462 3.697041 5.302405 -v -0.726746 3.460701 5.750815 -v -1.091510 3.329769 5.224496 -v -1.413728 3.125040 4.688398 -v 0.000000 3.236250 7.251406 -v 0.000000 3.640266 5.799026 -v 0.000000 3.747516 5.311316 -v -0.387191 2.295267 9.450975 -v -0.369698 2.581524 9.226277 -v -0.443558 2.460720 9.299537 -v -0.219986 2.500278 9.467626 -v -0.200603 2.562858 9.384016 -v -0.190367 2.747181 8.935636 -v -0.213110 2.838990 8.622107 -v -0.236318 2.938071 8.263367 -v -0.259580 3.034395 7.903247 -v 0.000000 3.146109 7.555100 -v -0.280685 3.127605 7.570430 -v -0.307988 2.655072 9.137687 -v -0.179909 2.660967 9.193696 -v -0.414944 2.789853 8.633687 -v -0.357935 2.709567 8.935786 -v -0.518414 2.962215 7.929586 -v -0.297371 3.207993 7.261970 -v -0.669860 3.259230 6.612320 -v -0.309821 3.284826 6.962750 -v -0.324545 3.365628 6.630441 -v -0.762722 2.567478 8.686997 -v -0.848360 2.384847 8.663476 -v -0.694145 2.332398 9.001245 -v -0.495740 2.624094 8.973136 -v -0.468353 2.878398 8.283106 -v -0.598352 2.694258 8.660836 -v -0.618653 2.501331 9.014657 -v -0.434504 4.066239 -3.388447 -v -0.310169 3.726294 -5.490697 -v -0.368948 3.862812 -4.494491 -v -0.543848 3.423990 -6.154593 -v 0.000000 3.991557 -4.510510 -v -0.425912 3.368622 -6.807328 -v -0.743447 3.566691 5.277687 -v -1.108208 3.438648 4.744079 -v -1.121783 3.551319 4.258739 -v -1.388063 3.272769 3.742223 -v -1.148591 3.678432 3.771743 -v -0.367676 4.042284 3.781043 -v 0.000000 3.951561 4.276679 -v 0.000000 4.067183 3.775253 -v 0.000000 3.826035 4.798529 -v -0.360056 3.924354 4.277819 -v -0.362987 3.788385 4.795018 -v -0.734798 3.798906 4.270558 -v -0.762929 3.922338 3.782633 -v -0.741866 3.673716 4.779359 -v -0.205910 1.384992 8.285470 -v -0.581512 1.513149 8.234276 -v -0.406351 1.516749 8.401046 -v -0.211129 1.515789 8.524104 -v 0.000000 1.380918 8.318741 -v -0.424925 1.671654 8.636567 -v -0.651821 1.775328 8.572427 -v -0.619022 1.658256 8.429867 -v -0.858530 1.757508 8.339116 -v -0.894635 1.883136 8.450686 -v -1.025930 2.209278 8.254758 -v -0.217715 1.669653 8.798027 -v -0.460961 1.818483 8.879627 -v -0.235700 1.817823 9.070906 -v -0.267638 2.049735 9.387136 -v -0.256868 1.971312 9.289336 -v -0.278408 2.128155 9.464476 -v -0.239372 2.437698 9.519227 -v -0.341750 2.449209 9.428987 -v -0.426443 0.750844 5.336720 -v 0.000000 0.670561 5.340981 -v 0.000000 0.670558 6.809538 -v -1.747295 2.596497 4.576942 -v -1.788563 2.671095 4.152533 -v -1.817885 2.060883 4.474732 -v -1.808951 1.664856 4.738643 -v -1.742348 1.295748 4.979033 -v -1.660190 1.000224 4.950203 -v -1.597694 1.006326 5.232381 -v -1.108631 0.344742 4.848625 -v -1.024067 0.308106 4.545835 -v -1.747019 1.619814 5.055710 -v -1.695059 1.945572 5.171840 -v -1.784789 2.001459 4.837373 -v -1.546445 2.435583 5.388470 -v -1.816055 1.717494 4.421183 -v -1.769969 1.330092 4.667004 -v -1.541045 0.746980 4.673993 -v -1.522184 0.755982 4.976873 -v -1.352621 0.567264 4.748600 -v -1.497356 0.769308 4.385693 -v -1.315610 0.590397 4.451360 -v -1.677155 1.018413 4.641562 -v -1.231535 2.339838 7.611917 -v -1.238822 2.340930 7.586387 -v -1.234151 2.261535 7.600157 -v -0.351596 4.421394 1.775378 -v -0.723395 4.261200 1.750265 -v -1.056803 4.037607 -0.456997 -v -1.086167 4.049907 0.830774 -v -1.086968 3.982332 1.717826 -v -0.758945 4.176072 2.597807 -v -0.364199 4.314102 2.597855 -v -0.773942 4.052736 3.295433 -v -0.377027 4.193604 3.296573 -v -1.134182 3.892794 2.592224 -v -1.006607 3.948726 -1.472503 -v -1.204535 3.558417 -1.499254 -v -1.269518 3.666516 -0.478873 -v -1.603313 1.950525 -1.506739 -v -1.397201 2.921571 -1.499641 -v -1.575572 2.320596 -1.504129 -v -1.482236 2.974503 -0.463777 -v -1.001465 3.368694 -3.376809 -v -0.868190 3.282744 -4.431761 -v -0.842237 3.690423 -3.389737 -v -0.737687 3.582855 -4.467461 -v -0.726800 3.215547 -5.421790 -v -0.618965 3.488625 -5.460131 -v -0.526898 3.092799 -6.785158 -v -0.625865 3.163263 -6.120244 -v -0.588290 2.721057 -7.465162 -v -0.451304 2.195697 -7.522432 -v -0.379298 2.255772 -8.142409 -v -0.528383 2.712663 -8.089670 -v -0.785462 2.371980 -6.032110 -v -0.765218 2.771445 -6.080977 -v -0.644759 2.331846 -6.762777 -v -0.661409 2.741493 -6.772437 -v -0.240677 1.834500 -7.665503 -v -0.538457 1.910943 -6.572131 -v -0.474638 3.033159 -7.460692 -v -0.336911 3.311973 -7.475662 -v -0.319961 3.220986 -8.090930 -v -0.461717 2.988378 -8.080609 -v -0.161294 3.411099 -8.111796 -v 0.000000 3.575256 -8.209820 -v -0.981431 0.858444 -2.317090 -v -1.230479 1.035141 -1.464463 -v -1.130594 1.087989 -2.321509 -v -1.204037 1.366044 -2.312809 -v -1.297322 1.662159 -2.312395 -v -1.411364 1.967781 -2.319409 -v -1.123112 3.474102 -2.287129 -v -1.293296 2.873250 -2.291785 -v -1.146752 2.827110 -3.365470 -v -0.806600 1.027764 -3.483463 -v -0.693707 0.555483 -2.302843 -v -1.036868 1.625970 -3.434320 -v -1.423079 2.306682 -2.309623 -v -0.302078 0.401748 -2.273668 -v -1.100423 0.780384 -1.457728 -v -1.210385 0.743811 -0.338872 -v -1.504763 1.268439 -0.387724 -v -1.331147 1.321893 -1.472773 -v -1.668470 1.574979 -0.415135 -v -1.719488 1.951716 -0.429610 -v -1.498808 1.613946 -1.493956 -v 0.000000 3.917669 -8.607714 -v -0.000004 1.353765 -6.302464 -v -0.579155 1.335906 -7.058488 -v -0.444836 1.505019 -7.274275 -v -0.448526 1.545714 -7.306075 -v 0.000000 4.211949 3.287727 -v -0.000002 4.348749 2.593961 -v -0.607919 1.410090 -7.057557 -v -0.476447 1.556169 -7.267494 -v -0.443726 1.548915 -7.563982 -v -0.536579 1.481511 -7.340335 -v -0.344150 1.028698 7.652440 -v -0.278132 0.941932 7.752140 -v -1.197938 2.445849 7.753337 -v -1.190282 2.470041 7.758137 -v -1.230794 2.422050 7.627457 -v -1.229495 2.404689 7.641677 -v -1.186463 2.255070 7.829026 -v -1.197764 2.193894 7.792367 -v -1.199003 2.215476 7.782496 -v -1.244093 2.079903 7.580927 -v -1.213172 2.214537 7.720547 -v -1.179620 2.090784 7.834637 -v -1.213682 2.443854 7.694027 -v -1.228418 2.207055 7.653707 -v -1.229606 2.277243 7.618937 -v -1.176980 2.443917 7.813666 -v -1.210502 2.464629 7.689317 -v -1.179326 2.324856 7.846637 -v -1.185614 2.424846 7.801456 -v -1.225628 2.227791 7.664627 -v -1.173287 2.383071 7.839737 -v -0.879101 1.345452 -4.904773 -v -0.866900 1.397133 -4.324602 -v -0.469301 0.913491 -4.199384 -v -0.555299 0.762156 -3.412180 -v -0.197393 0.780639 -4.066962 -v -0.911753 1.258362 -3.471160 -v -1.158056 2.026071 -3.404260 -v -1.214732 2.315916 -3.385330 -v -1.037018 2.360721 -4.396334 -v -0.376640 2.938242 -10.725307 -v -0.443264 2.958135 -9.231702 -v -0.442958 2.927100 -10.048237 -v -0.199883 1.940196 -8.212884 -v -0.501992 2.754759 -9.240403 -v -0.362801 2.325438 -8.666195 -v -0.496274 2.712045 -8.625722 -v -0.249452 3.193700 -10.648869 -v -0.151421 2.166849 -10.119249 -v 0.000000 2.125134 -10.083279 -v 0.000000 2.101734 -10.417657 -v -0.145196 2.020104 -9.233773 -v 0.000000 2.078499 -9.698350 -v -0.324107 2.389272 -10.000570 -v -0.186728 2.172732 -9.791831 -v -0.255920 2.296332 -10.639358 -v -0.117767 2.143266 -10.430947 -v 0.000000 1.972479 -10.678987 -v 0.000000 1.793320 -9.027020 -v -0.202718 2.047821 -8.723288 -v -0.366518 2.403477 -9.243193 -v -0.256685 2.157168 -9.237164 -v -0.498263 2.717199 -10.036839 -v -0.092138 2.026344 -10.700377 -v -0.079661 1.731285 -11.068179 -v -0.411182 2.672648 -10.716697 -v -0.155177 1.678320 -11.766847 -v -0.215048 2.032389 -11.217010 -v 0.000000 2.262788 -12.567460 -v -0.103781 2.345439 -12.363101 -v -0.072596 0.558383 -12.280480 -v 0.000000 0.170486 -12.874330 -v 0.000000 0.426602 -12.284471 -v -0.087872 0.866687 -11.996022 -v -0.105995 1.718324 -12.407260 -v 0.000000 1.982046 -12.669606 -v -0.108212 1.091213 -12.451451 -v 0.000000 0.885095 -12.922123 -v 0.000000 4.432842 -1.653850 -v 0.000000 4.356717 -2.389648 -v -0.931436 3.836859 -2.264095 -v -0.484178 4.206684 -2.466241 -v -0.000003 4.636251 1.156184 -v -0.836591 4.310844 -0.403726 -v -0.530879 4.255392 -1.860175 -v -0.337133 4.550865 -1.286647 -v -0.634454 4.502475 -0.347335 -v -0.528098 4.509135 0.858371 -v -0.353633 4.656351 0.708917 -v -0.787820 4.324920 0.900224 -v -0.496475 4.426287 -1.321468 -v -0.738512 4.226496 -1.407832 -v -0.377354 4.807536 -0.346450 -v -0.255803 4.800555 0.639917 -v -0.196952 4.972194 0.550262 -v -0.523043 4.650603 -0.322537 -v 0.000000 4.974951 0.753857 -v -0.291002 5.061264 -0.420514 -v -0.230531 5.609394 -0.491101 -v -0.126830 6.335931 -0.051499 -v -0.073589 7.636790 -1.126523 -v -0.150587 5.710160 0.246983 -v 0.000000 5.181471 0.657083 -v -0.173396 5.206644 0.449081 -v -0.073757 6.139584 -1.227016 -v -0.104306 7.402701 -0.942577 -v -0.100049 6.961100 -0.420859 -v -0.044198 7.845045 -1.263627 -v -0.000003 4.514892 -1.764892 -v -0.160898 4.603905 -1.427278 -v -0.144674 4.705746 -1.645918 -v -0.078344 5.982624 -1.218763 -v 0.000000 6.153354 -1.323727 -v 0.000000 6.634104 -1.337254 -v -0.094355 5.470734 -1.291432 -v -0.121826 4.954044 -1.524457 -v 0.000000 4.878065 -1.721475 -v 0.000000 4.546959 -2.017246 -v 0.000000 4.496469 -1.616428 -v 0.000000 6.353507 0.053513 -v 0.000000 4.815771 0.902948 -v 0.000000 0.746993 -11.950120 -v 0.000000 1.192757 -12.818291 -v 0.000000 2.105220 -12.461259 -v 0.000000 2.662333 -12.501657 -v 0.000000 2.937909 -12.478191 -v 0.000000 1.654874 -12.775063 -v 0.000000 3.248692 -12.607402 -v 0.000000 5.487003 -13.978440 -v 0.000000 5.637066 -14.045316 -v 0.000000 5.680266 -14.353501 -v 0.000000 5.875746 -14.266533 -v 0.000000 6.246162 -14.172215 -v 0.000000 5.787390 -13.181346 -v 0.000000 4.814877 -11.880760 -v 0.000000 6.290856 -14.149002 -v -0.141725 3.485646 -10.652797 -v -0.138620 3.379190 -10.423867 -v -0.274442 3.122721 -10.036116 -v -0.448925 2.953818 -8.612252 -v -0.319937 3.153609 -8.605712 -v -0.299204 3.108810 -9.218320 -v -0.193232 3.336672 -8.598571 -v -0.174758 3.297102 -8.879228 -v -0.147431 3.263556 -9.172451 -v -0.129584 3.296360 -10.005277 -v -0.136655 3.246794 -9.591721 -v -0.110540 3.462891 -8.593322 -v 0.000000 3.989776 -8.759383 -v -0.085796 3.417213 -8.836718 -v 0.000000 3.431229 -8.915168 -v 0.000000 3.361595 -9.068591 -v -0.000005 3.328901 -9.994657 -v 0.000000 3.429149 -10.397138 -v 0.000000 3.539712 -10.614217 -v 0.000000 6.092526 -13.699922 -v 0.000000 5.229016 -12.339537 -v -0.000006 4.377036 -11.442758 -v -0.301643 2.754789 -11.360047 -v -0.204701 2.695653 -11.894410 -v -0.211289 3.368010 -11.182538 -v -0.126893 3.755327 -10.965844 -v -0.116603 4.225614 -11.509084 -v -0.253166 3.597077 -11.795255 -v 0.000000 5.374022 -13.843084 -v 0.000000 5.197172 -13.771539 -v -0.110699 3.357044 -12.390697 -v -0.128594 3.848981 -12.513577 -v -0.000006 3.592920 -12.787930 -v -0.162260 4.510911 -12.879640 -v -0.112859 4.621455 -11.971480 -v -0.123785 5.122674 -12.522758 -v -0.102227 5.805183 -13.450114 -v -0.093986 5.309763 -13.637678 -v -0.084956 5.571456 -13.896873 -v -0.075926 5.833146 -14.156075 -v 0.000000 6.014286 -14.302771 -v 0.000000 6.246516 -14.488441 -v -0.073414 6.154620 -14.312218 -v -0.068423 6.190806 -14.020712 -v 0.000000 6.344481 -14.448197 -v 0.000000 6.981207 -0.353604 -v 0.000000 6.061249 -1.275164 -v -0.000004 5.974854 -1.352005 -v 0.000000 5.471133 -1.390128 -v 0.000000 6.704060 -1.302871 -v 0.000000 7.881681 -1.207760 -v 0.000000 7.285491 -1.392268 -v 0.000000 6.794930 -1.358278 -v -0.036473 7.776766 -1.378334 -v 0.000000 7.660941 -1.449339 -v -0.039914 7.270251 -1.342484 -v -0.057485 6.693021 -1.263106 -v -0.112214 6.753111 -0.825910 -v -0.093944 7.300551 -1.069976 -v -0.061349 7.570263 -1.215099 -v -0.053876 7.509920 -1.293559 -v 0.000000 4.502811 -1.990149 -v 0.000000 3.279280 -9.578547 -v 0.000000 4.299623 -13.140718 -v -1.518407 1.834275 6.360049 -v -1.097210 1.338226 7.167204 -v -1.215083 1.289559 7.014497 -v -1.354931 1.393737 6.996946 -v -1.411241 1.540806 6.934396 -v -1.373210 1.761693 7.229267 -v -1.470905 1.663032 6.876077 -v -1.387670 1.944634 7.205862 -v -1.387421 2.217396 7.182797 -v -1.490699 1.785258 6.817786 -v -1.489217 2.066433 6.672647 -v -1.373819 2.490672 7.166057 -v -1.460774 2.284230 6.548747 -v -1.011128 1.382451 7.110107 -v -1.087707 1.291362 6.983944 -v -1.117092 1.256835 6.880019 -v -1.059249 1.325840 6.844146 -v -1.015733 1.372476 6.709156 -v -0.851606 1.595154 7.107407 -v -0.898040 1.513902 7.139175 -v -0.742319 1.529484 7.460567 -v -1.056959 1.324728 6.958547 -v -1.026216 1.369773 6.933131 -v -0.999660 1.469268 6.815123 -v -0.272111 1.674930 7.868028 -v -0.711368 1.609389 7.436687 -v -0.412445 2.112591 5.349350 -v -0.412442 2.112591 7.154447 -v -0.765350 2.005449 5.331259 -v -0.963422 1.682241 5.311613 -v -0.963422 1.682241 6.087290 -v -0.965124 1.541031 6.771355 -v -0.765347 2.005449 6.643341 -v -3.123149 -0.620421 2.442191 -v -2.264591 1.020273 2.604362 -v -1.969388 1.204242 1.832933 -v -2.107220 1.085553 3.333797 -v -2.405988 0.521607 3.079754 -v -2.746841 -0.345042 2.773073 -v -2.872814 -0.223458 2.683175 -v -3.020550 -0.283113 2.271881 -v -3.399539 -0.975264 2.150519 -v -3.505139 -0.989130 1.733307 -v -1.850048 1.137786 1.362035 -v -2.118842 0.996459 1.785515 -v -2.230508 0.841911 3.239237 -v -2.645082 0.165009 2.904071 -v -2.554571 0.405798 1.706570 -v -3.889230 -1.567923 1.281458 -v -3.819989 -1.405683 0.847520 -v -2.686013 0.298284 2.564276 -v -2.468390 0.671649 2.699714 -v -3.794130 -1.389573 0.685667 -v -3.468899 -1.017420 0.749330 -v -3.201479 -0.661389 0.974183 -v -2.919338 -0.112050 1.511024 -v -2.358732 0.381360 1.128905 -v -2.312772 0.717237 1.761527 -v -1.960790 0.995499 1.249865 -v -2.852093 -0.234153 0.991595 -v -3.051839 -0.501525 0.902843 -v -4.187521 -1.927890 0.515990 -v -4.252350 -2.003429 0.610364 -v -4.086030 -1.799280 0.539087 -v -4.086240 -1.783382 0.656018 -v -3.420001 -0.813168 1.165130 -v -3.640260 -1.341453 1.789262 -v -3.888840 -1.679403 1.427447 -v -4.301790 -2.106300 0.758531 -v -4.320294 -2.114246 0.595010 -v -4.266840 -2.039190 0.523544 -v -4.137540 -1.898160 0.962066 -v -4.269990 -2.042520 0.760736 -v -4.165111 -1.983180 1.051874 -v -4.050271 -1.827840 0.525740 -v -4.276920 -2.078250 0.493781 -v -4.240951 -2.059650 0.515363 -v -4.292340 -2.125350 0.538499 -v -4.331640 -2.150850 0.521714 -v -4.362630 -2.199330 0.578303 -v -4.308361 -2.145150 0.588410 -v -4.275240 -2.130300 0.753287 -v -4.123470 -2.020200 1.043069 -v -4.221210 -2.076780 0.694529 -v -4.023631 -1.833960 0.632639 -v -4.061970 -1.962540 0.944636 -v -3.743400 -1.569453 1.029653 -v -3.742769 -1.429323 0.663605 -v -4.301910 -2.150340 0.671981 -v -2.043056 0.602232 3.425927 -v -2.258036 0.370140 3.203927 -v -2.506124 0.038721 3.010214 -v -2.571374 -0.390084 2.567996 -v -2.881896 -0.750588 2.342972 -v -2.989106 -0.738087 2.496668 -v -3.270959 -1.107684 2.197226 -v -3.815399 -1.740183 1.411233 -v -3.507779 -1.461003 1.752681 -v -3.577529 -1.449453 1.843527 -v -3.862500 -1.742493 1.471377 -v -1.789499 0.492576 3.077303 -v -2.021438 0.293649 2.923781 -v -2.269356 -0.020310 2.759306 -v -2.688383 -0.335601 1.713416 -v -3.188609 -1.114308 2.071943 -v -3.437219 -1.059630 0.800156 -v -3.282719 -0.871644 0.887531 -v -3.128219 -0.683658 0.974903 -v -3.288121 -1.071435 1.344254 -v -2.980469 -0.503025 1.020530 -v -2.725658 -0.176301 1.201262 -v -2.283752 0.336366 1.190807 -v -2.016848 0.639942 1.180196 -v -2.162834 0.340101 1.936583 -v -1.783943 0.885870 1.164173 -v -1.826489 0.666888 2.102021 -v -1.667423 0.575112 3.222288 -v -0.960230 1.129269 -5.263156 -v -0.966443 0.936024 -5.301796 -v -0.586721 1.543770 -5.707937 -v -0.573191 1.481184 -6.379386 -v -0.622403 1.494018 -6.431498 -v -0.787826 1.223589 -6.341531 -v -0.865634 1.277337 -5.668992 -v -0.685799 1.453947 -6.034034 -v -0.705242 1.307037 -6.636847 -v -0.810665 1.147398 -6.417789 -v -0.995045 1.007676 -6.005297 -v -0.999077 0.911910 -6.064396 -v -1.186713 0.659090 -5.687936 -v -0.750377 1.125795 -6.375820 -v -0.928778 0.889239 -6.048467 -v -0.678476 1.161390 -5.599633 -v -0.820115 0.957321 -5.293453 -v -0.578963 1.277547 -6.066640 -v -0.556718 1.371750 -6.452497 -v -0.507761 1.510002 -6.872667 -v -0.495065 1.449207 -6.915778 -v -0.718073 1.244490 -6.686077 -v -0.675095 1.219143 -6.663457 -v -0.616118 1.352640 -7.081982 -v -0.416342 1.383552 -5.789503 -v -0.452081 1.560486 -6.047740 -v -1.008416 2.808030 -4.398251 -v -0.866336 2.792796 -5.372530 -v -0.257687 1.645710 -7.004604 -v -0.241226 1.373790 -6.264847 -v -0.218069 1.217745 -5.854329 -v -0.567731 1.212900 -5.411834 -v -0.631370 1.086015 -4.898322 -v -0.396458 1.139865 -5.260213 -v 0.000000 1.302540 -5.848573 -v -0.425183 0.971436 -4.654093 -v -0.172790 1.045695 -5.183322 -v -0.237995 0.631563 -3.335020 -v 0.000000 0.788476 -4.042661 -v -0.430640 -0.027180 2.549786 -v -0.773102 0.073425 3.357170 -v -0.747320 0.110787 4.019179 -v -0.425042 -0.000501 3.366440 -v -0.423176 -0.004236 1.562138 -v -0.788873 0.059226 2.548139 -v -1.304420 0.560907 3.959061 -v -1.308824 0.491214 3.372017 -v -1.405442 0.598095 3.375677 -v -1.381070 0.634992 2.528726 -v -1.501091 0.655275 3.364607 -v -1.278149 0.632409 1.461680 -v -1.303058 0.502350 2.539541 -v -1.064738 0.242619 3.359240 -v -1.081523 0.228915 2.545418 -v -0.777563 0.078411 1.548149 -v -1.078139 0.411525 0.771347 -v -0.758216 0.132228 0.941867 -v -0.949151 0.427518 -0.310606 -v -1.260476 0.715602 0.833048 -v -1.375166 0.932265 0.949484 -v -1.330739 1.007115 -0.357943 -v -1.064567 0.274593 1.512227 -v -1.365467 0.829185 1.432706 -v -1.468076 0.974406 1.417931 -v -1.583663 1.224930 0.758084 -v -1.685375 2.340369 -0.444295 -v -1.328714 3.653046 0.790955 -v -1.586138 2.968503 0.781358 -v -1.629980 2.931231 1.681139 -v -1.359305 3.578568 1.697666 -v -1.767221 2.341368 0.766394 -v -1.793780 1.959261 0.752549 -v -1.790072 2.346420 1.642211 -v -1.749122 1.582761 0.783929 -v -1.816748 2.018694 1.612595 -v -1.731917 1.429797 1.406207 -v -1.575563 1.222809 1.062590 -v -1.663601 2.862522 2.582717 -v -1.890200 2.046729 2.581160 -v -1.163507 3.788115 3.291173 -v -1.377437 3.473604 2.586371 -v -1.828625 2.249058 3.285530 -v -1.832732 2.327961 2.577545 -v -1.710845 2.789400 3.272930 -v -1.868078 1.545960 1.838060 -v -1.815893 1.720821 1.598738 -v -1.955033 1.808913 2.586737 -v -1.897286 1.951347 3.305027 -v -1.857158 1.867578 3.738680 -v -1.820975 2.185446 3.720740 -v -1.853999 2.120766 4.106810 -v -1.740386 2.726049 3.720050 -v -1.404032 3.199014 4.213919 -v -1.403939 3.371979 3.277070 -v -1.764635 1.265703 1.438313 -v -1.664654 1.142403 1.264406 -v -1.784705 1.387101 4.366463 -v -1.842455 1.786473 4.098889 -v -1.851707 1.572138 3.741350 -v -1.730696 1.218675 4.008260 -v -1.918853 1.687287 3.325937 -v -1.833353 1.472112 4.068230 -v -1.552577 0.759345 2.449883 -v -1.590239 0.654744 3.308987 -v -1.459784 0.722658 2.503244 -v -1.554950 0.739275 3.759800 -v -1.684868 0.771348 3.694190 -v -1.662851 1.052307 4.282069 -v -1.713701 1.007112 3.905900 -v -1.600988 0.895854 4.020050 -v -1.859204 1.093770 3.668690 -v -2.055341 1.253532 3.344537 -v -1.830998 1.326228 3.727130 -v -2.000865 1.466409 3.349817 -v -1.992764 1.423911 2.593226 -v -2.011919 1.605765 2.592380 -v -1.876643 1.369989 1.853147 -v -2.096177 1.258239 2.581310 -v -1.909028 0.794721 3.572717 -v -1.678604 0.962046 1.308467 -v -1.746029 1.071669 1.149857 -v -1.574522 1.001313 1.415906 -v -1.672337 0.741063 2.356685 -v -1.453904 2.338293 5.750959 -v -1.327481 2.943366 5.597393 -v -1.676444 2.518596 4.996492 -v -1.389485 3.042453 5.151325 -v -0.785555 1.504506 -5.393353 -v -0.822398 1.646877 -5.314512 -v -0.925169 2.013060 -5.312743 -v -0.756962 2.002734 -5.931311 -v -0.643919 1.663434 -5.767154 -v -0.923027 2.383908 -5.335334 -v -1.830110 0.988317 1.006133 -v -2.089100 0.694719 1.108394 -v -2.550195 0.018885 1.138058 -v -2.650146 0.027240 1.077374 -v -2.794952 -0.141840 1.111931 -v -2.832726 -0.322395 1.066157 -v -4.330979 -2.125949 0.594299 -v -4.188666 -1.964934 0.485663 -v -4.156621 -1.952369 0.505541 -v -4.078771 -1.824630 0.491603 -v -3.770459 -1.403163 0.617771 -v -3.289470 -0.788454 0.829556 -v -1.032233 0.289026 3.989090 -v -1.448786 0.697206 3.941420 -v -1.056344 1.006468 6.947868 -v -1.355195 1.020312 6.341837 -v -1.309658 0.871464 6.043759 -v -1.257899 0.911613 6.402407 -v -1.139372 1.114092 6.716714 -v -1.181330 0.991924 6.683746 -v -1.107101 1.071007 6.816199 -v -1.041563 1.173102 6.803680 -v -1.014644 1.147099 6.905239 -v -0.966956 1.104532 7.028775 -v -0.941051 1.183395 6.938569 -v -0.904907 1.151766 7.055986 -v -0.853526 1.171917 7.043090 -v -0.603983 1.132411 7.157959 -v -0.782741 1.171746 6.911570 -v -1.300721 1.125141 6.636235 -v -0.383321 1.033771 7.342098 -v -0.635036 1.084567 6.977870 -v -1.015157 1.235376 6.785358 -v -0.930452 1.256781 6.709229 -v -0.961718 1.420638 6.642830 -v -0.992822 1.309986 6.687014 -v -0.885624 1.217190 6.765932 -v -0.733691 0.972588 5.316173 -v -0.426440 0.750844 6.688579 -v 0.000000 0.979894 7.537849 -v -0.733691 0.972588 6.216080 -v -0.913013 1.292895 5.308463 -v -0.913010 1.292895 5.997829 -v 0.000000 1.530363 4.548833 -v 0.000000 2.189652 5.903419 -v -0.977465 1.219512 6.820903 -v -1.087643 1.189302 6.756611 -v -1.205030 1.195125 6.831128 -v -1.320131 1.194480 6.746543 -v -1.439729 1.422741 6.753317 -v -1.483520 1.525296 6.661521 -v -1.507064 1.627854 6.569756 -v -1.233659 1.231206 6.897647 -v -1.373051 1.297614 6.850214 -v -1.499102 1.480170 6.445370 -v -1.436729 1.310796 6.667574 -v -1.493612 1.310844 6.366139 -v -1.448540 1.149045 6.332810 -v -1.563155 1.735368 5.993540 -v -1.544255 1.637781 6.191420 -v -1.590554 1.486725 5.854159 -v -1.555580 1.421796 6.071540 -v -1.518872 1.203369 6.011809 -v -1.685786 1.582713 5.352380 -v -1.616819 1.542645 5.616738 -v -1.462880 2.146295 6.001260 -v -1.496534 1.968105 6.182719 -v -1.559021 1.818693 5.757800 -v -1.599794 1.269099 5.529920 -v -1.554863 1.240575 5.775379 -v -1.507163 1.030659 5.497880 -v -1.424015 1.019949 6.003920 -v -1.455077 1.031064 5.753928 -v -1.628012 1.888248 5.486629 -v -1.206635 0.778522 6.518927 -v -1.253288 0.706345 6.132710 -v -1.317536 0.629404 5.589020 -v -1.257515 0.687271 5.856770 -v -1.332587 0.864427 5.782100 -v -1.401605 0.822217 5.525060 -v -1.475216 0.778356 5.256169 -v -1.674476 1.280304 5.264569 -v -0.392018 0.028131 0.895826 -v -0.913010 1.288047 6.617625 -v -0.226352 0.992911 7.713404 -v -0.782541 1.137691 7.151186 -v -0.832229 1.122886 7.188195 -v -0.000006 1.557180 -7.089445 -v -0.000005 3.553362 -7.504491 -v -0.268532 2.272831 9.543152 -v 0.000000 1.147224 -11.551182 -v 0.000000 1.656130 -11.028982 -v 0.000000 0.144829 -13.442556 -v -0.000011 7.621251 -0.858355 -v -0.000002 4.489125 1.784207 -v -0.000004 1.867887 -8.237753 -v 0.000000 7.913421 -1.504253 -v -0.000005 0.553715 -13.050191 -v -0.000006 3.837008 -10.916074 -v 0.000000 1.059918 -5.157254 -v -4.330979 -2.125949 0.594299 -v -4.320294 -2.114246 0.595010 -v -4.240951 -2.059650 0.515363 -v -4.188666 -1.964934 0.485663 -v -4.188666 -1.964934 0.485663 -v -4.156621 -1.952369 0.505541 -v -0.904907 1.151766 7.055986 -v -1.024784 1.269969 6.774074 -v -1.058811 1.242488 6.790955 -v -1.100289 1.242978 6.829710 -v -1.015157 1.235376 6.785358 -v -0.930452 1.256781 6.709229 -v -0.400425 0.976938 7.688704 -v -0.159956 0.809698 7.818166 -v -0.900350 1.080331 7.199248 -v 0.000000 3.803309 -8.451863 -v -0.387191 2.295267 9.450975 -v -0.661619 1.136829 7.306580 -v 0.000000 3.835392 -8.801773 -v 0.000000 1.591368 -9.223554 -v -0.083921 1.245576 -11.593570 -v -0.071318 0.369836 -12.971261 -v 0.000000 1.499709 -9.353113 -v -4.252350 -2.003429 0.610364 -v -4.292340 -2.125350 0.538499 -v -4.023631 -1.833960 0.632639 -v -0.995045 1.007676 -6.005297 -v -0.179474 0.876564 -4.518944 -v -4.188666 -1.964934 0.485663 -v -0.853526 1.171917 7.043090 -v -1.015157 1.235376 6.785358 -v -1.058811 1.276457 6.790954 -v -1.149968 1.186905 6.775416 -v -1.413314 1.195401 6.613931 -v -0.913010 1.288047 6.617625 -v 0.000000 5.727343 0.375541 -v -0.190790 6.107083 -0.611197 -v -0.131942 6.201291 0.012722 -v 0.000000 6.196429 0.134297 -v -0.176378 6.242195 -0.651696 -v 0.000000 0.890935 -4.487016 -v -0.183584 6.174639 -0.631446 -v -0.076051 6.061104 -1.222890 -v -0.129386 6.268611 -0.019389 -v 0.000000 6.274968 0.093905 -v -0.494044 4.579412 0.180791 -v -0.287153 4.889865 0.101906 -v -0.389423 4.725579 0.158690 -v -0.232199 5.133954 0.014283 -v -0.190559 5.659777 -0.122059 -v -0.106132 6.857105 -0.623385 -v -0.161366 6.154187 -0.299238 -v -0.151604 6.289063 -0.351598 -v -0.156485 6.221625 -0.325418 -v -0.341971 4.627254 -0.874908 -v -0.261014 4.756641 -0.996184 -v -0.084850 6.723066 -1.044508 -v -0.206414 5.007654 -0.972486 -v -0.162443 5.540064 -0.891267 -v -0.134567 6.044853 -0.914980 -v -0.125068 6.190889 -0.939356 -v -0.129817 6.117871 -0.927168 -v -0.072439 7.257837 -1.214364 -v -0.016736 7.686204 -1.041330 -v 0.000000 7.716813 -0.986566 -v -0.034011 7.494805 -1.374483 -v 0.000000 7.488658 -1.422513 -v -0.764140 1.127336 -4.275962 -v -0.080261 1.662603 -9.361574 -v -0.446095 2.955976 -8.921977 -v -0.499133 2.733402 -8.933063 -v -0.364660 2.364457 -8.954694 -v -0.229702 2.102494 -8.980226 -v -0.309571 3.131209 -8.912016 -v -1.121324 0.711048 -5.774669 -v -0.100057 1.353394 8.199059 -v -0.140344 3.136857 7.562765 -v -0.148687 3.222121 7.256688 -v -0.154912 3.305658 6.963875 -v -0.162274 3.383073 6.634371 -v -0.171635 3.491325 6.242572 -v -0.179530 3.616561 5.792591 -v -0.182732 3.722278 5.306861 -v -0.100301 2.559268 9.411632 -v -0.089954 2.661516 9.206971 -v -0.095183 2.750950 8.939371 -v -0.106555 2.844907 8.621837 -v -0.118159 2.948985 8.260487 -v -0.129790 3.045825 7.897576 -v -0.188516 4.202499 3.293558 -v -0.183841 4.054734 3.778147 -v -0.180031 3.937958 4.277248 -v -0.181495 3.807210 4.796773 -v -0.102956 1.382955 8.302106 -v -0.105564 1.517490 8.547131 -v -0.108856 1.668424 8.829556 -v -0.117848 1.817220 9.107386 -v -0.133817 2.051086 9.430861 -v -0.128432 1.971387 9.331757 -v -0.139202 2.130784 9.509506 -v -0.109991 2.495782 9.505816 -v -0.119684 2.432295 9.567991 -v -0.134264 2.289700 9.602544 -v -0.175801 4.455259 1.779792 -v -0.182102 4.331426 2.595908 -v -0.258335 2.521089 9.405805 -v -0.212522 -0.017400 3.370384 -v -0.207055 0.037062 4.065334 -v -0.202094 0.117184 4.710430 -v -0.201391 0.089486 5.078036 -v -0.206050 0.077254 5.401523 -v -0.195554 0.223231 6.757909 -v -0.182377 0.286351 7.090038 -v -0.208738 0.162694 6.407975 -v -0.214505 0.060091 5.721499 -v -0.216701 0.086153 6.059344 -v -0.215321 -0.054326 2.548478 -v -0.196010 0.005506 0.863270 -v -0.211589 -0.033660 1.556562 -v -0.151042 0.399174 -2.266588 -v -0.182324 0.243883 -1.395216 -v -0.272041 0.145998 -0.262537 -v -0.580715 0.076990 4.035890 -v -0.569746 0.118915 4.655710 -v -0.575035 0.115201 5.011827 -v -0.534713 0.351032 6.980509 -v -0.574322 0.270779 6.655052 -v -0.590515 0.121351 5.331623 -v -0.609364 0.197930 6.311780 -v -0.613793 0.120730 5.643274 -v -0.625109 0.137915 5.970244 -v -0.119002 0.627711 -3.324415 -v -0.599072 0.036462 3.361805 -v -0.575117 0.080179 0.918846 -v -0.600370 0.037087 1.555143 -v -0.609757 0.016023 2.548962 -v -0.516488 0.451174 7.278847 -v -0.512430 0.458782 7.295474 -v -0.576527 0.363331 -1.424751 -v -0.746614 0.305371 -0.264526 -v -0.927959 0.242123 4.910411 -v -0.879685 0.221256 4.584761 -v -0.396647 0.696859 -3.373600 -v -0.497893 0.478615 -2.288256 -v -0.333347 0.847065 -4.133173 -v -0.302329 0.924000 -4.586518 -v -0.346654 1.467138 -6.156294 -v -0.317206 1.300648 -5.821917 -v -0.284624 1.092780 -5.221767 -v -0.889777 0.199906 4.004135 -v -0.918920 0.158022 3.358205 -v -0.935198 0.144070 2.546778 -v -0.921065 0.176502 1.530188 -v -0.918178 0.271876 0.856607 -v -0.678326 3.535740 -4.963796 -v -0.339559 3.794553 -4.992594 -v 0.000000 3.909469 -5.008794 -v -0.797495 3.249145 -4.926776 -v -0.844649 1.522005 -4.819557 -v -0.937376 2.800413 -4.885390 -v -0.980023 2.372314 -4.865833 -v -0.958121 1.974417 -4.877053 -v -1.092240 1.808779 -3.420586 -v -0.991073 1.935774 -4.441362 -v -0.703759 2.023032 8.820601 -v -0.511712 2.051268 9.155821 -v -0.900407 2.030173 8.531101 -v -1.047478 2.073702 8.184782 -v -0.113149 1.739460 8.962193 -v -0.321811 1.971715 9.231791 -v -0.361470 2.050324 9.298208 -v -0.041024 7.816984 -1.310769 -v -0.019031 7.721359 -1.412301 -v -0.176821 4.646301 0.932550 -v -0.330065 4.572790 1.005317 -v -0.127906 4.808163 0.771432 -v -0.098480 4.973572 0.652059 -v -0.063421 6.344719 0.001007 -v -0.086702 5.194057 0.553082 -v -0.050030 6.971153 -0.387232 -v -0.022105 7.863363 -1.235694 -v -0.075298 5.718751 0.311262 -v -0.065976 6.198860 0.073509 -v -0.064699 6.271790 0.037258 -v -0.008374 7.701509 -1.013948 -v -0.090431 0.743531 -12.701984 -v -0.443111 2.942617 -9.639969 -v -0.500128 2.735979 -9.638621 -v -0.072605 2.049301 -9.466062 -v -0.221707 2.164950 -9.514498 -v -0.345313 2.396374 -9.621881 -v -0.286823 3.115765 -9.627218 -v -0.409799 2.932671 -10.386772 -v -0.454723 2.694923 -10.376768 -v -0.261947 3.158210 -10.342492 -v -0.290014 2.342802 -10.319963 -v -0.308001 2.367319 -10.151452 -v -0.478621 2.707150 -10.190189 -v -0.429209 2.929410 -10.188605 -v -0.269060 3.138009 -10.168095 -v -0.132728 3.325180 -10.150924 -v 0.000000 3.361886 -10.127089 -v -0.000014 2.105220 -12.461259 -v -0.254819 3.072582 -11.268055 -v -0.232882 3.219802 -11.836754 -v 0.000000 4.975075 -12.058704 -v -0.118322 4.872064 -12.247119 -v -0.145427 4.179946 -12.696609 -v 0.000000 3.951504 -13.039208 -v -0.217427 2.932348 -11.868374 -v -0.275271 2.933772 -11.308237 -v -0.109066 2.679843 -12.341629 -v -0.192465 2.444295 -11.862893 -v -0.277131 2.550299 -11.319557 -v -0.112976 2.927302 -12.325741 -v -0.104893 2.030640 -12.385267 -v -0.176575 2.117885 -11.821964 -v -0.235786 2.205387 -11.251264 -v -0.107367 5.642466 -13.229023 -v 0.000000 5.732892 -13.099184 -v 0.000000 5.884174 -13.345831 -v -0.089506 5.439608 -13.766284 -v -0.104550 5.731641 -13.350189 -v 0.000000 5.809293 -13.218571 -v -0.081325 5.676683 -14.001101 -v -0.090508 5.938873 -13.647932 -v 0.000000 6.004039 -13.549540 -v -0.081294 6.043985 -13.803465 -v -0.079469 6.066023 -14.227453 -v 0.000000 6.224835 -13.955671 -v 0.000000 6.082816 -14.357561 -v 0.000000 6.158680 -13.827797 -v -0.074859 6.117395 -13.912088 -v -0.077698 5.949584 -14.191765 -v -0.040805 5.916960 -14.223951 -v 0.000000 6.167389 -14.425179 -v -0.046878 6.221632 -14.364780 -v 0.000000 6.284554 -14.289021 -v -0.195589 3.339673 -10.650833 -v -0.202013 3.209540 -10.020697 -v -0.256585 3.245140 -8.602141 -v -0.223318 3.186183 -9.195385 -v -0.169091 3.561668 -11.074191 -v -0.184885 3.911345 -11.652169 -v -0.120727 4.235218 -12.242529 -v -0.143023 4.816792 -12.701199 -v -0.093592 5.688319 -13.673494 -v -0.242165 3.214156 -8.895622 -v -0.211739 3.181280 -9.609469 -v -0.200284 3.268700 -10.383180 -v -0.200894 3.231595 -10.159510 -v -0.131875 4.526005 -12.471864 -v -0.100677 5.476114 -13.433351 -v -0.097028 5.585624 -13.558237 -v -0.085917 5.807778 -13.824516 -v -0.078610 5.938566 -13.979771 -v -0.073946 6.120568 -14.142096 -v -0.036717 6.193822 -14.246683 -v -0.076278 6.033490 -14.051927 -v -0.023449 6.253093 -14.326900 -v -0.313852 3.473502 -6.811047 -v -0.240718 3.408999 -7.483716 -v -0.553318 3.722833 -4.480975 -v -0.638371 3.878331 -3.389092 -v -0.464567 3.607459 -5.475414 -v -0.410081 3.534937 -6.162992 -v -0.240628 3.316042 -8.101362 -v -0.707807 4.021771 -2.365168 -v -0.508943 3.665146 -4.978194 -v -0.455321 2.971098 -8.346431 -v -0.512329 2.712354 -8.357697 -v -0.371050 2.290605 -8.404303 -v -0.201301 1.994008 -8.468086 -v 0.000000 1.909989 -8.526316 -v -0.319949 3.187297 -8.348321 -v -0.177263 3.373885 -8.355184 -v -0.098129 3.483091 -8.457928 -v -0.248606 3.280591 -8.351751 -v -0.000014 3.803309 -8.451863 -v -0.041800 3.512553 -8.172581 -v -0.447510 2.954897 -8.767115 -v -0.216210 2.075158 -8.851757 -v -0.314754 3.142409 -8.758864 -v -0.183995 3.316887 -8.738899 -v -0.098168 3.440052 -8.715020 -v -0.497704 2.722723 -8.779392 -v -0.363731 2.344948 -8.810444 -v -0.249375 3.229648 -8.748882 -v -0.057552 1.983867 -9.452366 -v 0.000000 3.653726 -8.306202 -v -0.058158 3.637040 -8.600517 -v -0.043497 3.626302 -8.819245 -v 0.000000 3.633310 -8.858470 -v -0.049072 3.643200 -8.454896 -v -0.051776 3.631310 -8.737202 -v -0.025983 3.830602 -8.749534 -v -0.024499 3.817363 -8.605142 -v 0.000000 3.933094 -8.774946 -v -0.012948 3.931325 -8.755766 -v -0.074893 3.558928 -8.456491 -v -0.084449 3.549633 -8.596906 -v -0.073672 3.541039 -8.726732 -v -0.062088 3.534406 -8.826925 -v 0.000000 3.530407 -8.887341 -v -0.238928 2.231600 -11.256454 -v -0.179189 2.171574 -11.828695 -v -0.104599 2.113806 -12.379411 -v -0.021007 6.282511 -14.437347 -v -0.009243 6.308505 -14.400448 -v -0.000007 6.341561 -14.376413 -v -1.157102 2.568877 7.777184 -v -1.031251 2.732025 7.791574 -v -0.786283 2.862028 7.787131 -v -0.540578 3.003961 7.764317 -v 0.000000 3.101682 7.723503 -v -0.270133 3.081000 7.736838 -v -0.135067 3.091341 7.730171 -v -1.092788 2.321625 8.064361 -v -1.006693 2.327649 8.282658 -v -0.877270 2.281029 8.637496 -v -0.514213 2.215135 9.272251 -v -0.394843 2.212105 9.410281 -v -0.708521 2.243032 8.963731 -v -0.273470 2.200493 9.503814 -v -0.136733 2.210242 9.556026 -v -1.008418 1.403086 7.464852 -v -0.966758 1.384145 7.424916 -v -0.925098 1.402957 7.385004 -v -1.110032 1.476985 7.560347 -v -1.176139 1.638355 7.631267 -v -1.199183 1.787347 7.667492 -v -1.209745 1.942747 7.689372 -v -1.211857 2.085344 7.707782 -v -0.983072 1.404515 7.505863 -v -1.083094 1.480690 7.605783 -v -1.151711 1.640153 7.684997 -v -1.173571 1.787477 7.727949 -v -0.942524 1.385019 7.464682 -v -0.901975 1.403293 7.423532 -v -1.185924 1.944414 7.749385 -v -1.195738 2.088064 7.771209 -v -1.197764 2.193894 7.792367 -v -0.824170 1.404937 7.543211 -v -0.860926 1.387237 7.589632 -v -0.897680 1.407324 7.636065 -v -0.989737 1.483129 7.752903 -v -1.063315 1.635229 7.866033 -v -1.089614 1.776942 7.929016 -v -1.115564 1.942103 7.962103 -v -0.927574 2.660133 8.156806 -v -0.716042 2.794846 8.130422 -v -0.247949 2.986233 8.083306 -v -0.493384 2.920306 8.106346 -v -0.123974 2.997405 8.079032 -v -1.111568 2.092630 8.010777 -v -1.219526 1.461850 7.354831 -v -1.105846 1.378012 7.290684 -v -1.056219 1.360312 7.256295 -v -1.006592 1.380371 7.221903 -v -1.275964 1.627587 7.381396 -v -1.311809 1.774390 7.387921 -v -1.322528 1.942024 7.387604 -v -1.342574 2.172348 7.480217 -v -1.169517 0.837635 6.660570 -v -1.212747 0.958971 6.568310 -v -1.322057 1.084082 6.520927 -v -1.366415 1.135764 6.501388 -v -1.445415 1.241552 6.514871 -v -1.461682 1.378555 6.578679 -v -0.118757 0.908146 7.776113 -v -0.102238 0.957934 7.753042 -v 0.000000 0.930195 7.784478 -v -0.077108 1.028776 7.605618 -v -0.100442 0.992708 7.514764 -v -0.213223 0.710702 5.338850 -v -0.213221 0.710701 6.749059 -v -0.102238 0.957934 7.753042 -v -0.568081 0.902747 7.579506 -v -0.499515 1.007318 7.593684 -v -0.451532 1.060906 7.503548 -v -0.475718 1.109600 7.323461 -v -0.467860 1.050831 7.219772 -v -0.568074 1.071054 7.074764 -v -0.426440 0.750844 6.688579 -v -0.674785 1.147991 7.060369 -v -0.849483 1.169967 7.049247 -v -0.852691 1.171915 7.041536 -v -0.901609 1.180493 6.931842 -v -0.952435 1.218890 6.806871 -v -0.974512 1.245647 6.748828 -v -0.976682 1.263244 6.737537 -v -0.866790 1.219668 6.767122 -v -0.755436 1.154754 6.868383 -v -0.597202 0.874083 6.425976 -v -0.666500 0.924095 5.320666 -v -0.508698 0.810210 6.562080 -v -0.540916 0.833460 5.329064 -v -0.795431 1.421548 7.518828 -v -0.767665 1.449714 7.493199 -v -0.820180 1.521693 7.299871 -v -0.781487 1.602271 7.272047 -v -0.588895 2.059020 6.898893 -v -0.588898 2.059020 5.340304 -v -0.874599 1.419213 7.394143 -v -0.849457 1.446484 7.360750 -v -0.893449 1.419157 7.361999 -v -0.862518 1.446621 7.337930 -v -0.973976 1.401533 7.200189 -v -0.941953 1.433556 7.177006 -v -0.901646 1.507411 7.142037 -v -0.901661 1.507277 7.142295 -v -0.908534 1.447106 7.257532 -v -0.506376 1.463947 7.853655 -v -0.360156 1.457072 7.945468 -v -0.187071 1.437848 7.999634 -v -0.105628 1.409633 8.033222 -v -0.096634 1.436373 8.005179 -v -0.086277 1.467188 7.972872 -v -0.102920 1.576536 7.928577 -v -0.121803 1.682959 7.889006 -v 0.000001 2.189652 7.275077 -v -0.345991 2.015098 -7.593967 -v -0.289591 2.097984 -8.177647 -v -0.398072 1.778326 -6.788368 -v -0.282760 2.186629 -8.694741 -v -0.255418 2.281002 -9.896200 -v -0.174029 2.161338 -10.669867 -v -0.311602 2.280322 -9.240178 -v -0.147355 1.881837 -11.142594 -v -0.119549 1.461948 -11.680208 -v -0.098042 0.978950 -12.223737 -v -0.297181 2.233476 -8.967460 -v -0.081513 0.650957 -12.491232 -v -0.283510 2.280662 -9.568190 -v -0.203891 2.243034 -10.375456 -v -0.229711 2.267084 -10.135351 -v -0.286175 2.142307 -8.436194 -v -0.289970 2.210052 -8.831100 -v -0.131996 1.947428 -9.259753 -v 0.000000 2.008741 -9.598274 -v -0.108832 1.819900 -9.305342 -v -0.049339 1.832943 -9.453801 -v 0.000000 1.838845 -9.520983 -v -0.046161 1.691904 -9.454356 -v 0.000000 1.688417 -9.532793 -v -0.096741 1.984336 -9.034204 -v -0.060755 1.925107 -9.059778 -v -0.048005 1.805043 -9.149770 -v -0.035889 1.623215 -9.285259 -v 0.000000 1.480913 -9.479207 -v -0.005835 1.480627 -9.488686 -v 0.000000 1.465410 -9.561747 -v -0.038313 1.960334 -8.873912 -v -0.499196 2.726589 -9.837730 -v -0.204218 2.168841 -9.653164 -v -0.280633 3.119243 -9.831667 -v -0.133120 3.271577 -9.798498 -v 0.000000 3.304090 -9.786602 -v -0.443035 2.934859 -9.844103 -v -0.036310 2.063900 -9.582206 -v -0.334710 2.392823 -9.811226 -v -0.206876 3.195410 -9.815084 -v -0.034154 1.996304 -9.525320 -v -0.269464 2.280832 -9.732195 -v -0.038734 1.835894 -9.487392 -v -0.030116 1.690160 -9.493574 -v 0.000000 3.950513 -4.759652 -v -0.188434 0.828601 -4.292953 -v -0.447242 0.942463 -4.426738 -v -0.754423 1.150122 -4.505904 -v 0.000000 0.839705 -4.264838 -v -0.317838 0.885532 -4.359845 -v -0.708007 3.559297 -4.715628 -v -0.354254 3.828682 -4.743542 -v -0.832843 3.265944 -4.679268 -v -0.855775 1.459569 -4.572080 -v -0.972896 2.804221 -4.641820 -v -1.008520 2.366518 -4.631083 -v -0.974597 1.955095 -4.659207 -v -0.531130 3.693990 -4.729585 -v 0.000000 0.880619 7.787120 -v 0.000000 1.957512 -8.823058 -v 0.788412 0.469182 -1.440535 -v 0.949152 0.427518 -0.310606 -v 1.210386 0.743811 -0.338872 -v 1.100424 0.780384 -1.457728 -v 0.576528 0.363331 -1.424751 -v 0.746614 0.305371 -0.264526 -v 0.302079 0.401748 -2.273668 -v 0.364644 0.257481 -1.408966 -v 0.497893 0.478615 -2.288256 -v 0.151042 0.399174 -2.266588 -v 0.182325 0.243883 -1.395216 -v 0.119002 0.627711 -3.324415 -v 0.212523 -0.017400 3.370384 -v 0.215322 -0.054326 2.548477 -v 0.544077 0.183225 -0.218446 -v 0.272041 0.145998 -0.262537 -v 0.735303 0.134406 4.623686 -v 0.747321 0.110787 4.019179 -v 0.580716 0.076990 4.035890 -v 0.569746 0.118915 4.655710 -v 0.425043 -0.000501 3.366440 -v 0.414111 0.043194 4.052600 -v 0.599073 0.036462 3.361805 -v 0.207055 0.037062 4.065334 -v 0.000000 0.130944 4.733126 -v 0.202095 0.117184 4.710430 -v 0.000000 0.030930 4.078070 -v 0.747288 0.139504 4.972197 -v 0.927960 0.242123 4.910411 -v 0.879685 0.221256 4.584761 -v 0.575035 0.115201 5.011827 -v 0.402783 0.090898 5.051456 -v 0.404190 0.103425 4.687736 -v 0.201391 0.089486 5.078036 -v 0.000000 0.088074 5.104615 -v 0.000000 0.066340 5.427113 -v 0.206050 0.077254 5.401523 -v 0.391110 0.237226 6.724459 -v 0.195555 0.223231 6.757908 -v 0.182377 0.286351 7.090038 -v 0.364755 0.314584 7.053168 -v 0.191223 0.368383 7.402485 -v 0.353349 0.425440 7.343808 -v 0.102238 0.957934 7.753042 -v 0.077109 1.028776 7.605618 -v 0.344151 1.028698 7.652439 -v 0.226353 0.992911 7.713404 -v 0.154215 1.035241 7.595179 -v 0.286446 1.068475 7.528789 -v 0.782541 1.137691 7.151186 -v 0.661620 1.136829 7.306580 -v 0.603984 1.132411 7.157959 -v 0.674786 1.147991 7.060369 -v 0.556227 1.107240 7.438728 -v 0.475719 1.109600 7.323461 -v 0.418170 1.099366 7.397717 -v 0.451532 1.060906 7.503548 -v 0.200883 1.005523 7.491678 -v 0.100443 0.992708 7.514764 -v 0.737712 1.087773 7.336395 -v 0.624666 1.045620 7.475090 -v 0.000000 0.659617 7.792789 -v 0.000000 0.842044 7.788106 -v 0.159957 0.809698 7.818165 -v 0.176667 0.660913 7.769928 -v 0.000000 0.499495 7.643269 -v 0.186939 0.511459 7.622265 -v 0.000000 0.350818 7.422409 -v 0.352899 0.545944 7.566257 -v 0.502584 0.581995 7.493086 -v 0.512431 0.458782 7.295474 -v 0.513144 0.449863 7.281170 -v 0.483015 0.727825 7.632405 -v 0.333363 0.701560 7.709418 -v 0.621225 0.768148 7.532959 -v 0.636789 0.634198 7.391329 -v 0.568082 0.902747 7.579506 -v 0.446847 0.867865 7.695375 -v 0.707223 0.942385 7.480309 -v 0.743523 0.817339 7.399426 -v 0.809892 0.994402 7.320856 -v 0.832230 1.122886 7.188195 -v 0.900350 1.080331 7.199247 -v 0.904908 1.151766 7.055986 -v 0.966957 1.104532 7.028775 -v 0.309030 0.838555 7.771639 -v 0.400425 0.976938 7.688704 -v 0.278133 0.941932 7.752140 -v 0.118757 0.908146 7.776113 -v 0.974610 0.929158 7.092916 -v 0.852438 0.877975 7.242527 -v 0.764310 0.689413 7.259150 -v 0.654714 0.505378 7.182827 -v 0.516488 0.451174 7.278847 -v 0.704673 0.387481 6.907848 -v 0.534714 0.351032 6.980509 -v 0.799029 0.563536 7.062317 -v 0.872016 0.453121 6.788566 -v 0.944778 0.634093 6.919909 -v 1.057062 0.570982 6.645979 -v 1.088826 0.706516 6.780196 -v 1.037319 0.815014 6.965506 -v 0.906285 0.744328 7.117725 -v 1.056345 1.006468 6.947868 -v 1.129230 0.901795 6.814305 -v 1.169517 0.837635 6.660570 -v 1.206636 0.778522 6.518927 -v 1.253289 0.706345 6.132710 -v 1.114395 0.510601 6.321710 -v 0.574323 0.270779 6.655052 -v 0.757536 0.304333 6.585647 -v 0.952932 0.367417 6.476990 -v 1.136355 0.461563 6.013939 -v 1.257516 0.687271 5.856770 -v 1.187013 0.402556 5.719851 -v 1.317537 0.629404 5.589020 -v 1.161939 0.378760 5.431072 -v 1.350177 0.590287 5.316800 -v 1.131981 0.361318 5.145022 -v 1.375074 0.558442 5.038369 -v 0.956742 0.219469 5.228363 -v 0.991815 0.230911 5.525332 -v 1.108632 0.344742 4.848625 -v 1.475217 0.778356 5.256169 -v 1.522185 0.755982 4.976873 -v 1.352622 0.567264 4.748600 -v 0.412101 0.088168 5.375933 -v 0.590515 0.121351 5.331623 -v 0.768930 0.154534 5.287313 -v 0.798576 0.165532 5.592230 -v 1.019766 0.246109 5.831659 -v 0.988044 0.300676 6.149660 -v 0.801252 0.226954 6.246830 -v 0.609364 0.197930 6.311779 -v 0.417477 0.168907 6.376730 -v 0.000000 0.209236 6.791359 -v 0.208738 0.162694 6.407974 -v 0.000000 0.156481 6.439219 -v 0.000000 0.044254 5.748680 -v 0.214506 0.060091 5.721499 -v 0.429012 0.075928 5.694319 -v 0.613794 0.120730 5.643274 -v 0.816816 0.177946 5.910890 -v 0.625110 0.137915 5.970244 -v 0.433404 0.097885 6.029599 -v 0.216702 0.086153 6.059344 -v 0.000000 0.074422 6.089089 -v 0.144525 3.506025 -7.491770 -v 0.201792 3.578382 -6.814765 -v 0.276315 3.645885 -6.171391 -v 0.310170 3.726294 -5.490697 -v 0.313852 3.473502 -6.811047 -v 0.410082 3.534937 -6.162992 -v 0.425913 3.368622 -6.807328 -v 0.240718 3.408999 -7.483716 -v 0.336912 3.311973 -7.475662 -v 0.240628 3.316042 -8.101362 -v 0.319962 3.220986 -8.090930 -v 0.161295 3.411099 -8.111796 -v 0.240678 1.834500 -7.665503 -v 0.257688 1.645710 -7.004604 -v 0.199884 1.940196 -8.212884 -v 0.448527 1.545714 -7.306075 -v 0.476448 1.556169 -7.267494 -v 0.539112 1.525422 -6.898022 -v 0.507762 1.510002 -6.872667 -v 0.510108 1.427016 -7.335085 -v 0.521817 1.454388 -7.379246 -v 0.443727 1.548915 -7.563982 -v 0.579156 1.335906 -7.058488 -v 0.616119 1.352640 -7.081982 -v 0.000000 1.689465 7.906006 -v 0.000000 1.577223 7.942846 -v 0.102920 1.576536 7.928577 -v 0.121803 1.682959 7.889006 -v 0.272112 1.674930 7.868027 -v 0.271137 1.575414 7.905256 -v 0.555954 1.557243 7.735546 -v 0.550611 1.636725 7.701256 -v 0.742320 1.529484 7.460567 -v 0.711369 1.609389 7.436687 -v 0.086277 1.467188 7.972872 -v 0.184184 1.470114 7.965120 -v 0.356143 1.480919 7.919915 -v 0.501440 1.483811 7.832011 -v 0.621159 1.471109 7.707720 -v 0.724058 1.452509 7.561075 -v 0.822493 1.446200 7.407862 -v 0.849457 1.446484 7.360750 -v 0.820180 1.521693 7.299871 -v 0.980423 1.417958 7.084307 -v 1.011129 1.382451 7.110107 -v 1.056960 1.324728 6.958547 -v 1.026217 1.369773 6.933131 -v 0.941953 1.433556 7.177006 -v 0.908535 1.447106 7.257532 -v 0.939936 1.419018 7.282726 -v 0.973976 1.401533 7.200189 -v 0.850671 1.419285 7.434948 -v 0.874599 1.419213 7.394142 -v 0.767665 1.449714 7.493199 -v 0.746774 1.423541 7.592715 -v 0.795431 1.421548 7.518828 -v 0.635187 1.442246 7.745333 -v 0.506377 1.463947 7.853655 -v 0.511599 1.442937 7.876547 -v 0.649220 1.425013 7.782948 -v 0.360156 1.457072 7.945467 -v 0.364443 1.431606 7.972756 -v 0.187071 1.437848 7.999634 -v 0.189243 1.413585 8.025587 -v 0.096634 1.436373 8.005178 -v 0.000000 1.434625 8.011285 -v 0.105628 1.409633 8.033222 -v 0.769488 1.406245 7.624363 -v 0.824170 1.404937 7.543211 -v 0.918290 1.385893 7.504446 -v 0.878853 1.403629 7.462059 -v 0.860927 1.387237 7.589632 -v 0.803564 1.388582 7.674816 -v 0.672118 1.404860 7.841801 -v 0.957726 1.405943 7.546875 -v 0.897681 1.407324 7.636065 -v 0.983072 1.404515 7.505863 -v 0.942524 1.385019 7.464682 -v 0.901976 1.403293 7.423531 -v 0.383822 1.376660 8.110682 -v 0.537701 1.393838 7.991468 -v 0.837636 1.408706 7.725254 -v 0.695015 1.422606 7.900669 -v 1.056156 1.484394 7.651218 -v 0.989738 1.483129 7.752903 -v 1.083094 1.480690 7.605783 -v 1.059112 1.400230 7.382830 -v 1.163910 1.469577 7.469475 -v 1.219527 1.461850 7.354831 -v 1.105846 1.378012 7.290684 -v 1.015228 1.382398 7.345387 -v 1.056219 1.360312 7.256295 -v 0.971345 1.402285 7.307949 -v 1.006593 1.380371 7.221903 -v 1.041841 1.358458 7.135857 -v 1.097211 1.338226 7.167204 -v 1.151397 1.271503 6.999184 -v 1.087708 1.291362 6.983944 -v 0.200111 1.357512 8.185737 -v 0.553633 1.412414 8.061825 -v 0.923320 1.481865 7.854587 -v 0.751805 1.495320 8.051482 -v 1.127283 1.641951 7.738727 -v 1.063315 1.635229 7.866032 -v 1.110033 1.476985 7.560347 -v 1.176139 1.638355 7.631267 -v 1.224996 1.634760 7.523807 -v 1.275144 1.454124 7.240187 -v 1.275964 1.627587 7.381396 -v 1.326933 1.620414 7.238987 -v 1.373211 1.761693 7.229267 -v 1.311810 1.774390 7.387921 -v 1.387671 1.944634 7.205862 -v 1.322528 1.942024 7.387604 -v 1.250409 1.787088 7.546576 -v 1.199183 1.787347 7.667492 -v 0.394890 1.398048 8.195772 -v 0.581513 1.513149 8.234276 -v 0.999348 1.628508 7.993338 -v 0.815892 1.631877 8.227547 -v 1.147959 1.787607 7.788406 -v 1.089615 1.776942 7.929016 -v 1.257387 1.939413 7.569346 -v 1.209745 1.942747 7.689372 -v 1.342575 2.172348 7.480217 -v 1.352067 2.338263 7.427687 -v 1.387422 2.217396 7.182797 -v 1.342575 2.172348 7.480217 -v 1.373820 2.490672 7.166057 -v 1.294770 2.532102 7.506557 -v 1.238823 2.340930 7.586386 -v 1.230795 2.422050 7.627457 -v 1.234152 2.261535 7.600157 -v 1.244094 2.079903 7.580927 -v 1.228419 2.207055 7.653707 -v 1.211857 2.085344 7.707781 -v 1.162104 1.946081 7.809398 -v 1.115565 1.942103 7.962103 -v 1.031271 1.766277 8.069626 -v 0.858531 1.757508 8.339116 -v 0.619023 1.658256 8.429867 -v 0.406352 1.516749 8.401046 -v 0.205911 1.384992 8.285470 -v 0.100057 1.353394 8.199059 -v 1.214208 2.188770 7.717457 -v 0.651822 1.775328 8.572427 -v 1.069026 1.938126 8.114807 -v 0.894636 1.883136 8.450686 -v 1.047478 2.073702 8.184782 -v 1.111568 2.092630 8.010777 -v 1.182948 2.233161 7.851377 -v 1.179621 2.090784 7.834637 -v 1.126710 2.097102 7.969667 -v 1.106550 2.226930 8.054207 -v 1.079028 2.416320 8.074515 -v 1.092789 2.321625 8.064361 -v 1.006693 2.327649 8.282658 -v 0.987456 2.446020 8.310556 -v 1.171107 2.320122 7.879097 -v 1.113603 2.548758 7.921816 -v 1.176981 2.443917 7.813666 -v 1.163682 2.397018 7.859356 -v 1.173288 2.383071 7.839737 -v 1.179327 2.324856 7.846636 -v 1.195836 2.586792 7.648397 -v 1.210503 2.464629 7.689316 -v 1.190283 2.470041 7.758137 -v 1.157102 2.568877 7.777184 -v 1.144596 2.758947 7.307598 -v 1.079964 2.751930 7.629907 -v 1.031251 2.732025 7.791574 -v 0.872610 2.624709 8.328406 -v 0.927574 2.660133 8.156806 -v 0.848361 2.384847 8.663476 -v 0.877270 2.281029 8.637496 -v 0.708522 2.243032 8.963731 -v 0.694146 2.332398 9.001245 -v 0.684621 1.892397 8.714986 -v 0.703759 2.023032 8.820601 -v 0.900408 2.030173 8.531101 -v 0.497418 1.972806 9.076187 -v 0.511713 2.051268 9.155821 -v 0.321811 1.971715 9.231791 -v 0.361471 2.050324 9.298208 -v 0.502419 2.300541 9.309047 -v 0.514213 2.215135 9.272251 -v 0.394843 2.212105 9.410281 -v 0.387192 2.295267 9.450975 -v 1.181667 2.724576 6.953297 -v 0.752196 2.827005 7.953977 -v 0.982539 2.695557 7.985207 -v 0.716043 2.794846 8.130422 -v 0.786283 2.862028 7.787131 -v 0.820371 2.897052 7.620287 -v 0.876699 2.945331 7.290977 -v 0.926010 2.982201 6.948767 -v 0.974307 3.031329 6.566297 -v 1.290258 2.689050 6.502546 -v 1.250427 2.812626 6.026449 -v 1.015305 3.131259 6.143333 -v 1.091511 3.329769 5.224496 -v 1.061331 3.240360 5.690906 -v 0.726747 3.460701 5.750815 -v 0.743448 3.566691 5.277687 -v 0.704028 3.366156 6.209093 -v 1.327482 2.943366 5.597393 -v 0.669861 3.259230 6.612320 -v 0.637893 3.182538 6.960979 -v 0.604656 3.123378 7.283537 -v 0.562743 3.045708 7.599047 -v 0.518415 2.962215 7.929586 -v 0.540579 3.003961 7.764317 -v 0.493384 2.920306 8.106346 -v 0.679890 2.762688 8.306867 -v 0.762723 2.567478 8.686997 -v 0.598353 2.694258 8.660836 -v 0.324546 3.365628 6.630440 -v 0.343269 3.480714 6.239542 -v 0.359058 3.592857 5.786156 -v 0.297372 3.207993 7.261970 -v 0.280686 3.127605 7.570429 -v 0.140344 3.136857 7.562765 -v 0.148687 3.222121 7.256687 -v 0.309822 3.284826 6.962750 -v 0.154912 3.305658 6.963875 -v 0.162274 3.383073 6.634371 -v 0.171636 3.491325 6.242572 -v 0.179530 3.616561 5.792591 -v 0.182733 3.722278 5.306861 -v 0.365463 3.697041 5.302405 -v 1.108209 3.438648 4.744079 -v 0.741867 3.673716 4.779359 -v 1.413729 3.125040 4.688398 -v 1.389486 3.042453 5.151325 -v 1.404033 3.199014 4.213919 -v 1.121784 3.551319 4.258739 -v 1.788564 2.671095 4.152533 -v 1.747296 2.596497 4.576942 -v 0.362988 3.788385 4.795018 -v 0.181495 3.807210 4.796773 -v 0.443559 2.460720 9.299537 -v 0.341751 2.449209 9.428987 -v 0.258335 2.521089 9.405805 -v 0.369699 2.581524 9.226277 -v 0.200604 2.562858 9.384016 -v 0.307989 2.655072 9.137687 -v 0.000000 2.555679 9.439246 -v 0.100302 2.559268 9.411632 -v 0.109992 2.495782 9.505816 -v 0.000000 2.491287 9.544005 -v 0.179910 2.660967 9.193696 -v 0.089955 2.661516 9.206971 -v 0.190368 2.747181 8.935636 -v 0.095184 2.750950 8.939371 -v 0.213111 2.838990 8.622107 -v 0.106555 2.844907 8.621837 -v 0.236319 2.938071 8.263367 -v 0.118159 2.948985 8.260487 -v 0.259581 3.034395 7.903246 -v 0.247950 2.986233 8.083306 -v 0.123975 2.997405 8.079031 -v 0.129790 3.045825 7.897576 -v 0.270133 3.081000 7.736837 -v 0.135067 3.091341 7.730171 -v 0.357936 2.709567 8.935786 -v 0.414945 2.789853 8.633687 -v 0.468354 2.878398 8.283106 -v 0.495741 2.624094 8.973136 -v 0.618654 2.501331 9.014657 -v 0.368949 3.862812 -4.494491 -v 0.434505 4.066239 -3.388447 -v 0.618966 3.488625 -5.460131 -v 0.678327 3.535740 -4.963796 -v 0.508943 3.665146 -4.978194 -v 0.464568 3.607459 -5.475414 -v 0.553318 3.722833 -4.480975 -v 0.638371 3.878331 -3.389092 -v 0.339559 3.794553 -4.992594 -v 0.543849 3.423990 -6.154593 -v 0.734799 3.798906 4.270558 -v 1.388064 3.272769 3.742223 -v 1.148592 3.678432 3.771743 -v 1.403940 3.371979 3.277069 -v 1.163508 3.788115 3.291173 -v 0.762930 3.922338 3.782633 -v 0.773943 4.052736 3.295432 -v 0.367677 4.042284 3.781042 -v 0.377028 4.193604 3.296573 -v 0.188517 4.202499 3.293557 -v 0.183841 4.054734 3.778147 -v 0.360057 3.924354 4.277819 -v 0.180031 3.937958 4.277248 -v 0.102956 1.382955 8.302106 -v 0.211130 1.515789 8.524104 -v 0.424926 1.671654 8.636567 -v 0.000000 1.519191 8.570156 -v 0.105564 1.517490 8.547131 -v 0.217716 1.669653 8.798027 -v 0.460962 1.818483 8.879627 -v 0.000000 1.667196 8.861087 -v 0.108856 1.668424 8.829556 -v 0.235701 1.817823 9.070906 -v 0.113149 1.739460 8.962193 -v 0.000000 1.971462 9.374177 -v 0.000000 2.052438 9.474586 -v 0.133818 2.051086 9.430861 -v 0.128433 1.971387 9.331757 -v 0.256869 1.971312 9.289336 -v 0.117849 1.817220 9.107386 -v 0.278409 2.128155 9.464476 -v 0.267639 2.049735 9.387136 -v 0.139203 2.130784 9.509506 -v 0.273470 2.200493 9.503814 -v 0.402495 2.128944 9.369587 -v 0.268532 2.272831 9.543152 -v 0.136733 2.210242 9.556026 -v 0.134264 2.289700 9.602544 -v 0.000000 2.426892 9.616756 -v 0.119685 2.432295 9.567991 -v 0.239373 2.437698 9.519227 -v 0.733692 0.972588 5.316173 -v 0.666500 0.924095 5.320666 -v 0.426444 0.750844 5.336720 -v 0.213223 0.710702 5.338850 -v 0.213222 0.710701 6.749059 -v 0.000000 2.189652 7.275076 -v -0.000000 2.189652 7.275076 -v 1.854000 2.120766 4.106810 -v 1.817886 2.060883 4.474732 -v 1.676445 2.518596 4.996492 -v 1.784790 2.001459 4.837373 -v 1.816056 1.717494 4.421183 -v 1.808952 1.664856 4.738643 -v 1.769970 1.330092 4.667004 -v 1.784706 1.387101 4.366463 -v 1.742349 1.295748 4.979033 -v 1.747020 1.619814 5.055710 -v 1.660191 1.000224 4.950203 -v 1.677156 1.018413 4.641562 -v 1.597695 1.006326 5.232381 -v 1.674477 1.280304 5.264569 -v 1.541046 0.746980 4.673993 -v 1.024068 0.308106 4.545835 -v 1.315611 0.590397 4.451360 -v 0.889777 0.199906 4.004134 -v 1.685787 1.582713 5.352380 -v 1.695060 1.945572 5.171840 -v 1.546446 2.435583 5.388470 -v 1.628013 1.888248 5.486629 -v 1.453905 2.338293 5.750959 -v 1.662852 1.052307 4.282069 -v 1.497357 0.769308 4.385693 -v 1.229607 2.277243 7.618937 -v 1.231536 2.339838 7.611917 -v 0.528099 4.509135 0.858371 -v 0.787821 4.324920 0.900224 -v 0.723396 4.261200 1.750264 -v 0.351597 4.421394 1.775378 -v 1.086168 4.049907 0.830774 -v 1.086969 3.982332 1.717826 -v 1.056804 4.037607 -0.456997 -v 0.836592 4.310844 -0.403726 -v 1.269519 3.666516 -0.478873 -v 1.328715 3.653046 0.790955 -v 1.359306 3.578568 1.697665 -v 0.758946 4.176072 2.597807 -v 1.134183 3.892794 2.592223 -v 0.364200 4.314102 2.597855 -v 0.175801 4.455259 1.779792 -v 0.182103 4.331426 2.595907 -v 1.006608 3.948726 -1.472503 -v 1.204536 3.558417 -1.499254 -v 1.482237 2.974503 -0.463777 -v 1.397202 2.921571 -1.499641 -v 1.586139 2.968503 0.781358 -v 1.685376 2.340369 -0.444295 -v 1.767222 2.341368 0.766394 -v 1.603314 1.950525 -1.506739 -v 1.719489 1.951716 -0.429610 -v 1.575573 2.320596 -1.504129 -v 1.123113 3.474102 -2.287129 -v 1.293297 2.873250 -2.291785 -v 0.931437 3.836859 -2.264095 -v 1.001466 3.368694 -3.376809 -v 0.842238 3.690423 -3.389737 -v 0.868191 3.282744 -4.431761 -v 0.737688 3.582855 -4.467461 -v 0.726801 3.215547 -5.421790 -v 0.797496 3.249145 -4.926776 -v 0.625866 3.163263 -6.120244 -v 0.526899 3.092799 -6.785158 -v 0.832843 3.265944 -4.679268 -v 0.972897 2.804221 -4.641820 -v 1.008417 2.808030 -4.398251 -v 0.765219 2.771445 -6.080977 -v 0.866337 2.792796 -5.372530 -v 0.661410 2.741493 -6.772437 -v 0.588291 2.721057 -7.465162 -v 0.474639 3.033159 -7.460692 -v 0.451305 2.195697 -7.522432 -v 0.644760 2.331846 -6.762777 -v 0.379299 2.255772 -8.142409 -v 0.528384 2.712663 -8.089670 -v 0.345991 2.015098 -7.593967 -v 0.289591 2.097984 -8.177647 -v 0.461718 2.988378 -8.080609 -v 0.785463 2.371980 -6.032110 -v 0.923028 2.383908 -5.335334 -v 0.538458 1.910943 -6.572131 -v 0.398073 1.778326 -6.788368 -v 0.756963 2.002734 -5.931311 -v 0.041801 3.512553 -8.172581 -v 0.098130 3.483091 -8.457928 -v 0.177264 3.373885 -8.355184 -v 0.074893 3.558928 -8.456491 -v 0.024499 3.817363 -8.605142 -v 0.000015 3.803309 -8.451863 -v 0.981432 0.858444 -2.317090 -v 0.693708 0.555483 -2.302843 -v 1.230480 1.035141 -1.464463 -v 1.130595 1.087989 -2.321509 -v 1.331148 1.321893 -1.472773 -v 1.204038 1.366044 -2.312809 -v 1.498809 1.613946 -1.493956 -v 1.297323 1.662159 -2.312395 -v 1.411365 1.967781 -2.319409 -v 1.423080 2.306682 -2.309623 -v 1.146753 2.827110 -3.365470 -v 0.555300 0.762156 -3.412180 -v 0.396648 0.696859 -3.373600 -v 0.806601 1.027764 -3.483463 -v 0.911754 1.258362 -3.471160 -v 1.036869 1.625970 -3.434320 -v 1.092240 1.808779 -3.420586 -v 1.214733 2.315916 -3.385330 -v 1.158057 2.026071 -3.404260 -v 1.330740 1.007115 -0.357943 -v 1.504764 1.268439 -0.387724 -v 1.668471 1.574979 -0.415135 -v 0.495066 1.449207 -6.915778 -v 0.444837 1.505019 -7.274275 -v 0.607920 1.410090 -7.057557 -v 0.536580 1.481511 -7.340335 -v 1.197939 2.445849 7.753336 -v 1.185615 2.424846 7.801456 -v 1.229496 2.404689 7.641676 -v 1.213683 2.443854 7.694027 -v 1.225629 2.227791 7.664627 -v 1.186464 2.255070 7.829026 -v 1.197765 2.193894 7.792366 -v 1.197765 2.193894 7.792366 -v 1.199004 2.215476 7.782496 -v 1.213173 2.214537 7.720547 -v 1.195739 2.088064 7.771209 -v 0.866901 1.397133 -4.324602 -v 0.991074 1.935774 -4.441362 -v 0.974598 1.955095 -4.659207 -v 0.855775 1.459569 -4.572080 -v 0.844650 1.522005 -4.819557 -v 0.822399 1.646877 -5.314512 -v 0.785556 1.504506 -5.393353 -v 0.879102 1.345452 -4.904773 -v 0.179475 0.876564 -4.518944 -v 0.188434 0.828601 -4.292953 -v 0.317838 0.885532 -4.359845 -v 0.302329 0.924000 -4.586518 -v 0.425184 0.971436 -4.654093 -v 0.447243 0.942463 -4.426738 -v 0.754423 1.150122 -4.505904 -v 0.631371 1.086015 -4.898322 -v 0.197394 0.780639 -4.066962 -v 0.237996 0.631563 -3.335020 -v 0.333348 0.847065 -4.133173 -v 1.037019 2.360721 -4.396334 -v 0.301644 2.754789 -11.360047 -v 0.411183 2.672648 -10.716697 -v 0.376641 2.938242 -10.725307 -v 0.429210 2.929410 -10.188605 -v 0.409800 2.932671 -10.386772 -v 0.454723 2.694923 -10.376768 -v 0.478621 2.707150 -10.190189 -v 0.443265 2.958135 -9.231702 -v 0.443112 2.942617 -9.639969 -v 0.500128 2.735979 -9.638621 -v 0.501993 2.754759 -9.240403 -v 0.448926 2.953818 -8.612252 -v 0.447510 2.954897 -8.767115 -v 0.497704 2.722723 -8.779392 -v 0.496275 2.712045 -8.625722 -v 0.455322 2.971098 -8.346431 -v 0.512329 2.712354 -8.357697 -v 0.371050 2.290605 -8.404303 -v 0.286176 2.142307 -8.436194 -v 0.201301 1.994008 -8.468086 -v 0.202719 2.047821 -8.723288 -v 0.000000 1.933346 -8.850438 -v 0.366519 2.403477 -9.243193 -v 0.345313 2.396374 -9.621881 -v 0.364660 2.364457 -8.954694 -v 0.499134 2.733402 -8.933063 -v 0.269060 3.138009 -10.168095 -v 0.261948 3.158210 -10.342492 -v 0.274443 3.122721 -10.036116 -v 0.442959 2.927100 -10.048237 -v 0.443035 2.934859 -9.844103 -v 0.280633 3.119243 -9.831667 -v 0.151422 2.166849 -10.119249 -v 0.186729 2.172732 -9.791831 -v 0.117768 2.143266 -10.430947 -v 0.145197 2.020104 -9.233773 -v 0.072606 2.049301 -9.466062 -v 0.057552 1.983867 -9.452366 -v 0.131996 1.947428 -9.259753 -v 0.036310 2.063900 -9.582206 -v 0.204218 2.168841 -9.653164 -v 0.308002 2.367319 -10.151452 -v 0.290014 2.342802 -10.319963 -v 0.203891 2.243034 -10.375456 -v 0.229712 2.267084 -10.135351 -v 0.092139 2.026344 -10.700377 -v 0.324108 2.389272 -10.000570 -v 0.255418 2.281002 -9.896200 -v 0.269464 2.280832 -9.732195 -v 0.334710 2.392823 -9.811226 -v 0.035889 1.623215 -9.285259 -v 0.256686 2.157168 -9.237164 -v 0.229702 2.102494 -8.980226 -v 0.297181 2.233476 -8.967460 -v 0.311602 2.280322 -9.240178 -v 0.255921 2.296332 -10.639358 -v 0.238928 2.231600 -11.256454 -v 0.235786 2.205387 -11.251264 -v 0.174030 2.161338 -10.669867 -v 0.147355 1.881837 -11.142594 -v 0.079662 1.731285 -11.068179 -v 0.179189 2.171574 -11.828695 -v 0.176576 2.117885 -11.821964 -v 0.119550 1.461948 -11.680208 -v 0.083922 1.245576 -11.593570 -v 0.087873 0.866687 -11.996022 -v 0.103782 2.345439 -12.363101 -v 0.109066 2.679843 -12.341629 -v 0.104893 2.030640 -12.385267 -v 0.104599 2.113806 -12.379411 -v 0.000015 2.105220 -12.461259 -v 0.155178 1.678320 -11.766847 -v 0.105996 1.718324 -12.407260 -v 0.108213 1.091213 -12.451451 -v 0.098043 0.978950 -12.223737 -v 0.072597 0.558383 -12.280480 -v 0.071319 0.369836 -12.971261 -v 0.090431 0.743531 -12.701984 -v 0.081514 0.650957 -12.491232 -v 0.000000 1.286699 -12.849672 -v 0.337134 4.550865 -1.286647 -v 0.530880 4.255392 -1.860175 -v 0.496476 4.426287 -1.321468 -v 0.484179 4.206684 -2.466241 -v 0.707808 4.021771 -2.365168 -v 0.738513 4.226496 -1.407832 -v 0.523044 4.650603 -0.322537 -v 0.634455 4.502475 -0.347335 -v 0.353634 4.656351 0.708917 -v 0.255804 4.800555 0.639917 -v 0.389424 4.725579 0.158690 -v 0.494044 4.579412 0.180791 -v 0.176821 4.646301 0.932550 -v 0.330065 4.572790 1.005317 -v 0.160899 4.603905 -1.427278 -v 0.341971 4.627254 -0.874908 -v 0.377355 4.807536 -0.346450 -v 0.261015 4.756641 -0.996184 -v 0.291003 5.061264 -0.420514 -v 0.206415 5.007654 -0.972486 -v 0.196953 4.972194 0.550262 -v 0.173397 5.206644 0.449081 -v 0.232200 5.133954 0.014283 -v 0.287154 4.889865 0.101906 -v 0.127906 4.808163 0.771432 -v 0.098481 4.973572 0.652059 -v 0.086703 5.194057 0.553082 -v 0.190560 5.659777 -0.122059 -v 0.230532 5.609394 -0.491101 -v 0.131942 6.201291 0.012722 -v 0.129386 6.268611 -0.019389 -v 0.156485 6.221625 -0.325418 -v 0.161366 6.154187 -0.299237 -v 0.126831 6.335931 -0.051499 -v 0.100050 6.961100 -0.420859 -v 0.106132 6.857105 -0.623385 -v 0.151604 6.289063 -0.351598 -v 0.104307 7.402701 -0.942577 -v 0.093945 7.300551 -1.069976 -v 0.112215 6.753111 -0.825910 -v 0.073590 7.636790 -1.126523 -v 0.061350 7.570263 -1.215099 -v 0.063421 6.344719 0.001007 -v 0.050031 6.971153 -0.387232 -v 0.064699 6.271790 0.037258 -v 0.190790 6.107083 -0.611197 -v 0.183584 6.174639 -0.631446 -v 0.129818 6.117871 -0.927168 -v 0.134567 6.044853 -0.914980 -v 0.057486 6.693021 -1.263106 -v 0.073758 6.139584 -1.227016 -v 0.125068 6.190889 -0.939356 -v 0.084850 6.723066 -1.044508 -v 0.019031 7.721359 -1.412301 -v 0.036474 7.776766 -1.378334 -v 0.041024 7.816984 -1.310769 -v 0.000012 7.621251 -0.858355 -v 0.000000 7.491805 -0.793408 -v 0.044199 7.845045 -1.263627 -v 0.022105 7.863363 -1.235694 -v 0.008374 7.701509 -1.013948 -v 0.144675 4.705746 -1.645918 -v 0.121827 4.954044 -1.524457 -v 0.162444 5.540064 -0.891267 -v 0.078345 5.982624 -1.218763 -v 0.076051 6.061104 -1.222890 -v 0.094356 5.470734 -1.291432 -v 0.141726 3.485646 -10.652797 -v 0.126894 3.755327 -10.965844 -v 0.138621 3.379190 -10.423867 -v 0.195589 3.339673 -10.650833 -v 0.200284 3.268700 -10.383180 -v 0.129585 3.296360 -10.005277 -v 0.202014 3.209540 -10.020697 -v 0.206877 3.195410 -9.815084 -v 0.133120 3.271577 -9.798498 -v 0.319938 3.153609 -8.605712 -v 0.314754 3.142409 -8.758864 -v 0.319950 3.187297 -8.348321 -v 0.248607 3.280591 -8.351751 -v 0.256585 3.245140 -8.602141 -v 0.193233 3.336672 -8.598571 -v 0.110541 3.462891 -8.593322 -v 0.174759 3.297102 -8.879228 -v 0.183996 3.316887 -8.738899 -v 0.098169 3.440052 -8.715020 -v 0.085797 3.417213 -8.836718 -v 0.147432 3.263556 -9.172451 -v 0.223318 3.186183 -9.195385 -v 0.242165 3.214156 -8.895622 -v 0.132729 3.325180 -10.150924 -v 0.136656 3.246794 -9.591721 -v 0.012948 3.931325 -8.755766 -v 0.062088 3.534406 -8.826925 -v 0.123786 5.122674 -12.522758 -v 0.118323 4.872064 -12.247119 -v 0.112860 4.621455 -11.971480 -v 0.116604 4.225614 -11.509084 -v 0.169092 3.561668 -11.074191 -v 0.254819 3.072582 -11.268055 -v 0.275272 2.933772 -11.308237 -v 0.192465 2.444295 -11.862893 -v 0.204702 2.695653 -11.894410 -v 0.232882 3.219802 -11.836754 -v 0.217427 2.932348 -11.868374 -v 0.253167 3.597077 -11.795255 -v 0.211290 3.368010 -11.182538 -v 0.184885 3.911345 -11.652169 -v 0.128595 3.848981 -12.513577 -v 0.120727 4.235218 -12.242529 -v 0.112976 2.927302 -12.325741 -v 0.110700 3.357044 -12.390697 -v 0.081326 5.676683 -14.001101 -v 0.075927 5.833146 -14.156075 -v 0.089506 5.439608 -13.766284 -v 0.084957 5.571456 -13.896873 -v 0.162261 4.510911 -12.879640 -v 0.093987 5.309763 -13.637678 -v 0.145428 4.179946 -12.696609 -v 0.131875 4.526005 -12.471864 -v 0.143023 4.816792 -12.701199 -v 0.104550 5.731641 -13.350189 -v 0.102228 5.805183 -13.450114 -v 0.093592 5.688319 -13.673494 -v 0.097028 5.585624 -13.558237 -v 0.040805 5.916960 -14.223951 -v 0.079469 6.066023 -14.227453 -v 0.073414 6.154620 -14.312218 -v 0.021007 6.282511 -14.437347 -v 0.009243 6.308505 -14.400448 -v 0.068424 6.190806 -14.020712 -v 0.053877 7.509920 -1.293559 -v 0.034011 7.494805 -1.374483 -v 0.039915 7.270251 -1.342484 -v 0.072439 7.257837 -1.214364 -v 0.416343 1.383552 -5.789503 -v 0.586722 1.543770 -5.707937 -v 0.643920 1.663434 -5.767154 -v 0.452082 1.560486 -6.047740 -v 1.496535 1.968105 6.182719 -v 1.460775 2.284230 6.548746 -v 1.462881 2.146295 6.001260 -v 1.518408 1.834275 6.360049 -v 1.489218 2.066433 6.672647 -v 1.215084 1.289559 7.014496 -v 1.152581 1.355795 7.198538 -v 1.354932 1.393737 6.996946 -v 1.411242 1.540806 6.934395 -v 1.470906 1.663032 6.876076 -v 1.490700 1.785258 6.817786 -v 1.117093 1.256835 6.880019 -v 1.233660 1.231206 6.897646 -v 1.100290 1.242978 6.829710 -v 1.058812 1.276579 6.790954 -v 1.059250 1.325840 6.844145 -v 0.992823 1.309986 6.687014 -v 1.015734 1.372476 6.709156 -v 0.999661 1.469268 6.815123 -v 0.965125 1.541031 6.771355 -v 0.961719 1.420638 6.642830 -v 0.851607 1.595154 7.107407 -v 0.898041 1.513902 7.139175 -v 0.781488 1.602271 7.272047 -v 0.412443 2.112591 7.154447 -v 0.588895 2.059020 6.898893 -v 0.412446 2.112591 5.349350 -v 0.588898 2.059020 5.340304 -v 0.765351 2.005449 5.331259 -v 0.963423 1.682241 5.311613 -v 0.963423 1.682241 6.087290 -v 0.765348 2.005449 6.643341 -v 0.913014 1.292895 5.308463 -v 3.201479 -0.661389 0.974183 -v 3.128219 -0.683658 0.974903 -v 3.282719 -0.871644 0.887531 -v 3.289470 -0.788454 0.829556 -v 2.980469 -0.503025 1.020530 -v 3.051839 -0.501525 0.902843 -v 3.270959 -1.107684 2.197226 -v 2.989106 -0.738087 2.496668 -v 3.123149 -0.620421 2.442190 -v 3.399539 -0.975264 2.150519 -v 3.577529 -1.449453 1.843527 -v 3.640260 -1.341453 1.789262 -v 3.862500 -1.742493 1.471377 -v 3.888840 -1.679403 1.427447 -v 1.969389 1.204242 1.832933 -v 2.118842 0.996459 1.785515 -v 2.264591 1.020273 2.604362 -v 2.096177 1.258239 2.581310 -v 2.107220 1.085553 3.333797 -v 2.230508 0.841911 3.239237 -v 1.909029 0.794721 3.572717 -v 2.043056 0.602232 3.425926 -v 2.405988 0.521607 3.079754 -v 2.258036 0.370140 3.203926 -v 2.506124 0.038721 3.010214 -v 2.645082 0.165009 2.904071 -v 2.746841 -0.345042 2.773072 -v 2.872814 -0.223458 2.683174 -v 2.686013 0.298284 2.564276 -v 3.020550 -0.283113 2.271880 -v 3.505139 -0.989130 1.733307 -v 3.889230 -1.567923 1.281458 -v 1.850049 1.137786 1.362035 -v 1.960791 0.995499 1.249865 -v 2.089100 0.694719 1.108394 -v 2.312772 0.717237 1.761527 -v 2.468390 0.671649 2.699714 -v 2.554571 0.405798 1.706570 -v 2.919338 -0.112050 1.511024 -v 3.420001 -0.813168 1.165130 -v 3.819989 -1.405684 0.847520 -v 4.137540 -1.898160 0.962066 -v 4.086240 -1.783382 0.656018 -v 3.770459 -1.403163 0.617771 -v 4.078771 -1.824630 0.491603 -v 4.086030 -1.799280 0.539087 -v 3.794130 -1.389573 0.685667 -v 3.468899 -1.017420 0.749330 -v 2.852093 -0.234153 0.991595 -v 2.794952 -0.141840 1.111931 -v 2.358732 0.381360 1.128905 -v 2.650146 0.027240 1.077374 -v 1.746030 1.071669 1.149857 -v 1.830111 0.988317 1.006133 -v 4.252350 -2.003429 0.610364 -v 4.266840 -2.039190 0.523544 -v 4.320294 -2.114246 0.595010 -v 4.187521 -1.927890 0.515990 -v 4.165111 -1.983180 1.051874 -v 4.123470 -2.020200 1.043069 -v 4.330979 -2.125949 0.594299 -v 4.362630 -2.199330 0.578303 -v 4.308361 -2.145150 0.588410 -v 4.301910 -2.150340 0.671981 -v 4.275240 -2.130301 0.753287 -v 4.301790 -2.106300 0.758531 -v 4.331640 -2.150850 0.521714 -v 4.276920 -2.078250 0.493781 -v 4.188666 -1.964934 0.485663 -v 4.269990 -2.042521 0.760736 -v 4.023631 -1.833960 0.632639 -v 4.050271 -1.827840 0.525740 -v 3.742769 -1.429323 0.663605 -v 3.743400 -1.569453 1.029653 -v 4.156621 -1.952369 0.505541 -v 4.240951 -2.059650 0.515363 -v 4.292340 -2.125350 0.538499 -v 4.221210 -2.076780 0.694529 -v 4.061970 -1.962540 0.944636 -v 3.288121 -1.071435 1.344254 -v 3.437219 -1.059630 0.800156 -v 4.188666 -1.964934 0.485663 -v 1.789500 0.492576 3.077303 -v 2.021438 0.293649 2.923781 -v 2.269356 -0.020310 2.759306 -v 2.571374 -0.390084 2.567995 -v 2.881896 -0.750588 2.342972 -v 3.188609 -1.114308 2.071943 -v 3.507779 -1.461003 1.752681 -v 3.815399 -1.740183 1.411233 -v 1.826490 0.666888 2.102021 -v 2.162834 0.340101 1.936583 -v 2.688383 -0.335601 1.713415 -v 2.832726 -0.322395 1.066157 -v 2.725658 -0.176301 1.201262 -v 2.550195 0.018885 1.138057 -v 2.283752 0.336366 1.190807 -v 2.016848 0.639942 1.180196 -v 1.783944 0.885870 1.164173 -v 1.678605 0.962046 1.308467 -v 1.672338 0.741063 2.356685 -v 1.667424 0.575112 3.222287 -v 1.186713 0.659090 -5.687936 -v 0.960231 1.129269 -5.263156 -v 0.865635 1.277337 -5.668992 -v 0.995046 1.007676 -6.005297 -v 0.966444 0.936024 -5.301796 -v 0.685800 1.453947 -6.034034 -v 0.573192 1.481184 -6.379386 -v 0.622404 1.494018 -6.431498 -v 0.787827 1.223589 -6.341531 -v 0.705243 1.307037 -6.636847 -v 0.718074 1.244490 -6.686077 -v 0.810666 1.147398 -6.417789 -v 0.999078 0.911910 -6.064396 -v 0.750378 1.125795 -6.375820 -v 0.675096 1.219143 -6.663457 -v 0.556719 1.371750 -6.452497 -v 0.578964 1.277547 -6.066640 -v 0.928779 0.889239 -6.048467 -v 0.678477 1.161390 -5.599633 -v 1.121324 0.711048 -5.774669 -v 0.820116 0.957321 -5.293453 -v 0.567732 1.212900 -5.411834 -v 0.346654 1.467138 -6.156294 -v 0.317206 1.300648 -5.821917 -v 1.008521 2.366518 -4.631083 -v 0.925170 2.013060 -5.312743 -v 0.241227 1.373790 -6.264847 -v 0.218070 1.217745 -5.854329 -v 0.396459 1.139865 -5.260213 -v 0.284625 1.092780 -5.221767 -v 0.172791 1.045695 -5.183322 -v 0.211590 -0.033660 1.556562 -v 0.430641 -0.027180 2.549786 -v 0.609757 0.016023 2.548962 -v 0.773103 0.073425 3.357169 -v 0.918921 0.158022 3.358205 -v 0.196011 0.005506 0.863270 -v 0.392019 0.028131 0.895826 -v 0.575118 0.080179 0.918846 -v 0.758217 0.132228 0.941867 -v 0.600370 0.037087 1.555143 -v 0.777564 0.078411 1.548149 -v 0.788874 0.059226 2.548139 -v 0.935199 0.144070 2.546778 -v 1.308825 0.491214 3.372017 -v 1.064739 0.242619 3.359240 -v 1.032234 0.289026 3.989090 -v 1.304421 0.560907 3.959061 -v 1.405443 0.598095 3.375676 -v 1.448787 0.697206 3.941420 -v 1.381071 0.634992 2.528726 -v 1.303059 0.502350 2.539541 -v 1.459785 0.722658 2.503244 -v 1.501092 0.655275 3.364607 -v 1.365468 0.829185 1.432706 -v 1.468077 0.974406 1.417931 -v 1.375167 0.932265 0.949484 -v 1.554951 0.739275 3.759800 -v 1.278150 0.632409 1.461680 -v 1.081524 0.228915 2.545418 -v 0.921066 0.176502 1.530188 -v 0.918178 0.271876 0.856607 -v 1.078140 0.411525 0.771347 -v 1.260477 0.715602 0.833048 -v 1.583664 1.224930 0.758084 -v 1.749123 1.582761 0.783929 -v 1.064568 0.274593 1.512227 -v 1.575564 1.222809 1.062590 -v 1.815894 1.720821 1.598737 -v 1.793781 1.959261 0.752549 -v 1.663602 2.862522 2.582717 -v 1.377438 3.473604 2.586371 -v 1.629981 2.931231 1.681139 -v 1.790073 2.346420 1.642211 -v 1.816749 2.018694 1.612595 -v 1.731918 1.429797 1.406207 -v 1.664655 1.142403 1.264405 -v 1.764636 1.265703 1.438313 -v 1.574523 1.001313 1.415906 -v 1.552578 0.759345 2.449883 -v 1.832733 2.327961 2.577544 -v 1.890201 2.046729 2.581160 -v 1.955034 1.808913 2.586737 -v 1.897287 1.951347 3.305026 -v 1.918854 1.687287 3.325937 -v 1.828626 2.249058 3.285529 -v 1.710846 2.789400 3.272929 -v 1.820976 2.185446 3.720740 -v 1.857159 1.867578 3.738680 -v 1.740387 2.726049 3.720050 -v 1.868079 1.545960 1.838060 -v 1.876644 1.369989 1.853147 -v 2.011919 1.605765 2.592380 -v 2.000865 1.466409 3.349817 -v 1.851708 1.572138 3.741349 -v 1.842456 1.786473 4.098889 -v 1.833354 1.472112 4.068230 -v 1.730697 1.218675 4.008260 -v 1.830999 1.326228 3.727130 -v 1.590240 0.654744 3.308987 -v 1.684869 0.771348 3.694189 -v 1.600989 0.895854 4.020049 -v 1.713702 1.007112 3.905900 -v 1.859205 1.093770 3.668690 -v 2.055341 1.253532 3.344537 -v 1.992765 1.423911 2.593226 -v 0.958122 1.974417 -4.877053 -v 0.980023 2.372314 -4.865833 -v 4.252350 -2.003429 0.610364 -v 4.330979 -2.125949 0.594299 -v 4.320294 -2.114246 0.595010 -v 4.188666 -1.964934 0.485663 -v 4.292340 -2.125350 0.538499 -v 4.240951 -2.059650 0.515363 -v 4.156621 -1.952369 0.505541 -v 4.023631 -1.833960 0.632639 -v 4.188666 -1.964934 0.485663 -v 1.014645 1.147099 6.905239 -v 1.107102 1.071007 6.816199 -v 1.355196 1.020312 6.341837 -v 1.424016 1.019949 6.003920 -v 1.309659 0.871464 6.043759 -v 1.257900 0.911613 6.402407 -v 1.322058 1.084082 6.520927 -v 1.212747 0.958972 6.568310 -v 1.139373 1.114092 6.716713 -v 1.300722 1.125141 6.636235 -v 1.181331 0.991924 6.683746 -v 1.041564 1.173102 6.803680 -v 0.977466 1.219512 6.820902 -v 0.941052 1.183395 6.938568 -v 0.853527 1.171917 7.043089 -v 0.852691 1.171915 7.041536 -v 0.901610 1.180493 6.931842 -v 0.853527 1.171917 7.043089 -v 0.904908 1.151766 7.055986 -v 0.849483 1.169967 7.049246 -v 0.755436 1.154754 6.868383 -v 0.866790 1.181964 6.742342 -v 0.885624 1.217190 6.765932 -v 0.782742 1.171746 6.911570 -v 0.930453 1.256781 6.709229 -v 1.087644 1.189302 6.756611 -v 0.383322 1.033771 7.342098 -v 0.952435 1.218890 6.806871 -v 1.015158 1.235376 6.785358 -v 0.974512 1.245647 6.748828 -v 1.024785 1.269969 6.774074 -v 0.976683 1.263244 6.737537 -v 1.015158 1.235376 6.785358 -v 1.058812 1.242488 6.790955 -v 0.913011 1.288047 6.617625 -v 0.733692 0.972588 6.216080 -v 0.913011 1.292895 5.997829 -v 0.597203 0.874083 6.425976 -v 0.426441 0.750844 6.688579 -v 0.508698 0.810210 6.562080 -v 0.635037 1.084567 6.977869 -v 0.568074 1.071054 7.074764 -v 0.426441 0.750844 6.688579 -v 1.320132 1.194480 6.746542 -v 1.149969 1.186905 6.775416 -v 1.205031 1.195125 6.831127 -v 1.373052 1.297614 6.850214 -v 1.436730 1.310796 6.667574 -v 1.439730 1.422741 6.753317 -v 1.499103 1.480170 6.445370 -v 1.461682 1.378555 6.578679 -v 1.483521 1.525296 6.661520 -v 1.507065 1.627854 6.569756 -v 1.544256 1.637781 6.191420 -v 1.555581 1.421796 6.071539 -v 1.493613 1.310844 6.366139 -v 1.445415 1.241552 6.514871 -v 1.413315 1.195401 6.613930 -v 1.448541 1.149045 6.332810 -v 1.366415 1.135764 6.501388 -v 1.518873 1.203369 6.011809 -v 1.563156 1.735368 5.993540 -v 1.590555 1.486725 5.854159 -v 1.554864 1.240575 5.775379 -v 1.455078 1.031064 5.753928 -v 1.616820 1.542645 5.616738 -v 1.559022 1.818693 5.757799 -v 1.599795 1.269099 5.529920 -v 1.507164 1.030659 5.497880 -v 1.401606 0.822217 5.525060 -v 1.332588 0.864427 5.782099 -v 0.423177 -0.004236 1.562138 -v 0.150588 5.710160 0.246983 -v 0.075298 5.718751 0.311262 -v 0.065976 6.198860 0.073509 -v 0.176378 6.242195 -0.651696 -v 0.000000 7.459325 -0.804931 -v 0.000000 7.555954 -0.874842 -v 0.000000 7.619603 -0.960261 -v 0.016736 7.686204 -1.041330 -v 0.000000 7.645075 -0.942380 -v 0.469302 0.913491 -4.199384 -v 0.764140 1.127336 -4.275962 -v 0.446095 2.955976 -8.921977 -v 0.363731 2.344948 -8.810444 -v 0.216210 2.075158 -8.851757 -v 0.289971 2.210052 -8.831100 -v 0.309571 3.131209 -8.912016 -v 0.299205 3.108810 -9.218320 -v 0.249375 3.229648 -8.748882 -v 0.219987 2.500278 9.467626 -v 0.000000 2.662065 9.220246 -v 0.000000 2.754720 8.943106 -v 0.000000 2.850825 8.621567 -v 0.000000 2.959899 8.257607 -v 0.000000 3.008577 8.074757 -v 0.000000 3.057255 7.891907 -v 0.000000 1.816617 9.143866 -v 0.000000 2.133414 9.554536 -v 0.000000 2.219991 9.608235 -v 0.000000 2.306569 9.661936 -v 0.000000 0.258118 7.126908 -v 0.708007 3.559297 -4.715628 -v 0.531130 3.693990 -4.729585 -v 0.354254 3.828682 -4.743542 -v 0.937377 2.800413 -4.885390 -v 0.722898 2.153667 8.926217 -v 0.906180 2.177211 8.611516 -v 0.526008 2.129730 9.235456 -v 1.025931 2.209278 8.254758 -v 0.499196 2.726589 -9.837730 -v 0.286824 3.115765 -9.627218 -v 0.221707 2.164950 -9.514498 -v 0.283510 2.280662 -9.568190 -v 0.211740 3.181280 -9.609469 -v 0.249453 3.193700 -10.648869 -v 0.200894 3.231595 -10.159510 -v 0.498264 2.717199 -10.036839 -v 0.277131 2.550299 -11.319557 -v 0.215049 2.032389 -11.217010 -v 0.100677 5.476114 -13.433351 -v 0.107367 5.642466 -13.229023 -v 0.085917 5.807778 -13.824516 -v 0.090508 5.938873 -13.647932 -v 0.078610 5.938566 -13.979771 -v 0.081294 6.043985 -13.803465 -v 0.077698 5.949584 -14.191765 -v 0.076278 6.033490 -14.051927 -v 0.073947 6.120568 -14.142096 -v 0.074859 6.117395 -13.912088 -v 0.036717 6.193822 -14.246683 -v 0.046878 6.221632 -14.364780 -v 0.023449 6.253093 -14.326900 -v 0.362802 2.325438 -8.666195 -v 0.282760 2.186629 -8.694741 -v 0.084449 3.549633 -8.596906 -v 0.073673 3.541039 -8.726732 -v 0.034154 1.996304 -9.525320 -v 0.049072 3.643200 -8.454896 -v 0.043497 3.626302 -8.819245 -v 0.051776 3.631310 -8.737202 -v 0.025983 3.830602 -8.749534 -v 0.058158 3.637040 -8.600517 -v 1.008419 1.403086 7.464851 -v 0.966759 1.384145 7.424916 -v 0.925099 1.402957 7.385004 -v 1.151711 1.640153 7.684997 -v 1.173571 1.787477 7.727949 -v 1.185924 1.944414 7.749385 -v 0.102238 0.957934 7.753042 -v 0.000000 0.880619 7.787120 -v 0.546660 0.957004 7.598269 -v 0.499515 1.007318 7.593683 -v 0.467860 1.050831 7.219772 -v 0.540916 0.833460 5.329064 -v 0.901661 1.507277 7.142295 -v 0.908535 1.447106 7.257532 -v 0.893449 1.419157 7.361999 -v 0.862518 1.446621 7.337930 -v 0.901646 1.507411 7.142037 -v 0.096741 1.984336 -9.034204 -v 0.038314 1.960334 -8.873912 -v 0.049339 1.832943 -9.453801 -v 0.046161 1.691904 -9.454356 -v 0.080262 1.662603 -9.361574 -v 0.108833 1.819900 -9.305342 -v 0.048005 1.805043 -9.149770 -v 0.000000 1.906072 -8.889236 -v 0.060755 1.925107 -9.059778 -v 0.038735 1.835894 -9.487392 -v 0.030116 1.690160 -9.493574 -v 0.005835 1.480627 -9.488686 -v 0.000000 1.957512 -8.823058 -v 0.000000 0.930195 7.784478 -v 0.000000 7.555954 -0.874842 -v -0.868781 0.448350 -0.875571 -v 0.000000 0.169528 -0.844047 -v -0.454360 0.220353 -0.813706 -v -1.031705 3.993166 -0.964750 -v -1.237027 3.612466 -0.989064 -v -1.661401 1.951120 -0.968175 -v -1.630474 2.330482 -0.974212 -v -1.439719 2.948037 -0.981709 -v -1.155404 0.762097 -0.898300 -v -1.280609 1.021128 -0.911203 -v -1.417955 1.295166 -0.930249 -v -1.583639 1.594462 -0.954546 -v -0.787552 4.268670 -0.905779 -v -0.430088 4.600734 -0.804592 -v -0.565465 4.464381 -0.834402 -v -0.227183 0.194941 -0.828877 -v -0.661571 0.334351 -0.844639 -v 0.868782 0.448350 -0.875571 -v 1.155405 0.762097 -0.898300 -v 0.661571 0.334351 -0.844639 -v 0.454360 0.220353 -0.813706 -v 0.227183 0.194941 -0.828876 -v 1.031705 3.993166 -0.964750 -v 1.237027 3.612466 -0.989064 -v 1.439719 2.948037 -0.981709 -v 1.661401 1.951120 -0.968175 -v 1.630474 2.330482 -0.974212 -v 1.280610 1.021128 -0.911203 -v 1.417956 1.295166 -0.930249 -v 1.583640 1.594462 -0.954546 -v 0.787552 4.268670 -0.905779 -v 0.430089 4.600734 -0.804592 -v 0.565465 4.464381 -0.834402 -v 0.339055 4.626878 -0.883805 -v 1.071486 4.043756 0.186888 -v 0.812206 4.317882 0.248249 -v 1.299117 3.659781 0.156041 -v 1.534188 2.971503 0.158790 -v 1.726299 2.340868 0.161049 -v 0.581277 4.505805 0.255518 -v 0.196009 0.068451 0.294599 -v 0.423579 0.113088 0.328154 -v 0.651147 0.157726 0.361710 -v 0.832396 0.288624 0.296040 -v 1.013646 0.419521 0.230370 -v 1.235431 0.729706 0.247088 -v 1.352953 0.969690 0.295770 -v 1.544214 1.246684 0.185180 -v 1.708797 1.578870 0.184397 -v 1.756635 1.955488 0.161469 -v -1.071485 4.043756 0.186888 -v -1.299116 3.659781 0.156041 -v -1.534187 2.971503 0.158790 -v -0.812206 4.317882 0.248249 -v -0.581276 4.505805 0.255518 -v -0.196009 0.068451 0.294599 -v -0.651146 0.157726 0.361710 -v -1.013645 0.419521 0.230370 -v -1.235431 0.729706 0.247088 -v -1.352953 0.969690 0.295770 -v -1.544213 1.246684 0.185180 -v -1.708796 1.578870 0.184397 -v -1.756634 1.955488 0.161469 -v -1.726298 2.340868 0.161049 -v -0.423579 0.113088 0.328154 -v -0.832396 0.288624 0.296040 -v 0.000000 0.042257 0.294287 -v 0.000000 0.842044 7.788106 -v -0.118757 0.908146 7.776113 -v -0.118757 0.908146 7.776113 -v 0.000000 0.842044 7.788106 -v 0.000000 7.491805 -0.793408 -v 0.000000 6.981207 -0.353604 -v 0.000000 6.981207 -0.353604 -v 0.000000 7.491805 -0.793408 -v 0.000000 6.981207 -0.353604 -v 0.000000 7.555954 -0.874842 -v 0.000000 5.732892 -13.099184 -v 0.000000 5.809293 -13.218571 -v 0.000000 5.809293 -13.218571 -v 0.000000 5.732892 -13.099184 -v 0.000000 0.842044 7.788106 -v 0.118757 0.908146 7.776113 -v 0.118757 0.908146 7.776113 -v 0.000000 0.842044 7.788106 -# 2735 vertices - -vt 0.590928 -1.494311 0.000000 -vt 0.592165 -1.441361 0.000000 -vt 0.606540 -1.500347 0.000000 -vt 0.607346 -1.527874 0.000000 -vt 0.592921 -1.515487 0.000000 -vt 0.582566 -1.550740 0.000000 -vt 0.562326 -1.541520 0.000000 -vt 0.522142 -1.507261 0.000000 -vt 0.519947 -1.446893 0.000000 -vt 0.475431 -1.499751 0.000000 -vt 0.473388 -1.444316 0.000000 -vt 0.443607 -1.443343 0.000000 -vt 0.442597 -1.386132 0.000000 -vt 0.416770 -1.381189 0.000000 -vt 0.415531 -1.294937 0.000000 -vt 0.374740 -1.302715 0.000000 -vt 0.372185 -1.212062 0.000000 -vt 0.344024 -1.223621 0.000000 -vt 0.523532 -1.610601 0.000000 -vt 0.476868 -1.634191 0.000000 -vt 0.479462 -1.691017 0.000000 -vt 0.524654 -1.567310 0.000000 -vt 0.475402 -1.584196 0.000000 -vt 0.476107 -1.541826 0.000000 -vt 0.446946 -1.501985 0.000000 -vt 0.416933 -1.439118 0.000000 -vt 0.374791 -1.385177 0.000000 -vt 0.347571 -1.314428 0.000000 -vt 0.315913 -1.324631 0.000000 -vt 0.316114 -1.234680 0.000000 -vt 0.294725 -1.240592 0.000000 -vt 0.296242 -1.169249 0.000000 -vt 0.375255 -1.444526 0.000000 -vt 0.346700 -1.388624 0.000000 -vt 0.313735 -1.397374 0.000000 -vt 0.292049 -1.333177 0.000000 -vt 0.286418 -1.410687 0.000000 -vt 0.312322 -1.442898 0.000000 -vt 0.346050 -1.440139 0.000000 -vt 0.375707 -1.511823 0.000000 -vt 0.415135 -1.503257 0.000000 -vt 0.447038 -1.552912 0.000000 -vt 0.447547 -1.607413 0.000000 -vt 0.446338 -1.654965 0.000000 -vt 0.446752 -1.715340 0.000000 -vt 0.406444 -1.674046 0.000000 -vt 0.344433 -1.492112 0.000000 -vt 0.409720 -1.620384 0.000000 -vt 0.371450 -1.624734 0.000000 -vt 0.414354 -1.561123 0.000000 -vt 0.380545 -1.565754 0.000000 -vt 0.358791 -1.572479 0.000000 -vt 0.346300 -1.533487 0.000000 -vt 0.333462 -1.519934 0.000000 -vt 0.340622 -1.555324 0.000000 -vt 0.328430 -1.542978 0.000000 -vt 0.336681 -1.565476 0.000000 -vt 0.325683 -1.555901 0.000000 -vt 0.305091 -1.545244 0.000000 -vt 0.304983 -1.561234 0.000000 -vt 0.336735 -1.586342 0.000000 -vt 0.342602 -1.582103 0.000000 -vt 0.326903 -1.614759 0.000000 -vt 0.253071 -1.632311 0.000000 -vt 0.245566 -1.648103 0.000000 -vt 0.267425 -1.661375 0.000000 -vt 0.273240 -1.646918 0.000000 -vt 0.263867 -1.616103 0.000000 -vt 0.279274 -1.636400 0.000000 -vt 0.302187 -1.638321 0.000000 -vt 0.303563 -1.630440 0.000000 -vt 0.331470 -1.622061 0.000000 -vt 0.361689 -1.670706 0.000000 -vt 0.341241 -1.656297 0.000000 -vt 0.300284 -1.652797 0.000000 -vt 0.273935 -1.564515 0.000000 -vt 0.278446 -1.584978 0.000000 -vt 0.254884 -1.587066 0.000000 -vt 0.242067 -1.603366 0.000000 -vt 0.235244 -1.625701 0.000000 -vt 0.236464 -1.664327 0.000000 -vt 0.262601 -1.682771 0.000000 -vt 0.297502 -1.680034 0.000000 -vt 0.335429 -1.696165 0.000000 -vt 0.331033 -1.760641 0.000000 -vt 0.292504 -1.772077 0.000000 -vt 0.252555 -1.551578 0.000000 -vt 0.239698 -1.571025 0.000000 -vt 0.227602 -1.598818 0.000000 -vt 0.219895 -1.652916 0.000000 -vt 0.234426 -1.708492 0.000000 -vt 0.260252 -1.719750 0.000000 -vt 0.294263 -1.717558 0.000000 -vt 0.259273 -1.773625 0.000000 -vt 0.233188 -1.769038 0.000000 -vt 0.216253 -1.700998 0.000000 -vt 0.213807 -1.768662 0.000000 -vt 0.291767 -1.838698 0.000000 -vt 0.259684 -1.836845 0.000000 -vt 0.234681 -1.836018 0.000000 -vt 0.212716 -1.832632 0.000000 -vt 0.403717 -1.731732 0.000000 -vt 0.358570 -1.734979 0.000000 -vt 0.330536 -1.820323 0.000000 -vt 0.292140 -1.903167 0.000000 -vt 0.260174 -1.902717 0.000000 -vt 0.233395 -1.901878 0.000000 -vt 0.209900 -1.900594 0.000000 -vt 0.200128 -1.830599 0.000000 -vt 0.204227 -1.761708 0.000000 -vt 0.207223 -1.704071 0.000000 -vt 0.189831 -1.791338 0.000000 -vt 0.449378 -1.773914 0.000000 -vt 0.482736 -1.745417 0.000000 -vt 0.487142 -1.784114 0.000000 -vt 0.525027 -1.744065 0.000000 -vt 0.402566 -1.800541 0.000000 -vt 0.351063 -1.803245 0.000000 -vt 0.331763 -1.886241 0.000000 -vt 0.294060 -1.998123 0.000000 -vt 0.261291 -1.998123 0.000000 -vt 0.354697 -1.861627 0.000000 -vt 0.335668 -1.963089 0.000000 -vt 0.365162 -1.918325 0.000000 -vt 0.413414 -1.863550 0.000000 -vt 0.454220 -1.818596 0.000000 -vt 0.233092 -1.998123 0.000000 -vt 0.207490 -1.998123 0.000000 -vt 0.196899 -1.903391 0.000000 -vt 0.187704 -1.838594 0.000000 -vt 0.179061 -1.788542 0.000000 -vt 0.181658 -1.742250 0.000000 -vt 0.170196 -1.741237 0.000000 -vt 0.174723 -1.690471 0.000000 -vt 0.161322 -1.687738 0.000000 -vt 0.165349 -1.649178 0.000000 -vt 0.150577 -1.647974 0.000000 -vt 0.193355 -1.998123 0.000000 -vt 0.184304 -1.916180 0.000000 -vt 0.176877 -1.841777 0.000000 -vt 0.167131 -1.791695 0.000000 -vt 0.155805 -1.744368 0.000000 -vt 0.143720 -1.690302 0.000000 -vt 0.125860 -1.643955 0.000000 -vt 0.132003 -1.610751 0.000000 -vt 0.082223 -1.664710 0.000000 -vt 0.075563 -1.699664 0.000000 -vt 0.089610 -1.705625 0.000000 -vt 0.097597 -1.668863 0.000000 -vt 0.105760 -1.716434 0.000000 -vt 0.121155 -1.684910 0.000000 -vt 0.118027 -1.742299 0.000000 -vt 0.139482 -1.742248 0.000000 -vt 0.151598 -1.793337 0.000000 -vt 0.163360 -1.844024 0.000000 -vt 0.171416 -1.921191 0.000000 -vt 0.181675 -1.998123 0.000000 -vt 0.097411 -1.747905 0.000000 -vt 0.119529 -1.906975 0.000000 -vt 0.122115 -1.998123 0.000000 -vt 0.096454 -1.979342 0.000000 -vt 0.141310 -1.918942 0.000000 -vt 0.146040 -1.838457 0.000000 -vt 0.132669 -1.790749 0.000000 -vt 0.110892 -1.788463 0.000000 -vt 0.090330 -1.781697 0.000000 -vt 0.081150 -1.740666 0.000000 -vt 0.067490 -1.733082 0.000000 -vt 0.063452 -1.695331 0.000000 -vt 0.056688 -1.727679 0.000000 -vt 0.083082 -1.815702 0.000000 -vt 0.073683 -1.773260 0.000000 -vt 0.061013 -1.766202 0.000000 -vt 0.067845 -1.805737 0.000000 -vt 0.077691 -1.847184 0.000000 -vt 0.102912 -1.824921 0.000000 -vt 0.095799 -1.893192 0.000000 -vt 0.075643 -1.880779 0.000000 -vt 0.062982 -1.836631 0.000000 -vt 0.055767 -1.796061 0.000000 -vt 0.051101 -1.759935 0.000000 -vt 0.047642 -1.721780 0.000000 -vt 0.054948 -1.692947 0.000000 -vt 0.061178 -1.665146 0.000000 -vt 0.069144 -1.663610 0.000000 -vt 0.055851 -1.664450 0.000000 -vt 0.066297 -1.639099 0.000000 -vt 0.048154 -1.689095 0.000000 -vt 0.042312 -1.717822 0.000000 -vt 0.043389 -1.752899 0.000000 -vt 0.046475 -1.787097 0.000000 -vt 0.051095 -1.823497 0.000000 -vt 0.059784 -1.865820 0.000000 -vt 0.076566 -1.916809 0.000000 -vt 0.079779 -1.956599 0.000000 -vt 0.040757 -1.808938 0.000000 -vt 0.045238 -1.846102 0.000000 -vt 0.058445 -1.895681 0.000000 -vt 0.058582 -1.925624 0.000000 -vt 0.042193 -1.871274 0.000000 -vt 0.040662 -1.895972 0.000000 -vt 0.031305 -1.850318 0.000000 -vt 0.035047 -1.828789 0.000000 -vt 0.028504 -1.814632 0.000000 -vt 0.032866 -1.796256 0.000000 -vt 0.023777 -1.801886 0.000000 -vt 0.027396 -1.785532 0.000000 -vt 0.038320 -1.777341 0.000000 -vt 0.037770 -1.745502 0.000000 -vt 0.051476 -1.648531 0.000000 -vt 0.061158 -1.640058 0.000000 -vt 0.064489 -1.617326 0.000000 -vt 0.038954 -1.694980 0.000000 -vt 0.026146 -1.737531 0.000000 -vt 0.020882 -1.767666 0.000000 -vt 0.015974 -1.787372 0.000000 -vt 0.017825 -1.821418 0.000000 -vt 0.024378 -1.831994 0.000000 -vt 0.026290 -1.866354 0.000000 -vt 0.011290 -1.799756 0.000000 -vt 0.014673 -1.763152 0.000000 -vt 0.022742 -1.726604 0.000000 -vt 0.041762 -1.668921 0.000000 -vt 0.056991 -1.617540 0.000000 -vt 0.055156 -1.596577 0.000000 -vt 0.008746 -1.783705 0.000000 -vt 0.125406 -1.833760 0.000000 -vt 0.186903 -1.696989 0.000000 -vt 0.192653 -1.751974 0.000000 -vt 0.197694 -1.705134 0.000000 -vt 0.190461 -1.656656 0.000000 -vt 0.140107 -1.998123 0.000000 -vt 0.158115 -1.923390 0.000000 -vt 0.168522 -1.998123 0.000000 -vt 0.154804 -1.998123 0.000000 -vt 0.594770 -1.604048 0.000000 -vt 0.599111 -1.574327 0.000000 -vt 0.581246 -1.604864 0.000000 -vt 0.611623 -1.555549 0.000000 -vt 0.617143 -1.590482 0.000000 -vt 0.591557 -1.635438 0.000000 -vt 0.570062 -1.638296 0.000000 -vt 0.564251 -1.673203 0.000000 -vt 0.552353 -1.647222 0.000000 -vt 0.548140 -1.689670 0.000000 -vt 0.520854 -1.663489 0.000000 -vt 0.614482 -1.445965 0.000000 -vt 0.618470 -1.523681 0.000000 -vt 0.631315 -1.564903 0.000000 -vt 0.622697 -1.619578 0.000000 -vt 0.593698 -1.658245 0.000000 -vt 0.565907 -1.693971 0.000000 -vt 0.549731 -1.706705 0.000000 -vt 0.521232 -1.711851 0.000000 -vt 0.639041 -1.598096 0.000000 -vt 0.666089 -1.571621 0.000000 -vt 0.658095 -1.531948 0.000000 -vt 0.638163 -1.465243 0.000000 -vt 0.618935 -1.386380 0.000000 -vt 0.592883 -1.381416 0.000000 -vt 0.592464 -1.318407 0.000000 -vt 0.618369 -1.325547 0.000000 -vt 0.591979 -1.251556 0.000000 -vt 0.617392 -1.264145 0.000000 -vt 0.591289 -1.205736 0.000000 -vt 0.616074 -1.220584 0.000000 -vt 0.593173 -1.154422 0.000000 -vt 0.615889 -1.171577 0.000000 -vt 0.599003 -1.119578 0.000000 -vt 0.617705 -1.144318 0.000000 -vt 0.662816 -1.174689 0.000000 -vt 0.664387 -1.192741 0.000000 -vt 0.639267 -1.188892 0.000000 -vt 0.640050 -1.162971 0.000000 -vt 0.638607 -1.234041 0.000000 -vt 0.640213 -1.276789 0.000000 -vt 0.644697 -1.331903 0.000000 -vt 0.648125 -1.395863 0.000000 -vt 0.680287 -1.437896 0.000000 -vt 0.688807 -1.513222 0.000000 -vt 0.667975 -1.235484 0.000000 -vt 0.684586 -1.189772 0.000000 -vt 0.673988 -1.159874 0.000000 -vt 0.695542 -1.554549 0.000000 -vt 0.717034 -1.557598 0.000000 -vt 0.713097 -1.522795 0.000000 -vt 0.706473 -1.452648 0.000000 -vt 0.676310 -1.342834 0.000000 -vt 0.670685 -1.285197 0.000000 -vt 0.703277 -1.354226 0.000000 -vt 0.697273 -1.291975 0.000000 -vt 0.691630 -1.240725 0.000000 -vt 0.674080 -1.144837 0.000000 -vt 0.676805 -1.106695 0.000000 -vt 0.684907 -1.100333 0.000000 -vt 0.687126 -1.102847 0.000000 -vt 0.696252 -1.114714 0.000000 -vt 0.525086 -1.044053 0.000000 -vt 0.563733 -1.087789 0.000000 -vt 0.387381 -1.910405 0.000000 -vt 0.386453 -1.907733 0.000000 -vt 0.381982 -1.906575 0.000000 -vt 0.401941 -1.914162 0.000000 -vt 0.385126 -1.918928 0.000000 -vt 0.387647 -1.921755 0.000000 -vt 0.403322 -1.938097 0.000000 -vt 0.402613 -1.943667 0.000000 -vt 0.388820 -1.906694 0.000000 -vt 0.403451 -1.902720 0.000000 -vt 0.402483 -1.908047 0.000000 -vt 0.482590 -1.959442 0.000000 -vt 0.514505 -1.955261 0.000000 -vt 0.498568 -1.893268 0.000000 -vt 0.472127 -1.908422 0.000000 -vt 0.443956 -1.916963 0.000000 -vt 0.452370 -1.966875 0.000000 -vt 0.427631 -1.953513 0.000000 -vt 0.424247 -1.916230 0.000000 -vt 0.423981 -1.902796 0.000000 -vt 0.442909 -1.895802 0.000000 -vt 0.478544 -1.886325 0.000000 -vt 0.520312 -1.930539 0.000000 -vt 0.428140 -1.964350 0.000000 -vt 0.459643 -1.989051 0.000000 -vt 0.493963 -1.994280 0.000000 -vt 0.529474 -1.991678 0.000000 -vt 0.559288 -1.991382 0.000000 -vt 0.553374 -1.951923 0.000000 -vt 0.530109 -1.922046 0.000000 -vt 0.553633 -1.895935 0.000000 -vt 0.543899 -1.879244 0.000000 -vt 0.519139 -1.835732 0.000000 -vt 0.552719 -1.821755 0.000000 -vt 0.583780 -1.705039 0.000000 -vt 0.581304 -1.706488 0.000000 -vt 0.572264 -1.735272 0.000000 -vt 0.574459 -1.739983 0.000000 -vt 0.561021 -1.778002 0.000000 -vt 0.566472 -1.785545 0.000000 -vt 0.564634 -1.841739 0.000000 -vt 0.539806 -1.787494 0.000000 -vt 0.551521 -1.751714 0.000000 -vt 0.566317 -1.717392 0.000000 -vt 0.577834 -1.695803 0.000000 -vt 0.585532 -1.692688 0.000000 -vt 0.424982 -1.892766 0.000000 -vt 0.445057 -1.879698 0.000000 -vt 0.476981 -1.872089 0.000000 -vt 0.067745 -1.582462 0.000000 -vt 0.074001 -1.578822 0.000000 -vt 0.076523 -1.563028 0.000000 -vt 0.068938 -1.540070 0.000000 -vt 0.069607 -1.555387 0.000000 -vt 0.072679 -1.535981 0.000000 -vt 0.061220 -1.556660 0.000000 -vt 0.061044 -1.573948 0.000000 -vt 0.071043 -1.515590 0.000000 -vt 0.076420 -1.531893 0.000000 -vt 0.067817 -1.520307 0.000000 -vt 0.061396 -1.519704 0.000000 -vt 0.057308 -1.526108 0.000000 -vt 0.056146 -1.561882 0.000000 -vt 0.055607 -1.579136 0.000000 -vt 0.049636 -1.491689 0.000000 -vt 0.040920 -1.488740 0.000000 -vt 0.039453 -1.493529 0.000000 -vt 0.031137 -1.491360 0.000000 -vt 0.033586 -1.499729 0.000000 -vt 0.047788 -1.495727 0.000000 -vt 0.048688 -1.504969 0.000000 -vt 0.055816 -1.500169 0.000000 -vt 0.063152 -1.506295 0.000000 -vt 0.065833 -1.501933 0.000000 -vt 0.045574 -1.511990 0.000000 -vt 0.058119 -1.496033 0.000000 -vt 0.031878 -1.507013 0.000000 -vt 0.016637 -1.502894 0.000000 -vt 0.016832 -1.492939 0.000000 -vt 0.021542 -1.486149 0.000000 -vt 0.031931 -1.485008 0.000000 -vt 0.042387 -1.483950 0.000000 -vt 0.051485 -1.487650 0.000000 -vt 0.060422 -1.491896 0.000000 -vt 0.068515 -1.497570 0.000000 -vt 0.074269 -1.510873 0.000000 -vt 0.001306 -1.494628 0.000000 -vt 0.044253 -1.476796 0.000000 -vt 0.022099 -1.478823 0.000000 -vt 0.012510 -1.479819 0.000000 -vt 0.001824 -1.483959 0.000000 -vt 0.064034 -1.453471 0.000000 -vt 0.075047 -1.460783 0.000000 -vt 0.083881 -1.432119 0.000000 -vt 0.056583 -1.474657 0.000000 -vt 0.046119 -1.469642 0.000000 -vt 0.034001 -1.470381 0.000000 -vt 0.012861 -1.471720 0.000000 -vt 0.002341 -1.473290 0.000000 -vt 0.002779 -1.464289 0.000000 -vt 0.063440 -1.485841 0.000000 -vt 0.054034 -1.481154 0.000000 -vt 0.066457 -1.479787 0.000000 -vt 0.075648 -1.484789 0.000000 -vt 0.072081 -1.491180 0.000000 -vt 0.084222 -1.466680 0.000000 -vt 0.093058 -1.481364 0.000000 -vt 0.082992 -1.498099 0.000000 -vt 0.078630 -1.504486 0.000000 -vt 0.081322 -1.526890 0.000000 -vt 0.094242 -1.442449 0.000000 -vt 0.104722 -1.461998 0.000000 -vt 0.113933 -1.441943 0.000000 -vt 0.101572 -1.416095 0.000000 -vt 0.120869 -1.405478 0.000000 -vt 0.023664 -1.461783 0.000000 -vt 0.035279 -1.462105 0.000000 -vt 0.050634 -1.445945 0.000000 -vt 0.070492 -1.420497 0.000000 -vt 0.089909 -1.404892 0.000000 -vt 0.108264 -1.387326 0.000000 -vt 0.121635 -1.355956 0.000000 -vt 0.133371 -1.368011 0.000000 -vt 0.128450 -1.327870 0.000000 -vt 0.140453 -1.312477 0.000000 -vt 0.130270 -1.284333 0.000000 -vt 0.123260 -1.314045 0.000000 -vt 0.115823 -1.358186 0.000000 -vt 0.120629 -1.330894 0.000000 -vt 0.095995 -1.374557 0.000000 -vt 0.076107 -1.391026 0.000000 -vt 0.055746 -1.408106 0.000000 -vt 0.038916 -1.434224 0.000000 -vt 0.024672 -1.452069 0.000000 -vt 0.014062 -1.452431 0.000000 -vt 0.003609 -1.442902 0.000000 -vt 0.014910 -1.441240 0.000000 -vt 0.104732 -1.345241 0.000000 -vt 0.114893 -1.336146 0.000000 -vt 0.042180 -1.397203 0.000000 -vt 0.060254 -1.379239 0.000000 -vt 0.084211 -1.358095 0.000000 -vt 0.098229 -1.340779 0.000000 -vt 0.110670 -1.319893 0.000000 -vt 0.099334 -1.311112 0.000000 -vt 0.087452 -1.302784 0.000000 -vt 0.103048 -1.272988 0.000000 -vt 0.112500 -1.301316 0.000000 -vt 0.113653 -1.255250 0.000000 -vt 0.115789 -1.286087 0.000000 -vt 0.116179 -1.288260 0.000000 -vt 0.126537 -1.258982 0.000000 -vt 0.121992 -1.276810 0.000000 -vt 0.125074 -1.294381 0.000000 -vt 0.090138 -1.254400 0.000000 -vt 0.070577 -1.245063 0.000000 -vt 0.067747 -1.287183 0.000000 -vt 0.050203 -1.271772 0.000000 -vt 0.047724 -1.341348 0.000000 -vt 0.034241 -1.298772 0.000000 -vt 0.035051 -1.258096 0.000000 -vt 0.026457 -1.252202 0.000000 -vt 0.036896 -1.221098 0.000000 -vt 0.028179 -1.215820 0.000000 -vt 0.018404 -1.268853 0.000000 -vt 0.110570 -1.214377 0.000000 -vt 0.126586 -1.219639 0.000000 -vt 0.139931 -1.240379 0.000000 -vt 0.152071 -1.261056 0.000000 -vt 0.091612 -1.209746 0.000000 -vt 0.111573 -1.161777 0.000000 -vt 0.127024 -1.166337 0.000000 -vt 0.140947 -1.178433 0.000000 -vt 0.155540 -1.193876 0.000000 -vt 0.170856 -1.207144 0.000000 -vt 0.169460 -1.294361 0.000000 -vt 0.191290 -1.278710 0.000000 -vt 0.227577 -1.193990 0.000000 -vt 0.209284 -1.199004 0.000000 -vt 0.208394 -1.129267 0.000000 -vt 0.189630 -1.133489 0.000000 -vt 0.190500 -1.203792 0.000000 -vt 0.210185 -1.269703 0.000000 -vt 0.171244 -1.139303 0.000000 -vt 0.155456 -1.130928 0.000000 -vt 0.141114 -1.122312 0.000000 -vt 0.127278 -1.115911 0.000000 -vt 0.112536 -1.112953 0.000000 -vt 0.093050 -1.159920 0.000000 -vt 0.072386 -1.204922 0.000000 -vt 0.170022 -1.078906 0.000000 -vt 0.187676 -1.070359 0.000000 -vt 0.206477 -1.065513 0.000000 -vt 0.140948 -1.072335 0.000000 -vt 0.127177 -1.070554 0.000000 -vt 0.125964 -1.025503 0.000000 -vt 0.140036 -1.019027 0.000000 -vt 0.154673 -1.075328 0.000000 -vt 0.153712 -1.010623 0.000000 -vt 0.168181 -1.007411 0.000000 -vt 0.185267 -1.002871 0.000000 -vt 0.204602 -1.002871 0.000000 -vt 0.225920 -1.060981 0.000000 -vt 0.227158 -1.123879 0.000000 -vt 0.246266 -1.186306 0.000000 -vt 0.246100 -1.257389 0.000000 -vt 0.264052 -1.251135 0.000000 -vt 0.261129 -1.349253 0.000000 -vt 0.111154 -1.032892 0.000000 -vt 0.224424 -1.002872 0.000000 -vt 0.245597 -1.056585 0.000000 -vt 0.246409 -1.116777 0.000000 -vt 0.265304 -1.110105 0.000000 -vt 0.112706 -1.070264 0.000000 -vt 0.094664 -1.071326 0.000000 -vt 0.264676 -1.179071 0.000000 -vt 0.228194 -1.264358 0.000000 -vt 0.160552 -1.375513 0.000000 -vt 0.196369 -1.376942 0.000000 -vt 0.211570 -1.365063 0.000000 -vt 0.227883 -1.359666 0.000000 -vt 0.245252 -1.354527 0.000000 -vt 0.119308 -1.277911 0.000000 -vt 0.122201 -1.281286 0.000000 -vt 0.119551 -1.281017 0.000000 -vt 0.052167 -1.234462 0.000000 -vt 0.054510 -1.196952 0.000000 -vt 0.074341 -1.161384 0.000000 -vt 0.058215 -1.159194 0.000000 -vt 0.045150 -1.151599 0.000000 -vt 0.040479 -1.183994 0.000000 -vt 0.094332 -1.111872 0.000000 -vt 0.076094 -1.076261 0.000000 -vt 0.075813 -1.117600 0.000000 -vt 0.059519 -1.093050 0.000000 -vt 0.059924 -1.125787 0.000000 -vt 0.045049 -1.109936 0.000000 -vt 0.049429 -1.131354 0.000000 -vt 0.033750 -1.143417 0.000000 -vt 0.032060 -1.181552 0.000000 -vt 0.028830 -1.163698 0.000000 -vt 0.028151 -1.114051 0.000000 -vt 0.041750 -1.084874 0.000000 -vt 0.057503 -1.064972 0.000000 -vt 0.075711 -1.044230 0.000000 -vt 0.093838 -1.036763 0.000000 -vt 0.557203 -1.131802 0.000000 -vt 0.516714 -1.104841 0.000000 -vt 0.552613 -1.194808 0.000000 -vt 0.513689 -1.179779 0.000000 -vt 0.470200 -1.218648 0.000000 -vt 0.471105 -1.159674 0.000000 -vt 0.443205 -1.151542 0.000000 -vt 0.513476 -1.234565 0.000000 -vt 0.551861 -1.246622 0.000000 -vt 0.470509 -1.306074 0.000000 -vt 0.514163 -1.313522 0.000000 -vt 0.552729 -1.316174 0.000000 -vt 0.442142 -1.210480 0.000000 -vt 0.415283 -1.143426 0.000000 -vt 0.442089 -1.300299 0.000000 -vt 0.471896 -1.388738 0.000000 -vt 0.517031 -1.390437 0.000000 -vt 0.555864 -1.381379 0.000000 -vt 0.347728 -1.046174 0.000000 -vt 0.345154 -1.089328 0.000000 -vt 0.372072 -1.102195 0.000000 -vt 0.371916 -1.147159 0.000000 -vt 0.413037 -1.205463 0.000000 -vt 0.348432 -1.002871 0.000000 -vt 0.318629 -1.042435 0.000000 -vt 0.343658 -1.154041 0.000000 -vt 0.318589 -1.098304 0.000000 -vt 0.280323 -1.245846 0.000000 -vt 0.281359 -1.173319 0.000000 -vt 0.281715 -1.104802 0.000000 -vt 0.296919 -1.100902 0.000000 -vt 0.281051 -1.044769 0.000000 -vt 0.296695 -1.042209 0.000000 -vt 0.299724 -1.002871 0.000000 -vt 0.264500 -1.050821 0.000000 -vt 0.317602 -1.165430 0.000000 -vt 0.280698 -1.002875 0.000000 -vt 0.263459 -1.002877 0.000000 -vt 0.244300 -1.002875 0.000000 -vt 0.210996 -1.655101 0.000000 -vt 0.214607 -1.604196 0.000000 -vt 0.229951 -1.542608 0.000000 -vt 0.242227 -1.529133 0.000000 -vt 0.247611 -1.479342 0.000000 -vt 0.262338 -1.467968 0.000000 -vt 0.254746 -1.428298 0.000000 -vt 0.270473 -1.418840 0.000000 -vt 0.277528 -1.341093 0.000000 -vt 0.256246 -1.514288 0.000000 -vt 0.275658 -1.497706 0.000000 -vt 0.281173 -1.456764 0.000000 -vt 0.310062 -1.484286 0.000000 -vt 0.306534 -1.518735 0.000000 -vt 0.272028 -1.533689 0.000000 -vt 0.069311 -1.568009 0.000000 -vt 0.077469 -1.548681 0.000000 -vt 0.060658 -1.585581 0.000000 -vt 0.059133 -1.600918 0.000000 -vt 0.066363 -1.598332 0.000000 -vt 0.104958 -1.635268 0.000000 -vt 0.088683 -1.632837 0.000000 -vt 0.074650 -1.634535 0.000000 -vt 0.067196 -1.616181 0.000000 -vt 0.079216 -1.608818 0.000000 -vt 0.072399 -1.594989 0.000000 -vt 0.082708 -1.589593 0.000000 -vt 0.108975 -1.607283 0.000000 -vt 0.093825 -1.606511 0.000000 -vt 0.113766 -1.584077 0.000000 -vt 0.135691 -1.582011 0.000000 -vt 0.138022 -1.552811 0.000000 -vt 0.155203 -1.614178 0.000000 -vt 0.157676 -1.578463 0.000000 -vt 0.158575 -1.540807 0.000000 -vt 0.138831 -1.522826 0.000000 -vt 0.116736 -1.539872 0.000000 -vt 0.115901 -1.518888 0.000000 -vt 0.101569 -1.531284 0.000000 -vt 0.112397 -1.493210 0.000000 -vt 0.099328 -1.507950 0.000000 -vt 0.128049 -1.507488 0.000000 -vt 0.138267 -1.494457 0.000000 -vt 0.149182 -1.418690 0.000000 -vt 0.133183 -1.458485 0.000000 -vt 0.124110 -1.478336 0.000000 -vt 0.157872 -1.502480 0.000000 -vt 0.155509 -1.465161 0.000000 -vt 0.027536 -1.421293 0.000000 -vt 0.063716 -1.350995 0.000000 -vt 0.044757 -1.368741 0.000000 -vt 0.029800 -1.381501 0.000000 -vt 0.016391 -1.409298 0.000000 -vt 0.004001 -1.430517 0.000000 -vt 0.031945 -1.335490 0.000000 -vt 0.017542 -1.368135 0.000000 -vt 0.004001 -1.399524 0.000000 -vt 0.018868 -1.319180 0.000000 -vt 0.004001 -1.366125 0.000000 -vt 0.004001 -1.321399 0.000000 -vt 0.019337 -1.279916 0.000000 -vt 0.018521 -1.252949 0.000000 -vt 0.020942 -1.213698 0.000000 -vt 0.004001 -1.254163 0.000000 -vt 0.004001 -1.275770 0.000000 -vt 0.004001 -1.284609 0.000000 -vt 0.011652 -1.185944 0.000000 -vt 0.015963 -1.164604 0.000000 -vt 0.021269 -1.141642 0.000000 -vt 0.025424 -1.180835 0.000000 -vt 0.121897 -1.328335 0.000000 -vt 0.124318 -1.315580 0.000000 -vt 0.958873 -1.893777 0.000000 -vt 0.953808 -1.861751 0.000000 -vt 0.994546 -1.852151 0.000000 -vt 0.954338 -1.827497 0.000000 -vt 0.965123 -1.799370 0.000000 -vt 0.980062 -1.779385 0.000000 -vt 0.999357 -1.730440 0.000000 -vt 0.970663 -1.924002 0.000000 -vt 0.928244 -1.945391 0.000000 -vt 0.926769 -1.893220 0.000000 -vt 0.927048 -1.856910 0.000000 -vt 0.923277 -1.822591 0.000000 -vt 0.925764 -1.764183 0.000000 -vt 0.938117 -1.710843 0.000000 -vt 0.956645 -1.685330 0.000000 -vt 0.989201 -1.948489 0.000000 -vt 0.942482 -1.983014 0.000000 -vt 0.916796 -1.998607 0.000000 -vt 0.909100 -1.990362 0.000000 -vt 0.906615 -1.967295 0.000000 -vt 0.907843 -1.926622 0.000000 -vt 0.904987 -1.885869 0.000000 -vt 0.902730 -1.858766 0.000000 -vt 0.900427 -1.834083 0.000000 -vt 0.899434 -1.809395 0.000000 -vt 0.901911 -1.768313 0.000000 -vt 0.903507 -1.730192 0.000000 -vt 0.912863 -1.702382 0.000000 -vt 0.919938 -1.674206 0.000000 -vt 0.931004 -1.666544 0.000000 -vt 0.239676 -1.435187 0.000000 -vt 0.225132 -1.441651 0.000000 -vt 0.234272 -1.489750 0.000000 -vt 0.222098 -1.496886 0.000000 -vt 0.218564 -1.551303 0.000000 -vt 0.206801 -1.556883 0.000000 -vt 0.203634 -1.608481 0.000000 -vt 0.193201 -1.609948 0.000000 -vt 0.200662 -1.658381 0.000000 -vt 0.195318 -1.560638 0.000000 -vt 0.208998 -1.503417 0.000000 -vt 0.211009 -1.448208 0.000000 -vt 0.196543 -1.510135 0.000000 -vt 0.197906 -1.454998 0.000000 -vt 0.112348 -1.316229 0.000000 -vt 0.111931 -1.330433 0.000000 -vt 0.113731 -1.300853 0.000000 -vt 0.113361 -1.326869 0.000000 -vt 0.116186 -1.331598 0.000000 -vt 0.118006 -1.338238 0.000000 -vt 0.118890 -1.334722 0.000000 -vt 0.635545 -1.834651 0.000000 -vt 0.664843 -1.844897 0.000000 -vt 0.663736 -1.821580 0.000000 -vt 0.658145 -1.927803 0.000000 -vt 0.624734 -1.916325 0.000000 -vt 0.609506 -1.826174 0.000000 -vt 0.632450 -1.808114 0.000000 -vt 0.605818 -1.797296 0.000000 -vt 0.649104 -2.000000 0.000000 -vt 0.674404 -2.000000 0.000000 -vt 0.630588 -2.000000 0.000000 -vt 0.624247 -2.000000 0.000000 -vt 0.606706 -1.897207 0.000000 -vt 0.591098 -1.821240 0.000000 -vt 0.584928 -1.788339 0.000000 -vt 0.691797 -1.603798 0.000000 -vt 0.685165 -1.594479 0.000000 -vt 0.672168 -1.603508 0.000000 -vt 0.683532 -1.617246 0.000000 -vt 0.706602 -1.627915 0.000000 -vt 0.680387 -1.681479 0.000000 -vt 0.662003 -1.656000 0.000000 -vt 0.633129 -1.717710 0.000000 -vt 0.649271 -1.633070 0.000000 -vt 0.619739 -1.688735 0.000000 -vt 0.593859 -1.749042 0.000000 -vt 0.611552 -1.768040 0.000000 -vt 0.637651 -1.785493 0.000000 -vt 0.668662 -1.802818 0.000000 -vt 0.650162 -1.754521 0.000000 -vt 0.731355 -1.656428 0.000000 -vt 0.697042 -1.593955 0.000000 -vt 0.691308 -1.574101 0.000000 -vt 0.712508 -1.619079 0.000000 -vt 0.735445 -1.646480 0.000000 -vt 0.319701 -1.002891 0.000000 -vt 0.178356 -1.651137 0.000000 -vt 0.181639 -1.609963 0.000000 -vt 0.169174 -1.612300 0.000000 -vt 0.171333 -1.571906 0.000000 -vt 0.183419 -1.564786 0.000000 -vt 0.171678 -1.528616 0.000000 -vt 0.184355 -1.517579 0.000000 -vt 0.170287 -1.485541 0.000000 -vt 0.183866 -1.467952 0.000000 -vt 0.168411 -1.439861 0.000000 -vt 0.182301 -1.419072 0.000000 -vt 0.115901 -1.562303 0.000000 -vt 0.101592 -1.549777 0.000000 -vt 0.087816 -1.541102 0.000000 -vt 0.087365 -1.557073 0.000000 -vt 0.100481 -1.568195 0.000000 -vt 0.086223 -1.521888 0.000000 -vt 0.324517 -1.611261 0.000000 -vt 0.085471 -1.574157 0.000000 -vt 0.097086 -1.587238 0.000000 -vt 0.124699 -1.282167 0.000000 -vt 0.124666 -1.286551 0.000000 -vt 0.125604 -1.299490 0.000000 -vt 0.735771 -1.543787 0.000000 -vt 0.868464 -1.449891 0.000000 -vt 0.831471 -1.447903 0.000000 -vt 0.832612 -1.407113 0.000000 -vt 0.790689 -1.379832 0.000000 -vt 0.791941 -1.431306 0.000000 -vt 0.744584 -1.342777 0.000000 -vt 0.750824 -1.406667 0.000000 -vt 0.718187 -1.313491 0.000000 -vt 0.723628 -1.375553 0.000000 -vt 0.728746 -1.470001 0.000000 -vt 0.767888 -1.602933 0.000000 -vt 0.753775 -1.484318 0.000000 -vt 0.783954 -1.327620 0.000000 -vt 0.831175 -1.363399 0.000000 -vt 0.776932 -1.653661 0.000000 -vt 0.789319 -1.603460 0.000000 -vt 0.789028 -1.583573 0.000000 -vt 0.759135 -1.643469 0.000000 -vt 0.766556 -1.664376 0.000000 -vt 0.769892 -1.669891 0.000000 -vt 0.796397 -1.535006 0.000000 -vt 0.806950 -1.546212 0.000000 -vt 0.809411 -1.534909 0.000000 -vt 0.796609 -1.555446 0.000000 -vt 0.783281 -1.546125 0.000000 -vt 0.759508 -1.551500 0.000000 -vt 0.790233 -1.495239 0.000000 -vt 0.823086 -1.508166 0.000000 -vt 0.851456 -1.544599 0.000000 -vt 0.821917 -1.551077 0.000000 -vt 0.838329 -1.586606 0.000000 -vt 0.818290 -1.558999 0.000000 -vt 0.833771 -1.598464 0.000000 -vt 0.872707 -1.595751 0.000000 -vt 0.854798 -1.647519 0.000000 -vt 0.855348 -1.715277 0.000000 -vt 0.849165 -1.663175 0.000000 -vt 0.774210 -1.675986 0.000000 -vt 0.780923 -1.676583 0.000000 -vt 0.920535 -1.537478 0.000000 -vt 0.930603 -1.561657 0.000000 -vt 0.928462 -1.575369 0.000000 -vt 0.904673 -1.608760 0.000000 -vt 0.888811 -1.680042 0.000000 -vt 0.862037 -1.697608 0.000000 -vt 0.866439 -1.733115 0.000000 -vt 0.859678 -1.750128 0.000000 -vt 0.873211 -1.788904 0.000000 -vt 0.926320 -1.589081 0.000000 -vt 0.922038 -1.616506 0.000000 -vt 0.907985 -1.701513 0.000000 -vt 0.904568 -1.721845 0.000000 -vt 0.889277 -1.773130 0.000000 -vt 0.899397 -1.756141 0.000000 -vt 0.890270 -1.817101 0.000000 -vt 0.448424 -1.026541 0.000000 -vt 0.460156 -1.009018 0.000000 -vt 0.465046 -1.083032 0.000000 -vt 0.460564 -1.009188 0.000000 -vt 0.416465 -1.096594 0.000000 -vt 0.417352 -1.060327 0.000000 -vt 0.378312 -1.060181 0.000000 -vt 0.386269 -1.035703 0.000000 -vt 0.418597 -1.030385 0.000000 -vt 0.448674 -1.060313 0.000000 -vt 0.486775 -1.018199 0.000000 -vt 0.483748 -1.090110 0.000000 -vt 0.371632 -1.012923 0.000000 -vt 0.446848 -1.102002 0.000000 -vt 0.873556 -1.057154 0.000000 -vt 0.882301 -1.034338 0.000000 -vt 0.877625 -1.076667 0.000000 -vt 0.868702 -1.170970 0.000000 -vt 0.856767 -1.162794 0.000000 -vt 0.872678 -1.033555 0.000000 -vt 0.838879 -1.143008 0.000000 -vt 0.836671 -1.247690 0.000000 -vt 0.848911 -1.264801 0.000000 -vt 0.862667 -1.275749 0.000000 -vt 0.856602 -1.311743 0.000000 -vt 0.843253 -1.294858 0.000000 -vt 0.831256 -1.278594 0.000000 -vt 0.822419 -1.228117 0.000000 -vt 0.794525 -1.194206 0.000000 -vt 0.806075 -1.115153 0.000000 -vt 0.759715 -1.155960 0.000000 -vt 0.722991 -1.114285 0.000000 -vt 0.737200 -1.068398 0.000000 -vt 0.697592 -1.056618 0.000000 -vt 0.704073 -1.041870 0.000000 -vt 0.683979 -1.038960 0.000000 -vt 0.686805 -1.026919 0.000000 -vt 0.754748 -1.174980 0.000000 -vt 0.816185 -1.255371 0.000000 -vt 0.788251 -1.028544 0.000000 -vt 0.778228 -1.026391 0.000000 -vt 0.743095 -1.018616 0.000000 -vt 0.683446 -1.001410 0.000000 -vt 0.674577 -1.016457 0.000000 -vt 0.669294 -1.010868 0.000000 -vt 0.674465 -1.035880 0.000000 -vt 0.717604 -1.126985 0.000000 -vt 0.669081 -1.032925 0.000000 -vt 0.682678 -1.069603 0.000000 -vt 0.884478 -1.023802 0.000000 -vt 0.891191 -1.009180 0.000000 -vt 0.886146 -1.001169 0.000000 -vt 0.856125 -1.034210 0.000000 -vt 0.821950 -1.034136 0.000000 -vt 0.791851 -1.011704 0.000000 -vt 0.785059 -1.011152 0.000000 -vt 0.778266 -1.010600 0.000000 -vt 0.750097 -1.007531 0.000000 -vt 0.821321 -1.014169 0.000000 -vt 0.864709 -1.009795 0.000000 -vt 0.911712 -1.376173 0.000000 -vt 0.902175 -1.303666 0.000000 -vt 0.871793 -1.337811 0.000000 -vt 0.874605 -1.380220 0.000000 -vt 0.901591 -1.479251 0.000000 -vt 0.943406 -1.408566 0.000000 -vt 0.941100 -1.506833 0.000000 -vt 0.946986 -1.478539 0.000000 -vt 0.958182 -1.427882 0.000000 -vt 0.966740 -1.378092 0.000000 -vt 0.947957 -1.345697 0.000000 -vt 0.961157 -1.264556 0.000000 -vt 0.980454 -1.268193 0.000000 -vt 0.979086 -1.143921 0.000000 -vt 0.990721 -1.164675 0.000000 -vt 0.992966 -1.146823 0.000000 -vt 0.985707 -1.104695 0.000000 -vt 0.995277 -1.127823 0.000000 -vt 0.996872 -1.096645 0.000000 -vt 0.992327 -1.065469 0.000000 -vt 0.997689 -1.080234 0.000000 -vt 0.998506 -1.063823 0.000000 -vt 0.997879 -1.053395 0.000000 -vt 0.990076 -1.039680 0.000000 -vt 0.918930 -1.263019 0.000000 -vt 0.933605 -1.196023 0.000000 -vt 0.964147 -1.093431 0.000000 -vt 0.980260 -1.035985 0.000000 -vt 0.996635 -1.032298 0.000000 -vt 0.996733 -1.024555 0.000000 -vt 0.993292 -1.019213 0.000000 -vt 0.986591 -1.029888 0.000000 -vt 0.983862 -1.018574 0.000000 -vt 0.967548 -1.048480 0.000000 -vt 0.948655 -1.096395 0.000000 -vt 0.918020 -1.195984 0.000000 -vt 0.909298 -1.235384 0.000000 -vt 0.895102 -1.279751 0.000000 -vt 0.868171 -1.322349 0.000000 -vt 0.841689 -1.338467 0.000000 -vt 0.840453 -1.326999 0.000000 -vt 0.817873 -1.318832 0.000000 -vt 0.786259 -1.292840 0.000000 -vt 0.738767 -1.277552 0.000000 -vt 0.713570 -1.257357 0.000000 -vt 0.704198 -1.204683 0.000000 -vt 0.695617 -1.167916 0.000000 -vt 0.715974 -1.214550 0.000000 -vt 0.709123 -1.176195 0.000000 -vt 0.733426 -1.232167 0.000000 -vt 0.754549 -1.252159 0.000000 -vt 0.818910 -1.306408 0.000000 -vt 0.786953 -1.272963 0.000000 -vt 0.754786 -1.228972 0.000000 -vt 0.727630 -1.190724 0.000000 -vt 0.717370 -1.167818 0.000000 -vt 0.742804 -1.006548 0.000000 -vt 0.735512 -1.005566 0.000000 -vt 0.707649 -1.009399 0.000000 -vt 0.691990 -1.017693 0.000000 -vt 0.706908 -1.001807 0.000000 -vt 0.818734 -1.750746 0.000000 -vt 0.821558 -1.743763 0.000000 -vt 0.836605 -1.765130 0.000000 -vt 0.806083 -1.725569 0.000000 -vt 0.767717 -1.873315 0.000000 -vt 0.731884 -1.857072 0.000000 -vt 0.734750 -1.844921 0.000000 -vt 0.770279 -1.864333 0.000000 -vt 0.804203 -1.890521 0.000000 -vt 0.805482 -1.885027 0.000000 -vt 0.839887 -1.906794 0.000000 -vt 0.697293 -1.839755 0.000000 -vt 0.701933 -1.823977 0.000000 -vt 0.728434 -1.809179 0.000000 -vt 0.795259 -1.852893 0.000000 -vt 0.680426 -1.775428 0.000000 -vt 0.710091 -1.707665 0.000000 -vt 0.755581 -1.744866 0.000000 -vt 0.819690 -1.799653 0.000000 -vt 0.844632 -1.887231 0.000000 -vt 0.862555 -1.849119 0.000000 -vt 0.872334 -1.903581 0.000000 -vt 0.875543 -1.838784 0.000000 -vt 0.895359 -1.881641 0.000000 -vt 0.891669 -1.880324 0.000000 -vt 0.870737 -1.841385 0.000000 -vt 0.847863 -1.792350 0.000000 -vt 0.833298 -1.771548 0.000000 -vt 0.786481 -1.715187 0.000000 -vt 0.772770 -1.699979 0.000000 -vt 0.759059 -1.684771 0.000000 -vt 0.802608 -1.732966 0.000000 -vt 0.895671 -1.905655 0.000000 -vt 0.902254 -1.909584 0.000000 -vt 0.901453 -1.918279 0.000000 -vt 0.899046 -1.894277 0.000000 -vt 0.885574 -1.880452 0.000000 -vt 0.840665 -1.902468 0.000000 -vt 0.870833 -1.913367 0.000000 -vt 0.890827 -1.920774 0.000000 -vt 0.896034 -1.923808 0.000000 -vt 0.900198 -1.923259 0.000000 -vt 0.901816 -1.929562 0.000000 -vt 0.902802 -1.925418 0.000000 -vt 0.903007 -1.915511 0.000000 -vt 0.901766 -1.898455 0.000000 -vt 0.888213 -1.913529 0.000000 -vt 0.879281 -1.968759 0.000000 -vt 0.881910 -1.980870 0.000000 -vt 0.851332 -1.993116 0.000000 -vt 0.892315 -1.971011 0.000000 -vt 0.903579 -1.896675 0.000000 -vt 0.904864 -1.915397 0.000000 -vt 0.903982 -1.928508 0.000000 -vt 0.901738 -1.935303 0.000000 -vt 0.897240 -1.930644 0.000000 -vt 0.891578 -1.926810 0.000000 -vt 0.871482 -1.917706 0.000000 -vt 0.891390 -1.939873 0.000000 -vt 0.872790 -1.931483 0.000000 -vt 0.847530 -1.950827 0.000000 -vt 0.791573 -1.948929 0.000000 -vt 0.894119 -1.958670 0.000000 -vt 0.901972 -1.947420 0.000000 -vt 0.698768 -1.857813 0.000000 -vt 0.732920 -1.868553 0.000000 -vt 0.769226 -1.883032 0.000000 -vt 0.805016 -1.895773 0.000000 -vt 0.840911 -1.909371 0.000000 -vt 0.720049 -1.939264 0.000000 -vt 0.812356 -2.000000 0.000000 -vt 0.793879 -2.000000 0.000000 -vt 0.775403 -2.000000 0.000000 -vt 0.756302 -2.000000 0.000000 -vt 0.737200 -2.000000 0.000000 -vt 0.721244 -2.000000 0.000000 -vt 0.705288 -2.000000 0.000000 -vt 0.762013 -1.675753 0.000000 -vt 0.776310 -1.691565 0.000000 -vt 0.790608 -1.707376 0.000000 -vt 0.900073 -1.959154 0.000000 -vt 0.896981 -1.878276 0.000000 -vt 0.878507 -1.833722 0.000000 -vt 0.851652 -1.786498 0.000000 -vt 0.390421 -1.005564 0.000000 -vt 0.789915 -1.216425 0.000000 -vt 0.777015 -1.094719 0.000000 -vt 0.767205 -1.164189 0.000000 -vt 0.763570 -1.185377 0.000000 -vt 0.768845 -1.089199 0.000000 -vt 0.772930 -1.091959 0.000000 -vt 0.783239 -1.027467 0.000000 -vt 0.763460 -1.160074 0.000000 -vt 0.759159 -1.180178 0.000000 -vt 0.401810 -1.048015 0.000000 -vt 0.846719 -1.205242 0.000000 -vt 0.858806 -1.217885 0.000000 -vt 0.404509 -1.017974 0.000000 -vt 0.830649 -1.185562 0.000000 -vt 0.800300 -1.154680 0.000000 -vt 0.730096 -1.091341 0.000000 -vt 0.772110 -1.129454 0.000000 -vt 0.764280 -1.122580 0.000000 -vt 0.768195 -1.126017 0.000000 -vt 0.871129 -1.114062 0.000000 -vt 0.864722 -1.098175 0.000000 -vt 0.740147 -1.043507 0.000000 -vt 0.847502 -1.088609 0.000000 -vt 0.814013 -1.074645 0.000000 -vt 0.782633 -1.061631 0.000000 -vt 0.773536 -1.057795 0.000000 -vt 0.778085 -1.059713 0.000000 -vt 0.707526 -1.025428 0.000000 -vt 0.680666 -1.049033 0.000000 -vt 0.677689 -1.056144 0.000000 -vt 0.693307 -1.007996 0.000000 -vt 0.693821 -1.001585 0.000000 -vt 0.557941 -1.596903 0.000000 -vt 0.731385 -1.328134 0.000000 -vt 0.737226 -1.391110 0.000000 -vt 0.741261 -1.477160 0.000000 -vt 0.747639 -1.547643 0.000000 -vt 0.726169 -1.267455 0.000000 -vt 0.502894 -1.879317 0.000000 -vt 0.490766 -1.880166 0.000000 -vt 0.006606 -1.206461 0.000000 -vt 0.008836 -1.447666 0.000000 -vt 0.126570 -1.048028 0.000000 -vt 0.140492 -1.045681 0.000000 -vt 0.154193 -1.042975 0.000000 -vt 0.169102 -1.043159 0.000000 -vt 0.186471 -1.036615 0.000000 -vt 0.205539 -1.034192 0.000000 -vt 0.225172 -1.031927 0.000000 -vt 0.030951 -1.128734 0.000000 -vt 0.043399 -1.097405 0.000000 -vt 0.058511 -1.079011 0.000000 -vt 0.075902 -1.060246 0.000000 -vt 0.094251 -1.054044 0.000000 -vt 0.111930 -1.051578 0.000000 -vt 0.296956 -1.022540 0.000000 -vt 0.280875 -1.023822 0.000000 -vt 0.263979 -1.026849 0.000000 -vt 0.244949 -1.029730 0.000000 -vt 0.009456 -1.435879 0.000000 -vt 0.010196 -1.404411 0.000000 -vt 0.010771 -1.367130 0.000000 -vt 0.011434 -1.320289 0.000000 -vt 0.011202 -1.272311 0.000000 -vt 0.011669 -1.282262 0.000000 -vt 0.011261 -1.253556 0.000000 -vt 0.025050 -1.152670 0.000000 -vt 0.020693 -1.172719 0.000000 -vt 0.016297 -1.199821 0.000000 -vt 0.013774 -1.210080 0.000000 -vt 0.348080 -1.024523 0.000000 -vt 0.319165 -1.022663 0.000000 -vt 0.033010 -1.160599 0.000000 -vt 0.260733 -1.950420 0.000000 -vt 0.233243 -1.950001 0.000000 -vt 0.208695 -1.949359 0.000000 -vt 0.195127 -1.950757 0.000000 -vt 0.182990 -1.957152 0.000000 -vt 0.120822 -1.952549 0.000000 -vt 0.096126 -1.936267 0.000000 -vt 0.140709 -1.958533 0.000000 -vt 0.169969 -1.959657 0.000000 -vt 0.156460 -1.960757 0.000000 -vt 0.293100 -1.950645 0.000000 -vt 0.359930 -1.889976 0.000000 -vt 0.333715 -1.924665 0.000000 -vt 0.484939 -1.764766 0.000000 -vt 0.451799 -1.796255 0.000000 -vt 0.407990 -1.832045 0.000000 -vt 0.234038 -1.868948 0.000000 -vt 0.211308 -1.866613 0.000000 -vt 0.198514 -1.866995 0.000000 -vt 0.099355 -1.859057 0.000000 -vt 0.122468 -1.870368 0.000000 -vt 0.186004 -1.877387 0.000000 -vt 0.143675 -1.878700 0.000000 -vt 0.174147 -1.881484 0.000000 -vt 0.160737 -1.883707 0.000000 -vt 0.523130 -1.727958 0.000000 -vt 0.565493 -1.688779 0.000000 -vt 0.259929 -1.869781 0.000000 -vt 0.352880 -1.832436 0.000000 -vt 0.331150 -1.853282 0.000000 -vt 0.291954 -1.870933 0.000000 -vt 0.077818 -1.846440 0.000000 -vt 0.076698 -1.846472 0.000000 -vt 0.448065 -1.744627 0.000000 -vt 0.403141 -1.766137 0.000000 -vt 0.202177 -1.796154 0.000000 -vt 0.213262 -1.800647 0.000000 -vt 0.521043 -1.687670 0.000000 -vt 0.481099 -1.718217 0.000000 -vt 0.550246 -1.668446 0.000000 -vt 0.567156 -1.655750 0.000000 -vt 0.624892 -1.544292 0.000000 -vt 0.614383 -1.573015 0.000000 -vt 0.593163 -1.619743 0.000000 -vt 0.233934 -1.802528 0.000000 -vt 0.259479 -1.805235 0.000000 -vt 0.292136 -1.805387 0.000000 -vt 0.330784 -1.790482 0.000000 -vt 0.354816 -1.769112 0.000000 -vt 0.571951 -1.200272 0.000000 -vt 0.575188 -1.143112 0.000000 -vt 0.581368 -1.103683 0.000000 -vt 0.571920 -1.249089 0.000000 -vt 0.576627 -1.517915 0.000000 -vt 0.572597 -1.317291 0.000000 -vt 0.574373 -1.381397 0.000000 -vt 0.576874 -1.451439 0.000000 -vt 0.521139 -1.479678 0.000000 -vt 0.561584 -1.461517 0.000000 -vt 0.048964 -1.306560 0.000000 -vt 0.034646 -1.278434 0.000000 -vt 0.065731 -1.319089 0.000000 -vt 0.085832 -1.330440 0.000000 -vt 0.011088 -1.344768 0.000000 -vt 0.023361 -1.285007 0.000000 -vt 0.024648 -1.272536 0.000000 -vt 0.674511 -1.027898 0.000000 -vt 0.678820 -1.009259 0.000000 -vt 0.378951 -1.024313 0.000000 -vt 0.859635 -1.293746 0.000000 -vt 0.375807 -1.042459 0.000000 -vt 0.846082 -1.279830 0.000000 -vt 0.833964 -1.263142 0.000000 -vt 0.757231 -1.165470 0.000000 -vt 0.819302 -1.241744 0.000000 -vt 0.720297 -1.120635 0.000000 -vt 0.671773 -1.034402 0.000000 -vt 0.685582 -1.067610 0.000000 -vt 0.792220 -1.205316 0.000000 -vt 0.765387 -1.174783 0.000000 -vt 0.761309 -1.170126 0.000000 -vt 0.679177 -1.052589 0.000000 -vt 0.889036 -1.724908 0.000000 -vt 0.767637 -1.361305 0.000000 -vt 0.771382 -1.418987 0.000000 -vt 0.778458 -1.593253 0.000000 -vt 0.771394 -1.548813 0.000000 -vt 0.772004 -1.489779 0.000000 -vt 0.761361 -1.302586 0.000000 -vt 0.811651 -1.393472 0.000000 -vt 0.811706 -1.439605 0.000000 -vt 0.807564 -1.345510 0.000000 -vt 0.806660 -1.501703 0.000000 -vt 0.797993 -1.498292 0.000000 -vt 0.800857 -1.435050 0.000000 -vt 0.799380 -1.385488 0.000000 -vt 0.794125 -1.335326 0.000000 -vt 0.797259 -1.301884 0.000000 -vt 0.797468 -1.283968 0.000000 -vt 0.928462 -1.575369 0.000000 -vt 0.871646 -1.413785 0.000000 -vt 0.907476 -1.419315 0.000000 -vt 0.913659 -1.215684 0.000000 -vt 0.926268 -1.229521 0.000000 -vt 0.954557 -1.305127 0.000000 -vt 0.973483 -1.325801 0.000000 -vt 0.904249 -1.452185 0.000000 -vt 0.870256 -1.429556 0.000000 -vt 0.928509 -1.496037 0.000000 -vt 0.894454 -1.508035 0.000000 -vt 0.863649 -1.476700 0.000000 -vt 0.934410 -1.465370 0.000000 -vt 0.912573 -1.573260 0.000000 -vt 0.885187 -1.545414 0.000000 -vt 0.855529 -1.521919 0.000000 -vt 0.956865 -1.117890 0.000000 -vt 0.945665 -1.106115 0.000000 -vt 0.954648 -1.081197 0.000000 -vt 0.982371 -1.124458 0.000000 -vt 0.960856 -1.104486 0.000000 -vt 0.950011 -1.092956 0.000000 -vt 0.988369 -1.088922 0.000000 -vt 0.969733 -1.073515 0.000000 -vt 0.962069 -1.062375 0.000000 -vt 0.974125 -1.057857 0.000000 -vt 0.990135 -1.046771 0.000000 -vt 0.976206 -1.027821 0.000000 -vt 0.997512 -1.047169 0.000000 -vt 0.971877 -1.038151 0.000000 -vt 0.977193 -1.046921 0.000000 -vt 0.991231 -1.056120 0.000000 -vt 0.994896 -1.059882 0.000000 -vt 0.997059 -1.039486 0.000000 -vt 0.992483 -1.034211 0.000000 -vt 0.989514 -1.025232 0.000000 -vt 0.836432 -1.350933 0.000000 -vt 0.785107 -1.310230 0.000000 -vt 0.708884 -1.231020 0.000000 -vt 0.736097 -1.254859 0.000000 -vt 0.873199 -1.359015 0.000000 -vt 0.906944 -1.339919 0.000000 -vt 0.933443 -1.304358 0.000000 -vt 0.947381 -1.230289 0.000000 -vt 0.974927 -1.099063 0.000000 -vt 0.721071 -1.241002 0.000000 -vt 0.757955 -1.277372 0.000000 -vt 0.812719 -1.332171 0.000000 -vt 0.795692 -1.318605 0.000000 -vt 0.940412 -1.267324 0.000000 -vt 0.967976 -1.130906 0.000000 -vt 0.971614 -1.114472 0.000000 -vt 0.979051 -1.081219 0.000000 -vt 0.983226 -1.061663 0.000000 -vt 0.985198 -1.041378 0.000000 -vt 0.988333 -1.034784 0.000000 -vt 0.984212 -1.051520 0.000000 -vt 0.990998 -1.029721 0.000000 -vt 0.638937 -1.211467 0.000000 -vt 0.666181 -1.214113 0.000000 -vt 0.554908 -1.163305 0.000000 -vt 0.515201 -1.142310 0.000000 -vt 0.592231 -1.180079 0.000000 -vt 0.615982 -1.196080 0.000000 -vt 0.688108 -1.215248 0.000000 -vt 0.477426 -1.124892 0.000000 -vt 0.573570 -1.171692 0.000000 -vt 0.707730 -1.302733 0.000000 -vt 0.713452 -1.364890 0.000000 -vt 0.717610 -1.461324 0.000000 -vt 0.724434 -1.533291 0.000000 -vt 0.730107 -1.574776 0.000000 -vt 0.702600 -1.249041 0.000000 -vt 0.694392 -1.197227 0.000000 -vt 0.688126 -1.160658 0.000000 -vt 0.698496 -1.223134 0.000000 -vt 0.676805 -1.106695 0.000000 -vt 0.677229 -1.156718 0.000000 -vt 0.724786 -1.320812 0.000000 -vt 0.741705 -1.545715 0.000000 -vt 0.719869 -1.262406 0.000000 -vt 0.710086 -1.209616 0.000000 -vt 0.702370 -1.172056 0.000000 -vt 0.730427 -1.383332 0.000000 -vt 0.735003 -1.473580 0.000000 -vt 0.714978 -1.236011 0.000000 -vt 0.780825 -1.603251 0.000000 -vt 0.675443 -1.125766 0.000000 -vt 0.690262 -1.134125 0.000000 -vt 0.702688 -1.145454 0.000000 -vt 0.706811 -1.141266 0.000000 -vt 0.682465 -1.133677 0.000000 -vt 0.694748 -1.137451 0.000000 -vt 0.690510 -1.118213 0.000000 -vt 0.686821 -1.112411 0.000000 -vt 0.690476 -1.107204 0.000000 -vt 0.688368 -1.108490 0.000000 -vt 0.685445 -1.147878 0.000000 -vt 0.692950 -1.151085 0.000000 -vt 0.698345 -1.153784 0.000000 -vt 0.705516 -1.158965 0.000000 -vt 0.712188 -1.154787 0.000000 -vt 0.856146 -1.518482 0.000000 -vt 0.886711 -1.539266 0.000000 -vt 0.914676 -1.563807 0.000000 -vt 0.994829 -1.028880 0.000000 -vt 0.993432 -1.024969 0.000000 -vt 0.992080 -1.021143 0.000000 -vt 0.120468 -1.257224 0.000000 -vt 0.118578 -1.217008 0.000000 -vt 0.119299 -1.164057 0.000000 -vt 0.119907 -1.114432 0.000000 -vt 0.118559 -1.029198 0.000000 -vt 0.119942 -1.070409 0.000000 -vt 0.119250 -1.049803 0.000000 -vt 0.101191 -1.292050 0.000000 -vt 0.088795 -1.278592 0.000000 -vt 0.069162 -1.266123 0.000000 -vt 0.035974 -1.239597 0.000000 -vt 0.027318 -1.234011 0.000000 -vt 0.051185 -1.253117 0.000000 -vt 0.019732 -1.233324 0.000000 -vt 0.005303 -1.230312 0.000000 -vt 0.012518 -1.231818 0.000000 -vt 0.071053 -1.482288 0.000000 -vt 0.067760 -1.488510 0.000000 -vt 0.064469 -1.494733 0.000000 -vt 0.079635 -1.463732 0.000000 -vt 0.089061 -1.437284 0.000000 -vt 0.095741 -1.410493 0.000000 -vt 0.102130 -1.380942 0.000000 -vt 0.110278 -1.351714 0.000000 -vt 0.068755 -1.481037 0.000000 -vt 0.077341 -1.462257 0.000000 -vt 0.086471 -1.434701 0.000000 -vt 0.092825 -1.407693 0.000000 -vt 0.065600 -1.487176 0.000000 -vt 0.062445 -1.493315 0.000000 -vt 0.099062 -1.377749 0.000000 -vt 0.107505 -1.348477 0.000000 -vt 0.111931 -1.330433 0.000000 -vt 0.055953 -1.489773 0.000000 -vt 0.058737 -1.483498 0.000000 -vt 0.061520 -1.477222 0.000000 -vt 0.069541 -1.457127 0.000000 -vt 0.077186 -1.426308 0.000000 -vt 0.083008 -1.397959 0.000000 -vt 0.090103 -1.366326 0.000000 -vt 0.101091 -1.212062 0.000000 -vt 0.102312 -1.160848 0.000000 -vt 0.102496 -1.034827 0.000000 -vt 0.103685 -1.070795 0.000000 -vt 0.103434 -1.112412 0.000000 -vt 0.103091 -1.052811 0.000000 -vt 0.095860 -1.338803 0.000000 -vt 0.088640 -1.474022 0.000000 -vt 0.079320 -1.491444 0.000000 -vt 0.075355 -1.497833 0.000000 -vt 0.071392 -1.504221 0.000000 -vt 0.099482 -1.452224 0.000000 -vt 0.107753 -1.429019 0.000000 -vt 0.114567 -1.396402 0.000000 -vt 0.121635 -1.355956 0.000000 -vt 0.109858 -1.677215 0.000000 -vt 0.113534 -1.638832 0.000000 -vt 0.117994 -1.608641 0.000000 -vt 0.123510 -1.583159 0.000000 -vt 0.120848 -1.596052 0.000000 -vt 0.124744 -1.558508 0.000000 -vt 0.125575 -1.533053 0.000000 -vt 0.033584 -1.881386 0.000000 -vt 0.027431 -1.851104 0.000000 -vt 0.025444 -1.851157 0.000000 -vt 0.025657 -1.841912 0.000000 -vt 0.013632 -1.793564 0.000000 -vt 0.011710 -1.773428 0.000000 -vt 0.912948 -1.994485 0.000000 -vt 0.979932 -1.936245 0.000000 -vt 0.935363 -1.964203 0.000000 -vt 0.020457 -1.812779 0.000000 -vt 0.049145 -1.789672 0.000000 -vt 0.040765 -1.780266 0.000000 -vt 0.042483 -1.783894 0.000000 -vt 0.035166 -1.763071 0.000000 -vt 0.029234 -1.753252 0.000000 -vt 0.030113 -1.724352 0.000000 -vt 0.029130 -1.707231 0.000000 -vt 0.907027 -1.953635 0.000000 -vt 0.036702 -1.684266 0.000000 -vt 0.907516 -1.937442 0.000000 -vt 0.928244 -1.945391 0.000000 -vt 0.043914 -1.676582 0.000000 -vt 0.058879 -1.662701 0.000000 -vt 0.055413 -1.665854 0.000000 -vt 0.055799 -1.664262 0.000000 -vt 0.058746 -1.642169 0.000000 -vt 0.062480 -1.617383 0.000000 -vt 0.062894 -1.599573 0.000000 -vt 0.063354 -1.591873 0.000000 -vt 0.049758 -1.628381 0.000000 -vt 0.905602 -1.894651 0.000000 -vt 0.045916 -1.647860 0.000000 -vt 0.906679 -1.910013 0.000000 -vt 0.927424 -1.916396 0.000000 -vt 0.961451 -1.900387 0.000000 -vt 0.927849 -1.931424 0.000000 -vt 0.966270 -1.912741 0.000000 -vt 0.053609 -1.493723 0.000000 -vt 0.051344 -1.497695 0.000000 -vt 0.055042 -1.512336 0.000000 -vt 0.051441 -1.519049 0.000000 -vt 0.902709 -1.749253 0.000000 -vt 0.931941 -1.737513 0.000000 -vt 0.972592 -1.789377 0.000000 -vt 0.060187 -1.497615 0.000000 -vt 0.058115 -1.502089 0.000000 -vt 0.061816 -1.498860 0.000000 -vt 0.059229 -1.503019 0.000000 -vt 0.068324 -1.508463 0.000000 -vt 0.065321 -1.512809 0.000000 -vt 0.061716 -1.519164 0.000000 -vt 0.061720 -1.519135 0.000000 -vt 0.063152 -1.506295 0.000000 -vt 0.031523 -1.488273 0.000000 -vt 0.021811 -1.482606 0.000000 -vt 0.012710 -1.475196 0.000000 -vt 0.008406 -1.468437 0.000000 -vt 0.007803 -1.472111 0.000000 -vt 0.007104 -1.476348 0.000000 -vt 0.007521 -1.487368 0.000000 -vt 0.008168 -1.498328 0.000000 -vt 0.926051 -1.669974 0.000000 -vt 0.956645 -1.685330 0.000000 -vt 0.684547 -1.475559 0.000000 -vt 0.709785 -1.487721 0.000000 -vt 0.648129 -1.498595 0.000000 -vt 0.732258 -1.506894 0.000000 -vt 0.786757 -1.520682 0.000000 -vt 0.822502 -1.529621 0.000000 -vt 0.756642 -1.517909 0.000000 -vt 0.844893 -1.565603 0.000000 -vt 0.863752 -1.621635 0.000000 -vt 0.875424 -1.688825 0.000000 -vt 0.744450 -1.512401 0.000000 -vt 0.877737 -1.729011 0.000000 -vt 0.771699 -1.519295 0.000000 -vt 0.808035 -1.518306 0.000000 -vt 0.797195 -1.516649 0.000000 -vt 0.721022 -1.497308 0.000000 -vt 0.738354 -1.509648 0.000000 -vt 0.769727 -1.613245 0.000000 -vt 0.782013 -1.641141 0.000000 -vt 0.772953 -1.631341 0.000000 -vt 0.781495 -1.624611 0.000000 -vt 0.785380 -1.623775 0.000000 -vt 0.785380 -1.623775 0.000000 -vt 0.781495 -1.624611 0.000000 -vt 0.756201 -1.595970 0.000000 -vt 0.758351 -1.610034 0.000000 -vt 0.765229 -1.638120 0.000000 -vt 0.771195 -1.659586 0.000000 -vt 0.773039 -1.662635 0.000000 -vt 0.776960 -1.676231 0.000000 -vt 0.780025 -1.651358 0.000000 -vt 0.778566 -1.676373 0.000000 -vt 0.783438 -1.624193 0.000000 -vt 0.746757 -1.591153 0.000000 -vt 0.781662 -1.425146 0.000000 -vt 0.777338 -1.547469 0.000000 -vt 0.772657 -1.315103 0.000000 -vt 0.770404 -1.272500 0.000000 -vt 0.770869 -1.250968 0.000000 -vt 0.779163 -1.370568 0.000000 -vt 0.783743 -1.588413 0.000000 -vt 0.781119 -1.492509 0.000000 -vt 0.771531 -1.293801 0.000000 -vt 0.785072 -1.603356 0.000000 -vt 0.779228 -1.519989 0.000000 -vt 0.783438 -1.624193 0.000000 -vt 0.783438 -1.624193 0.000000 -vt 0.781122 -1.651433 0.000000 -vt 0.779568 -1.676463 0.000000 -vt 0.572550 -1.095736 0.000000 -vt 0.556195 -1.681437 0.000000 -vt 0.561208 -1.642759 0.000000 -vt 0.565815 -1.593769 0.000000 -vt 0.557612 -1.697742 0.000000 -vt 0.558702 -1.662098 0.000000 -vt 0.562282 -1.197540 0.000000 -vt 0.566195 -1.137457 0.000000 -vt 0.561890 -1.247855 0.000000 -vt 0.569477 -1.529718 0.000000 -vt 0.562663 -1.316732 0.000000 -vt 0.565119 -1.381388 0.000000 -vt 0.569229 -1.456478 0.000000 -vt 0.564239 -1.167499 0.000000 -vt 0.027380 -1.862869 0.000000 -vt 0.743319 -1.589605 0.000000 -vt 0.911852 -1.672553 0.000000 -vt 0.684445 -1.057049 0.000000 -vt 0.689818 -1.064299 0.000000 -vt 0.693719 -1.072999 0.000000 -vt 0.690844 -1.075648 0.000000 -vt 0.682275 -1.059854 0.000000 -vt 0.028298 -1.866741 0.000000 -vt 0.027655 -1.861896 0.000000 -vt 0.743703 -1.590411 0.000000 -vt 0.748650 -1.607294 0.000000 -vt 0.748289 -1.606488 0.000000 -vt 0.446752 -1.715340 0.000000 -vt 0.403717 -1.731732 0.000000 -vt 0.406444 -1.674046 0.000000 -vt 0.446338 -1.654965 0.000000 -vt 0.448065 -1.744627 0.000000 -vt 0.403141 -1.766137 0.000000 -vt 0.482736 -1.745417 0.000000 -vt 0.449378 -1.773914 0.000000 -vt 0.481099 -1.718217 0.000000 -vt 0.484939 -1.764766 0.000000 -vt 0.451799 -1.796255 0.000000 -vt 0.525027 -1.744065 0.000000 -vt 0.487142 -1.784114 0.000000 -vt 0.523130 -1.727958 0.000000 -vt 0.294060 -1.998123 0.000000 -vt 0.261291 -1.998123 0.000000 -vt 0.260733 -1.950420 0.000000 -vt 0.293100 -1.950645 0.000000 -vt 0.402566 -1.800541 0.000000 -vt 0.407990 -1.832045 0.000000 -vt 0.212716 -1.832632 0.000000 -vt 0.234681 -1.836018 0.000000 -vt 0.234038 -1.868948 0.000000 -vt 0.211308 -1.866613 0.000000 -vt 0.260174 -1.902717 0.000000 -vt 0.233395 -1.901878 0.000000 -vt 0.259929 -1.869781 0.000000 -vt 0.233243 -1.950001 0.000000 -vt 0.207490 -1.998123 0.000000 -vt 0.208695 -1.949359 0.000000 -vt 0.233092 -1.998123 0.000000 -vt 0.200128 -1.830599 0.000000 -vt 0.202177 -1.796154 0.000000 -vt 0.213262 -1.800647 0.000000 -vt 0.198514 -1.866995 0.000000 -vt 0.196899 -1.903391 0.000000 -vt 0.209900 -1.900594 0.000000 -vt 0.195127 -1.950757 0.000000 -vt 0.193355 -1.998123 0.000000 -vt 0.181675 -1.998123 0.000000 -vt 0.182990 -1.957152 0.000000 -vt 0.119529 -1.906975 0.000000 -vt 0.120822 -1.952549 0.000000 -vt 0.096126 -1.936267 0.000000 -vt 0.095799 -1.893192 0.000000 -vt 0.076566 -1.916809 0.000000 -vt 0.075643 -1.880779 0.000000 -vt 0.020457 -1.812779 0.000000 -vt 0.017825 -1.821418 0.000000 -vt 0.011290 -1.799756 0.000000 -vt 0.013632 -1.793564 0.000000 -vt 0.027396 -1.785532 0.000000 -vt 0.023777 -1.801886 0.000000 -vt 0.015974 -1.787372 0.000000 -vt 0.020882 -1.767666 0.000000 -vt 0.048154 -1.689095 0.000000 -vt 0.042312 -1.717822 0.000000 -vt 0.038954 -1.694980 0.000000 -vt 0.043914 -1.676582 0.000000 -vt 0.037770 -1.745502 0.000000 -vt 0.030113 -1.724352 0.000000 -vt 0.026146 -1.737531 0.000000 -vt 0.029234 -1.753252 0.000000 -vt 0.014673 -1.763152 0.000000 -vt 0.011710 -1.773428 0.000000 -vt 0.047642 -1.721780 0.000000 -vt 0.043389 -1.752899 0.000000 -vt 0.040662 -1.895972 0.000000 -vt 0.033584 -1.881386 0.000000 -vt 0.031305 -1.850318 0.000000 -vt 0.042193 -1.871274 0.000000 -vt 0.058582 -1.925624 0.000000 -vt 0.058445 -1.895681 0.000000 -vt 0.079779 -1.956599 0.000000 -vt 0.059784 -1.865820 0.000000 -vt 0.062982 -1.836631 0.000000 -vt 0.076698 -1.846472 0.000000 -vt 0.077691 -1.847184 0.000000 -vt 0.051095 -1.823497 0.000000 -vt 0.045238 -1.846102 0.000000 -vt 0.055767 -1.796061 0.000000 -vt 0.067845 -1.805737 0.000000 -vt 0.049145 -1.789672 0.000000 -vt 0.040757 -1.808938 0.000000 -vt 0.051101 -1.759935 0.000000 -vt 0.061013 -1.766202 0.000000 -vt 0.056688 -1.727679 0.000000 -vt 0.054948 -1.692947 0.000000 -vt 0.063452 -1.695331 0.000000 -vt 0.061178 -1.665146 0.000000 -vt 0.069144 -1.663610 0.000000 -vt 0.035047 -1.828789 0.000000 -vt 0.032866 -1.796256 0.000000 -vt 0.028504 -1.814632 0.000000 -vt 0.027431 -1.851104 0.000000 -vt 0.075563 -1.699664 0.000000 -vt 0.067490 -1.733082 0.000000 -vt 0.073683 -1.773260 0.000000 -vt 0.083082 -1.815702 0.000000 -vt 0.077818 -1.846440 0.000000 -vt 0.102912 -1.824921 0.000000 -vt 0.099355 -1.859057 0.000000 -vt 0.090330 -1.781697 0.000000 -vt 0.110892 -1.788463 0.000000 -vt 0.097411 -1.747905 0.000000 -vt 0.118027 -1.742299 0.000000 -vt 0.105760 -1.716434 0.000000 -vt 0.089610 -1.705625 0.000000 -vt 0.081150 -1.740666 0.000000 -vt 0.082223 -1.664710 0.000000 -vt 0.097597 -1.668863 0.000000 -vt 0.109858 -1.677215 0.000000 -vt 0.121155 -1.684910 0.000000 -vt 0.143720 -1.690302 0.000000 -vt 0.139482 -1.742248 0.000000 -vt 0.122468 -1.870368 0.000000 -vt 0.125406 -1.833760 0.000000 -vt 0.132669 -1.790749 0.000000 -vt 0.155805 -1.744368 0.000000 -vt 0.161322 -1.687738 0.000000 -vt 0.170196 -1.741237 0.000000 -vt 0.174723 -1.690471 0.000000 -vt 0.181658 -1.742250 0.000000 -vt 0.186903 -1.696989 0.000000 -vt 0.192653 -1.751974 0.000000 -vt 0.197694 -1.705134 0.000000 -vt 0.189831 -1.791338 0.000000 -vt 0.179061 -1.788542 0.000000 -vt 0.204227 -1.761708 0.000000 -vt 0.190461 -1.656656 0.000000 -vt 0.200662 -1.658381 0.000000 -vt 0.207223 -1.704071 0.000000 -vt 0.184304 -1.916180 0.000000 -vt 0.186004 -1.877387 0.000000 -vt 0.187704 -1.838594 0.000000 -vt 0.176877 -1.841777 0.000000 -vt 0.167131 -1.791695 0.000000 -vt 0.151598 -1.793337 0.000000 -vt 0.146040 -1.838457 0.000000 -vt 0.143675 -1.878700 0.000000 -vt 0.141310 -1.918942 0.000000 -vt 0.122115 -1.998123 0.000000 -vt 0.140709 -1.958533 0.000000 -vt 0.140107 -1.998123 0.000000 -vt 0.168522 -1.998123 0.000000 -vt 0.169969 -1.959657 0.000000 -vt 0.171416 -1.921191 0.000000 -vt 0.174147 -1.881484 0.000000 -vt 0.163360 -1.844024 0.000000 -vt 0.160737 -1.883707 0.000000 -vt 0.158115 -1.923390 0.000000 -vt 0.156460 -1.960757 0.000000 -vt 0.154804 -1.998123 0.000000 -vt 0.662816 -1.174689 0.000000 -vt 0.664387 -1.192741 0.000000 -vt 0.639267 -1.188892 0.000000 -vt 0.640050 -1.162971 0.000000 -vt 0.617705 -1.144318 0.000000 -vt 0.615889 -1.171577 0.000000 -vt 0.599003 -1.119578 0.000000 -vt 0.593173 -1.154422 0.000000 -vt 0.638937 -1.211467 0.000000 -vt 0.615982 -1.196080 0.000000 -vt 0.638607 -1.234041 0.000000 -vt 0.666181 -1.214113 0.000000 -vt 0.667975 -1.235484 0.000000 -vt 0.688108 -1.215248 0.000000 -vt 0.691630 -1.240725 0.000000 -vt 0.684586 -1.189772 0.000000 -vt 0.673988 -1.159874 0.000000 -vt 0.688807 -1.513222 0.000000 -vt 0.695542 -1.554549 0.000000 -vt 0.666089 -1.571621 0.000000 -vt 0.658095 -1.531948 0.000000 -vt 0.713097 -1.522795 0.000000 -vt 0.717034 -1.557598 0.000000 -vt 0.385126 -1.918928 0.000000 -vt 0.387647 -1.921755 0.000000 -vt 0.403322 -1.938097 0.000000 -vt 0.402613 -1.943667 0.000000 -vt 0.388820 -1.906694 0.000000 -vt 0.386453 -1.907733 0.000000 -vt 0.381982 -1.906575 0.000000 -vt 0.403451 -1.902720 0.000000 -vt 0.402483 -1.908047 0.000000 -vt 0.001306 -1.494628 0.000000 -vt 0.001824 -1.483959 0.000000 -vt 0.007521 -1.487368 0.000000 -vt 0.008168 -1.498328 0.000000 -vt 0.016637 -1.502894 0.000000 -vt 0.016832 -1.492939 0.000000 -vt 0.033586 -1.499729 0.000000 -vt 0.031878 -1.507013 0.000000 -vt 0.048688 -1.504969 0.000000 -vt 0.045574 -1.511990 0.000000 -vt 0.002341 -1.473290 0.000000 -vt 0.007104 -1.476348 0.000000 -vt 0.012510 -1.479819 0.000000 -vt 0.021542 -1.486149 0.000000 -vt 0.031137 -1.491360 0.000000 -vt 0.039453 -1.493529 0.000000 -vt 0.047788 -1.495727 0.000000 -vt 0.055816 -1.500169 0.000000 -vt 0.058115 -1.502089 0.000000 -vt 0.055042 -1.512336 0.000000 -vt 0.067817 -1.520307 0.000000 -vt 0.071043 -1.515590 0.000000 -vt 0.072679 -1.535981 0.000000 -vt 0.068938 -1.540070 0.000000 -vt 0.065321 -1.512809 0.000000 -vt 0.063152 -1.506295 0.000000 -vt 0.065833 -1.501933 0.000000 -vt 0.068324 -1.508463 0.000000 -vt 0.058119 -1.496033 0.000000 -vt 0.060187 -1.497615 0.000000 -vt 0.051344 -1.497695 0.000000 -vt 0.049636 -1.491689 0.000000 -vt 0.053609 -1.493723 0.000000 -vt 0.040920 -1.488740 0.000000 -vt 0.031523 -1.488273 0.000000 -vt 0.031931 -1.485008 0.000000 -vt 0.042387 -1.483950 0.000000 -vt 0.021811 -1.482606 0.000000 -vt 0.022099 -1.478823 0.000000 -vt 0.012710 -1.475196 0.000000 -vt 0.012861 -1.471720 0.000000 -vt 0.007803 -1.472111 0.000000 -vt 0.002779 -1.464289 0.000000 -vt 0.008406 -1.468437 0.000000 -vt 0.051485 -1.487650 0.000000 -vt 0.055953 -1.489773 0.000000 -vt 0.063440 -1.485841 0.000000 -vt 0.060422 -1.491896 0.000000 -vt 0.058737 -1.483498 0.000000 -vt 0.054034 -1.481154 0.000000 -vt 0.044253 -1.476796 0.000000 -vt 0.066457 -1.479787 0.000000 -vt 0.061520 -1.477222 0.000000 -vt 0.068755 -1.481037 0.000000 -vt 0.065600 -1.487176 0.000000 -vt 0.062445 -1.493315 0.000000 -vt 0.023664 -1.461783 0.000000 -vt 0.034001 -1.470381 0.000000 -vt 0.056583 -1.474657 0.000000 -vt 0.046119 -1.469642 0.000000 -vt 0.075047 -1.460783 0.000000 -vt 0.069541 -1.457127 0.000000 -vt 0.077341 -1.462257 0.000000 -vt 0.075648 -1.484789 0.000000 -vt 0.084222 -1.466680 0.000000 -vt 0.088640 -1.474022 0.000000 -vt 0.079320 -1.491444 0.000000 -vt 0.072081 -1.491180 0.000000 -vt 0.075355 -1.497833 0.000000 -vt 0.068515 -1.497570 0.000000 -vt 0.071392 -1.504221 0.000000 -vt 0.074269 -1.510873 0.000000 -vt 0.078630 -1.504486 0.000000 -vt 0.081322 -1.526890 0.000000 -vt 0.076420 -1.531893 0.000000 -vt 0.014062 -1.452431 0.000000 -vt 0.035279 -1.462105 0.000000 -vt 0.064034 -1.453471 0.000000 -vt 0.050634 -1.445945 0.000000 -vt 0.083881 -1.432119 0.000000 -vt 0.077186 -1.426308 0.000000 -vt 0.079635 -1.463732 0.000000 -vt 0.089061 -1.437284 0.000000 -vt 0.094242 -1.442449 0.000000 -vt 0.093058 -1.481364 0.000000 -vt 0.099482 -1.452224 0.000000 -vt 0.104722 -1.461998 0.000000 -vt 0.113933 -1.441943 0.000000 -vt 0.107753 -1.429019 0.000000 -vt 0.120869 -1.405478 0.000000 -vt 0.114567 -1.396402 0.000000 -vt 0.101572 -1.416095 0.000000 -vt 0.095741 -1.410493 0.000000 -vt 0.024672 -1.452069 0.000000 -vt 0.038916 -1.434224 0.000000 -vt 0.070492 -1.420497 0.000000 -vt 0.055746 -1.408106 0.000000 -vt 0.089909 -1.404892 0.000000 -vt 0.083008 -1.397959 0.000000 -vt 0.108264 -1.387326 0.000000 -vt 0.102130 -1.380942 0.000000 -vt 0.121635 -1.355956 0.000000 -vt 0.128450 -1.327870 0.000000 -vt 0.133371 -1.368011 0.000000 -vt 0.121635 -1.355956 0.000000 -vt 0.140453 -1.312477 0.000000 -vt 0.130270 -1.284333 0.000000 -vt 0.123260 -1.314045 0.000000 -vt 0.125074 -1.294381 0.000000 -vt 0.120629 -1.330894 0.000000 -vt 0.115823 -1.358186 0.000000 -vt 0.118006 -1.338238 0.000000 -vt 0.110278 -1.351714 0.000000 -vt 0.095995 -1.374557 0.000000 -vt 0.090103 -1.366326 0.000000 -vt 0.076107 -1.391026 0.000000 -vt 0.060254 -1.379239 0.000000 -vt 0.042180 -1.397203 0.000000 -vt 0.027536 -1.421293 0.000000 -vt 0.014910 -1.441240 0.000000 -vt 0.003609 -1.442902 0.000000 -vt 0.008836 -1.447666 0.000000 -vt 0.114893 -1.336146 0.000000 -vt 0.044757 -1.368741 0.000000 -vt 0.084211 -1.358095 0.000000 -vt 0.063716 -1.350995 0.000000 -vt 0.085832 -1.330440 0.000000 -vt 0.095860 -1.338803 0.000000 -vt 0.110670 -1.319893 0.000000 -vt 0.104732 -1.345241 0.000000 -vt 0.098229 -1.340779 0.000000 -vt 0.099334 -1.311112 0.000000 -vt 0.103048 -1.272988 0.000000 -vt 0.101191 -1.292050 0.000000 -vt 0.088795 -1.278592 0.000000 -vt 0.090138 -1.254400 0.000000 -vt 0.112500 -1.301316 0.000000 -vt 0.113653 -1.255250 0.000000 -vt 0.119308 -1.277911 0.000000 -vt 0.115789 -1.286087 0.000000 -vt 0.116179 -1.288260 0.000000 -vt 0.113731 -1.300853 0.000000 -vt 0.126537 -1.258982 0.000000 -vt 0.124699 -1.282167 0.000000 -vt 0.121992 -1.276810 0.000000 -vt 0.120468 -1.257224 0.000000 -vt 0.139931 -1.240379 0.000000 -vt 0.126586 -1.219639 0.000000 -vt 0.118578 -1.217008 0.000000 -vt 0.091612 -1.209746 0.000000 -vt 0.101091 -1.212062 0.000000 -vt 0.070577 -1.245063 0.000000 -vt 0.069162 -1.266123 0.000000 -vt 0.051185 -1.253117 0.000000 -vt 0.052167 -1.234462 0.000000 -vt 0.047724 -1.341348 0.000000 -vt 0.048964 -1.306560 0.000000 -vt 0.065731 -1.319089 0.000000 -vt 0.034241 -1.298772 0.000000 -vt 0.034646 -1.278434 0.000000 -vt 0.023361 -1.285007 0.000000 -vt 0.024648 -1.272536 0.000000 -vt 0.036896 -1.221098 0.000000 -vt 0.035974 -1.239597 0.000000 -vt 0.027318 -1.234011 0.000000 -vt 0.028179 -1.215820 0.000000 -vt 0.152071 -1.261056 0.000000 -vt 0.111573 -1.161777 0.000000 -vt 0.110570 -1.214377 0.000000 -vt 0.102312 -1.160848 0.000000 -vt 0.119299 -1.164057 0.000000 -vt 0.127024 -1.166337 0.000000 -vt 0.140947 -1.178433 0.000000 -vt 0.155540 -1.193876 0.000000 -vt 0.170856 -1.207144 0.000000 -vt 0.169460 -1.294361 0.000000 -vt 0.191290 -1.278710 0.000000 -vt 0.190500 -1.203792 0.000000 -vt 0.227577 -1.193990 0.000000 -vt 0.209284 -1.199004 0.000000 -vt 0.208394 -1.129267 0.000000 -vt 0.227158 -1.123879 0.000000 -vt 0.189630 -1.133489 0.000000 -vt 0.210185 -1.269703 0.000000 -vt 0.171244 -1.139303 0.000000 -vt 0.155456 -1.130928 0.000000 -vt 0.141114 -1.122312 0.000000 -vt 0.127278 -1.115911 0.000000 -vt 0.112536 -1.112953 0.000000 -vt 0.119907 -1.114432 0.000000 -vt 0.103434 -1.112412 0.000000 -vt 0.093050 -1.159920 0.000000 -vt 0.072386 -1.204922 0.000000 -vt 0.074341 -1.161384 0.000000 -vt 0.170022 -1.078906 0.000000 -vt 0.187676 -1.070359 0.000000 -vt 0.206477 -1.065513 0.000000 -vt 0.140948 -1.072335 0.000000 -vt 0.127177 -1.070554 0.000000 -vt 0.126570 -1.048028 0.000000 -vt 0.140492 -1.045681 0.000000 -vt 0.154673 -1.075328 0.000000 -vt 0.154193 -1.042975 0.000000 -vt 0.169102 -1.043159 0.000000 -vt 0.186471 -1.036615 0.000000 -vt 0.205539 -1.034192 0.000000 -vt 0.225172 -1.031927 0.000000 -vt 0.225920 -1.060981 0.000000 -vt 0.246266 -1.186306 0.000000 -vt 0.246409 -1.116777 0.000000 -vt 0.246100 -1.257389 0.000000 -vt 0.228194 -1.264358 0.000000 -vt 0.264052 -1.251135 0.000000 -vt 0.264676 -1.179071 0.000000 -vt 0.261129 -1.349253 0.000000 -vt 0.245252 -1.354527 0.000000 -vt 0.245597 -1.056585 0.000000 -vt 0.244949 -1.029730 0.000000 -vt 0.040479 -1.183994 0.000000 -vt 0.032060 -1.181552 0.000000 -vt 0.033010 -1.160599 0.000000 -vt 0.045150 -1.151599 0.000000 -vt 0.033750 -1.143417 0.000000 -vt 0.049429 -1.131354 0.000000 -vt 0.028151 -1.114051 0.000000 -vt 0.030951 -1.128734 0.000000 -vt 0.025050 -1.152670 0.000000 -vt 0.021269 -1.141642 0.000000 -vt 0.045049 -1.109936 0.000000 -vt 0.043399 -1.097405 0.000000 -vt 0.059519 -1.093050 0.000000 -vt 0.058511 -1.079011 0.000000 -vt 0.076094 -1.076261 0.000000 -vt 0.075902 -1.060246 0.000000 -vt 0.094664 -1.071326 0.000000 -vt 0.094251 -1.054044 0.000000 -vt 0.112706 -1.070264 0.000000 -vt 0.103685 -1.070795 0.000000 -vt 0.103091 -1.052811 0.000000 -vt 0.111930 -1.051578 0.000000 -vt 0.119942 -1.070409 0.000000 -vt 0.119250 -1.049803 0.000000 -vt 0.059924 -1.125787 0.000000 -vt 0.075813 -1.117600 0.000000 -vt 0.094332 -1.111872 0.000000 -vt 0.058215 -1.159194 0.000000 -vt 0.054510 -1.196952 0.000000 -vt 0.525086 -1.044053 0.000000 -vt 0.563733 -1.087789 0.000000 -vt 0.557203 -1.131802 0.000000 -vt 0.516714 -1.104841 0.000000 -vt 0.591289 -1.205736 0.000000 -vt 0.571951 -1.200272 0.000000 -vt 0.573570 -1.171692 0.000000 -vt 0.592231 -1.180079 0.000000 -vt 0.554908 -1.163305 0.000000 -vt 0.515201 -1.142310 0.000000 -vt 0.575188 -1.143112 0.000000 -vt 0.581368 -1.103683 0.000000 -vt 0.616074 -1.220584 0.000000 -vt 0.265304 -1.110105 0.000000 -vt 0.280323 -1.245846 0.000000 -vt 0.281359 -1.173319 0.000000 -vt 0.294725 -1.240592 0.000000 -vt 0.296242 -1.169249 0.000000 -vt 0.281715 -1.104802 0.000000 -vt 0.296919 -1.100902 0.000000 -vt 0.281051 -1.044769 0.000000 -vt 0.296695 -1.042209 0.000000 -vt 0.299724 -1.002871 0.000000 -vt 0.296956 -1.022540 0.000000 -vt 0.280875 -1.023822 0.000000 -vt 0.280698 -1.002875 0.000000 -vt 0.264500 -1.050821 0.000000 -vt 0.263459 -1.002877 0.000000 -vt 0.263979 -1.026849 0.000000 -vt 0.244300 -1.002875 0.000000 -vt 0.004001 -1.430517 0.000000 -vt 0.009456 -1.435879 0.000000 -vt 0.016391 -1.409298 0.000000 -vt 0.029800 -1.381501 0.000000 -vt 0.004001 -1.399524 0.000000 -vt 0.010196 -1.404411 0.000000 -vt 0.017542 -1.368135 0.000000 -vt 0.031945 -1.335490 0.000000 -vt 0.004001 -1.366125 0.000000 -vt 0.010771 -1.367130 0.000000 -vt 0.018868 -1.319180 0.000000 -vt 0.011088 -1.344768 0.000000 -vt 0.004001 -1.284609 0.000000 -vt 0.004001 -1.275770 0.000000 -vt 0.011202 -1.272311 0.000000 -vt 0.011669 -1.282262 0.000000 -vt 0.019337 -1.279916 0.000000 -vt 0.011434 -1.320289 0.000000 -vt 0.018521 -1.252949 0.000000 -vt 0.018404 -1.268853 0.000000 -vt 0.011261 -1.253556 0.000000 -vt 0.019732 -1.233324 0.000000 -vt 0.026457 -1.252202 0.000000 -vt 0.020942 -1.213698 0.000000 -vt 0.012518 -1.231818 0.000000 -vt 0.013774 -1.210080 0.000000 -vt 0.015963 -1.164604 0.000000 -vt 0.020693 -1.172719 0.000000 -vt 0.025424 -1.180835 0.000000 -vt 0.016297 -1.199821 0.000000 -vt 0.994546 -1.852151 0.000000 -vt 0.958873 -1.893777 0.000000 -vt 0.961451 -1.900387 0.000000 -vt 0.970663 -1.924002 0.000000 -vt 0.979932 -1.936245 0.000000 -vt 0.942482 -1.983014 0.000000 -vt 0.989201 -1.948489 0.000000 -vt 0.935363 -1.964203 0.000000 -vt 0.956645 -1.685330 0.000000 -vt 0.931004 -1.666544 0.000000 -vt 0.926051 -1.669974 0.000000 -vt 0.956645 -1.685330 0.000000 -vt 0.254746 -1.428298 0.000000 -vt 0.239676 -1.435187 0.000000 -vt 0.227883 -1.359666 0.000000 -vt 0.225132 -1.441651 0.000000 -vt 0.234272 -1.489750 0.000000 -vt 0.222098 -1.496886 0.000000 -vt 0.218564 -1.551303 0.000000 -vt 0.229951 -1.542608 0.000000 -vt 0.206801 -1.556883 0.000000 -vt 0.208998 -1.503417 0.000000 -vt 0.203634 -1.608481 0.000000 -vt 0.214607 -1.604196 0.000000 -vt 0.193201 -1.609948 0.000000 -vt 0.195318 -1.560638 0.000000 -vt 0.210996 -1.655101 0.000000 -vt 0.213807 -1.768662 0.000000 -vt 0.216253 -1.700998 0.000000 -vt 0.233934 -1.802528 0.000000 -vt 0.196543 -1.510135 0.000000 -vt 0.211009 -1.448208 0.000000 -vt 0.211570 -1.365063 0.000000 -vt 0.197906 -1.454998 0.000000 -vt 0.196369 -1.376942 0.000000 -vt 0.227602 -1.598818 0.000000 -vt 0.219895 -1.652916 0.000000 -vt 0.121897 -1.328335 0.000000 -vt 0.124318 -1.315580 0.000000 -vt 0.378312 -1.060181 0.000000 -vt 0.372072 -1.102195 0.000000 -vt 0.345154 -1.089328 0.000000 -vt 0.347728 -1.046174 0.000000 -vt 0.371916 -1.147159 0.000000 -vt 0.343658 -1.154041 0.000000 -vt 0.415283 -1.143426 0.000000 -vt 0.416465 -1.096594 0.000000 -vt 0.413037 -1.205463 0.000000 -vt 0.372185 -1.212062 0.000000 -vt 0.344024 -1.223621 0.000000 -vt 0.318589 -1.098304 0.000000 -vt 0.317602 -1.165430 0.000000 -vt 0.318629 -1.042435 0.000000 -vt 0.348432 -1.002871 0.000000 -vt 0.348080 -1.024523 0.000000 -vt 0.319165 -1.022663 0.000000 -vt 0.319701 -1.002891 0.000000 -vt 0.443205 -1.151542 0.000000 -vt 0.442142 -1.210480 0.000000 -vt 0.415531 -1.294937 0.000000 -vt 0.442089 -1.300299 0.000000 -vt 0.374740 -1.302715 0.000000 -vt 0.416770 -1.381189 0.000000 -vt 0.374791 -1.385177 0.000000 -vt 0.443607 -1.443343 0.000000 -vt 0.416933 -1.439118 0.000000 -vt 0.442597 -1.386132 0.000000 -vt 0.470200 -1.218648 0.000000 -vt 0.470509 -1.306074 0.000000 -vt 0.471105 -1.159674 0.000000 -vt 0.513476 -1.234565 0.000000 -vt 0.513689 -1.179779 0.000000 -vt 0.551861 -1.246622 0.000000 -vt 0.552613 -1.194808 0.000000 -vt 0.591979 -1.251556 0.000000 -vt 0.571920 -1.249089 0.000000 -vt 0.617392 -1.264145 0.000000 -vt 0.640213 -1.276789 0.000000 -vt 0.561890 -1.247855 0.000000 -vt 0.562663 -1.316732 0.000000 -vt 0.552729 -1.316174 0.000000 -vt 0.618369 -1.325547 0.000000 -vt 0.592464 -1.318407 0.000000 -vt 0.644697 -1.331903 0.000000 -vt 0.676310 -1.342834 0.000000 -vt 0.670685 -1.285197 0.000000 -vt 0.680287 -1.437896 0.000000 -vt 0.648125 -1.395863 0.000000 -vt 0.706473 -1.452648 0.000000 -vt 0.703277 -1.354226 0.000000 -vt 0.684547 -1.475559 0.000000 -vt 0.709785 -1.487721 0.000000 -vt 0.697273 -1.291975 0.000000 -vt 0.618935 -1.386380 0.000000 -vt 0.592883 -1.381416 0.000000 -vt 0.638163 -1.465243 0.000000 -vt 0.648129 -1.498595 0.000000 -vt 0.614482 -1.445965 0.000000 -vt 0.677229 -1.156718 0.000000 -vt 0.688126 -1.160658 0.000000 -vt 0.694392 -1.197227 0.000000 -vt 0.674080 -1.144837 0.000000 -vt 0.685445 -1.147878 0.000000 -vt 0.676805 -1.106695 0.000000 -vt 0.684907 -1.100333 0.000000 -vt 0.686821 -1.112411 0.000000 -vt 0.676805 -1.106695 0.000000 -vt 0.476868 -1.634191 0.000000 -vt 0.479462 -1.691017 0.000000 -vt 0.447547 -1.607413 0.000000 -vt 0.475402 -1.584196 0.000000 -vt 0.447038 -1.552912 0.000000 -vt 0.476107 -1.541826 0.000000 -vt 0.446946 -1.501985 0.000000 -vt 0.475431 -1.499751 0.000000 -vt 0.473388 -1.444316 0.000000 -vt 0.471896 -1.388738 0.000000 -vt 0.514163 -1.313522 0.000000 -vt 0.520854 -1.663489 0.000000 -vt 0.521043 -1.687670 0.000000 -vt 0.523532 -1.610601 0.000000 -vt 0.524654 -1.567310 0.000000 -vt 0.522142 -1.507261 0.000000 -vt 0.521139 -1.479678 0.000000 -vt 0.517031 -1.390437 0.000000 -vt 0.519947 -1.446893 0.000000 -vt 0.549731 -1.706705 0.000000 -vt 0.409720 -1.620384 0.000000 -vt 0.414354 -1.561123 0.000000 -vt 0.415135 -1.503257 0.000000 -vt 0.583780 -1.705039 0.000000 -vt 0.574459 -1.739983 0.000000 -vt 0.572264 -1.735272 0.000000 -vt 0.581304 -1.706488 0.000000 -vt 0.566317 -1.717392 0.000000 -vt 0.577834 -1.695803 0.000000 -vt 0.585532 -1.692688 0.000000 -vt 0.401941 -1.914162 0.000000 -vt 0.387381 -1.910405 0.000000 -vt 0.122201 -1.281286 0.000000 -vt 0.119551 -1.281017 0.000000 -vt 0.125604 -1.299490 0.000000 -vt 0.124666 -1.286551 0.000000 -vt 0.118890 -1.334722 0.000000 -vt 0.112348 -1.316229 0.000000 -vt 0.111931 -1.330433 0.000000 -vt 0.111931 -1.330433 0.000000 -vt 0.113361 -1.326869 0.000000 -vt 0.116186 -1.331598 0.000000 -vt 0.107505 -1.348477 0.000000 -vt 0.562326 -1.541520 0.000000 -vt 0.561584 -1.461517 0.000000 -vt 0.569229 -1.456478 0.000000 -vt 0.569477 -1.529718 0.000000 -vt 0.576627 -1.517915 0.000000 -vt 0.590928 -1.494311 0.000000 -vt 0.592921 -1.515487 0.000000 -vt 0.582566 -1.550740 0.000000 -vt 0.564251 -1.673203 0.000000 -vt 0.556195 -1.681437 0.000000 -vt 0.558702 -1.662098 0.000000 -vt 0.567156 -1.655750 0.000000 -vt 0.570062 -1.638296 0.000000 -vt 0.561208 -1.642759 0.000000 -vt 0.565815 -1.593769 0.000000 -vt 0.581246 -1.604864 0.000000 -vt 0.548140 -1.689670 0.000000 -vt 0.521232 -1.711851 0.000000 -vt 0.550246 -1.668446 0.000000 -vt 0.555864 -1.381379 0.000000 -vt 0.868464 -1.449891 0.000000 -vt 0.831471 -1.447903 0.000000 -vt 0.832612 -1.407113 0.000000 -vt 0.799380 -1.385488 0.000000 -vt 0.811651 -1.393472 0.000000 -vt 0.811706 -1.439605 0.000000 -vt 0.800857 -1.435050 0.000000 -vt 0.744584 -1.342777 0.000000 -vt 0.767637 -1.361305 0.000000 -vt 0.771382 -1.418987 0.000000 -vt 0.750824 -1.406667 0.000000 -vt 0.718187 -1.313491 0.000000 -vt 0.724786 -1.320812 0.000000 -vt 0.730427 -1.383332 0.000000 -vt 0.723628 -1.375553 0.000000 -vt 0.707730 -1.302733 0.000000 -vt 0.713452 -1.364890 0.000000 -vt 0.717610 -1.461324 0.000000 -vt 0.721022 -1.497308 0.000000 -vt 0.724434 -1.533291 0.000000 -vt 0.735771 -1.543787 0.000000 -vt 0.743319 -1.589605 0.000000 -vt 0.730107 -1.574776 0.000000 -vt 0.753775 -1.484318 0.000000 -vt 0.772004 -1.489779 0.000000 -vt 0.741261 -1.477160 0.000000 -vt 0.737226 -1.391110 0.000000 -vt 0.794125 -1.335326 0.000000 -vt 0.807564 -1.345510 0.000000 -vt 0.783954 -1.327620 0.000000 -vt 0.790689 -1.379832 0.000000 -vt 0.779163 -1.370568 0.000000 -vt 0.772657 -1.315103 0.000000 -vt 0.796397 -1.535006 0.000000 -vt 0.796609 -1.555446 0.000000 -vt 0.789028 -1.583573 0.000000 -vt 0.783281 -1.546125 0.000000 -vt 0.809411 -1.534909 0.000000 -vt 0.806950 -1.546212 0.000000 -vt 0.767888 -1.602933 0.000000 -vt 0.778458 -1.593253 0.000000 -vt 0.780825 -1.603251 0.000000 -vt 0.769727 -1.613245 0.000000 -vt 0.783743 -1.588413 0.000000 -vt 0.777338 -1.547469 0.000000 -vt 0.797993 -1.498292 0.000000 -vt 0.806660 -1.501703 0.000000 -vt 0.808035 -1.518306 0.000000 -vt 0.797195 -1.516649 0.000000 -vt 0.821917 -1.551077 0.000000 -vt 0.818290 -1.558999 0.000000 -vt 0.790233 -1.495239 0.000000 -vt 0.786757 -1.520682 0.000000 -vt 0.779228 -1.519989 0.000000 -vt 0.781119 -1.492509 0.000000 -vt 0.776960 -1.676231 0.000000 -vt 0.774210 -1.675986 0.000000 -vt 0.769892 -1.669891 0.000000 -vt 0.773039 -1.662635 0.000000 -vt 0.759508 -1.551500 0.000000 -vt 0.747639 -1.547643 0.000000 -vt 0.744450 -1.512401 0.000000 -vt 0.756642 -1.517909 0.000000 -vt 0.823086 -1.508166 0.000000 -vt 0.856146 -1.518482 0.000000 -vt 0.855529 -1.521919 0.000000 -vt 0.822502 -1.529621 0.000000 -vt 0.844893 -1.565603 0.000000 -vt 0.838329 -1.586606 0.000000 -vt 0.833771 -1.598464 0.000000 -vt 0.886711 -1.539266 0.000000 -vt 0.885187 -1.545414 0.000000 -vt 0.863752 -1.621635 0.000000 -vt 0.854798 -1.647519 0.000000 -vt 0.849165 -1.663175 0.000000 -vt 0.862037 -1.697608 0.000000 -vt 0.855348 -1.715277 0.000000 -vt 0.920535 -1.537478 0.000000 -vt 0.928509 -1.496037 0.000000 -vt 0.941100 -1.506833 0.000000 -vt 0.930603 -1.561657 0.000000 -vt 0.928462 -1.575369 0.000000 -vt 0.926320 -1.589081 0.000000 -vt 0.912573 -1.573260 0.000000 -vt 0.914676 -1.563807 0.000000 -vt 0.928462 -1.575369 0.000000 -vt 0.872707 -1.595751 0.000000 -vt 0.904673 -1.608760 0.000000 -vt 0.888811 -1.680042 0.000000 -vt 0.875424 -1.688825 0.000000 -vt 0.866439 -1.733115 0.000000 -vt 0.859678 -1.750128 0.000000 -vt 0.873211 -1.788904 0.000000 -vt 0.889277 -1.773130 0.000000 -vt 0.889036 -1.724908 0.000000 -vt 0.877737 -1.729011 0.000000 -vt 0.922038 -1.616506 0.000000 -vt 0.911852 -1.672553 0.000000 -vt 0.904568 -1.721845 0.000000 -vt 0.899397 -1.756141 0.000000 -vt 0.448424 -1.026541 0.000000 -vt 0.460156 -1.009018 0.000000 -vt 0.465046 -1.083032 0.000000 -vt 0.448674 -1.060313 0.000000 -vt 0.486775 -1.018199 0.000000 -vt 0.483748 -1.090110 0.000000 -vt 0.477426 -1.124892 0.000000 -vt 0.446848 -1.102002 0.000000 -vt 0.418597 -1.030385 0.000000 -vt 0.417352 -1.060327 0.000000 -vt 0.386269 -1.035703 0.000000 -vt 0.390421 -1.005564 0.000000 -vt 0.404509 -1.017974 0.000000 -vt 0.401810 -1.048015 0.000000 -vt 0.371632 -1.012923 0.000000 -vt 0.378951 -1.024313 0.000000 -vt 0.375807 -1.042459 0.000000 -vt 0.873556 -1.057154 0.000000 -vt 0.884478 -1.023802 0.000000 -vt 0.882301 -1.034338 0.000000 -vt 0.877625 -1.076667 0.000000 -vt 0.868702 -1.170970 0.000000 -vt 0.871129 -1.114062 0.000000 -vt 0.856767 -1.162794 0.000000 -vt 0.864722 -1.098175 0.000000 -vt 0.838879 -1.143008 0.000000 -vt 0.847502 -1.088609 0.000000 -vt 0.836671 -1.247690 0.000000 -vt 0.822419 -1.228117 0.000000 -vt 0.830649 -1.185562 0.000000 -vt 0.846719 -1.205242 0.000000 -vt 0.858806 -1.217885 0.000000 -vt 0.862667 -1.275749 0.000000 -vt 0.859635 -1.293746 0.000000 -vt 0.846082 -1.279830 0.000000 -vt 0.848911 -1.264801 0.000000 -vt 0.833964 -1.263142 0.000000 -vt 0.816185 -1.255371 0.000000 -vt 0.819302 -1.241744 0.000000 -vt 0.831256 -1.278594 0.000000 -vt 0.800300 -1.154680 0.000000 -vt 0.806075 -1.115153 0.000000 -vt 0.767205 -1.164189 0.000000 -vt 0.763460 -1.160074 0.000000 -vt 0.768195 -1.126017 0.000000 -vt 0.772110 -1.129454 0.000000 -vt 0.759715 -1.155960 0.000000 -vt 0.722991 -1.114285 0.000000 -vt 0.730096 -1.091341 0.000000 -vt 0.764280 -1.122580 0.000000 -vt 0.697592 -1.056618 0.000000 -vt 0.704073 -1.041870 0.000000 -vt 0.737200 -1.068398 0.000000 -vt 0.683979 -1.038960 0.000000 -vt 0.686805 -1.026919 0.000000 -vt 0.757231 -1.165470 0.000000 -vt 0.720297 -1.120635 0.000000 -vt 0.754748 -1.174980 0.000000 -vt 0.761309 -1.170126 0.000000 -vt 0.759159 -1.180178 0.000000 -vt 0.777015 -1.094719 0.000000 -vt 0.772930 -1.091959 0.000000 -vt 0.778085 -1.059713 0.000000 -vt 0.782633 -1.061631 0.000000 -vt 0.743095 -1.018616 0.000000 -vt 0.778228 -1.026391 0.000000 -vt 0.773536 -1.057795 0.000000 -vt 0.740147 -1.043507 0.000000 -vt 0.683446 -1.001410 0.000000 -vt 0.678820 -1.009259 0.000000 -vt 0.669294 -1.010868 0.000000 -vt 0.674577 -1.016457 0.000000 -vt 0.674511 -1.027898 0.000000 -vt 0.682678 -1.069603 0.000000 -vt 0.685582 -1.067610 0.000000 -vt 0.690844 -1.075648 0.000000 -vt 0.717604 -1.126985 0.000000 -vt 0.674465 -1.035880 0.000000 -vt 0.671773 -1.034402 0.000000 -vt 0.677689 -1.056144 0.000000 -vt 0.669081 -1.032925 0.000000 -vt 0.679177 -1.052589 0.000000 -vt 0.891191 -1.009180 0.000000 -vt 0.872678 -1.033555 0.000000 -vt 0.886146 -1.001169 0.000000 -vt 0.864709 -1.009795 0.000000 -vt 0.856125 -1.034210 0.000000 -vt 0.814013 -1.074645 0.000000 -vt 0.788251 -1.028544 0.000000 -vt 0.783239 -1.027467 0.000000 -vt 0.791851 -1.011704 0.000000 -vt 0.778266 -1.010600 0.000000 -vt 0.750097 -1.007531 0.000000 -vt 0.821950 -1.034136 0.000000 -vt 0.821321 -1.014169 0.000000 -vt 0.841689 -1.338467 0.000000 -vt 0.840453 -1.326999 0.000000 -vt 0.868171 -1.322349 0.000000 -vt 0.871793 -1.337811 0.000000 -vt 0.817873 -1.318832 0.000000 -vt 0.818910 -1.306408 0.000000 -vt 0.836432 -1.350933 0.000000 -vt 0.812719 -1.332171 0.000000 -vt 0.786259 -1.292840 0.000000 -vt 0.785107 -1.310230 0.000000 -vt 0.771531 -1.293801 0.000000 -vt 0.770404 -1.272500 0.000000 -vt 0.713570 -1.257357 0.000000 -vt 0.719869 -1.262406 0.000000 -vt 0.702600 -1.249041 0.000000 -vt 0.698496 -1.223134 0.000000 -vt 0.708884 -1.231020 0.000000 -vt 0.704198 -1.204683 0.000000 -vt 0.695617 -1.167916 0.000000 -vt 0.715974 -1.214550 0.000000 -vt 0.710086 -1.209616 0.000000 -vt 0.702370 -1.172056 0.000000 -vt 0.709123 -1.176195 0.000000 -vt 0.733426 -1.232167 0.000000 -vt 0.736097 -1.254859 0.000000 -vt 0.721071 -1.241002 0.000000 -vt 0.727630 -1.190724 0.000000 -vt 0.797259 -1.301884 0.000000 -vt 0.797468 -1.283968 0.000000 -vt 0.786953 -1.272963 0.000000 -vt 0.770869 -1.250968 0.000000 -vt 0.754786 -1.228972 0.000000 -vt 0.754549 -1.252159 0.000000 -vt 0.690476 -1.107204 0.000000 -vt 0.688368 -1.108490 0.000000 -vt 0.717370 -1.167818 0.000000 -vt 0.705516 -1.158965 0.000000 -vt 0.712188 -1.154787 0.000000 -vt 0.918020 -1.195984 0.000000 -vt 0.933605 -1.196023 0.000000 -vt 0.926268 -1.229521 0.000000 -vt 0.913659 -1.215684 0.000000 -vt 0.895102 -1.279751 0.000000 -vt 0.909298 -1.235384 0.000000 -vt 0.918930 -1.263019 0.000000 -vt 0.902175 -1.303666 0.000000 -vt 0.873199 -1.359015 0.000000 -vt 0.871646 -1.413785 0.000000 -vt 0.870256 -1.429556 0.000000 -vt 0.894454 -1.508035 0.000000 -vt 0.901591 -1.479251 0.000000 -vt 0.907476 -1.419315 0.000000 -vt 0.904249 -1.452185 0.000000 -vt 0.911712 -1.376173 0.000000 -vt 0.874605 -1.380220 0.000000 -vt 0.906944 -1.339919 0.000000 -vt 0.947957 -1.345697 0.000000 -vt 0.933443 -1.304358 0.000000 -vt 0.934410 -1.465370 0.000000 -vt 0.943406 -1.408566 0.000000 -vt 0.988369 -1.088922 0.000000 -vt 0.992327 -1.065469 0.000000 -vt 0.997689 -1.080234 0.000000 -vt 0.996872 -1.096645 0.000000 -vt 0.995277 -1.127823 0.000000 -vt 0.992966 -1.146823 0.000000 -vt 0.982371 -1.124458 0.000000 -vt 0.985707 -1.104695 0.000000 -vt 0.980454 -1.268193 0.000000 -vt 0.961157 -1.264556 0.000000 -vt 0.979086 -1.143921 0.000000 -vt 0.990721 -1.164675 0.000000 -vt 0.966740 -1.378092 0.000000 -vt 0.954557 -1.305127 0.000000 -vt 0.973483 -1.325801 0.000000 -vt 0.958182 -1.427882 0.000000 -vt 0.946986 -1.478539 0.000000 -vt 0.940412 -1.267324 0.000000 -vt 0.947381 -1.230289 0.000000 -vt 0.960856 -1.104486 0.000000 -vt 0.964147 -1.093431 0.000000 -vt 0.974927 -1.099063 0.000000 -vt 0.971614 -1.114472 0.000000 -vt 0.998506 -1.063823 0.000000 -vt 0.994896 -1.059882 0.000000 -vt 0.997879 -1.053395 0.000000 -vt 0.990135 -1.046771 0.000000 -vt 0.990076 -1.039680 0.000000 -vt 0.997512 -1.047169 0.000000 -vt 0.994829 -1.028880 0.000000 -vt 0.996733 -1.024555 0.000000 -vt 0.996635 -1.032298 0.000000 -vt 0.993292 -1.019213 0.000000 -vt 0.993432 -1.024969 0.000000 -vt 0.992080 -1.021143 0.000000 -vt 0.983862 -1.018574 0.000000 -vt 0.986591 -1.029888 0.000000 -vt 0.980260 -1.035985 0.000000 -vt 0.976206 -1.027821 0.000000 -vt 0.735512 -1.005566 0.000000 -vt 0.691990 -1.017693 0.000000 -vt 0.693821 -1.001585 0.000000 -vt 0.693307 -1.007996 0.000000 -vt 0.706908 -1.001807 0.000000 -vt 0.707649 -1.009399 0.000000 -vt 0.707526 -1.025428 0.000000 -vt 0.611623 -1.555549 0.000000 -vt 0.607346 -1.527874 0.000000 -vt 0.606540 -1.500347 0.000000 -vt 0.618470 -1.523681 0.000000 -vt 0.168411 -1.439861 0.000000 -vt 0.160552 -1.375513 0.000000 -vt 0.182301 -1.419072 0.000000 -vt 0.155509 -1.465161 0.000000 -vt 0.149182 -1.418690 0.000000 -vt 0.086223 -1.521888 0.000000 -vt 0.082992 -1.498099 0.000000 -vt 0.099328 -1.507950 0.000000 -vt 0.112397 -1.493210 0.000000 -vt 0.124110 -1.478336 0.000000 -vt 0.133183 -1.458485 0.000000 -vt 0.077469 -1.548681 0.000000 -vt 0.087816 -1.541102 0.000000 -vt 0.076523 -1.563028 0.000000 -vt 0.069311 -1.568009 0.000000 -vt 0.069607 -1.555387 0.000000 -vt 0.060658 -1.585581 0.000000 -vt 0.061044 -1.573948 0.000000 -vt 0.061220 -1.556660 0.000000 -vt 0.056146 -1.561882 0.000000 -vt 0.055607 -1.579136 0.000000 -vt 0.057308 -1.526108 0.000000 -vt 0.061396 -1.519704 0.000000 -vt 0.051441 -1.519049 0.000000 -vt 0.919938 -1.674206 0.000000 -vt 0.912863 -1.702382 0.000000 -vt 0.938117 -1.710843 0.000000 -vt 0.903507 -1.730192 0.000000 -vt 0.902709 -1.749253 0.000000 -vt 0.931941 -1.737513 0.000000 -vt 0.980062 -1.779385 0.000000 -vt 0.972592 -1.789377 0.000000 -vt 0.965123 -1.799370 0.000000 -vt 0.954338 -1.827497 0.000000 -vt 0.923277 -1.822591 0.000000 -vt 0.925764 -1.764183 0.000000 -vt 0.953808 -1.861751 0.000000 -vt 0.899434 -1.809395 0.000000 -vt 0.901911 -1.768313 0.000000 -vt 0.818734 -1.750746 0.000000 -vt 0.821558 -1.743763 0.000000 -vt 0.836605 -1.765130 0.000000 -vt 0.833298 -1.771548 0.000000 -vt 0.806083 -1.725569 0.000000 -vt 0.802608 -1.732966 0.000000 -vt 0.767717 -1.873315 0.000000 -vt 0.731884 -1.857072 0.000000 -vt 0.734750 -1.844921 0.000000 -vt 0.770279 -1.864333 0.000000 -vt 0.804203 -1.890521 0.000000 -vt 0.805482 -1.885027 0.000000 -vt 0.839887 -1.906794 0.000000 -vt 0.840665 -1.902468 0.000000 -vt 0.649271 -1.633070 0.000000 -vt 0.662003 -1.656000 0.000000 -vt 0.633129 -1.717710 0.000000 -vt 0.619739 -1.688735 0.000000 -vt 0.593859 -1.749042 0.000000 -vt 0.611552 -1.768040 0.000000 -vt 0.584928 -1.788339 0.000000 -vt 0.605818 -1.797296 0.000000 -vt 0.637651 -1.785493 0.000000 -vt 0.632450 -1.808114 0.000000 -vt 0.663736 -1.821580 0.000000 -vt 0.668662 -1.802818 0.000000 -vt 0.697293 -1.839755 0.000000 -vt 0.701933 -1.823977 0.000000 -vt 0.680426 -1.775428 0.000000 -vt 0.728434 -1.809179 0.000000 -vt 0.795259 -1.852893 0.000000 -vt 0.844632 -1.887231 0.000000 -vt 0.672168 -1.603508 0.000000 -vt 0.683532 -1.617246 0.000000 -vt 0.706602 -1.627915 0.000000 -vt 0.680387 -1.681479 0.000000 -vt 0.650162 -1.754521 0.000000 -vt 0.710091 -1.707665 0.000000 -vt 0.755581 -1.744866 0.000000 -vt 0.819690 -1.799653 0.000000 -vt 0.862555 -1.849119 0.000000 -vt 0.872334 -1.903581 0.000000 -vt 0.885574 -1.880452 0.000000 -vt 0.875543 -1.838784 0.000000 -vt 0.895359 -1.881641 0.000000 -vt 0.891669 -1.880324 0.000000 -vt 0.870737 -1.841385 0.000000 -vt 0.847863 -1.792350 0.000000 -vt 0.786481 -1.715187 0.000000 -vt 0.772770 -1.699979 0.000000 -vt 0.731355 -1.656428 0.000000 -vt 0.759059 -1.684771 0.000000 -vt 0.685165 -1.594479 0.000000 -vt 0.691797 -1.603798 0.000000 -vt 0.895671 -1.905655 0.000000 -vt 0.902254 -1.909584 0.000000 -vt 0.901453 -1.918279 0.000000 -vt 0.899046 -1.894277 0.000000 -vt 0.870833 -1.913367 0.000000 -vt 0.871482 -1.917706 0.000000 -vt 0.896034 -1.923808 0.000000 -vt 0.900198 -1.923259 0.000000 -vt 0.901816 -1.929562 0.000000 -vt 0.901738 -1.935303 0.000000 -vt 0.897240 -1.930644 0.000000 -vt 0.891578 -1.926810 0.000000 -vt 0.890827 -1.920774 0.000000 -vt 0.902802 -1.925418 0.000000 -vt 0.903007 -1.915511 0.000000 -vt 0.901766 -1.898455 0.000000 -vt 0.888213 -1.913529 0.000000 -vt 0.879281 -1.968759 0.000000 -vt 0.881910 -1.980870 0.000000 -vt 0.851332 -1.993116 0.000000 -vt 0.847530 -1.950827 0.000000 -vt 0.892315 -1.971011 0.000000 -vt 0.903579 -1.896675 0.000000 -vt 0.904864 -1.915397 0.000000 -vt 0.903982 -1.928508 0.000000 -vt 0.891390 -1.939873 0.000000 -vt 0.872790 -1.931483 0.000000 -vt 0.791573 -1.948929 0.000000 -vt 0.812356 -2.000000 0.000000 -vt 0.894119 -1.958670 0.000000 -vt 0.901972 -1.947420 0.000000 -vt 0.609506 -1.826174 0.000000 -vt 0.635545 -1.834651 0.000000 -vt 0.664843 -1.844897 0.000000 -vt 0.698768 -1.857813 0.000000 -vt 0.732920 -1.868553 0.000000 -vt 0.769226 -1.883032 0.000000 -vt 0.805016 -1.895773 0.000000 -vt 0.840911 -1.909371 0.000000 -vt 0.624734 -1.916325 0.000000 -vt 0.658145 -1.927803 0.000000 -vt 0.720049 -1.939264 0.000000 -vt 0.793879 -2.000000 0.000000 -vt 0.775403 -2.000000 0.000000 -vt 0.756302 -2.000000 0.000000 -vt 0.737200 -2.000000 0.000000 -vt 0.721244 -2.000000 0.000000 -vt 0.705288 -2.000000 0.000000 -vt 0.674404 -2.000000 0.000000 -vt 0.649104 -2.000000 0.000000 -vt 0.630588 -2.000000 0.000000 -vt 0.624247 -2.000000 0.000000 -vt 0.606706 -1.897207 0.000000 -vt 0.591098 -1.821240 0.000000 -vt 0.498568 -1.893268 0.000000 -vt 0.514505 -1.955261 0.000000 -vt 0.482590 -1.959442 0.000000 -vt 0.472127 -1.908422 0.000000 -vt 0.520312 -1.930539 0.000000 -vt 0.559288 -1.991382 0.000000 -vt 0.529474 -1.991678 0.000000 -vt 0.493963 -1.994280 0.000000 -vt 0.459643 -1.989051 0.000000 -vt 0.452370 -1.966875 0.000000 -vt 0.428140 -1.964350 0.000000 -vt 0.427631 -1.953513 0.000000 -vt 0.443956 -1.916963 0.000000 -vt 0.424247 -1.916230 0.000000 -vt 0.423981 -1.902796 0.000000 -vt 0.442909 -1.895802 0.000000 -vt 0.478544 -1.886325 0.000000 -vt 0.539806 -1.787494 0.000000 -vt 0.551521 -1.751714 0.000000 -vt 0.561021 -1.778002 0.000000 -vt 0.552719 -1.821755 0.000000 -vt 0.519139 -1.835732 0.000000 -vt 0.543899 -1.879244 0.000000 -vt 0.502894 -1.879317 0.000000 -vt 0.530109 -1.922046 0.000000 -vt 0.553374 -1.951923 0.000000 -vt 0.553633 -1.895935 0.000000 -vt 0.564634 -1.841739 0.000000 -vt 0.566472 -1.785545 0.000000 -vt 0.476981 -1.872089 0.000000 -vt 0.490766 -1.880166 0.000000 -vt 0.445057 -1.879698 0.000000 -vt 0.424982 -1.892766 0.000000 -vt 0.624892 -1.544292 0.000000 -vt 0.614383 -1.573015 0.000000 -vt 0.565119 -1.381388 0.000000 -vt 0.592165 -1.441361 0.000000 -vt 0.631315 -1.564903 0.000000 -vt 0.639041 -1.598096 0.000000 -vt 0.622697 -1.619578 0.000000 -vt 0.617143 -1.590482 0.000000 -vt 0.594770 -1.604048 0.000000 -vt 0.593163 -1.619743 0.000000 -vt 0.599111 -1.574327 0.000000 -vt 0.591557 -1.635438 0.000000 -vt 0.593698 -1.658245 0.000000 -vt 0.565907 -1.693971 0.000000 -vt 0.565493 -1.688779 0.000000 -vt 0.557612 -1.697742 0.000000 -vt 0.333715 -1.924665 0.000000 -vt 0.335668 -1.963089 0.000000 -vt 0.292140 -1.903167 0.000000 -vt 0.291954 -1.870933 0.000000 -vt 0.259684 -1.836845 0.000000 -vt 0.259479 -1.805235 0.000000 -vt 0.365162 -1.918325 0.000000 -vt 0.359930 -1.889976 0.000000 -vt 0.413414 -1.863550 0.000000 -vt 0.354697 -1.861627 0.000000 -vt 0.352880 -1.832436 0.000000 -vt 0.351063 -1.803245 0.000000 -vt 0.331150 -1.853282 0.000000 -vt 0.330536 -1.820323 0.000000 -vt 0.291767 -1.838698 0.000000 -vt 0.292136 -1.805387 0.000000 -vt 0.260252 -1.719750 0.000000 -vt 0.259273 -1.773625 0.000000 -vt 0.233188 -1.769038 0.000000 -vt 0.234426 -1.708492 0.000000 -vt 0.262601 -1.682771 0.000000 -vt 0.236464 -1.664327 0.000000 -vt 0.297502 -1.680034 0.000000 -vt 0.294263 -1.717558 0.000000 -vt 0.300284 -1.652797 0.000000 -vt 0.267425 -1.661375 0.000000 -vt 0.341241 -1.656297 0.000000 -vt 0.331470 -1.622061 0.000000 -vt 0.371450 -1.624734 0.000000 -vt 0.245566 -1.648103 0.000000 -vt 0.335429 -1.696165 0.000000 -vt 0.292504 -1.772077 0.000000 -vt 0.330784 -1.790482 0.000000 -vt 0.354816 -1.769112 0.000000 -vt 0.358570 -1.734979 0.000000 -vt 0.361689 -1.670706 0.000000 -vt 0.380545 -1.565754 0.000000 -vt 0.375707 -1.511823 0.000000 -vt 0.331033 -1.760641 0.000000 -vt 0.358791 -1.572479 0.000000 -vt 0.344433 -1.492112 0.000000 -vt 0.375255 -1.444526 0.000000 -vt 0.315913 -1.324631 0.000000 -vt 0.316114 -1.234680 0.000000 -vt 0.347571 -1.314428 0.000000 -vt 0.346700 -1.388624 0.000000 -vt 0.346050 -1.440139 0.000000 -vt 0.346300 -1.533487 0.000000 -vt 0.342602 -1.582103 0.000000 -vt 0.340622 -1.555324 0.000000 -vt 0.326903 -1.614759 0.000000 -vt 0.302187 -1.638321 0.000000 -vt 0.313735 -1.397374 0.000000 -vt 0.312322 -1.442898 0.000000 -vt 0.310062 -1.484286 0.000000 -vt 0.281173 -1.456764 0.000000 -vt 0.275658 -1.497706 0.000000 -vt 0.286418 -1.410687 0.000000 -vt 0.292049 -1.333177 0.000000 -vt 0.270473 -1.418840 0.000000 -vt 0.262338 -1.467968 0.000000 -vt 0.277528 -1.341093 0.000000 -vt 0.333462 -1.519934 0.000000 -vt 0.328430 -1.542978 0.000000 -vt 0.306534 -1.518735 0.000000 -vt 0.272028 -1.533689 0.000000 -vt 0.256246 -1.514288 0.000000 -vt 0.247611 -1.479342 0.000000 -vt 0.336681 -1.565476 0.000000 -vt 0.325683 -1.555901 0.000000 -vt 0.336735 -1.586342 0.000000 -vt 0.242227 -1.529133 0.000000 -vt 0.239698 -1.571025 0.000000 -vt 0.252555 -1.551578 0.000000 -vt 0.273240 -1.646918 0.000000 -vt 0.253071 -1.632311 0.000000 -vt 0.235244 -1.625701 0.000000 -vt 0.242067 -1.603366 0.000000 -vt 0.254884 -1.587066 0.000000 -vt 0.273935 -1.564515 0.000000 -vt 0.305091 -1.545244 0.000000 -vt 0.304983 -1.561234 0.000000 -vt 0.278446 -1.584978 0.000000 -vt 0.263867 -1.616103 0.000000 -vt 0.324517 -1.611261 0.000000 -vt 0.303563 -1.630440 0.000000 -vt 0.279274 -1.636400 0.000000 -vt 0.576874 -1.451439 0.000000 -vt 0.574373 -1.381397 0.000000 -vt 0.691308 -1.574101 0.000000 -vt 0.697042 -1.593955 0.000000 -vt 0.712508 -1.619079 0.000000 -vt 0.735445 -1.646480 0.000000 -vt 0.762013 -1.675753 0.000000 -vt 0.776310 -1.691565 0.000000 -vt 0.790608 -1.707376 0.000000 -vt 0.900073 -1.959154 0.000000 -vt 0.896981 -1.878276 0.000000 -vt 0.878507 -1.833722 0.000000 -vt 0.851652 -1.786498 0.000000 -vt 0.074650 -1.634535 0.000000 -vt 0.088683 -1.632837 0.000000 -vt 0.132003 -1.610751 0.000000 -vt 0.155203 -1.614178 0.000000 -vt 0.150577 -1.647974 0.000000 -vt 0.125860 -1.643955 0.000000 -vt 0.117994 -1.608641 0.000000 -vt 0.113534 -1.638832 0.000000 -vt 0.093825 -1.606511 0.000000 -vt 0.108975 -1.607283 0.000000 -vt 0.104958 -1.635268 0.000000 -vt 0.079216 -1.608818 0.000000 -vt 0.067196 -1.616181 0.000000 -vt 0.066297 -1.639099 0.000000 -vt 0.061158 -1.640058 0.000000 -vt 0.058879 -1.662701 0.000000 -vt 0.055851 -1.664450 0.000000 -vt 0.055799 -1.664262 0.000000 -vt 0.058746 -1.642169 0.000000 -vt 0.055413 -1.665854 0.000000 -vt 0.045916 -1.647860 0.000000 -vt 0.049758 -1.628381 0.000000 -vt 0.056991 -1.617540 0.000000 -vt 0.051476 -1.648531 0.000000 -vt 0.082708 -1.589593 0.000000 -vt 0.097086 -1.587238 0.000000 -vt 0.022742 -1.726604 0.000000 -vt 0.064489 -1.617326 0.000000 -vt 0.062480 -1.617383 0.000000 -vt 0.066363 -1.598332 0.000000 -vt 0.062894 -1.599573 0.000000 -vt 0.067745 -1.582462 0.000000 -vt 0.063354 -1.591873 0.000000 -vt 0.074001 -1.578822 0.000000 -vt 0.055156 -1.596577 0.000000 -vt 0.059133 -1.600918 0.000000 -vt 0.926769 -1.893220 0.000000 -vt 0.927048 -1.856910 0.000000 -vt 0.927424 -1.916396 0.000000 -vt 0.916796 -1.998607 0.000000 -vt 0.912948 -1.994485 0.000000 -vt 0.909100 -1.990362 0.000000 -vt 0.928244 -1.945391 0.000000 -vt 0.906615 -1.967295 0.000000 -vt 0.927849 -1.931424 0.000000 -vt 0.907843 -1.926622 0.000000 -vt 0.907516 -1.937442 0.000000 -vt 0.928244 -1.945391 0.000000 -vt 0.905602 -1.894651 0.000000 -vt 0.906679 -1.910013 0.000000 -vt 0.904987 -1.885869 0.000000 -vt 0.902730 -1.858766 0.000000 -vt 0.900427 -1.834083 0.000000 -vt 0.999357 -1.730440 0.000000 -vt 0.100481 -1.568195 0.000000 -vt 0.085471 -1.574157 0.000000 -vt 0.087365 -1.557073 0.000000 -vt 0.072399 -1.594989 0.000000 -vt 0.101592 -1.549777 0.000000 -vt 0.101569 -1.531284 0.000000 -vt 0.116736 -1.539872 0.000000 -vt 0.115901 -1.518888 0.000000 -vt 0.138831 -1.522826 0.000000 -vt 0.125575 -1.533053 0.000000 -vt 0.128049 -1.507488 0.000000 -vt 0.138267 -1.494457 0.000000 -vt 0.157872 -1.502480 0.000000 -vt 0.158575 -1.540807 0.000000 -vt 0.138022 -1.552811 0.000000 -vt 0.124744 -1.558508 0.000000 -vt 0.115901 -1.562303 0.000000 -vt 0.135691 -1.582011 0.000000 -vt 0.123510 -1.583159 0.000000 -vt 0.157676 -1.578463 0.000000 -vt 0.170287 -1.485541 0.000000 -vt 0.171678 -1.528616 0.000000 -vt 0.171333 -1.571906 0.000000 -vt 0.169174 -1.612300 0.000000 -vt 0.120848 -1.596052 0.000000 -vt 0.184355 -1.517579 0.000000 -vt 0.183866 -1.467952 0.000000 -vt 0.183419 -1.564786 0.000000 -vt 0.181639 -1.609963 0.000000 -vt 0.178356 -1.651137 0.000000 -vt 0.165349 -1.649178 0.000000 -vt 0.331763 -1.886241 0.000000 -vt 0.794525 -1.194206 0.000000 -vt 0.792220 -1.205316 0.000000 -vt 0.765387 -1.174783 0.000000 -vt 0.768845 -1.089199 0.000000 -vt 0.785059 -1.011152 0.000000 -vt 0.693719 -1.072999 0.000000 -vt 0.689818 -1.064299 0.000000 -vt 0.684445 -1.057049 0.000000 -vt 0.680666 -1.049033 0.000000 -vt 0.682275 -1.059854 0.000000 -vt 0.552353 -1.647222 0.000000 -vt 0.557941 -1.596903 0.000000 -vt 0.731385 -1.328134 0.000000 -vt 0.735003 -1.473580 0.000000 -vt 0.741705 -1.545715 0.000000 -vt 0.738354 -1.509648 0.000000 -vt 0.726169 -1.267455 0.000000 -vt 0.738767 -1.277552 0.000000 -vt 0.714978 -1.236011 0.000000 -vt 0.125964 -1.025503 0.000000 -vt 0.140036 -1.019027 0.000000 -vt 0.153712 -1.010623 0.000000 -vt 0.168181 -1.007411 0.000000 -vt 0.185267 -1.002871 0.000000 -vt 0.204602 -1.002871 0.000000 -vt 0.224424 -1.002872 0.000000 -vt 0.028830 -1.163698 0.000000 -vt 0.041750 -1.084874 0.000000 -vt 0.057503 -1.064972 0.000000 -vt 0.075711 -1.044230 0.000000 -vt 0.093838 -1.036763 0.000000 -vt 0.102496 -1.034827 0.000000 -vt 0.111154 -1.032892 0.000000 -vt 0.118559 -1.029198 0.000000 -vt 0.004001 -1.321399 0.000000 -vt 0.004001 -1.254163 0.000000 -vt 0.005303 -1.230312 0.000000 -vt 0.011652 -1.185944 0.000000 -vt 0.096454 -1.979342 0.000000 -vt 0.454220 -1.818596 0.000000 -vt 0.562282 -1.197540 0.000000 -vt 0.564239 -1.167499 0.000000 -vt 0.566195 -1.137457 0.000000 -vt 0.572550 -1.095736 0.000000 -vt 0.572597 -1.317291 0.000000 -vt 0.050203 -1.271772 0.000000 -vt 0.067747 -1.287183 0.000000 -vt 0.035051 -1.258096 0.000000 -vt 0.087452 -1.302784 0.000000 -vt 0.856602 -1.311743 0.000000 -vt 0.843253 -1.294858 0.000000 -vt 0.789915 -1.216425 0.000000 -vt 0.763570 -1.185377 0.000000 -vt 0.907985 -1.701513 0.000000 -vt 0.781662 -1.425146 0.000000 -vt 0.761361 -1.302586 0.000000 -vt 0.771394 -1.548813 0.000000 -vt 0.771699 -1.519295 0.000000 -vt 0.757955 -1.277372 0.000000 -vt 0.831175 -1.363399 0.000000 -vt 0.795692 -1.318605 0.000000 -vt 0.791941 -1.431306 0.000000 -vt 0.863649 -1.476700 0.000000 -vt 0.851456 -1.544599 0.000000 -vt 0.967976 -1.130906 0.000000 -vt 0.956865 -1.117890 0.000000 -vt 0.945665 -1.106115 0.000000 -vt 0.950011 -1.092956 0.000000 -vt 0.954648 -1.081197 0.000000 -vt 0.948655 -1.096395 0.000000 -vt 0.979051 -1.081219 0.000000 -vt 0.969733 -1.073515 0.000000 -vt 0.962069 -1.062375 0.000000 -vt 0.983226 -1.061663 0.000000 -vt 0.974125 -1.057857 0.000000 -vt 0.967548 -1.048480 0.000000 -vt 0.991231 -1.056120 0.000000 -vt 0.984212 -1.051520 0.000000 -vt 0.985198 -1.041378 0.000000 -vt 0.977193 -1.046921 0.000000 -vt 0.971877 -1.038151 0.000000 -vt 0.988333 -1.034784 0.000000 -vt 0.997059 -1.039486 0.000000 -vt 0.992483 -1.034211 0.000000 -vt 0.990998 -1.029721 0.000000 -vt 0.989514 -1.025232 0.000000 -vt 0.728746 -1.470001 0.000000 -vt 0.732258 -1.506894 0.000000 -vt 0.692950 -1.151085 0.000000 -vt 0.698345 -1.153784 0.000000 -vt 0.785072 -1.603356 0.000000 -vt 0.675443 -1.125766 0.000000 -vt 0.682465 -1.133677 0.000000 -vt 0.702688 -1.145454 0.000000 -vt 0.696252 -1.114714 0.000000 -vt 0.706811 -1.141266 0.000000 -vt 0.694748 -1.137451 0.000000 -vt 0.690510 -1.118213 0.000000 -vt 0.690262 -1.134125 0.000000 -vt 0.006606 -1.206461 0.000000 -vt 0.071053 -1.482288 0.000000 -vt 0.067760 -1.488510 0.000000 -vt 0.064469 -1.494733 0.000000 -vt 0.086471 -1.434701 0.000000 -vt 0.092825 -1.407693 0.000000 -vt 0.099062 -1.377749 0.000000 -vt 0.113766 -1.584077 0.000000 -vt 0.025444 -1.851157 0.000000 -vt 0.024378 -1.831994 0.000000 -vt 0.028298 -1.866741 0.000000 -vt 0.025657 -1.841912 0.000000 -vt 0.027655 -1.861896 0.000000 -vt 0.027380 -1.862869 0.000000 -vt 0.026290 -1.866354 0.000000 -vt 0.008746 -1.783705 0.000000 -vt 0.046475 -1.787097 0.000000 -vt 0.042483 -1.783894 0.000000 -vt 0.040765 -1.780266 0.000000 -vt 0.035166 -1.763071 0.000000 -vt 0.038320 -1.777341 0.000000 -vt 0.029130 -1.707231 0.000000 -vt 0.907027 -1.953635 0.000000 -vt 0.036702 -1.684266 0.000000 -vt 0.041762 -1.668921 0.000000 -vt 0.966270 -1.912741 0.000000 -vt 0.061720 -1.519135 0.000000 -vt 0.063152 -1.506295 0.000000 -vt 0.061816 -1.498860 0.000000 -vt 0.059229 -1.503019 0.000000 -vt 0.061716 -1.519164 0.000000 -vt 0.756201 -1.595970 0.000000 -vt 0.746757 -1.591153 0.000000 -vt 0.781495 -1.624611 0.000000 -vt 0.782013 -1.641141 0.000000 -vt 0.776932 -1.653661 0.000000 -vt 0.772953 -1.631341 0.000000 -vt 0.771195 -1.659586 0.000000 -vt 0.766556 -1.664376 0.000000 -vt 0.759135 -1.643469 0.000000 -vt 0.765229 -1.638120 0.000000 -vt 0.748650 -1.607294 0.000000 -vt 0.758351 -1.610034 0.000000 -vt 0.783438 -1.624193 0.000000 -vt 0.783438 -1.624193 0.000000 -vt 0.781495 -1.624611 0.000000 -vt 0.778566 -1.676373 0.000000 -vt 0.780025 -1.651358 0.000000 -vt 0.779568 -1.676463 0.000000 -vt 0.743703 -1.590411 0.000000 -vt 0.789319 -1.603460 0.000000 -vt 0.785380 -1.623775 0.000000 -vt 0.785380 -1.623775 0.000000 -vt 0.781122 -1.651433 0.000000 -vt 0.780923 -1.676583 0.000000 -vt 0.748289 -1.606488 0.000000 -vt 0.578955 -1.694752 0.000000 -vt 0.567981 -1.781509 0.000000 -vt 0.084154 -1.588112 0.000000 -vt 0.905326 -1.893363 0.000000 -vt 0.575735 -1.738647 0.000000 -vt 0.578955 -1.694752 0.000000 -vt 0.567981 -1.781509 0.000000 -vt 0.905326 -1.893363 0.000000 -vt 0.425234 -1.723536 0.000000 -vt 0.433817 -1.841073 0.000000 -vt 0.433817 -1.841073 0.000000 -vt 0.425972 -1.787228 0.000000 -vt 0.429244 -1.147484 0.000000 -vt 0.427590 -1.207972 0.000000 -vt 0.430270 -1.441231 0.000000 -vt 0.429684 -1.383661 0.000000 -vt 0.428810 -1.297618 0.000000 -vt 0.426391 -1.664505 0.000000 -vt 0.428634 -1.613899 0.000000 -vt 0.430696 -1.557018 0.000000 -vt 0.431040 -1.502621 0.000000 -vt 0.431657 -1.099298 0.000000 -vt 0.433511 -1.028463 0.000000 -vt 0.873163 -1.123819 0.000000 -vt 0.433013 -1.060320 0.000000 -vt 0.429895 -1.814150 0.000000 -vt 0.425603 -1.755382 0.000000 -vt 0.425235 -1.723536 0.000000 -vt 0.426391 -1.664505 0.000000 -vt 0.425603 -1.755382 0.000000 -vt 0.425972 -1.787228 0.000000 -vt 0.429894 -1.814150 0.000000 -vt 0.429244 -1.147484 0.000000 -vt 0.427590 -1.207972 0.000000 -vt 0.428810 -1.297618 0.000000 -vt 0.430270 -1.441231 0.000000 -vt 0.429684 -1.383661 0.000000 -vt 0.428633 -1.613899 0.000000 -vt 0.430696 -1.557017 0.000000 -vt 0.431040 -1.502621 0.000000 -vt 0.431657 -1.099298 0.000000 -vt 0.433511 -1.028463 0.000000 -vt 0.873164 -1.123818 0.000000 -vt 0.433013 -1.060320 0.000000 -vt 0.871168 -1.113146 0.000000 -vt 0.393600 -1.145293 0.000000 -vt 0.394269 -1.099395 0.000000 -vt 0.392611 -1.208763 0.000000 -vt 0.395136 -1.298826 0.000000 -vt 0.395781 -1.383183 0.000000 -vt 0.397832 -1.060254 0.000000 -vt 0.384055 -1.862589 0.000000 -vt 0.380435 -1.832241 0.000000 -vt 0.376814 -1.801893 0.000000 -vt 0.378979 -1.767624 0.000000 -vt 0.381144 -1.733356 0.000000 -vt 0.384067 -1.672376 0.000000 -vt 0.390585 -1.622559 0.000000 -vt 0.397449 -1.563439 0.000000 -vt 0.395421 -1.507540 0.000000 -vt 0.396094 -1.441822 0.000000 -vt 0.393600 -1.145293 0.000000 -vt 0.392611 -1.208763 0.000000 -vt 0.395136 -1.298826 0.000000 -vt 0.394269 -1.099395 0.000000 -vt 0.397832 -1.060254 0.000000 -vt 0.384055 -1.862588 0.000000 -vt 0.376815 -1.801893 0.000000 -vt 0.381144 -1.733356 0.000000 -vt 0.384067 -1.672376 0.000000 -vt 0.390585 -1.622559 0.000000 -vt 0.397449 -1.563439 0.000000 -vt 0.395421 -1.507540 0.000000 -vt 0.396094 -1.441822 0.000000 -vt 0.395781 -1.383183 0.000000 -vt 0.380435 -1.832241 0.000000 -vt 0.378979 -1.767624 0.000000 -vt 0.387920 -1.892490 0.000000 -vt 0.387920 -1.892490 0.000000 -# 3092 texture coords - -g great_white_shark -usemtl _Sharkgreatwhiteshark -f 2651/3022 2659/3031 344/44 1/45 -f 726/102 2651/3022 2667/3040 1041/1136 -f 343/114 9/113 1040/1135 1045/1140 -f 9/113 343/114 1021/1115 1022/1116 -f 2/116 8/115 1021/1115 1033/1127 -f 3/121 1008/1102 1018/1112 4/120 -f 2653/3025 2666/3039 1023/1117 11/117 -f 12/101 710/100 1024/1118 1025/1119 -f 711/106 13/107 1024/1118 1034/1129 -f 13/107 711/106 1008/1102 1009/1103 -f 1010/1104 1009/1103 1410/127 1408/128 -f 12/101 14/109 1042/1137 1043/1138 -f 14/109 12/101 1025/1119 1026/1120 -f 16/129 15/108 1010/1104 1011/1105 -f 1418/138 1419/157 1012/1106 1011/1105 -f 1013/1107 1014/1108 55/177 54/159 -f 1014/1108 25/194 26/178 55/177 -f 1278/1380 2649/217 18/220 1274/1375 -f 23/216 21/215 362/207 886/206 -f 887/188 919/189 829/213 1286/1392 -f 19/209 1282/1386 829/213 919/189 -f 21/215 20/214 1281/1385 362/207 -f 22/221 21/215 23/216 -f 23/216 1274/1375 1275/1376 22/221 -f 24/190 19/209 919/189 30/182 -f 1445/201 1446/1371 915/202 37/200 -f 37/200 35/198 1449/199 1445/201 -f 35/198 25/194 1451/195 1449/199 -f 25/194 35/198 34/193 26/178 -f 26/178 34/193 27/179 1039/1134 -f 26/178 1039/1134 41/175 -f 34/193 32/197 28/192 27/179 -f 40/180 51/174 27/179 28/192 -f 1279/1381 40/180 28/192 33/196 -f 31/181 50/173 40/180 1279/1381 -f 30/182 39/170 31/181 24/190 -f 888/183 916/169 39/170 30/182 -f 827/184 825/185 916/169 888/183 -f 32/197 36/203 33/196 28/192 -f 36/203 363/204 914/205 33/196 -f 35/198 37/200 32/197 34/193 -f 37/200 915/202 36/203 32/197 -f 363/204 36/203 915/202 1271/1372 -f 38/168 39/170 916/169 48/147 -f 50/173 31/181 39/170 38/168 -f 50/173 49/172 51/174 40/180 -f 51/174 42/171 1038/1133 27/179 -f 1039/1134 27/179 1038/1133 -f 42/171 56/176 1027/1121 1038/1133 -f 43/166 57/165 56/176 42/171 -f 43/166 46/158 53/152 57/165 -f 44/150 53/152 46/158 -f 46/158 45/167 47/148 44/150 -f 42/171 51/174 49/172 43/166 -f 45/167 46/158 43/166 49/172 -f 45/167 38/168 48/147 47/148 -f 49/172 50/173 38/168 45/167 -f 825/185 816/146 48/147 916/169 -f 816/146 52/149 47/148 48/147 -f 876/151 53/152 44/150 1265/1364 -f 877/143 59/153 53/152 876/151 -f 54/159 55/177 1027/1121 1028/1122 -f 57/165 58/164 69/227 56/176 -f 53/152 59/153 58/164 57/165 -f 877/143 879/135 68/142 59/153 -f 879/135 878/134 60/133 68/142 -f 878/134 62/228 61/132 60/133 -f 62/228 65/230 64/229 61/132 -f 63/112 71/131 61/132 64/229 -f 272/110 1042/1137 63/112 64/229 -f 882/231 281/695 65/230 62/228 -f 65/230 282/111 272/110 64/229 -f 16/129 17/139 1029/1123 1026/1120 -f 66/130 72/140 71/131 63/112 -f 71/131 73/141 60/133 61/132 -f 73/141 67/154 68/142 60/133 -f 67/154 58/164 59/153 68/142 -f 74/163 69/227 58/164 67/154 -f 1028/1122 1030/1124 70/162 54/159 -f 1013/1107 1015/1109 1521/232 1519/160 -f 1419/157 1522/234 1016/1110 1012/1106 -f 17/139 77/156 1031/1125 1029/1123 -f 72/140 75/155 73/141 71/131 -f 75/155 74/163 67/154 73/141 -f 1030/1124 1032/1126 76/233 70/162 -f 1015/1109 1017/1111 1530/235 1521/232 -f 1522/234 1530/235 1017/1111 1016/1110 -f 77/156 76/233 1032/1126 1031/1125 -f 80/273 81/274 890/271 79/272 -f 80/273 82/268 83/270 81/274 -f 82/268 224/267 78/269 83/270 -f 82/268 80/273 1162/1259 1167/1264 -f 1162/1259 1163/1260 325/281 228/275 -f 325/281 1163/1260 1168/1265 326/292 -f 890/271 85/283 328/282 79/272 -f 889/256 697/257 322/280 84/284 -f 322/280 395/286 897/285 84/284 -f 87/306 688/307 355/304 359/305 -f 360/345 355/334 89/344 88/3014 -f 353/309 692/310 88/301 89/308 -f 1555/386 1556/390 1320/1430 1321/1431 -f 95/368 90/376 576/377 93/378 -f 572/370 577/374 90/376 95/368 -f 1556/390 1596/398 1319/1429 1320/1430 -f 93/378 91/389 92/379 -f 94/367 95/368 93/378 92/379 -f 95/368 94/367 102/366 -f 95/368 102/366 96/369 572/370 -f 100/371 1306/1416 1301/1410 572/370 -f 573/354 574/352 97/359 565/357 -f 98/372 99/373 1309/1419 1310/1420 -f 100/371 101/375 1305/1415 1306/1416 -f 96/369 103/364 1299/1408 1300/1409 -f 102/366 104/365 103/364 96/369 -f 104/365 1314/1424 112/380 113/381 -f 112/380 1314/1424 1315/1425 111/388 -f 111/388 1315/1425 1316/1426 105/397 -f 1318/1428 1596/399 1317/1427 -f 103/364 108/382 1244/1342 1299/1408 -f 104/365 113/381 108/382 103/364 -f 109/400 106/383 1244/1342 1245/1343 -f 113/381 122/387 107/401 108/382 -f 115/402 109/400 1245/1343 1246/1344 -f 109/400 115/402 1235/1333 1239/1337 -f 106/383 109/400 1239/1337 1240/1338 -f 111/388 128/415 129/396 112/380 -f 129/396 122/387 113/381 112/380 -f 122/387 130/395 114/394 107/401 -f 123/392 115/402 1246/1344 1247/1345 -f 115/402 123/392 1236/1334 1235/1333 -f 116/403 124/405 1257/1356 1258/1357 -f 110/404 116/403 1258/1357 1259/1358 -f 119/384 110/404 1259/1358 1260/1359 -f 99/373 119/384 1260/1359 1309/1419 -f 121/409 566/358 120/385 553/408 -f 105/397 143/434 128/415 111/388 -f 129/396 131/416 130/395 122/387 -f 130/395 141/417 132/391 114/394 -f 133/393 123/392 1247/1345 1248/1346 -f 1230/1328 1231/1329 126/410 124/405 -f 1257/1356 1261/1360 125/411 117/406 -f 125/411 1261/1360 1262/1361 557/412 -f 557/412 1262/1361 1263/1362 559/414 -f 127/413 126/410 1231/1329 1232/1330 -f 128/415 142/433 131/416 129/396 -f 131/416 244/432 141/417 130/395 -f 141/417 139/431 140/418 132/391 -f 138/419 133/393 1248/1346 1249/1347 -f 137/420 127/413 1232/1330 1233/1331 -f 134/421 136/423 560/422 1263/1362 -f 560/422 559/414 1263/1362 -f 134/421 1263/1362 1264/1363 -f 560/422 136/423 563/424 -f 135/425 169/467 563/424 136/423 -f 287/426 366/453 135/425 136/423 -f 134/421 288/428 287/426 136/423 -f 371/427 375/706 288/428 1264/1363 -f 134/421 1264/1363 288/428 -f 371/427 137/420 1233/1331 1234/1332 -f 148/429 138/419 1249/1347 1250/1348 -f 139/431 251/440 147/430 140/418 -f 244/432 250/439 139/431 141/417 -f 142/433 245/633 244/432 131/416 -f 143/434 243/436 142/433 128/415 -f 1596/399 144/435 977/1070 1317/1427 -f 145/438 375/706 371/427 1234/1332 -f 250/439 249/635 251/440 139/431 -f 251/440 252/634 146/441 147/430 -f 146/441 1069/1164 1256/1355 1250/1348 -f 149/443 373/437 150/442 151/444 -f 150/442 1256/1355 151/444 -f 156/446 1219/1316 1220/1317 157/454 -f 151/444 1219/1316 153/447 149/443 -f 155/448 377/522 152/449 156/446 -f 382/450 379/703 153/447 152/449 -f 154/451 378/764 365/452 1212/1309 -f 154/451 165/466 169/467 135/425 -f 1212/1309 1213/1310 165/466 154/451 -f 157/454 166/469 1251/1349 156/446 -f 157/454 1220/1317 1221/1318 217/455 -f 217/455 1221/1318 1224/1321 218/525 -f 160/458 1066/1161 1068/1163 252/634 -f 164/459 1067/1162 1066/1161 160/458 -f 1071/1166 1072/1167 1067/1162 164/459 -f 163/462 1222/1319 1223/1320 918/463 -f 170/468 563/424 169/467 -f 181/470 167/465 1251/1349 1252/1350 -f 1213/1310 1214/1311 168/471 165/466 -f 168/471 179/472 169/467 165/466 -f 171/473 170/468 169/467 179/472 -f 172/474 173/475 170/468 171/473 -f 172/474 175/481 176/476 173/475 -f 190/479 229/503 191/477 174/478 -f 174/478 175/481 183/480 190/479 -f 793/482 176/476 175/481 174/478 -f 213/483 183/480 175/481 172/474 -f 171/473 177/484 213/483 172/474 -f 179/472 178/485 177/484 171/473 -f 179/472 168/471 180/486 178/485 -f 211/487 1215/1312 1214/1311 181/470 -f 181/470 1252/1350 1254/1353 211/487 -f 216/489 221/527 182/488 166/469 -f 215/490 186/491 183/480 213/483 -f 186/491 188/492 190/479 183/480 -f 212/493 206/494 978/1071 979/1072 -f 214/497 212/493 979/1072 980/1073 -f 214/497 980/1073 981/1074 215/490 -f 215/490 981/1074 982/1075 186/491 -f 186/491 982/1075 983/1076 188/492 -f 188/492 983/1076 984/1077 189/502 -f 189/502 229/503 190/479 188/492 -f 229/503 242/511 230/504 191/477 -f 192/505 795/516 191/477 230/504 -f 230/504 231/515 761/506 192/505 -f 266/507 265/521 192/505 761/506 -f 189/502 984/1077 994/1087 239/510 -f 239/510 242/511 229/503 189/502 -f 918/463 261/539 198/530 163/462 -f 261/539 1007/1101 197/529 198/530 -f 200/538 207/537 197/529 1007/1101 -f 1777/541 985/1078 1002/1095 1780/653 -f 200/538 985/1078 986/1079 208/536 -f 208/536 986/1079 987/1080 201/534 -f 201/534 987/1080 988/1081 202/532 -f 202/532 988/1081 989/1082 203/514 -f 204/513 1253/1352 1255/1354 990/1083 -f 206/494 1217/1314 1218/1315 978/1071 -f 200/538 208/536 207/537 -f 208/536 201/534 210/535 207/537 -f 201/534 202/532 209/533 210/535 -f 202/532 203/514 220/531 209/533 -f 211/487 1254/1353 1253/1352 204/513 -f 180/486 1215/1312 1217/1314 206/494 -f 206/494 212/493 178/485 180/486 -f 212/493 214/497 177/484 178/485 -f 214/497 215/490 213/483 177/484 -f 210/535 219/528 197/529 207/537 -f 157/454 217/455 216/489 166/469 -f 218/525 222/526 216/489 217/455 -f 218/525 1224/1321 1222/1319 163/462 -f 222/526 218/525 163/462 198/530 -f 197/529 219/528 222/526 198/530 -f 209/533 221/527 219/528 210/535 -f 220/531 182/488 221/527 209/533 -f 222/526 219/528 221/527 216/489 -f 86/298 227/299 225/546 223/547 -f 311/265 1056/1151 1170/1267 1166/1263 -f 225/546 1164/1261 1165/1262 223/547 -f 224/267 1057/1152 1058/1153 78/269 -f 226/266 311/265 1166/1263 1167/1264 -f 242/511 240/512 231/515 230/504 -f 231/515 233/574 232/573 761/506 -f 233/574 748/32 762/31 232/573 -f 241/575 296/576 748/32 233/574 -f 234/577 297/578 296/576 241/575 -f 991/1084 992/1085 236/582 356/579 -f 241/575 240/512 238/580 234/577 -f 235/583 236/582 992/1085 993/1086 -f 237/584 235/583 993/1086 994/1087 -f 240/512 242/511 239/510 238/580 -f 233/574 231/515 240/512 241/575 -f 144/435 247/638 995/1088 977/1070 -f 243/436 246/637 245/633 142/433 -f 245/633 248/636 250/439 244/432 -f 247/638 1826/641 996/1089 995/1088 -f 246/637 254/640 248/636 245/633 -f 248/636 255/639 249/635 250/439 -f 249/635 160/458 252/634 251/440 -f 252/634 1068/1163 1069/1164 146/441 -f 1826/641 1830/643 997/1090 996/1089 -f 254/640 256/642 255/639 248/636 -f 255/639 164/459 160/458 249/635 -f 256/642 1071/1166 164/459 255/639 -f 256/642 254/640 997/1090 1070/1165 -f 1834/650 1835/649 999/1092 1000/1093 -f 258/645 256/642 998/1091 1000/1093 -f 259/646 257/464 999/1092 1001/1094 -f 259/646 1225/1322 1223/1320 161/461 -f 891/647 1225/1322 1226/1324 1004/1098 -f 1780/653 1002/1095 1003/1096 1848/652 -f 260/654 891/647 1004/1097 1003/1096 -f 260/654 261/539 918/463 891/647 -f 845/659 843/658 839/657 1296/1405 -f 263/672 1276/1378 1277/1379 264/673 -f 1321/1432 1322/1433 1856/671 1555/686 -f 759/591 267/687 265/521 266/507 -f 794/520 795/516 192/505 265/521 -f 267/687 276/688 794/520 265/521 -f 278/689 268/690 276/688 267/687 -f 278/689 765/587 279/691 268/690 -f 269/692 274/697 268/690 279/691 -f 279/691 285/586 270/693 269/692 -f 271/694 883/696 269/692 270/693 -f 281/695 882/231 271/694 270/693 -f 281/695 280/585 282/111 65/230 -f 282/111 284/96 273/97 272/110 -f 710/100 12/101 1043/1138 1051/1146 -f 883/696 865/699 274/697 269/692 -f 275/698 276/688 268/690 274/697 -f 277/519 794/520 276/688 275/698 -f 865/699 875/700 275/698 274/697 -f 875/700 792/518 277/519 275/698 -f 765/587 776/89 285/586 279/691 -f 280/585 281/695 270/693 285/586 -f 280/585 283/90 284/96 282/111 -f 285/586 776/89 283/90 280/585 -f 287/426 288/428 376/655 286/656 -f 439/829 441/566 290/565 289/564 -f 292/567 293/571 290/565 441/566 -f 2701/3075 2704/3078 435/827 291/559 -f 2701/3075 2702/3076 735/17 292/567 -f 735/17 738/18 293/571 292/567 -f 293/571 298/581 294/572 290/565 -f 294/572 295/570 289/564 290/565 -f 1005/1099 1006/1100 357/743 896/569 -f 356/579 357/743 1006/1100 991/1084 -f 294/572 296/576 297/578 295/570 -f 298/581 748/32 296/576 294/572 -f 2654/3026 2655/3027 301/568 291/559 -f 305/15 301/568 2655/3027 2658/3030 -f 735/17 2702/3076 2703/3077 736/16 -f 736/16 2703/3077 2714/3088 739/27 -f 2656/3028 2657/3029 304/13 302/12 -f 2657/3029 2658/3030 303/560 304/13 -f 336/550 337/555 303/560 300/558 -f 299/552 432/551 336/550 300/558 -f 432/551 308/549 306/553 336/550 -f 308/549 309/548 307/554 306/553 -f 310/263 1059/1154 1056/1151 311/265 -f 311/265 226/266 313/264 310/263 -f 226/266 228/275 312/276 313/264 -f 307/554 1376/1491 1378/1493 695/557 -f 310/263 313/264 319/262 696/261 -f 313/264 312/276 321/277 319/262 -f 312/276 324/289 314/288 321/277 -f 315/279 320/278 321/277 314/288 -f 314/288 317/290 316/287 315/279 -f 322/280 1323/1434 1324/1435 395/286 -f 324/289 327/291 317/290 314/288 -f 318/259 801/260 696/261 319/262 -f 319/262 321/277 320/278 318/259 -f 320/278 315/279 323/258 -f 697/257 1325/1436 1323/1434 322/280 -f 323/258 799/247 318/259 320/278 -f 228/275 325/281 324/289 312/276 -f 325/281 326/292 327/291 324/289 -f 1181/1278 1178/1275 1177/1274 328/282 -f 329/293 1201/1298 1178/1275 1181/1278 -f 1198/1295 1180/1277 917/294 351/295 -f 340/21 1/45 344/44 330/20 -f 331/43 332/23 330/20 344/44 -f 347/42 333/24 332/23 331/43 -f 350/25 334/10 333/24 347/42 -f 302/12 335/11 334/10 350/25 -f 304/13 342/561 335/11 302/12 -f 303/560 337/555 342/561 304/13 -f 336/550 306/553 338/556 337/555 -f 340/21 386/246 1044/1139 1045/1140 -f 340/21 330/20 339/19 386/246 -f 330/20 332/23 388/22 339/19 -f 332/23 333/24 341/8 388/22 -f 334/10 1064/1159 341/8 333/24 -f 335/11 342/561 390/562 389/9 -f 342/561 337/555 338/556 390/562 -f 707/253 1395/1523 2/116 1033/1127 -f 344/44 2659/3031 2660/3032 331/43 -f 331/43 2660/3032 2661/3033 347/42 -f 347/42 2661/3033 2662/3034 350/25 -f 350/25 2662/3034 2656/3028 302/12 -f 888/183 30/182 919/189 887/188 -f 689/336 354/335 355/334 688/337 -f 353/343 89/344 354/335 689/336 -f 355/334 354/335 89/344 -f 359/305 361/300 358/303 87/306 -f 361/300 359/305 355/304 -f 360/302 88/301 361/300 355/304 -f 88/301 692/310 358/303 361/300 -f 377/522 365/452 364/523 380/524 -f 367/766 374/765 378/764 366/453 -f 366/453 287/426 286/656 367/766 -f 375/706 381/707 376/655 288/428 -f 149/443 153/447 379/703 368/701 -f 1243/1341 149/443 368/701 369/702 -f 369/702 368/701 370/704 -f 372/705 145/438 369/702 370/704 -f 372/705 381/707 375/706 145/438 -f 145/438 1234/1332 1242/1340 369/702 -f 369/702 1242/1340 1243/1341 -f 364/523 365/452 378/764 374/765 -f 382/450 152/449 377/522 380/524 -f 1065/1160 1380/1495 1377/1492 384/7 -f 797/1 796/5 383/6 1060/1155 -f 929/243 1369/1484 1373/1488 1047/1142 -f 1370/1485 1371/1486 701/238 704/242 -f 387/245 706/254 1044/1139 1046/1141 -f 341/8 1065/1160 384/7 388/22 -f 341/8 1064/1159 1065/1160 -f 391/563 1065/1160 389/9 390/562 -f 390/562 338/556 695/557 391/563 -f 306/553 307/554 695/557 338/556 -f 392/770 1112/1209 510/768 417/769 -f 1100/1197 1094/1191 1095/1192 1099/1196 -f 1088/1185 1089/1186 396/774 393/773 -f 1182/1279 1187/1284 398/776 491/775 -f 1171/1268 1172/1269 317/290 327/291 -f 1172/1269 1173/1270 316/287 317/290 -f 395/286 1324/1435 1338/1449 1174/1271 -f 411/767 2026/1498 1175/1272 1174/1271 -f 412/779 396/774 1089/1186 1092/1189 -f 412/779 973/1064 972/1063 396/774 -f 1096/1193 1094/1191 1100/1197 1101/1198 -f 490/780 394/771 1360/1473 1357/1470 -f 404/784 406/792 400/788 401/791 -f 402/789 401/791 400/788 408/790 -f 403/778 1090/1187 1190/1287 1340/1451 -f 404/784 1361/1474 1356/1469 406/792 -f 1097/1194 1336/1447 1337/1448 1098/1195 -f 409/799 402/789 408/790 415/797 -f 1327/1438 1365/1478 1362/1475 405/794 -f 924/805 921/787 1350/1462 1351/1463 -f 413/793 974/1065 1333/1444 1329/1440 -f 407/795 1097/1194 1095/1192 417/769 -f 1119/1216 419/796 407/795 1206/1303 -f 415/797 1328/1439 1330/1441 416/798 -f 416/798 893/800 409/799 415/797 -f 1206/1303 1207/1304 1118/1215 1119/1216 -f 416/798 1330/1441 1331/1442 922/802 -f 893/800 416/798 922/802 892/804 -f 892/804 922/802 425/812 473/803 -f 476/889 420/808 421/807 1113/1210 -f 427/816 1117/1214 1208/1305 475/809 -f 475/809 1208/1305 1104/1201 -f 1208/1305 1117/1214 1118/1215 1207/1304 -f 418/801 426/810 428/811 -f 1331/1442 1332/1443 425/812 922/802 -f 422/813 424/814 473/803 425/812 -f 422/813 923/820 423/815 424/814 -f 428/811 1087/1184 1334/1445 1332/1443 -f 2084/1499 428/811 478/817 -f 426/810 478/817 428/811 -f 899/821 923/820 1087/1184 429/819 -f 1334/1445 1087/1184 923/820 422/813 -f 899/821 2081/2265 894/822 923/820 -f 894/822 2081/2265 423/815 923/820 -f 436/825 442/832 437/823 430/824 -f 470/826 2085/2272 430/824 437/823 -f 431/833 433/834 436/825 430/824 -f 1169/1266 443/836 436/825 433/834 -f 308/549 432/551 1169/1266 1165/1262 -f 86/298 223/547 433/834 431/833 -f 2654/3026 2663/3035 443/836 299/552 -f 442/832 436/825 443/836 -f 2664/3036 2665/3038 438/828 447/831 -f 440/830 445/1028 949/1041 947/1038 -f 438/828 2705/3079 947/1038 -f 434/835 1075/1170 1076/1172 -f 289/564 1005/1099 1076/1172 439/829 -f 2704/3078 2705/3079 438/828 435/827 -f 2663/3035 2665/3038 442/832 443/836 -f 461/837 460/872 470/838 437/839 -f 437/839 2664/3037 956/1048 461/837 -f 444/841 957/1049 956/1048 447/840 -f 449/843 959/1051 957/1049 444/841 -f 455/850 950/1042 948/1039 446/844 -f 444/841 447/840 949/1040 948/1039 -f 440/846 1075/1171 1077/1173 445/845 -f 445/845 1077/1173 1078/1174 446/844 -f 454/861 1080/1176 1078/1174 448/849 -f 449/843 950/1042 951/1043 450/852 -f 945/1036 955/1047 953/1045 939/1031 -f 458/854 952/1044 954/1046 451/853 -f 457/856 546/857 545/855 952/1044 -f 546/857 457/856 452/858 547/859 -f 451/853 1079/1175 1081/1177 458/854 -f 471/860 1079/1175 1085/1182 946/1037 -f 943/1034 963/1055 961/1053 938/1030 -f 544/864 456/863 962/1054 958/1050 -f 898/867 2138/2341 542/865 1074/1169 -f 541/866 547/859 452/858 1073/1168 -f 2142/1503 1081/1177 533/869 2650/1179 -f 895/871 2650/1179 533/869 -f 538/870 1082/1178 1086/1183 966/1058 -f 549/873 2099/2289 460/872 461/837 -f 462/842 469/874 549/873 461/837 -f 462/842 467/875 468/882 469/874 -f 449/843 450/852 960/1052 959/1051 -f 944/1035 534/878 535/877 463/862 -f 464/879 456/863 544/864 465/880 -f 466/876 463/862 535/877 536/881 -f 466/876 536/881 468/882 467/875 -f 488/922 506/923 900/921 513/885 -f 489/924 505/934 506/923 488/922 -f 1140/1237 1151/1248 489/924 488/922 -f 497/925 1141/1238 1363/1476 1358/1471 -f 1184/1281 1182/1279 491/775 492/927 -f 492/927 491/775 1171/1268 1176/1273 -f 1176/1273 1179/1276 1142/1239 492/927 -f 494/928 1177/1274 1178/1275 499/929 -f 1185/1282 1186/1283 501/931 495/930 -f 496/932 1143/1240 1149/1246 495/930 -f 501/931 503/937 496/932 495/930 -f 505/934 489/924 1102/1199 1103/1200 -f 504/935 497/925 1358/1471 1359/1472 -f 496/932 503/937 550/936 498/933 -f 500/296 2177/2401 1199/1296 1200/1297 -f 502/938 501/931 1204/1301 1205/1302 -f 502/938 2171/2389 503/937 501/931 -f 508/918 523/908 1108/1205 1107/1204 -f 522/907 514/884 509/920 486/919 -f 514/884 513/885 900/921 509/920 -f 488/922 513/885 1144/1241 1140/1237 -f 1105/1202 1112/1209 392/770 -f 421/807 1114/1211 511/887 1113/1210 -f 1112/1209 1105/1202 1106/1203 1111/1208 -f 512/886 1144/1241 1145/1242 515/883 -f 515/883 1145/1242 1146/1243 519/893 -f 1116/1213 1111/1208 1106/1203 518/888 -f 527/902 482/903 481/901 1126/1223 -f 516/898 1123/1220 526/899 480/900 -f 551/895 521/894 525/896 517/897 -f 520/892 519/893 1109/1206 1110/1207 -f 520/892 479/891 518/888 519/893 -f 479/891 477/890 1116/1213 518/888 -f 521/894 1109/1206 1153/1250 1147/1244 -f 524/909 1148/1245 1155/1252 1124/1221 -f 527/902 1136/1233 483/904 482/903 -f 530/906 1132/1229 528/905 1130/1227 -f 532/912 2213/2456 529/911 1209/1306 -f 532/913 1210/1307 1211/1308 -f 531/910 1131/1228 487/915 484/914 -f 537/939 2134/2336 465/880 544/864 -f 540/940 2134/2336 537/939 544/864 -f 547/859 541/866 548/942 -f 542/865 968/1060 967/1059 1074/1169 -f 539/943 543/941 967/1059 968/1060 -f 543/941 539/943 540/940 544/864 -f 958/1050 545/855 546/857 964/1056 -f 546/857 547/859 548/942 964/1056 -f 800/3 694/248 693/239 671/4 -f 564/517 173/475 867/754 868/753 -f 552/632 562/628 564/517 868/753 -f 553/408 118/407 554/760 121/409 -f 117/406 555/625 554/760 118/407 -f 125/411 556/624 555/625 117/406 -f 557/412 558/630 556/624 125/411 -f 559/414 561/629 558/630 557/412 -f 560/422 562/628 561/629 559/414 -f 563/424 564/517 562/628 560/422 -f 170/468 173/475 564/517 563/424 -f 176/476 792/518 867/754 173/475 -f 567/601 566/358 121/409 854/757 -f 121/409 554/760 854/757 -f 933/600 568/353 567/601 911/351 -f 566/358 573/354 565/357 120/385 -f 567/601 573/354 566/358 -f 568/353 574/352 573/354 567/601 -f 933/600 837/602 569/356 568/353 -f 575/355 574/352 568/353 569/356 -f 569/356 836/363 583/362 575/355 -f 570/361 571/360 575/355 583/362 -f 571/360 570/361 1302/1411 1301/1410 -f 574/352 575/355 571/360 97/359 -f 576/685 90/684 579/670 1322/1433 -f 579/670 1856/671 1322/1433 -f 579/670 90/684 577/683 -f 1302/1412 1303/1413 579/670 577/683 -f 578/662 579/670 1303/1413 1304/1414 -f 845/659 578/662 1304/1414 580/661 -f 581/660 843/658 845/659 580/661 -f 580/661 584/669 582/668 581/660 -f 584/669 570/682 583/681 582/668 -f 658/946 813/971 606/944 659/945 -f 606/944 612/975 661/947 659/945 -f 585/950 593/951 647/948 646/949 -f 593/951 618/953 650/952 647/948 -f 618/953 619/981 651/954 650/952 -f 586/730 786/732 587/731 596/729 -f 586/730 597/734 588/733 786/732 -f 597/734 641/715 787/722 588/733 -f 589/735 642/714 641/715 597/734 -f 589/735 598/736 643/710 642/714 -f 598/736 591/956 590/955 643/710 -f 591/956 585/950 646/949 590/955 -f 591/956 598/736 602/959 592/957 -f 594/958 600/963 619/981 618/953 -f 594/958 618/953 593/951 592/957 -f 592/957 593/951 585/950 591/956 -f 610/726 596/729 587/731 595/725 -f 610/726 803/727 609/728 596/729 -f 609/728 603/737 586/730 596/729 -f 603/737 589/735 597/734 586/730 -f 603/737 602/959 598/736 589/735 -f 599/960 607/961 592/957 602/959 -f 607/961 617/962 594/958 592/957 -f 617/962 601/964 600/963 594/958 -f 601/964 616/980 623/965 600/963 -f 602/959 603/737 609/728 599/960 -f 615/968 604/969 812/966 811/967 -f 605/970 812/966 604/969 617/962 -f 604/969 601/964 617/962 -f 605/970 617/962 813/971 -f 606/944 813/971 617/962 607/961 -f 606/944 607/961 611/972 -f 607/961 806/973 611/972 -f 599/960 608/738 805/974 607/961 -f 607/961 805/974 806/973 -f 609/728 803/727 608/738 599/960 -f 595/725 789/724 802/723 610/726 -f 611/972 612/975 606/944 -f 622/977 627/988 621/978 925/976 -f 613/979 930/989 622/977 925/976 -f 925/976 616/980 615/968 613/979 -f 616/980 601/964 604/969 615/968 -f 651/954 619/981 625/982 634/1001 -f 808/985 631/986 632/998 620/983 -f 632/998 640/999 633/1000 625/982 -f 633/1000 634/1001 625/982 -f 632/998 625/982 620/983 -f 621/984 808/985 620/983 -f 630/987 631/986 808/985 -f 621/978 627/988 630/987 808/985 -f 930/989 628/996 627/988 622/977 -f 613/979 615/968 811/967 930/989 -f 616/980 925/976 624/990 623/965 -f 621/984 620/983 624/990 925/976 -f 625/982 623/965 624/990 620/983 -f 619/981 600/963 623/965 625/982 -f 639/993 638/1004 636/991 626/992 -f 626/992 636/991 810/994 -f 930/989 810/995 628/996 -f 629/997 630/987 627/988 628/996 -f 632/998 631/986 630/987 629/997 -f 635/1002 637/1003 634/1001 633/1000 -f 635/1002 809/1006 636/991 637/1003 -f 638/1004 648/1012 637/1003 636/991 -f 639/993 657/1014 660/1005 638/1004 -f 635/1002 632/998 629/1007 809/1006 -f 635/1002 633/1000 640/999 632/998 -f 642/714 653/708 652/713 641/715 -f 643/710 654/709 653/708 642/714 -f 590/955 644/1008 654/709 643/710 -f 646/949 645/1009 644/1008 590/955 -f 647/948 656/1010 645/1009 646/949 -f 650/952 649/1011 656/1010 647/948 -f 649/1011 660/1005 656/1010 -f 648/1012 638/1004 660/1005 649/1011 -f 648/1012 651/954 634/1001 637/1003 -f 649/1011 650/952 651/954 648/1012 -f 667/712 652/713 653/708 665/711 -f 653/708 654/709 665/711 -f 644/1008 655/1013 665/711 654/709 -f 645/1009 656/1010 655/1013 644/1008 -f 660/1005 661/1017 655/1013 656/1010 -f 658/1015 659/1016 660/1005 657/1014 -f 661/1017 660/1005 659/1016 -f 807/1018 662/1019 655/1013 661/1017 -f 655/1013 662/1019 804/1020 -f 663/717 665/711 655/1013 804/1020 -f 665/711 663/717 664/716 -f 666/718 667/712 665/711 664/716 -f 788/719 791/720 667/712 666/718 -f 791/720 668/721 652/713 667/712 -f 668/721 787/722 641/715 652/713 -f 675/311 928/314 681/313 669/312 -f 681/313 670/322 669/312 -f 1371/327 383/326 669/312 670/322 -f 383/326 796/325 675/311 669/312 -f 671/324 676/316 675/311 796/325 -f 672/323 673/317 676/316 671/324 -f 672/339 687/338 688/337 673/3015 -f 688/307 87/306 673/317 -f 675/311 676/316 674/315 928/314 -f 673/317 677/318 674/315 676/316 -f 87/306 358/303 677/318 673/317 -f 358/303 692/310 690/319 677/318 -f 678/320 674/315 677/318 690/319 -f 674/315 678/320 680/321 928/314 -f 928/314 680/321 681/313 -f 687/338 686/333 682/341 691/342 -f 686/333 684/331 683/332 682/341 -f 976/1067 685/329 670/322 681/313 -f 685/329 701/328 1371/327 670/322 -f 685/329 684/331 700/330 701/328 -f 684/331 686/333 671/340 700/330 -f 686/333 687/338 672/339 671/340 -f 687/338 689/336 688/337 -f 691/342 353/343 689/336 687/338 -f 976/1068 681/313 680/321 683/348 -f 683/348 680/321 678/320 682/347 -f 690/319 691/346 682/347 678/320 -f 692/310 353/309 691/346 690/319 -f 799/247 323/258 694/248 800/3 -f 694/248 1048/1143 1049/1144 693/239 -f 695/557 1378/1493 1379/1494 391/563 -f 799/247 798/2 801/260 318/259 -f 1325/1436 697/257 698/249 1048/1143 -f 889/256 352/255 698/249 697/257 -f 703/250 699/240 698/249 352/255 -f 702/236 693/239 1049/1144 1050/1145 -f 702/236 700/237 671/4 693/239 -f 702/236 704/242 701/238 700/237 -f 703/250 901/251 705/241 699/240 -f 704/242 702/236 1050/1145 1047/1142 -f 901/251 942/252 929/243 705/241 -f 942/1128 1372/1487 1369/1484 929/243 -f 4/120 1018/1112 1020/1114 5/123 -f 708/105 711/106 1034/1129 1037/1132 -f 709/99 710/100 1051/1146 1052/1147 -f 2706/3080 7/125 2717/3091 -f 2706/3080 2715/3089 1023/1117 7/125 -f 725/118 1035/1130 1036/1131 723/104 -f 1036/1131 1037/1132 713/98 723/104 -f 709/99 1052/1147 1053/1148 713/98 -f 814/95 714/91 715/92 721/94 -f 714/91 815/81 716/82 715/92 -f 717/83 720/93 715/92 716/82 -f 716/82 718/66 773/75 717/83 -f 773/75 732/72 731/74 717/83 -f 732/72 745/52 728/49 731/74 -f 815/81 774/65 718/66 716/82 -f 719/84 720/93 717/83 731/74 -f 720/93 722/86 721/94 715/92 -f 1053/1148 1054/1149 723/104 713/98 -f 1054/1149 1055/1150 725/118 723/104 -f 11/117 2707/3081 2716/3090 1041/1136 -f 2708/3082 2709/3083 345/46 726/102 -f 2709/3083 2710/3084 729/48 345/46 -f 729/48 2710/3084 2711/3085 346/50 -f 346/50 2711/3085 2712/3086 348/41 -f 730/85 719/84 727/73 724/103 -f 719/84 730/85 722/86 720/93 -f 731/74 728/49 727/73 719/84 -f 745/52 733/51 728/49 -f 745/52 754/47 742/40 733/51 -f 348/41 2712/3086 2713/3087 349/26 -f 349/26 2713/3087 2714/3088 734/14 -f 738/18 737/28 746/29 749/30 -f 298/581 293/571 738/18 749/30 -f 736/16 737/28 738/18 735/17 -f 739/27 741/34 737/28 736/16 -f 740/33 743/39 741/34 739/27 -f 742/40 754/47 743/39 740/33 -f 744/53 753/54 754/47 745/52 -f 764/62 763/55 744/53 745/52 -f 745/52 732/72 790/63 764/62 -f 732/72 773/75 771/70 790/63 -f 737/28 741/34 751/35 746/29 -f 741/34 743/39 747/38 751/35 -f 743/39 754/47 755/597 747/38 -f 749/30 762/31 748/32 298/581 -f 755/597 769/595 756/596 747/38 -f 750/37 751/35 747/38 756/596 -f 752/36 746/29 751/35 750/37 -f 756/596 757/590 758/592 750/37 -f 760/593 752/36 750/37 758/592 -f 763/55 785/56 753/54 744/53 -f 784/598 755/597 754/47 753/54 -f 784/598 782/599 769/595 755/597 -f 769/595 767/594 757/590 756/596 -f 757/590 766/589 759/591 758/592 -f 266/507 760/593 758/592 759/591 -f 761/506 232/573 760/593 266/507 -f 232/573 762/31 752/36 760/593 -f 762/31 749/30 746/29 752/36 -f 595/57 587/58 785/56 763/55 -f 763/55 764/62 789/61 595/57 -f 770/588 768/88 776/89 765/587 -f 765/587 278/689 766/589 770/588 -f 267/687 759/591 766/589 278/689 -f 757/590 767/594 770/588 766/589 -f 767/594 781/87 768/88 770/588 -f 767/594 769/595 782/599 781/87 -f 773/75 718/66 772/67 771/70 -f 718/66 774/65 775/64 772/67 -f 778/80 777/79 775/64 774/65 -f 778/80 774/65 815/81 -f 815/81 283/90 776/89 778/80 -f 776/89 768/88 777/79 778/80 -f 768/88 781/87 779/78 777/79 -f 781/87 782/599 780/76 779/78 -f 782/599 784/598 783/59 780/76 -f 784/598 753/54 785/56 783/59 -f 587/58 786/60 783/59 785/56 -f 786/60 588/77 780/76 783/59 -f 588/77 787/68 779/78 780/76 -f 787/68 775/64 777/79 779/78 -f 764/62 790/63 788/761 789/61 -f 790/63 771/70 791/71 788/761 -f 771/70 772/67 668/69 791/71 -f 772/67 775/64 787/68 668/69 -f 793/482 277/519 792/518 176/476 -f 795/516 794/520 277/519 793/482 -f 795/516 793/482 174/478 191/477 -f 797/1 800/3 671/4 796/5 -f 798/2 799/247 800/3 797/1 -f 798/2 1063/1158 1062/1157 801/260 -f 666/739 802/723 789/724 788/740 -f 664/741 803/727 802/723 666/739 -f 663/742 608/738 803/727 664/741 -f 804/1021 805/974 608/738 663/742 -f 662/1022 806/973 805/974 804/1021 -f 807/1023 611/972 806/973 662/1022 -f 807/1023 661/947 612/975 611/972 -f 614/976 902/985 903/984 -f 905/1006 926/1007 904/1024 -f 811/967 626/1025 810/995 930/989 -f 812/966 639/1026 626/1025 811/967 -f 812/966 605/970 657/1027 639/1026 -f 813/971 658/946 657/1027 605/970 -f 907/994 927/991 906/1006 -f 284/96 714/91 814/95 273/97 -f 283/90 815/81 714/91 284/96 -f 816/146 825/185 824/607 822/606 -f 818/137 819/144 817/145 873/617 -f 817/145 819/144 1266/1365 1267/1366 -f 820/613 848/3016 831/612 821/605 -f 821/605 822/606 820/613 -f 822/606 824/607 823/609 820/613 -f 824/607 826/187 847/608 823/609 -f 825/185 827/184 826/187 824/607 -f 826/211 827/1393 931/186 1288/1395 -f 826/211 1288/1395 1289/1396 -f 908/184 888/183 887/188 828/186 -f 931/186 1287/1394 1288/1395 -f 1293/1400 838/224 830/210 1294/1402 -f 1293/1401 842/666 835/678 838/3017 -f 820/613 823/609 848/611 -f 832/222 20/214 21/215 22/221 -f 847/212 826/211 1289/1396 1290/1397 -f 932/604 847/212 1290/1397 1291/1398 -f 1291/1398 1292/1399 909/349 932/604 -f 837/602 933/600 909/349 1292/1399 -f 834/604 909/349 910/350 -f 843/658 844/667 842/666 839/657 -f 842/666 1295/1404 1296/1405 839/657 -f 264/673 1277/1379 1275/1377 841/674 -f 22/675 840/665 832/676 -f 840/665 1297/1406 833/677 1284/1390 -f 840/665 1284/1390 1285/1391 -f 1295/1404 842/666 1293/1401 1294/1403 -f 844/667 936/679 835/678 842/666 -f 581/660 582/668 844/667 843/658 -f 582/668 836/680 936/679 844/667 -f 836/680 582/668 583/681 -f 845/659 2250/2507 846/663 578/662 -f 846/663 1856/671 579/670 578/662 -f 934/762 911/351 849/758 850/759 -f 831/763 848/611 934/762 850/759 -f 932/610 848/611 823/609 847/608 -f 848/611 932/610 910/350 -f 910/350 911/351 934/762 848/611 -f 567/601 854/757 849/758 911/351 -f 854/757 855/623 850/756 849/758 -f 855/623 851/622 857/621 850/756 -f 852/626 853/627 856/620 1270/1370 -f 852/626 558/630 561/629 853/627 -f 562/628 552/632 853/627 561/629 -f 555/625 855/623 854/757 554/760 -f 556/624 851/622 855/623 555/625 -f 558/630 852/626 851/622 556/624 -f 853/627 552/632 861/631 856/620 -f 863/619 858/616 856/620 861/631 -f 1270/1370 856/620 858/616 1269/1369 -f 935/755 831/759 850/756 857/621 -f 858/616 859/615 1268/1367 1269/1369 -f 863/619 864/618 859/615 858/616 -f 552/632 868/753 860/751 861/631 -f 862/749 863/619 861/631 860/751 -f 871/747 864/618 863/619 862/749 -f 874/746 873/617 864/618 871/747 -f 817/145 859/615 864/618 873/617 -f 1267/1366 1268/1368 859/615 817/145 -f 866/750 869/752 875/700 865/699 -f 869/752 867/754 792/518 875/700 -f 869/752 860/751 868/753 867/754 -f 866/750 862/749 860/751 869/752 -f 870/748 871/747 862/749 866/750 -f 872/745 874/746 871/747 870/748 -f 881/744 880/136 874/746 872/745 -f 880/136 818/137 873/617 874/746 -f 822/606 821/605 52/149 816/146 -f 876/151 1265/1364 1266/1365 819/144 -f 819/144 818/137 877/143 876/151 -f 818/137 880/136 879/135 877/143 -f 880/136 881/744 878/134 879/135 -f 881/744 882/231 62/228 878/134 -f 872/745 271/694 882/231 881/744 -f 872/745 870/748 883/696 271/694 -f 870/748 866/750 865/699 883/696 -f 884/122 1019/1113 1020/1114 712/119 -f 455/850 1080/1176 1083/1180 453/851 -f 463/862 466/876 960/1052 961/1053 -f 450/852 951/1043 953/1045 938/1030 -f 453/851 1083/1180 1084/1181 939/1031 -f 451/853 954/1046 955/1047 945/1036 -f 939/1031 1084/1181 1085/1182 945/1036 -f 941/1033 962/1054 963/1055 943/1034 -f 944/1035 456/863 464/879 534/878 -f 447/831 438/828 947/1038 949/1041 -f 950/1042 449/843 444/841 948/1039 -f 949/1040 445/845 446/844 948/1039 -f 950/1042 455/850 453/851 951/1043 -f 955/1047 943/1034 938/1030 953/1045 -f 952/1044 545/855 941/1033 954/1046 -f 951/1043 453/851 939/1031 953/1045 -f 954/1046 941/1033 943/1034 955/1047 -f 957/1049 462/842 461/837 956/1048 -f 467/875 462/842 957/1049 959/1051 -f 944/1035 463/862 961/1053 963/1055 -f 962/1054 941/1033 545/855 958/1050 -f 466/876 467/875 959/1051 960/1052 -f 450/852 938/1030 961/1053 960/1052 -f 456/863 944/1035 963/1055 962/1054 -f 458/854 2552/1502 2553/1501 457/856 -f 952/1044 458/854 457/856 -f 543/941 964/1056 548/942 967/1059 -f 964/1056 543/941 544/864 958/1050 -f 2553/1501 2554/1500 965/1057 457/856 -f 452/858 457/856 965/1057 -f 2554/1500 2556/1504 1086/1183 965/1057 -f 541/866 1074/1169 967/1059 548/942 -f 339/19 969/1061 385/244 386/246 -f 969/1061 339/19 388/22 384/7 -f 393/773 396/774 972/1063 971/1062 -f 973/1064 1188/1285 1187/1284 972/1063 -f 974/1065 1183/1280 1339/1450 1333/1444 -f 493/926 393/773 971/1062 975/1066 -f 1184/1281 1189/1286 1149/1246 975/1066 -f 683/332 684/331 685/329 976/1067 -f 205/495 193/496 979/1072 978/1071 -f 193/496 184/498 980/1073 979/1072 -f 184/498 185/499 981/1074 980/1073 -f 981/1074 185/499 187/500 982/1075 -f 187/500 194/501 983/1076 982/1075 -f 194/501 195/509 984/1077 983/1076 -f 195/509 237/584 994/1087 984/1077 -f 985/1078 200/538 199/540 1002/1095 -f 985/1078 1777/541 2567/542 986/1079 -f 986/1079 2567/542 2568/543 987/1080 -f 987/1080 2568/543 2569/544 988/1081 -f 2569/544 2570/545 989/1082 988/1081 -f 2570/545 2571/1351 1255/1354 989/1082 -f 2572/508 1216/1313 1218/1315 990/1083 -f 297/578 234/577 992/1085 991/1084 -f 234/577 238/580 993/1086 992/1085 -f 238/580 239/510 994/1087 993/1086 -f 243/436 143/434 977/1070 995/1088 -f 246/637 243/436 995/1088 996/1089 -f 254/640 246/637 996/1089 997/1090 -f 997/1090 1830/643 1070/1165 -f 257/464 258/645 1000/1093 999/1092 -f 2573/644 1834/650 1000/1093 998/1091 -f 1835/649 2574/648 1001/1094 999/1092 -f 2574/648 2575/1323 1226/1324 1001/1094 -f 1002/1095 199/540 260/654 1003/1096 -f 1004/1097 2576/651 1848/652 1003/1096 -f 289/564 295/570 1006/1100 1005/1099 -f 295/570 297/578 991/1084 1006/1100 -f 1005/1099 896/569 434/835 1076/1172 -f 261/539 260/654 199/540 1007/1101 -f 1007/1101 199/540 200/538 -f 711/106 708/105 1018/1112 1008/1102 -f 3/121 1410/127 1009/1103 1008/1102 -f 15/108 13/107 1009/1103 1010/1104 -f 1408/128 1418/138 1011/1105 1010/1104 -f 17/139 16/129 1011/1105 1012/1106 -f 1519/160 2577/161 1014/1108 1013/1107 -f 54/159 70/162 1015/1109 1013/1107 -f 77/156 17/139 1012/1106 1016/1110 -f 70/162 76/233 1017/1111 1015/1109 -f 76/233 77/156 1016/1110 1017/1111 -f 1018/1112 708/105 712/119 1020/1114 -f 1019/1113 6/124 5/123 1020/1114 -f 2577/161 1451/195 25/194 1014/1108 -f 8/115 10/126 1022/1116 1021/1115 -f 343/114 706/254 1033/1127 1021/1115 -f 1022/1116 10/126 2652/3023 2666/3039 -f 13/107 15/108 1025/1119 1024/1118 -f 710/100 709/99 1034/1129 1024/1118 -f 15/108 16/129 1026/1120 1025/1119 -f 56/176 69/227 1028/1122 1027/1121 -f 66/130 14/109 1026/1120 1029/1123 -f 69/227 74/163 1030/1124 1028/1122 -f 72/140 66/130 1029/1123 1031/1125 -f 74/163 75/155 1032/1126 1030/1124 -f 75/155 72/140 1031/1125 1032/1126 -f 706/254 387/245 707/253 1033/1127 -f 709/99 713/98 1037/1132 1034/1129 -f 1035/1130 725/118 2707/3081 2715/3089 -f 1035/1130 884/122 712/119 1036/1131 -f 712/119 708/105 1037/1132 1036/1131 -f 1027/1121 55/177 26/178 41/175 -f 1027/1121 41/175 1038/1133 -f 1038/1133 41/175 1039/1134 -f 9/113 2653/3025 2667/3040 1040/1135 -f 1/45 340/21 1045/1140 1040/1135 -f 272/110 273/97 1043/1138 1042/1137 -f 273/97 814/95 1051/1146 1043/1138 -f 706/254 343/114 1045/1140 1044/1139 -f 385/244 1370/1485 1373/1488 1046/1141 -f 386/246 385/244 1046/1141 1044/1139 -f 1048/1143 698/249 699/240 1049/1144 -f 699/240 705/241 1050/1145 1049/1144 -f 705/241 929/243 1047/1142 1050/1145 -f 814/95 721/94 1052/1147 1051/1146 -f 721/94 722/86 1053/1148 1052/1147 -f 722/86 730/85 1054/1149 1053/1148 -f 730/85 724/103 1055/1150 1054/1149 -f 724/103 2708/3082 2716/3090 1055/1150 -f 14/109 66/130 63/112 1042/1137 -f 1056/1151 1374/1489 1381/1496 1170/1267 -f 1057/1152 1375/1490 1368/1483 1058/1153 -f 1059/1154 1376/1491 1374/1489 1056/1151 -f 1059/1154 310/263 696/261 1061/1156 -f 1063/1158 798/2 797/1 1060/1155 -f 1061/1156 696/261 801/260 1062/1157 -f 1380/1495 1379/1494 1062/1157 1063/1158 -f 1371/1486 1377/1492 1060/1155 383/6 -f 334/10 335/11 389/9 1064/1159 -f 802/723 803/727 610/726 -f 1066/1161 159/457 158/456 1068/1163 -f 1067/1162 162/460 159/457 1066/1161 -f 1068/1163 158/456 253/445 1069/1164 -f 1069/1164 253/445 151/444 1256/1355 -f 161/461 162/460 1067/1162 1072/1167 -f 1830/643 2573/644 998/1091 1070/1165 -f 1070/1165 998/1091 256/642 -f 256/642 258/645 1071/1166 -f 258/645 257/464 1072/1167 1071/1166 -f 257/464 259/646 161/461 1072/1167 -f 452/858 965/1057 459/868 1073/1168 -f 459/868 1082/1178 898/867 1073/1168 -f 541/866 1073/1168 898/867 1074/1169 -f 440/830 439/829 1076/1172 1075/1170 -f 1075/1171 434/847 472/848 1077/1173 -f 1077/1173 472/848 448/849 1078/1174 -f 1080/1176 455/850 446/844 1078/1174 -f 1079/1175 471/860 533/869 1081/1177 -f 1079/1175 451/853 945/1036 1085/1182 -f 1082/1178 459/868 965/1057 1086/1183 -f 1080/1176 454/861 937/1029 1083/1180 -f 1083/1180 937/1029 940/1032 1084/1181 -f 1084/1181 940/1032 946/1037 1085/1182 -f 895/871 966/1058 1086/1183 2556/1504 -f 2650/1179 895/871 2556/1504 -f 538/870 2144/2350 898/867 1082/1178 -f 1087/1184 428/811 474/818 429/819 -f 1360/1473 1355/1468 1089/1186 1088/1185 -f 1089/1186 1355/1468 1362/1475 1092/1189 -f 393/773 493/926 1093/1190 1088/1185 -f 1090/1187 403/778 413/793 1091/1188 -f 1091/1188 413/793 1329/1440 1335/1446 -f 493/926 1143/1240 1150/1247 1093/1190 -f 1094/1191 392/770 417/769 1095/1192 -f 399/781 392/770 1094/1191 1096/1193 -f 1098/1195 1099/1196 1095/1192 1097/1194 -f 1096/1193 1101/1198 1152/1249 1151/1248 -f 407/795 1328/1439 1336/1447 1097/1194 -f 400/788 406/792 1327/1438 1337/1448 -f 405/794 414/772 1099/1196 1098/1195 -f 1099/1196 414/772 394/771 1100/1197 -f 1100/1197 394/771 490/780 1101/1198 -f 1101/1198 490/780 1141/1238 1152/1249 -f 497/925 504/935 1103/1200 1102/1199 -f 417/769 510/768 1115/1212 -f 1115/1212 510/768 511/887 1114/1211 -f 399/781 512/886 1105/1202 392/770 -f 512/886 515/883 1106/1203 1105/1202 -f 515/883 519/893 518/888 1106/1203 -f 522/907 486/919 1107/1204 1108/1205 -f 1109/1206 519/893 1146/1243 1153/1250 -f 1109/1206 521/894 551/895 1110/1207 -f 477/890 476/889 1113/1210 1116/1213 -f 1116/1213 1113/1210 511/887 1111/1208 -f 1111/1208 511/887 510/768 1112/1209 -f 427/816 478/817 426/810 1117/1214 -f 426/810 418/801 1118/1215 1117/1214 -f 1118/1215 418/801 419/796 1119/1216 -f 525/896 521/894 1147/1244 1154/1251 -f 523/908 508/918 1121/1218 1120/1217 -f 1124/1221 1125/1222 1122/1219 524/909 -f 516/898 517/897 525/896 1123/1220 -f 525/896 1154/1251 1155/1252 1123/1220 -f 1121/1218 485/917 1125/1222 1120/1217 -f 1124/1221 1120/1217 1125/1222 -f 526/899 1126/1223 481/901 480/900 -f 526/899 1148/1245 1156/1253 1126/1223 -f 524/909 1122/1219 1128/1225 1127/1224 -f 1126/1223 1156/1253 1157/1254 527/902 -f 1127/1224 1128/1225 507/916 1129/1226 -f 1136/1233 527/902 1135/1232 -f 1130/1227 1135/1232 1160/1257 1158/1255 -f 1134/1231 1133/1230 1131/1228 531/910 -f 1130/1227 1158/1255 1159/1256 530/906 -f 1135/1232 527/902 1157/1254 1160/1257 -f 1129/1226 507/916 1133/1230 1134/1231 -f 528/905 1136/1233 1135/1232 1130/1227 -f 528/905 2210/2451 483/904 1136/1233 -f 1132/1229 530/906 1138/1235 1137/1234 -f 530/906 1159/1256 1161/1258 1138/1235 -f 399/781 1096/1193 1151/1248 1140/1237 -f 1141/1238 490/780 1357/1470 1363/1476 -f 1168/1265 328/282 1177/1274 1179/1276 -f 1143/1240 493/926 975/1066 1149/1246 -f 512/886 399/781 1140/1237 1144/1241 -f 513/885 514/884 1145/1242 1144/1241 -f 514/884 522/907 1146/1243 1145/1242 -f 1108/1205 523/908 1147/1244 1153/1250 -f 1148/1245 526/899 1123/1220 1155/1252 -f 532/912 1209/1306 1210/1307 -f 1142/1239 494/928 1185/1282 1189/1286 -f 1143/1240 496/932 498/933 1150/1247 -f 1102/1199 489/924 1151/1248 1152/1249 -f 497/925 1102/1199 1152/1249 1141/1238 -f 522/907 1108/1205 1153/1250 1146/1243 -f 523/908 1120/1217 1154/1251 1147/1244 -f 1154/1251 1120/1217 1124/1221 1155/1252 -f 1148/1245 524/909 1127/1224 1156/1253 -f 1156/1253 1127/1224 1129/1226 1157/1254 -f 1160/1257 1134/1231 531/910 1158/1255 -f 1158/1255 531/910 484/914 1159/1256 -f 1157/1254 1129/1226 1134/1231 1160/1257 -f 1159/1256 484/914 1139/1236 1161/1258 -f 228/275 226/266 1167/1264 1162/1259 -f 80/273 79/272 1163/1260 1162/1259 -f 1163/1260 79/272 328/282 1168/1265 -f 1057/1152 224/267 1166/1263 1170/1267 -f 309/548 308/549 1165/1262 1164/1261 -f 224/267 82/268 1167/1264 1166/1263 -f 433/834 223/547 1165/1262 1169/1266 -f 225/546 1375/1490 1381/1496 1164/1261 -f 1169/1266 432/551 299/552 443/836 -f 491/775 398/776 1172/1269 1171/1268 -f 398/776 397/777 1173/1270 1172/1269 -f 397/777 1326/1437 1338/1449 1173/1270 -f 897/285 395/286 1174/1271 1175/1272 -f 327/291 326/292 1176/1273 1171/1268 -f 326/292 1168/1265 1179/1276 1176/1273 -f 494/928 1142/1239 1179/1276 1177/1274 -f 328/282 85/283 1181/1278 -f 85/283 1942/2100 329/293 1181/1278 -f 971/1062 972/1063 1187/1284 1182/1279 -f 975/1066 971/1062 1182/1279 1184/1281 -f 494/928 499/929 1186/1283 1185/1282 -f 1188/1285 397/777 398/776 1187/1284 -f 1183/1280 411/767 1326/1437 1339/1450 -f 492/927 1142/1239 1189/1286 1184/1281 -f 495/930 1149/1246 1189/1286 1185/1282 -f 499/929 1202/1299 1203/1300 1186/1283 -f 1090/1187 1361/1474 1364/1477 1190/1287 -f 1180/1277 1195/1292 1191/1288 917/294 -f 1202/1299 499/929 1178/1275 1201/1298 -f 1204/1301 501/931 1186/1283 1203/1300 -f 920/297 2615/2952 1194/1291 1193/1290 -f 351/295 2177/2401 500/296 1200/1297 -f 920/297 1193/1290 1196/1293 1197/1294 -f 1196/1293 1192/1289 1198/1295 1197/1294 -f 1192/1289 1195/1292 1180/1277 1198/1295 -f 1197/1294 1200/1297 1199/1296 920/297 -f 351/295 1200/1297 1197/1294 1198/1295 -f 329/293 1191/1288 1195/1292 1201/1298 -f 1201/1298 1195/1292 1192/1289 1202/1299 -f 1192/1289 1196/1293 1203/1300 1202/1299 -f 1203/1300 1196/1293 1193/1290 1204/1301 -f 1204/1301 1193/1290 1194/1291 1205/1302 -f 417/769 1115/1212 1206/1303 407/795 -f 1206/1303 1115/1212 1114/1211 1207/1304 -f 1207/1304 1114/1211 421/807 1208/1305 -f 420/808 475/809 1104/1201 421/807 -f 1208/1305 421/807 1104/1201 -f 1138/1235 1209/1306 529/911 1137/1234 -f 1138/1235 1161/1258 1210/1307 1209/1306 -f 1161/1258 1139/1236 1211/1308 1210/1307 -f 154/451 135/425 366/453 378/764 -f 365/452 377/522 155/448 1212/1309 -f 167/465 181/470 1214/1311 1213/1310 -f 1215/1312 180/486 168/471 1214/1311 -f 1217/1314 204/513 990/1083 1218/1315 -f 1215/1312 211/487 204/513 1217/1314 -f 1216/1313 205/495 978/1071 1218/1315 -f 155/448 167/465 1213/1310 1212/1309 -f 1219/1316 151/444 253/445 1220/1317 -f 1220/1317 253/445 158/456 1221/1318 -f 1221/1318 158/456 159/457 1224/1321 -f 1222/1319 162/460 161/461 1223/1320 -f 1224/1321 159/457 162/460 1222/1319 -f 1225/1322 891/647 918/463 1223/1320 -f 1225/1322 259/646 1001/1094 1226/1324 -f 2575/1323 2576/1069 1004/1098 1226/1324 -f 156/446 152/449 153/447 1219/1316 -f 116/403 110/404 1228/1326 1227/1325 -f 110/404 119/384 1229/1327 1228/1326 -f 124/405 116/403 1227/1325 1230/1328 -f 1236/1334 1237/1335 1231/1329 1230/1328 -f 1237/1335 1238/1336 1232/1330 1231/1329 -f 1238/1336 1241/1339 1233/1331 1232/1330 -f 1241/1339 1242/1340 1234/1332 1233/1331 -f 1227/1325 1228/1326 1239/1337 1235/1333 -f 1228/1326 1229/1327 1240/1338 1239/1337 -f 1240/1338 1305/1415 101/375 106/383 -f 1230/1328 1227/1325 1235/1333 1236/1334 -f 123/392 133/393 1237/1335 1236/1334 -f 133/393 138/419 1238/1336 1237/1335 -f 138/419 148/429 1241/1339 1238/1336 -f 148/429 373/437 1242/1340 1241/1339 -f 373/437 149/443 1243/1341 1242/1340 -f 108/382 107/401 1245/1343 1244/1342 -f 107/401 114/394 1246/1344 1245/1343 -f 114/394 132/391 1247/1345 1246/1344 -f 132/391 140/418 1248/1346 1247/1345 -f 140/418 147/430 1249/1347 1248/1346 -f 147/430 146/441 1250/1348 1249/1347 -f 166/469 182/488 1252/1350 1251/1349 -f 1252/1350 182/488 220/531 1254/1353 -f 203/514 989/1082 1255/1354 1253/1352 -f 1254/1353 220/531 203/514 1253/1352 -f 2571/1351 2572/508 990/1083 1255/1354 -f 167/465 155/448 156/446 1251/1349 -f 373/437 148/429 1250/1348 150/442 -f 1256/1355 150/442 1250/1348 -f 117/406 118/407 1258/1357 1257/1356 -f 118/407 553/408 1259/1358 1258/1357 -f 553/408 120/385 1260/1359 1259/1358 -f 124/405 126/410 1261/1360 1257/1356 -f 126/410 127/413 1262/1361 1261/1360 -f 127/413 137/420 1263/1362 1262/1361 -f 1263/1362 137/420 371/427 1264/1363 -f 52/149 1265/1364 44/150 47/148 -f 1265/1364 52/149 821/605 1266/1365 -f 1266/1365 821/605 831/612 1267/1366 -f 1267/1366 831/612 1268/1368 -f 1268/1367 831/614 935/755 1269/1369 -f 1269/1369 935/755 857/621 1270/1370 -f 1270/1370 857/621 851/622 852/626 -f 1272/1373 886/218 363/204 1271/1372 -f 363/204 886/218 362/207 914/205 -f 1446/1371 1382/1505 1271/1374 915/202 -f 2719/1372 1382/1506 2718/1497 -f 2720/1372 2721/1497 1273/219 -f 1271/1372 1273/219 1272/1373 -f 1274/1375 18/220 841/226 1275/1376 -f 1276/1378 262/664 840/665 1277/1379 -f 1277/1379 840/665 22/675 1275/1377 -f 263/672 1854/2006 845/659 1276/1378 -f 23/216 886/206 1278/1380 1274/1375 -f 31/181 1279/1381 29/191 24/190 -f 24/190 29/191 1280/1383 -f 29/191 1279/1381 33/196 914/205 -f 1280/1382 29/191 914/205 -f 19/209 24/190 1280/1384 1281/1385 -f 1280/1384 914/208 362/207 1281/1385 -f 19/209 1281/1385 20/214 1282/1386 -f 1282/1386 20/214 832/222 1283/1387 -f 1285/1391 1283/1388 832/676 840/665 -f 1283/1387 1284/1389 829/213 1282/1386 -f 1284/1390 1283/1388 1285/1391 -f 829/213 1284/1389 833/223 1286/1392 -f 1286/1392 830/210 1288/1395 887/188 -f 1287/1394 887/188 1288/1395 -f 1288/1395 830/210 1289/1396 -f 830/210 838/224 1290/1397 1289/1396 -f 838/224 835/603 1291/1398 1290/1397 -f 1291/1398 835/603 1292/1399 -f 835/603 936/225 837/602 1292/1399 -f 837/602 936/225 836/363 569/356 -f 910/350 909/349 933/600 911/351 -f 830/210 1286/1392 833/223 1294/1402 -f 1294/1403 833/677 1297/1406 1295/1404 -f 1295/1404 1297/1406 1298/1407 1296/1405 -f 1296/1405 1298/1407 845/659 -f 1297/1406 840/665 262/664 1298/1407 -f 262/664 1276/1378 845/659 1298/1407 -f 106/383 101/375 1299/1408 1244/1342 -f 101/375 100/371 1300/1409 1299/1408 -f 1300/1409 100/371 572/370 96/369 -f 577/374 572/370 1301/1410 1302/1411 -f 570/682 584/669 1303/1413 1302/1412 -f 584/669 580/661 1304/1414 1303/1413 -f 1312/1422 1313/1423 98/372 1310/1420 -f 1229/1327 1307/1417 1305/1415 1240/1338 -f 1307/1417 1308/1418 1306/1416 1305/1415 -f 1306/1416 1308/1418 1301/1410 -f 119/384 99/373 1307/1417 1229/1327 -f 99/373 98/372 1308/1418 1307/1417 -f 1308/1418 98/372 1313/1423 1301/1410 -f 120/385 565/357 1309/1419 1260/1359 -f 565/357 97/359 1310/1420 1309/1419 -f 97/359 571/360 1311/1421 1310/1420 -f 1312/1422 1310/1420 1311/1421 -f 1311/1421 571/360 1312/1422 -f 571/360 1301/1410 1313/1423 1312/1422 -f 104/365 102/366 94/367 1314/1424 -f 1314/1424 94/367 92/379 1315/1425 -f 1315/1425 92/379 91/389 1316/1426 -f 1319/1429 1596/398 1318/1428 -f 143/434 105/397 1317/1427 977/1070 -f 1317/1427 105/397 1316/1426 1318/1428 -f 1318/1428 1316/1426 91/389 1319/1429 -f 91/389 93/378 1320/1430 1319/1429 -f 93/378 576/377 1321/1431 1320/1430 -f 1321/1432 576/685 1322/1433 -f 1323/1434 315/279 316/287 1324/1435 -f 1325/1436 323/258 315/279 1323/1434 -f 1324/1435 316/287 1173/1270 1338/1449 -f 1336/1447 408/790 400/788 1337/1448 -f 406/792 1356/1469 1365/1478 1327/1438 -f 973/1064 412/779 1329/1440 1333/1444 -f 1328/1439 407/795 419/796 1330/1441 -f 1330/1441 419/796 418/801 1331/1442 -f 418/801 428/811 1332/1443 1331/1442 -f 422/813 425/812 1332/1443 1334/1445 -f 1188/1285 973/1064 1333/1444 1339/1450 -f 412/779 1092/1189 1335/1446 1329/1440 -f 1328/1439 415/797 408/790 1336/1447 -f 405/794 1098/1195 1337/1448 1327/1438 -f 1326/1437 411/767 1174/1271 1338/1449 -f 1326/1437 397/777 1188/1285 1339/1450 -f 1048/1143 694/248 323/258 1325/1436 -f 974/1065 1347/1458 1354/1467 1183/1280 -f 1343/1454 1345/1452 970/782 1342/1453 -f 921/786 410/785 1349/1460 1350/1461 -f 410/785 2643/1508 1348/1459 1349/1460 -f 1340/1451 1190/1287 1343/1454 1342/1453 -f 1190/1287 1364/1477 1366/1479 1343/1454 -f 1366/1479 1367/1480 1345/1457 1343/1454 -f 970/782 1352/1465 1351/1463 1350/1462 -f 974/1065 413/793 403/778 1347/1458 -f 403/778 1340/1451 1348/1459 1347/1458 -f 1340/1451 1342/1453 1349/1460 1348/1459 -f 1342/1453 970/782 1350/1461 1349/1460 -f 1345/1464 1351/1482 1352/1465 970/782 -f 1383/1507 2026/1498 411/767 1183/1280 -f 1354/1467 1383/1507 1183/1280 -f 1088/1185 1093/1190 1357/1470 1360/1473 -f 1361/1474 1090/1187 1091/1188 1356/1469 -f 1365/1478 1335/1446 1092/1189 1362/1475 -f 1150/1247 498/933 1358/1471 1363/1476 -f 498/933 550/936 1359/1472 1358/1471 -f 394/771 414/772 1355/1468 1360/1473 -f 1355/1468 414/772 405/794 1362/1475 -f 1093/1190 1150/1247 1363/1476 1357/1470 -f 1361/1474 404/784 1341/783 1364/1477 -f 1356/1469 1091/1188 1335/1446 1365/1478 -f 1364/1477 1341/783 1344/1455 1366/1479 -f 1344/1455 1346/1456 1367/1480 1366/1479 -f 1346/1456 2646/3002 1353/1466 1367/1480 -f 1345/1464 1367/1481 1353/806 1351/1482 -f 1376/1491 1059/1154 1061/1156 1378/1493 -f 1380/1495 1063/1158 1060/1155 1377/1492 -f 1369/1484 387/245 1046/1141 1373/1488 -f 1370/1485 385/244 969/1061 1371/1486 -f 1378/1493 1061/1156 1062/1157 1379/1494 -f 1372/1487 707/253 387/245 1369/1484 -f 1370/1485 704/242 1047/1142 1373/1488 -f 1374/1489 309/548 1164/1261 1381/1496 -f 1375/1490 225/546 227/299 1368/1483 -f 1376/1491 307/554 309/548 1374/1489 -f 1065/1160 391/563 1379/1494 1380/1495 -f 1371/1486 969/1061 384/7 1377/1492 -f 1375/1490 1057/1152 1170/1267 1381/1496 -f 1354/1467 1347/1458 1348/1459 2643/1508 -f 2026/1509 1354/1467 2643/1508 -f 2552/1502 458/854 1081/1177 2142/1503 -f 1383/1507 1354/1467 2026/1509 -f 1387/1513 2669/3042 2668/3041 1384/1510 -f 1385/1511 1389/1515 2670/3043 2668/3041 -f 1390/1516 1392/1518 1388/1514 1391/1517 -f 1391/1517 1394/1520 1393/1519 1390/1516 -f 2/1521 1395/1523 1393/1519 8/1522 -f 3/1525 4/1524 1397/1527 1396/1526 -f 1399/1529 2672/3045 2671/3044 1398/1528 -f 1400/1530 1403/1533 1402/1532 1401/1531 -f 1404/1534 1406/1536 1402/1532 1405/1535 -f 1405/1535 1407/1537 1396/1526 1404/1534 -f 1409/1539 1408/1538 1410/1540 1407/1537 -f 1400/1530 1413/1543 1412/1542 1411/1541 -f 1411/1541 1414/1544 1403/1533 1400/1530 -f 1415/1545 1417/1547 1409/1539 1416/1546 -f 1418/1548 1417/1547 1420/1550 1419/1549 -f 1422/1552 1421/1551 1424/1554 1423/1553 -f 1423/1553 1424/1554 1426/1556 1425/1555 -f 1427/1557 1428/1560 18/1559 2649/1558 -f 1431/1563 1430/1562 1429/1561 1432/1564 -f 1433/1565 1436/1568 1435/1567 1434/1566 -f 1437/1569 1434/1566 1435/1567 1438/1570 -f 1432/1564 1429/1561 1440/1572 1439/1571 -f 1441/1573 1431/1563 1432/1564 -f 1431/1563 1441/1573 1442/1574 1428/1560 -f 1444/1576 1443/1575 1434/1566 1437/1569 -f 1445/1577 1448/1580 1447/1579 1446/1578 -f 1448/1580 1445/1577 1449/1581 1450/1582 -f 1450/1582 1449/1581 1451/1583 1425/1555 -f 1425/1555 1426/1556 1452/1584 1450/1582 -f 1426/1556 1455/1587 1454/1586 1453/1585 -f 1426/1556 1453/1585 1452/1584 -f 1452/1584 1453/1585 1456/1588 1457/1589 -f 1458/1590 1456/1588 1453/1585 1459/1591 -f 1460/1592 1461/1593 1456/1588 1458/1590 -f 1462/1594 1460/1592 1458/1590 1463/1595 -f 1443/1575 1444/1576 1462/1594 1464/1596 -f 1465/1597 1443/1575 1464/1596 1466/1598 -f 1467/1599 1465/1597 1466/1598 1468/1600 -f 1457/1589 1456/1588 1461/1593 1469/1601 -f 1469/1601 1461/1593 1470/1602 1471/1603 -f 1450/1582 1452/1584 1457/1589 1448/1580 -f 1448/1580 1457/1589 1469/1601 1447/1579 -f 1471/1603 1472/1604 1447/1579 1469/1601 -f 1474/1606 1473/1605 1466/1598 1464/1596 -f 1463/1595 1474/1606 1464/1596 1462/1594 -f 1463/1595 1458/1590 1459/1591 1475/1607 -f 1477/1609 1476/1608 1459/1591 1453/1585 -f 1454/1586 1477/1609 1453/1585 -f 1476/1608 1477/1609 1479/1611 1478/1610 -f 1480/1612 1476/1608 1478/1610 1481/1613 -f 1480/1612 1481/1613 1483/1615 1482/1614 -f 1484/1616 1482/1614 1483/1615 -f 1482/1614 1484/1616 1485/1617 1486/1618 -f 1476/1608 1480/1612 1475/1607 1459/1591 -f 1486/1618 1475/1607 1480/1612 1482/1614 -f 1486/1618 1485/1617 1473/1605 1474/1606 -f 1475/1607 1486/1618 1474/1606 1463/1595 -f 1468/1600 1466/1598 1473/1605 1487/1619 -f 1487/1619 1473/1605 1485/1617 1488/1620 -f 1490/1622 1489/1621 1484/1616 1483/1615 -f 1491/1623 1490/1622 1483/1615 1492/1624 -f 1421/1551 1493/1625 1479/1611 1424/1554 -f 1481/1613 1478/1610 1494/1626 1495/1627 -f 1483/1615 1481/1613 1495/1627 1492/1624 -f 1491/1623 1492/1624 1496/1628 1497/1629 -f 1497/1629 1496/1628 1498/1630 1499/1631 -f 1499/1631 1498/1630 1500/1632 1501/1633 -f 1501/1633 1500/1632 1502/1634 1503/1635 -f 1504/1636 1502/1634 1500/1632 1505/1637 -f 1506/1638 1502/1634 1504/1636 1412/1542 -f 1507/1639 1501/1633 1503/1635 1508/1640 -f 1503/1635 1502/1634 1506/1638 1509/1641 -f 1415/1545 1414/1544 1511/1643 1510/1642 -f 1512/1644 1504/1636 1505/1637 1513/1645 -f 1505/1637 1500/1632 1498/1630 1514/1646 -f 1514/1646 1498/1630 1496/1628 1515/1647 -f 1515/1647 1496/1628 1492/1624 1495/1627 -f 1516/1648 1515/1647 1495/1627 1494/1626 -f 1493/1625 1421/1551 1518/1650 1517/1649 -f 1422/1552 1519/1651 1521/1653 1520/1652 -f 1419/1549 1420/1550 1523/1655 1522/1654 -f 1510/1642 1511/1643 1525/1657 1524/1656 -f 1513/1645 1505/1637 1514/1646 1526/1658 -f 1526/1658 1514/1646 1515/1647 1516/1648 -f 1517/1649 1518/1650 1528/1660 1527/1659 -f 1520/1652 1521/1653 1530/1662 1529/1661 -f 1522/1654 1523/1655 1529/1661 1530/1662 -f 1524/1656 1525/1657 1527/1659 1528/1660 -f 1532/1665 1531/1664 890/1663 81/1666 -f 1532/1665 81/1666 83/1667 1533/1668 -f 1533/1668 83/1667 78/1669 1534/1670 -f 1533/1668 1536/1672 1535/1671 1532/1665 -f 1535/1671 1537/1673 1539/1675 1538/1674 -f 1539/1675 1541/1677 1540/1676 1538/1674 -f 890/1663 1531/1664 1542/1678 85/1679 -f 889/1682 84/1681 1543/1680 1544/1683 -f 1543/1680 84/1681 897/1685 1545/1684 -f 1547/1687 1973/2140 1546/1686 1548/1688 -f 1546/2132 1970/2134 1549/2133 1548/3018 -f 1550/2137 1546/2132 1552/2138 1551/3019 -f 1553/1693 1550/1690 1551/1691 1554/1694 -f 1555/1695 1558/1698 1557/1697 1556/1696 -f 1561/1701 1560/1700 1559/1699 1562/1702 -f 1563/1703 1561/1701 1562/1702 1564/1704 -f 1556/1696 1557/1697 1565/1706 1596/1705 -f 1560/1700 1567/1708 1566/1707 -f 1568/1709 1567/1708 1560/1700 1561/1701 -f 1561/1701 1569/1710 1568/1709 -f 1561/1701 1563/1703 1570/1711 1569/1710 -f 1571/1712 1563/1703 1573/1714 1572/1713 -f 1576/1717 1575/1716 1574/1715 1577/1718 -f 1579/1720 1578/1719 1581/1722 1580/1721 -f 1571/1712 1572/1713 1583/1724 1582/1723 -f 1570/1711 1584/1725 1586/1727 1585/1726 -f 1569/1710 1570/1711 1585/1726 1587/1728 -f 1587/1728 1590/1731 1589/1730 1588/1729 -f 1589/1730 1592/1733 1591/1732 1588/1729 -f 1592/1733 1594/1735 1593/1734 1591/1732 -f 1595/1736 1597/1738 1596/1737 -f 1585/1726 1586/1727 1599/1740 1598/1739 -f 1587/1728 1585/1726 1598/1739 1590/1731 -f 1600/1741 1602/1743 1599/1740 1601/1742 -f 1590/1731 1598/1739 1603/1744 1604/1745 -f 1605/1746 1606/1747 1602/1743 1600/1741 -f 1600/1741 1608/1749 1607/1748 1605/1746 -f 1601/1742 1609/1750 1608/1749 1600/1741 -f 1592/1733 1589/1730 1611/1752 1610/1751 -f 1611/1752 1589/1730 1590/1731 1604/1745 -f 1604/1745 1603/1744 1612/1753 1613/1754 -f 1614/1755 1615/1756 1606/1747 1605/1746 -f 1605/1746 1607/1748 1616/1757 1614/1755 -f 1617/1758 1620/1761 1619/1760 1618/1759 -f 1621/1762 1622/1763 1620/1761 1617/1758 -f 1623/1764 1624/1765 1622/1763 1621/1762 -f 1580/1721 1581/1722 1624/1765 1623/1764 -f 1627/1768 1626/1767 1625/1766 1628/1769 -f 1594/1735 1592/1733 1610/1751 1629/1770 -f 1611/1752 1604/1745 1613/1754 1630/1771 -f 1613/1754 1612/1753 1631/1772 1632/1773 -f 1633/1774 1634/1775 1615/1756 1614/1755 -f 1635/1776 1618/1759 1637/1778 1636/1777 -f 1619/1760 1638/1779 1640/1781 1639/1780 -f 1640/1781 1641/1782 1642/1783 1639/1780 -f 1641/1782 1643/1784 1644/1785 1642/1783 -f 1645/1786 1646/1787 1636/1777 1637/1778 -f 1610/1751 1611/1752 1630/1771 1647/1788 -f 1630/1771 1613/1754 1632/1773 1648/1789 -f 1632/1773 1631/1772 1649/1790 1650/1791 -f 1651/1792 1652/1793 1634/1775 1633/1774 -f 1653/1794 1654/1795 1646/1787 1645/1786 -f 1655/1796 1658/1799 1644/1785 1657/1798 -f 1644/1785 1643/1784 1657/1798 -f 1655/1796 1657/1798 1656/1797 -f 1657/1798 1659/1800 1656/1797 -f 1659/1800 1699/1841 1660/1801 1656/1797 -f 1661/1802 1656/1797 1660/1801 1662/1803 -f 1655/1796 1656/1797 1661/1802 1663/1804 -f 1663/1804 1665/1806 1664/1805 1658/1799 -f 1655/1796 1663/1804 1658/1799 -f 1664/1805 1666/1807 1654/1795 1653/1794 -f 1667/1808 1668/1809 1652/1793 1651/1792 -f 1650/1791 1649/1790 1669/1810 1670/1811 -f 1648/1789 1632/1773 1650/1791 1671/1812 -f 1647/1788 1630/1771 1648/1789 1672/1813 -f 1629/1770 1610/1751 1647/1788 1673/1814 -f 1596/1737 1597/1738 1674/1816 144/1815 -f 1675/1817 1666/1807 1664/1805 1665/1806 -f 1671/1812 1650/1791 1670/1811 1676/1818 -f 1670/1811 1669/1810 1677/1819 1678/1820 -f 1677/1819 1668/1809 1680/1822 1679/1821 -f 1684/1826 1680/1822 1683/1825 1681/1823 -f 1681/1823 1683/1825 1682/1824 -f 1685/1827 1688/1830 1687/1829 1686/1828 -f 1684/1826 1681/1823 1689/1831 1686/1828 -f 1690/1832 1685/1827 1692/1834 1691/1833 -f 1693/1835 1692/1834 1689/1831 1694/1836 -f 1695/1837 1698/1840 1697/1839 1696/1838 -f 1695/1837 1660/1801 1699/1841 1700/1842 -f 1698/1840 1695/1837 1700/1842 1701/1843 -f 1688/1830 1685/1827 1703/1845 1702/1844 -f 1688/1830 1704/1846 1705/1847 1687/1829 -f 1704/1846 1707/1849 1706/1848 1705/1847 -f 1708/1850 1678/1820 1710/1852 1709/1851 -f 1711/1853 1708/1850 1709/1851 1712/1854 -f 1713/1855 1711/1853 1712/1854 1714/1856 -f 1715/1857 1718/1860 1717/1859 1716/1858 -f 1719/1861 1699/1841 1659/1800 -f 1720/1862 1722/1864 1703/1845 1721/1863 -f 1701/1843 1700/1842 1724/1866 1723/1865 -f 1724/1866 1700/1842 1699/1841 1725/1867 -f 1726/1868 1725/1867 1699/1841 1719/1861 -f 1727/1869 1726/1868 1719/1861 1728/1870 -f 1727/1869 1728/1870 1729/1871 1730/1872 -f 1733/1875 1732/1874 1731/1873 1734/1876 -f 1732/1874 1733/1875 1735/1877 1730/1872 -f 1736/1878 1732/1874 1730/1872 1729/1871 -f 1737/1879 1727/1869 1730/1872 1735/1877 -f 1726/1868 1727/1869 1737/1879 1738/1880 -f 1725/1867 1726/1868 1738/1880 1739/1881 -f 1725/1867 1739/1881 1740/1882 1724/1866 -f 1741/1883 1720/1862 1723/1865 1742/1884 -f 1720/1862 1741/1883 1743/1885 1722/1864 -f 1745/1887 1702/1844 1744/1886 1746/1888 -f 1747/1889 1737/1879 1735/1877 1748/1890 -f 1748/1890 1735/1877 1733/1875 1749/1891 -f 1750/1892 1753/1895 1752/1894 1751/1893 -f 1754/1896 1755/1897 1753/1895 1750/1892 -f 1754/1896 1747/1889 1756/1898 1755/1897 -f 1747/1889 1748/1890 1757/1899 1756/1898 -f 1748/1890 1749/1891 1758/1900 1757/1899 -f 1749/1891 1760/1902 1759/1901 1758/1900 -f 1760/1902 1749/1891 1733/1875 1734/1876 -f 1734/1876 1731/1873 1761/1903 1762/1904 -f 1763/1905 1761/1903 1731/1873 1764/1906 -f 1761/1903 1763/1905 1765/1907 1766/1908 -f 1767/1909 1765/1907 1763/1905 1768/1910 -f 1760/1902 1769/1911 1770/1912 1759/1901 -f 1769/1911 1760/1902 1734/1876 1762/1904 -f 1718/1860 1715/1857 1771/1913 1772/1914 -f 1772/1914 1771/1913 1774/1916 1773/1915 -f 1775/1917 1773/1915 1774/1916 1776/1918 -f 1777/1919 1780/1922 1779/1921 1778/1920 -f 1775/1917 1781/1923 1782/1924 1778/1920 -f 1781/1923 1783/1925 1784/1926 1782/1924 -f 1783/1925 1785/1927 1786/1928 1784/1926 -f 1785/1927 1787/1929 1788/1930 1786/1928 -f 1789/1931 1792/1934 1791/1933 1790/1932 -f 1751/1893 1752/1894 1794/1936 1793/1935 -f 1775/1917 1776/1918 1781/1923 -f 1781/1923 1776/1918 1795/1937 1783/1925 -f 1783/1925 1795/1937 1796/1938 1785/1927 -f 1785/1927 1796/1938 1797/1939 1787/1929 -f 1741/1883 1789/1931 1790/1932 1743/1885 -f 1740/1882 1751/1893 1793/1935 1742/1884 -f 1751/1893 1740/1882 1739/1881 1750/1892 -f 1750/1892 1739/1881 1738/1880 1754/1896 -f 1754/1896 1738/1880 1737/1879 1747/1889 -f 1795/1937 1776/1918 1774/1916 1798/1940 -f 1688/1830 1702/1844 1745/1887 1704/1846 -f 1707/1849 1704/1846 1745/1887 1799/1941 -f 1707/1849 1715/1857 1716/1858 1706/1848 -f 1799/1941 1771/1913 1715/1857 1707/1849 -f 1774/1916 1771/1913 1799/1941 1798/1940 -f 1796/1938 1795/1937 1798/1940 1746/1888 -f 1797/1939 1796/1938 1746/1888 1744/1886 -f 1799/1941 1745/1887 1746/1888 1798/1940 -f 86/1942 1801/1945 1800/1944 227/1943 -f 1802/1946 1805/1949 1804/1948 1803/1947 -f 1800/1944 1801/1945 1807/1951 1806/1950 -f 1534/1670 78/1669 1058/1953 1808/1952 -f 1809/1954 1536/1672 1805/1949 1802/1946 -f 1762/1904 1761/1903 1766/1908 1810/1955 -f 1766/1908 1765/1907 1811/1956 1812/1957 -f 1812/1957 1811/1956 1813/1958 1814/1959 -f 1815/1960 1812/1957 1814/1959 1816/1961 -f 1817/1962 1815/1960 1816/1961 1818/1963 -f 1819/1965 356/1964 236/1967 1820/1966 -f 1815/1960 1817/1962 1821/1968 1810/1955 -f 235/1969 1822/1970 1820/1966 236/1967 -f 237/1971 1770/1912 1822/1970 235/1969 -f 1810/1955 1821/1968 1769/1911 1762/1904 -f 1812/1957 1815/1960 1810/1955 1766/1908 -f 144/1815 1674/1816 1823/1973 247/1972 -f 1673/1814 1647/1788 1672/1813 1824/1974 -f 1672/1813 1648/1789 1671/1812 1825/1975 -f 247/1972 1823/1973 1827/1977 1826/1976 -f 1824/1974 1672/1813 1825/1975 1828/1978 -f 1825/1975 1671/1812 1676/1818 1829/1979 -f 1676/1818 1670/1811 1678/1820 1708/1850 -f 1678/1820 1677/1819 1679/1821 1710/1852 -f 1826/1976 1827/1977 1831/1981 1830/1980 -f 1828/1978 1825/1975 1829/1979 1832/1982 -f 1829/1979 1676/1818 1708/1850 1711/1853 -f 1832/1982 1829/1979 1711/1853 1713/1855 -f 1832/1982 1833/1983 1831/1981 1828/1978 -f 1834/1984 1837/1987 1836/1986 1835/1985 -f 1838/1988 1837/1987 1839/1989 1832/1982 -f 1840/1990 1842/1992 1836/1986 1841/1991 -f 1840/1990 1844/1994 1717/1859 1843/1993 -f 1845/1995 1847/1997 1846/1996 1843/1993 -f 1780/1922 1848/1998 1849/1999 1779/1921 -f 1850/2000 1849/1999 1847/2001 1845/1995 -f 1850/2000 1845/1995 1718/1860 1772/1914 -f 1851/2003 2256/2513 845/2002 1852/2004 -f 263/2008 264/2007 1855/2009 1854/2006 -f 1558/2012 1555/2011 1856/2010 1857/2013 -f 1858/2014 1767/1909 1768/1910 1859/2015 -f 1860/2016 1768/1910 1763/1905 1764/1906 -f 1859/2015 1768/1910 1860/2016 1861/2017 -f 1862/2018 1859/2015 1861/2017 1863/2019 -f 1862/2018 1863/2019 1864/2020 1865/2021 -f 1866/2022 1864/2020 1863/2019 1867/2023 -f 1864/2020 1866/2022 1868/2024 1869/2025 -f 1870/2026 1868/2024 1866/2022 1871/2027 -f 1508/1640 1868/2024 1870/2026 1507/1639 -f 1508/1640 1503/1635 1509/1641 1872/2028 -f 1509/1641 1506/1638 1873/2029 1874/2030 -f 1401/1531 1875/2031 1413/1543 1400/1530 -f 1871/2027 1866/2022 1867/2023 1876/2032 -f 1877/2033 1867/2023 1863/2019 1861/2017 -f 1878/2034 1877/2033 1861/2017 1860/2016 -f 1876/2032 1867/2023 1877/2033 1879/2035 -f 1879/2035 1877/2033 1878/2034 1880/2036 -f 1865/2021 1864/2020 1869/2025 1881/2037 -f 1872/2028 1869/2025 1868/2024 1508/1640 -f 1872/2028 1509/1641 1874/2030 1882/2038 -f 1869/2025 1872/2028 1882/2038 1881/2037 -f 1661/1802 1884/2040 1883/2039 1663/1804 -f 1885/2041 1888/2044 1887/2043 1886/2042 -f 1889/2045 1886/2042 1887/2043 1890/2046 -f 1892/2048 2686/3060 2685/3059 1891/2047 -f 1894/2050 2687/3061 2685/3059 1889/2045 -f 1894/2050 1889/2045 1890/2046 1895/2051 -f 1890/2046 1887/2043 1896/2052 1897/2053 -f 1896/2052 1887/2043 1888/2044 1898/2054 -f 1899/2056 896/2055 357/2058 1900/2057 -f 356/1964 1819/1965 1900/2057 357/2058 -f 1896/2052 1898/2054 1818/1963 1816/1961 -f 1897/2053 1896/2052 1816/1961 1814/1959 -f 1893/2049 2674/3047 2673/3046 1891/2047 -f 1903/2061 2675/3048 2674/3047 1893/2049 -f 1894/2050 1905/2063 2688/3062 2687/3061 -f 1905/2063 1907/2065 2689/3063 2688/3062 -f 1910/2068 2677/3050 2676/3049 1908/2066 -f 1904/2062 2675/3048 2677/3050 1910/2068 -f 1911/2069 1902/2060 1904/2062 1912/2070 -f 1901/2059 1902/2060 1911/2069 1913/2071 -f 1913/2071 1911/2069 1914/2072 1915/2073 -f 1915/2073 1914/2072 1916/2074 1917/2075 -f 1918/2076 1802/1946 1803/1947 1919/2077 -f 1802/1946 1918/2076 1920/2078 1809/1954 -f 1809/1954 1920/2078 1921/2079 1537/1673 -f 1916/2074 1924/2082 1923/2081 1922/2080 -f 1918/2076 1926/2084 1925/2083 1920/2078 -f 1920/2078 1925/2083 1927/2085 1921/2079 -f 1921/2079 1927/2085 1928/2086 1929/2087 -f 1930/2088 1928/2086 1927/2085 1931/2089 -f 1928/2086 1930/2088 1932/2090 1933/2091 -f 1543/1680 1545/1684 1935/2093 1934/2092 -f 1929/2087 1928/2086 1933/2091 1936/2094 -f 1937/2095 1925/2083 1926/2084 1938/2096 -f 1925/2083 1937/2095 1931/2089 1927/2085 -f 1931/2089 1939/2097 1930/2088 -f 1544/1683 1543/1680 1934/2092 1940/2098 -f 1939/2097 1931/2089 1937/2095 1941/2099 -f 1537/1673 1921/2079 1929/2087 1539/1675 -f 1539/1675 1929/2087 1936/2094 1541/1677 -f 1942/2100 1542/1678 1944/2102 1943/2101 -f 329/2103 1942/2100 1943/2101 1945/2104 -f 1946/2107 351/2106 917/2105 1947/2108 -f 1949/2110 1948/2109 1387/1513 1384/1510 -f 1950/2111 1387/1513 1948/2109 1951/2112 -f 1952/2113 1950/2111 1951/2112 1953/2114 -f 1954/2115 1952/2113 1953/2114 1955/2116 -f 1908/2066 1954/2115 1955/2116 1956/2117 -f 1910/2068 1908/2066 1956/2117 1957/2118 -f 1904/2062 1910/2068 1957/2118 1912/2070 -f 1911/2069 1912/2070 1958/2119 1914/2072 -f 1949/2110 1392/1518 1960/2121 1959/2120 -f 1949/2110 1959/2120 1961/2122 1948/2109 -f 1948/2109 1961/2122 1962/2123 1951/2112 -f 1951/2112 1962/2123 1963/2124 1953/2114 -f 1955/2116 1953/2114 1963/2124 1964/2125 -f 1956/2117 1966/2127 1965/2126 1957/2118 -f 1957/2118 1965/2126 1958/2119 1912/2070 -f 1387/1513 1950/2111 2678/3051 2669/3042 -f 1950/2111 1952/2113 2679/3052 2678/3051 -f 1952/2113 1954/2115 2680/3053 2679/3052 -f 1954/2115 1908/2066 2676/3049 2680/3053 -f 1465/1597 1433/1565 1434/1566 1443/1575 -f 1546/2132 1550/2137 1971/2135 1970/2134 -f 1553/2136 1970/2134 1971/2135 1550/2137 -f 1547/1687 1548/1688 1972/2139 1973/2140 -f 1973/2140 1551/1691 1552/1692 1546/1686 -f 1551/1691 1973/2140 1972/2139 1554/1694 -f 1691/1833 1975/2142 1974/2141 1697/1839 -f 1976/2143 1662/1803 1696/1838 1977/2144 -f 1662/1803 1976/2143 1884/2040 1661/1802 -f 1665/1806 1663/1804 1883/2039 1978/2145 -f 1681/1823 1979/2146 1694/1836 1689/1831 -f 1980/2147 1982/2149 1979/2146 1981/2148 -f 1979/2146 1681/1823 1981/2148 -f 1983/2150 1982/2149 1980/2147 1675/1817 -f 1983/2150 1675/1817 1665/1806 1978/2145 -f 1980/2147 1981/2148 1984/2151 1675/1817 -f 1984/2151 1666/1807 1675/1817 -f 1974/2141 1977/2144 1696/1838 1697/1839 -f 1693/1835 1975/2142 1691/1833 1692/1834 -f 1986/2153 1985/2152 1988/2155 1987/2154 -f 1990/2157 1989/2156 1992/2159 1991/2158 -f 1993/2160 1996/2163 1995/2162 1994/2161 -f 1998/2165 1997/2164 2000/2167 1999/2166 -f 2001/2168 2003/2170 1960/2121 2002/2169 -f 1963/2124 1962/2123 1985/2152 1986/2153 -f 1986/2153 1966/2127 1964/2125 -f 2004/2171 1965/2126 1966/2127 1986/2153 -f 1965/2126 2004/2171 1924/2082 1958/2119 -f 1914/2072 1958/2119 1924/2082 1916/2074 -f 2005/2172 2185/2415 2007/2174 2006/2173 -f 2008/2175 2011/2178 2010/2177 2009/2176 -f 2013/2180 2012/2179 2015/2182 2014/2181 -f 2017/2184 2016/2183 2019/2186 2018/2185 -f 2020/2187 1936/2094 1933/2091 2021/2188 -f 2021/2188 1933/2091 1932/2090 2022/2189 -f 1545/1684 2024/2191 2023/2190 1935/2093 -f 2025/2192 2024/2191 1175/2194 2026/2193 -f 2027/2195 2028/2196 2014/2181 2015/2182 -f 2027/2195 2015/2182 2030/2198 2029/2197 -f 2032/2200 2031/2199 2008/2175 2009/2176 -f 2033/2201 2036/2204 2035/2203 2034/2202 -f 404/2207 401/2206 2037/2205 2038/2208 -f 402/2210 2039/2209 2037/2205 401/2206 -f 2040/2211 2043/2214 2042/2213 2041/2212 -f 404/2207 2038/2208 2045/2216 2044/2215 -f 2047/2218 2046/2217 2049/2220 2048/2219 -f 409/2222 2050/2221 2039/2209 402/2210 -f 2052/2224 2051/2223 2054/2226 2053/2225 -f 924/2228 1351/2227 2055/2230 921/2229 -f 2056/2231 2059/2234 2058/2233 2057/2232 -f 2060/2235 2006/2173 2010/2177 2047/2218 -f 2060/2235 2595/2922 2062/2237 2061/2236 -f 2050/2221 2065/2240 2064/2239 2063/2238 -f 2065/2240 2050/2221 409/2222 893/2241 -f 2061/2236 2062/2237 2067/2243 2066/2242 -f 2065/2240 2069/2245 2068/2244 2064/2239 -f 893/2241 892/2246 2069/2245 2065/2240 -f 892/2246 473/2248 2070/2247 2069/2245 -f 476/2251 2072/2250 2071/2249 420/2252 -f 475/2253 2075/2257 2074/2256 427/2254 -f 2074/2256 2073/2255 427/2254 -f 2074/2256 2066/2242 2067/2243 2073/2255 -f 2076/2258 2078/2260 2077/2259 -f 2068/2244 2069/2245 2070/2247 2079/2261 -f 2080/2262 2070/2247 473/2248 424/2263 -f 2080/2262 424/2263 423/2264 2081/2265 -f 2078/2260 2079/2261 2083/2267 2082/2266 -f 2078/2260 2084/2269 478/2268 -f 2077/2259 2078/2260 478/2268 -f 899/2271 429/2270 2082/2266 2081/2265 -f 2081/2265 2082/2266 2083/2267 2080/2262 -f 2086/2274 430/2273 2085/2272 2087/2275 -f 431/2276 430/2273 2086/2274 2088/2277 -f 2089/2278 2088/2277 2086/2274 2090/2279 -f 1915/2073 1807/1951 2089/2278 1913/2071 -f 86/1942 431/2276 2088/2277 1801/1945 -f 2090/2279 2681/3054 2673/3046 1901/2059 -f 2087/2275 2090/2279 2086/2274 -f 2092/2281 2683/3057 2682/3055 2091/2280 -f 2093/2282 2096/2285 2095/2284 2094/2283 -f 2096/2285 2093/2282 1885/2041 2690/3064 -f 2092/2281 2096/2285 2690/3064 -f 434/2286 2098/2288 2097/2287 -f 1888/2044 1885/2041 2098/2288 1899/2056 -f 2092/2281 2690/3064 2686/3060 1892/2048 -f 2087/2275 2683/3057 2681/3054 2090/2279 -f 2099/2289 2085/2292 470/2291 460/2290 -f 2682/3056 2684/3058 2100/2294 2091/2293 -f 2101/2295 2091/2293 2100/2294 2102/2296 -f 2103/2297 2101/2295 2102/2296 2104/2298 -f 2106/2300 2105/2299 2108/2302 2107/2301 -f 2101/2295 2108/2302 2095/2303 2091/2293 -f 2093/2304 2094/2307 2109/2306 2097/2305 -f 2094/2307 2105/2299 2110/2308 2109/2306 -f 454/2309 448/2311 2110/2308 2111/2310 -f 2103/2297 2113/2313 2112/2312 2107/2301 -f 2115/2315 2114/2314 2117/2317 2116/2316 -f 2119/2319 2118/2318 2121/2321 2120/2320 -f 2122/2322 2120/2320 2124/2324 2123/2323 -f 2123/2323 2126/2326 2125/2325 2122/2322 -f 2118/2318 2119/2319 2128/2328 2127/2327 -f 471/2329 946/2331 2129/2330 2127/2327 -f 2131/2333 2130/2332 2133/2335 2132/2334 -f 2134/2336 2137/2339 2136/2338 2135/2337 -f 2139/2343 2140/2344 2125/2325 2126/2326 -f 2723/2348 2128/2328 2722/2347 -f 2724/2348 2725/2347 2650/2346 -f 2141/2345 2726/2348 2727/2346 -f 538/2352 966/2351 2145/2353 2144/2350 -f 2146/2355 2099/2289 549/2354 469/2356 -f 2146/2355 469/2356 468/2357 2147/2358 -f 2103/2297 2104/2298 2148/2359 2113/2313 -f 535/2362 534/2863 2150/2361 2149/2360 -f 464/2363 465/2364 2134/2336 2135/2337 -f 2151/2365 536/2366 535/2362 2149/2360 -f 2151/2365 2147/2358 468/2357 536/2366 -f 2152/2367 2153/2370 900/2369 506/2368 -f 2154/2371 2152/2367 506/2368 505/2372 -f 2155/2373 2152/2367 2154/2371 2156/2374 -f 2157/2375 2160/2378 2159/2377 2158/2376 -f 2162/2380 2161/2379 2016/2183 2017/2184 -f 2161/2379 2163/2381 2020/2187 2016/2183 -f 2163/2381 2161/2379 2165/2383 2164/2382 -f 2166/2384 2167/2385 1943/2101 1944/2102 -f 2169/2387 2168/2386 2171/2389 2170/2388 -f 2172/2390 2168/2386 2174/2392 2173/2391 -f 2171/2389 2168/2386 2172/2390 503/2393 -f 505/2372 1103/2395 2175/2394 2154/2371 -f 504/2396 1359/2397 2160/2378 2157/2375 -f 2172/2390 2176/2399 550/2398 503/2393 -f 502/2402 1205/2404 2178/2403 2171/2389 -f 508/2405 1107/2408 2180/2407 2179/2406 -f 2181/2411 486/2410 509/2409 2182/2412 -f 2182/2412 509/2409 900/2369 2153/2370 -f 2152/2367 2155/2373 2183/2413 2153/2370 -f 2184/2414 2007/2174 2185/2415 -f 2071/2249 2072/2250 2187/2417 2186/2416 -f 2185/2415 2189/2419 2188/2418 2184/2414 -f 2191/2421 2190/2420 2192/2422 2183/2413 -f 2190/2420 2193/2423 2194/2424 2192/2422 -f 2195/2425 2196/2426 2188/2418 2189/2419 -f 2198/2428 2197/2427 481/2430 482/2429 -f 516/2432 480/2431 2200/2434 2199/2433 -f 551/2435 517/2438 2202/2437 2201/2436 -f 520/2439 1110/2441 2203/2440 2193/2423 -f 520/2439 2193/2423 2196/2426 479/2442 -f 479/2442 2196/2426 2195/2425 477/2443 -f 2201/2436 2205/2445 2204/2444 2203/2440 -f 2207/2447 2206/2446 2209/2449 2208/2448 -f 483/2450 2210/2451 2198/2428 482/2429 -f 2212/2454 2211/2453 528/2452 1132/2455 -f 532/2459 1211/2461 2214/2460 -f 2215/2464 484/2463 487/2462 1131/2465 -f 2126/2326 2216/2467 2139/2343 -f 542/2340 2138/2341 2217/2469 968/2468 -f 539/2470 968/2468 2217/2469 2218/2471 -f 2218/2471 2134/2336 540/2466 539/2470 -f 2137/2339 2219/2472 2123/2323 2124/2324 -f 2123/2323 2219/2472 2216/2467 2126/2326 -f 2222/2475 2221/2474 2220/2473 2223/2476 -f 2225/2478 2224/2477 2226/2479 1728/1870 -f 2227/2480 2224/2477 2225/2478 2228/2481 -f 1626/1767 1627/1768 2229/2482 2230/2483 -f 1638/1779 2230/2483 2229/2482 2231/2484 -f 1640/1781 1638/1779 2231/2484 2232/2485 -f 1641/1782 1640/1781 2232/2485 2233/2486 -f 1643/1784 1641/1782 2233/2486 2234/2487 -f 1657/1798 1643/1784 2234/2487 2228/2481 -f 1659/1800 1657/1798 2228/2481 2225/2478 -f 1719/1861 1659/1800 2225/2478 1728/1870 -f 1729/1871 1728/1870 2226/2479 1880/2036 -f 2236/2489 2229/2482 1627/1768 2235/2488 -f 2235/2488 1627/1768 1628/1769 -f 2235/2488 2239/2492 2238/2491 2237/2490 -f 1628/1769 1625/1766 1575/1716 1576/1717 -f 2235/2488 1628/1769 1576/1717 -f 2239/2492 2235/2488 1576/1717 1577/1718 -f 2238/2491 2239/2492 2241/2494 2240/2493 -f 2242/2495 2241/2494 2239/2492 1577/1718 -f 2241/2494 2242/2495 2243/2496 2244/2497 -f 2245/2498 2243/2496 2242/2495 2246/2499 -f 2246/2499 1573/1714 2247/2500 2245/2498 -f 1577/1718 1574/1715 2246/2499 2242/2495 -f 1857/2013 1856/2010 2248/2503 1559/2501 -f 1559/2501 2248/2503 1562/2502 -f 2248/2503 1564/2504 1562/2502 -f 2247/2505 1564/2504 2248/2503 2249/2506 -f 2250/2507 2251/2508 2249/2506 2248/2503 -f 845/2002 2252/2509 2251/2508 2250/2507 -f 845/2002 2256/2513 2253/2510 2252/2509 -f 2252/2509 2253/2510 2254/2511 2255/2512 -f 2255/2512 2254/2511 2243/2514 2245/2515 -f 2259/2518 2258/2517 2257/2516 2260/2519 -f 2257/2516 2258/2517 2261/2520 2262/2521 -f 2265/2524 2264/2523 2263/2522 2266/2525 -f 2266/2525 2263/2522 2267/2526 2268/2527 -f 2268/2527 2267/2526 2269/2528 2270/2529 -f 2273/2532 2272/2531 2271/2530 2274/2533 -f 2273/2532 2274/2533 2275/2534 2276/2535 -f 2276/2535 2275/2534 2277/2536 2278/2537 -f 2279/2538 2276/2535 2278/2537 2280/2539 -f 2279/2538 2280/2539 2281/2540 2282/2541 -f 2282/2541 2281/2540 2283/2542 2284/2543 -f 2284/2543 2283/2542 2264/2523 2265/2524 -f 2270/2529 2288/2547 2287/2546 2268/2527 -f 2266/2525 2268/2527 2287/2546 2286/2545 -f 2265/2524 2266/2525 2286/2545 2284/2543 -f 2284/2543 2286/2545 2285/2544 2282/2541 -f 2290/2549 2289/2548 2271/2530 2272/2531 -f 2290/2549 2272/2531 2292/2551 2291/2550 -f 2292/2551 2272/2531 2273/2532 2293/2552 -f 2293/2552 2273/2532 2276/2535 2279/2538 -f 2293/2552 2279/2538 2282/2541 2285/2544 -f 2294/2553 2285/2544 2286/2545 2295/2554 -f 2295/2554 2286/2545 2287/2546 2296/2555 -f 2296/2555 2287/2546 2288/2547 2297/2556 -f 2297/2556 2288/2547 2298/2557 2299/2558 -f 2285/2544 2294/2553 2292/2551 2293/2552 -f 2302/2561 2301/2560 2300/2559 2303/2562 -f 2304/2563 2260/2519 2296/2555 2303/2562 -f 2296/2555 2297/2556 2303/2562 -f 2304/2563 2303/2562 2300/2559 -f 2257/2516 2305/2564 2295/2554 2296/2555 -f 2257/2516 2296/2555 2260/2519 -f 2295/2554 2305/2564 2306/2565 -f 2295/2554 2306/2565 2308/2567 2294/2553 -f 2308/2567 2307/2566 2294/2553 -f 2292/2551 2294/2553 2307/2566 2291/2550 -f 2289/2548 2290/2549 2310/2569 2309/2568 -f 2305/2564 2257/2516 2262/2521 -f 2313/2572 2324/2584 2312/2571 2311/2570 -f 2312/2571 2325/2585 2314/2573 2311/2570 -f 2311/2570 2314/2573 2302/2561 2299/2558 -f 2299/2558 2302/2561 2303/2562 2297/2556 -f 2269/2528 2316/2575 2315/2574 2270/2529 -f 2315/2574 2316/2575 2321/2581 2319/2579 -f 2321/2581 2320/2580 2319/2579 -f 2322/2582 2315/2574 2319/2579 2317/2577 -f 2319/2579 2318/2578 2317/2577 -f 2313/2576 2322/2582 2317/2577 -f 2323/2583 2313/2572 2317/2577 2318/2578 -f 2323/2583 2333/2594 2324/2584 2313/2572 -f 2324/2584 2332/2593 2325/2585 2312/2571 -f 2314/2573 2325/2585 2301/2560 2302/2561 -f 2299/2558 2298/2557 2326/2586 2311/2570 -f 2326/2586 2322/2582 2313/2576 2311/2570 -f 2315/2574 2322/2582 2326/2586 2298/2557 -f 2270/2529 2315/2574 2298/2557 2288/2547 -f 2329/2589 2328/2588 2327/2587 2330/2590 -f 2328/2588 2331/2591 2327/2587 -f 2325/2585 2332/2593 2331/2592 -f 2324/2584 2333/2594 2332/2593 -f 2323/2583 2318/2578 2319/2579 2333/2594 -f 2334/2595 2321/2581 2316/2575 2335/2596 -f 2327/2587 2338/2599 2334/2595 2335/2596 -f 2335/2596 2346/2608 2330/2590 2327/2587 -f 2329/2589 2330/2590 2336/2597 2337/2598 -f 2333/2600 2319/2579 2334/2595 2338/2599 -f 2320/2580 2321/2581 2334/2595 2319/2579 -f 2280/2539 2278/2537 2339/2601 2340/2602 -f 2281/2540 2280/2539 2340/2602 2341/2603 -f 2283/2542 2281/2540 2341/2603 2342/2604 -f 2264/2523 2283/2542 2342/2604 2343/2605 -f 2263/2522 2264/2523 2343/2605 2344/2606 -f 2267/2526 2263/2522 2344/2606 2345/2607 -f 2345/2607 2344/2606 2336/2597 -f 2346/2608 2345/2607 2336/2597 2330/2590 -f 2346/2608 2335/2596 2316/2575 2269/2528 -f 2345/2607 2346/2608 2269/2528 2267/2526 -f 2348/2610 2341/2603 2340/2602 2347/2609 -f 2347/2609 2340/2602 2339/2601 -f 2342/2604 2341/2603 2348/2610 2349/2611 -f 2349/2611 2343/2605 2342/2604 -f 2349/2611 2336/2597 2344/2606 2343/2605 -f 2336/2597 2258/2613 2259/2612 2337/2598 -f 2336/2597 2349/2611 2261/2614 2258/2613 -f 2349/2611 2351/2616 2350/2615 2261/2614 -f 2349/2611 2352/2617 2351/2616 -f 2353/2618 2352/2617 2349/2611 2348/2610 -f 2348/2610 2354/2619 2353/2618 -f 2355/2620 2354/2619 2348/2610 2347/2609 -f 2356/2621 2355/2620 2347/2609 2357/2622 -f 2357/2622 2347/2609 2339/2601 2358/2623 -f 2358/2623 2339/2601 2278/2537 2277/2536 -f 2361/2626 2360/2625 2359/2624 2362/2627 -f 2359/2624 2360/2625 2363/2628 -f 1999/2629 2363/2628 2360/2625 1992/2630 -f 1992/2630 2360/2625 2361/2626 1991/2631 -f 2221/2632 1991/2631 2361/2626 2364/2633 -f 2364/2633 2366/2635 2365/2634 2221/2632 -f 1549/2133 2374/2643 2365/2652 2366/3020 -f 1549/1689 2366/2635 1548/1688 -f 2361/2626 2362/2627 2367/2636 2364/2633 -f 2366/2635 2364/2633 2367/2636 2368/2637 -f 1548/1688 2366/2635 2368/2637 1972/2139 -f 1972/2139 2368/2637 2369/2638 1554/1694 -f 2370/2639 2369/2638 2368/2637 2367/2636 -f 2367/2636 2362/2627 2371/2640 2370/2639 -f 2362/2627 2359/2624 2371/2640 -f 2374/2643 2373/2642 2372/2641 2375/2644 -f 2375/2644 2372/2641 2376/2645 2377/2646 -f 2378/2647 2359/2624 2363/2628 2379/2648 -f 2379/2648 2363/2628 1999/2629 2000/2649 -f 2379/2648 2000/2649 2380/2650 2377/2646 -f 2377/2646 2380/2650 2221/2651 2375/2644 -f 2375/2644 2221/2651 2365/2652 2374/2643 -f 2374/2643 1549/2133 1970/2134 -f 2373/2642 2374/2643 1970/2134 1553/2136 -f 2378/2654 2376/2653 2371/2640 2359/2624 -f 2376/2653 2372/2655 2370/2639 2371/2640 -f 2369/2638 2370/2639 2372/2655 2373/2656 -f 1554/1694 2369/2638 2373/2656 1553/1693 -f 1941/2099 2222/2475 2223/2476 1939/2097 -f 2223/2476 2220/2473 2382/2658 2381/2657 -f 1924/2082 2004/2171 2383/2659 1923/2081 -f 1941/2099 1937/2095 1938/2096 2384/2660 -f 1940/2098 2381/2657 2385/2661 1544/1683 -f 889/1682 1544/1683 2385/2661 352/2662 -f 703/2663 352/2662 2385/2661 2386/2664 -f 2387/2665 2388/2666 2382/2658 2220/2473 -f 2387/2665 2220/2473 2221/2474 2380/2667 -f 2387/2665 2380/2667 2000/2167 1997/2164 -f 703/2663 2386/2664 2389/2668 901/2669 -f 1997/2164 1996/2163 2388/2666 2387/2665 -f 901/2669 2389/2668 1993/2160 942/2670 -f 942/2671 1993/2160 1994/2161 1372/2672 -f 4/1524 5/2674 2390/2673 1397/1527 -f 2391/2675 2392/2676 1406/1536 1404/1534 -f 2393/2677 2394/2678 1875/2031 1401/1531 -f 2717/3092 7/2681 2691/3065 -f 1399/1529 2692/3066 2691/3065 7/2681 -f 2398/2684 2400/2686 2399/2685 2397/2683 -f 2399/2685 2400/2686 2401/2687 2392/2676 -f 2393/2677 2401/2687 2402/2688 2394/2678 -f 2405/2691 2404/2690 2403/2689 2406/2692 -f 2406/2692 2403/2689 2407/2693 2408/2694 -f 2409/2695 2407/2693 2403/2689 2410/2696 -f 2407/2693 2409/2695 2411/2697 2412/2698 -f 2411/2697 2409/2695 2413/2699 2414/2700 -f 2415/2701 2426/2712 2414/2700 2413/2699 -f 2408/2694 2407/2693 2412/2698 2416/2702 -f 2417/2703 2413/2699 2409/2695 2410/2696 -f 2410/2696 2403/2689 2404/2690 2418/2704 -f 2402/2688 2401/2687 2400/2686 2419/2705 -f 2419/2705 2400/2686 2398/2684 2420/2706 -f 1398/1528 1389/1515 2694/3068 2693/3067 -f 1386/1512 2696/3070 2695/3069 1385/1511 -f 1967/2129 2697/3071 2696/3070 1386/1512 -f 1967/2129 1968/2130 2698/3072 2697/3071 -f 2699/3073 2698/3072 1968/2130 1969/2131 -f 2425/2711 2421/2707 2422/2708 2417/2703 -f 2417/2703 2410/2696 2418/2704 2425/2711 -f 2413/2699 2417/2703 2422/2708 2415/2701 -f 2426/2712 2415/2701 2423/2709 -f 2426/2712 2423/2709 2424/2710 2427/2713 -f 2700/3074 2699/3073 1969/2131 1909/2067 -f 1909/2067 1906/2064 2689/3063 2700/3074 -f 1895/2051 2430/2716 2429/2715 2431/2717 -f 1897/2053 2430/2716 1895/2051 1890/2046 -f 1905/2063 1894/2050 1895/2051 2431/2717 -f 1907/2065 1905/2063 2431/2717 2432/2718 -f 2428/2714 1907/2065 2432/2718 2433/2719 -f 2424/2710 2428/2714 2433/2719 2427/2713 -f 2427/2713 2449/2735 2434/2720 2426/2712 -f 2435/2721 2426/2712 2434/2720 2436/2722 -f 2437/2723 2414/2700 2426/2712 2435/2721 -f 2414/2700 2437/2723 2438/2724 2411/2697 -f 2431/2717 2429/2715 2439/2725 2432/2718 -f 2432/2718 2439/2725 2440/2726 2433/2719 -f 2433/2719 2440/2726 2441/2727 2427/2713 -f 2430/2716 1897/2053 1814/1959 1813/1958 -f 2441/2727 2440/2726 2442/2728 2443/2729 -f 2444/2730 2442/2728 2440/2726 2439/2725 -f 2445/2731 2444/2730 2439/2725 2429/2715 -f 2442/2728 2444/2730 2446/2732 2447/2733 -f 2448/2734 2446/2732 2444/2730 2445/2731 -f 2436/2722 2434/2720 2449/2735 2450/2736 -f 2451/2737 2449/2735 2427/2713 2441/2727 -f 2451/2737 2441/2727 2443/2729 2452/2738 -f 2443/2729 2442/2728 2447/2733 2453/2739 -f 2447/2733 2446/2732 1858/2014 2454/2740 -f 1767/1909 1858/2014 2446/2732 2448/2734 -f 1765/1907 1767/1909 2448/2734 1811/1956 -f 1811/1956 2448/2734 2445/2731 1813/1958 -f 1813/1958 2445/2731 2429/2715 2430/2716 -f 2289/2741 2436/2722 2450/2736 2271/2742 -f 2436/2722 2289/2741 2309/2743 2435/2721 -f 2455/2744 1865/2021 1881/2037 2456/2745 -f 1865/2021 2455/2744 2454/2740 1862/2018 -f 1859/2015 1862/2018 2454/2740 1858/2014 -f 2447/2733 2454/2740 2455/2744 2453/2739 -f 2453/2739 2455/2744 2456/2745 2457/2746 -f 2453/2739 2457/2746 2452/2738 2443/2729 -f 2411/2697 2438/2724 2458/2747 2412/2698 -f 2412/2698 2458/2747 2459/2748 2416/2702 -f 2460/2749 2416/2702 2459/2748 2461/2750 -f 2460/2749 2408/2694 2416/2702 -f 2408/2694 2460/2749 1881/2037 1882/2038 -f 1881/2037 2460/2749 2461/2750 2456/2745 -f 2456/2745 2461/2750 2462/2751 2457/2746 -f 2457/2746 2462/2751 2463/2752 2452/2738 -f 2452/2738 2463/2752 2464/2753 2451/2737 -f 2451/2737 2464/2753 2450/2736 2449/2735 -f 2271/2742 2450/2736 2464/2753 2274/2754 -f 2274/2754 2464/2753 2463/2752 2275/2755 -f 2275/2755 2463/2752 2462/2751 2277/2756 -f 2277/2756 2462/2751 2461/2750 2459/2748 -f 2435/2721 2309/2743 2356/2757 2437/2723 -f 2437/2723 2356/2757 2357/2758 2438/2724 -f 2438/2724 2357/2758 2358/2759 2458/2747 -f 2458/2747 2358/2759 2277/2756 2459/2748 -f 1736/1878 1729/1871 1880/2036 1878/2034 -f 1764/1906 1736/1878 1878/2034 1860/2016 -f 1764/1906 1731/1873 1732/1874 1736/1878 -f 1990/2157 1991/2158 2221/2474 2222/2475 -f 2384/2660 1990/2157 2222/2475 1941/2099 -f 2384/2660 1938/2096 2466/2761 2465/2760 -f 2355/2763 2356/2762 2309/2568 2310/2569 -f 2354/2764 2355/2763 2310/2569 2291/2550 -f 2353/2765 2354/2764 2291/2550 2307/2566 -f 2352/2766 2353/2765 2307/2566 2308/2567 -f 2351/2767 2352/2766 2308/2567 2306/2565 -f 2350/2768 2351/2767 2306/2565 2305/2564 -f 2350/2768 2305/2564 2262/2521 2261/2520 -f 2467/2570 2469/2576 2468/2577 -f 2470/2599 2472/2769 2471/2600 -f 2301/2560 2325/2585 2331/2592 2328/2770 -f 2300/2559 2301/2560 2328/2770 2329/2771 -f 2300/2559 2329/2771 2337/2772 2304/2563 -f 2260/2519 2304/2563 2337/2772 2259/2518 -f 2473/2591 2475/2599 2474/2587 -f 1874/2030 1873/2029 2405/2691 2406/2692 -f 1882/2038 1874/2030 2406/2692 2408/2694 -f 1487/1619 2477/2774 2476/2773 1468/1600 -f 2480/2777 2479/2776 2478/2775 2481/2778 -f 2478/2775 2482/2779 2483/2780 2481/2778 -f 2484/2781 2477/2774 2486/2783 2485/2782 -f 2477/2774 2484/2781 2487/2784 2476/2773 -f 2476/2773 2487/2784 2488/2785 2489/2786 -f 1468/1600 2476/2773 2489/2786 1467/1599 -f 2489/2787 2492/2791 2491/2790 2490/2789 -f 2489/2787 2490/2789 1467/2788 -f 2494/1599 2493/2789 1433/1565 1465/1597 -f 2490/2789 2491/2790 2495/2792 -f 2497/2794 2496/2793 2499/2796 2498/2795 -f 2500/2823 2511/2809 2497/2821 2498/3021 -f 2484/2781 2485/2798 2501/2797 2487/2784 -f 2502/2799 1441/1573 1432/1564 1439/1571 -f 2488/2800 2503/2801 2492/2791 2489/2787 -f 2504/2802 2505/2803 2503/2801 2488/2800 -f 2505/2803 2504/2802 2506/2804 2507/2805 -f 2506/2804 2238/2491 2240/2493 2507/2805 -f 2508/2802 2509/2806 2506/2804 -f 2256/2513 1851/2003 2511/2809 2512/2810 -f 2511/2809 1851/2003 1852/2004 2513/2811 -f 264/2007 841/2812 1442/2813 1855/2009 -f 1441/2814 2502/2816 2514/2815 -f 2514/2815 2518/2820 2517/2819 2516/2818 -f 2514/2815 2516/2818 2515/2817 -f 2513/2811 2496/2822 2497/2821 2511/2809 -f 2512/2810 2511/2809 2500/2823 2510/2824 -f 2253/2510 2256/2513 2512/2810 2254/2511 -f 2510/2824 2244/2825 2254/2511 2512/2810 -f 2244/2825 2243/2514 2254/2511 -f 846/2826 2250/2507 2248/2503 1856/2010 -f 2521/2829 2237/2490 2520/2828 2519/2827 -f 2485/2798 2519/2827 2520/2828 2501/2797 -f 2504/2830 2488/2785 2487/2784 2501/2797 -f 2501/2797 2509/2806 2504/2830 -f 2509/2806 2501/2797 2520/2828 2237/2490 -f 2235/2488 2237/2490 2521/2829 2236/2489 -f 2236/2489 2521/2829 2519/2831 2522/2832 -f 2522/2832 2519/2831 2523/2833 2524/2834 -f 2527/2837 2526/2836 2525/2835 2528/2838 -f 2527/2837 2528/2838 2234/2487 2233/2486 -f 2228/2481 2234/2487 2528/2838 2227/2480 -f 2231/2484 2229/2482 2236/2489 2522/2832 -f 2232/2485 2231/2484 2522/2832 2524/2834 -f 2233/2486 2232/2485 2524/2834 2527/2837 -f 2528/2838 2525/2835 2529/2839 2227/2480 -f 2530/2840 2529/2839 2525/2835 2531/2841 -f 2526/2836 2532/2842 2531/2841 2525/2835 -f 2519/2831 2485/2827 2533/2843 2523/2833 -f 2531/2841 2532/2842 2535/2845 2534/2844 -f 2530/2840 2531/2841 2534/2844 2536/2846 -f 2227/2480 2529/2839 2537/2847 2224/2477 -f 2538/2848 2537/2847 2529/2839 2530/2840 -f 2539/2849 2538/2848 2530/2840 2536/2846 -f 2540/2850 2539/2849 2536/2846 2479/2776 -f 2478/2775 2479/2776 2536/2846 2534/2844 -f 2482/2779 2478/2775 2534/2844 2535/2851 -f 2541/2852 1876/2032 1879/2035 2542/2853 -f 2542/2853 1879/2035 1880/2036 2226/2479 -f 2542/2853 2226/2479 2224/2477 2537/2847 -f 2541/2852 2542/2853 2537/2847 2538/2848 -f 2543/2854 2541/2852 2538/2848 2539/2849 -f 2544/2855 2543/2854 2539/2849 2540/2850 -f 2545/2856 2544/2855 2540/2850 2546/2857 -f 2546/2857 2540/2850 2479/2776 2480/2777 -f 2477/2774 1487/1619 1488/1620 2486/2783 -f 1490/1622 2481/2778 2483/2780 1489/1621 -f 2481/2778 1490/1622 1491/1623 2480/2777 -f 2480/2777 1491/1623 1497/1629 2546/2857 -f 2546/2857 1497/1629 1499/1631 2545/2856 -f 2545/2856 1499/1631 1501/1633 1507/1639 -f 2544/2855 2545/2856 1507/1639 1870/2026 -f 2544/2855 1870/2026 1871/2027 2543/2854 -f 2543/2854 1871/2027 1876/2032 2541/2852 -f 2396/2682 2547/2858 2390/2673 2395/2680 -f 2106/2300 2548/2859 2549/2860 2111/2310 -f 2149/2360 2133/2335 2148/2359 2151/2365 -f 2113/2313 2130/2332 2117/2317 2112/2312 -f 2548/2859 2114/2314 2550/2861 2549/2860 -f 2118/2318 2115/2315 2116/2316 2121/2321 -f 2114/2314 2115/2315 2129/2330 2550/2861 -f 2551/2862 2131/2333 2132/2334 2136/2338 -f 464/2363 2135/2337 2150/2361 534/2863 -f 2091/2280 2095/2284 2096/2285 2092/2281 -f 2107/2301 2108/2302 2101/2295 2103/2297 -f 2095/2303 2108/2302 2105/2299 2094/2307 -f 2107/2301 2112/2312 2548/2859 2106/2300 -f 2116/2316 2117/2317 2130/2332 2131/2333 -f 2120/2320 2121/2321 2551/2862 2124/2324 -f 2112/2312 2117/2317 2114/2314 2548/2859 -f 2121/2321 2116/2316 2131/2333 2551/2862 -f 2102/2296 2100/2294 2684/3058 2099/2289 -f 2102/2296 2099/2289 2146/2355 -f 2147/2358 2104/2298 2102/2296 2146/2355 -f 2150/2361 2132/2334 2133/2335 2149/2360 -f 2136/2338 2137/2339 2124/2324 2551/2862 -f 2151/2365 2148/2359 2104/2298 2147/2358 -f 2113/2313 2148/2359 2133/2335 2130/2332 -f 2135/2337 2136/2338 2132/2334 2150/2361 -f 2553/2865 2552/2864 2119/2319 2122/2322 -f 2120/2320 2122/2322 2119/2319 -f 2218/2471 2217/2469 2216/2467 2219/2472 -f 2219/2472 2137/2339 2134/2336 2218/2471 -f 2555/2867 2554/2866 2553/2865 2122/2322 -f 2125/2325 2555/2867 2122/2322 -f 2554/2866 2555/2867 2145/2353 2556/2868 -f 2139/2343 2216/2467 2217/2469 2138/2341 -f 1961/2122 1959/2120 2557/2869 2558/2870 -f 2558/2870 1985/2152 1962/2123 1961/2122 -f 2012/2179 2559/2871 2030/2198 2015/2182 -f 2029/2197 2030/2198 2018/2185 2560/2872 -f 2057/2232 2058/2233 2562/2874 2561/2873 -f 2564/2876 2563/2875 2559/2871 2012/2179 -f 2162/2380 2563/2875 2174/2392 2565/2877 -f 2376/2645 2378/2647 2379/2648 2377/2646 -f 205/2878 1752/1894 1753/1895 193/2879 -f 193/2879 1753/1895 1755/1897 184/2880 -f 184/2880 1755/1897 1756/1898 185/2881 -f 1756/1898 1757/1899 187/2882 185/2881 -f 187/2882 1757/1899 1758/1900 194/2883 -f 194/2883 1758/1900 1759/1901 195/2884 -f 195/2884 1759/1901 1770/1912 237/1971 -f 1778/1920 1779/1921 2566/2885 1775/1917 -f 1778/1920 1782/1924 2567/2886 1777/1919 -f 1782/1924 1784/1926 2568/2887 2567/2886 -f 1784/1926 1786/1928 2569/2888 2568/2887 -f 2569/2888 1786/1928 1788/1930 2570/2889 -f 2570/2889 1788/1930 1791/1933 2571/2890 -f 2572/2891 1792/1934 1794/1936 1216/2892 -f 1818/1963 1819/1965 1820/1966 1817/1962 -f 1817/1962 1820/1966 1822/1970 1821/1968 -f 1821/1968 1822/1970 1770/1912 1769/1911 -f 1673/1814 1823/1973 1674/1816 1629/1770 -f 1824/1974 1827/1977 1823/1973 1673/1814 -f 1828/1978 1831/1981 1827/1977 1824/1974 -f 1831/1981 1833/1983 1830/1980 -f 1841/1991 1836/1986 1837/1987 1838/1988 -f 2573/2893 1839/1989 1837/1987 1834/1984 -f 1835/1985 1836/1986 1842/1992 2574/2894 -f 2574/2894 1842/1992 1846/1996 2575/2895 -f 1779/1921 1849/1999 1850/2000 2566/2885 -f 1847/2001 1849/1999 1848/1998 2576/2896 -f 1888/2044 1899/2056 1900/2057 1898/2054 -f 1898/2054 1900/2057 1819/1965 1818/1963 -f 1899/2056 2098/2288 434/2286 896/2055 -f 1772/1914 1773/1915 2566/2885 1850/2000 -f 1773/1915 1775/1917 2566/2885 -f 1404/1534 1396/1526 1397/1527 2391/2675 -f 3/1525 1396/1526 1407/1537 1410/1540 -f 1416/1546 1409/1539 1407/1537 1405/1535 -f 1408/1538 1409/1539 1417/1547 1418/1548 -f 1510/1642 1420/1550 1417/1547 1415/1545 -f 1519/1651 1422/1552 1423/1553 2577/2897 -f 1421/1551 1422/1552 1520/1652 1518/1650 -f 1524/1656 1523/1655 1420/1550 1510/1642 -f 1518/1650 1520/1652 1529/1661 1528/1660 -f 1528/1660 1529/1661 1523/1655 1524/1656 -f 1397/1527 2390/2673 2547/2858 2391/2675 -f 2395/2680 2390/2673 5/2674 6/2679 -f 2577/2897 1423/1553 1425/1555 1451/1583 -f 8/1522 1393/1519 1394/1520 10/2898 -f 1390/1516 1393/1519 1395/1523 2002/2169 -f 1394/1520 2672/3045 2652/3024 10/2898 -f 1405/1535 1402/1532 1403/1533 1416/1546 -f 1401/1531 1402/1532 1406/1536 2393/2677 -f 1416/1546 1403/1533 1414/1544 1415/1545 -f 1478/1610 1479/1611 1493/1625 1494/1626 -f 1512/1644 1511/1643 1414/1544 1411/1541 -f 1494/1626 1493/1625 1517/1649 1516/1648 -f 1513/1645 1525/1657 1511/1643 1512/1644 -f 1516/1648 1517/1649 1527/1659 1526/1658 -f 1526/1658 1527/1659 1525/1657 1513/1645 -f 2002/2169 1395/1523 707/2128 2001/2168 -f 2393/2677 1406/1536 2392/2676 2401/2687 -f 2397/2683 2692/3066 2693/3067 2398/2684 -f 2397/2683 2399/2685 2547/2858 2396/2682 -f 2547/2858 2399/2685 2392/2676 2391/2675 -f 1479/1611 1477/1609 1455/1587 1426/1556 -f 1479/1611 1426/1556 1424/1554 -f 1477/1609 1454/1586 1455/1587 -f 2670/3043 2671/3044 1391/1517 1388/1514 -f 1384/1510 1388/1514 1392/1518 1949/2110 -f 1506/1638 1412/1542 1413/1543 1873/2029 -f 1873/2029 1413/1543 1875/2031 2405/2691 -f 2002/2169 1960/2121 1392/1518 1390/1516 -f 2557/2869 2003/2170 1995/2162 1998/2165 -f 1959/2120 1960/2121 2003/2170 2557/2869 -f 2381/2657 2382/2658 2386/2664 2385/2661 -f 2386/2664 2382/2658 2388/2666 2389/2668 -f 2389/2668 2388/2666 1996/2163 1993/2160 -f 2405/2691 1875/2031 2394/2678 2404/2690 -f 2404/2690 2394/2678 2402/2688 2418/2704 -f 2418/2704 2402/2688 2419/2705 2425/2711 -f 2425/2711 2419/2705 2420/2706 2421/2707 -f 2694/3068 2695/3069 2421/2707 2420/2706 -f 1411/1541 1412/1542 1504/1636 1512/1644 -f 1803/1947 1804/1948 2579/2900 2578/2899 -f 1808/1952 1058/1953 1368/2902 2580/2901 -f 1919/2077 1803/1947 2578/2899 1922/2080 -f 1919/2077 2581/2903 1926/2084 1918/2076 -f 2465/2760 1989/2156 1990/2157 2384/2660 -f 2581/2903 2466/2761 1938/2096 1926/2084 -f 1987/2154 2465/2760 2466/2761 2383/2659 -f 1999/2166 1992/2159 1989/2156 1988/2155 -f 1955/2116 1964/2125 1966/2127 1956/2117 -f 2310/2569 2290/2549 2291/2550 -f 1709/1851 1710/1852 2583/2905 2582/2904 -f 1712/1854 1709/1851 2582/2904 2584/2906 -f 1710/1852 1679/1821 2585/2907 2583/2905 -f 1679/1821 1680/1822 1684/1826 2585/2907 -f 1844/1994 1714/1856 1712/1854 2584/2906 -f 1830/1980 1833/1983 1839/1989 2573/2893 -f 1833/1983 1832/1982 1839/1989 -f 1832/1982 1713/1855 1838/1988 -f 1838/1988 1713/1855 1714/1856 1841/1991 -f 1841/1991 1714/1856 1844/1994 1840/1990 -f 2125/2325 2140/2344 2143/2349 2555/2867 -f 898/2342 2144/2350 2143/2349 2140/2344 -f 898/2342 2140/2344 2139/2343 2138/2341 -f 2093/2282 2097/2287 2098/2288 1885/2041 -f 2097/2305 2109/2306 472/2909 434/2908 -f 2109/2306 2110/2308 448/2311 472/2909 -f 2111/2310 2110/2308 2105/2299 2106/2300 -f 2127/2327 2128/2328 533/2348 471/2329 -f 2127/2327 2129/2330 2115/2315 2118/2318 -f 2144/2350 2145/2353 2555/2867 2143/2349 -f 2111/2310 2549/2860 937/2910 454/2309 -f 2549/2860 2550/2861 940/2911 937/2910 -f 2550/2861 2129/2330 946/2331 940/2911 -f 2145/2353 966/2351 2141/2345 2556/2868 -f 2650/2346 2556/2868 2141/2345 -f 2082/2266 429/2270 474/2912 2078/2260 -f 2035/2203 2013/2180 2014/2181 2586/2913 -f 2014/2181 2028/2196 2054/2226 2586/2913 -f 2012/2179 2013/2180 2587/2914 2564/2876 -f 2041/2212 2588/2915 2056/2231 2040/2211 -f 2588/2915 2589/2916 2059/2234 2056/2231 -f 2564/2876 2587/2914 2590/2917 2173/2391 -f 2009/2176 2010/2177 2006/2173 2007/2174 -f 2591/2918 2032/2200 2009/2176 2007/2174 -f 2046/2217 2047/2218 2010/2177 2011/2178 -f 2032/2200 2156/2374 2592/2919 2031/2199 -f 2060/2235 2047/2218 2048/2219 2063/2238 -f 2037/2205 2049/2220 2052/2224 2038/2208 -f 2051/2223 2046/2217 2011/2178 2593/2920 -f 2011/2178 2008/2175 2034/2202 2593/2920 -f 2008/2175 2031/2199 2033/2201 2034/2202 -f 2031/2199 2592/2919 2158/2376 2033/2201 -f 2157/2375 2175/2394 1103/2395 504/2396 -f 2006/2173 2594/2921 2005/2172 -f 2594/2921 2186/2416 2187/2417 2005/2172 -f 2591/2918 2007/2174 2184/2414 2191/2421 -f 2191/2421 2184/2414 2188/2418 2190/2420 -f 2190/2420 2188/2418 2196/2426 2193/2423 -f 2181/2411 2180/2407 1107/2408 486/2410 -f 2203/2440 2204/2444 2194/2424 2193/2423 -f 2203/2440 1110/2441 551/2435 2201/2436 -f 477/2443 2195/2425 2072/2250 476/2251 -f 2195/2425 2189/2419 2187/2417 2072/2250 -f 2189/2419 2185/2415 2005/2172 2187/2417 -f 427/2254 2073/2255 2077/2259 478/2268 -f 2077/2259 2073/2255 2067/2243 2076/2258 -f 2067/2243 2062/2237 2595/2922 2076/2258 -f 2202/2437 2596/2923 2205/2445 2201/2436 -f 2179/2406 2597/2924 1121/2925 508/2405 -f 2206/2446 2207/2447 1122/2927 1125/2926 -f 516/2432 2199/2433 2202/2437 517/2438 -f 2202/2437 2199/2433 2209/2449 2596/2923 -f 2729/2926 485/2928 2728/2925 -f 2730/2926 2731/2925 2597/2924 -f 2206/2446 1125/2926 2597/2924 -f 2200/2434 480/2431 481/2430 2197/2427 -f 2200/2434 2197/2427 2598/2929 2208/2448 -f 2207/2447 2599/2930 1128/2931 1122/2927 -f 2197/2427 2198/2428 2600/2932 2598/2929 -f 2599/2930 2601/2933 507/2934 1128/2931 -f 2210/2451 2602/2935 2198/2428 -f 2211/2453 2604/2937 2603/2936 2602/2935 -f 2605/2938 2215/2464 1131/2465 1133/2939 -f 2211/2453 2212/2454 2606/2940 2604/2937 -f 2602/2935 2603/2936 2600/2932 2198/2428 -f 2601/2933 2605/2938 1133/2939 507/2934 -f 528/2452 2211/2453 2602/2935 2210/2451 -f 1132/2455 1137/2941 2607/2942 2212/2454 -f 2212/2454 2607/2942 2608/2943 2606/2940 -f 2591/2918 2155/2373 2156/2374 2032/2200 -f 2158/2376 2159/2377 2036/2204 2033/2201 -f 1540/1676 2164/2382 1944/2102 1542/1678 -f 2173/2391 2174/2392 2563/2875 2564/2876 -f 2191/2421 2183/2413 2155/2373 2591/2918 -f 2153/2370 2183/2413 2192/2422 2182/2412 -f 2182/2412 2192/2422 2194/2424 2181/2411 -f 2180/2407 2204/2444 2205/2445 2179/2406 -f 2208/2448 2209/2449 2199/2433 2200/2434 -f 2214/2460 2213/2456 532/2457 -f 2165/2383 2565/2877 2169/2387 2166/2384 -f 2173/2391 2590/2917 2176/2399 2172/2390 -f 2175/2394 2592/2919 2156/2374 2154/2371 -f 2157/2375 2158/2376 2592/2919 2175/2394 -f 2181/2411 2194/2424 2204/2444 2180/2407 -f 2179/2406 2205/2445 2596/2923 2597/2924 -f 2596/2923 2209/2449 2206/2446 2597/2924 -f 2208/2448 2598/2929 2599/2930 2207/2447 -f 2598/2929 2600/2932 2601/2933 2599/2930 -f 2603/2936 2604/2937 2215/2464 2605/2938 -f 2604/2937 2606/2940 484/2463 2215/2464 -f 2600/2932 2603/2936 2605/2938 2601/2933 -f 2606/2940 2608/2943 1139/2944 484/2463 -f 1537/1673 1535/1671 1536/1672 1809/1954 -f 1532/1665 1535/1671 1538/1674 1531/1664 -f 1538/1674 1540/1676 1542/1678 1531/1664 -f 1808/1952 1804/1948 1805/1949 1534/1670 -f 1917/2075 1806/1950 1807/1951 1915/2073 -f 1534/1670 1805/1949 1536/1672 1533/1668 -f 2088/2277 2089/2278 1807/1951 1801/1945 -f 1800/1944 1806/1950 2579/2900 2580/2901 -f 2089/2278 2090/2279 1901/2059 1913/2071 -f 2016/2183 2020/2187 2021/2188 2019/2186 -f 2019/2186 2021/2188 2022/2189 2609/2945 -f 2609/2945 2022/2189 2023/2190 2610/2946 -f 897/1685 1175/2194 2024/2191 1545/1684 -f 1936/2094 2020/2187 2163/2381 1541/1677 -f 1541/1677 2163/2381 2164/2382 1540/1676 -f 2166/2384 1944/2102 2164/2382 2165/2383 -f 1542/1678 1942/2100 85/1679 -f 2559/2871 2017/2184 2018/2185 2030/2198 -f 2563/2875 2162/2380 2017/2184 2559/2871 -f 2166/2384 2169/2387 2170/2388 2167/2385 -f 2560/2872 2018/2185 2019/2186 2609/2945 -f 2561/2873 2562/2874 2610/2946 2025/2192 -f 2161/2379 2162/2380 2565/2877 2165/2383 -f 2168/2386 2169/2387 2565/2877 2174/2392 -f 2167/2385 2170/2388 2612/2948 2611/2947 -f 2041/2212 2042/2213 2613/2949 2044/2215 -f 1947/2108 917/2105 1191/2950 2614/2951 -f 2611/2947 1945/2104 1943/2101 2167/2385 -f 2178/2403 2612/2948 2170/2388 2171/2389 -f 920/2953 2617/2956 2616/2955 2615/2952 -f 2616/2955 2617/2956 1946/2107 2618/2957 -f 2618/2957 1946/2107 1947/2108 2614/2951 -f 2617/2956 920/2953 1199/2400 2177/2401 -f 351/2106 1946/2107 2617/2956 2177/2401 -f 329/2103 1945/2104 2614/2951 1191/2950 -f 1945/2104 2611/2947 2618/2957 2614/2951 -f 2618/2957 2611/2947 2612/2948 2616/2955 -f 2612/2948 2178/2403 2615/2952 2616/2955 -f 2178/2403 1205/2404 1194/2954 2615/2952 -f 2006/2173 2060/2235 2061/2236 2594/2921 -f 2061/2236 2066/2242 2186/2416 2594/2921 -f 2066/2242 2074/2256 2071/2249 2186/2416 -f 2075/2257 475/2253 420/2252 2071/2249 -f 2074/2256 2075/2257 2071/2249 -f 2607/2942 1137/2941 529/2458 2213/2456 -f 2607/2942 2213/2456 2214/2460 2608/2943 -f 2608/2943 2214/2460 1211/2461 1139/2944 -f 1695/1837 1696/1838 1662/1803 1660/1801 -f 1697/1839 1698/1840 1690/1832 1691/1833 -f 1721/1863 1701/1843 1723/1865 1720/1862 -f 1742/1884 1723/1865 1724/1866 1740/1882 -f 1793/1935 1794/1936 1792/1934 1789/1931 -f 1742/1884 1793/1935 1789/1931 1741/1883 -f 1216/2892 1794/1936 1752/1894 205/2878 -f 1690/1832 1698/1840 1701/1843 1721/1863 -f 1686/1828 1687/1829 2585/2907 1684/1826 -f 1687/1829 1705/1847 2583/2905 2585/2907 -f 1705/1847 1706/1848 2582/2904 2583/2905 -f 1716/1858 1717/1859 1844/1994 2584/2906 -f 1706/1848 1716/1858 2584/2906 2582/2904 -f 1843/1993 1717/1859 1718/1860 1845/1995 -f 1843/1993 1846/1996 1842/1992 1840/1990 -f 2575/2895 1846/1996 1847/1997 2576/2958 -f 1685/1827 1686/1828 1689/1831 1692/1834 -f 1617/1758 2619/2959 2620/2960 1621/1762 -f 1621/1762 2620/2960 2621/2961 1623/1764 -f 1618/1759 1635/1776 2619/2959 1617/1758 -f 1616/1757 1635/1776 1636/1777 2622/2962 -f 2622/2962 1636/1777 1646/1787 2623/2963 -f 2623/2963 1646/1787 1654/1795 2624/2964 -f 2624/2964 1654/1795 1666/1807 1984/2151 -f 2619/2959 1607/1748 1608/1749 2620/2960 -f 2620/2960 1608/1749 1609/1750 2621/2961 -f 1609/1750 1601/1742 1582/1723 1583/1724 -f 1635/1776 1616/1757 1607/1748 2619/2959 -f 1614/1755 1616/1757 2622/2962 1633/1774 -f 1633/1774 2622/2962 2623/2963 1651/1792 -f 1651/1792 2623/2963 2624/2964 1667/1808 -f 1667/1808 2624/2964 1984/2151 1682/1824 -f 1682/1824 1984/2151 1981/2148 1681/1823 -f 1598/1739 1599/1740 1602/1743 1603/1744 -f 1603/1744 1602/1743 1606/1747 1612/1753 -f 1612/1753 1606/1747 1615/1756 1631/1772 -f 1631/1772 1615/1756 1634/1775 1649/1790 -f 1649/1790 1634/1775 1652/1793 1669/1810 -f 1669/1810 1652/1793 1668/1809 1677/1819 -f 1702/1844 1703/1845 1722/1864 1744/1886 -f 1722/1864 1743/1885 1797/1939 1744/1886 -f 1787/1929 1790/1932 1791/1933 1788/1930 -f 1743/1885 1790/1932 1787/1929 1797/1939 -f 2571/2890 1791/1933 1792/1934 2572/2891 -f 1721/1863 1703/1845 1685/1827 1690/1832 -f 1668/1809 1667/1808 1682/1824 1683/1825 -f 1680/1822 1668/1809 1683/1825 -f 1638/1779 1619/1760 1620/1761 2230/2483 -f 2230/2483 1620/1761 1622/1763 1626/1767 -f 1626/1767 1622/1763 1624/1765 1625/1766 -f 1618/1759 1619/1760 1639/1780 1637/1778 -f 1637/1778 1639/1780 1642/1783 1645/1786 -f 1645/1786 1642/1783 1644/1785 1653/1794 -f 1644/1785 1658/1799 1664/1805 1653/1794 -f 1488/1620 1485/1617 1484/1616 1489/1621 -f 1489/1621 2483/2780 2486/2783 1488/1620 -f 2483/2780 2482/2779 2485/2782 2486/2783 -f 2482/2779 2535/2851 2485/2782 -f 2535/2845 2532/2842 2533/2843 2485/2965 -f 2532/2842 2526/2836 2523/2833 2533/2843 -f 2526/2836 2527/2837 2524/2834 2523/2833 -f 2625/2966 1472/1604 1471/1603 1430/2967 -f 1471/1603 1470/1602 1429/1561 1430/2967 -f 1446/1578 1447/1579 1472/2969 2626/2968 -f 1472/1604 2625/2966 1273/2972 -f 2733/1604 1273/2972 2732/2971 -f 2734/1604 2735/2971 2626/2970 -f 1428/1560 1442/1574 841/2973 18/1559 -f 1854/2006 1855/2009 2514/2815 1853/2005 -f 1855/2009 1442/2813 1441/2814 2514/2815 -f 1431/1563 1428/1560 1427/1557 1430/1562 -f 1444/1576 2628/2975 2627/2974 1462/1594 -f 2627/2974 1460/1592 1462/1594 -f 1461/1593 1460/1592 2627/2974 1470/1602 -f 2628/2976 1470/1602 2627/2974 -f 1437/1569 1440/1572 2628/2977 1444/1576 -f 2628/2977 1440/1572 1429/1561 1470/2978 -f 1437/1569 1438/1570 1439/1571 1440/1572 -f 1438/1570 2629/2979 2502/2799 1439/1571 -f 2518/2820 2514/2815 2502/2816 2629/2980 -f 2629/2979 1438/1570 1435/1567 2517/2981 -f 2517/2819 2518/2820 2629/2980 -f 1435/1567 1436/1568 2516/2982 2517/2981 -f 2491/2790 2499/2796 1436/1568 1433/1565 -f 2495/2792 2491/2790 1433/1565 -f 2491/2790 2492/2791 2499/2796 -f 2499/2796 2492/2791 2503/2801 2498/2795 -f 2498/2795 2503/2801 2505/2803 2500/2808 -f 2505/2803 2507/2805 2500/2808 -f 2240/2493 2510/2807 2500/2808 2507/2805 -f 2240/2493 2241/2494 2244/2497 2510/2807 -f 2509/2806 2237/2490 2238/2491 2506/2804 -f 2499/2796 2496/2793 2516/2982 1436/1568 -f 2496/2822 2513/2811 2515/2817 2516/2818 -f 2513/2811 1852/2004 2630/2983 2515/2817 -f 1852/2004 845/2002 2630/2983 -f 2515/2817 2630/2983 1853/2005 2514/2815 -f 845/2002 1854/2006 1853/2005 2630/2983 -f 1601/1742 1599/1740 1586/1727 1582/1723 -f 1582/1723 1586/1727 1584/1725 1571/1712 -f 1563/1703 1571/1712 1584/1725 1570/1711 -f 1564/1704 2247/2500 1573/1714 1563/1703 -f 2245/2515 2247/2505 2249/2506 2255/2512 -f 2255/2512 2249/2506 2251/2508 2252/2509 -f 2631/2984 1578/1719 1579/1720 2632/2985 -f 2621/2961 1609/1750 1583/1724 2633/2986 -f 2633/2986 1583/1724 1572/1713 2634/2987 -f 1572/1713 1573/1714 2634/2987 -f 1623/1764 2621/2961 2633/2986 1580/1721 -f 1580/1721 2633/2986 2634/2987 1579/1720 -f 2634/2987 1573/1714 2632/2985 1579/1720 -f 1625/1766 1624/1765 1581/1722 1575/1716 -f 1575/1716 1581/1722 1578/1719 1574/1715 -f 2635/2988 2246/2499 1574/1715 1578/1719 -f 2631/2984 2635/2988 1578/1719 -f 2635/2988 2631/2984 2246/2499 -f 2246/2499 2631/2984 2632/2985 1573/1714 -f 1587/1728 1588/1729 1568/1709 1569/1710 -f 1588/1729 1591/1732 1567/1708 1568/1709 -f 1591/1732 1593/1734 1566/1707 1567/1708 -f 1565/1706 1595/1736 1596/1705 -f 1629/1770 1674/1816 1597/1738 1594/1735 -f 1597/1738 1595/1736 1593/1734 1594/1735 -f 1595/1736 1565/1706 1566/1707 1593/1734 -f 1566/1707 1565/1706 1557/1697 1560/1700 -f 1560/1700 1557/1697 1558/1698 1559/1699 -f 1558/2012 1857/2013 1559/2501 -f 1934/2092 1935/2093 1932/2090 1930/2088 -f 1940/2098 1934/2092 1930/2088 1939/2097 -f 1935/2093 2023/2190 2022/2189 1932/2090 -f 2048/2219 2049/2220 2037/2205 2039/2209 -f 2038/2208 2052/2224 2053/2225 2045/2216 -f 2029/2197 2058/2233 2059/2234 2027/2195 -f 2063/2238 2064/2239 2595/2922 2060/2235 -f 2064/2239 2068/2244 2076/2258 2595/2922 -f 2076/2258 2068/2244 2079/2261 2078/2260 -f 2080/2262 2083/2267 2079/2261 2070/2247 -f 2560/2872 2562/2874 2058/2233 2029/2197 -f 2027/2195 2059/2234 2589/2916 2028/2196 -f 2063/2238 2048/2219 2039/2209 2050/2221 -f 2051/2223 2052/2224 2049/2220 2046/2217 -f 2610/2946 2023/2190 2024/2191 2025/2192 -f 2610/2946 2562/2874 2560/2872 2609/2945 -f 2381/2657 1940/2098 1939/2097 2223/2476 -f 2057/2232 2561/2873 2637/2990 2636/2989 -f 2638/2991 2641/2994 2640/2993 2639/2992 -f 921/2996 2055/2995 2642/2998 410/2997 -f 410/2997 2642/2998 2644/3000 2643/2999 -f 2043/2214 2641/2994 2638/2991 2042/2213 -f 2042/2213 2638/2991 2645/3001 2613/2949 -f 2645/3001 2638/2991 2639/3003 2646/3002 -f 2640/2993 2055/2230 1351/2227 2647/3004 -f 2057/2232 2636/2989 2040/2211 2056/2231 -f 2040/2211 2636/2989 2644/3000 2043/2214 -f 2043/2214 2644/3000 2642/2998 2641/2994 -f 2641/2994 2642/2998 2055/2995 2640/2993 -f 2639/3005 2640/2993 2647/3004 1351/3006 -f 2025/2192 2026/2193 2648/3007 2561/2873 -f 2637/2990 2561/2873 2648/3007 -f 2013/2180 2035/2203 2036/2204 2587/2914 -f 2044/2215 2045/2216 2588/2915 2041/2212 -f 2053/2225 2054/2226 2028/2196 2589/2916 -f 2590/2917 2159/2377 2160/2378 2176/2399 -f 2176/2399 2160/2378 1359/2397 550/2398 -f 2034/2202 2035/2203 2586/2913 2593/2920 -f 2586/2913 2054/2226 2051/2223 2593/2920 -f 2587/2914 2036/2204 2159/2377 2590/2917 -f 2044/2215 2613/2949 1341/3008 404/2207 -f 2045/2216 2053/2225 2589/2916 2588/2915 -f 2613/2949 2645/3001 1344/3009 1341/3008 -f 1344/3009 2645/3001 2646/3002 1346/3010 -f 2639/3005 1351/3006 1353/3012 2646/3011 -f 1922/2080 1923/2081 2581/2903 1919/2077 -f 1987/2154 1988/2155 1989/2156 2465/2760 -f 1994/2161 1995/2162 2003/2170 2001/2168 -f 1998/2165 1999/2166 2558/2870 2557/2869 -f 1923/2081 2383/2659 2466/2761 2581/2903 -f 1372/2672 1994/2161 2001/2168 707/2128 -f 1998/2165 1995/2162 1996/2163 1997/2164 -f 2578/2899 2579/2900 1806/1950 1917/2075 -f 2580/2901 1368/2902 227/1943 1800/1944 -f 1922/2080 2578/2899 1917/2075 1916/2074 -f 1986/2153 1987/2154 2383/2659 2004/2171 -f 1999/2166 1988/2155 1985/2152 2558/2870 -f 2580/2901 2579/2900 1804/1948 1808/1952 -f 2644/3000 2636/2989 2637/2990 2643/2999 -f 2026/3013 2643/2999 2637/2990 -f 474/2912 428/811 2084/2269 2078/2260 -f 2552/2864 2142/2347 2128/2328 2119/2319 -f 2648/3007 2026/3013 2637/2990 -f 2651/3022 726/102 345/46 2659/3031 -f 1/45 1040/1135 2667/3040 2651/3022 -f 9/113 1022/1116 2666/3039 2653/3025 -f 299/552 300/558 2655/3027 2654/3026 -f 300/558 303/560 2658/3030 2655/3027 -f 2656/3028 349/26 734/14 2657/3029 -f 2657/3029 734/14 305/15 2658/3030 -f 2659/3031 345/46 729/48 2660/3032 -f 2660/3032 729/48 346/50 2661/3033 -f 2661/3033 346/50 348/41 2662/3034 -f 2662/3034 348/41 349/26 2656/3028 -f 291/559 435/827 2663/3035 2654/3026 -f 437/823 442/832 2665/3038 2664/3036 -f 435/827 438/828 2665/3038 2663/3035 -f 7/125 1023/1117 2666/3039 2652/3023 -f 2653/3025 11/117 1041/1136 2667/3040 -f 1386/1512 1385/1511 2668/3041 2669/3042 -f 2670/3043 1388/1514 1384/1510 2668/3041 -f 2672/3045 1394/1520 1391/1517 2671/3044 -f 2674/3047 1902/2060 1901/2059 2673/3046 -f 2675/3048 1904/2062 1902/2060 2674/3047 -f 1906/2064 1909/2067 2676/3049 2677/3050 -f 1903/2061 1906/2064 2677/3050 2675/3048 -f 1967/2129 1386/1512 2669/3042 2678/3051 -f 1968/2130 1967/2129 2678/3051 2679/3052 -f 1969/2131 1968/2130 2679/3052 2680/3053 -f 1909/2067 1969/2131 2680/3053 2676/3049 -f 2681/3054 1892/2048 1891/2047 2673/3046 -f 2683/3057 2087/2275 2085/2272 2682/3055 -f 2683/3057 2092/2281 1892/2048 2681/3054 -f 2672/3045 1399/1529 7/2681 2652/3024 -f 1389/1515 1398/1528 2671/3044 2670/3043 -f 2664/3037 447/840 956/1048 -f 2085/2292 2099/2289 2684/3058 2682/3056 -f 1964/2125 1963/2124 1986/2153 -f 1064/1159 389/9 1065/1160 -f 2686/3060 1886/2042 1889/2045 2685/3059 -f 2687/3061 1893/2049 1891/2047 2685/3059 -f 1903/2061 1893/2049 2687/3061 2688/3062 -f 1906/2064 1903/2061 2688/3062 2689/3063 -f 1885/2041 1886/2042 2686/3060 2690/3064 -f 2692/3066 2397/2683 2396/2682 2691/3065 -f 2420/2706 2398/2684 2693/3067 2694/3068 -f 2696/3070 2422/2708 2421/2707 2695/3069 -f 2697/3071 2415/2701 2422/2708 2696/3070 -f 2423/2709 2415/2701 2697/3071 2698/3072 -f 2699/3073 2424/2710 2423/2709 2698/3072 -f 2428/2714 2424/2710 2699/3073 2700/3074 -f 2689/3063 1907/2065 2428/2714 2700/3074 -f 2692/3066 1399/1529 1398/1528 2693/3067 -f 1389/1515 1385/1511 2695/3069 2694/3068 -f 292/567 441/566 2704/3078 2701/3075 -f 291/559 301/568 2702/3076 2701/3075 -f 2702/3076 301/568 305/15 2703/3077 -f 2703/3077 305/15 734/14 2714/3088 -f 441/566 439/829 2705/3079 2704/3078 -f 884/122 1035/1130 2715/3089 2706/3080 -f 2707/3081 725/118 1055/1150 2716/3090 -f 724/103 727/73 2709/3083 2708/3082 -f 727/73 728/49 2710/3084 2709/3083 -f 2710/3084 728/49 733/51 2711/3085 -f 733/51 742/40 2712/3086 2711/3085 -f 2712/3086 742/40 740/33 2713/3087 -f 740/33 739/27 2714/3088 2713/3087 -f 11/117 1023/1117 2715/3089 2707/3081 -f 2708/3082 726/102 1041/1136 2716/3090 -f 439/829 440/830 947/1038 2705/3079 -f 2691/3065 2396/2682 2395/2680 6/2679 -f 2691/3065 6/2679 2717/3092 -f 2717/3091 6/124 1019/1113 884/122 -f 2717/3091 884/122 2706/3080 -# 2563 polygons - 220 triangles - -# -# object Teath -# - -v 0.646992 1.098272 7.686674 -v -0.498168 1.207523 7.338418 -v -0.489018 1.262315 7.263352 -v -0.553878 1.109966 7.296640 -v -0.590838 1.162658 7.233572 -v -0.524208 1.172942 7.281527 -v 0.777672 1.162354 7.419515 -v 0.770112 1.149199 7.452587 -v 0.813642 1.158140 7.410550 -v 0.177732 1.058604 7.638671 -v 0.176562 1.153134 7.662511 -v 0.099462 1.030707 7.641737 -v 0.661992 1.161874 7.302512 -v 0.649722 1.181476 7.368491 -v 0.651252 1.257355 7.356377 -v 0.724002 1.196665 7.296505 -v 0.792612 1.233307 7.134400 -v 0.780852 1.299274 7.113332 -v 0.812562 1.145015 7.074571 -v 0.206592 0.950712 7.713820 -v 0.124272 0.928458 7.680900 -v 0.427602 0.986510 7.584771 -v 0.288102 0.949718 7.650836 -v 0.364392 0.980897 7.638793 -v 0.535002 1.002248 7.482755 -v 0.920712 1.179859 7.101523 -v 1.004352 1.275145 6.840358 -v 0.953142 1.235299 6.870449 -v 0.954432 1.167158 6.846569 -v -0.429738 0.981402 7.581848 -v -0.443508 1.023920 7.524744 -v -0.368538 0.997260 7.548769 -v -0.406578 1.005824 7.464804 -v -0.267468 1.006419 7.653768 -v -0.327528 1.116846 7.479644 -v -0.787758 1.128415 7.200575 -v -0.815508 1.213278 7.176456 -v -0.765528 1.141506 7.134546 -v -0.733788 1.085058 7.101675 -v -0.700008 1.294404 7.065364 -v -0.670218 1.283618 7.077376 -v -0.684768 1.196010 7.074491 -v -0.762498 1.259642 6.900349 -v -0.809088 1.177961 6.846553 -v -0.773658 1.232553 6.840425 -v -0.679728 1.145573 7.431536 -v -0.644958 1.135392 7.440613 -v -0.614118 1.066061 7.425707 -v -0.652368 1.147625 7.404524 -v -0.617808 1.071350 7.353646 -v -0.666558 1.061349 7.287652 -v -0.816288 1.157085 6.924590 -v -0.836118 1.208889 6.864449 -v 0.019692 1.144578 7.752522 -v -0.064638 1.080914 7.716641 -v -0.706728 1.062978 7.179709 -v -0.756438 1.106262 7.233658 -v -0.773478 1.104153 7.032615 -v 0.008022 0.991494 7.704788 -v 0.006642 0.973935 7.788859 -v 0.520482 1.221701 7.578448 -v 0.541722 1.312328 7.593322 -v 0.538122 1.306025 7.596353 -v 0.438342 1.084475 7.497642 -v 0.445002 1.123804 7.518634 -v 0.499182 1.106000 7.446610 -v 0.569472 1.162369 7.428578 -v 0.590772 1.164226 7.467577 -v 0.510852 1.163962 7.488542 -v 0.531912 1.237252 7.548395 -v 0.497202 1.152064 7.557592 -v 0.454062 1.129891 7.569620 -v 0.475362 1.128356 7.551588 -v 0.801132 1.020566 7.296781 -v 0.750882 1.001459 7.359799 -v 0.781962 1.028513 7.395736 -v 0.805122 1.158493 7.446529 -v 0.737112 1.081382 7.437676 -v 0.797562 1.231714 7.461427 -v 0.801492 1.237717 7.458397 -v 0.804732 1.233211 7.452454 -v -0.661998 1.125912 7.137589 -v -0.162978 1.011480 7.626751 -v -0.287148 1.117898 7.575590 -v -0.310968 1.049189 7.569748 -v -0.239778 1.077195 7.635713 -v -0.225708 1.204031 7.593492 -v -0.199248 1.211570 7.620489 -v -0.170028 1.279626 7.590353 -v -0.168288 1.113183 7.626594 -v -0.241488 1.029156 7.608779 -v -0.748038 1.213956 7.038482 -v -0.771018 1.151559 7.035561 -v -0.688038 1.131342 7.155616 -v -0.673248 1.195527 7.146451 -v -0.680208 1.221006 7.134418 -v -0.645738 1.355618 7.080193 -v -0.690378 1.306742 7.095284 -v -0.645768 1.360416 7.074232 -v -0.733998 1.234086 7.053466 -v -0.744378 1.191277 7.113501 -v -0.738258 1.142358 7.101583 -v 0.546162 1.308419 7.590308 -v 0.569112 1.236949 7.545373 -v 0.555072 1.234907 7.578427 -v 0.580182 1.178074 7.497493 -v 0.552972 1.106116 7.521593 -v 0.610542 1.178602 7.455470 -v 0.588012 1.105361 7.425648 -v 0.530832 1.078151 7.479706 -v -0.337368 1.133420 7.527594 -v 0.754812 1.104221 7.266623 -v 0.717582 1.140952 7.353539 -v 0.705852 1.091414 7.332650 -v 0.680742 1.276837 7.344353 -v 0.645252 1.345207 7.323281 -v 0.635772 1.153594 7.380527 -v 0.640182 1.080994 7.380641 -v 0.754362 1.186099 7.257521 -v -0.595878 1.202300 7.254473 -v -0.634158 1.142024 7.269585 -v -0.576768 1.189523 7.338449 -v -0.572448 1.222706 7.263415 -v -0.500448 1.294433 7.281338 -v -0.521058 1.279397 7.254353 -v -0.455028 1.333673 7.236232 -v -0.447858 1.332176 7.245298 -v -0.477528 1.270772 7.299414 -v -0.584058 1.134615 7.332583 -v 0.264582 0.986331 7.659842 -v 0.184692 0.980364 7.677796 -v 0.186042 1.026306 7.710775 -v 0.254562 1.058340 7.668702 -v 0.179292 1.236239 7.668426 -v 0.179622 1.166990 7.698561 -v 0.173892 1.241343 7.668417 -v 0.169122 1.235945 7.671446 -v 0.102342 0.980358 7.674866 -v 0.108312 1.052661 7.680704 -v -0.148788 1.012932 7.596811 -v -0.299268 1.051232 7.536695 -v -0.179838 0.948486 7.629872 -v -0.381948 0.971220 7.590837 -v 0.097362 0.986601 7.641807 -v 0.081792 1.059864 7.683712 -v -0.485658 0.987759 7.422810 -v -0.538428 1.019949 7.479796 -v 0.338772 1.040822 7.590724 -v 0.407652 1.063856 7.551689 -v 0.292482 1.221747 7.608479 -v 0.319062 1.215713 7.584410 -v -0.659658 1.022613 7.266748 -v 0.261672 1.290107 7.581365 -v 0.258972 1.283816 7.584301 -v 0.263262 1.199244 7.605494 -v 0.260712 1.021052 7.608794 -v 0.336072 1.087973 7.620683 -v 0.382332 1.131678 7.560555 -v 0.568482 1.125124 7.404561 -v 1.005222 1.164479 6.861495 -v 1.007862 1.257709 6.813375 -v 1.026792 1.210711 6.882482 -v 0.987762 1.338811 6.879259 -v 0.954342 1.408171 6.921175 -v 0.991722 1.343365 6.915233 -v 0.951612 1.405186 6.930151 -v 0.971172 1.320292 6.936326 -v 0.976062 1.243195 6.936445 -v 0.042492 0.920682 7.692904 -v 0.433212 0.931874 7.560865 -v 0.444012 0.967976 7.623799 -v 0.292422 0.934496 7.701855 -v 0.289722 0.893885 7.629955 -v 0.972102 1.141795 6.933583 -v 1.015752 1.190759 6.783452 -v 1.011492 1.272970 6.789367 -v 0.388512 0.906512 7.647974 -v 0.376002 0.996962 7.746799 -v 0.460002 1.065611 7.518724 -v 0.415152 1.067841 7.794662 -v 0.833802 1.057888 7.182740 -v 0.853482 1.125757 7.230607 -v 0.430482 1.011017 7.719769 -v 0.866052 1.052507 7.194742 -v 0.909552 1.070090 7.125682 -v 0.412512 1.000278 7.752747 -v 0.931692 1.093079 7.050663 -v 0.904602 1.251376 7.176394 -v -0.609138 1.211258 7.230474 -v 0.365742 0.902531 7.596985 -v 0.207432 0.926955 7.677877 -v 0.231942 0.937884 7.758886 -v 0.208662 0.895185 7.692944 -v 0.868722 1.322779 7.179305 -v 0.868422 1.316479 7.182334 -v 0.879852 1.230404 7.194463 -v 0.641832 1.017287 7.506808 -v 0.878172 1.153603 7.194583 -v 0.526422 0.981415 7.590817 -v 0.932172 1.115126 7.149598 -v 0.555162 0.994340 7.599770 -v 0.601572 1.037303 7.644749 -v -0.519528 1.118799 7.383603 -v -0.007668 1.011198 7.635818 -v 0.686532 0.997340 7.410800 -v 0.694782 1.064018 7.458672 -v 0.074052 1.006116 7.650749 -v 0.850632 1.154956 7.101562 -v 0.071022 1.046645 7.668718 -v 0.856782 1.203577 7.113481 -v 0.846372 1.246381 7.056376 -v 0.802752 1.319044 7.095264 -v 0.812382 1.307002 7.065346 -v -0.110508 1.071291 7.695689 -v -0.086658 1.055319 7.653691 -v -0.007758 1.073349 7.671699 -v -0.084888 1.061385 7.698724 -v 0.758112 1.368217 7.080173 -v -0.008838 1.153236 7.728520 -v 0.785622 1.208131 7.149454 -v 0.061302 1.053615 7.713663 -v -0.093288 0.996833 7.665775 -v -0.016158 1.017636 7.728734 -v 0.869652 1.235824 7.017392 -v 0.883392 1.163848 7.035538 -v -0.041898 1.148159 7.746562 -v 0.780432 1.041536 7.278712 -v 0.834882 1.092299 7.320655 -v 0.800442 1.143643 7.155595 -v -0.012558 1.153299 7.767520 -v -0.013398 1.228299 7.764476 -v -0.008088 1.233396 7.767395 -v -0.003228 1.227695 7.767407 -v 0.986262 1.210585 6.801456 -v 0.949842 1.245509 6.879405 -v 0.944142 1.261888 6.801376 -v 0.872892 1.324627 6.825264 -v 0.040422 1.075230 7.725712 -v 0.806172 1.367827 6.831241 -v 0.068862 0.988161 7.680807 -v 0.087672 1.060521 7.716671 -v 0.846672 1.310902 6.873261 -v 0.860472 1.335466 6.855278 -v -0.013518 0.985764 7.683831 -v 0.879882 1.254535 6.900358 -v -0.822048 1.114761 6.915589 -v -0.838488 1.141943 6.837544 -v 0.881922 1.229359 6.915411 -v 0.917202 1.174480 6.927491 -v -0.866898 1.173636 6.765536 -v 0.959742 1.196890 6.870508 -v -0.894528 1.251660 6.786380 -v 0.964242 1.196161 6.783444 -v 0.949272 1.272052 6.780395 -v -0.859188 1.213259 6.783420 -v -0.890958 1.234894 6.807460 -v 0.489102 0.946844 7.539877 -v 0.557532 0.955769 7.494821 -v 0.617142 0.986594 7.446797 -v 0.590232 0.955244 7.539865 -v 0.638382 1.039403 7.641722 -v 0.652422 1.103072 7.689596 -v -0.841278 1.298940 6.900288 -v -0.357648 0.948009 7.515890 -v -0.425118 0.956637 7.470832 -v -0.858408 1.213489 6.930451 -v -0.399678 0.972390 7.569866 -v -0.518058 1.013877 7.623727 -v -0.481308 1.014777 7.626746 -v -0.840618 1.180851 6.966482 -v -0.899958 1.169750 6.777535 -v -0.541518 1.067943 7.668685 -v -0.886998 1.250847 6.837374 -v -0.909978 1.184601 6.876479 -v -0.869238 1.312116 6.879302 -v -0.515088 1.008564 7.488784 -v -0.512688 1.007409 7.518817 -v -0.459048 0.947397 7.512868 -v -0.831048 1.381488 6.930189 -v -0.834588 1.378482 6.924242 -v -0.469038 1.182983 7.371510 -v -0.831828 1.374891 6.933220 -v -0.872868 1.314564 6.915277 -v -0.852468 1.290301 6.936374 -v -0.479388 1.140032 7.341548 -v -0.492558 1.181460 7.356496 -v -0.855828 1.112082 6.921638 -v -0.851208 1.182903 6.939469 -v -0.889188 1.139267 6.852562 -v -0.448158 1.336367 7.239252 -v -0.596478 1.011894 7.320782 -v -0.572178 1.048094 7.446701 -v -0.543108 0.999096 7.383790 -v -0.712278 1.076384 7.308690 -v -0.614658 1.127277 7.242599 -v -0.498108 1.103463 7.359642 -v -0.688518 1.144021 7.395556 -v 0.816102 1.080626 7.335689 -v -0.673698 1.224797 7.443404 -v 0.712782 1.059476 7.437714 -v -0.590448 1.043565 7.425744 -v -0.555078 1.038726 7.398743 -v -0.680838 1.003146 7.287745 -v -0.660798 1.013508 7.386788 -v -0.688398 1.080948 7.350705 -v 0.740562 1.088765 7.365613 -v 0.811392 1.096564 7.362670 -v 0.788592 1.079369 7.299710 -v -0.677088 1.220280 7.437461 -v 0.717252 1.031110 7.329724 -v -0.669918 1.218789 7.443412 -v 0.677142 1.056734 7.410707 -v 0.663882 1.017716 7.392735 -v -0.566238 0.979932 7.401856 -v -0.630768 0.984348 7.350853 -v -0.693768 1.064404 7.323721 -v 0.128622 1.077870 7.686707 -v -0.776658 1.164560 6.912490 -v -0.753078 1.196059 6.906491 -v 0.147792 1.152576 7.686590 -v -0.846858 1.200957 6.783436 -v -0.820218 1.231256 6.780460 -v -0.831888 1.277160 6.780388 -v 0.209412 1.154957 7.680545 -v 0.233742 1.081752 7.674706 -v 0.280062 1.067337 7.662643 -v 0.257202 1.036680 7.626712 -v 0.262302 0.992881 7.626782 -v 0.179232 0.987780 7.626788 -v 0.223302 1.093673 7.620671 -v -0.731208 1.310853 6.840301 -v -0.729288 1.315995 6.873253 -v 0.249882 1.093053 7.611610 -v 0.263772 1.122453 7.611563 -v -0.842358 1.201998 6.870502 -v -0.826788 1.266984 6.801373 -v -0.807258 1.282913 6.816359 -v -0.832458 1.250612 6.879397 -v -0.755508 1.329723 6.825260 -v 0.268182 1.286501 7.581371 -v -0.688788 1.372936 6.831233 -v -0.743088 1.340277 6.855271 -v 0.284412 1.204895 7.575455 -v -0.684468 1.370849 6.837187 -v -0.682818 1.374735 6.834160 -v 0.358992 1.150295 7.575539 -v -0.799818 1.179588 6.927483 -v -0.747498 1.233294 6.933442 -v -0.764538 1.234466 6.915403 -v 0.402912 1.146059 7.551560 -v 0.395802 1.066820 7.521657 -v 0.380622 1.108210 7.521589 -v -0.868878 1.215690 6.801448 -v 0.303162 1.111556 7.551613 -v -0.700188 1.132415 7.074589 -v 0.319392 1.042543 7.542748 -v -0.650928 1.356807 7.071218 -v 0.237732 1.066599 7.578691 -v 0.246402 1.023102 7.578762 -v 0.614262 1.157509 7.395535 -v 0.609222 1.125658 7.356585 -v -0.668478 1.286973 7.113349 -v -0.731118 1.183625 7.014544 -v 0.643602 1.339510 7.326221 -v 0.650772 1.341001 7.320265 -v -0.746358 1.146420 7.014602 -v -0.757248 1.223226 7.017409 -v 0.658932 1.258198 7.317373 -v 0.694782 1.265983 7.311412 -v 0.739092 1.174732 7.278502 -v -0.650448 1.164003 7.134509 -v -0.655848 1.198553 7.164485 -v 0.731232 1.105682 7.242631 -v -0.723078 1.101402 7.191644 -v 0.668772 1.091053 7.293650 -v 0.720672 1.148281 7.245587 -v 0.614682 1.081849 7.356653 -v -0.786918 1.141079 7.053611 -v -0.825438 1.141417 7.077599 -v -0.830298 1.154670 7.107515 -v 0.762822 1.176602 7.134489 -v -0.848418 1.287126 7.212320 -v 0.758142 1.372717 7.074214 -v 0.782592 1.296217 7.077354 -v 0.763332 1.369405 7.071199 -v 0.797142 1.208608 7.074471 -v -0.776388 1.055974 7.113713 -v -0.800328 1.083762 7.041616 -v 0.860412 1.226257 7.038464 -v -0.817308 1.082418 7.140680 -v -0.846078 1.212640 7.155491 -v -0.849888 1.283226 7.206374 -v 0.843492 1.196224 7.014523 -v 0.858732 1.158722 7.014583 -v -0.845778 1.280838 7.215350 -v -0.850848 1.209699 7.191476 -v 0.774372 1.138216 7.140590 -v 0.768222 1.211152 7.164463 -v -0.821148 1.197126 7.209440 -v 0.870462 1.191250 6.906499 -v 0.864882 1.228199 6.933447 -v -0.734688 1.043186 7.185691 -v -0.766248 1.104722 7.206654 -v -0.836658 1.156089 7.056519 -v 0.801852 1.365742 6.837196 -v -0.072198 0.996567 7.683813 -v 0.800202 1.369642 6.834167 -v 0.848592 1.305745 6.840310 -v -0.153798 0.989643 7.668808 -v 0.924642 1.277812 6.819388 -v 0.891042 1.227445 6.840434 -v -0.159768 1.000212 7.710814 -v 0.937602 1.226156 6.783397 -v -0.109308 1.007016 7.845753 -v -0.132408 1.021848 7.926754 -v 0.926472 1.172857 6.846559 -v 0.894042 1.159457 6.912498 -v -0.087888 1.004478 7.752739 -v -0.090798 1.015089 7.635808 -v -0.004998 1.001763 7.743773 -v -0.152808 0.955155 7.671884 -v 0.187092 0.938529 7.782872 -v 0.205602 0.930681 7.755877 -v 0.148002 1.035324 7.908698 -v -0.140688 0.986622 7.845785 -v -0.146118 0.968505 7.770833 -v 0.143142 1.038921 7.911713 -v 0.141252 0.972258 7.866867 -v 0.137832 1.034718 7.908698 -v -0.114018 0.975858 7.869788 -v -0.122448 1.021848 7.926754 -v -0.128508 1.024560 7.932795 -v 0.059352 0.925005 7.770898 -v -0.042978 0.969444 7.794817 -v -0.080238 0.987240 7.860800 -v -0.017268 0.969414 7.773850 -v -0.084498 0.926754 7.740869 -v 0.128352 0.881106 7.704958 -v 0.006372 0.956709 7.707862 -v -0.073128 0.944379 7.689845 -v 0.046422 0.889200 7.707967 -v 0.133812 0.882081 7.758974 -v -0.160728 0.967863 7.740802 -v -0.187908 0.971757 7.743817 -v 0.033642 0.930420 7.779862 -v -0.380868 1.086444 7.410662 -v -0.321648 1.074533 7.470646 -v 0.081942 0.934638 7.791852 -v -0.448848 1.098366 7.365599 -v -0.490248 1.162034 7.404500 -v -0.471138 1.150052 7.419537 -v -0.449178 1.139796 7.380548 -v -0.460668 1.168995 7.443491 -v -0.411648 1.236260 7.485410 -v 0.129492 0.959466 7.743838 -v -0.424578 1.314599 7.509274 -v 0.169932 0.978222 7.845798 -v -0.416748 1.313108 7.515316 -v -0.401238 1.227305 7.518474 -v 0.137262 0.993807 7.836802 -v -0.391638 1.151585 7.440589 -v 0.108312 0.976125 7.851844 -v 0.048852 0.944742 7.731868 -v -0.469308 1.083711 7.389701 -v 0.314682 0.934172 7.683911 -v -0.448758 1.236251 7.479457 -v 0.340692 0.948593 7.698903 -v -0.420138 1.319399 7.512287 -v 0.410112 1.062441 7.794672 -v 0.394212 1.019423 7.722778 -v -0.435438 1.240508 7.515431 -v -0.379578 1.153799 7.509523 -v 0.419082 1.064834 7.788716 -v 0.433662 0.973115 7.653821 -v -0.344208 1.060466 7.491728 -v -0.358368 1.128899 7.512584 -v -0.435978 1.102749 7.482595 -v -0.413898 1.066392 7.446674 -v 0.467772 0.980567 7.617829 -v 0.421092 0.961850 7.548827 -v -0.222288 1.029674 7.560713 -v 0.344922 0.946904 7.578877 -v -0.127188 1.085595 7.635701 -v 0.275202 0.923564 7.617918 -v 0.494262 1.000583 7.566803 -v -0.308058 1.131383 7.563575 -v -0.284988 1.092935 7.536629 -v -0.207588 1.099286 7.566647 -v -0.264198 1.137417 7.587554 -v 0.615522 1.061573 7.620721 -v 0.655002 1.100666 7.680628 -v -0.176448 1.275719 7.587337 -v 0.650202 1.052546 7.608743 -v 0.638112 1.020041 7.539763 -v -0.167178 1.273325 7.593383 -v 0.567642 1.030547 7.539746 -v -0.169518 1.189662 7.617500 -v -0.190878 1.193516 7.587467 -v 0.618732 1.039442 7.476746 -v 0.664452 1.029875 7.497725 -v -0.153738 1.084080 7.626637 -v 0.604002 1.018088 7.440796 -v -0.141108 1.056426 7.593721 -v 0.473862 0.977435 7.533789 -v -0.250638 0.973332 7.593851 -v 0.507972 0.981152 7.611784 -v 0.831282 1.101397 7.188622 -v 0.866892 1.124518 7.206623 -v -0.332538 1.013847 7.602761 -v -0.327648 0.989781 7.566817 -v -0.371568 1.007889 7.635820 -v 0.873492 1.237246 7.158379 -v -0.330108 1.036248 7.737768 -v 0.872532 1.318867 7.173268 -v 0.904782 1.245916 7.140421 -v -0.293628 1.044354 7.740684 -v 0.863082 1.145393 7.125565 -v 0.926082 1.161211 7.077565 -v 0.895122 1.140779 7.050590 -v -0.306438 1.086165 7.809649 -v 0.933702 1.175584 7.053555 -v 0.900522 1.099052 7.035640 -v -0.191148 0.974331 7.662790 -v -0.193848 0.958512 7.710882 -v 0.861312 1.076665 7.107637 -v -0.339708 0.959505 7.578859 -v 0.933162 1.187389 6.933511 -v 0.958152 1.212958 6.972476 -v 0.968532 1.213220 6.948486 -v -0.347718 0.995001 7.641794 -v -0.336198 0.999249 7.671814 -v -0.311358 1.091571 7.812662 -v -0.315528 1.088859 7.806623 -v -0.311148 1.024599 7.767722 -v -0.241968 0.973206 7.710856 -v -0.274878 1.020996 7.761778 -v 0.950892 1.411489 6.927117 -v -0.216648 0.958488 7.695866 -v -0.292128 0.932331 7.662857 -v 0.959802 1.327138 6.900244 -v -0.194298 0.919098 7.638890 -v -0.271278 0.928659 7.611866 -v 0.975612 1.235170 6.789423 -v -0.345108 0.980405 7.515839 -v 0.982662 1.194338 6.774476 -v -0.475248 1.020762 7.422758 -v -0.493038 1.036119 7.458714 -v 0.938292 1.144483 6.924606 -v -0.496578 1.040550 7.605740 -v -0.533478 1.065252 7.674734 -v -0.529938 1.029723 7.590744 -v -0.539388 1.069752 7.677656 -v -0.919117 1.431730 7.467472 -v -0.906543 1.405713 7.335268 -v -0.873513 1.336839 7.358689 -v -0.089526 1.194600 8.128790 -v -0.071677 1.274502 8.195261 -v -0.058806 1.167306 8.128510 -v -0.030696 1.193316 8.140776 -v 0.112943 1.408308 8.235277 -v 0.244254 1.195270 8.119732 -v -0.552606 1.283311 7.898312 -v 0.936238 1.231223 7.399996 -v 0.926098 1.304213 7.430527 -v 0.925828 1.302404 7.430515 -v 0.917035 1.230797 7.457033 -v 0.925975 1.303607 7.430523 -v 0.921264 1.276142 7.493323 -v 0.841794 1.223213 7.630932 -v 0.827996 1.294412 7.658430 -v 0.828237 1.296209 7.658442 -v 0.700645 1.283681 7.850350 -v 0.474145 1.178008 8.020643 -v 0.503214 1.285270 8.081350 -v 0.427344 1.249945 8.069115 -v -0.902195 1.289539 7.184410 -v -0.902135 1.288933 7.184404 -v -0.902105 1.287742 7.184399 -v -0.907802 1.216711 7.213847 -v -0.292716 1.249901 8.075151 -v 1.046997 1.329786 7.097627 -v 1.029356 1.268100 7.121190 -v 1.016127 1.221087 7.150896 -v 1.005686 1.291362 7.181411 -v 1.005776 1.293468 7.181427 -v 1.005716 1.292862 7.181419 -v -0.802293 1.204621 7.426809 -v -0.734166 1.438555 7.800502 -v -0.715356 1.395991 7.794260 -v -0.867486 1.311865 7.448514 -v -0.849184 1.446568 7.569565 -v -0.817084 1.335589 7.526687 -v -0.698948 1.268134 7.721233 -v -0.978095 1.441281 7.071467 -v -0.925774 1.264513 7.121155 -v -0.912542 1.217158 7.153880 -v -0.725167 1.223209 7.630924 -v -0.766808 1.303813 7.685497 -v -0.753127 1.268977 7.607252 -v -0.962105 1.303605 7.187438 -v -0.915905 1.263573 7.247221 -v -1.003982 1.428378 7.191408 -v -0.836555 1.440136 7.587555 -v -0.815945 1.423645 7.707379 -v -0.554976 1.426246 8.043406 -v -0.943866 1.395117 7.308187 -v -0.648936 1.411243 7.962367 -v -0.537306 1.383715 8.034142 -v -0.189577 1.411928 8.193369 -v -0.188017 1.369478 8.172020 -v -0.152736 1.300322 8.153503 -v -0.531215 1.255880 7.958183 -v -0.536466 1.210535 7.921888 -v 0.020063 1.297332 8.192486 -v -0.081337 1.393809 8.250191 -v 0.047303 1.365204 8.222984 -v 0.220673 1.426185 8.172413 -v 0.344333 1.412599 8.184315 -v -0.603606 1.291474 7.931421 -v 0.307494 1.300960 8.147470 -v 0.213564 1.267519 8.126272 -v -0.671046 1.385215 7.833187 -v 0.278604 1.241095 8.129110 -v -0.270007 1.419971 8.160374 -v -0.259777 1.377512 8.142132 -v -0.278586 1.309055 8.108519 -v 0.213564 1.267219 8.126268 -v -0.368616 1.285193 8.090408 -v -0.315666 1.204505 8.047831 -v 0.213534 1.265721 8.126261 -v 0.213534 1.167976 8.119453 -v -0.484596 1.420712 8.061405 -v -0.477996 1.378274 8.040147 -v -0.391657 1.404509 8.142319 -v -0.058836 1.266861 8.135237 -v 0.107423 1.365870 8.214018 -v -0.058806 1.266552 8.135237 -v -0.123846 1.240437 8.138077 -v 0.236063 1.394467 8.241226 -v 0.134663 1.298001 8.183430 -v -0.058806 1.265052 8.135225 -v 0.226403 1.275184 8.186293 -v 0.156174 1.239102 8.156013 -v 0.185424 1.194261 8.134739 -v -0.001446 1.238445 8.165073 -v 0.342773 1.370161 8.163054 -v -0.065947 1.425516 8.181471 -v 0.041813 1.407672 8.241314 -v 1.047475 1.399026 7.308224 -v 1.008386 1.193562 7.180737 -v 1.034666 1.456029 7.185658 -v -0.342696 1.277498 8.036338 -v -0.339515 1.177964 8.026588 -v -0.370235 1.204682 8.023842 -v -0.342576 1.275689 8.036325 -v -0.342666 1.277201 8.036338 -v -0.406236 1.250276 8.024157 -v -0.438816 1.309619 8.033538 -v -0.361896 1.436195 8.076528 -v -0.931085 1.452429 7.185625 -v -0.959433 1.439520 7.308492 -v -0.929465 1.324554 7.274650 -v -0.904805 1.189636 7.183721 -v -0.943411 1.325877 7.097592 -v -0.962854 1.396899 7.068234 -v 0.496524 1.436239 8.070492 -v 0.394404 1.377556 8.136095 -v 0.477264 1.277266 8.027279 -v 0.450295 1.204582 8.038862 -v 0.477204 1.275754 8.027267 -v 0.477324 1.277563 8.027279 -v 0.573444 1.309682 8.024574 -v 0.404633 1.420036 8.151403 -v 0.413214 1.309132 8.099552 -v 0.504865 1.204759 8.014785 -v 0.540865 1.250350 8.015099 -v 0.526283 1.404574 8.133261 -v 0.619194 1.420775 8.052437 -v 0.612624 1.378319 8.034111 -v 0.703014 1.426604 7.995440 -v 0.685344 1.384073 7.986175 -v 0.738475 1.443089 7.875525 -v 0.679255 1.256534 7.910130 -v 0.700525 1.282481 7.850340 -v 0.717923 1.211567 7.825864 -v 0.781286 1.316783 7.796559 -v 0.700735 1.284287 7.850353 -v 0.683095 1.315667 7.946610 -v 0.684506 1.211201 7.873837 -v 0.751645 1.292129 7.883458 -v 0.694466 1.184702 7.846644 -v 0.748826 1.257296 7.808143 -v 0.796975 1.411613 7.914311 -v 0.834505 1.428074 7.797418 -v 0.819086 1.385573 7.785132 -v 0.869156 1.455074 7.677667 -v 0.815576 1.268138 7.721241 -v 0.828147 1.295615 7.658441 -v 0.815756 1.222805 7.684947 -v 0.900597 1.328777 7.595681 -v 0.936147 1.397630 7.575188 -v 0.850795 1.438559 7.800511 -v 0.831985 1.395995 7.794268 -v 0.824096 1.327589 7.754701 -v 0.821424 1.196633 7.654735 -v 0.869757 1.268981 7.607261 -v 0.883436 1.303805 7.685506 -v 0.932576 1.423637 7.707388 -v 0.953183 1.440141 7.587565 -v 0.965814 1.446573 7.569574 -v 0.969087 1.463088 7.446640 -v 0.990148 1.336845 7.358699 -v 0.961228 1.277007 7.376324 -v 1.041355 1.448250 7.344544 -v 1.023175 1.405719 7.335278 -v 0.946344 1.404020 7.563240 -v 1.035747 1.431735 7.467482 -v 0.933714 1.335593 7.526696 -v 0.984118 1.311870 7.448524 -v 0.918925 1.204625 7.426818 -v 1.063015 1.443438 7.305508 -v 1.107596 1.432287 7.191446 -v 1.033076 1.328463 7.274687 -v 1.019486 1.267161 7.247254 -v 1.011386 1.220637 7.210952 -v 1.065686 1.307514 7.187473 -v 1.081676 1.445178 7.071506 -v 1.066437 1.400808 7.068272 -v -0.535056 1.315331 7.991556 -v -0.552696 1.283921 7.898318 -v -0.546396 1.184366 7.891679 -v -0.552456 1.282112 7.898306 -v -0.569886 1.210921 7.870805 -v -0.600786 1.256662 7.853174 -v -0.633245 1.316425 7.844615 -v -0.590435 1.442731 7.923582 -v -0.686436 1.427716 7.845471 -v -0.752525 1.455070 7.677659 -v -0.707465 1.327585 7.754693 -v -0.699125 1.222813 7.684939 -v -0.711518 1.295611 7.658432 -v -0.704794 1.196629 7.654726 -v -0.711365 1.294408 7.658422 -v -0.711608 1.296205 7.658434 -v -0.783934 1.328773 7.595672 -v -0.819517 1.397626 7.575179 -v -0.829714 1.404025 7.563230 -v -0.852454 1.463083 7.446630 -v -0.804637 1.276138 7.493314 -v -0.800406 1.230805 7.457024 -v -0.819603 1.231219 7.399987 -v -0.809193 1.302400 7.430506 -v -0.844593 1.277002 7.376315 -v -0.809346 1.303603 7.430514 -v -0.809466 1.304209 7.430518 -v -0.924726 1.448245 7.344533 -# 756 vertices - -vt 0.852877 -1.220611 0.000000 -vt 0.852878 -1.314086 0.000000 -vt 0.738006 -1.280950 0.000000 -vt 0.967750 -1.280949 0.000000 -vt 0.776321 -1.339274 0.000000 -vt 0.852879 -1.438286 0.000000 -vt 0.808006 -1.437567 0.000000 -vt 0.712129 -1.519191 0.000000 -vt 0.563034 -1.742663 0.000000 -vt 0.712129 -1.885656 0.000000 -vt 0.624738 -1.551237 0.000000 -vt 0.861225 -1.742663 0.000000 -vt 0.799520 -1.551237 0.000000 -vt 0.712129 -1.321987 0.000000 -vt 0.697711 -1.335944 0.000000 -vt 0.929435 -1.339273 0.000000 -vt 0.897752 -1.437567 0.000000 -vt 0.504728 -1.805069 0.000000 -vt 0.478209 -1.970150 0.000000 -vt 0.430925 -1.783690 0.000000 -vt 0.482055 -1.991309 0.000000 -vt 0.946050 -1.970150 0.000000 -vt 0.942204 -1.991309 0.000000 -vt 0.993334 -1.783690 0.000000 -vt 0.972990 -1.222464 0.000000 -vt 0.997270 -1.318206 0.000000 -vt 0.732764 -1.222465 0.000000 -vt 0.708486 -1.318208 0.000000 -vt 0.746382 -1.307231 0.000000 -vt 0.845477 -1.548115 0.000000 -vt 0.852880 -1.555281 0.000000 -vt 0.860283 -1.548115 0.000000 -vt 0.959374 -1.307229 0.000000 -vt 0.712129 -2.000510 0.000000 -vt 0.726547 -1.335944 0.000000 -vt 0.919531 -1.805069 0.000000 -vt 0.381943 -1.005024 0.000000 -vt 0.763386 -1.148766 0.000000 -vt 0.662045 -1.373517 0.000000 -vt 0.477302 -1.717692 0.000000 -vt 0.381943 -1.412606 0.000000 -vt 0.580355 -1.569322 0.000000 -vt 0.381943 -1.803237 0.000000 -vt 0.286584 -1.717692 0.000000 -vt 0.183531 -1.569322 0.000000 -vt 0.000499 -1.148766 0.000000 -vt 0.101841 -1.373517 0.000000 -vt 0.006911 -1.003335 0.000000 -vt 0.280035 -1.724298 0.000000 -vt 0.185014 -1.751085 0.000000 -vt 0.185014 -1.751864 0.000000 -vt 0.319158 -1.818071 0.000000 -vt 0.230681 -1.653243 0.000000 -vt 0.185014 -1.749257 0.000000 -vt 0.089991 -1.724300 0.000000 -vt 0.139345 -1.653244 0.000000 -vt 0.050870 -1.818073 0.000000 -vt 0.185015 -1.994714 0.000000 -vt 0.756974 -1.003335 0.000000 -vt 0.005409 -1.995356 0.000000 -vt 0.002338 -1.925709 0.000000 -vt 0.185013 -1.612275 0.000000 -vt 0.367692 -1.925706 0.000000 -vt 0.364621 -1.995354 0.000000 -vt 0.876568 -1.457038 0.000000 -vt 0.452774 -1.866606 0.000000 -vt 0.972274 -1.863591 0.000000 -vt 0.453325 -1.868898 0.000000 -vt 0.972151 -1.863956 0.000000 -vt 0.479686 -1.868182 0.000000 -vt 0.876025 -1.457774 0.000000 -vt 0.451276 -1.860724 0.000000 -vt 0.972277 -1.863576 0.000000 -vt 0.944247 -1.867623 0.000000 -vt 0.828884 -1.457134 0.000000 -vt 0.972069 -1.864459 0.000000 -vt 0.477639 -1.867702 0.000000 -vt 0.877212 -1.457549 0.000000 -vt 0.829157 -1.456704 0.000000 -vt 0.451852 -1.863192 0.000000 -vt 0.949354 -1.868694 0.000000 -vt 0.831205 -1.456800 0.000000 -vt 0.876293 -1.457682 0.000000 -vt 0.949906 -1.868694 0.000000 -vt 0.473767 -1.868634 0.000000 -vt 0.875387 -1.457669 0.000000 -vt 0.828770 -1.457858 0.000000 -vt 0.828628 -1.458084 0.000000 -vt 0.972724 -1.861599 0.000000 -vt 0.876879 -1.457280 0.000000 -vt 0.469951 -1.869397 0.000000 -vt 0.948142 -1.868755 0.000000 -vt 0.829543 -1.457311 0.000000 -vt 0.875525 -1.457883 0.000000 -vt 0.972246 -1.863524 0.000000 -vt 0.452091 -1.864086 0.000000 -vt 0.828780 -1.456825 0.000000 -vt 0.876632 -1.457644 0.000000 -vt 0.487185 -1.869714 0.000000 -vt 0.972161 -1.863907 0.000000 -vt 0.972160 -1.863962 0.000000 -vt 0.452102 -1.863599 0.000000 -vt 0.971248 -1.867505 0.000000 -vt 0.829384 -1.457744 0.000000 -vt 0.972345 -1.863358 0.000000 -vt 0.875706 -1.457610 0.000000 -vt 0.483553 -1.868973 0.000000 -vt 0.452019 -1.863561 0.000000 -vt 0.451940 -1.863264 0.000000 -vt 0.828306 -1.457759 0.000000 -vt 0.875839 -1.457175 0.000000 -vt 0.451209 -1.860488 0.000000 -vt 0.972173 -1.863853 0.000000 -vt 0.948088 -1.870427 0.000000 -vt 0.451880 -1.863108 0.000000 -vt 0.481867 -1.869676 0.000000 -vt 0.479093 -1.870937 0.000000 -vt 0.877378 -1.458749 0.000000 -vt 0.452405 -1.865097 0.000000 -vt 0.829847 -1.459929 0.000000 -vt 0.971057 -1.868906 0.000000 -vt 0.828728 -1.456783 0.000000 -vt 0.971727 -1.865673 0.000000 -vt 0.452211 -1.864402 0.000000 -vt 0.876786 -1.457847 0.000000 -vt 0.451956 -1.863566 0.000000 -vt 0.475944 -1.866089 0.000000 -vt 0.481453 -1.870048 0.000000 -vt 0.451758 -1.862800 0.000000 -vt 0.451367 -1.861115 0.000000 -vt 0.452023 -1.863780 0.000000 -vt 0.972305 -1.863569 0.000000 -vt 0.828884 -1.457464 0.000000 -vt 0.951541 -1.868004 0.000000 -vt 0.875292 -1.457469 0.000000 -vt 0.828177 -1.456968 0.000000 -vt 0.877146 -1.457614 0.000000 -vt 0.465539 -1.870165 0.000000 -vt 0.475376 -1.871410 0.000000 -vt 0.971891 -1.865238 0.000000 -vt 0.451984 -1.863602 0.000000 -vt 0.451081 -1.859882 0.000000 -vt 0.829591 -1.458419 0.000000 -vt 0.877151 -1.457435 0.000000 -vt 0.472016 -1.869328 0.000000 -vt 0.947146 -1.869243 0.000000 -vt 0.828694 -1.457016 0.000000 -vt 0.829919 -1.456851 0.000000 -vt 0.947182 -1.870234 0.000000 -vt 0.874654 -1.456733 0.000000 -vt 0.877418 -1.458245 0.000000 -vt 0.830298 -1.458251 0.000000 -vt 0.944782 -1.869317 0.000000 -vt 0.829314 -1.457618 0.000000 -vt 0.875823 -1.456924 0.000000 -vt 0.479366 -1.867708 0.000000 -vt 0.948278 -1.868539 0.000000 -vt 0.829792 -1.458097 0.000000 -vt 0.877097 -1.457110 0.000000 -vt 0.471723 -1.869990 0.000000 -vt 0.947234 -1.868533 0.000000 -vt 0.828686 -1.457152 0.000000 -vt 0.876568 -1.457265 0.000000 -vt 0.483485 -1.870629 0.000000 -vt 0.944827 -1.866485 0.000000 -vt 0.828933 -1.458644 0.000000 -vt 0.876984 -1.457996 0.000000 -vt 0.946429 -1.872049 0.000000 -vt 0.480111 -1.872686 0.000000 -vt 0.829753 -1.455776 0.000000 -vt 0.875659 -1.455884 0.000000 -vt 0.478854 -1.868377 0.000000 -vt 0.946724 -1.869313 0.000000 -vt 0.831090 -1.457178 0.000000 -vt 0.877402 -1.457505 0.000000 -vt 0.948777 -1.869040 0.000000 -vt 0.829947 -1.456792 0.000000 -vt 0.876298 -1.456800 0.000000 -# 178 texture coords - -g Teath -usemtl _Sharkgreatwhiteshark_teet -f 2802/3095 2894/3119 2801/3093 2804/3094 -f 2801/3093 2799/3117 2800/3096 2804/3094 -f 2805/3098 2839/3099 2841/3097 2804/3094 -f 2848/3102 2751/3104 2850/3100 2749/3101 -f 2850/3100 2750/3103 2749/3101 -f 2870/3100 3060/3104 3059/3105 -f 2870/3100 3052/3101 2867/3102 3060/3104 -f 2996/3100 3226/3127 2997/3106 2736/3107 -f 2736/3124 3225/3098 2937/3109 2996/3157 -f 2738/3098 2863/3109 2737/3108 2741/3094 -f 2738/3098 2741/3094 2858/3097 2860/3099 -f 3020/3096 3031/3117 2739/3093 2741/3094 -f 2739/3093 3030/3119 2740/3095 2741/3094 -f 2813/3108 2743/3109 2742/3098 3041/3094 -f 3042/3097 3041/3094 2742/3098 2744/3099 -f 3052/3108 3055/3109 2746/3098 2745/3094 -f 3060/3097 2745/3094 2746/3098 3059/3099 -f 3062/3095 3063/3119 3064/3093 2745/3094 -f 3064/3093 2879/3117 2747/3096 2745/3094 -f 2749/3108 2750/3109 3103/3098 2748/3094 -f 2751/3097 2748/3094 3103/3098 3104/3099 -f 2752/3108 2753/3109 3119/3098 3121/3094 -f 3128/3095 3129/3119 2754/3093 3121/3094 -f 2754/3093 3132/3117 3116/3096 3121/3094 -f 2980/3108 2977/3109 3143/3098 3146/3094 -f 2755/3095 2926/3119 2756/3093 3190/3094 -f 2756/3093 2904/3117 3198/3096 3190/3094 -f 2757/3095 3215/3119 3217/3093 2759/3094 -f 3217/3093 3219/3117 2758/3096 2759/3094 -f 2936/3108 2937/3109 3225/3098 3231/3094 -f 3234/3095 3237/3119 2760/3093 3231/3094 -f 2760/3093 3239/3117 3220/3096 3231/3094 -f 2761/3097 3252/3094 3247/3098 3250/3099 -f 3254/3095 3257/3119 3260/3093 3252/3094 -f 3260/3093 2916/3117 3242/3096 3252/3094 -f 2762/3097 2763/3094 3275/3098 2898/3099 -f 3278/3095 3280/3119 2764/3093 2763/3094 -f 2764/3093 3283/3117 3262/3096 2763/3094 -f 3284/3098 3004/3109 2765/3108 2766/3094 -f 2767/3096 3279/3117 2768/3093 2766/3094 -f 2768/3093 3281/3119 3282/3095 2766/3094 -f 3251/3098 3271/3109 3270/3108 2769/3094 -f 3258/3096 2877/3117 3240/3093 2769/3094 -f 3240/3093 3245/3119 3244/3095 2769/3094 -f 3238/3096 2875/3117 3216/3093 3223/3094 -f 3216/3093 2876/3119 3222/3095 3223/3094 -f 2770/3096 3182/3117 3181/3093 3196/3094 -f 3181/3093 3184/3119 3187/3095 3196/3094 -f 3149/3098 3153/3094 3161/3097 3160/3099 -f 3155/3096 2794/3117 3141/3093 3153/3094 -f 3141/3093 3144/3119 3147/3095 3153/3094 -f 2772/3098 3134/3109 2771/3108 2773/3094 -f 2772/3098 2773/3094 3115/3097 3126/3099 -f 3109/3096 2791/3117 2774/3093 2773/3094 -f 2774/3093 2793/3119 3113/3095 2773/3094 -f 3106/3096 2817/3117 3090/3093 2777/3094 -f 3090/3093 3101/3119 3098/3095 2777/3094 -f 2776/3098 2777/3094 2835/3097 2775/3099 -f 2776/3098 3097/3109 2831/3108 2777/3094 -f 3066/3098 3067/3109 2778/3108 2780/3094 -f 3054/3096 3053/3117 2779/3093 2780/3094 -f 2779/3093 3056/3119 3057/3095 2780/3094 -f 2781/3100 2783/3101 2782/3103 -f 2781/3100 3040/3104 3039/3102 2783/3101 -f 3036/3110 2783/3101 3039/3102 -f 2784/3098 2782/3109 2783/3108 2785/3094 -f 2784/3098 2785/3094 3040/3097 3032/3099 -f 3037/3096 3028/3117 3026/3093 2785/3094 -f 3026/3093 2887/3119 2786/3095 2785/3094 -f 3018/3100 3001/3101 3019/3103 -f 3018/3100 3008/3104 3009/3102 3001/3101 -f 3023/3110 3001/3101 3009/3102 -f 2787/3096 2981/3117 2982/3093 2788/3094 -f 2982/3093 2985/3119 2990/3095 2788/3094 -f 2954/3098 2789/3109 2973/3108 2951/3094 -f 2954/3098 2951/3094 2790/3097 2961/3099 -f 2791/3111 3109/3158 2792/3112 3137/3113 -f 3139/3116 3113/3159 2793/3114 3123/3115 -f 2794/3111 3155/3160 2795/3112 3174/3113 -f 3179/3116 3147/3161 3144/3114 3156/3115 -f 2808/3110 2800/3162 2807/3112 2914/3113 -f 2914/3113 2845/3126 2842/3102 2808/3110 -f 2808/3110 2842/3102 2806/3101 -f 2842/3102 2841/3104 2840/3100 2806/3101 -f 2840/3100 2796/3103 2806/3101 -f 2798/3124 2805/3098 2796/3109 2840/3163 -f 2840/3100 2838/3127 2797/3106 2798/3107 -f 2799/3111 2914/3113 2807/3112 2800/3164 -f 2843/3116 2844/3115 2894/3114 2802/3165 -f 2803/3128 2844/3115 2843/3116 2802/3166 -f 2804/3094 2841/3097 2803/3121 2802/3095 -f 2838/3122 2840/3167 2839/3099 2805/3098 -f 2805/3098 2798/3124 2797/3123 2838/3122 -f 2805/3098 2804/3094 2806/3108 2796/3109 -f 2804/3094 2800/3096 2808/3125 2806/3108 -f 3102/3116 3098/3168 3101/3114 2828/3115 -f 2809/3115 3033/3128 2811/3102 2810/3126 -f 2811/3102 3035/3110 2940/3113 2810/3126 -f 3035/3110 3047/3169 2941/3112 2940/3113 -f 2811/3102 3042/3104 2812/3100 2813/3101 -f 3035/3110 2811/3102 2813/3101 -f 2812/3100 2743/3103 2813/3101 -f 2814/3124 2742/3098 2743/3109 2812/3170 -f 2812/3100 2816/3127 2815/3106 2814/3107 -f 2744/3099 2742/3098 2816/3122 2812/3171 -f 2812/3100 3042/3104 2744/3105 -f 3033/3128 3042/3104 2811/3102 -f 2809/3115 2962/3114 2963/3116 3033/3128 -f 2817/3111 3106/3172 3107/3112 2829/3113 -f 2818/3113 2875/3111 3218/3112 3236/3110 -f 2821/3102 2819/3128 2820/3115 2826/3126 -f 2819/3128 3222/3173 3221/3116 2820/3115 -f 2819/3128 2821/3102 3224/3104 -f 2821/3102 2825/3101 2823/3100 3224/3104 -f 2823/3100 2822/3105 3224/3104 -f 3227/3122 3233/3098 2822/3099 2823/3174 -f 2823/3100 3230/3107 2824/3106 3227/3127 -f 3232/3109 3233/3098 3230/3124 2823/3175 -f 2823/3100 2825/3101 3232/3103 -f 3236/3110 2825/3101 2821/3102 -f 2821/3102 2826/3126 2818/3113 3236/3110 -f 2827/3128 3098/3176 3102/3116 2828/3115 -f 2829/3113 2830/3110 2836/3102 2837/3126 -f 3107/3112 3106/3177 2830/3110 2829/3113 -f 2830/3110 2831/3101 2836/3102 -f 2833/3100 2835/3104 2836/3102 2831/3101 -f 2833/3100 2831/3101 3097/3103 -f 3097/3109 2776/3098 2832/3124 2833/3178 -f 2834/3106 3092/3127 2833/3100 2832/3107 -f 3092/3122 2776/3098 2775/3099 2833/3179 -f 2833/3100 2775/3105 2835/3104 -f 2827/3128 2836/3102 2835/3104 -f 2828/3115 2837/3126 2836/3102 2827/3128 -f 2840/3100 2841/3104 2839/3105 -f 2803/3128 2841/3104 2842/3102 -f 2842/3102 2845/3126 2844/3115 2803/3128 -f 2846/3112 3211/3110 3210/3113 3182/3111 -f 2847/3115 3105/3128 2848/3102 2849/3126 -f 3105/3128 2751/3104 2848/3102 -f 2850/3100 2751/3104 3104/3105 -f 3104/3099 3103/3098 3100/3122 2850/3180 -f 3058/3116 3057/3181 3056/3114 3088/3115 -f 2851/3106 3099/3107 2850/3100 3100/3127 -f 3099/3124 3103/3098 2750/3109 2850/3182 -f 2852/3110 2848/3102 2749/3101 -f 2853/3113 2849/3126 2848/3102 2852/3110 -f 2852/3110 3096/3183 3095/3112 2853/3113 -f 2847/3115 3108/3114 2854/3116 3105/3128 -f 2855/3128 2740/3184 2924/3116 2856/3115 -f 2856/3115 2864/3126 2857/3102 2855/3128 -f 2855/3128 2857/3102 2858/3104 -f 2857/3102 2737/3101 2859/3100 2858/3104 -f 2859/3100 2860/3105 2858/3104 -f 2861/3122 2738/3098 2860/3099 2859/3185 -f 2859/3100 2862/3107 3025/3106 2861/3127 -f 2863/3109 2738/3098 2862/3124 2859/3186 -f 3021/3110 2737/3101 2857/3102 -f 2859/3100 2737/3101 2863/3103 -f 2857/3102 2864/3126 2938/3113 3021/3110 -f 2938/3113 3031/3111 3016/3112 3021/3110 -f 3185/3116 3187/3187 3184/3114 3199/3115 -f 2865/3115 2868/3128 2867/3102 2866/3126 -f 3053/3111 3054/3188 3083/3112 3082/3113 -f 2868/3128 3060/3104 2867/3102 -f 3059/3099 2746/3098 2869/3122 2870/3189 -f 2871/3106 2872/3107 2870/3100 2869/3127 -f 2872/3124 2746/3098 3055/3109 2870/3190 -f 2870/3100 3055/3103 3052/3101 -f 2874/3110 2867/3102 3052/3101 -f 2873/3113 2866/3126 2867/3102 2874/3110 -f 2874/3110 2747/3191 2880/3112 2873/3113 -f 2865/3115 3063/3114 3061/3116 2868/3128 -f 3221/3116 3222/3192 2876/3114 2820/3115 -f 3259/3112 3273/3110 3276/3113 2877/3111 -f 3246/3116 3244/3193 3245/3114 3261/3115 -f 2878/3112 3002/3110 2999/3113 3279/3111 -f 2880/3112 2747/3194 2879/3111 2873/3113 -f 2882/3116 3282/3195 3281/3114 2881/3115 -f 2884/3115 2893/3128 2892/3102 2883/3126 -f 2885/3100 3069/3101 2892/3102 3081/3104 -f 2893/3128 3081/3104 2892/3102 -f 2885/3100 3081/3104 2886/3105 -f 2886/3099 3078/3098 3075/3122 2885/3196 -f 3029/3116 2786/3197 2887/3114 3038/3115 -f 2888/3106 2889/3107 2885/3100 3075/3127 -f 2889/3124 3078/3098 2890/3109 2885/3198 -f 2885/3100 2890/3103 3069/3101 -f 3068/3110 2892/3102 3069/3101 -f 2891/3113 2883/3126 2892/3102 3068/3110 -f 3068/3110 3093/3199 3065/3112 2891/3113 -f 2884/3115 3086/3114 3085/3116 2893/3128 -f 3065/3112 3093/3200 3094/3111 2891/3113 -f 3263/3112 3262/3201 3283/3111 2909/3113 -f 2897/3102 3264/3110 2909/3113 2895/3126 -f 2910/3115 2896/3128 2897/3102 2895/3126 -f 2900/3100 2903/3101 2897/3102 2762/3104 -f 2896/3128 2762/3104 2897/3102 -f 2900/3100 2762/3104 2898/3105 -f 2898/3099 3275/3098 2899/3122 2900/3202 -f 3272/3106 2901/3107 2900/3100 2899/3127 -f 2901/3124 3275/3098 2902/3109 2900/3203 -f 2900/3100 2902/3103 2903/3101 -f 3180/3112 3198/3204 2904/3111 3176/3113 -f 3264/3110 2897/3102 2903/3101 -f 3215/3114 2757/3205 3214/3116 2905/3115 -f 3214/3116 2757/3206 2906/3128 2905/3115 -f 3028/3111 3037/3207 3027/3112 3049/3113 -f 3200/3110 2758/3208 2907/3112 2908/3113 -f 3264/3110 3262/3209 3263/3112 2909/3113 -f 2908/3113 2925/3126 2912/3102 3200/3110 -f 2910/3115 3280/3114 2911/3116 2896/3128 -f 3200/3110 2912/3102 3202/3101 -f 2912/3102 3209/3104 2921/3100 3202/3101 -f 2921/3100 2913/3103 3202/3101 -f 3204/3124 3205/3098 2913/3109 2921/3210 -f 2921/3100 3208/3127 2915/3106 3204/3107 -f 2917/3112 3242/3211 2916/3111 2919/3113 -f 2918/3099 3205/3098 3208/3122 2921/3212 -f 2935/3102 3243/3110 2919/3113 2920/3126 -f 2921/3100 3209/3104 2918/3105 -f 2922/3115 3253/3128 2935/3102 2920/3126 -f 2906/3128 3209/3104 2912/3102 -f 2923/3100 2933/3101 2935/3102 2761/3104 -f 3253/3128 2761/3104 2935/3102 -f 2923/3100 2761/3104 3250/3105 -f 2912/3102 2925/3126 2905/3115 2906/3128 -f 2924/3116 2740/3213 3030/3114 2856/3115 -f 3250/3099 3247/3098 3249/3122 2923/3214 -f 2929/3106 2930/3107 2923/3100 3249/3127 -f 2926/3114 2755/3215 2927/3116 2928/3115 -f 2907/3112 2758/3216 3219/3111 2908/3113 -f 2930/3124 3247/3098 2931/3109 2923/3217 -f 3136/3112 3135/3218 3152/3111 2984/3113 -f 2923/3100 2931/3103 2933/3101 -f 3235/3116 2932/3128 2994/3115 3237/3114 -f 3243/3110 2935/3102 2933/3101 -f 2934/3110 3220/3219 3241/3112 2992/3113 -f 2992/3113 2993/3126 2995/3102 2934/3110 -f 3243/3110 3242/3220 2917/3112 2919/3113 -f 2934/3110 2995/3102 2936/3101 -f 2922/3115 3257/3114 3256/3116 3253/3128 -f 2995/3102 3229/3104 2996/3100 2936/3101 -f 2996/3100 2937/3103 2936/3101 -f 3095/3112 3096/3221 3112/3111 2853/3113 -f 2939/3093 3154/3119 2950/3095 2951/3094 -f 2944/3096 2942/3117 2939/3093 2951/3094 -f 2941/3112 3047/3222 3048/3111 2940/3113 -f 2960/3115 3124/3128 2945/3102 2943/3126 -f 2976/3112 2975/3113 2942/3111 2944/3223 -f 2947/3100 2752/3101 2945/3102 2946/3104 -f 3124/3128 2946/3104 2945/3102 -f 2947/3100 2946/3104 2948/3105 -f 3154/3114 2957/3115 2949/3116 2950/3224 -f 2948/3099 3119/3098 3120/3122 2947/3225 -f 2949/3116 2957/3115 2952/3128 2950/3226 -f 3118/3106 2953/3107 2947/3100 3120/3127 -f 2952/3121 2790/3097 2951/3094 2950/3095 -f 2953/3124 3119/3098 2753/3109 2947/3227 -f 2961/3099 2965/3228 2966/3122 2954/3098 -f 2947/3100 2753/3103 2752/3101 -f 2967/3123 2968/3124 2954/3098 2966/3122 -f 2955/3110 2945/3102 2752/3101 -f 2968/3124 2965/3229 2789/3109 2954/3098 -f 2964/3113 2943/3126 2945/3102 2955/3110 -f 2956/3125 2944/3096 2951/3094 2973/3108 -f 2955/3110 3116/3230 3133/3112 2964/3113 -f 2956/3110 2975/3113 2976/3112 2944/3231 -f 2987/3116 2990/3232 2985/3114 3006/3115 -f 2958/3102 2952/3128 2957/3115 2979/3126 -f 2960/3115 3129/3114 2959/3116 3124/3128 -f 2952/3128 2958/3102 2790/3104 -f 2958/3102 2973/3101 2965/3100 2790/3104 -f 2965/3100 2961/3105 2790/3104 -f 3133/3112 3116/3233 3132/3111 2964/3113 -f 2965/3100 2968/3107 2967/3106 2966/3127 -f 3241/3112 3220/3234 3239/3111 2992/3113 -f 2969/3115 2971/3128 2970/3102 2986/3126 -f 2965/3100 2973/3101 2789/3103 -f 2978/3100 2980/3101 2970/3102 3145/3104 -f 2971/3128 3145/3104 2970/3102 -f 2978/3100 3145/3104 2972/3105 -f 2972/3099 3143/3098 2974/3122 2978/3235 -f 2956/3110 2973/3101 2958/3102 -f 3142/3106 3140/3107 2978/3100 2974/3127 -f 2958/3102 2979/3126 2975/3113 2956/3110 -f 3140/3124 3143/3098 2977/3109 2978/3236 -f 2978/3100 2977/3103 2980/3101 -f 3005/3112 3023/3110 3022/3113 2981/3111 -f 2983/3110 2970/3102 2980/3101 -f 2984/3113 2986/3126 2970/3102 2983/3110 -f 2787/3096 3023/3125 3005/3118 2981/3117 -f 2983/3110 3135/3237 3136/3112 2984/3113 -f 2969/3115 2988/3114 2989/3116 2971/3128 -f 2987/3116 3006/3115 2991/3128 2990/3238 -f 2991/3121 3008/3097 2788/3094 2990/3095 -f 2994/3115 2932/3128 2995/3102 2993/3126 -f 3008/3097 3010/3099 2998/3098 2788/3094 -f 2932/3128 3229/3104 2995/3102 -f 2996/3100 3229/3104 3228/3105 -f 3010/3099 3018/3239 3015/3122 2998/3098 -f 3228/3099 3225/3098 3226/3122 2996/3240 -f 3014/3123 3017/3124 2998/3098 3015/3122 -f 3011/3128 3282/3241 2882/3116 2881/3115 -f 3017/3124 3018/3242 3019/3109 2998/3098 -f 2999/3113 3002/3110 3013/3102 3000/3126 -f 3001/3108 2788/3094 2998/3098 3019/3109 -f 3023/3125 2787/3096 2788/3094 3001/3108 -f 3003/3100 3012/3104 3013/3102 2765/3101 -f 3002/3110 2765/3101 3013/3102 -f 3003/3100 2765/3101 3004/3103 -f 3004/3109 3284/3098 3285/3124 3003/3243 -f 3287/3106 3007/3127 3003/3100 3285/3107 -f 3009/3102 2991/3128 3006/3115 3024/3126 -f 3007/3122 3284/3098 3286/3099 3003/3244 -f 2991/3128 3009/3102 3008/3104 -f 3018/3100 3010/3105 3008/3104 -f 3003/3100 3286/3105 3012/3104 -f 3011/3128 3013/3102 3012/3104 -f 2881/3115 3000/3126 3013/3102 3011/3128 -f 3018/3100 3017/3107 3014/3106 3015/3127 -f 3016/3118 3031/3117 3020/3096 3021/3125 -f 2741/3094 2737/3108 3021/3125 3020/3096 -f 3009/3102 3024/3126 3022/3113 3023/3110 -f 2738/3098 2861/3122 3025/3123 2862/3124 -f 2741/3094 2740/3095 2855/3121 2858/3097 -f 3029/3116 3038/3115 3051/3128 2786/3245 -f 3051/3121 3040/3097 2785/3094 2786/3095 -f 3032/3099 2781/3246 3044/3122 2784/3098 -f 3034/3123 3046/3124 2784/3098 3044/3122 -f 2963/3120 2962/3119 3043/3095 3033/3121 -f 3046/3124 2781/3247 2782/3109 2784/3098 -f 3035/3125 2813/3108 3041/3094 3047/3096 -f 3036/3125 3037/3096 2785/3094 2783/3108 -f 3036/3110 3049/3113 3027/3112 3037/3248 -f 2815/3123 2816/3122 2742/3098 2814/3124 -f 3039/3102 3051/3128 3038/3115 3050/3126 -f 3051/3128 3039/3102 3040/3104 -f 3033/3121 3043/3095 3041/3094 3042/3097 -f 2781/3100 3032/3105 3040/3104 -f 3043/3095 2962/3119 3045/3093 3041/3094 -f 2781/3100 3046/3107 3034/3106 3044/3127 -f 3045/3093 3048/3117 3047/3096 3041/3094 -f 3039/3102 3050/3126 3049/3113 3036/3110 -f 2874/3125 3052/3108 2745/3094 2747/3096 -f 2871/3123 2869/3122 2746/3098 2872/3124 -f 3058/3116 3088/3115 3071/3128 3057/3249 -f 2868/3121 3062/3095 2745/3094 3060/3097 -f 3071/3121 3072/3097 2780/3094 3057/3095 -f 3061/3120 3063/3119 3062/3095 2868/3121 -f 3072/3097 3074/3099 3066/3098 2780/3094 -f 3074/3099 3077/3250 3076/3122 3066/3098 -f 3080/3123 3079/3124 3066/3098 3076/3122 -f 3079/3124 3077/3251 3067/3109 3066/3098 -f 3068/3125 3069/3108 3089/3094 3093/3096 -f 3084/3125 3054/3096 2780/3094 2778/3108 -f 3069/3108 2890/3109 3078/3098 3089/3094 -f 3084/3110 3082/3113 3083/3112 3054/3252 -f 3073/3102 3071/3128 3088/3115 3070/3126 -f 2888/3123 3075/3122 3078/3098 2889/3124 -f 3071/3128 3073/3102 3072/3104 -f 3073/3102 2778/3101 3077/3100 3072/3104 -f 3077/3100 3074/3105 3072/3104 -f 3077/3100 3079/3107 3080/3106 3076/3127 -f 3081/3097 3089/3094 3078/3098 2886/3099 -f 2893/3121 3087/3095 3089/3094 3081/3097 -f 3077/3100 2778/3101 3067/3103 -f 3084/3110 2778/3101 3073/3102 -f 3073/3102 3070/3126 3082/3113 3084/3110 -f 3085/3120 3086/3119 3087/3095 2893/3121 -f 3091/3093 3089/3094 3087/3095 3086/3119 -f 3091/3093 3094/3117 3093/3096 3089/3094 -f 2834/3123 2832/3124 2776/3098 3092/3122 -f 2852/3125 2749/3108 2748/3094 3096/3096 -f 2777/3094 3098/3095 2827/3121 2835/3097 -f 2851/3123 3100/3122 3103/3098 3099/3124 -f 3105/3121 3111/3095 2748/3094 2751/3097 -f 2777/3094 2831/3108 2830/3125 3106/3096 -f 2854/3120 3108/3119 3111/3095 3105/3121 -f 3110/3093 2748/3094 3111/3095 3108/3119 -f 3110/3093 3112/3117 3096/3096 2748/3094 -f 3139/3116 3123/3115 3114/3128 3113/3253 -f 3114/3121 3115/3097 2773/3094 3113/3095 -f 2955/3125 2752/3108 3121/3094 3116/3096 -f 3126/3099 3131/3254 3127/3122 2772/3098 -f 3117/3123 3130/3124 2772/3098 3127/3122 -f 3118/3123 3120/3122 3119/3098 2953/3124 -f 3130/3124 3131/3255 3134/3109 2772/3098 -f 3138/3125 3109/3096 2773/3094 2771/3108 -f 2946/3097 3121/3094 3119/3098 2948/3099 -f 3138/3110 3137/3113 2792/3112 3109/3256 -f 3125/3102 3114/3128 3123/3115 3122/3126 -f 3124/3121 3128/3095 3121/3094 2946/3097 -f 3114/3128 3125/3102 3115/3104 -f 3125/3102 2771/3101 3131/3100 3115/3104 -f 3131/3100 3126/3105 3115/3104 -f 2959/3120 3129/3119 3128/3095 3124/3121 -f 3131/3100 3130/3107 3117/3106 3127/3127 -f 3131/3100 2771/3101 3134/3103 -f 3138/3110 2771/3101 3125/3102 -f 3125/3102 3122/3126 3137/3113 3138/3110 -f 2983/3125 2980/3108 3146/3094 3135/3096 -f 3142/3123 2974/3122 3143/3098 3140/3124 -f 3145/3097 3146/3094 3143/3098 2972/3099 -f 3179/3116 3156/3115 3178/3128 3147/3257 -f 2971/3121 3148/3095 3146/3094 3145/3097 -f 3178/3121 3161/3097 3153/3094 3147/3095 -f 2989/3120 2988/3119 3148/3095 2971/3121 -f 3160/3099 3165/3258 3150/3122 3149/3098 -f 3167/3123 3166/3124 3149/3098 3150/3122 -f 3151/3093 3146/3094 3148/3095 2988/3119 -f 3166/3124 3165/3259 3170/3109 3149/3098 -f 3151/3093 3152/3117 3135/3096 3146/3094 -f 3169/3108 3153/3094 3149/3098 3170/3109 -f 3171/3125 3155/3096 3153/3094 3169/3108 -f 2927/3116 2755/3260 3158/3128 2928/3115 -f 3171/3110 3174/3113 2795/3112 3155/3261 -f 3177/3102 3173/3126 2928/3115 3158/3128 -f 3172/3102 3178/3128 3156/3115 3175/3126 -f 3163/3100 3183/3101 3177/3102 3157/3104 -f 3158/3128 3157/3104 3177/3102 -f 3163/3100 3157/3104 3192/3105 -f 3192/3099 3195/3098 3159/3122 3163/3262 -f 3178/3128 3172/3102 3161/3104 -f 3172/3102 3169/3101 3165/3100 3161/3104 -f 3165/3100 3160/3105 3161/3104 -f 3162/3106 3164/3107 3163/3100 3159/3127 -f 3165/3100 3166/3107 3167/3106 3150/3127 -f 3164/3124 3195/3098 3197/3109 3163/3263 -f 3163/3100 3197/3103 3183/3101 -f 3168/3110 3177/3102 3183/3101 -f 3165/3100 3169/3101 3170/3103 -f 3171/3110 3169/3101 3172/3102 -f 3172/3102 3175/3126 3174/3113 3171/3110 -f 3177/3102 3168/3110 3176/3113 3173/3126 -f 3168/3110 3198/3264 3180/3112 3176/3113 -f 2770/3096 3211/3125 2846/3118 3182/3117 -f 3190/3094 3198/3096 3168/3125 3183/3108 -f 3183/3108 3197/3109 3195/3098 3190/3094 -f 3185/3116 3199/3115 3186/3128 3187/3265 -f 3186/3121 3188/3097 3196/3094 3187/3095 -f 3188/3097 3201/3099 3189/3098 3196/3094 -f 3190/3094 3157/3097 3158/3121 2755/3095 -f 3201/3099 3206/3266 3191/3122 3189/3098 -f 3203/3123 3193/3124 3189/3098 3191/3122 -f 3195/3098 3192/3099 3157/3097 3190/3094 -f 3193/3124 3206/3267 3194/3109 3189/3098 -f 3207/3108 3196/3094 3189/3098 3194/3109 -f 3195/3098 3164/3124 3162/3123 3159/3122 -f 3211/3125 2770/3096 3196/3094 3207/3108 -f 3212/3102 3186/3128 3199/3115 3213/3126 -f 3186/3128 3212/3102 3188/3104 -f 3200/3125 3202/3108 2759/3094 2758/3096 -f 3212/3102 3207/3101 3206/3100 3188/3104 -f 3206/3100 3201/3105 3188/3104 -f 3202/3108 2913/3109 3205/3098 2759/3094 -f 3206/3100 3193/3107 3203/3106 3191/3127 -f 2915/3123 3208/3122 3205/3098 3204/3124 -f 3206/3100 3207/3101 3194/3103 -f 3209/3097 2759/3094 3205/3098 2918/3099 -f 3211/3110 3207/3101 3212/3102 -f 3212/3102 3213/3126 3210/3113 3211/3110 -f 2906/3121 2757/3095 2759/3094 3209/3097 -f 3238/3096 3236/3125 3218/3118 2875/3117 -f 2934/3125 2936/3108 3231/3094 3220/3096 -f 2819/3121 3224/3097 3223/3094 3222/3095 -f 3224/3097 2822/3099 3233/3098 3223/3094 -f 2997/3123 3226/3122 3225/3098 2736/3124 -f 2824/3123 3230/3124 3233/3098 3227/3122 -f 3229/3097 3231/3094 3225/3098 3228/3099 -f 2932/3121 3234/3095 3231/3094 3229/3097 -f 2825/3108 3223/3094 3233/3098 3232/3109 -f 3235/3120 3237/3119 3234/3095 2932/3121 -f 3236/3125 3238/3096 3223/3094 2825/3108 -f 3258/3096 3273/3125 3259/3118 2877/3117 -f 3243/3125 2933/3108 3252/3094 3242/3096 -f 3246/3116 3261/3115 3265/3128 3244/3268 -f 2933/3108 2931/3109 3247/3098 3252/3094 -f 3265/3121 3266/3097 2769/3094 3244/3095 -f 3266/3097 3248/3099 3251/3098 2769/3094 -f 2929/3123 3249/3122 3247/3098 2930/3124 -f 3248/3099 3269/3269 3268/3122 3251/3098 -f 3267/3123 3255/3124 3251/3098 3268/3122 -f 3253/3121 3254/3095 3252/3094 2761/3097 -f 3255/3124 3269/3270 3271/3109 3251/3098 -f 3256/3120 3257/3119 3254/3095 3253/3121 -f 3273/3125 3258/3096 2769/3094 3270/3108 -f 3274/3102 3265/3128 3261/3115 3277/3126 -f 3265/3128 3274/3102 3266/3104 -f 3274/3102 3270/3101 3269/3100 3266/3104 -f 3269/3100 3248/3105 3266/3104 -f 3264/3125 2903/3108 2763/3094 3262/3096 -f 3269/3100 3255/3107 3267/3106 3268/3127 -f 2903/3108 2902/3109 3275/3098 2763/3094 -f 3269/3100 3270/3101 3271/3103 -f 3272/3123 2899/3122 3275/3098 2901/3124 -f 3273/3110 3270/3101 3274/3102 -f 3274/3102 3277/3126 3276/3113 3273/3110 -f 2896/3121 3278/3095 2763/3094 2762/3097 -f 2911/3120 3280/3119 3278/3095 2896/3121 -f 2767/3096 3002/3125 2878/3118 3279/3117 -f 3011/3121 3012/3097 2766/3094 3282/3095 -f 2766/3094 2765/3108 3002/3125 2767/3096 -f 3012/3097 3286/3099 3284/3098 2766/3094 -f 3284/3098 3007/3122 3287/3123 3285/3124 -f 3290/3131 3325/3133 3288/3129 3289/3130 -f 3292/3133 3346/3131 3373/3134 3291/3132 -f 3293/3135 3294/3136 3292/3133 3291/3132 -f 3380/3137 3349/3139 3292/3133 3294/3136 -f 3375/3139 3377/3133 3374/3129 3371/3138 -f 3295/3140 3371/3138 3374/3129 -f 3377/3133 3379/3136 3366/3135 3296/3132 -f 3358/3134 3355/3131 3377/3133 3296/3132 -f 3488/3134 3486/3132 3325/3133 3290/3131 -f 3490/3143 3327/3144 3484/3141 3489/3142 -f 3465/3143 3464/3144 3347/3141 3297/3142 -f 3348/3145 3467/3146 3297/3142 3347/3141 -f 3298/3148 3300/3146 3302/3142 3448/3147 -f 3299/3143 3447/3149 3448/3147 3302/3142 -f 3301/3145 3303/3141 3302/3142 3300/3146 -f 3303/3141 3453/3144 3299/3143 3302/3142 -f 3304/3148 3305/3146 3433/3142 3441/3147 -f 3306/3143 3435/3149 3441/3147 3433/3142 -f 3322/3135 3485/3136 3325/3133 3486/3132 -f 3420/3148 3419/3146 3307/3142 3427/3147 -f 3422/3143 3421/3149 3427/3147 3307/3142 -f 3308/3135 3410/3132 3309/3133 3404/3136 -f 3309/3133 3409/3139 3310/3137 3404/3136 -f 3311/3143 3312/3142 3330/3147 3399/3149 -f 3312/3142 3313/3146 3331/3148 3330/3147 -f 3312/3142 3336/3141 3314/3145 3313/3146 -f 3311/3143 3397/3144 3336/3141 3312/3142 -f 3387/3143 3393/3149 3394/3150 3361/3144 -f 3315/3141 3391/3142 3387/3143 3361/3144 -f 3317/3147 3321/3142 3320/3143 3316/3149 -f 3318/3148 3319/3146 3321/3142 3317/3147 -f 3460/3145 3459/3141 3321/3142 3319/3146 -f 3459/3141 3458/3144 3320/3143 3321/3142 -f 3291/3148 3373/3147 3372/3142 3376/3146 -f 3372/3142 3380/3141 3294/3145 3376/3146 -f 3289/3130 3288/3129 3491/3151 -f 3323/3140 3339/3129 3324/3138 -f 3484/3137 3327/3139 3325/3133 3485/3136 -f 3339/3129 3333/3133 3474/3139 3324/3138 -f 3327/3139 3482/3138 3288/3129 3325/3133 -f 3326/3140 3288/3129 3482/3138 -f 3333/3133 3475/3136 3328/3137 3474/3139 -f 3329/3151 3400/3130 3337/3129 -f 3337/3129 3400/3130 3399/3131 3335/3133 -f 3330/3134 3331/3132 3335/3133 3399/3131 -f 3333/3133 3332/3132 3477/3135 3475/3136 -f 3398/3135 3314/3136 3335/3133 3331/3132 -f 3333/3133 3480/3131 3334/3134 3332/3132 -f 3336/3137 3397/3139 3335/3133 3314/3136 -f 3339/3129 3481/3130 3480/3131 3333/3133 -f 3397/3139 3341/3138 3337/3129 3335/3133 -f 3338/3151 3481/3130 3339/3129 -f 3340/3140 3342/3129 3343/3138 -f 3396/3140 3337/3129 3341/3138 -f 3342/3129 3354/3133 3464/3139 3343/3138 -f 3344/3151 3345/3130 3350/3129 -f 3346/3131 3292/3133 3350/3129 3345/3130 -f 3354/3133 3348/3136 3347/3137 3464/3139 -f 3354/3133 3468/3132 3466/3135 3348/3136 -f 3349/3139 3351/3138 3350/3129 3292/3133 -f 3383/3140 3350/3129 3351/3138 -f 3354/3133 3470/3131 3469/3134 3468/3132 -f 3381/3153 3355/3149 3352/3150 3353/3152 -f 3342/3129 3357/3130 3470/3131 3354/3133 -f 3356/3143 3375/3144 3352/3150 3355/3149 -f 3358/3147 3362/3142 3356/3143 3355/3149 -f 3472/3151 3357/3130 3342/3129 -f 3359/3140 3369/3129 3360/3138 -f 3369/3129 3363/3133 3361/3139 3360/3138 -f 3296/3148 3365/3146 3362/3142 3358/3147 -f 3363/3133 3364/3136 3315/3137 3361/3139 -f 3363/3133 3389/3132 3388/3135 3364/3136 -f 3366/3154 3379/3145 3365/3146 3296/3148 -f 3363/3133 3393/3131 3392/3134 3389/3132 -f 3379/3145 3378/3141 3362/3142 3365/3146 -f 3369/3129 3368/3130 3393/3131 3363/3133 -f 3367/3151 3368/3130 3369/3129 -f 3382/3150 3346/3149 3345/3153 3344/3152 -f 3378/3141 3375/3144 3356/3143 3362/3142 -f 3382/3150 3349/3144 3370/3143 3346/3149 -f 3352/3150 3375/3144 3371/3155 3295/3156 -f 3370/3143 3372/3142 3373/3147 3346/3149 -f 3376/3146 3294/3145 3293/3154 3291/3148 -f 3378/3137 3379/3136 3377/3133 3375/3139 -f 3370/3143 3349/3144 3380/3141 3372/3142 -f 3353/3151 3374/3129 3381/3130 -f 3374/3129 3377/3133 3355/3131 3381/3130 -f 3382/3150 3383/3156 3351/3155 3349/3144 -f 3386/3150 3458/3144 3384/3155 3456/3156 -f 3386/3150 3316/3149 3320/3143 3458/3144 -f 3319/3146 3318/3148 3385/3154 3460/3145 -f 3386/3150 3462/3152 3463/3153 3316/3149 -f 3360/3155 3361/3144 3394/3150 3359/3156 -f 3364/3145 3390/3146 3391/3142 3315/3141 -f 3388/3154 3389/3148 3390/3146 3364/3145 -f 3389/3148 3392/3147 3391/3142 3390/3146 -f 3392/3147 3393/3149 3387/3143 3391/3142 -f 3368/3153 3367/3152 3394/3150 3393/3149 -f 3341/3155 3397/3144 3395/3150 3396/3156 -f 3311/3143 3399/3149 3395/3150 3397/3144 -f 3398/3154 3331/3148 3313/3146 3314/3145 -f 3400/3153 3329/3152 3395/3150 3399/3149 -f 3401/3150 3409/3144 3402/3155 3408/3156 -f 3401/3150 3407/3149 3406/3143 3409/3144 -f 3406/3143 3403/3142 3310/3141 3409/3144 -f 3403/3142 3405/3146 3404/3145 3310/3141 -f 3405/3146 3410/3148 3308/3154 3404/3145 -f 3403/3142 3411/3147 3410/3148 3405/3146 -f 3406/3143 3407/3149 3411/3147 3403/3142 -f 3401/3150 3413/3152 3414/3153 3407/3149 -f 3408/3140 3402/3138 3412/3129 -f 3409/3139 3309/3133 3412/3129 3402/3138 -f 3411/3134 3407/3131 3309/3133 3410/3132 -f 3407/3131 3414/3130 3412/3129 3309/3133 -f 3413/3151 3412/3129 3414/3130 -f 3417/3150 3423/3144 3416/3155 3415/3156 -f 3417/3150 3421/3149 3422/3143 3423/3144 -f 3422/3143 3307/3142 3418/3141 3423/3144 -f 3307/3142 3419/3146 3424/3145 3418/3141 -f 3419/3146 3420/3148 3426/3154 3424/3145 -f 3417/3150 3429/3152 3430/3153 3421/3149 -f 3415/3140 3416/3138 3428/3129 -f 3428/3129 3416/3138 3423/3139 3425/3133 -f 3418/3137 3424/3136 3425/3133 3423/3139 -f 3426/3135 3420/3132 3425/3133 3424/3136 -f 3427/3134 3421/3131 3425/3133 3420/3132 -f 3421/3131 3430/3130 3428/3129 3425/3133 -f 3429/3151 3428/3129 3430/3130 -f 3431/3150 3439/3144 3438/3155 3437/3156 -f 3431/3150 3435/3149 3306/3143 3439/3144 -f 3306/3143 3433/3142 3432/3141 3439/3144 -f 3434/3145 3432/3141 3433/3142 3305/3146 -f 3305/3146 3304/3148 3440/3154 3434/3145 -f 3431/3150 3444/3152 3436/3153 3435/3149 -f 3437/3140 3438/3138 3443/3129 -f 3439/3139 3442/3133 3443/3129 3438/3138 -f 3432/3137 3434/3136 3442/3133 3439/3139 -f 3440/3135 3304/3132 3442/3133 3434/3136 -f 3441/3134 3435/3131 3442/3133 3304/3132 -f 3435/3131 3436/3130 3443/3129 3442/3133 -f 3444/3151 3443/3129 3436/3130 -f 3446/3150 3453/3144 3451/3155 3445/3156 -f 3446/3150 3447/3149 3299/3143 3453/3144 -f 3300/3146 3298/3148 3455/3154 3301/3145 -f 3446/3150 3449/3152 3450/3153 3447/3149 -f 3445/3140 3451/3138 3452/3129 -f 3453/3139 3454/3133 3452/3129 3451/3138 -f 3303/3137 3301/3136 3454/3133 3453/3139 -f 3455/3135 3298/3132 3454/3133 3301/3136 -f 3448/3134 3447/3131 3454/3133 3298/3132 -f 3447/3131 3450/3130 3452/3129 3454/3133 -f 3449/3151 3452/3129 3450/3130 -f 3456/3140 3384/3138 3457/3129 -f 3457/3129 3384/3138 3458/3139 3461/3133 -f 3459/3137 3460/3136 3461/3133 3458/3139 -f 3385/3135 3318/3132 3461/3133 3460/3136 -f 3317/3134 3316/3131 3461/3133 3318/3132 -f 3316/3131 3463/3130 3457/3129 3461/3133 -f 3462/3151 3457/3129 3463/3130 -f 3343/3155 3464/3144 3471/3150 3340/3156 -f 3465/3143 3470/3149 3471/3150 3464/3144 -f 3466/3154 3468/3148 3467/3146 3348/3145 -f 3468/3148 3469/3147 3297/3142 3467/3146 -f 3469/3147 3470/3149 3465/3143 3297/3142 -f 3357/3153 3472/3152 3471/3150 3470/3149 -f 3324/3155 3474/3144 3473/3150 3323/3156 -f 3479/3143 3480/3149 3473/3150 3474/3144 -f 3328/3141 3476/3142 3479/3143 3474/3144 -f 3476/3142 3328/3141 3475/3145 3478/3146 -f 3477/3154 3332/3148 3478/3146 3475/3145 -f 3334/3147 3480/3149 3479/3143 3476/3142 -f 3476/3142 3478/3146 3332/3148 3334/3147 -f 3481/3153 3338/3152 3473/3150 3480/3149 -f 3482/3155 3327/3144 3483/3150 3326/3156 -f 3490/3143 3290/3149 3483/3150 3327/3144 -f 3485/3145 3487/3146 3489/3142 3484/3141 -f 3322/3154 3486/3148 3487/3146 3485/3145 -f 3486/3148 3488/3147 3489/3142 3487/3146 -f 3488/3147 3290/3149 3490/3143 3489/3142 -f 3289/3153 3491/3152 3483/3150 3290/3149 -# 564 polygons - 120 triangles - -# -# object eyes -# - -v -1.193957 2.214023 7.605473 -v -1.280243 2.291366 7.737893 -v -1.255382 2.291366 7.795282 -v -1.246853 2.249702 7.625843 -v -1.224419 2.214023 7.639673 -v -1.238627 2.214023 7.727993 -v -1.264265 2.249702 7.734083 -v -1.267589 2.249702 7.678042 -v 1.209488 2.422336 7.583922 -v 1.224386 2.458018 7.639663 -v -1.066865 2.456882 7.793932 -v -1.050239 2.421533 7.815474 -v -1.104296 2.421533 7.837072 -v -1.100132 2.380259 7.852973 -v -1.150505 2.380673 7.860023 -v -1.211678 2.336021 7.841783 -v -1.241960 2.249702 7.785593 -v -1.200056 2.422337 7.822913 -v -1.143650 2.458019 7.817392 -v -1.186232 2.458019 7.800473 -v -1.208672 2.380673 7.836893 -v -1.260065 2.336021 7.798674 -v 1.260803 2.291365 7.617224 -v 1.283918 2.291365 7.675393 -v 1.267556 2.249701 7.678032 -v 1.285790 2.336020 7.739202 -v 1.255352 2.380672 7.795273 -v 1.163111 2.336020 7.540062 -v 1.161788 2.291365 7.545644 -v 1.099307 2.291365 7.541953 -v 1.053683 2.291779 7.564423 -v 1.101938 2.249701 7.558302 -v 1.157990 2.249701 7.561633 -v 1.106162 2.214022 7.584554 -v 1.246820 2.249701 7.625832 -v 1.193924 2.214022 7.605463 -v 1.209488 2.249701 7.583922 -v 1.219190 2.291365 7.570513 -v 1.050209 2.421532 7.815463 -v 1.110947 2.456881 7.811563 -v 1.241930 2.422336 7.785583 -v 1.200026 2.422336 7.822903 -v 1.211648 2.336020 7.841772 -v 1.066838 2.456881 7.793921 -v 1.011284 2.421532 7.774242 -v 1.104266 2.421532 7.837062 -v 1.100102 2.380258 7.852962 -v 1.147844 2.422336 7.843634 -v 1.208642 2.380672 7.836883 -v 1.208642 2.291365 7.836883 -v 1.200026 2.249701 7.822903 -v 1.147844 2.249701 7.843634 -v 1.084970 2.193808 7.770433 -v 1.150475 2.380672 7.860013 -v 1.110947 2.215156 7.811563 -v 1.050209 2.250505 7.815463 -v 1.039844 2.291779 7.828873 -v 1.011284 2.250505 7.774242 -v 1.004021 2.291779 7.606213 -v 0.994034 2.250505 7.667023 -v 0.989960 2.250505 7.722672 -v 0.977228 2.291779 7.663423 -v 0.996458 2.291779 7.782943 -v 1.036229 2.336020 7.833552 -v 1.100102 2.291779 7.852962 -v 1.039844 2.380258 7.828873 -v 0.991283 2.336020 7.785973 -v 0.996458 2.380258 7.782943 -v 0.989960 2.421532 7.722672 -v 1.017674 2.456881 7.718233 -v 1.020998 2.456881 7.672812 -v 1.101938 2.422336 7.558302 -v 1.157990 2.422336 7.561633 -v 1.193924 2.458018 7.605463 -v 1.050563 2.336020 7.559623 -v 0.972686 2.291779 7.725462 -v 0.966659 2.336020 7.726423 -v 0.971363 2.336020 7.662163 -v 0.972686 2.380258 7.725462 -v 0.977228 2.380258 7.663423 -v 0.994034 2.421532 7.667023 -v 1.040612 2.456881 7.630934 -v 0.999119 2.336020 7.602882 -v 1.053683 2.380258 7.564423 -v 1.004021 2.380258 7.606213 -v 1.018070 2.421532 7.615693 -v -1.163141 2.336021 7.540072 -v -1.098419 2.336021 7.536263 -v -1.161821 2.291366 7.545652 -v -1.101971 2.249702 7.558311 -v -0.999149 2.336021 7.602892 -v -1.062653 2.250506 7.578233 -v -1.004051 2.291780 7.606223 -v -1.053713 2.291780 7.564434 -v -1.050593 2.336021 7.559633 -v -1.004051 2.380259 7.606223 -v -1.018100 2.421533 7.615703 -v -0.994064 2.421533 7.667033 -v -0.977258 2.380259 7.663434 -v -0.971393 2.336021 7.662172 -v -0.994064 2.250506 7.667033 -v -1.018100 2.250506 7.615703 -v -1.040642 2.215157 7.630943 -v -0.996488 2.380259 7.782953 -v -1.011314 2.421533 7.774252 -v -0.989990 2.421533 7.722682 -v -0.991313 2.336021 7.785983 -v -0.966689 2.336021 7.726432 -v -0.972716 2.380259 7.725472 -v -1.021028 2.456882 7.672822 -v -1.040642 2.456882 7.630942 -v -1.062653 2.421533 7.578233 -v -1.053713 2.380259 7.564434 -v -1.099337 2.380673 7.541963 -v -1.209518 2.422337 7.583933 -v -1.224416 2.458019 7.639673 -v -1.246850 2.422337 7.625843 -v -1.260833 2.380673 7.617232 -v -1.158020 2.422337 7.561644 -v -1.101968 2.422337 7.558311 -v -1.193954 2.458019 7.605473 -v -1.151930 2.458019 7.587293 -v -1.283948 2.380673 7.675403 -v -1.267586 2.422337 7.678042 -v -1.264262 2.422337 7.734083 -v -1.238624 2.458019 7.727993 -v -1.241336 2.458019 7.682242 -v -1.289654 2.336021 7.674472 -v -1.283951 2.291366 7.675403 -v -1.285820 2.336021 7.739213 -v -1.280243 2.380673 7.737893 -v -1.255382 2.380673 7.795282 -v -1.241960 2.422337 7.785593 -v -1.220426 2.458019 7.770022 -v -1.265714 2.336021 7.614233 -v -0.977258 2.291780 7.663434 -v -0.989990 2.250506 7.722682 -v -0.996488 2.291780 7.782953 -v -1.017704 2.215157 7.718244 -v -1.066865 2.215157 7.793933 -v -1.011314 2.250506 7.774252 -v -1.050239 2.250506 7.815474 -v -1.104296 2.250506 7.837072 -v -1.150505 2.291366 7.860023 -v -1.208672 2.291366 7.836893 -v -1.100132 2.291780 7.852973 -v -1.147874 2.249702 7.843643 -v -1.200056 2.249702 7.822913 -v 1.260035 2.336020 7.798663 -v 1.264232 2.249701 7.734073 -v 1.280213 2.291365 7.737883 -v 1.255352 2.291365 7.795273 -v 1.241930 2.249701 7.785583 -v 1.238594 2.214022 7.727982 -v 1.246820 2.422336 7.625832 -v 1.280213 2.380672 7.737883 -v 1.289624 2.336020 7.674463 -v 1.265681 2.336020 7.614223 -v 1.260803 2.380672 7.617224 -v 1.283918 2.380672 7.675393 -v 1.264232 2.422336 7.734073 -v 1.267556 2.422336 7.678032 -v 1.066838 2.215156 7.793922 -v 1.035074 2.215156 7.760293 -v 1.020998 2.215156 7.672813 -v 1.076966 2.215156 7.600334 -v 1.040612 2.215156 7.630934 -v 1.018070 2.250505 7.615693 -v 1.099307 2.380672 7.541953 -v 1.161788 2.380672 7.545644 -v 1.098389 2.336020 7.536252 -v 1.219190 2.380672 7.570513 -v 1.222577 2.336020 7.565833 -v 1.104266 2.250505 7.837062 -v 1.098650 2.336020 7.858512 -v 1.151393 2.336020 7.865713 -v 1.150475 2.291365 7.860013 -v 1.062623 2.421532 7.578224 -v -1.151933 2.214023 7.587293 -v -1.099337 2.291366 7.541963 -v -1.158023 2.249702 7.561644 -v -1.161818 2.380673 7.545652 -v -1.222610 2.336021 7.565843 -v -1.219220 2.380673 7.570523 -v -1.151423 2.336021 7.865724 -v -1.098680 2.336021 7.858522 -v -1.039874 2.380259 7.828883 -v -1.036259 2.336021 7.833563 -v -1.039874 2.291780 7.828883 -v -0.972716 2.291780 7.725472 -v -1.209521 2.249702 7.583933 -v -1.219223 2.291366 7.570523 -v -1.260836 2.291366 7.617232 -v -1.158929 2.179406 7.653923 -v -1.124924 2.168171 7.700993 -v -1.167830 2.172956 7.694093 -v -1.118021 2.172956 7.658063 -v -1.176980 2.192474 7.628963 -v -1.053572 2.188796 7.712454 -v -1.095311 2.174477 7.705733 -v -1.241339 2.214023 7.682243 -v -1.207364 2.187410 7.687733 -v -1.085000 2.193809 7.770442 -v -1.220426 2.214023 7.770023 -v -1.138184 2.187410 7.783433 -v -1.110977 2.215157 7.811573 -v -1.143650 2.214023 7.817393 -v -1.186232 2.214023 7.800473 -v -1.131824 2.172956 7.743893 -v 1.124891 2.168170 7.700983 -v -1.104284 2.180867 7.745483 -v -1.131824 2.499083 7.743893 -v 1.131794 2.499082 7.743883 -v -1.196942 2.192474 7.753043 -v 1.196909 2.479567 7.753034 -v -1.171970 2.179406 7.734983 -v 1.171937 2.492632 7.734972 -v 1.167797 2.499082 7.694084 -v 1.158896 2.492632 7.653913 -v -1.035104 2.215157 7.760303 -v 1.176947 2.479567 7.628953 -v 1.111628 2.484628 7.618543 -v 1.151900 2.458018 7.587284 -v 1.207331 2.484628 7.687723 -v -1.111661 2.187410 7.618554 -v -1.065224 2.193809 7.647533 -v -1.091369 2.180867 7.665203 -v 1.117988 2.499082 7.658052 -v -1.106195 2.214023 7.584563 -v -1.076999 2.215157 7.600343 -v -1.021028 2.215157 7.672823 -v -1.167827 2.499083 7.694093 -v 1.104254 2.491171 7.745472 -v -1.196939 2.479568 7.753043 -v 1.084970 2.478229 7.770432 -v 1.035074 2.456881 7.760293 -v -1.158926 2.492633 7.653923 -v -1.124921 2.503868 7.700993 -v -1.053572 2.483246 7.712453 -v -1.095311 2.497565 7.705732 -v -1.138184 2.484629 7.783432 -v -1.091366 2.491172 7.665203 -v -1.171967 2.492633 7.734982 -v -1.118018 2.499083 7.658062 -v -1.104284 2.491172 7.745482 -v -1.110977 2.456882 7.811573 -v -1.085000 2.478230 7.770442 -v -1.207361 2.484629 7.687733 -v -1.147874 2.422337 7.843643 -v 1.131794 2.172955 7.743883 -v -1.076996 2.456882 7.600343 -v -1.065224 2.478230 7.647532 -v -1.111658 2.484629 7.618554 -v -1.106192 2.458019 7.584563 -v 1.196909 2.192473 7.753034 -v 1.224386 2.214022 7.639663 -v 1.241306 2.214022 7.682233 -v -1.176977 2.479568 7.628963 -v 1.207331 2.187409 7.687723 -v 1.167797 2.172955 7.694084 -v 1.158896 2.179408 7.653913 -v 1.220396 2.458018 7.770014 -v -1.035104 2.456882 7.760303 -v -1.017704 2.456882 7.718244 -v 1.238594 2.458018 7.727982 -v 1.241306 2.458018 7.682232 -v 1.062623 2.250505 7.578224 -v 1.106162 2.458018 7.584554 -v 1.017674 2.215156 7.718233 -v 1.065194 2.478229 7.647522 -v 1.076966 2.456881 7.600334 -v 1.091336 2.491171 7.665193 -v 1.151900 2.214022 7.587284 -v 1.111628 2.187409 7.618543 -v 1.065194 2.193808 7.647523 -v 1.053542 2.483245 7.712442 -v 1.095281 2.497564 7.705724 -v 1.117988 2.172955 7.658053 -v 1.104254 2.180866 7.745473 -v 1.053542 2.188795 7.712443 -v 1.143620 2.214022 7.817383 -v 1.091336 2.180866 7.665193 -v 1.143620 2.458018 7.817383 -v 1.138154 2.484628 7.783422 -v 1.186202 2.458018 7.800463 -v 1.176947 2.192473 7.628953 -v 1.095281 2.174476 7.705724 -v 1.220396 2.214022 7.770014 -v 1.124891 2.503867 7.700983 -v 1.186202 2.214022 7.800463 -v 1.171937 2.179408 7.734973 -v 1.138154 2.187409 7.783423 -# 292 vertices - -vt 0.269887 -1.845210 0.000000 -vt 0.249101 -1.780560 0.000000 -vt 0.311165 -1.782002 0.000000 -vt 0.062886 -1.501080 0.000000 -vt 0.062886 -1.596038 0.000000 -vt 0.003238 -1.595291 0.000000 -vt 0.003238 -1.501080 0.000000 -vt 0.187038 -1.689922 0.000000 -vt 0.249101 -1.688648 0.000000 -vt 0.187038 -1.782002 0.000000 -vt 0.062886 -1.689922 0.000000 -vt 0.003238 -1.688648 0.000000 -vt 0.124962 -1.688556 0.000000 -vt 0.124962 -1.780455 0.000000 -vt 0.062433 -1.782002 0.000000 -vt 0.003238 -1.780560 0.000000 -vt 0.187038 -1.312237 0.000000 -vt 0.249101 -1.313511 0.000000 -vt 0.249101 -1.221600 0.000000 -vt 0.187038 -1.220157 0.000000 -vt 0.683594 -1.312237 0.000000 -vt 0.683594 -1.220157 0.000000 -vt 0.745657 -1.221600 0.000000 -vt 0.745657 -1.313511 0.000000 -vt 0.745657 -1.406868 0.000000 -vt 0.807721 -1.312237 0.000000 -vt 0.807721 -1.406121 0.000000 -vt 0.869796 -1.313603 0.000000 -vt 0.869796 -1.406922 0.000000 -vt 0.869796 -1.501080 0.000000 -vt 0.931872 -1.406121 0.000000 -vt 0.931872 -1.501080 0.000000 -vt 0.931872 -1.689922 0.000000 -vt 0.931872 -1.596038 0.000000 -vt 0.996351 -1.595291 0.000000 -vt 0.996351 -1.688648 0.000000 -vt 0.996351 -1.780560 0.000000 -vt 0.931872 -1.782002 0.000000 -vt 0.996351 -1.221600 0.000000 -vt 0.996351 -1.313511 0.000000 -vt 0.931872 -1.312237 0.000000 -vt 0.931872 -1.220157 0.000000 -vt 0.869796 -1.221704 0.000000 -vt 0.996351 -1.406868 0.000000 -vt 0.996351 -1.501080 0.000000 -vt 0.807721 -1.220157 0.000000 -vt 0.187038 -1.596038 0.000000 -vt 0.124962 -1.595238 0.000000 -vt 0.124962 -1.501080 0.000000 -vt 0.003238 -1.406868 0.000000 -vt 0.062886 -1.406121 0.000000 -vt 0.062886 -1.312237 0.000000 -vt 0.003238 -1.313511 0.000000 -vt 0.003238 -1.221600 0.000000 -vt 0.062433 -1.220157 0.000000 -vt 0.249101 -1.406868 0.000000 -vt 0.187038 -1.406121 0.000000 -vt 0.187038 -1.501080 0.000000 -vt 0.249101 -1.501080 0.000000 -vt 0.311165 -1.501080 0.000000 -vt 0.249101 -1.595291 0.000000 -vt 0.311165 -1.596038 0.000000 -vt 0.373240 -1.501080 0.000000 -vt 0.373240 -1.595238 0.000000 -vt 0.435316 -1.596038 0.000000 -vt 0.373240 -1.688556 0.000000 -vt 0.435316 -1.689922 0.000000 -vt 0.311165 -1.689922 0.000000 -vt 0.373240 -1.780455 0.000000 -vt 0.869796 -1.688556 0.000000 -vt 0.869796 -1.780455 0.000000 -vt 0.725273 -1.845092 0.000000 -vt 0.807721 -1.782002 0.000000 -vt 0.745657 -1.780560 0.000000 -vt 0.839119 -1.857477 0.000000 -vt 0.807721 -1.501080 0.000000 -vt 0.807721 -1.689922 0.000000 -vt 0.807721 -1.596038 0.000000 -vt 0.745657 -1.595291 0.000000 -vt 0.745657 -1.688648 0.000000 -vt 0.683594 -1.689922 0.000000 -vt 0.683594 -1.596038 0.000000 -vt 0.621518 -1.688556 0.000000 -vt 0.621518 -1.595238 0.000000 -vt 0.497379 -1.595291 0.000000 -vt 0.497379 -1.688648 0.000000 -vt 0.559443 -1.689922 0.000000 -vt 0.559443 -1.596038 0.000000 -vt 0.621518 -1.501080 0.000000 -vt 0.683594 -1.501080 0.000000 -vt 0.745657 -1.501080 0.000000 -vt 0.683594 -1.406121 0.000000 -vt 0.621518 -1.313603 0.000000 -vt 0.621518 -1.221704 0.000000 -vt 0.621518 -1.406922 0.000000 -vt 0.559443 -1.406121 0.000000 -vt 0.559443 -1.312237 0.000000 -vt 0.559443 -1.220157 0.000000 -vt 0.373240 -1.313603 0.000000 -vt 0.373240 -1.221704 0.000000 -vt 0.311165 -1.220157 0.000000 -vt 0.311165 -1.312237 0.000000 -vt 0.497379 -1.406868 0.000000 -vt 0.435316 -1.406121 0.000000 -vt 0.435316 -1.501080 0.000000 -vt 0.497379 -1.501080 0.000000 -vt 0.559443 -1.501080 0.000000 -vt 0.497379 -1.221600 0.000000 -vt 0.497379 -1.313511 0.000000 -vt 0.435316 -1.312237 0.000000 -vt 0.435316 -1.220157 0.000000 -vt 0.497379 -1.780560 0.000000 -vt 0.435316 -1.782002 0.000000 -vt 0.373240 -1.406922 0.000000 -vt 0.311165 -1.406121 0.000000 -vt 0.124962 -1.313603 0.000000 -vt 0.124962 -1.406922 0.000000 -vt 0.124962 -1.221704 0.000000 -vt 0.559443 -1.782002 0.000000 -vt 0.621518 -1.780455 0.000000 -vt 0.683594 -1.782002 0.000000 -vt 0.869796 -1.595238 0.000000 -vt 0.383733 -1.857477 0.000000 -vt 0.484898 -1.998854 0.000000 -vt 0.598390 -1.926414 0.000000 -vt 0.698942 -1.901678 0.000000 -vt 0.296734 -1.902025 0.000000 -vt 0.397286 -1.928533 0.000000 -vt 0.196183 -1.927629 0.000000 -vt 0.156040 -1.857477 0.000000 -vt 0.497838 -1.901678 0.000000 -vt 0.611426 -1.857086 0.000000 -vt 0.044408 -1.845210 0.000000 -vt 0.097587 -1.902025 0.000000 -vt 0.097587 -1.928533 0.000000 -vt 0.799494 -1.928533 0.000000 -vt 0.902003 -1.100134 0.000000 -vt 0.799494 -1.073626 0.000000 -vt 0.501223 -1.003304 0.000000 -vt 0.955181 -1.845210 0.000000 -vt 0.156040 -1.144682 0.000000 -vt 0.097587 -1.100134 0.000000 -vt 0.044408 -1.156949 0.000000 -vt 0.902003 -1.902025 0.000000 -vt 0.196183 -1.074530 0.000000 -vt 0.296734 -1.100134 0.000000 -vt 0.397286 -1.073626 0.000000 -vt 0.269887 -1.156949 0.000000 -vt 0.383733 -1.144682 0.000000 -vt 0.497580 -1.845092 0.000000 -vt 0.497838 -1.100482 0.000000 -vt 0.598390 -1.075745 0.000000 -vt 0.698942 -1.100482 0.000000 -vt 0.611426 -1.145073 0.000000 -vt 0.725273 -1.157067 0.000000 -vt 0.902003 -1.074530 0.000000 -vt 0.955181 -1.156949 0.000000 -vt 0.839119 -1.144682 0.000000 -vt 0.497580 -1.157067 0.000000 -vt -0.036167 -1.195114 0.000000 -vt -0.036161 -1.807049 0.000000 -vt -0.036161 -1.195111 0.000000 -# 162 texture coords - -g eyes -usemtl _Sharkgreatwhiteshark_eye -f 3689/3271 3496/3280 3492/3272 3670/3273 -f 3494/3276 3513/3277 3621/3274 3493/3275 -f 3492/3272 3496/3280 3495/3278 3682/3279 -f 3498/3281 3508/3282 3494/3276 3493/3275 -f 3496/3280 3692/3284 3499/3283 3495/3278 -f 3497/3285 3498/3281 3499/3283 3692/3284 -f 3695/3286 3508/3282 3498/3281 3497/3285 -f 3565/3289 3501/3290 3646/3287 3500/3288 -f 3502/3293 3503/3294 3596/3291 3754/3292 -f 3504/3296 3505/3297 3678/3295 3503/3294 -f 3740/3298 3506/3299 3505/3297 3504/3296 -f 3512/3301 3507/3302 3676/3300 3506/3299 -f 3494/3305 3508/3306 3639/3303 3636/3304 -f 3695/3307 3699/3308 3639/3303 3508/3306 -f 3509/3311 3511/3312 3625/3309 3624/3310 -f 3511/3312 3509/3311 3740/3298 3510/3313 -f 3740/3298 3509/3311 3512/3301 3506/3299 -f 3623/3314 3512/3301 3509/3311 3624/3310 -f 3623/3314 3513/3315 3507/3302 3512/3301 -f 3507/3302 3513/3315 3494/3305 3636/3304 -f 3502/3293 3737/3316 3504/3296 3503/3294 -f 3514/3317 3515/3318 3516/3283 3526/3278 -f 3516/3283 3515/3318 3642/3275 3641/3281 -f 3648/3319 3517/3274 3642/3275 3515/3318 -f 3652/3322 3532/3323 3518/3320 3647/3321 -f 3652/3322 3756/3325 3753/3324 3532/3323 -f 3646/3287 3650/3327 3663/3326 3500/3288 -f 3649/3328 3664/3329 3663/3326 3650/3327 -f 3529/3331 3520/3332 3519/3330 3664/3329 -f 3520/3332 3521/3334 3662/3333 3519/3330 -f 3523/3336 3758/3337 3522/3335 3521/3334 -f 3520/3332 3524/3338 3523/3336 3521/3334 -f 3764/3273 3525/3339 3523/3336 3524/3338 -f 3747/3280 3526/3278 3516/3283 3748/3284 -f 3527/3272 3528/3279 3526/3278 3747/3280 -f 3524/3338 3528/3279 3527/3272 3764/3273 -f 3529/3331 3528/3279 3524/3338 3520/3332 -f 3529/3331 3514/3317 3526/3278 3528/3279 -f 3533/3311 3532/3310 3753/3309 3776/3312 -f 3537/3296 3531/3316 3535/3293 3530/3294 -f 3539/3298 3533/3311 3776/3312 3774/3313 -f 3533/3311 3540/3301 3518/3314 3532/3310 -f 3534/3302 3640/3315 3518/3314 3540/3301 -f 3536/3291 3530/3294 3535/3293 3727/3292 -f 3557/3295 3538/3297 3537/3296 3530/3294 -f 3538/3297 3545/3299 3539/3298 3537/3296 -f 3539/3298 3545/3299 3540/3301 3533/3311 -f 3667/3300 3534/3302 3540/3301 3545/3299 -f 3534/3302 3541/3304 3643/3305 3640/3315 -f 3542/3303 3644/3306 3643/3305 3541/3304 -f 3542/3303 3781/3308 3779/3307 3644/3306 -f 3543/3340 3772/3341 3781/3308 3542/3303 -f 3544/3342 3783/3345 3546/3343 3654/3344 -f 3538/3297 3666/3346 3667/3300 3545/3299 -f 3548/3349 3547/3350 3665/3347 3556/3348 -f 3665/3347 3547/3350 3654/3344 3546/3343 -f 3548/3349 3554/3352 3549/3351 3547/3350 -f 3554/3352 3567/3354 3552/3353 3549/3351 -f 3551/3357 3553/3358 3550/3355 3659/3356 -f 3552/3353 3567/3354 3553/3358 3551/3357 -f 3554/3352 3558/3360 3568/3359 3567/3354 -f 3548/3349 3555/3361 3558/3360 3554/3352 -f 3666/3346 3555/3361 3548/3349 3556/3348 -f 3666/3346 3538/3297 3557/3295 3555/3361 -f 3536/3291 3559/3362 3557/3295 3530/3294 -f 3727/3292 3561/3364 3560/3363 3536/3291 -f 3560/3363 3570/3365 3559/3362 3536/3291 -f 3557/3295 3559/3362 3558/3360 3555/3361 -f 3559/3362 3570/3365 3568/3359 3558/3360 -f 3560/3363 3572/3367 3571/3366 3570/3365 -f 3562/3368 3572/3367 3560/3363 3561/3364 -f 3714/3371 3564/3372 3563/3369 3759/3370 -f 3565/3289 3500/3288 3564/3372 3714/3371 -f 3566/3375 3574/3376 3576/3373 3575/3374 -f 3550/3355 3553/3358 3569/3377 3574/3376 -f 3568/3359 3569/3377 3553/3358 3567/3354 -f 3571/3366 3569/3377 3568/3359 3570/3365 -f 3573/3378 3577/3379 3572/3367 3562/3368 -f 3569/3377 3571/3366 3576/3373 3574/3376 -f 3572/3367 3577/3379 3576/3373 3571/3366 -f 3576/3373 3577/3379 3669/3380 3575/3374 -f 3573/3378 3762/3381 3669/3380 3577/3379 -f 3579/3333 3671/3334 3580/3332 3578/3330 -f 3585/3335 3583/3337 3581/3336 3671/3334 -f 3586/3375 3582/3376 3584/3355 3585/3335 -f 3584/3355 3593/3356 3583/3337 3585/3335 -f 3579/3333 3586/3375 3585/3335 3671/3334 -f 3586/3375 3604/3374 3587/3373 3582/3376 -f 3603/3380 3588/3379 3587/3373 3604/3374 -f 3589/3367 3590/3366 3587/3373 3588/3379 -f 3587/3373 3590/3366 3591/3377 3582/3376 -f 3591/3377 3627/3358 3584/3355 3582/3376 -f 3592/3357 3593/3356 3584/3355 3627/3358 -f 3594/3382 3721/3383 3583/3337 3593/3356 -f 3598/3360 3595/3362 3678/3295 3679/3361 -f 3678/3295 3595/3362 3596/3291 3503/3294 -f 3597/3363 3755/3364 3754/3292 3596/3291 -f 3599/3359 3600/3365 3595/3362 3598/3360 -f 3590/3366 3600/3365 3599/3359 3591/3377 -f 3590/3366 3589/3367 3597/3363 3600/3365 -f 3602/3378 3601/3368 3589/3367 3588/3379 -f 3595/3362 3600/3365 3597/3363 3596/3291 -f 3601/3368 3755/3364 3597/3363 3589/3367 -f 3675/3326 3609/3327 3608/3287 3606/3288 -f 3603/3380 3742/3381 3602/3378 3588/3379 -f 3604/3374 3605/3384 3611/3369 3603/3380 -f 3579/3333 3605/3384 3604/3374 3586/3375 -f 3579/3333 3578/3330 3673/3385 3605/3384 -f 3675/3326 3606/3288 3610/3372 3673/3385 -f 3608/3287 3607/3290 3612/3289 3606/3288 -f 3609/3327 3614/3387 3615/3386 3608/3287 -f 3673/3385 3610/3372 3611/3369 3605/3384 -f 3612/3289 3613/3371 3610/3372 3606/3288 -f 3613/3371 3745/3370 3611/3369 3610/3372 -f 3622/3321 3616/3322 3615/3386 3614/3387 -f 3617/3325 3618/3388 3615/3386 3616/3322 -f 3615/3386 3618/3388 3607/3290 3608/3287 -f 3495/3278 3684/3317 3683/3331 3682/3279 -f 3499/3283 3620/3318 3684/3317 3495/3278 -f 3493/3275 3620/3318 3499/3283 3498/3281 -f 3493/3275 3621/3274 3619/3319 3620/3318 -f 3619/3319 3621/3274 3622/3321 3614/3387 -f 3623/3320 3622/3321 3621/3274 3513/3277 -f 3623/3320 3624/3323 3616/3322 3622/3321 -f 3625/3324 3617/3325 3616/3322 3624/3323 -f 3684/3317 3620/3318 3619/3319 3626/3328 -f 3592/3357 3722/3389 3594/3382 3593/3356 -f 3599/3359 3681/3354 3627/3358 3591/3377 -f 3627/3358 3681/3354 3628/3353 3592/3357 -f 3629/3352 3632/3351 3628/3353 3681/3354 -f 3680/3349 3633/3350 3632/3351 3629/3352 -f 3628/3353 3630/3390 3722/3389 3592/3357 -f 3628/3353 3632/3351 3711/3391 3630/3390 -f 3632/3351 3633/3350 3631/3344 3711/3391 -f 3680/3349 3637/3348 3634/3347 3633/3350 -f 3676/3300 3635/3392 3637/3348 3677/3346 -f 3636/3304 3635/3392 3676/3300 3507/3302 -f 3636/3304 3639/3303 3638/3340 3635/3392 -f 3638/3340 3634/3347 3637/3348 3635/3392 -f 3634/3347 3697/3343 3631/3344 3633/3350 -f 3699/3308 3698/3341 3638/3340 3639/3303 -f 3518/3320 3640/3277 3517/3274 3647/3321 -f 3643/3276 3642/3275 3517/3274 3640/3277 -f 3643/3276 3644/3282 3641/3281 3642/3275 -f 3779/3286 3645/3285 3641/3281 3644/3282 -f 3645/3285 3748/3284 3516/3283 3641/3281 -f 3653/3386 3646/3287 3501/3290 3757/3388 -f 3648/3319 3651/3387 3647/3321 3517/3274 -f 3649/3328 3514/3317 3529/3331 3664/3329 -f 3514/3317 3649/3328 3648/3319 3515/3318 -f 3650/3327 3651/3387 3648/3319 3649/3328 -f 3653/3386 3651/3387 3650/3327 3646/3287 -f 3653/3386 3652/3322 3647/3321 3651/3387 -f 3653/3386 3757/3388 3756/3325 3652/3322 -f 3549/3351 3655/3391 3654/3344 3547/3350 -f 3552/3353 3760/3390 3655/3391 3549/3351 -f 3552/3353 3551/3357 3656/3389 3760/3390 -f 3551/3357 3659/3356 3658/3382 3656/3389 -f 3658/3382 3659/3356 3758/3337 3657/3383 -f 3550/3355 3522/3335 3758/3337 3659/3356 -f 3566/3375 3522/3335 3550/3355 3574/3376 -f 3522/3335 3566/3375 3662/3333 3521/3334 -f 3575/3374 3660/3384 3662/3333 3566/3375 -f 3563/3369 3564/3372 3661/3385 3660/3384 -f 3663/3326 3661/3385 3564/3372 3500/3288 -f 3661/3385 3519/3330 3662/3333 3660/3384 -f 3519/3330 3661/3385 3663/3326 3664/3329 -f 3543/3340 3668/3392 3556/3348 3665/3347 -f 3556/3348 3668/3392 3667/3300 3666/3346 -f 3667/3300 3668/3392 3541/3304 3534/3302 -f 3541/3304 3668/3392 3543/3340 3542/3303 -f 3575/3374 3669/3380 3563/3369 3660/3384 -f 3670/3273 3672/3338 3581/3336 3720/3339 -f 3581/3336 3672/3338 3580/3332 3671/3334 -f 3683/3331 3580/3332 3672/3338 3682/3279 -f 3683/3331 3674/3329 3578/3330 3580/3332 -f 3578/3330 3674/3329 3675/3326 3673/3385 -f 3626/3328 3609/3327 3675/3326 3674/3329 -f 3609/3327 3626/3328 3619/3319 3614/3387 -f 3676/3300 3677/3346 3505/3297 3506/3299 -f 3677/3346 3679/3361 3678/3295 3505/3297 -f 3680/3349 3679/3361 3677/3346 3637/3348 -f 3680/3349 3629/3352 3598/3360 3679/3361 -f 3599/3359 3598/3360 3629/3352 3681/3354 -f 3672/3338 3670/3273 3492/3272 3682/3279 -f 3626/3328 3674/3329 3683/3331 3684/3317 -f 3716/3393 3685/3397 3689/3271 3670/3273 -f 3702/3396 3700/3406 3686/3394 3691/3395 -f 3716/3393 3688/3398 3685/3397 -f 3685/3397 3688/3398 3686/3394 3687/3399 -f 3693/3400 3685/3397 3687/3399 -f 3718/3401 3691/3395 3686/3394 3688/3398 -f 3693/3400 3496/3280 3689/3271 3685/3397 -f 3718/3401 3717/3420 3690/3402 3691/3395 -f 3693/3400 3497/3285 3692/3284 3496/3280 -f 3690/3402 3702/3396 3691/3395 -f 3690/3402 3711/3391 3694/3342 3702/3396 -f 3705/3403 3695/3286 3497/3285 3693/3400 -f 3694/3342 3697/3343 3696/3345 3702/3396 -f 3694/3342 3711/3391 3631/3344 3697/3343 -f 3698/3341 3699/3308 3696/3345 3697/3343 -f 3707/3404 3705/3403 3693/3400 3687/3399 -f 3697/3343 3634/3347 3638/3340 3698/3341 -f 3707/3404 3687/3399 3686/3394 3700/3405 -f 3696/3345 3707/3414 3700/3406 3702/3396 -f 3782/3404 3741/3405 3701/3394 3751/3399 -f 3729/3409 3723/3426 3734/3407 3703/3408 -f 3705/3410 3699/3308 3695/3307 -f 3708/3407 3709/3426 3780/3409 3704/3408 -f 3705/3410 3707/3414 3696/3345 3699/3308 -f 3706/3413 3756/3325 3715/3411 3708/3412 -f 3715/3411 3710/3416 3709/3415 3708/3412 -f 3690/3402 3722/3389 3630/3390 3711/3391 -f 3710/3416 3719/3417 3780/3409 3709/3415 -f 3712/3418 3501/3290 3565/3289 3714/3371 -f 3713/3419 3710/3416 3712/3418 3714/3371 -f 3717/3420 3594/3382 3722/3389 3690/3402 -f 3712/3418 3710/3416 3715/3411 3501/3290 -f 3718/3401 3688/3398 3716/3393 3717/3420 -f 3713/3419 3763/3421 3719/3417 3710/3416 -f 3720/3339 3721/3383 3716/3393 3670/3273 -f 3763/3421 3768/3422 3780/3409 3719/3417 -f 3721/3383 3594/3382 3717/3420 3716/3393 -f 3723/3415 3728/3416 3739/3411 3734/3412 -f 3724/3423 3704/3408 3780/3409 3768/3422 -f 3739/3411 3617/3325 3725/3413 3734/3412 -f 3768/3422 3763/3421 3767/3424 3724/3423 -f 3767/3424 3727/3292 3726/3425 3724/3423 -f 3625/3324 3511/3430 3725/3413 3617/3325 -f 3739/3411 3607/3290 3618/3388 3617/3325 -f 3726/3425 3727/3292 3535/3293 -f 3728/3416 3723/3415 3729/3409 3735/3417 -f 3730/3424 3736/3423 3738/3425 3754/3292 -f 3738/3425 3502/3293 3754/3292 -f 3730/3424 3733/3421 3731/3422 3736/3423 -f 3736/3423 3731/3422 3729/3409 3703/3408 -f 3733/3421 3735/3417 3729/3409 3731/3422 -f 3732/3428 3734/3407 3725/3427 3511/3312 -f 3733/3421 3743/3429 3744/3419 3735/3417 -f 3732/3428 3703/3408 3734/3407 -f 3744/3419 3728/3416 3735/3417 -f 3732/3428 3738/3425 3736/3423 3703/3408 -f 3744/3419 3613/3371 3749/3418 3728/3416 -f 3749/3418 3607/3290 3739/3411 3728/3416 -f 3737/3316 3502/3293 3738/3425 3732/3428 -f 3732/3428 3511/3312 3510/3313 3737/3316 -f 3737/3316 3510/3313 3740/3298 3504/3296 -f 3744/3419 3742/3381 3745/3370 3613/3371 -f 3751/3399 3752/3397 3750/3400 3782/3404 -f 3730/3424 3601/3368 3743/3429 3733/3421 -f 3750/3400 3645/3285 3746/3403 3782/3404 -f 3779/3286 3781/3431 3746/3403 3645/3285 -f 3743/3429 3602/3378 3742/3381 3744/3419 -f 3742/3381 3603/3380 3611/3369 3745/3370 -f 3750/3400 3747/3280 3748/3284 3645/3285 -f 3612/3289 3607/3290 3749/3418 3613/3371 -f 3750/3400 3752/3397 3777/3271 3747/3280 -f 3743/3429 3601/3368 3602/3378 -f 3701/3394 3769/3398 3752/3397 3751/3399 -f 3730/3424 3754/3292 3755/3364 3601/3368 -f 3706/3413 3776/3432 3753/3324 3756/3325 -f 3721/3383 3720/3339 3581/3336 3583/3337 -f 3757/3388 3501/3290 3715/3411 3756/3325 -f 3762/3381 3759/3370 3563/3369 3669/3380 -f 3523/3336 3525/3339 3657/3383 3758/3337 -f 3766/3420 3656/3389 3658/3382 -f 3759/3370 3762/3381 3713/3419 3714/3371 -f 3766/3420 3773/3401 3771/3402 3656/3389 -f 3771/3402 3655/3391 3760/3390 3656/3389 -f 3761/3429 3763/3421 3713/3419 3762/3381 -f 3573/3378 3562/3368 3761/3429 3762/3381 -f 3761/3429 3562/3368 3767/3424 3763/3421 -f 3765/3393 3657/3383 3525/3339 3764/3273 -f 3561/3364 3727/3292 3767/3424 3562/3368 -f 3766/3420 3658/3382 3657/3383 3765/3393 -f 3765/3393 3769/3398 3773/3401 3766/3420 -f 3777/3271 3764/3273 3527/3272 3747/3280 -f 3546/3343 3772/3341 3543/3340 3665/3347 -f 3544/3342 3654/3344 3655/3391 -f 3783/3345 3781/3308 3772/3341 3546/3343 -f 3771/3402 3770/3396 3544/3342 3655/3391 -f 3770/3396 3741/3406 3783/3345 3544/3342 -f 3771/3402 3773/3401 3778/3395 3770/3396 -f 3539/3298 3774/3313 3531/3316 3537/3296 -f 3773/3401 3769/3398 3701/3394 3778/3395 -f 3775/3428 3531/3316 3774/3313 3776/3312 -f 3726/3425 3535/3293 3531/3316 3775/3428 -f 3775/3428 3704/3408 3724/3423 3726/3425 -f 3765/3393 3752/3397 3769/3398 -f 3765/3393 3764/3273 3777/3271 3752/3397 -f 3706/3427 3708/3407 3775/3428 3776/3312 -f 3775/3428 3708/3407 3704/3408 -f 3701/3394 3741/3406 3770/3396 3778/3395 -f 3783/3345 3782/3414 3746/3410 3781/3308 -f 3783/3345 3741/3406 3782/3414 -# 281 polygons - 14 triangles - diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Models/shark.obj.meta b/Assets/Obi/Samples/RopeAndRod/SampleResources/Models/shark.obj.meta deleted file mode 100644 index d065a02ba..000000000 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Models/shark.obj.meta +++ /dev/null @@ -1,105 +0,0 @@ -fileFormatVersion: 2 -guid: 92fe50136a7db4cc7bf5dceedcfc586e -ModelImporter: - serializedVersion: 21202 - internalIDToNameTable: [] - externalObjects: {} - materials: - materialImportMode: 2 - materialName: 0 - materialSearch: 1 - materialLocation: 1 - animations: - legacyGenerateAnimations: 4 - bakeSimulation: 0 - resampleCurves: 1 - optimizeGameObjects: 0 - removeConstantScaleCurves: 1 - motionNodeName: - rigImportErrors: - rigImportWarnings: - animationImportErrors: - animationImportWarnings: - animationRetargetingWarnings: - animationDoRetargetingWarnings: 0 - importAnimatedCustomProperties: 0 - importConstraints: 0 - animationCompression: 1 - animationRotationError: 0.5 - animationPositionError: 0.5 - animationScaleError: 0.5 - animationWrapMode: 0 - extraExposedTransformPaths: [] - extraUserProperties: [] - clipAnimations: [] - isReadable: 1 - meshes: - lODScreenPercentages: [] - globalScale: 1 - meshCompression: 0 - addColliders: 0 - useSRGBMaterialColor: 1 - sortHierarchyByName: 1 - importVisibility: 1 - importBlendShapes: 1 - importCameras: 1 - importLights: 1 - nodeNameCollisionStrategy: 1 - fileIdsGeneration: 2 - swapUVChannels: 0 - generateSecondaryUV: 0 - useFileUnits: 1 - keepQuads: 0 - weldVertices: 1 - bakeAxisConversion: 0 - preserveHierarchy: 0 - skinWeightsMode: 0 - maxBonesPerVertex: 4 - minBoneWeight: 0.001 - optimizeBones: 1 - meshOptimizationFlags: -1 - indexFormat: 0 - secondaryUVAngleDistortion: 8 - secondaryUVAreaDistortion: 15.000001 - secondaryUVHardAngle: 88 - secondaryUVMarginMethod: 1 - secondaryUVMinLightmapResolution: 40 - secondaryUVMinObjectScale: 1 - secondaryUVPackMargin: 4 - useFileScale: 1 - tangentSpace: - normalSmoothAngle: 60 - normalImportMode: 0 - tangentImportMode: 3 - normalCalculationMode: 4 - legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 - blendShapeNormalImportMode: 1 - normalSmoothingSource: 0 - referencedClips: [] - importAnimation: 1 - humanDescription: - serializedVersion: 3 - human: [] - skeleton: [] - armTwist: 0.5 - foreArmTwist: 0.5 - upperLegTwist: 0.5 - legTwist: 0.5 - armStretch: 0.05 - legStretch: 0.05 - feetSpacing: 0 - globalScale: 1 - rootMotionBoneName: - hasTranslationDoF: 0 - hasExtraRoot: 0 - skeletonHasParents: 1 - lastHumanDescriptionAvatarSource: {instanceID: 0} - autoGenerateAvatarMappingIfUnspecified: 1 - animationType: 2 - humanoidOversampling: 1 - avatarSetup: 0 - addHumanoidExtraRootOnlyWhenUsingAvatar: 1 - additionalBone: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Prefabs/SnakeBamboo.asset b/Assets/Obi/Samples/RopeAndRod/SampleResources/Prefabs/SnakeBamboo.asset index 9dea6b172..f8a726184 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Prefabs/SnakeBamboo.asset +++ b/Assets/Obi/Samples/RopeAndRod/SampleResources/Prefabs/SnakeBamboo.asset @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 5b9c84cdb747944209b1c8753933c5db, type: 3} m_Name: SnakeBamboo m_EditorClassIdentifier: - dynamicFriction: 0.2 + dynamicFriction: 0.3 staticFriction: 0 stickiness: 0 stickDistance: 0 diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Prefabs/SnakeBody.asset b/Assets/Obi/Samples/RopeAndRod/SampleResources/Prefabs/SnakeBody.asset index 0411fa0fb..c4995c1b7 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Prefabs/SnakeBody.asset +++ b/Assets/Obi/Samples/RopeAndRod/SampleResources/Prefabs/SnakeBody.asset @@ -12,9 +12,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 5b9c84cdb747944209b1c8753933c5db, type: 3} m_Name: SnakeBody m_EditorClassIdentifier: - dynamicFriction: 0.2 + dynamicFriction: 0.1 staticFriction: 0 - stickiness: 0.01 + stickiness: 0.02 stickDistance: 0.01 frictionCombine: 3 stickinessCombine: 3 diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Prefabs/SnakeFloor.asset b/Assets/Obi/Samples/RopeAndRod/SampleResources/Prefabs/SnakeFloor.asset index 7f15628a6..1853cb1e2 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Prefabs/SnakeFloor.asset +++ b/Assets/Obi/Samples/RopeAndRod/SampleResources/Prefabs/SnakeFloor.asset @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 5b9c84cdb747944209b1c8753933c5db, type: 3} m_Name: SnakeFloor m_EditorClassIdentifier: - dynamicFriction: 1.2 + dynamicFriction: 0.7 staticFriction: 0 stickiness: 0 stickDistance: 0 diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Prefabs/TanglePeg.prefab b/Assets/Obi/Samples/RopeAndRod/SampleResources/Prefabs/TanglePeg.prefab deleted file mode 100644 index 8a755d9e6..000000000 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Prefabs/TanglePeg.prefab +++ /dev/null @@ -1,228 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &3512526509595786538 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 3512526509595786583} - - component: {fileID: 2838414990970241973} - - component: {fileID: 8733900141329501594} - - component: {fileID: 348212794980533237} - - component: {fileID: 9130168360642288785} - - component: {fileID: 4552180186810924025} - m_Layer: 0 - m_Name: TanglePeg - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &3512526509595786583 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3512526509595786538} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 4367317764625006663} - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!54 &2838414990970241973 -Rigidbody: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3512526509595786538} - serializedVersion: 5 - m_Mass: 5 - m_LinearDamping: 0 - m_AngularDamping: 0.05 - m_CenterOfMass: {x: 0, y: 0, z: 0} - m_InertiaTensor: {x: 1, y: 1, z: 1} - m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ImplicitCom: 1 - m_ImplicitTensor: 1 - m_UseGravity: 0 - m_IsKinematic: 1 - m_Interpolate: 0 - m_Constraints: 112 - m_CollisionDetection: 0 ---- !u!114 &8733900141329501594 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3512526509595786538} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: beb10e70cc06a4b019ecf88348a5f7fa, type: 3} - m_Name: - m_EditorClassIdentifier: - currentSlot: {fileID: 0} - floorCollider: {fileID: 0} - attachedRope: {fileID: 0} - stiffness: 200 - damping: 20 - maxAccel: 50 - minDistance: 0.05 ---- !u!136 &348212794980533237 -CapsuleCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3512526509595786538} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: 0.4 - m_Height: 1.1 - m_Direction: 1 - m_Center: {x: 0.000000059604645, y: 0, z: -0.00000008940697} ---- !u!114 &9130168360642288785 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3512526509595786538} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6757b231cedd544c583ef8aeaf773b2a, type: 3} - m_Name: - m_EditorClassIdentifier: - thickness: 0 - inverted: 0 - material: {fileID: 0} - filter: -65534 - m_SourceCollider: {fileID: 348212794980533237} - m_DistanceField: {fileID: 0} ---- !u!114 &4552180186810924025 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3512526509595786538} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 62359d80fdc0e4315ab6331b78ec5b90, type: 3} - m_Name: - m_EditorClassIdentifier: - kinematicForParticles: 0 ---- !u!1 &3782235798457470433 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 4367317764625006663} - - component: {fileID: 8070882573767540436} - - component: {fileID: 7140162020897419162} - m_Layer: 0 - m_Name: GameObject - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &4367317764625006663 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3782235798457470433} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0.2, z: 0} - m_LocalScale: {x: 0.8, y: 0.2, z: 0.8} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 3512526509595786583} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!33 &8070882573767540436 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3782235798457470433} - m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0} ---- !u!23 &7140162020897419162 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3782235798457470433} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: bcdcc68772c3b42ca94abeffddf3eb19, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Prefabs/TanglePegSlot.prefab b/Assets/Obi/Samples/RopeAndRod/SampleResources/Prefabs/TanglePegSlot.prefab deleted file mode 100644 index 1c8a8d2e7..000000000 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Prefabs/TanglePegSlot.prefab +++ /dev/null @@ -1,106 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &3512526509595786538 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 3512526509595786583} - - component: {fileID: 3512526509595786582} - - component: {fileID: 3512526509595786581} - - component: {fileID: 8518691974497511176} - m_Layer: 0 - m_Name: TanglePegSlot - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &3512526509595786583 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3512526509595786538} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 0.05, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!33 &3512526509595786582 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3512526509595786538} - m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0} ---- !u!23 &3512526509595786581 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3512526509595786538} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: d402dacd6333443e5926c03c59b7b0ad, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!114 &8518691974497511176 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3512526509595786538} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 866212c246a9c4c5797069099ad745aa, type: 3} - m_Name: - m_EditorClassIdentifier: - currentPeg: {fileID: 0} - tintColor: {r: 1, g: 0.8207643, b: 0.18396229, a: 1} diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Prefabs/WrapPeg.prefab b/Assets/Obi/Samples/RopeAndRod/SampleResources/Prefabs/WrapPeg.prefab index 4f3b12f3a..b8c789c02 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Prefabs/WrapPeg.prefab +++ b/Assets/Obi/Samples/RopeAndRod/SampleResources/Prefabs/WrapPeg.prefab @@ -69,7 +69,7 @@ MeshRenderer: m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 2100000, guid: 03019be2b7a654429bf322c3ca0c7a0e, type: 2} + - {fileID: 2100000, guid: d402dacd6333443e5926c03c59b7b0ad, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -128,7 +128,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 0} filter: -65535 m_SourceCollider: {fileID: 3512526509595786580} diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/CableCarController.cs b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/CableCarController.cs deleted file mode 100644 index ea7f8e54c..000000000 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/CableCarController.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace Obi.Samples -{ - public class CableCarController : MonoBehaviour - { - public ObiPinhole pinhole; - public float carSpeed = 1; - - // Update is called once per frame - void Update() - { - float speed = 0; - if (Input.GetKey(KeyCode.W)) - { - speed = carSpeed; - } - - if (Input.GetKey(KeyCode.S)) - { - speed = -carSpeed; - } - pinhole.motorSpeed = speed; - - if (Input.GetKeyDown(KeyCode.Space)) - { - pinhole.friction = pinhole.friction > 0.5f ? 0 : 1; - } - } - } -} diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/CableCarController.cs.meta b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/CableCarController.cs.meta deleted file mode 100644 index 96a021d0e..000000000 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/CableCarController.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: df6783efff96747d7b949f3538d1cee7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/CharacterControl2D.cs b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/CharacterControl2D.cs index 2bc1b2078..8a88a0b37 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/CharacterControl2D.cs +++ b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/CharacterControl2D.cs @@ -2,78 +2,27 @@ using System.Collections.Generic; using UnityEngine; -namespace Obi.Samples -{ - public class CharacterControl2D : MonoBehaviour - { +public class CharacterControl2D : MonoBehaviour { - public float floorRaycastDistance = 1.2f; + public float acceleration = 10; + public float maxSpeed = 8; + public float jumpPower = 2; - [Header("Grounded")] - public float acceleration = 80; - public float maxSpeed = 6; - public float damping = 0.005f; - public float jumpPower = 10; + private Rigidbody unityRigidbody; + + public void Awake(){ + unityRigidbody = GetComponent(); + } - [Header("Airborne")] - public float airAcceleration = 16; - public float airMaxSpeed = 12; - public float extraGravity = -12; + + void FixedUpdate () { - [Header("Auto upright")] - public Vector3 centerOfMass = new Vector3(0, -0.25f, 0); - public float P = 2; - public float D = 0.1f; - - private Rigidbody unityRigidbody; - private float axis; - private bool grounded; - private float error; - private float prevError; - - public void Awake() - { - unityRigidbody = GetComponent(); - unityRigidbody.centerOfMass = centerOfMass; - } - - private void Update() - { - axis = Input.GetAxisRaw("Horizontal"); - grounded = Physics.Raycast(new Ray(transform.position, -Vector3.up), floorRaycastDistance); - - if (Input.GetButtonDown("Jump") && grounded) - unityRigidbody.AddForce(Vector3.up * jumpPower, ForceMode.VelocityChange); - } - - private void FixedUpdate() - { - var velocity = unityRigidbody.linearVelocity; - - prevError = error; - error = Vector3.SignedAngle(unityRigidbody.transform.up, Vector3.up, Vector3.forward); - - if (grounded) - { - float accel = axis * acceleration * Time.deltaTime; - if ((velocity.x < maxSpeed && accel > 0) || (velocity.x > -maxSpeed && accel < 0)) - velocity.x += accel; - - if (Mathf.Approximately(axis, 0)) - velocity.x *= Mathf.Pow(damping, Time.deltaTime); - - unityRigidbody.AddTorque(new Vector3(0, 0, error * P + (error - prevError) / Time.deltaTime * D)); - } - else - { - float accel = axis * airAcceleration * Time.deltaTime; - if ((velocity.x < airMaxSpeed && accel > 0) || (velocity.x > -airMaxSpeed && accel < 0)) - velocity.x += accel; - - velocity.y += extraGravity * Time.deltaTime; - } - - unityRigidbody.linearVelocity = velocity; - } - } -} \ No newline at end of file + unityRigidbody.AddForce(new Vector3(Input.GetAxis("Horizontal")*acceleration,0,0)); + + unityRigidbody.linearVelocity = Vector3.ClampMagnitude(unityRigidbody.linearVelocity,maxSpeed); + + if (Input.GetButtonDown("Jump")){ + unityRigidbody.AddForce(Vector3.up * jumpPower,ForceMode.VelocityChange); + } + } +} diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/CraneController.cs b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/CraneController.cs index 62f926e8f..546808725 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/CraneController.cs +++ b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/CraneController.cs @@ -1,46 +1,36 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; +using Obi; -namespace Obi.Samples -{ - public class CraneController : MonoBehaviour - { +public class CraneController : MonoBehaviour { - ObiRopeCursor cursor; - ObiRope rope; - public float speed = 1; + ObiRopeCursor cursor; + ObiRope rope; - // Use this for initialization - void Start() - { - cursor = GetComponentInChildren(); - rope = cursor.GetComponent(); - } + // Use this for initialization + void Start () { + cursor = GetComponentInChildren(); + rope = cursor.GetComponent(); + } + + // Update is called once per frame + void Update () { + if (Input.GetKey(KeyCode.W)){ + if (rope.restLength > 6.5f) + cursor.ChangeLength(rope.restLength - 1f * Time.deltaTime); + } - // Update is called once per frame - void Update() - { - if (Input.GetKey(KeyCode.W)) - { - if (rope.restLength > 6.5f) - cursor.ChangeLength(-speed * Time.deltaTime); - } + if (Input.GetKey(KeyCode.S)){ + cursor.ChangeLength(rope.restLength + 1f * Time.deltaTime); + } - if (Input.GetKey(KeyCode.S)) - { - cursor.ChangeLength(speed * Time.deltaTime); - } + if (Input.GetKey(KeyCode.A)){ + transform.Rotate(0,Time.deltaTime*15f,0); + } - if (Input.GetKey(KeyCode.A)) - { - transform.Rotate(0, Time.deltaTime * 15f, 0); - } - - if (Input.GetKey(KeyCode.D)) - { - transform.Rotate(0, -Time.deltaTime * 15f, 0); - } - } - } -} \ No newline at end of file + if (Input.GetKey(KeyCode.D)){ + transform.Rotate(0,-Time.deltaTime*15f,0); + } + } +} diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/CursorController.cs b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/CursorController.cs index f5257fff3..7c6a6ba6d 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/CursorController.cs +++ b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/CursorController.cs @@ -1,53 +1,45 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; +using Obi; -namespace Obi.Samples +[RequireComponent(typeof(ObiRope))] +public class CursorController : MonoBehaviour { - [RequireComponent(typeof(ObiRope))] - public class CursorController : MonoBehaviour + + ObiRopeCursor cursor; + ObiRope rope; + public float minLength = 0.1f; + public float speed = 1; + + // Use this for initialization + void Start () { - public float minLength = 0.1f; - public float speed = 1; - - private ObiRopeCursor cursor; - private ObiRope rope; - - void OnEnable() + rope = GetComponent(); + cursor = GetComponent(); + } + + // Update is called once per frame + void Update () + { + if (Input.GetKey(KeyCode.W) && cursor != null) { - rope = GetComponent(); - cursor = GetComponent(); - } + if (rope.restLength > minLength) + cursor.ChangeLength(rope.restLength - speed * Time.deltaTime); + } - void Update() + if (Input.GetKey(KeyCode.S) && cursor != null) { - float change = 0; + cursor.ChangeLength(rope.restLength + speed * Time.deltaTime); + } - if (Input.GetKey(KeyCode.W) && cursor != null) - { - change -= speed * Time.deltaTime; - } + if (Input.GetKey(KeyCode.A)){ + rope.transform.Translate(Vector3.left * Time.deltaTime,Space.World); + } - if (Input.GetKey(KeyCode.S) && cursor != null) - { - change += speed * Time.deltaTime; - } + if (Input.GetKey(KeyCode.D)){ + rope.transform.Translate(Vector3.right * Time.deltaTime,Space.World); + } - if (rope.restLength + change < minLength) - change = minLength - rope.restLength; - - cursor.ChangeLength(change); - - if (Input.GetKey(KeyCode.A)) - { - rope.transform.Translate(Vector3.left * Time.deltaTime, Space.World); - } - - if (Input.GetKey(KeyCode.D)) - { - rope.transform.Translate(Vector3.right * Time.deltaTime, Space.World); - } - - } - } + } } diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/ExtendableGrapplingHook.cs b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/ExtendableGrapplingHook.cs index 8c2ade265..4cc82a645 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/ExtendableGrapplingHook.cs +++ b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/ExtendableGrapplingHook.cs @@ -1,7 +1,7 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; - +using Obi; /** * Sample component that shows how to use Obi Rope to create a grappling hook for a 2.5D game. @@ -15,213 +15,199 @@ using UnityEngine; * If complex interaction is required with the scene, a purely geometry-based approach (ala Worms ninja rope) can * be the right choice under certain circumstances. */ - -namespace Obi.Samples +public class ExtendableGrapplingHook : MonoBehaviour { - public class ExtendableGrapplingHook : MonoBehaviour + + public ObiSolver solver; + public ObiCollider character; + + public Material material; + public ObiRopeSection section; + + [Range(0, 1)] + public float hookResolution = 0.5f; + public float hookExtendRetractSpeed = 2; + public float hookShootSpeed = 30; + public int particlePoolSize = 100; + + private ObiRope rope; + private ObiRopeBlueprint blueprint; + private ObiRopeExtrudedRenderer ropeRenderer; + + private ObiRopeCursor cursor; + + private RaycastHit hookAttachment; + + void Awake() { - public ObiSolver solver; - public ObiCollider character; + // Create both the rope and the solver: + rope = gameObject.AddComponent(); + ropeRenderer = gameObject.AddComponent(); + ropeRenderer.section = section; + ropeRenderer.uvScale = new Vector2(1, 4); + ropeRenderer.normalizeV = false; + ropeRenderer.uvAnchor = 1; + rope.GetComponent().material = material; - public Material material; - public ObiRopeSection section; + // Setup a blueprint for the rope: + blueprint = ScriptableObject.CreateInstance(); + blueprint.resolution = 0.5f; + blueprint.pooledParticles = particlePoolSize; - [Range(0, 1)] - public float hookResolution = 0.5f; - public float hookExtendRetractSpeed = 2; - public float hookShootSpeed = 30; - public int particlePoolSize = 100; + // Tweak rope parameters: + rope.maxBending = 0.02f; - private ObiRope rope; - private ObiRopeBlueprint blueprint; - private ObiRopeExtrudedRenderer ropeRenderer; + // Add a cursor to be able to change rope length: + cursor = rope.gameObject.AddComponent(); + cursor.cursorMu = 0; + cursor.direction = true; + } - private ObiRopeCursor cursor; + private void OnDestroy() + { + DestroyImmediate(blueprint); + } - private RaycastHit hookAttachment; + /** + * Raycast against the scene to see if we can attach the hook to something. + */ + private void LaunchHook() + { - void Awake() + // Get the mouse position in the scene, in the same XY plane as this object: + Vector3 mouse = Input.mousePosition; + mouse.z = transform.position.z - Camera.main.transform.position.z; + Vector3 mouseInScene = Camera.main.ScreenToWorldPoint(mouse); + + // Get a ray from the character to the mouse: + Ray ray = new Ray(transform.position, mouseInScene - transform.position); + + // Raycast to see what we hit: + if (Physics.Raycast(ray, out hookAttachment)) { - - // Create both the rope and the solver: - rope = gameObject.AddComponent(); - ropeRenderer = gameObject.AddComponent(); - ropeRenderer.section = section; - ropeRenderer.uvScale = new Vector2(1, 4); - ropeRenderer.normalizeV = false; - ropeRenderer.uvAnchor = 1; - ropeRenderer.material = material; - - // Setup a blueprint for the rope: - blueprint = ScriptableObject.CreateInstance(); - blueprint.resolution = 0.5f; - blueprint.pooledParticles = particlePoolSize; - - // Tweak rope parameters: - rope.maxBending = 0.02f; - - // Add a cursor to be able to change rope length: - cursor = rope.gameObject.AddComponent(); - cursor.cursorMu = 0; - cursor.direction = true; + // We actually hit something, so attach the hook! + StartCoroutine(AttachHook()); } - private void OnDestroy() + } + + private IEnumerator AttachHook() + { + yield return null; + + // Clear pin constraints: + var pinConstraints = rope.GetConstraintsByType(Oni.ConstraintType.Pin) as ObiConstraints; + pinConstraints.Clear(); + + Vector3 localHit = rope.transform.InverseTransformPoint(hookAttachment.point); + + // Procedurally generate the rope path (just a short segment, as we will extend it over time): + int filter = ObiUtils.MakeFilter(ObiUtils.CollideWithEverything, 0); + blueprint.path.Clear(); + blueprint.path.AddControlPoint(Vector3.zero, Vector3.zero, Vector3.zero, Vector3.up, 0.1f, 0.1f, 1, filter, Color.white, "Hook start"); + blueprint.path.AddControlPoint(localHit.normalized * 0.5f, Vector3.zero, Vector3.zero, Vector3.up, 0.1f, 0.1f, 1, filter, Color.white, "Hook end"); + blueprint.path.FlushEvents(); + + // Generate the particle representation of the rope (wait until it has finished): + yield return blueprint.Generate(); + + // Set the blueprint (this adds particles/constraints to the solver and starts simulating them). + rope.ropeBlueprint = blueprint; + + // wait one frame: + yield return null; + + rope.GetComponent().enabled = true; + + // set masses to zero, as we're going to override positions while we extend the rope: + for (int i = 0; i < rope.activeParticleCount; ++i) + solver.invMasses[rope.solverIndices[i]] = 0; + + float currentLength = 0; + + // while the last particle hasn't reached the hit, extend the rope: + while (true) { - DestroyImmediate(blueprint); - } + // calculate rope origin in solver space: + Vector3 origin = solver.transform.InverseTransformPoint(rope.transform.position); - /** - * Raycast against the scene to see if we can attach the hook to something. - */ - private void LaunchHook() - { + // update direction and distance to hook point: + Vector3 direction = hookAttachment.point - origin; + float distance = direction.magnitude; + direction.Normalize(); - // Get the mouse position in the scene, in the same XY plane as this object: - Vector3 mouse = Input.mousePosition; - mouse.z = transform.position.z - Camera.main.transform.position.z; - Vector3 mouseInScene = Camera.main.ScreenToWorldPoint(mouse); + // increase length: + currentLength += hookShootSpeed * Time.deltaTime; - // Get a ray from the character to the mouse: - Ray ray = new Ray(transform.position, mouseInScene - transform.position); - - // Raycast to see what we hit: - if (Physics.Raycast(ray, out hookAttachment)) + // if we have reached the desired length, break the loop: + if (currentLength >= distance) { - // We actually hit something, so attach the hook! - StartCoroutine(AttachHook()); + cursor.ChangeLength(distance); + break; } - } + // change rope length (clamp to distance between rope origin and hook to avoid overshoot) + cursor.ChangeLength(Mathf.Min(distance, currentLength)); - private void LayParticlesInStraightLine(Vector3 origin, Vector3 direction) - { - // placing all particles in a straight line, respecting rope length + // iterate over all particles in sequential order, placing them in a straight line while + // respecting element length: float length = 0; for (int i = 0; i < rope.elements.Count; ++i) { - int p1 = rope.elements[i].particle1; - int p2 = rope.elements[i].particle2; - - solver.prevPositions[p1] = solver.positions[p1] = origin + direction * length; + solver.positions[rope.elements[i].particle1] = origin + direction * length; + solver.positions[rope.elements[i].particle2] = origin + direction * (length + rope.elements[i].restLength); length += rope.elements[i].restLength; - solver.prevPositions[p2] = solver.positions[p2] = origin + direction * length; - } - } - - private IEnumerator AttachHook() - { - yield return null; - - // Clear pin constraints: - var pinConstraints = rope.GetConstraintsByType(Oni.ConstraintType.Pin) as ObiConstraints; - pinConstraints.Clear(); - - Vector3 localHit = rope.transform.InverseTransformPoint(hookAttachment.point); - - // Procedurally generate the rope path (just a short segment, as we will extend it over time): - int filter = ObiUtils.MakeFilter(ObiUtils.CollideWithEverything, 0); - blueprint.path.Clear(); - blueprint.path.AddControlPoint(Vector3.zero, Vector3.zero, Vector3.zero, Vector3.up, 0.1f, 0.1f, 1, filter, Color.white, "Hook start"); - blueprint.path.AddControlPoint(localHit.normalized * 0.5f, Vector3.zero, Vector3.zero, Vector3.up, 0.1f, 0.1f, 1, filter, Color.white, "Hook end"); - blueprint.path.FlushEvents(); - - // Generate the particle representation of the rope (wait until it has finished): - yield return blueprint.Generate(); - - // Set the blueprint (this adds particles/constraints to the solver and starts simulating them). - rope.ropeBlueprint = blueprint; - rope.GetComponent().enabled = true; - - // wait for the solver to load the rope, after the next physics step: - yield return new WaitForFixedUpdate(); - yield return null; - - // set masses to zero, as we're going to override positions while we extend the rope: - for (int i = 0; i < rope.activeParticleCount; ++i) - solver.invMasses[rope.solverIndices[i]] = 0; - - // while the last particle hasn't reached the hit, extend the rope: - Vector3 origin; - Vector3 direction; - - while (true) - { - // calculate rope origin in solver space: - origin = solver.transform.InverseTransformPoint(rope.transform.position); - - // update direction and distance to hook point: - direction = solver.transform.InverseTransformPoint(hookAttachment.point) - origin; - float distance = direction.magnitude; - direction.Normalize(); - - LayParticlesInStraightLine(origin, direction); - - // increase length: - float distanceLeft = distance - cursor.ChangeLength(hookShootSpeed * Time.deltaTime); - - // if we have exceeded the desired length, correct it and break the loop: - if (distanceLeft < 0) - { - cursor.ChangeLength(distanceLeft); - break; - } - - // wait for next frame: - yield return null; } - // wait for the last length change to take effect, and ensure the rope is straight: - yield return new WaitForFixedUpdate(); + // wait one frame: yield return null; - LayParticlesInStraightLine(origin, direction); - - // restore masses so that the simulation takes over now that the rope is in place: - for (int i = 0; i < rope.activeParticleCount; ++i) - solver.invMasses[rope.solverIndices[i]] = 10; // 1/0.1 = 10 - - // Pin both ends of the rope (this enables two-way interaction between character and rope): - var batch = new ObiPinConstraintsBatch(); - batch.AddConstraint(rope.elements[0].particle1, character, transform.localPosition, Quaternion.identity, 0, 0); - batch.AddConstraint(rope.elements[rope.elements.Count - 1].particle2, hookAttachment.collider.GetComponent(), - hookAttachment.collider.transform.InverseTransformPoint(hookAttachment.point), Quaternion.identity, 0, 0); - batch.activeConstraintCount = 2; - pinConstraints.AddBatch(batch); - - rope.SetConstraintsDirty(Oni.ConstraintType.Pin); } - private void DetachHook() + // restore masses so that the simulation takes over now that the rope is in place: + for (int i = 0; i < rope.activeParticleCount; ++i) + solver.invMasses[rope.solverIndices[i]] = 10; // 1/0.1 = 10 + + // Pin both ends of the rope (this enables two-way interaction between character and rope): + var batch = new ObiPinConstraintsBatch(); + batch.AddConstraint(rope.elements[0].particle1, character, transform.localPosition, Quaternion.identity, 0, 0, float.PositiveInfinity); + batch.AddConstraint(rope.elements[rope.elements.Count-1].particle2, hookAttachment.collider.GetComponent(), + hookAttachment.collider.transform.InverseTransformPoint(hookAttachment.point), Quaternion.identity, 0, 0, float.PositiveInfinity); + batch.activeConstraintCount = 2; + pinConstraints.AddBatch(batch); + + rope.SetConstraintsDirty(Oni.ConstraintType.Pin); + } + + private void DetachHook() + { + // Set the rope blueprint to null (automatically removes the previous blueprint from the solver, if any). + rope.ropeBlueprint = null; + rope.GetComponent().enabled = false; + } + + + void Update() + { + + if (Input.GetMouseButtonDown(0)) { - // Set the rope blueprint to null (automatically removes the previous blueprint from the solver, if any). - rope.ropeBlueprint = null; - rope.GetComponent().enabled = false; + if (!rope.isLoaded) + LaunchHook(); + else + DetachHook(); } - - void Update() + if (rope.isLoaded) { - - if (Input.GetMouseButtonDown(0)) + if (Input.GetKey(KeyCode.W)) { - if (!rope.isLoaded) - LaunchHook(); - else - DetachHook(); + cursor.ChangeLength(rope.restLength - hookExtendRetractSpeed * Time.deltaTime); } - - if (rope.isLoaded) + if (Input.GetKey(KeyCode.S)) { - if (Input.GetKey(KeyCode.W)) - { - cursor.ChangeLength(-hookExtendRetractSpeed * Time.deltaTime); - } - if (Input.GetKey(KeyCode.S)) - { - cursor.ChangeLength(hookExtendRetractSpeed * Time.deltaTime); - } + cursor.ChangeLength(rope.restLength + hookExtendRetractSpeed * Time.deltaTime); } } } -} \ No newline at end of file +} diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/GrapplingHook.cs b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/GrapplingHook.cs index b3448a132..0587a463f 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/GrapplingHook.cs +++ b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/GrapplingHook.cs @@ -1,6 +1,7 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; +using Obi; /** * Sample component that shows how to use Obi Rope to create a grappling hook for a 2.5D game. @@ -14,142 +15,138 @@ using UnityEngine; * If complex interaction is required with the scene, a purely geometry-based approach (ala Worms ninja rope) can * be the right choice under certain circumstances. */ - -namespace Obi.Samples +public class GrapplingHook : MonoBehaviour { - public class GrapplingHook : MonoBehaviour + + public ObiSolver solver; + public ObiCollider character; + public float hookExtendRetractSpeed = 2; + public Material material; + public ObiRopeSection section; + + private ObiRope rope; + private ObiRopeBlueprint blueprint; + private ObiRopeExtrudedRenderer ropeRenderer; + + private ObiRopeCursor cursor; + + private RaycastHit hookAttachment; + + void Awake() { - public ObiSolver solver; - public ObiCollider character; - public float hookExtendRetractSpeed = 2; - public Material material; - public ObiRopeSection section; + // Create both the rope and the solver: + rope = gameObject.AddComponent(); + ropeRenderer = gameObject.AddComponent(); + ropeRenderer.section = section; + ropeRenderer.uvScale = new Vector2(1, 4); + ropeRenderer.normalizeV = false; + ropeRenderer.uvAnchor = 1; + rope.GetComponent().material = material; - private ObiRope rope; - private ObiRopeBlueprint blueprint; - private ObiRopeExtrudedRenderer ropeRenderer; + // Setup a blueprint for the rope: + blueprint = ScriptableObject.CreateInstance(); + blueprint.resolution = 0.5f; - private ObiRopeCursor cursor; + // Tweak rope parameters: + rope.maxBending = 0.02f; - private RaycastHit hookAttachment; + // Add a cursor to be able to change rope length: + cursor = rope.gameObject.AddComponent(); + cursor.cursorMu = 0; + cursor.direction = true; + } - void Awake() + private void OnDestroy() + { + DestroyImmediate(blueprint); + } + + /** + * Raycast against the scene to see if we can attach the hook to something. + */ + private void LaunchHook() + { + + // Get the mouse position in the scene, in the same XY plane as this object: + Vector3 mouse = Input.mousePosition; + mouse.z = transform.position.z - Camera.main.transform.position.z; + Vector3 mouseInScene = Camera.main.ScreenToWorldPoint(mouse); + + // Get a ray from the character to the mouse: + Ray ray = new Ray(transform.position, mouseInScene - transform.position); + + // Raycast to see what we hit: + if (Physics.Raycast(ray, out hookAttachment)) { - - // Create both the rope and the solver: - rope = gameObject.AddComponent(); - ropeRenderer = gameObject.AddComponent(); - ropeRenderer.section = section; - ropeRenderer.uvScale = new Vector2(1, 4); - ropeRenderer.normalizeV = false; - ropeRenderer.uvAnchor = 1; - rope.GetComponent().material = material; - - // Setup a blueprint for the rope: - blueprint = ScriptableObject.CreateInstance(); - blueprint.resolution = 0.5f; - - // Tweak rope parameters: - rope.maxBending = 0.02f; - - // Add a cursor to be able to change rope length: - cursor = rope.gameObject.AddComponent(); - cursor.cursorMu = 0; - cursor.direction = true; + // We actually hit something, so attach the hook! + StartCoroutine(AttachHook()); } - private void OnDestroy() + } + + private IEnumerator AttachHook() + { + yield return 0; + Vector3 localHit = rope.transform.InverseTransformPoint(hookAttachment.point); + + int filter = ObiUtils.MakeFilter(ObiUtils.CollideWithEverything,0); + + // Procedurally generate the rope path (a simple straight line): + blueprint.path.Clear(); + blueprint.path.AddControlPoint(Vector3.zero, -localHit.normalized, localHit.normalized, Vector3.up, 0.1f, 0.1f, 1, filter, Color.white, "Hook start"); + blueprint.path.AddControlPoint(localHit, -localHit.normalized, localHit.normalized, Vector3.up, 0.1f, 0.1f, 1, filter, Color.white, "Hook end"); + blueprint.path.FlushEvents(); + + // Generate the particle representation of the rope (wait until it has finished): + yield return blueprint.Generate(); + + // Set the blueprint (this adds particles/constraints to the solver and starts simulating them). + rope.ropeBlueprint = blueprint; + rope.GetComponent().enabled = true; + + // Pin both ends of the rope (this enables two-way interaction between character and rope): + var pinConstraints = rope.GetConstraintsByType(Oni.ConstraintType.Pin) as ObiConstraints; + pinConstraints.Clear(); + var batch = new ObiPinConstraintsBatch(); + batch.AddConstraint(rope.solverIndices[0], character, transform.localPosition, Quaternion.identity, 0, 0, float.PositiveInfinity); + batch.AddConstraint(rope.solverIndices[blueprint.activeParticleCount - 1], hookAttachment.collider.GetComponent(), + hookAttachment.collider.transform.InverseTransformPoint(hookAttachment.point), Quaternion.identity, 0, 0, float.PositiveInfinity); + batch.activeConstraintCount = 2; + pinConstraints.AddBatch(batch); + + rope.SetConstraintsDirty(Oni.ConstraintType.Pin); + } + + private void DetachHook() + { + // Set the rope blueprint to null (automatically removes the previous blueprint from the solver, if any). + rope.ropeBlueprint = null; + rope.GetComponent().enabled = false; + } + + + void Update() + { + + if (Input.GetMouseButtonDown(0)) { - DestroyImmediate(blueprint); + if (!rope.isLoaded) + LaunchHook(); + else + DetachHook(); } - /** - * Raycast against the scene to see if we can attach the hook to something. - */ - private void LaunchHook() + if (rope.isLoaded) { - - // Get the mouse position in the scene, in the same XY plane as this object: - Vector3 mouse = Input.mousePosition; - mouse.z = transform.position.z - Camera.main.transform.position.z; - Vector3 mouseInScene = Camera.main.ScreenToWorldPoint(mouse); - - // Get a ray from the character to the mouse: - Ray ray = new Ray(transform.position, mouseInScene - transform.position); - - // Raycast to see what we hit: - if (Physics.Raycast(ray, out hookAttachment)) + if (Input.GetKey(KeyCode.W)) { - // We actually hit something, so attach the hook! - StartCoroutine(AttachHook()); + cursor.ChangeLength(rope.restLength - hookExtendRetractSpeed * Time.deltaTime); } - - } - - private IEnumerator AttachHook() - { - yield return 0; - Vector3 localHit = rope.transform.InverseTransformPoint(hookAttachment.point); - - int filter = ObiUtils.MakeFilter(ObiUtils.CollideWithEverything, 0); - - // Procedurally generate the rope path (a simple straight line): - blueprint.path.Clear(); - blueprint.path.AddControlPoint(Vector3.zero, -localHit.normalized, localHit.normalized, Vector3.up, 0.1f, 0.1f, 1, filter, Color.white, "Hook start"); - blueprint.path.AddControlPoint(localHit, -localHit.normalized, localHit.normalized, Vector3.up, 0.1f, 0.1f, 1, filter, Color.white, "Hook end"); - blueprint.path.FlushEvents(); - - // Generate the particle representation of the rope (wait until it has finished): - yield return blueprint.Generate(); - - // Set the blueprint (this adds particles/constraints to the solver and starts simulating them). - rope.ropeBlueprint = blueprint; - rope.GetComponent().enabled = true; - - // Pin both ends of the rope (this enables two-way interaction between character and rope): - var pinConstraints = rope.GetConstraintsByType(Oni.ConstraintType.Pin) as ObiConstraints; - pinConstraints.Clear(); - var batch = new ObiPinConstraintsBatch(); - batch.AddConstraint(rope.solverIndices[0], character, transform.localPosition, Quaternion.identity, 0, 0); - batch.AddConstraint(rope.solverIndices[blueprint.activeParticleCount - 1], hookAttachment.collider.GetComponent(), - hookAttachment.collider.transform.InverseTransformPoint(hookAttachment.point), Quaternion.identity, 0, 0); - batch.activeConstraintCount = 2; - pinConstraints.AddBatch(batch); - - rope.SetConstraintsDirty(Oni.ConstraintType.Pin); - } - - private void DetachHook() - { - // Set the rope blueprint to null (automatically removes the previous blueprint from the solver, if any). - rope.ropeBlueprint = null; - rope.GetComponent().enabled = false; - } - - - void Update() - { - - if (Input.GetMouseButtonDown(0)) + if (Input.GetKey(KeyCode.S)) { - if (!rope.isLoaded) - LaunchHook(); - else - DetachHook(); - } - - if (rope.isLoaded) - { - if (Input.GetKey(KeyCode.W)) - { - cursor.ChangeLength(rope.restLength - hookExtendRetractSpeed * Time.deltaTime); - } - if (Input.GetKey(KeyCode.S)) - { - cursor.ChangeLength(rope.restLength + hookExtendRetractSpeed * Time.deltaTime); - } + cursor.ChangeLength(rope.restLength + hookExtendRetractSpeed * Time.deltaTime); } } } -} \ No newline at end of file +} diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/HighlightCollidingRopes.cs b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/HighlightCollidingRopes.cs deleted file mode 100644 index a988cbd94..000000000 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/HighlightCollidingRopes.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace Obi.Samples -{ - public class HighlightCollidingRopes : MonoBehaviour - { - public void Highlight(ActorActorCollisionDetector.ActorPair pair) - { - if (pair.actorA.TryGetComponent(out ActorBlinker blinkerA)) blinkerA.Blink(pair.particleA); - if (pair.actorB.TryGetComponent(out ActorBlinker blinkerB)) blinkerB.Blink(pair.particleB); - } - } -} diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/HighlightCollidingRopes.cs.meta b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/HighlightCollidingRopes.cs.meta deleted file mode 100644 index 1eb72df78..000000000 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/HighlightCollidingRopes.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 50979842bbc734acdb11f0f01062fe92 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/HosePump.cs b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/HosePump.cs index 5f5311d80..94080fc91 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/HosePump.cs +++ b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/HosePump.cs @@ -1,84 +1,83 @@ using UnityEngine; +using Obi; -namespace Obi.Samples -{ - [RequireComponent(typeof(ObiRope))] - public class HosePump : MonoBehaviour + +[RequireComponent(typeof(ObiRope))] +public class HosePump : MonoBehaviour { + + [Header("Bulge controls")] + public float pumpSpeed = 5; + public float bulgeFrequency = 3; + public float baseThickness = 0.04f; + public float bulgeThickness = 0.06f; + public Color bulgeColor = Color.cyan; + + [Header("Flow controls")] + public ParticleSystem waterEmitter; + public float flowSpeedMin = 0.5f; + public float flowSpeedMax = 7; + public float minEmitRate = 100; + public float maxEmitRate = 1000; + + private ObiRope rope; + public ObiPathSmoother smoother; + private float time = 0; + + void OnEnable() { + rope = GetComponent(); + smoother = GetComponent(); + rope.OnBeginStep += Rope_OnBeginStep; + } + void OnDisable() + { + rope.OnBeginStep -= Rope_OnBeginStep; + } - [Header("Bulge controls")] - public float pumpSpeed = 5; - public float bulgeFrequency = 3; - public float baseThickness = 0.04f; - public float bulgeThickness = 0.06f; - public Color bulgeColor = Color.cyan; + private void Rope_OnBeginStep(ObiActor actor, float stepTime) + { + time += stepTime * pumpSpeed; - [Header("Flow controls")] - public ParticleSystem waterEmitter; - public float flowSpeedMin = 0.5f; - public float flowSpeedMax = 7; - public float minEmitRate = 100; - public float maxEmitRate = 1000; + float distance = 0; + float sine = 0; - private ObiRope rope; - public ObiPathSmoother smoother; - private float time = 0; - - void OnEnable() + // iterate over all particles, changing their radius and color based on a sine wave: + // (note this would not support resizable / cuttable ropes, to add support for that use rope.elements instead) + for (int i = 0; i < rope.solverIndices.Length; ++i) { - rope = GetComponent(); - smoother = GetComponent(); - rope.OnSimulationStart += Rope_OnBeginStep; - } - void OnDisable() - { - rope.OnSimulationStart -= Rope_OnBeginStep; - } + int solverIndex = rope.solverIndices[i]; - private void Rope_OnBeginStep(ObiActor actor, float stepTime, float substepTime) - { - time += stepTime * pumpSpeed; - - float distance = 0; - float sine = 0; - - // iterate over all particles, changing their radius and color based on a sine wave: - // (note this would not support resizable / cuttable ropes, to add support for that use rope.elements instead) - for (int i = 0; i < rope.solverIndices.count; ++i) + if (i > 0) { - int solverIndex = rope.solverIndices[i]; - - if (i > 0) - { - int previousIndex = rope.solverIndices[i - 1]; - distance += Vector3.Distance(rope.solver.positions[solverIndex], rope.solver.positions[previousIndex]); - } - - sine = Mathf.Max(0, Mathf.Sin(distance * bulgeFrequency - time)); - - rope.solver.principalRadii[solverIndex] = Vector3.one * Mathf.Lerp(baseThickness, bulgeThickness, sine); - rope.solver.colors[solverIndex] = Color.Lerp(Color.white, bulgeColor, sine); + int previousIndex = rope.solverIndices[i - 1]; + distance += Vector3.Distance(rope.solver.positions[solverIndex],rope.solver.positions[previousIndex]); } - // change particle emission rate/speed based on sine wave at the last particle: - if (waterEmitter != null) - { - var main = waterEmitter.main; - main.startSpeed = Mathf.Lerp(flowSpeedMin, flowSpeedMax, sine); + sine = Mathf.Max(0, Mathf.Sin(distance * bulgeFrequency - time)); - var emission = waterEmitter.emission; - emission.rateOverTime = Mathf.Lerp(minEmitRate, maxEmitRate, sine); - } + rope.solver.principalRadii[solverIndex] = Vector3.one * Mathf.Lerp(baseThickness,bulgeThickness, sine); + rope.solver.colors[solverIndex] = Color.Lerp(Color.white, bulgeColor, sine); } - public void LateUpdate() + // change particle emission rate/speed based on sine wave at the last particle: + if (waterEmitter != null) { - if (smoother != null && waterEmitter != null) - { - ObiPathFrame section = smoother.GetSectionAt(1); - waterEmitter.transform.position = rope.solver.transform.TransformPoint(section.position); - waterEmitter.transform.rotation = rope.solver.transform.rotation * (Quaternion.LookRotation(section.tangent, section.binormal)); - } + var main = waterEmitter.main; + main.startSpeed = Mathf.Lerp(flowSpeedMin,flowSpeedMax,sine); + + var emission = waterEmitter.emission; + emission.rateOverTime = Mathf.Lerp(minEmitRate, maxEmitRate, sine); } } -} + + public void LateUpdate() + { + if (smoother != null && waterEmitter != null) + { + ObiPathFrame section = smoother.GetSectionAt(1); + waterEmitter.transform.position = transform.TransformPoint(section.position); + waterEmitter.transform.rotation = transform.rotation * (Quaternion.LookRotation(section.tangent, section.binormal)); + } + } +} + diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/PinholeRatchet.cs b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/PinholeRatchet.cs deleted file mode 100644 index 57bd1d835..000000000 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/PinholeRatchet.cs +++ /dev/null @@ -1,50 +0,0 @@ -using UnityEngine; - -namespace Obi.Samples -{ - public class PinholeRatchet : MonoBehaviour - { - public ObiPinhole pinhole; - public bool direction = false; - public float teethSeparation = 0.1f; - - public float distanceToNextTooth { get; private set; } - - void Update() - { - if (pinhole == null || pinhole.rope == null) - return; - - float restLength = (pinhole.rope as ObiRopeBase).restLength; - float normalizedTeethDistance = Mathf.Max(0.001f, teethSeparation / restLength); - var range = pinhole.range; - - if (direction) - { - distanceToNextTooth = (range.y - pinhole.position) * restLength; - while (distanceToNextTooth > teethSeparation) - { - range.y -= normalizedTeethDistance; - distanceToNextTooth -= teethSeparation; - } - } - else - { - distanceToNextTooth = (pinhole.position - range.x) * restLength; - while (distanceToNextTooth > teethSeparation) - { - range.x += normalizedTeethDistance; - distanceToNextTooth -= teethSeparation; - } - } - - pinhole.range = range; - } - - public void OnDisable() - { - if (pinhole != null) - pinhole.range = new Vector2(0, 1); - } - } -} diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/PinholeRatchet.cs.meta b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/PinholeRatchet.cs.meta deleted file mode 100644 index ec6fb16e1..000000000 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/PinholeRatchet.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: de82c5da5889a437bbca59463285c6a3 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RatchetController.cs b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RatchetController.cs deleted file mode 100644 index 59ab5a77d..000000000 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RatchetController.cs +++ /dev/null @@ -1,23 +0,0 @@ -using UnityEngine; - -namespace Obi.Samples -{ - public class RatchetController : MonoBehaviour - { - public PinholeRatchet ratchet; - - public Transform ratchetVisualizer; - public float minAngle = 0; - public float maxAngle = 25; - - void Update() - { - if (Input.GetKeyDown(KeyCode.Space)) - ratchet.enabled = !ratchet.enabled; - - float angle = ratchet.enabled ? Mathf.LerpAngle(minAngle, maxAngle, ratchet.distanceToNextTooth / ratchet.teethSeparation) : maxAngle; - ratchetVisualizer.rotation = Quaternion.AngleAxis(angle, Vector3.forward); - } - - } -} \ No newline at end of file diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RatchetController.cs.meta b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RatchetController.cs.meta deleted file mode 100644 index 9c4b951ee..000000000 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RatchetController.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 89f7ec50c6e36440593469d980ba7830 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RenderLineBetweenTransforms.cs b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RenderLineBetweenTransforms.cs deleted file mode 100644 index 867d08d66..000000000 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RenderLineBetweenTransforms.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace Obi.Samples -{ - [RequireComponent(typeof(LineRenderer))] - public class RenderLineBetweenTransforms : MonoBehaviour - { - public Transform transformA; - public Transform transformB; - LineRenderer line; - - void Awake() - { - line = GetComponent(); - } - - void Update() - { - if (transformA != null && transformB != null) - line.SetPositions(new Vector3[] { transformA.position, transformB.position }); - } - } -} diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RenderLineBetweenTransforms.cs.meta b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RenderLineBetweenTransforms.cs.meta deleted file mode 100644 index fe9c79383..000000000 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RenderLineBetweenTransforms.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 411d9eba4bb0042bf9302873985bc6e0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RopeBetweenTwoPoints.cs b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RopeBetweenTwoPoints.cs index bd01b8f3c..c747f40ca 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RopeBetweenTwoPoints.cs +++ b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RopeBetweenTwoPoints.cs @@ -1,71 +1,63 @@ using UnityEngine; +using Obi; -namespace Obi.Samples +public class RopeBetweenTwoPoints : MonoBehaviour { - public class RopeBetweenTwoPoints : MonoBehaviour + public Transform start; + public Transform end; + public ObiSolver solver; + + void Start() { - public Transform start; - public Transform end; - public ObiSolver solver; + // Generate rope synchronously: + Generate(); + } - public bool fixedParticleCount = true; - public int numParticles = 5; - - void Start() + void Generate() + { + if (start != null && end != null) { - // Generate rope synchronously: - Generate(); - } + // Adjust our transform: + transform.position = (start.position + end.position) / 2; + transform.rotation = Quaternion.FromToRotation(Vector3.right, end.position - start.position); - void Generate() - { - if (start != null && end != null) - { - // Adjust our transform: - transform.position = (start.position + end.position) / 2; - transform.rotation = Quaternion.FromToRotation(Vector3.right, end.position - start.position); + // Calculate control point positions and tangent vector: + Vector3 startPositionLS = transform.InverseTransformPoint(start.position); + Vector3 endPositionLS = transform.InverseTransformPoint(end.position); + Vector3 tangentLS = (endPositionLS - startPositionLS).normalized; - // Calculate control point positions and tangent vector: - Vector3 startPositionLS = transform.InverseTransformPoint(start.position); - Vector3 endPositionLS = transform.InverseTransformPoint(end.position); - Vector3 tangentLS = (endPositionLS - startPositionLS).normalized; + // Create the blueprint: + var blueprint = ScriptableObject.CreateInstance(); - // Create the blueprint: - var blueprint = ScriptableObject.CreateInstance(); + // Build the rope path: + int filter = ObiUtils.MakeFilter(ObiUtils.CollideWithEverything, 0); + blueprint.path.AddControlPoint(startPositionLS, -tangentLS, tangentLS, Vector3.up, 0.1f, 0.1f, 1, filter, Color.white, "start"); + blueprint.path.AddControlPoint(endPositionLS, -tangentLS, tangentLS, Vector3.up, 0.1f, 0.1f, 1, filter, Color.white, "end"); + blueprint.path.FlushEvents(); - // Build the rope path: - int filter = ObiUtils.MakeFilter(ObiUtils.CollideWithEverything, 0); - blueprint.path.AddControlPoint(startPositionLS, -tangentLS, tangentLS, Vector3.up, 0.1f, 0.1f, 1, filter, Color.white, "start"); - blueprint.path.AddControlPoint(endPositionLS, -tangentLS, tangentLS, Vector3.up, 0.1f, 0.1f, 1, filter, Color.white, "end"); - blueprint.path.FlushEvents(); + // Generate particles/constraints: + blueprint.GenerateImmediate(); - if (fixedParticleCount) - blueprint.resolution = numParticles / (blueprint.path.Length / blueprint.thickness); + // Add rope actor / renderer / attachment components: + var rope = gameObject.AddComponent(); + var ropeRenderer = gameObject.AddComponent(); + var attachment1 = gameObject.AddComponent(); + var attachment2 = gameObject.AddComponent(); - // Generate particles/constraints: - blueprint.GenerateImmediate(); + // Load the default rope section for rendering: + ropeRenderer.section = Resources.Load("DefaultRopeSection"); - // Add rope actor / renderer / attachment components: - var rope = gameObject.AddComponent(); - var ropeRenderer = gameObject.AddComponent(); - var attachment1 = gameObject.AddComponent(); - var attachment2 = gameObject.AddComponent(); + // Set the blueprint: + rope.ropeBlueprint = blueprint; - // Load the default rope section for rendering: - ropeRenderer.section = Resources.Load("DefaultRopeSection"); + // Attach both ends: + attachment1.target = start; + attachment2.target = end; + attachment1.particleGroup = blueprint.groups[0]; + attachment2.particleGroup = blueprint.groups[1]; - // Set the blueprint: - rope.ropeBlueprint = blueprint; - - // Attach both ends: - attachment1.target = start; - attachment2.target = end; - attachment1.particleGroup = blueprint.groups[0]; - attachment2.particleGroup = blueprint.groups[1]; - - // Parent the actor under a solver to start the simulation: - transform.SetParent(solver.transform); - } + // Parent the actor under a solver to start the simulation: + transform.SetParent(solver.transform); } } } diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RopeNet.cs b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RopeNet.cs index d3be53849..3be681236 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RopeNet.cs +++ b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RopeNet.cs @@ -1,130 +1,129 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; +using Obi; -namespace Obi.Samples +/** + * Sample component that procedurally generates a net using rigidbodies and ropes. + */ +public class RopeNet : MonoBehaviour { - /** - * Sample component that procedurally generates a net using rigidbodies and ropes. - */ - public class RopeNet : MonoBehaviour + public Material material; + + public Vector2Int resolution = new Vector2Int(5, 5); + public Vector2 size = new Vector2(0.5f, 0.5f); + public float nodeSize = 0.2f; + + void Awake() { - public Material material; + // create an object containing both the solver and the updater: + GameObject solverObject = new GameObject("solver", typeof(ObiSolver), typeof(ObiFixedUpdater)); + ObiSolver solver = solverObject.GetComponent(); + ObiFixedUpdater updater = solverObject.GetComponent(); + updater.substeps = 2; - public Vector2Int resolution = new Vector2Int(5, 5); - public Vector2 size = new Vector2(0.5f, 0.5f); - public float nodeSize = 0.2f; + // adjust solver settings: + solver.particleCollisionConstraintParameters.enabled = false; + solver.distanceConstraintParameters.iterations = 8; + solver.pinConstraintParameters.iterations = 4; + solver.parameters.sleepThreshold = 0.001f; + solver.PushSolverParameters(); - void Awake() + // add the solver to the updater: + updater.solvers.Add(solver); + + // create the net (ropes + rigidbodies) + CreateNet(solver); + } + + private void CreateNet(ObiSolver solver) + { + ObiCollider[,] nodes = new ObiCollider[resolution.x + 1, resolution.y + 1]; + + for (int x = 0; x <= resolution.x; ++x) { - // create an object containing both the solver and the updater: - GameObject solverObject = new GameObject("solver", typeof(ObiSolver)); - ObiSolver solver = solverObject.GetComponent(); - solver.substeps = 2; - - // adjust solver settings: - solver.particleCollisionConstraintParameters.enabled = false; - solver.distanceConstraintParameters.iterations = 8; - solver.pinConstraintParameters.iterations = 4; - solver.parameters.sleepThreshold = 0.001f; - solver.PushSolverParameters(); - - // create the net (ropes + rigidbodies) - CreateNet(solver); - } - - private void CreateNet(ObiSolver solver) - { - ObiCollider[,] nodes = new ObiCollider[resolution.x + 1, resolution.y + 1]; - - for (int x = 0; x <= resolution.x; ++x) + for (int y = 0; y <= resolution.y; ++y) { - for (int y = 0; y <= resolution.y; ++y) - { - GameObject rb = GameObject.CreatePrimitive(PrimitiveType.Cube); - rb.transform.position = new Vector3(x, y, 0) * size; - rb.transform.localScale = new Vector3(nodeSize, nodeSize, nodeSize); + GameObject rb = GameObject.CreatePrimitive(PrimitiveType.Cube); + rb.AddComponent(); + rb.transform.position = new Vector3(x, y, 0) * size; + rb.transform.localScale = new Vector3(nodeSize, nodeSize, nodeSize); - rb.AddComponent(); - nodes[x, y] = rb.AddComponent(); - nodes[x, y].Filter = 1; - } - } - - nodes[0, resolution.y].GetComponent().isKinematic = true; - nodes[resolution.x, resolution.y].GetComponent().isKinematic = true; - - for (int x = 0; x <= resolution.x; ++x) - { - for (int y = 0; y <= resolution.y; ++y) - { - Vector3 pos = new Vector3(x, y, 0) * size; - if (x < resolution.x) - { - Vector3 offset = new Vector3(nodeSize * 0.5f, 0, 0); - var rope = CreateRope(pos + offset, pos + new Vector3(size.x, 0, 0) - offset); - rope.transform.parent = solver.transform; - - PinRope(rope, nodes[x, y], nodes[x + 1, y]); - } - - if (y < resolution.y) - { - Vector3 offset = new Vector3(0, nodeSize * 0.5f, 0); - var rope = CreateRope(pos + offset, pos + new Vector3(0, size.y, 0) - offset); - rope.transform.parent = solver.transform; - - PinRope(rope, nodes[x, y], nodes[x, y + 1]); - } - } + nodes[x, y] = rb.AddComponent(); + nodes[x, y].Filter = 1; } } - private void PinRope(ObiRope rope, ObiCollider bodyA, ObiCollider bodyB) + nodes[0, resolution.y].GetComponent().isKinematic = true; + nodes[resolution.x, resolution.y].GetComponent().isKinematic = true; + + for (int x = 0; x <= resolution.x; ++x) { - var A = rope.gameObject.AddComponent(); - var B = rope.gameObject.AddComponent(); + for (int y = 0; y <= resolution.y; ++y) + { + Vector3 pos = new Vector3(x, y, 0) * size; + if (x < resolution.x) + { + Vector3 offset = new Vector3(nodeSize * 0.5f, 0, 0); + var rope = CreateRope(pos + offset, pos + new Vector3(size.x, 0, 0) - offset); + rope.transform.parent = solver.transform; - A.attachmentType = ObiParticleAttachment.AttachmentType.Dynamic; - B.attachmentType = ObiParticleAttachment.AttachmentType.Dynamic; + PinRope(rope, nodes[x, y], nodes[x + 1, y], new Vector3(0.5f, 0, 0), -new Vector3(0.5f, 0, 0)); + } - A.target = bodyA.transform; - B.target = bodyB.transform; + if (y < resolution.y) + { + Vector3 offset = new Vector3(0, nodeSize * 0.5f, 0); + var rope = CreateRope(pos + offset, pos + new Vector3(0, size.y, 0) - offset); + rope.transform.parent = solver.transform; - A.particleGroup = rope.ropeBlueprint.groups[0]; - B.particleGroup = rope.ropeBlueprint.groups[1]; - } - - // Creates a rope between two points in world space: - private ObiRope CreateRope(Vector3 pointA, Vector3 pointB) - { - // Create a rope - var ropeObject = new GameObject("solver", typeof(ObiRope), typeof(ObiRopeLineRenderer)); - var rope = ropeObject.GetComponent(); - var ropeRenderer = ropeObject.GetComponent(); - rope.GetComponent().material = material; - rope.GetComponent().decimation = 0.1f; - ropeRenderer.uvScale = new Vector2(1, 5); - - // Setup a blueprint for the rope: - var blueprint = ScriptableObject.CreateInstance(); - blueprint.resolution = 0.15f; - blueprint.thickness = 0.02f; - blueprint.pooledParticles = 0; - - // convert both points to the rope's local space: - pointA = rope.transform.InverseTransformPoint(pointA); - pointB = rope.transform.InverseTransformPoint(pointB); - - // Procedurally generate the rope path (a simple straight line): - Vector3 direction = (pointB - pointA) * 0.25f; - blueprint.path.Clear(); - blueprint.path.AddControlPoint(pointA, -direction, direction, Vector3.up, 0.1f, 0.1f, 1, 1, Color.white, "A"); - blueprint.path.AddControlPoint(pointB, -direction, direction, Vector3.up, 0.1f, 0.1f, 1, 1, Color.white, "B"); - blueprint.path.FlushEvents(); - - rope.ropeBlueprint = blueprint; - return rope; + PinRope(rope, nodes[x, y], nodes[x, y + 1], new Vector3(0, 0.5f, 0), -new Vector3(0, 0.5f, 0)); + } + } } } + + private void PinRope(ObiRope rope, ObiCollider bodyA, ObiCollider bodyB, Vector3 offsetA, Vector3 offsetB) + { + // Pin both ends of the rope (this enables two-way interaction between character and rope): + var pinConstraints = rope.GetConstraintsByType(Oni.ConstraintType.Pin) as ObiConstraints; + pinConstraints.Clear(); + var batch = new ObiPinConstraintsBatch(); + batch.AddConstraint(rope.solverIndices[0], bodyA, offsetA, Quaternion.identity, 0, 999, float.PositiveInfinity); + batch.AddConstraint(rope.solverIndices[rope.activeParticleCount - 1], bodyB, offsetB, Quaternion.identity, 0, 999, float.PositiveInfinity); + batch.activeConstraintCount = 2; + pinConstraints.AddBatch(batch); + } + + // Creates a rope between two points in world space: + private ObiRope CreateRope(Vector3 pointA, Vector3 pointB) + { + // Create a rope + var ropeObject = new GameObject("solver", typeof(ObiRope), typeof(ObiRopeLineRenderer)); + var rope = ropeObject.GetComponent(); + var ropeRenderer = ropeObject.GetComponent(); + rope.GetComponent().material = material; + rope.GetComponent().decimation = 0.1f; + ropeRenderer.uvScale = new Vector2(1, 5); + + // Setup a blueprint for the rope: + var blueprint = ScriptableObject.CreateInstance(); + blueprint.resolution = 0.15f; + blueprint.thickness = 0.02f; + blueprint.pooledParticles = 0; + + // convert both points to the rope's local space: + pointA = rope.transform.InverseTransformPoint(pointA); + pointB = rope.transform.InverseTransformPoint(pointB); + + // Procedurally generate the rope path (a simple straight line): + Vector3 direction = (pointB - pointA) * 0.25f; + blueprint.path.Clear(); + blueprint.path.AddControlPoint(pointA, -direction, direction, Vector3.up, 0.1f, 0.1f, 1, 1, Color.white, "A"); + blueprint.path.AddControlPoint(pointB, -direction, direction, Vector3.up, 0.1f, 0.1f, 1, 1, Color.white, "B"); + blueprint.path.FlushEvents(); + + rope.ropeBlueprint = blueprint; + return rope; + } } diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RopeSweepCut.cs b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RopeSweepCut.cs index d6bdd3649..80632c448 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RopeSweepCut.cs +++ b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RopeSweepCut.cs @@ -1,150 +1,127 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; +using Obi; -namespace Obi.Samples +[RequireComponent(typeof(ObiRope))] +public class RopeSweepCut : MonoBehaviour { - [RequireComponent(typeof(ObiRope))] - public class RopeSweepCut : MonoBehaviour + + public Camera cam; + + ObiRope rope; + LineRenderer lineRenderer; + Vector3 cutStartPosition; + + private void Awake() { + rope = GetComponent(); - public Camera cam; + AddMouseLine(); + } - ObiRope rope; - LineRenderer lineRenderer; - Vector3 cutStartPosition; - Vector3 cutEndPosition; - bool cut; + private void OnDestroy() + { + DeleteMouseLine(); + } - private void Awake() + private void AddMouseLine() + { + GameObject line = new GameObject("Mouse Line"); + lineRenderer = line.AddComponent(); + lineRenderer.startWidth = 0.005f; + lineRenderer.endWidth = 0.005f; + lineRenderer.numCapVertices = 2; + lineRenderer.sharedMaterial = new Material(Shader.Find("Unlit/Color")); + lineRenderer.sharedMaterial.color = Color.cyan; + lineRenderer.enabled = false; + } + + private void DeleteMouseLine() + { + if (lineRenderer != null) + Destroy(lineRenderer.gameObject); + } + + private void LateUpdate() + { + // do nothing if we don't have a camera to cut from. + if (cam == null) return; + + // process user input and cut the rope if necessary. + ProcessInput(); + } + + /** + * Very simple mouse-based input. Not ideal for multitouch screens as it only supports one finger, though. + */ + private void ProcessInput() + { + // When the user clicks the mouse, start a line cut: + if (Input.GetMouseButtonDown(0)) { - rope = GetComponent(); - AddMouseLine(); + cutStartPosition = Input.mousePosition; + lineRenderer.SetPosition(0, cam.ScreenToWorldPoint(new Vector3(cutStartPosition.x, cutStartPosition.y, 0.5f))); + lineRenderer.enabled = true; } - private void OnDestroy() - { - DeleteMouseLine(); - } + if (lineRenderer.enabled) + lineRenderer.SetPosition(1, cam.ScreenToWorldPoint(new Vector3(Input.mousePosition.x, Input.mousePosition.y, 0.5f))); - private void OnEnable() + // When the user lifts the mouse, proceed to cut. + if (Input.GetMouseButtonUp(0)) { - rope.OnSimulationStart += Rope_OnBeginSimulation; - } - - private void OnDisable() - { - rope.OnSimulationStart -= Rope_OnBeginSimulation; - } - - private void AddMouseLine() - { - GameObject line = new GameObject("Mouse Line"); - lineRenderer = line.AddComponent(); - lineRenderer.startWidth = 0.005f; - lineRenderer.endWidth = 0.005f; - lineRenderer.numCapVertices = 2; - lineRenderer.sharedMaterial = new Material(Shader.Find("Unlit/Color")); - lineRenderer.sharedMaterial.color = Color.cyan; + ScreenSpaceCut(cutStartPosition, Input.mousePosition); lineRenderer.enabled = false; } - - private void DeleteMouseLine() - { - if (lineRenderer != null) - Destroy(lineRenderer.gameObject); - } - - private void LateUpdate() - { - // do nothing if we don't have a camera to cut from. - if (cam == null) return; - - // process user input and cut the rope if necessary. - ProcessInput(); - } - - private void Rope_OnBeginSimulation(ObiActor actor, float stepTime, float substepTime) - { - if (cut) - { - ScreenSpaceCut(cutStartPosition, cutEndPosition); - cut = false; - } - } - - /** - * Very simple mouse-based input. Not ideal for multitouch screens as it only supports one finger, though. - */ - private void ProcessInput() - { - // When the user clicks the mouse, start a line cut: - if (Input.GetMouseButtonDown(0)) - { - cutStartPosition = Input.mousePosition; - lineRenderer.SetPosition(0, cam.ScreenToWorldPoint(new Vector3(cutStartPosition.x, cutStartPosition.y, 0.5f))); - lineRenderer.enabled = true; - } - - if (lineRenderer.enabled) - lineRenderer.SetPosition(1, cam.ScreenToWorldPoint(new Vector3(Input.mousePosition.x, Input.mousePosition.y, 0.5f))); - - // When the user lifts the mouse, proceed to cut. - if (Input.GetMouseButtonUp(0)) - { - cutEndPosition = Input.mousePosition; - lineRenderer.enabled = false; - cut = true; - } - } - - - /** - * Cuts the rope using a line segment, expressed in screen-space. - */ - private void ScreenSpaceCut(Vector2 lineStart, Vector2 lineEnd) - { - // keep track of whether the rope was cut or not. - bool ropeCut = false; - - // iterate over all elements and test them for intersection with the line: - for (int i = 0; i < rope.elements.Count; ++i) - { - // project the both ends of the element to screen space. - Vector3 screenPos1 = cam.WorldToScreenPoint(rope.solver.positions[rope.elements[i].particle1]); - Vector3 screenPos2 = cam.WorldToScreenPoint(rope.solver.positions[rope.elements[i].particle2]); - - // test if there's an intersection: - if (SegmentSegmentIntersection(screenPos1, screenPos2, lineStart, lineEnd, out float r, out float s)) - { - ropeCut = true; - rope.Tear(rope.elements[i]); - } - } - - // If the rope was cut at any point, rebuilt constraints: - if (ropeCut) rope.RebuildConstraintsFromElements(); - } - - /** - * line segment 1 is AB = A+r(B-A) - * line segment 2 is CD = C+s(D-C) - * if they intesect, then A+r(B-A) = C+s(D-C), solving for r and s gives the formula below. - * If both r and s are in the 0,1 range, it meant the segments intersect. - */ - private bool SegmentSegmentIntersection(Vector2 A, Vector2 B, Vector2 C, Vector2 D, out float r, out float s) - { - float denom = (B.x - A.x) * (D.y - C.y) - (B.y - A.y) * (D.x - C.x); - float rNum = (A.y - C.y) * (D.x - C.x) - (A.x - C.x) * (D.y - C.y); - float sNum = (A.y - C.y) * (B.x - A.x) - (A.x - C.x) * (B.y - A.y); - - if (Mathf.Approximately(rNum, 0) || Mathf.Approximately(denom, 0)) - { r = -1; s = -1; return false; } - - r = rNum / denom; - s = sNum / denom; - - return (r >= 0 && r <= 1 && s >= 0 && s <= 1); - } } -} \ No newline at end of file + + + /** + * Cuts the rope using a line segment, expressed in screen-space. + */ + private void ScreenSpaceCut(Vector2 lineStart, Vector2 lineEnd) + { + // keep track of whether the rope was cut or not. + bool cut = false; + + // iterate over all elements and test them for intersection with the line: + for (int i = 0; i < rope.elements.Count; ++i) + { + // project the both ends of the element to screen space. + Vector3 screenPos1 = cam.WorldToScreenPoint(rope.solver.positions[rope.elements[i].particle1]); + Vector3 screenPos2 = cam.WorldToScreenPoint(rope.solver.positions[rope.elements[i].particle2]); + + // test if there's an intersection: + if (SegmentSegmentIntersection(screenPos1, screenPos2, lineStart, lineEnd, out float r, out float s)) + { + cut = true; + rope.Tear(rope.elements[i]); + } + } + + // If the rope was cut at any point, rebuilt constraints: + if (cut) rope.RebuildConstraintsFromElements(); + } + + /** + * line segment 1 is AB = A+r(B-A) + * line segment 2 is CD = C+s(D-C) + * if they intesect, then A+r(B-A) = C+s(D-C), solving for r and s gives the formula below. + * If both r and s are in the 0,1 range, it meant the segments intersect. + */ + private bool SegmentSegmentIntersection(Vector2 A, Vector2 B, Vector2 C, Vector2 D, out float r, out float s) + { + float denom = (B.x - A.x) * (D.y - C.y) - (B.y - A.y) * (D.x - C.x); + float rNum = (A.y - C.y) * (D.x - C.x) - (A.x - C.x) * (D.y - C.y); + float sNum = (A.y - C.y) * (B.x - A.x) - (A.x - C.x) * (B.y - A.y); + + if (Mathf.Approximately(rNum, 0) || Mathf.Approximately(denom, 0)) + { r = -1; s = -1; return false; } + + r = rNum / denom; + s = sNum / denom; + + return (r >= 0 && r <=1 && s >= 0 && s <= 1); + } +} diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RopeTenser.cs b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RopeTenser.cs index 5e1aa2799..50312f401 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RopeTenser.cs +++ b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RopeTenser.cs @@ -2,16 +2,13 @@ using System.Collections.Generic; using UnityEngine; -namespace Obi.Samples +public class RopeTenser : MonoBehaviour { - public class RopeTenser : MonoBehaviour - { - public float force = 10; + public float force = 10; - // Update is called once per frame - void Update() - { - GetComponent().AddForce(Vector3.down * force); - } + // Update is called once per frame + void Update() + { + GetComponent().AddForce(Vector3.down * force); } } diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RopeTensionColorizer.cs b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RopeTensionColorizer.cs index 23a38d675..121f021ef 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RopeTensionColorizer.cs +++ b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RopeTensionColorizer.cs @@ -1,60 +1,56 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; +using Obi; -namespace Obi.Samples +[RequireComponent(typeof(ObiRope))] +[RequireComponent(typeof(MeshRenderer))] +public class RopeTensionColorizer : MonoBehaviour { - [RequireComponent(typeof(ObiRope))] - public class RopeTensionColorizer : MonoBehaviour + public float minTension = 0; + public float maxTension = 0.2f; + public Color normalColor = Color.green; + public Color tensionColor = Color.red; + + public RopeTenser tenser; + public float tenserThreshold = -5; + public float tenserMax = 0.1f; + + private ObiRope rope; + private Material localMaterial; + + void Awake() { - public float minTension = 0; - public float maxTension = 0.2f; - public Color normalColor = Color.green; - public Color tensionColor = Color.red; + rope = GetComponent(); + localMaterial = GetComponent().material; + } - public RopeTenser tenser; - public float tenserThreshold = -5; - public float tenserMax = 0.1f; + private void OnDestroy() + { + Destroy(localMaterial); + } - private ObiRope rope; - private Material localMaterial; + void Update() + { + if (tenser == null) + return; - void Awake() + // Calculate how much past the threshold the tenser is, clamp the excess to 1 + float tenserFactor = Mathf.Min((tenser.transform.position.y - tenserThreshold) / tenserMax,1); + + // Check if the tenser is above the threshold, if so then check rope tension: + if (tenserFactor > 0) { - rope = GetComponent(); - var rend = GetComponent(); - localMaterial = Instantiate(rend.material); - rend.material = localMaterial; + // Calculate current tension as ratio between current and rest length, then subtract 1 to center it at zero. + float tension = rope.CalculateLength() / rope.restLength - 1; + // Use tension to interpolate between colors: + float lerpFactor = (tension - minTension) / (maxTension - minTension); + localMaterial.color = Color.Lerp(normalColor, tensionColor, lerpFactor * tenserFactor); } - - private void OnDestroy() + else { - Destroy(localMaterial); - } - - void Update() - { - if (tenser == null) - return; - - // Calculate how much past the threshold the tenser is, clamp the excess to 1 - float tenserFactor = Mathf.Min((tenser.transform.position.y - tenserThreshold) / tenserMax, 1); - - // Check if the tenser is above the threshold, if so then check rope tension: - if (tenserFactor > 0) - { - // Calculate current tension as ratio between current and rest length, then subtract 1 to center it at zero. - float tension = rope.CalculateLength() / rope.restLength - 1; - - // Use tension to interpolate between colors: - float lerpFactor = (tension - minTension) / (maxTension - minTension); - localMaterial.color = Color.Lerp(normalColor, tensionColor, lerpFactor * tenserFactor); - } - else - { - localMaterial.color = normalColor; - } + localMaterial.color = normalColor; } } } diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RuntimeRopeGenerator.cs b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RuntimeRopeGenerator.cs new file mode 100644 index 000000000..3eb3ba6ca --- /dev/null +++ b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RuntimeRopeGenerator.cs @@ -0,0 +1,118 @@ +using System; +using System.Collections; +using UnityEngine; +using Obi; + +public class RuntimeRopeGenerator +{ + //private ObiRope rope; + //private ObiRopeCursor cursor; + private ObiSolver solver; + private int pinnedParticle = -1; + + /// + /// Creates a straight rope anchored to a transform at the top. + /// Transform may or may not move around and may or may not have a rigidbody. + /// When you call this the rope will appear in the scene and immediately interact with gravity and objects with ObiColliders. + /// Called from anywhere (main thread only) + /// + public IEnumerator MakeRope(Transform anchoredTo, Vector3 attachmentOffset, float ropeLength) + { + // create a new GameObject with the required components: a solver, a rope, and a curve. + // we also throw a cursor in to be able to change its length. + /*GameObject ropeObject = new GameObject("rope",typeof(ObiSolver), + typeof(ObiRope), + typeof(ObiCurve), + typeof (ObiRopeCursor)); + + // get references to all components: + rope = ropeObject.GetComponent(); + cursor = ropeObject.GetComponent(); + solver = ropeObject.GetComponent(); + ObiCurve path = ropeObject.GetComponent(); + + // set up component references (see ObiRopeHelper.cs) + rope.Solver = solver; + rope.ropePath = path; + //rope.section = Resources.Load("DefaultRopeSection"); + + // set path control points (duplicate end points, to set curvature as required by CatmullRom splines): + path.controlPoints.Clear(); + path.controlPoints.Add(new ObiCurve.ControlPoint(Vector3.zero,Vector3.up)); + path.controlPoints.Add(new ObiCurve.ControlPoint(Vector3.zero,Vector3.up)); + path.controlPoints.Add(new ObiCurve.ControlPoint(Vector3.down*ropeLength,Vector3.up)); + path.controlPoints.Add(new ObiCurve.ControlPoint(Vector3.down*ropeLength,Vector3.up)); + + rope.pooledParticles = 2000; + + // parent the rope to the anchor transform: + rope.transform.SetParent(anchoredTo,false); + rope.transform.localPosition = attachmentOffset; + + // generate particles/constraints and add them to the solver (see ObiRopeHelper.cs) + yield return rope.StartCoroutine(rope.GeneratePhysicRepresentationForMesh()); + rope.AddToSolver(null); + + // get the last particle in the rope at its rest state. + pinnedParticle = rope.UsedParticles-1; + + // add a tethers batch: + ObiTetherConstraintBatch tetherBatch = new ObiTetherConstraintBatch(true,false,0,1); + rope.TetherConstraints.AddBatch(tetherBatch); + //UpdateTethers(); + + // fix first particle in place (see http://obi.virtualmethodstudio.com/tutorials/scriptingparticles.html) + rope.Solver.invMasses[rope.particleIndices[0]] = rope.invMasses[0] = 0;*/ + yield return 0; + } + + /// + /// MakeRope and AddPendulum may NOT be called on the same frame. You must wait for the MakeRope coroutine to finish first, as creating a rope is an asynchronous operation. + /// Just adds a pendulum to the rope on the un-anchored end. + /// + public void AddPendulum(ObiCollider pendulum, Vector3 attachmentOffset) + { + // simply add a new pin constraint (see http://obi.virtualmethodstudio.com/tutorials/scriptingconstraints.html) + /*rope.PinConstraints.RemoveFromSolver(null); + ObiPinConstraintBatch batch = (ObiPinConstraintBatch)rope.PinConstraints.GetFirstBatch(); + batch.AddConstraint(pinnedParticle, pendulum, attachmentOffset,Quaternion.identity, 1); + rope.PinConstraints.AddToSolver(null);*/ + } + + /// + /// RemovePendulum and AddPendulum may be called on the same frame. + /// + public void RemovePendulum() + { + // simply remove all pin constraints (see http://obi.virtualmethodstudio.com/tutorials/scriptingconstraints.html) + /*rope.PinConstraints.RemoveFromSolver(null); + rope.PinConstraints.GetFirstBatch().Clear(); + rope.PinConstraints.AddToSolver(null);*/ + } + + /// + /// Like extending or retracting a winch. + /// + public void ChangeRopeLength(float changeAmount) + { + // the cursor will automatically add/remove/modify constraints and particles as needed to obtain the new length. + //cursor.ChangeLength(rope.RestLength + changeAmount); + //UpdateTethers(); + } + + private void UpdateTethers() + { + /*rope.TetherConstraints.RemoveFromSolver(null); + ObiTetherConstraintBatch batch = (ObiTetherConstraintBatch)rope.TetherConstraints.GetFirstBatch(); + batch.Clear(); + + ObiDistanceConstraintBatch dbatch = rope.DistanceConstraints.GetFirstBatch(); + for (int i = 0; i < dbatch.ConstraintCount; ++i) + batch.AddConstraint(0,dbatch.springIndices[i*2+1], rope.InterparticleDistance*i, 1, 1); + + batch.Cook(); + rope.TetherConstraints.AddToSolver(null);*/ + } +} + + diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RuntimeRopeGenerator.cs.meta b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RuntimeRopeGenerator.cs.meta new file mode 100644 index 000000000..b38eacc14 --- /dev/null +++ b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RuntimeRopeGenerator.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 0854563331ce443fa9b17a143c084806 +labels: +- ObiRope +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RuntimeRopeGeneratorUse.cs b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RuntimeRopeGeneratorUse.cs new file mode 100644 index 000000000..cdb04778e --- /dev/null +++ b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RuntimeRopeGeneratorUse.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections; +using UnityEngine; +using Obi; + +public class RuntimeRopeGeneratorUse : MonoBehaviour +{ + public ObiCollider pendulum; + RuntimeRopeGenerator rg; + + public IEnumerator Start() + { + rg = new RuntimeRopeGenerator(); + + // Create a rope: + yield return rg.MakeRope(transform,Vector3.zero,1); + + // Add a pendulum (you should adjust the attachment point depending on your particular pendulum object) + rg.AddPendulum(pendulum,Vector3.up*0.5f); + } + + public void Update(){ + + if (Input.GetKey(KeyCode.W)){ + rg.ChangeRopeLength(- Time.deltaTime); + } + + if (Input.GetKey(KeyCode.S)){ + rg.ChangeRopeLength( Time.deltaTime); + } + + } +} + + diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RuntimeRopeGeneratorUse.cs.meta b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RuntimeRopeGeneratorUse.cs.meta new file mode 100644 index 000000000..84a66090a --- /dev/null +++ b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/RuntimeRopeGeneratorUse.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 5e7b946ba720c495a8ee7c1d3e903063 +labels: +- ObiRope +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/SnakeController.cs b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/SnakeController.cs index a939ce8f0..a3c89e008 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/SnakeController.cs +++ b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/SnakeController.cs @@ -1,126 +1,122 @@ using UnityEngine; +using Obi; -namespace Obi.Samples +public class SnakeController : MonoBehaviour { - public class SnakeController : MonoBehaviour + public Transform headReferenceFrame; + public float headSpeed = 20; + public float upSpeed = 40; + public float slitherSpeed = 10; + + private ObiRope rope; + private ObiSolver solver; + private float[] traction; + private Vector3[] surfaceNormal; + + private void Start() { - public Transform headReferenceFrame; - public float headSpeed = 20; - public float upSpeed = 40; - public float slitherSpeed = 10; + rope = GetComponent(); + solver = rope.solver; - private ObiRope rope; - private ObiSolver solver; - private float[] traction; - private Vector3[] surfaceNormal; + // initialize traction array: + traction = new float[rope.activeParticleCount]; + surfaceNormal = new Vector3[rope.activeParticleCount]; - private void Start() + // subscribe to solver events (to update surface information) + solver.OnBeginStep += ResetSurfaceInfo; + solver.OnCollision += AnalyzeContacts; + solver.OnParticleCollision += AnalyzeContacts; + } + + + private void OnDestroy() + { + solver.OnBeginStep -= ResetSurfaceInfo; + solver.OnCollision -= AnalyzeContacts; + solver.OnParticleCollision -= AnalyzeContacts; + } + + private void ResetSurfaceInfo(ObiSolver s, float stepTime) + { + // reset surface info: + for (int i = 0; i < traction.Length; ++i) { - rope = GetComponent(); - solver = rope.solver; - - // subscribe to solver events (to update surface information) - rope.OnSimulationStart += ResetSurfaceInfo; - solver.OnCollision += AnalyzeContacts; - solver.OnParticleCollision += AnalyzeContacts; + traction[i] = 0; + surfaceNormal[i] = Vector3.zero; } + } - - private void OnDestroy() + private void AnalyzeContacts(object sender, ObiSolver.ObiCollisionEventArgs e) + { + // iterate trough all contacts: + for (int i = 0; i < e.contacts.Count; ++i) { - rope.OnSimulationStart -= ResetSurfaceInfo; - solver.OnCollision -= AnalyzeContacts; - solver.OnParticleCollision -= AnalyzeContacts; - } - - private void ResetSurfaceInfo(ObiActor a, float simulatedTime, float substepTime) - { - - if (traction == null) + var contact = e.contacts.Data[i]; + if (contact.distance < 0.005f) { - traction = new float[rope.activeParticleCount]; - surfaceNormal = new Vector3[rope.activeParticleCount]; - } + int simplexIndex = solver.simplices[contact.bodyA]; + var particleInActor = solver.particleToActor[simplexIndex]; - if (Input.GetKey(KeyCode.J)) - { - for (int i = 1; i < rope.activeParticleCount; ++i) + if (particleInActor.actor == rope) { - int solverIndex = rope.solverIndices[i]; - int prevSolverIndex = rope.solverIndices[i - 1]; + // using 1 here, could calculate a traction value based on the type of terrain, friction, etc. + traction[particleInActor.indexInActor] = 1; - // direction from current particle to previous one, projected on the contact surface: - Vector4 dir = Vector3.ProjectOnPlane(solver.positions[prevSolverIndex] - solver.positions[solverIndex], surfaceNormal[i]).normalized; - - // move in that direction: - solver.velocities[solverIndex] += dir * traction[i] / solver.invMasses[solverIndex] * slitherSpeed * simulatedTime; - } - } - - int headIndex = rope.solverIndices[0]; - - if (headReferenceFrame != null) - { - Vector3 direction = Vector3.zero; - - // Determine movement direction: - if (Input.GetKey(KeyCode.W)) - { - direction += headReferenceFrame.forward * headSpeed; - } - if (Input.GetKey(KeyCode.A)) - { - direction += -headReferenceFrame.right * headSpeed; - } - if (Input.GetKey(KeyCode.S)) - { - direction += -headReferenceFrame.forward * headSpeed; - } - if (Input.GetKey(KeyCode.D)) - { - direction += headReferenceFrame.right * headSpeed; - } - - // flatten out the direction so that it's parallel to the ground: - direction.y = 0; - - solver.velocities[headIndex] += (Vector4)direction * simulatedTime; - } - - if (Input.GetKey(KeyCode.Space)) - solver.velocities[headIndex] += (Vector4)Vector3.up * simulatedTime * upSpeed; - - - // reset surface info: - for (int i = 0; i < traction.Length; ++i) - { - traction[i] = 0; - surfaceNormal[i] = Vector3.zero; - } - - } - - private void AnalyzeContacts(object sender, ObiNativeContactList e) - { - // iterate trough all contacts: - for (int i = 0; i < e.count; ++i) - { - var contact = e[i]; - if (contact.distance < 0.005f) - { - int simplexIndex = solver.simplices[contact.bodyA]; - var particleInActor = solver.particleToActor[simplexIndex]; - - if (particleInActor != null && particleInActor.actor == rope && traction != null) - { - // using 1 here, could calculate a traction value based on the type of terrain, friction, etc. - traction[particleInActor.indexInActor] = 1; - - // accumulate surface normal: - surfaceNormal[particleInActor.indexInActor] += (Vector3)contact.normal; - } + // accumulate surface normal: + surfaceNormal[particleInActor.indexInActor] += (Vector3)contact.normal; } } } } -} \ No newline at end of file + + public void Update() + { + if (Input.GetKey(KeyCode.J)) + { + for (int i = 1; i < rope.activeParticleCount; ++i) + { + int solverIndex = rope.solverIndices[i]; + int prevSolverIndex = rope.solverIndices[i - 1]; + + // direction from current particle to previous one, projected on the contact surface: + Vector4 dir = Vector3.ProjectOnPlane(solver.positions[prevSolverIndex] - solver.positions[solverIndex], surfaceNormal[i]).normalized; + + // move in that direction: + solver.velocities[solverIndex] += dir * traction[i] * slitherSpeed * Time.deltaTime; + } + } + + int headIndex = rope.solverIndices[0]; + + if (headReferenceFrame != null) + { + Vector3 direction = Vector3.zero; + + // Determine movement direction: + if (Input.GetKey(KeyCode.W)) + { + direction += headReferenceFrame.forward * headSpeed; + } + if (Input.GetKey(KeyCode.A)) + { + direction += -headReferenceFrame.right * headSpeed; + } + if (Input.GetKey(KeyCode.S)) + { + direction += -headReferenceFrame.forward * headSpeed; + } + if (Input.GetKey(KeyCode.D)) + { + direction += headReferenceFrame.right * headSpeed; + } + + // flatten out the direction so that it's parallel to the ground: + direction.y = 0; + + solver.velocities[headIndex] += (Vector4)direction * Time.deltaTime; + } + + if (Input.GetKey(KeyCode.Space)) + solver.velocities[headIndex] += (Vector4)Vector3.up * Time.deltaTime * upSpeed; + } +} diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/SpiralCurve.cs b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/SpiralCurve.cs index 62469a0f4..ae350d1bd 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/SpiralCurve.cs +++ b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/SpiralCurve.cs @@ -1,53 +1,50 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; +using Obi; -namespace Obi.Samples -{ - [ExecuteInEditMode] - public class SpiralCurve : MonoBehaviour +[ExecuteInEditMode] +public class SpiralCurve : MonoBehaviour { + + public float radius = 0.25f; + public float radialStep = 0.8f; + public float heightStep = 0.04f; + public float points = 30; + + public float rotationalMass = 1; + public float thickness = 1; + + void Awake () { - - public float radius = 0.25f; - public float radialStep = 0.8f; - public float heightStep = 0.04f; - public float points = 30; - - public float rotationalMass = 1; - public float thickness = 1; - - void Awake() - { - Generate(); - } - - public void Generate() - { - var rod = GetComponent(); - if (rod == null) return; - - var blueprint = rod.sourceBlueprint as ObiRopeBlueprintBase; - if (blueprint == null) return; - - blueprint.path.Clear(); - - float ang = 0; - float height = 0; - - for (int i = 0; i < points; ++i) - { - Vector3 point = new Vector3(Mathf.Cos(ang) * radius, height, Mathf.Sin(ang) * radius); - - // optimal handle length for circle approximation: 4/3 tan(pi/(2n)) - Vector3 tangent = new Vector3(-point.z, heightStep, point.x).normalized * (4.0f / 3.0f) * Mathf.Tan(radialStep / 4.0f) * radius; - - blueprint.path.AddControlPoint(point, -tangent, tangent, Vector3.up, 1, rotationalMass, thickness, 1, Color.white, "control point " + i); - ang += radialStep; - height += heightStep; - } - - blueprint.path.FlushEvents(); - } - + Generate(); } + + public void Generate() + { + var rod = GetComponent(); + if (rod == null) return; + + var blueprint = rod.sourceBlueprint as ObiRopeBlueprintBase; + if (blueprint == null) return; + + blueprint.path.Clear(); + + float ang = 0; + float height = 0; + + for (int i = 0; i < points; ++i) + { + Vector3 point = new Vector3(Mathf.Cos(ang) * radius, height, Mathf.Sin(ang) * radius); + + // optimal handle length for circle approximation: 4/3 tan(pi/(2n)) + Vector3 tangent = new Vector3(-point.z, heightStep, point.x).normalized * (4.0f / 3.0f) * Mathf.Tan(radialStep / 4.0f) * radius; + + blueprint.path.AddControlPoint(point, -tangent, tangent, Vector3.up, 1, rotationalMass, thickness, 1, Color.white, "control point " + i); + ang += radialStep; + height += heightStep; + } + + blueprint.path.FlushEvents(); + } + } diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/TangledPeg.cs b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/TangledPeg.cs deleted file mode 100644 index fc85aafaf..000000000 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/TangledPeg.cs +++ /dev/null @@ -1,88 +0,0 @@ -using System.Collections; -using UnityEngine; - -namespace Obi.Samples -{ - [RequireComponent(typeof(Rigidbody))] - public class TangledPeg : MonoBehaviour - { - public TangledPegSlot currentSlot; - public Collider floorCollider; - public ObiRope attachedRope; - - [Header("Movement")] - public float stiffness = 200; - public float damping = 20; - public float maxAccel = 50; - public float minDistance = 0.05f; - - - public Rigidbody rb { get; private set; } - public ObiRigidbody orb { get; private set; } - - void Awake() - { - rb = GetComponent(); - orb = GetComponent(); - - // Ignore collisions with the floor: - Physics.IgnoreCollision(GetComponent(), floorCollider); - - // Initialize the peg's current slot, if any: - if (currentSlot != null) - { - currentSlot.currentPeg = this; - transform.position = currentSlot.transform.position; - } - } - - public float MoveTowards(Vector3 position) - { - Vector3 vector = position - transform.position; - float distance = Vector3.Magnitude(vector); - - // simple damped spring: F = -kx - vu - Vector3 accel = stiffness * vector - damping * rb.linearVelocity; - - // clamp spring acceleration: - accel = Vector3.ClampMagnitude(accel, maxAccel); - - rb.AddForce(accel, ForceMode.Acceleration); - - return distance; - } - - public void DockInSlot(TangledPegSlot slot) - { - StopAllCoroutines(); - StartCoroutine(MoveTowardsSlot(slot)); - } - - public void UndockFromCurrentSlot() - { - if (currentSlot != null) - { - currentSlot.currentPeg = null; - rb.isKinematic = false; - } - } - - private IEnumerator MoveTowardsSlot(TangledPegSlot slot) - { - float distance = float.MaxValue; - orb.kinematicForParticles = true; - - while (distance > minDistance) - { - distance = MoveTowards(slot.transform.position); - yield return 0; - } - - currentSlot = slot; - currentSlot.currentPeg = this; - transform.position = currentSlot.transform.position; - rb.isKinematic = true; - orb.kinematicForParticles = false; - } - } -} \ No newline at end of file diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/TangledPeg.cs.meta b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/TangledPeg.cs.meta deleted file mode 100644 index 5e3431e2c..000000000 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/TangledPeg.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: beb10e70cc06a4b019ecf88348a5f7fa -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/TangledPegSlot.cs b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/TangledPegSlot.cs deleted file mode 100644 index 5febdfd65..000000000 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/TangledPegSlot.cs +++ /dev/null @@ -1,34 +0,0 @@ -using UnityEngine; - -namespace Obi.Samples -{ - public class TangledPegSlot : MonoBehaviour - { - public TangledPeg currentPeg; - public Color tintColor; - - private Material instance; - private Color normalColor; - - public void Awake() - { - instance = GetComponent().material; - normalColor = instance.color; - } - - public void Tint() - { - instance.color = tintColor; - } - - public void ResetColor() - { - instance.color = normalColor; - } - - public void OnDestroy() - { - Destroy(instance); - } - } -} diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/TangledPegSlot.cs.meta b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/TangledPegSlot.cs.meta deleted file mode 100644 index b4c1bbdf3..000000000 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/TangledPegSlot.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 866212c246a9c4c5797069099ad745aa -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/TangledRopesGameController.cs b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/TangledRopesGameController.cs deleted file mode 100644 index 8a0c5345b..000000000 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/TangledRopesGameController.cs +++ /dev/null @@ -1,138 +0,0 @@ -using UnityEngine; -using UnityEngine.Events; - -namespace Obi.Samples -{ - [RequireComponent(typeof(ObiSolver))] - public class TangledRopesGameController : MonoBehaviour - { - public TangledPegSlot[] pegSlots; - public float pegHoverHeight = 1; - public float maxPegDistanceFromSlot = 1.5f; - public int framesWithoutContactsToWin = 30; - public UnityEvent onFinish = new UnityEvent(); - - private TangledPeg selectedPeg; - private Plane floor = new Plane(Vector3.up, 0); - private int framesSinceLastContact = 0; - - void OnEnable() - { - GetComponent().OnParticleCollision += Solver_OnParticleCollision; - } - - private void OnDisable() - { - GetComponent().OnParticleCollision -= Solver_OnParticleCollision; - } - - private TangledPegSlot FindCandidateSlot(TangledPeg peg) - { - // Go over all slots, find the closest one to the peg that's closer than - // maxPegDistanceFromSlot: - - TangledPegSlot closest = null; - float closestDistance = float.MaxValue; - - foreach (TangledPegSlot slot in pegSlots) - { - // reset slot color, to make sure it looks normal if it's not a candidate for our peg. - slot.ResetColor(); - - // ignore occupied slots: - if (slot.currentPeg != null) - continue; - - Vector3 slotOnFloor = floor.ClosestPointOnPlane(slot.transform.position); - Vector3 pegOnFloor = floor.ClosestPointOnPlane(peg.transform.position); - - float distance = Vector3.Distance(slotOnFloor, pegOnFloor); - if (distance < closestDistance && distance < maxPegDistanceFromSlot) - { - closest = slot; - closestDistance = distance; - } - } - - return closest; - } - - private void Update() - { - Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); - - // User clicks, cast a ray towards the floor, see if it hits any peg. - if (Input.GetMouseButtonDown(0)) - { - if (Physics.Raycast(ray, out RaycastHit hit)) - { - // if the ray hit a peg, store it as the selected peg and lift it off from its current slot. - if (hit.transform.TryGetComponent(out TangledPeg peg) && peg.currentSlot != null) - { - selectedPeg = peg; - selectedPeg.UndockFromCurrentSlot(); - } - } - } - - if (selectedPeg != null) - { - // Make selected peg follow the mouse cursor: - if (floor.Raycast(ray, out float enter)) - selectedPeg.MoveTowards(ray.GetPoint(enter) + Vector3.up * pegHoverHeight); - - // Try to find a suitable slot to drop the peg: - TangledPegSlot closest = FindCandidateSlot(selectedPeg); - - // If we found a candidate slot, tint it to give the player some visual feedback: - if (closest != null) - closest.Tint(); - - // Drop selected peg: - if (Input.GetMouseButtonUp(0)) - { - // If we could find a free slot nearby, connect to it: - if (closest != null) - { - selectedPeg.currentSlot = null; - selectedPeg.DockInSlot(closest); - closest.ResetColor(); - } - else // If we couldn't find one or if it's too far, return to current slot. - { - selectedPeg.DockInSlot(selectedPeg.currentSlot); - } - - selectedPeg = null; - } - } - - // If all ropes have been contact-free for a certain amount of frames, trigger finish event. - if (framesSinceLastContact >= framesWithoutContactsToWin && onFinish != null) - onFinish.Invoke(); - - } - - private void Solver_OnParticleCollision(ObiSolver s, ObiNativeContactList e) - { - // Count contacts between different ropes (that is, exclude self-contacts): - int contactsBetweenRopes = 0; - - for (int i = 0; i < e.count; ++i) - { - var ropeA = s.particleToActor[s.simplices[e[i].bodyA]].actor; - var ropeB = s.particleToActor[s.simplices[e[i].bodyB]].actor; - - if (ropeA != ropeB) - contactsBetweenRopes++; - } - - // If there's no contacts, bump the amount of frames we've been contact-free. - // Otherwise reset the amount of frames to zero. - if (contactsBetweenRopes == 0) - framesSinceLastContact++; - else - framesSinceLastContact = 0; - } - } -} \ No newline at end of file diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/TangledRopesGameController.cs.meta b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/TangledRopesGameController.cs.meta deleted file mode 100644 index 3a556d54a..000000000 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/TangledRopesGameController.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c1cdc16773c1f4ebe94e32c3ae0005bf -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/VineClimbController.cs b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/VineClimbController.cs deleted file mode 100644 index 6da29b457..000000000 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/VineClimbController.cs +++ /dev/null @@ -1,114 +0,0 @@ - -using UnityEngine; - -namespace Obi.Samples -{ - public class VineClimbController : MonoBehaviour - { - public ObiSolver solver; - public float climbSpeed = 1.5f; - - ObiPinhole pinhole; - bool pressedSpace = false; - - void Start() - { - solver.OnCollision += Solver_OnCollision; - } - - public void Update() - { - if (pinhole != null) - { - float speed = 0; - if (Input.GetKey(KeyCode.W)) - speed = climbSpeed; - if (Input.GetKey(KeyCode.S)) - speed = -climbSpeed; - - pinhole.motorSpeed = speed; - } - - if (Input.GetKeyDown(KeyCode.Space)) - { - pressedSpace = true; - DetachFromVine(); - } - } - - private void Solver_OnCollision(ObiSolver solver, ObiNativeContactList contacts) - { - if (pressedSpace) - { - int bestParticle = -1; - float closestDistance = float.MaxValue; - Vector3 closestOffset = Vector3.zero; - foreach (var c in contacts) - { - if (c.distance < 0.001f) - { - ObiCollider collider = ObiColliderWorld.GetInstance().colliderHandles[c.bodyB].owner as ObiCollider; - if (collider.sourceCollider.isTrigger) - { - int particle = solver.simplices[c.bodyA]; - var worldPosition = solver.transform.TransformPoint(solver.positions[particle]); - Vector3 offset = worldPosition - collider.transform.position; - float distance = Vector3.Magnitude(offset); - - if (distance < closestDistance) - { - closestDistance = distance; - closestOffset = offset; - bestParticle = particle; - } - } - } - } - - if (bestParticle >= 0) - { - var actor = solver.particleToActor[bestParticle].actor; - AttachToVine(actor as ObiRope, bestParticle, closestOffset); - } - - pressedSpace = false; - } - } - - private float GetParticleMu(ObiRope rope, int solverParticleIndex) - { - for (int i = 0; i < rope.elements.Count; ++i) - { - if (rope.elements[i].particle1 == solverParticleIndex) - return i / (float)rope.elements.Count; - if (rope.elements[i].particle2 == solverParticleIndex) - return (i + 1) / (float)rope.elements.Count; - } - return 1; - } - - // Update is called once per frame - void AttachToVine(ObiRope rope, int particle, Vector3 offset) - { - if (pinhole == null && rope != null) - { - transform.position += offset; - pinhole = rope.gameObject.AddComponent(); - pinhole.position = GetParticleMu(rope, particle); - pinhole.motorForce = Mathf.Infinity; - pinhole.friction = 1; - pinhole.target = this.transform; - } - } - - void DetachFromVine() - { - if (pinhole != null) - { - GameObject.Destroy(pinhole); - pinhole = null; - pressedSpace = false; - } - } - } -} diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/VineClimbController.cs.meta b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/VineClimbController.cs.meta deleted file mode 100644 index 12b4f345b..000000000 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/VineClimbController.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 50c674b3f8f0045249ac099130c6a6b2 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/WrapRopeGameController.cs b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/WrapRopeGameController.cs index aa3da3fc2..3f51fcca5 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/WrapRopeGameController.cs +++ b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/WrapRopeGameController.cs @@ -2,73 +2,71 @@ using System.Collections.Generic; using UnityEngine; using UnityEngine.Events; +using Obi; -namespace Obi.Samples +[RequireComponent(typeof(ObiSolver))] +public class WrapRopeGameController : MonoBehaviour { - [RequireComponent(typeof(ObiSolver))] - public class WrapRopeGameController : MonoBehaviour - { - ObiSolver solver; + ObiSolver solver; - public Wrappable[] wrappables; - public UnityEvent onFinish = new UnityEvent(); + public Wrappable[] wrappables; + public UnityEvent onFinish = new UnityEvent(); - private void Awake() - { - solver = GetComponent(); - } + private void Awake() + { + solver = GetComponent(); + } - // Start is called before the first frame update - void OnEnable() - { - solver.OnCollision += Solver_OnCollision; - } + // Start is called before the first frame update + void OnEnable() + { + solver.OnCollision += Solver_OnCollision; + } - private void OnDisable() - { - solver.OnCollision -= Solver_OnCollision; - } + private void OnDisable() + { + solver.OnCollision -= Solver_OnCollision; + } - private void Update() - { - bool allWrapped = true; + private void Update() + { + bool allWrapped = true; - // Test our win condition: all pegs must be wrapped. - foreach (var wrappable in wrappables) - { - if (!wrappable.IsWrapped()) - { - allWrapped = false; - break; - } - } + // Test our win condition: all pegs must be wrapped. + foreach (var wrappable in wrappables) + { + if (!wrappable.IsWrapped()) + { + allWrapped = false; + break; + } + } - if (allWrapped) - onFinish.Invoke(); - } + if (allWrapped) + onFinish.Invoke(); + } - private void Solver_OnCollision(ObiSolver s, ObiNativeContactList e) - { - // reset to unwrapped state: - foreach (var wrappable in wrappables) - wrappable.Reset(); + private void Solver_OnCollision(ObiSolver s, ObiSolver.ObiCollisionEventArgs e) + { + // reset to unwrapped state: + foreach (var wrappable in wrappables) + wrappable.Reset(); - var world = ObiColliderWorld.GetInstance(); - foreach (Oni.Contact contact in e) - { - // look for actual contacts only: - if (contact.distance < 0.025f) - { - var col = world.colliderHandles[contact.bodyB].owner; - if (col != null) - { - var wrappable = col.GetComponent(); - if (wrappable != null) - wrappable.SetWrapped(); - } - } - } - } - } -} \ No newline at end of file + var world = ObiColliderWorld.GetInstance(); + foreach (Oni.Contact contact in e.contacts) + { + // look for actual contacts only: + if (contact.distance < 0.025f) + { + var col = world.colliderHandles[contact.bodyB].owner; + if (col != null) + { + var wrappable = col.GetComponent(); + if (wrappable != null) + wrappable.SetWrapped(); + } + } + } + } +} diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/WrapRopePlayerController.cs b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/WrapRopePlayerController.cs index bd2e656c8..306142cfd 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/WrapRopePlayerController.cs +++ b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/WrapRopePlayerController.cs @@ -2,44 +2,41 @@ using System.Collections.Generic; using UnityEngine; -namespace Obi.Samples +[RequireComponent(typeof(Rigidbody))] +public class WrapRopePlayerController : MonoBehaviour { - [RequireComponent(typeof(Rigidbody))] - public class WrapRopePlayerController : MonoBehaviour + public float acceleration = 50; + Rigidbody rb; + + void Awake() { - public float acceleration = 50; - Rigidbody rb; - - void Awake() - { - rb = GetComponent(); - } - - // Update is called once per frame - void Update() - { - Vector3 direction = Vector3.zero; - - // Determine movement direction: - if (Input.GetKey(KeyCode.W)) - { - direction += Vector3.up * acceleration; - } - if (Input.GetKey(KeyCode.A)) - { - direction += Vector3.left * acceleration; - } - if (Input.GetKey(KeyCode.S)) - { - direction += Vector3.down * acceleration; - } - if (Input.GetKey(KeyCode.D)) - { - direction += Vector3.right * acceleration; - } - - rb.AddForce(direction.normalized * acceleration, ForceMode.Acceleration); - } - + rb = GetComponent(); } + + // Update is called once per frame + void Update() + { + Vector3 direction = Vector3.zero; + + // Determine movement direction: + if (Input.GetKey(KeyCode.W)) + { + direction += Vector3.up * acceleration; + } + if (Input.GetKey(KeyCode.A)) + { + direction += Vector3.left * acceleration; + } + if (Input.GetKey(KeyCode.S)) + { + direction += Vector3.down * acceleration; + } + if (Input.GetKey(KeyCode.D)) + { + direction += Vector3.right * acceleration; + } + + rb.AddForce(direction.normalized * acceleration, ForceMode.Acceleration); + } + } diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/Wrappable.cs b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/Wrappable.cs index d5e7337e0..4ed95690d 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/Wrappable.cs +++ b/Assets/Obi/Samples/RopeAndRod/SampleResources/Scripts/Wrappable.cs @@ -2,43 +2,40 @@ using System.Collections.Generic; using UnityEngine; -namespace Obi.Samples +public class Wrappable : MonoBehaviour { - public class Wrappable : MonoBehaviour - { - private bool wrapped = false; - public Color normalColor = new Color(0.2f, 0.2f, 0.8f); - public Color wrappedColor = new Color(0.9f, 0.9f, 0.2f); + private bool wrapped = false; + public Color normalColor = new Color(0.2f,0.2f,0.8f); + public Color wrappedColor = new Color(0.9f, 0.9f, 0.2f); - Material localMaterial; + Material localMaterial; - public void Awake() - { - localMaterial = GetComponent().material; - } + public void Awake() + { + localMaterial = GetComponent().material; + } - public void OnDestroy() - { - Destroy(localMaterial); - } + public void OnDestroy() + { + Destroy(localMaterial); + } - public void Reset() - { - wrapped = false; - localMaterial.color = normalColor; - } + public void Reset() + { + wrapped = false; + localMaterial.color = normalColor; + } - public void SetWrapped() - { - wrapped = true; - localMaterial.color = wrappedColor; - } + public void SetWrapped() + { + wrapped = true; + localMaterial.color = wrappedColor; + } - public bool IsWrapped() - { - return wrapped; - } + public bool IsWrapped() + { + return wrapped; + } - } } diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Textures/greatwhiteshark.png b/Assets/Obi/Samples/RopeAndRod/SampleResources/Textures/greatwhiteshark.png deleted file mode 100644 index bcb4cd987..000000000 Binary files a/Assets/Obi/Samples/RopeAndRod/SampleResources/Textures/greatwhiteshark.png and /dev/null differ diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Textures/greatwhiteshark.png.meta b/Assets/Obi/Samples/RopeAndRod/SampleResources/Textures/greatwhiteshark.png.meta deleted file mode 100644 index 75a808fc7..000000000 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Textures/greatwhiteshark.png.meta +++ /dev/null @@ -1,98 +0,0 @@ -fileFormatVersion: 2 -guid: 9c47de74aec0642928f43bb91a7346b7 -TextureImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 11 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - vTOnly: 0 - ignoreMasterTextureLimit: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: 1 - aniso: 1 - mipBias: 0 - wrapU: 0 - wrapV: 0 - wrapW: 0 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - singleChannelComponent: 0 - flipbookRows: 1 - flipbookColumns: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - ignorePngGamma: 0 - applyGammaDecoding: 0 - platformSettings: - - serializedVersion: 3 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - internalID: 0 - vertices: [] - indices: - edges: [] - weights: [] - secondaryTextures: [] - nameFileIdTable: {} - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Textures/greatwhiteshark_n.png b/Assets/Obi/Samples/RopeAndRod/SampleResources/Textures/greatwhiteshark_n.png deleted file mode 100644 index a0ba55487..000000000 Binary files a/Assets/Obi/Samples/RopeAndRod/SampleResources/Textures/greatwhiteshark_n.png and /dev/null differ diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Textures/greatwhiteshark_n.png.meta b/Assets/Obi/Samples/RopeAndRod/SampleResources/Textures/greatwhiteshark_n.png.meta deleted file mode 100644 index 36079f241..000000000 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Textures/greatwhiteshark_n.png.meta +++ /dev/null @@ -1,98 +0,0 @@ -fileFormatVersion: 2 -guid: e4a9139c969c3419a813c9513127f817 -TextureImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 11 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 0 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - vTOnly: 0 - ignoreMasterTextureLimit: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: 1 - aniso: 1 - mipBias: 0 - wrapU: 0 - wrapV: 0 - wrapW: 0 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 1 - textureShape: 1 - singleChannelComponent: 0 - flipbookRows: 1 - flipbookColumns: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - ignorePngGamma: 0 - applyGammaDecoding: 0 - platformSettings: - - serializedVersion: 3 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - internalID: 0 - vertices: [] - indices: - edges: [] - weights: [] - secondaryTextures: [] - nameFileIdTable: {} - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Samples/RopeAndRod/Snake.unity b/Assets/Obi/Samples/RopeAndRod/Snake.unity index ee240690c..7bb912d37 100644 --- a/Assets/Obi/Samples/RopeAndRod/Snake.unity +++ b/Assets/Obi/Samples/RopeAndRod/Snake.unity @@ -94,7 +94,7 @@ LightmapSettings: m_TrainingDataDestination: TrainingData m_LightProbeSampleCountMultiplier: 4 m_LightingDataAsset: {fileID: 0} - m_LightingSettings: {fileID: 258127860} + m_LightingSettings: {fileID: 4890085278179872738, guid: d8d40722840c58546b7a282f10dc662a, type: 2} --- !u!196 &5 NavMeshSettings: serializedVersion: 2 @@ -119,67 +119,52 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} ---- !u!850595691 &258127860 -LightingSettings: +--- !u!1 &79931598 +GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: Settings.lighting - serializedVersion: 9 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 1 - m_RealtimeEnvironmentLighting: 1 - m_BounceScale: 1 - m_AlbedoBoost: 1 - m_IndirectOutputScale: 1 - m_UsingShadowmask: 0 - m_BakeBackend: 1 - m_LightmapMaxSize: 1024 - m_LightmapSizeFixed: 0 - m_UseMipmapLimits: 1 - m_BakeResolution: 40 - m_Padding: 2 - m_LightmapCompression: 3 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 0 - m_CompAOExponentDirect: 0 - m_ExtractAO: 0 - m_MixedBakeMode: 1 - m_LightmapsBakeMode: 1 - m_FilterMode: 1 - m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} - m_ExportTrainingData: 0 - m_EnableWorkerProcessBaking: 1 - m_TrainingDataDestination: TrainingData - m_RealtimeResolution: 2 - m_ForceWhiteAlbedo: 0 - m_ForceUpdates: 0 - m_PVRCulling: 1 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 512 - m_PVREnvironmentSampleCount: 512 - m_PVREnvironmentReferencePointCount: 2048 - m_LightProbeSampleCountMultiplier: 4 - m_PVRBounces: 2 - m_PVRMinBounces: 2 - m_PVREnvironmentImportanceSampling: 0 - m_PVRFilteringMode: 2 - m_PVRDenoiserTypeDirect: 0 - m_PVRDenoiserTypeIndirect: 0 - m_PVRDenoiserTypeAO: 0 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 5 - m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_RespectSceneVisibilityWhenBakingGI: 0 + serializedVersion: 6 + m_Component: + - component: {fileID: 79931600} + - component: {fileID: 79931599} + m_Layer: 0 + m_Name: BurstCollisionWorld + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &79931599 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 79931598} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f1a161c4294214a4fbcb7e9e94800494, type: 3} + m_Name: + m_EditorClassIdentifier: + cellSpans: + m_AlignBytes: 16 +--- !u!4 &79931600 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 79931598} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &283647873 GameObject: m_ObjectHideFlags: 0 @@ -282,52 +267,6 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0, y: 0} ---- !u!1 &329489781 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 329489783} - - component: {fileID: 329489782} - m_Layer: 0 - m_Name: BurstCollisionWorld - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &329489782 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 329489781} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f1a161c4294214a4fbcb7e9e94800494, type: 3} - m_Name: - m_EditorClassIdentifier: - cellSpans: - m_AlignBytes: 16 ---- !u!4 &329489783 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 329489781} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &421764872 PrefabInstance: m_ObjectHideFlags: 0 @@ -423,7 +362,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 11400000, guid: c73079cca10924a80871331c66b4ad4b, type: 2} filter: -65535 m_SourceCollider: {fileID: 506459882} @@ -555,7 +493,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 11400000, guid: 4c46db05afff546f8a9f9333946e9882, type: 2} filter: -65535 m_SourceCollider: {fileID: 667163003} @@ -607,6 +544,7 @@ GameObject: - component: {fileID: 1002464895} - component: {fileID: 1002464893} - component: {fileID: 1002464892} + - component: {fileID: 1002464897} - component: {fileID: 1002464894} m_Layer: 0 m_Name: Main Camera @@ -715,6 +653,26 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1002464897 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1002464891} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 62e83a599724f45a4aa337d74764e572, type: 3} + m_Name: + m_EditorClassIdentifier: + skin: {fileID: 11400000, guid: b90d3c214c99743b0865fc0e0d1f1a15, type: 2} + threadColor: {r: 0, g: 1, b: 1, a: 1} + taskColor: {r: 0, g: 1, b: 0, a: 1} + parallelTaskColor: {r: 1, g: 0.8, b: 0.2, a: 1} + renderTaskColor: {r: 0.2, g: 0.7, b: 1, a: 1} + defaultTaskColor: {r: 1, g: 0.5, b: 0.2, a: 1} + showPercentages: 0 + profileThrottle: 30 --- !u!1 &1175446144 GameObject: m_ObjectHideFlags: 0 @@ -939,7 +897,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 11400000, guid: 4c46db05afff546f8a9f9333946e9882, type: 2} filter: -65535 m_SourceCollider: {fileID: 1195412987} @@ -1071,7 +1028,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 11400000, guid: 4c46db05afff546f8a9f9333946e9882, type: 2} filter: -65535 m_SourceCollider: {fileID: 1298991848} @@ -1085,6 +1041,8 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 1346965650} + - component: {fileID: 1346965645} + - component: {fileID: 1346965644} - component: {fileID: 1346965642} - component: {fileID: 1346965646} - component: {fileID: 1346965643} @@ -1108,13 +1066,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} m_Name: m_EditorClassIdentifier: - solverIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b0000007c0000007d0000007e000000 - m_AlignBytes: 16 - groupID: 1 + solverIndices: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b0000007c0000007d0000007e000000 m_CollisionMaterial: {fileID: 11400000, guid: dbf5bc78c024b4724bd8b2aaca1af0c2, type: 2} m_SurfaceCollisions: 0 - m_MassScale: 1 m_SelfCollisions: 1 restLength_: 4.1143684 elements: @@ -1248,9 +1202,6 @@ MonoBehaviour: restLength: 0.15843129 constraintForce: 0 tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 m_RopeBlueprint: {fileID: 11400000, guid: 7cc7ef3c151f24a00a1fe338fa5f827c, type: 2} tearingEnabled: 0 tearResistanceMultiplier: 1000 @@ -1276,20 +1227,67 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} m_Name: m_EditorClassIdentifier: - material: {fileID: 2100000, guid: dbda366779bfb4406b2c60e70986d306, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 uvAnchor: 0 uvScale: {x: 1, y: 3} normalizeV: 1 section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} thicknessScale: 0.8 +--- !u!23 &1346965644 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1346965641} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: dbda366779bfb4406b2c60e70986d306, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1346965645 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1346965641} + m_Mesh: {fileID: 1619481825} --- !u!114 &1346965646 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1305,7 +1303,6 @@ MonoBehaviour: decimation: 0 smoothing: 2 twist: 0 - indexInSystem: 0 --- !u!114 &1346965647 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1321,7 +1318,7 @@ MonoBehaviour: headReferenceFrame: {fileID: 1002464896} headSpeed: 20 upSpeed: 40 - slitherSpeed: 120 + slitherSpeed: 10 --- !u!4 &1346965650 Transform: m_ObjectHideFlags: 0 @@ -1337,6 +1334,184 @@ Transform: m_Children: [] m_Father: {fileID: 2102841797} m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0} +--- !u!43 &1619481825 +Mesh: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: extrudedMesh + serializedVersion: 12 + m_SubMeshes: + - serializedVersion: 2 + firstByte: 0 + indexCount: 0 + topology: 0 + baseVertex: 0 + firstVertex: 0 + vertexCount: 0 + localAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_Shapes: + vertices: [] + shapes: [] + channels: [] + fullWeights: [] + m_BindPose: [] + m_BoneNameHashes: + m_RootBoneNameHash: 0 + m_BonesAABB: [] + m_VariableBoneCountWeights: + m_Data: + m_MeshCompression: 0 + m_IsReadable: 1 + m_KeepVertices: 1 + m_KeepIndices: 1 + m_IndexFormat: 0 + m_IndexBuffer: + m_VertexData: + serializedVersion: 3 + m_VertexCount: 0 + m_Channels: + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + m_DataSize: 0 + _typelessdata: + m_CompressedMesh: + m_Vertices: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_UV: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Normals: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Tangents: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Weights: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_NormalSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_TangentSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_FloatColors: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_BoneIndices: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_Triangles: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_UVInfo: 0 + m_LocalAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_MeshUsageFlags: 0 + m_CookingOptions: 30 + m_BakedConvexCollisionMesh: + m_BakedTriangleCollisionMesh: + 'm_MeshMetrics[0]': 1 + 'm_MeshMetrics[1]': 1 + m_MeshOptimizationFlags: 1 + m_StreamData: + serializedVersion: 2 + offset: 0 + size: 0 + path: + m_MeshLodInfo: + serializedVersion: 2 + m_LodSelectionCurve: + serializedVersion: 1 + m_LodSlope: 0 + m_LodBias: 0 + m_NumLevels: 1 + m_SubMeshes: + - serializedVersion: 2 + m_Levels: + - serializedVersion: 1 + m_IndexStart: 0 + m_IndexCount: 0 --- !u!1 &1660007473 GameObject: m_ObjectHideFlags: 0 @@ -1569,7 +1744,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 11400000, guid: 4c46db05afff546f8a9f9333946e9882, type: 2} filter: -65535 m_SourceCollider: {fileID: 2086948288} @@ -1663,6 +1837,7 @@ GameObject: m_Component: - component: {fileID: 2102841797} - component: {fileID: 2102841796} + - component: {fileID: 2102841795} m_Layer: 0 m_Name: Obi Solver m_TagString: Untagged @@ -1670,6 +1845,21 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 +--- !u!114 &2102841795 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2102841794} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1d9704d540ac448439a425526f6b2986, type: 3} + m_Name: + m_EditorClassIdentifier: + solvers: + - {fileID: 2102841796} + substeps: 4 --- !u!114 &2102841796 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1684,57 +1874,23 @@ MonoBehaviour: m_EditorClassIdentifier: simulateWhenInvisible: 1 m_Backend: 1 - substeps: 2 - maxStepsPerFrame: 1 - synchronization: 0 parameters: mode: 0 interpolation: 0 gravity: {x: 0, y: -5, z: 0} - ambientWind: {x: 0, y: 0, z: 0} - foamGravityScale: 1 damping: 0.7 maxAnisotropy: 3 sleepThreshold: 0.001 - maxVelocity: 50 - maxAngularVelocity: 20 collisionMargin: 0.02 maxDepenetration: 5 - colliderCCD: 1 - particleCCD: 0 + continuousCollisionDetection: 1 shockPropagation: 0 surfaceCollisionIterations: 8 surfaceCollisionTolerance: 0.005 - diffusionMask: {x: 1, y: 1, z: 1, w: 1} - m_MaxSurfaceChunks: 32768 - maxQueryResults: 8192 - maxFoamParticles: 8192 - maxParticleNeighbors: 128 - maxParticleContacts: 6 - useLimits: 0 - killOffLimitsParticles: 0 - boundaryLimits: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 5, y: 5, z: 5} gravity: {x: 0, y: -5, z: 0} gravitySpace: 1 - ambientWind: {x: 0, y: 0, z: 0} - windSpace: 1 - foamSubsteps: 1 - foamMinNeighbors: 3 - foamCollisions: 0 - maxFoamVelocityStretch: 0.3 - foamRadiusScale: 1 - foamFade: {x: 0.05, y: 0.8} - foamAccelAgingRange: {x: 0.5, y: 0.8} - foamAccelAging: 4 - foamVolumeDensity: 0.1 - foamAmbientDensity: 0.02 - foamScatterColor: {r: 0.8, g: 0.75, b: 0.7, a: 1} - foamAmbientColor: {r: 0.4, g: 0.5, b: 0.6, a: 1} worldLinearInertiaScale: 0 worldAngularInertiaScale: 0 - synchronousSpatialQueries: 0 distanceConstraintParameters: evaluationOrder: 0 iterations: 1 @@ -1790,11 +1946,6 @@ MonoBehaviour: iterations: 10 SORFactor: 1 enabled: 0 - pinholeConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 stitchConstraintParameters: evaluationOrder: 1 iterations: 5 @@ -1847,4 +1998,4 @@ SceneRoots: - {fileID: 283647877} - {fileID: 1788698695} - {fileID: 907464232} - - {fileID: 329489783} + - {fileID: 79931600} diff --git a/Assets/Obi/Samples/RopeAndRod/SnakeSettings.lighting b/Assets/Obi/Samples/RopeAndRod/SnakeSettings.lighting new file mode 100644 index 000000000..a8f6adf53 --- /dev/null +++ b/Assets/Obi/Samples/RopeAndRod/SnakeSettings.lighting @@ -0,0 +1,63 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!850595691 &4890085278179872738 +LightingSettings: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: SnakeSettings + serializedVersion: 9 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 1 + m_RealtimeEnvironmentLighting: 1 + m_BounceScale: 1 + m_AlbedoBoost: 1 + m_IndirectOutputScale: 1 + m_UsingShadowmask: 0 + m_BakeBackend: 1 + m_LightmapMaxSize: 1024 + m_LightmapSizeFixed: 0 + m_UseMipmapLimits: 1 + m_BakeResolution: 40 + m_Padding: 2 + m_LightmapCompression: 3 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 0 + m_CompAOExponentDirect: 0 + m_ExtractAO: 0 + m_MixedBakeMode: 1 + m_LightmapsBakeMode: 1 + m_FilterMode: 1 + m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + m_ExportTrainingData: 0 + m_EnableWorkerProcessBaking: 1 + m_TrainingDataDestination: TrainingData + m_RealtimeResolution: 2 + m_ForceWhiteAlbedo: 0 + m_ForceUpdates: 0 + m_PVRCulling: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVREnvironmentSampleCount: 512 + m_PVREnvironmentReferencePointCount: 2048 + m_LightProbeSampleCountMultiplier: 4 + m_PVRBounces: 2 + m_PVRMinBounces: 2 + m_PVREnvironmentImportanceSampling: 0 + m_PVRFilteringMode: 2 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_RespectSceneVisibilityWhenBakingGI: 0 diff --git a/Assets/Obi/Samples/RopeAndRod/SnakeSettings.lighting.meta b/Assets/Obi/Samples/RopeAndRod/SnakeSettings.lighting.meta new file mode 100644 index 000000000..b72ce6c60 --- /dev/null +++ b/Assets/Obi/Samples/RopeAndRod/SnakeSettings.lighting.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d8d40722840c58546b7a282f10dc662a +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 4890085278179872738 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Samples/RopeAndRod/SpringRod.unity b/Assets/Obi/Samples/RopeAndRod/SpringRod.unity index 600448d91..7de7a5b6d 100644 --- a/Assets/Obi/Samples/RopeAndRod/SpringRod.unity +++ b/Assets/Obi/Samples/RopeAndRod/SpringRod.unity @@ -43,7 +43,7 @@ RenderSettings: LightmapSettings: m_ObjectHideFlags: 0 serializedVersion: 13 - m_BakeOnSceneLoad: 0 + m_BakeOnSceneLoad: 1 m_GISettings: serializedVersion: 2 m_BounceScale: 1 @@ -226,7 +226,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 11400000, guid: d368f2c47473d4bfb8dd9f08073cb403, type: 2} filter: -65535 m_SourceCollider: {fileID: 506459882} @@ -243,6 +242,7 @@ GameObject: - component: {fileID: 1002464895} - component: {fileID: 1002464893} - component: {fileID: 1002464892} + - component: {fileID: 1002464897} m_Layer: 0 m_Name: Main Camera m_TagString: MainCamera @@ -332,6 +332,26 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1002464897 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1002464891} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 62e83a599724f45a4aa337d74764e572, type: 3} + m_Name: + m_EditorClassIdentifier: + skin: {fileID: 11400000, guid: b90d3c214c99743b0865fc0e0d1f1a15, type: 2} + threadColor: {r: 0, g: 1, b: 1, a: 1} + taskColor: {r: 0, g: 1, b: 0, a: 1} + parallelTaskColor: {r: 1, g: 0.8, b: 0.2, a: 1} + renderTaskColor: {r: 0.2, g: 0.7, b: 1, a: 1} + defaultTaskColor: {r: 1, g: 0.5, b: 0.2, a: 1} + showPercentages: 0 + profileThrottle: 30 --- !u!1 &1105384629 GameObject: m_ObjectHideFlags: 0 @@ -341,6 +361,8 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 1105384642} + - component: {fileID: 1105384641} + - component: {fileID: 1105384640} - component: {fileID: 1105384643} - component: {fileID: 1105384633} - component: {fileID: 1105384632} @@ -366,15 +388,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} m_Name: m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 9bc0d93bc33e445c7a765578064cdd1e, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 uvAnchor: 0 uvScale: {x: 1, y: 24} normalizeV: 1 @@ -395,7 +408,6 @@ MonoBehaviour: decimation: 0 smoothing: 1 twist: 0 - indexInSystem: 0 --- !u!114 &1105384633 MonoBehaviour: m_ObjectHideFlags: 0 @@ -408,13 +420,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 8f2bc32c4faf04f039a86a6e3cea12a1, type: 3} m_Name: m_EditorClassIdentifier: - solverIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a000000 - m_AlignBytes: 16 - groupID: 1 + solverIndices: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a000000 m_CollisionMaterial: {fileID: 0} m_SurfaceCollisions: 0 - m_MassScale: 1 m_SelfCollisions: 0 restLength_: 16.384266 elements: @@ -708,9 +716,6 @@ MonoBehaviour: restLength: 0.28248715 constraintForce: 0 tearResistance: 0 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 m_RodBlueprint: {fileID: 11400000, guid: b74d67cfe23804ec1b4f215ac5e3d500, type: 2} _stretchShearConstraintsEnabled: 1 _stretchCompliance: 0 @@ -741,9 +746,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: 9190015862606898100, guid: b74d67cfe23804ec1b4f215ac5e3d500, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 1 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &1105384636 MonoBehaviour: m_ObjectHideFlags: 0 @@ -761,9 +765,64 @@ MonoBehaviour: m_ParticleGroup: {fileID: -4518859148014644581, guid: b74d67cfe23804ec1b4f215ac5e3d500, type: 2} m_AttachmentType: 1 m_ConstrainOrientation: 1 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity +--- !u!23 &1105384640 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1105384629} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 9bc0d93bc33e445c7a765578064cdd1e, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1105384641 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1105384629} + m_Mesh: {fileID: 1984461382} --- !u!4 &1105384642 Transform: m_ObjectHideFlags: 0 @@ -899,7 +958,7 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 56.052002, y: -22.431002, z: 23.642} ---- !u!1 &1797933355 +--- !u!1 &1529730626 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -907,8 +966,8 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 1797933357} - - component: {fileID: 1797933356} + - component: {fileID: 1529730628} + - component: {fileID: 1529730627} m_Layer: 0 m_Name: BurstCollisionWorld m_TagString: Untagged @@ -916,13 +975,13 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!114 &1797933356 +--- !u!114 &1529730627 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1797933355} + m_GameObject: {fileID: 1529730626} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: f1a161c4294214a4fbcb7e9e94800494, type: 3} @@ -930,13 +989,13 @@ MonoBehaviour: m_EditorClassIdentifier: cellSpans: m_AlignBytes: 16 ---- !u!4 &1797933357 +--- !u!4 &1529730628 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1797933355} + m_GameObject: {fileID: 1529730626} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} @@ -945,6 +1004,184 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!43 &1984461382 +Mesh: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: extrudedMesh + serializedVersion: 12 + m_SubMeshes: + - serializedVersion: 2 + firstByte: 0 + indexCount: 0 + topology: 0 + baseVertex: 0 + firstVertex: 0 + vertexCount: 0 + localAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_Shapes: + vertices: [] + shapes: [] + channels: [] + fullWeights: [] + m_BindPose: [] + m_BoneNameHashes: + m_RootBoneNameHash: 0 + m_BonesAABB: [] + m_VariableBoneCountWeights: + m_Data: + m_MeshCompression: 0 + m_IsReadable: 1 + m_KeepVertices: 1 + m_KeepIndices: 1 + m_IndexFormat: 0 + m_IndexBuffer: + m_VertexData: + serializedVersion: 3 + m_VertexCount: 0 + m_Channels: + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + m_DataSize: 0 + _typelessdata: + m_CompressedMesh: + m_Vertices: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_UV: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Normals: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Tangents: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Weights: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_NormalSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_TangentSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_FloatColors: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_BoneIndices: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_Triangles: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_UVInfo: 0 + m_LocalAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_MeshUsageFlags: 0 + m_CookingOptions: 30 + m_BakedConvexCollisionMesh: + m_BakedTriangleCollisionMesh: + 'm_MeshMetrics[0]': 1 + 'm_MeshMetrics[1]': 1 + m_MeshOptimizationFlags: 1 + m_StreamData: + serializedVersion: 2 + offset: 0 + size: 0 + path: + m_MeshLodInfo: + serializedVersion: 2 + m_LodSelectionCurve: + serializedVersion: 1 + m_LodSlope: 0 + m_LodBias: 0 + m_NumLevels: 1 + m_SubMeshes: + - serializedVersion: 2 + m_Levels: + - serializedVersion: 1 + m_IndexStart: 0 + m_IndexCount: 0 --- !u!1 &2086275150 GameObject: m_ObjectHideFlags: 0 @@ -993,7 +1230,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 0} filter: -65535 m_SourceCollider: {fileID: 2086275154} @@ -1022,7 +1258,7 @@ Rigidbody: m_ImplicitTensor: 1 m_UseGravity: 1 m_IsKinematic: 0 - m_Interpolate: 0 + m_Interpolate: 1 m_Constraints: 0 m_CollisionDetection: 0 --- !u!65 &2086275154 @@ -1127,6 +1363,7 @@ GameObject: m_Component: - component: {fileID: 2102841797} - component: {fileID: 2102841796} + - component: {fileID: 2102841795} m_Layer: 0 m_Name: Obi Solver m_TagString: Untagged @@ -1134,6 +1371,21 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 +--- !u!114 &2102841795 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2102841794} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1d9704d540ac448439a425526f6b2986, type: 3} + m_Name: + m_EditorClassIdentifier: + solvers: + - {fileID: 2102841796} + substeps: 3 --- !u!114 &2102841796 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1148,57 +1400,23 @@ MonoBehaviour: m_EditorClassIdentifier: simulateWhenInvisible: 1 m_Backend: 1 - substeps: 4 - maxStepsPerFrame: 1 - synchronization: 0 parameters: mode: 0 interpolation: 0 gravity: {x: 0, y: -9.81, z: 0} - ambientWind: {x: 0, y: 0, z: 0} - foamGravityScale: 1 damping: 0 maxAnisotropy: 3 sleepThreshold: 0.001 - maxVelocity: 50 - maxAngularVelocity: 10 collisionMargin: 0.02 maxDepenetration: 5 - colliderCCD: 1 - particleCCD: 0 + continuousCollisionDetection: 1 shockPropagation: 0 surfaceCollisionIterations: 8 surfaceCollisionTolerance: 0.005 - diffusionMask: {x: 1, y: 1, z: 1, w: 1} - m_MaxSurfaceChunks: 32768 - maxQueryResults: 8192 - maxFoamParticles: 8192 - maxParticleNeighbors: 128 - maxParticleContacts: 6 - useLimits: 0 - killOffLimitsParticles: 0 - boundaryLimits: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 5, y: 5, z: 5} gravity: {x: 0, y: -9.81, z: 0} gravitySpace: 1 - ambientWind: {x: 0, y: 0, z: 0} - windSpace: 1 - foamSubsteps: 1 - foamMinNeighbors: 3 - foamCollisions: 0 - maxFoamVelocityStretch: 0.3 - foamRadiusScale: 1 - foamFade: {x: 0.05, y: 0.8} - foamAccelAgingRange: {x: 0.5, y: 0.8} - foamAccelAging: 4 - foamVolumeDensity: 0.1 - foamAmbientDensity: 0.02 - foamScatterColor: {r: 0.8, g: 0.75, b: 0.7, a: 1} - foamAmbientColor: {r: 0.4, g: 0.5, b: 0.6, a: 1} worldLinearInertiaScale: 0 worldAngularInertiaScale: 0 - synchronousSpatialQueries: 0 distanceConstraintParameters: evaluationOrder: 0 iterations: 8 @@ -1251,12 +1469,7 @@ MonoBehaviour: enabled: 0 pinConstraintParameters: evaluationOrder: 0 - iterations: 5 - SORFactor: 1 - enabled: 1 - pinholeConstraintParameters: - evaluationOrder: 1 - iterations: 1 + iterations: 10 SORFactor: 1 enabled: 1 stitchConstraintParameters: @@ -1271,12 +1484,12 @@ MonoBehaviour: enabled: 0 stretchShearConstraintParameters: evaluationOrder: 0 - iterations: 5 + iterations: 10 SORFactor: 1 enabled: 1 bendTwistConstraintParameters: evaluationOrder: 0 - iterations: 5 + iterations: 20 SORFactor: 1 enabled: 1 chainConstraintParameters: @@ -1422,4 +1635,4 @@ SceneRoots: - {fileID: 1175446146} - {fileID: 2102841797} - {fileID: 2086275157} - - {fileID: 1797933357} + - {fileID: 1529730628} diff --git a/Assets/Obi/Samples/RopeAndRod/SpringRod.unity.meta b/Assets/Obi/Samples/RopeAndRod/SpringRod.unity.meta index fa309c5d0..d25af1a9d 100644 --- a/Assets/Obi/Samples/RopeAndRod/SpringRod.unity.meta +++ b/Assets/Obi/Samples/RopeAndRod/SpringRod.unity.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 62deeda7ebac34fb1aa15a197b4edb8e +guid: 8fafd98b75e9b44ee8b37edf6f1adcd5 labels: - ObiRope DefaultImporter: diff --git a/Assets/Obi/Samples/RopeAndRod/TangledRopes.unity b/Assets/Obi/Samples/RopeAndRod/TangledRopes.unity deleted file mode 100644 index d098a97b2..000000000 --- a/Assets/Obi/Samples/RopeAndRod/TangledRopes.unity +++ /dev/null @@ -1,3011 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!29 &1 -OcclusionCullingSettings: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_OcclusionBakeSettings: - smallestOccluder: 5 - smallestHole: 0.25 - backfaceThreshold: 100 - m_SceneGUID: 00000000000000000000000000000000 - m_OcclusionCullingData: {fileID: 0} ---- !u!104 &2 -RenderSettings: - m_ObjectHideFlags: 0 - serializedVersion: 10 - m_Fog: 0 - m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - m_FogMode: 3 - m_FogDensity: 0.01 - m_LinearFogStart: 0 - m_LinearFogEnd: 300 - m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} - m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} - m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} - m_AmbientIntensity: 1 - m_AmbientMode: 0 - m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} - m_HaloStrength: 0.5 - m_FlareStrength: 1 - m_FlareFadeSpeed: 3 - m_HaloTexture: {fileID: 0} - m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} - m_DefaultReflectionMode: 0 - m_DefaultReflectionResolution: 128 - m_ReflectionBounces: 1 - m_ReflectionIntensity: 1 - m_CustomReflection: {fileID: 0} - m_Sun: {fileID: 0} - m_UseRadianceAmbientProbe: 0 ---- !u!157 &3 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 13 - m_BakeOnSceneLoad: 0 - m_GISettings: - serializedVersion: 2 - m_BounceScale: 1 - m_IndirectOutputScale: 1 - m_AlbedoBoost: 1 - m_EnvironmentLightingMode: 0 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 0 - m_LightmapEditorSettings: - serializedVersion: 12 - m_Resolution: 2 - m_BakeResolution: 40 - m_AtlasSize: 1024 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 1 - m_CompAOExponentDirect: 0 - m_ExtractAmbientOcclusion: 0 - m_Padding: 2 - m_LightmapParameters: {fileID: 0} - m_LightmapsBakeMode: 1 - m_TextureCompression: 1 - m_ReflectionCompression: 2 - m_MixedBakeMode: 2 - m_BakeBackend: 1 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 512 - m_PVRBounces: 2 - m_PVREnvironmentSampleCount: 256 - m_PVREnvironmentReferencePointCount: 2048 - m_PVRFilteringMode: 1 - m_PVRDenoiserTypeDirect: 1 - m_PVRDenoiserTypeIndirect: 1 - m_PVRDenoiserTypeAO: 1 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVREnvironmentMIS: 1 - m_PVRCulling: 1 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 5 - m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_ExportTrainingData: 0 - m_TrainingDataDestination: TrainingData - m_LightProbeSampleCountMultiplier: 4 - m_LightingDataAsset: {fileID: 0} - m_LightingSettings: {fileID: 4890085278179872738, guid: e16f40cccc9f747d3a88842b4591f225, type: 2} ---- !u!196 &4 -NavMeshSettings: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_BuildSettings: - serializedVersion: 3 - agentTypeID: 0 - agentRadius: 0.5 - agentHeight: 2 - agentSlope: 45 - agentClimb: 0.4 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - minRegionArea: 2 - manualCellSize: 0 - cellSize: 0.16666667 - manualTileSize: 0 - tileSize: 256 - buildHeightMesh: 0 - maxJobWorkers: 0 - preserveTilesOutsideBounds: 0 - debug: - m_Flags: 0 - m_NavMeshData: {fileID: 0} ---- !u!1001 &97762687 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 3512526509595786538, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_Name - value: TanglePeg (2) - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_RootOrder - value: 3 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_LocalPosition.x - value: -2.61 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_LocalPosition.z - value: 5.35 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8733900141329501594, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: damping - value: 10 - objectReference: {fileID: 0} - - target: {fileID: 8733900141329501594, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: maxAccel - value: 50 - objectReference: {fileID: 0} - - target: {fileID: 8733900141329501594, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: stiffness - value: 200 - objectReference: {fileID: 0} - - target: {fileID: 8733900141329501594, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: currentSlot - value: - objectReference: {fileID: 1514826402} - - target: {fileID: 8733900141329501594, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: initialSlot - value: - objectReference: {fileID: 1552509777} - - target: {fileID: 8733900141329501594, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: minDistance - value: 0.05 - objectReference: {fileID: 0} - - target: {fileID: 8733900141329501594, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: attachedRope - value: - objectReference: {fileID: 305168495} - - target: {fileID: 8733900141329501594, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: floorCollider - value: - objectReference: {fileID: 1919818300} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} ---- !u!4 &97762688 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - m_PrefabInstance: {fileID: 97762687} - m_PrefabAsset: {fileID: 0} ---- !u!1 &178620544 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 178620545} - - component: {fileID: 178620547} - - component: {fileID: 178620546} - m_Layer: 5 - m_Name: Instructions - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &178620545 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 178620544} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 876719296} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 142.57, y: 54.39} - m_SizeDelta: {x: 239.1437, y: 72.29023} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &178620546 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 178620544} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 18 - m_FontStyle: 1 - m_BestFit: 0 - m_MinSize: 1 - m_MaxSize: 20 - m_Alignment: 3 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 1 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: Click and drag the pegs to untangle all ropes. ---- !u!222 &178620547 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 178620544} - m_CullTransparentMesh: 0 ---- !u!1001 &260969642 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 3512526509595786538, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_Name - value: TanglePegSlot (2) - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_RootOrder - value: 7 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalPosition.x - value: -2.58 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalPosition.y - value: 0.1 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalPosition.z - value: 5.36 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} ---- !u!1 &266503051 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 266503052} - - component: {fileID: 266503054} - - component: {fileID: 266503053} - - component: {fileID: 266503055} - m_Layer: 5 - m_Name: Finish - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &266503052 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 266503051} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1406884019} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 239.14368, y: 72.29022} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &266503053 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 266503051} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0, g: 0.6415094, b: 0.035014484, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 50 - m_FontStyle: 1 - m_BestFit: 0 - m_MinSize: 0 - m_MaxSize: 50 - m_Alignment: 4 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 1 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: DONE! ---- !u!222 &266503054 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 266503051} - m_CullTransparentMesh: 0 ---- !u!114 &266503055 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 266503051} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: cfabb0440166ab443bba8876756fdfa9, type: 3} - m_Name: - m_EditorClassIdentifier: - m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5} - m_EffectDistance: {x: 2, y: -2} - m_UseGraphicAlpha: 1 ---- !u!1001 &288475584 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 3512526509595786538, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_Name - value: TanglePeg - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_RootOrder - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_LocalPosition.x - value: -4.23 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_LocalPosition.z - value: 9.24 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8733900141329501594, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: damping - value: 10 - objectReference: {fileID: 0} - - target: {fileID: 8733900141329501594, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: maxAccel - value: 50 - objectReference: {fileID: 0} - - target: {fileID: 8733900141329501594, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: stiffness - value: 200 - objectReference: {fileID: 0} - - target: {fileID: 8733900141329501594, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: currentSlot - value: - objectReference: {fileID: 1659590737} - - target: {fileID: 8733900141329501594, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: initialSlot - value: - objectReference: {fileID: 1552509777} - - target: {fileID: 8733900141329501594, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: attachedRope - value: - objectReference: {fileID: 1667107467} - - target: {fileID: 8733900141329501594, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: floorCollider - value: - objectReference: {fileID: 1919818300} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} ---- !u!1 &305168489 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 305168490} - - component: {fileID: 305168495} - - component: {fileID: 305168494} - - component: {fileID: 305168493} - - component: {fileID: 305168492} - - component: {fileID: 305168499} - - component: {fileID: 305168491} - - component: {fileID: 305168498} - - component: {fileID: 305168497} - - component: {fileID: 305168496} - m_Layer: 0 - m_Name: Obi Rope (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &305168490 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 305168489} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: 0.9894753, z: -0, w: 0.14470215} - m_LocalPosition: {x: -1.82, y: 0.53, z: 5.57} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1882120510} - m_LocalEulerAnglesHint: {x: 0, y: 163.36, z: 0} ---- !u!114 &305168491 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 305168489} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 305168495} - m_Target: {fileID: 97762688} - m_ParticleGroup: {fileID: 870036912147276740, guid: 04076b9483b7f4ab0a01666d8b2c24cc, type: 2} - m_AttachmentType: 1 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &305168492 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 305168489} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 305168495} - m_Target: {fileID: 479604551} - m_ParticleGroup: {fileID: -5578146735436999353, guid: 04076b9483b7f4ab0a01666d8b2c24cc, type: 2} - m_AttachmentType: 1 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &305168493 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 305168489} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 8} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.8 ---- !u!114 &305168494 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 305168489} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 1 - twist: 0 - indexInSystem: 0 ---- !u!114 &305168495 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 305168489} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000 - m_AlignBytes: 16 - groupID: 1 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 1 - restLength_: 11.621539 - elements: - - particle1: 0 - particle2: 1 - restLength: 0.22932585 - constraintForce: 0 - tearResistance: 1 - - particle1: 1 - particle2: 2 - restLength: 0.23297876 - constraintForce: 0 - tearResistance: 1 - - particle1: 2 - particle2: 3 - restLength: 0.22030348 - constraintForce: 0 - tearResistance: 1 - - particle1: 3 - particle2: 4 - restLength: 0.23245499 - constraintForce: 0 - tearResistance: 1 - - particle1: 4 - particle2: 5 - restLength: 0.23273383 - constraintForce: 0 - tearResistance: 1 - - particle1: 5 - particle2: 6 - restLength: 0.2321907 - constraintForce: 0 - tearResistance: 1 - - particle1: 6 - particle2: 7 - restLength: 0.23624836 - constraintForce: 0 - tearResistance: 1 - - particle1: 7 - particle2: 8 - restLength: 0.24159537 - constraintForce: 0 - tearResistance: 1 - - particle1: 8 - particle2: 9 - restLength: 0.2384483 - constraintForce: 0 - tearResistance: 1 - - particle1: 9 - particle2: 10 - restLength: 0.24000376 - constraintForce: 0 - tearResistance: 1 - - particle1: 10 - particle2: 11 - restLength: 0.24007817 - constraintForce: 0 - tearResistance: 1 - - particle1: 11 - particle2: 12 - restLength: 0.23988771 - constraintForce: 0 - tearResistance: 1 - - particle1: 12 - particle2: 13 - restLength: 0.23976159 - constraintForce: 0 - tearResistance: 1 - - particle1: 13 - particle2: 14 - restLength: 0.23973894 - constraintForce: 0 - tearResistance: 1 - - particle1: 14 - particle2: 15 - restLength: 0.23977098 - constraintForce: 0 - tearResistance: 1 - - particle1: 15 - particle2: 16 - restLength: 0.23982133 - constraintForce: 0 - tearResistance: 1 - - particle1: 16 - particle2: 17 - restLength: 0.23985231 - constraintForce: 0 - tearResistance: 1 - - particle1: 17 - particle2: 18 - restLength: 0.2398558 - constraintForce: 0 - tearResistance: 1 - - particle1: 18 - particle2: 19 - restLength: 0.23984471 - constraintForce: 0 - tearResistance: 1 - - particle1: 19 - particle2: 20 - restLength: 0.2398395 - constraintForce: 0 - tearResistance: 1 - - particle1: 20 - particle2: 21 - restLength: 0.23985398 - constraintForce: 0 - tearResistance: 1 - - particle1: 21 - particle2: 22 - restLength: 0.23981741 - constraintForce: 0 - tearResistance: 1 - - particle1: 22 - particle2: 23 - restLength: 0.23945183 - constraintForce: 0 - tearResistance: 1 - - particle1: 23 - particle2: 24 - restLength: 0.23789816 - constraintForce: 0 - tearResistance: 1 - - particle1: 24 - particle2: 25 - restLength: 0.22202003 - constraintForce: 0 - tearResistance: 1 - - particle1: 25 - particle2: 26 - restLength: 0.22101939 - constraintForce: 0 - tearResistance: 1 - - particle1: 26 - particle2: 27 - restLength: 0.2211481 - constraintForce: 0 - tearResistance: 1 - - particle1: 27 - particle2: 28 - restLength: 0.21999277 - constraintForce: 0 - tearResistance: 1 - - particle1: 28 - particle2: 29 - restLength: 0.21492423 - constraintForce: 0 - tearResistance: 1 - - particle1: 29 - particle2: 30 - restLength: 0.21579246 - constraintForce: 0 - tearResistance: 1 - - particle1: 30 - particle2: 31 - restLength: 0.23888057 - constraintForce: 0 - tearResistance: 1 - - particle1: 31 - particle2: 32 - restLength: 0.23901443 - constraintForce: 0 - tearResistance: 1 - - particle1: 32 - particle2: 33 - restLength: 0.2317226 - constraintForce: 0 - tearResistance: 1 - - particle1: 33 - particle2: 34 - restLength: 0.23366606 - constraintForce: 0 - tearResistance: 1 - - particle1: 34 - particle2: 35 - restLength: 0.24097537 - constraintForce: 0 - tearResistance: 1 - - particle1: 35 - particle2: 36 - restLength: 0.19252713 - constraintForce: 0 - tearResistance: 1 - - particle1: 36 - particle2: 37 - restLength: 0.19266264 - constraintForce: 0 - tearResistance: 1 - - particle1: 37 - particle2: 38 - restLength: 0.19349253 - constraintForce: 0 - tearResistance: 1 - - particle1: 38 - particle2: 39 - restLength: 0.23542406 - constraintForce: 0 - tearResistance: 1 - - particle1: 39 - particle2: 40 - restLength: 0.23618267 - constraintForce: 0 - tearResistance: 1 - - particle1: 40 - particle2: 41 - restLength: 0.2358951 - constraintForce: 0 - tearResistance: 1 - - particle1: 41 - particle2: 42 - restLength: 0.2361207 - constraintForce: 0 - tearResistance: 1 - - particle1: 42 - particle2: 43 - restLength: 0.23587158 - constraintForce: 0 - tearResistance: 1 - - particle1: 43 - particle2: 44 - restLength: 0.23585697 - constraintForce: 0 - tearResistance: 1 - - particle1: 44 - particle2: 45 - restLength: 0.23552683 - constraintForce: 0 - tearResistance: 1 - - particle1: 45 - particle2: 46 - restLength: 0.20203424 - constraintForce: 0 - tearResistance: 1 - - particle1: 46 - particle2: 47 - restLength: 0.20244622 - constraintForce: 0 - tearResistance: 1 - - particle1: 47 - particle2: 48 - restLength: 0.20214584 - constraintForce: 0 - tearResistance: 1 - - particle1: 48 - particle2: 49 - restLength: 0.1943406 - constraintForce: 0 - tearResistance: 1 - - particle1: 49 - particle2: 50 - restLength: 0.2014773 - constraintForce: 0 - tearResistance: 1 - - particle1: 50 - particle2: 51 - restLength: 0.198624 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: 04076b9483b7f4ab0a01666d8b2c24cc, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0.001 - _maxBending: 0.03 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!114 &305168496 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 305168489} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4793f08b8350d44db99d1bc98daf625b, type: 3} - m_Name: - m_EditorClassIdentifier: - outThreshold: 0.08 - inThreshold: 0.05 - outSpeed: 6 - inSpeed: 4 - maxLength: 10 ---- !u!114 &305168497 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 305168489} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8285ac97113f74d449053378d0e3a56b, type: 3} - m_Name: - m_EditorClassIdentifier: - m_CursorMu: 0.1 - m_SourceMu: 0.5 - direction: 1 ---- !u!114 &305168498 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 305168489} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 305168495} - m_Target: {fileID: 97762688} - m_ParticleGroup: {fileID: 7266446776975833462, guid: 04076b9483b7f4ab0a01666d8b2c24cc, type: 2} - m_AttachmentType: 1 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &305168499 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 305168489} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 305168495} - m_Target: {fileID: 479604551} - m_ParticleGroup: {fileID: 946642936072572879, guid: 04076b9483b7f4ab0a01666d8b2c24cc, type: 2} - m_AttachmentType: 1 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!1001 &323187617 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 3512526509595786538, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_Name - value: TanglePeg (1) - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_RootOrder - value: 2 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_LocalPosition.x - value: 1.78 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_LocalPosition.z - value: 4.17 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8733900141329501594, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: damping - value: 10 - objectReference: {fileID: 0} - - target: {fileID: 8733900141329501594, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: maxAccel - value: 50 - objectReference: {fileID: 0} - - target: {fileID: 8733900141329501594, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: stiffness - value: 200 - objectReference: {fileID: 0} - - target: {fileID: 8733900141329501594, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: currentSlot - value: - objectReference: {fileID: 1214958667} - - target: {fileID: 8733900141329501594, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: initialSlot - value: - objectReference: {fileID: 1552509777} - - target: {fileID: 8733900141329501594, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: minDistance - value: 0.05 - objectReference: {fileID: 0} - - target: {fileID: 8733900141329501594, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: attachedRope - value: - objectReference: {fileID: 1667107467} - - target: {fileID: 8733900141329501594, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: floorCollider - value: - objectReference: {fileID: 1919818300} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} ---- !u!114 &466069046 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 8518691974497511176, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - m_PrefabInstance: {fileID: 688047612} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 866212c246a9c4c5797069099ad745aa, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!1001 &479604550 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 3512526509595786538, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_Name - value: TanglePeg (3) - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_RootOrder - value: 4 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_LocalPosition.x - value: 5.01 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_LocalPosition.z - value: 7.62 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8733900141329501594, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: damping - value: 10 - objectReference: {fileID: 0} - - target: {fileID: 8733900141329501594, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: maxAccel - value: 50 - objectReference: {fileID: 0} - - target: {fileID: 8733900141329501594, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: stiffness - value: 200 - objectReference: {fileID: 0} - - target: {fileID: 8733900141329501594, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: currentSlot - value: - objectReference: {fileID: 466069046} - - target: {fileID: 8733900141329501594, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: initialSlot - value: - objectReference: {fileID: 1552509777} - - target: {fileID: 8733900141329501594, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: minDistance - value: 0.05 - objectReference: {fileID: 0} - - target: {fileID: 8733900141329501594, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: attachedRope - value: - objectReference: {fileID: 305168495} - - target: {fileID: 8733900141329501594, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - propertyPath: floorCollider - value: - objectReference: {fileID: 1919818300} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} ---- !u!4 &479604551 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - m_PrefabInstance: {fileID: 479604550} - m_PrefabAsset: {fileID: 0} ---- !u!1 &615688258 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 615688260} - - component: {fileID: 615688259} - m_Layer: 0 - m_Name: Directional Light - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!108 &615688259 -Light: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 615688258} - m_Enabled: 1 - serializedVersion: 11 - m_Type: 1 - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_Intensity: 1 - m_Range: 10 - m_SpotAngle: 30 - m_InnerSpotAngle: 21.80208 - m_CookieSize: 10 - m_Shadows: - m_Type: 2 - m_Resolution: -1 - m_CustomResolution: -1 - m_Strength: 1 - m_Bias: 0.05 - m_NormalBias: 0.4 - m_NearPlane: 0.2 - m_CullingMatrixOverride: - e00: 1 - e01: 0 - e02: 0 - e03: 0 - e10: 0 - e11: 1 - e12: 0 - e13: 0 - e20: 0 - e21: 0 - e22: 1 - e23: 0 - e30: 0 - e31: 0 - e32: 0 - e33: 1 - m_UseCullingMatrixOverride: 0 - m_Cookie: {fileID: 0} - m_DrawHalo: 0 - m_Flare: {fileID: 0} - m_RenderMode: 0 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingLayerMask: 1 - m_Lightmapping: 4 - m_LightShadowCasterMode: 0 - m_AreaSize: {x: 1, y: 1} - m_BounceIntensity: 1 - m_ColorTemperature: 6570 - m_UseColorTemperature: 0 - m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} - m_UseBoundingSphereOverride: 0 - m_UseViewFrustumForShadowCasterCull: 1 - m_ForceVisible: 0 - m_ShadowRadius: 0 - m_ShadowAngle: 0 - m_LightUnit: 1 - m_LuxAtDistance: 1 - m_EnableSpotReflector: 1 ---- !u!4 &615688260 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 615688258} - serializedVersion: 2 - m_LocalRotation: {x: 0.8158533, y: -0.114026494, z: -0.1604958, w: 0.5437118} - m_LocalPosition: {x: 0, y: 3, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 58.274, y: -132.793, z: -136.708} ---- !u!1001 &688047612 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 3512526509595786538, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_Name - value: TanglePegSlot (1) - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_RootOrder - value: 6 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalPosition.x - value: 5.01 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalPosition.y - value: 0.1 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalPosition.z - value: 7.62 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} ---- !u!1001 &823195943 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 3512526509595786538, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_Name - value: TanglePegSlot (8) - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_RootOrder - value: 13 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalPosition.x - value: -4.82 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalPosition.y - value: 0.1 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalPosition.z - value: -2.52 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} ---- !u!1 &876719292 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 876719296} - - component: {fileID: 876719295} - - component: {fileID: 876719294} - - component: {fileID: 876719293} - m_Layer: 5 - m_Name: Canvas - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &876719293 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 876719292} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} - m_Name: - m_EditorClassIdentifier: - m_IgnoreReversedGraphics: 1 - m_BlockingObjects: 0 - m_BlockingMask: - serializedVersion: 2 - m_Bits: 4294967295 ---- !u!114 &876719294 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 876719292} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} - m_Name: - m_EditorClassIdentifier: - m_UiScaleMode: 0 - m_ReferencePixelsPerUnit: 100 - m_ScaleFactor: 1 - m_ReferenceResolution: {x: 800, y: 600} - m_ScreenMatchMode: 0 - m_MatchWidthOrHeight: 0 - m_PhysicalUnit: 3 - m_FallbackScreenDPI: 96 - m_DefaultSpriteDPI: 96 - m_DynamicPixelsPerUnit: 1 - m_PresetInfoIsWorld: 0 ---- !u!223 &876719295 -Canvas: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 876719292} - m_Enabled: 1 - serializedVersion: 3 - m_RenderMode: 0 - m_Camera: {fileID: 0} - m_PlaneDistance: 100 - m_PixelPerfect: 0 - m_ReceivesEvents: 1 - m_OverrideSorting: 0 - m_OverridePixelPerfect: 0 - m_SortingBucketNormalizedSize: 0 - m_VertexColorAlwaysGammaSpace: 0 - m_AdditionalShaderChannelsFlag: 1 - m_UpdateRectTransformForStandalone: 0 - m_SortingLayerID: 0 - m_SortingOrder: 0 - m_TargetDisplay: 0 ---- !u!224 &876719296 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 876719292} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0, y: 0, z: 0} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 178620545} - - {fileID: 1406884019} - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0, y: 0} ---- !u!1001 &910299761 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 3512526509595786538, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_Name - value: TanglePegSlot - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_RootOrder - value: 5 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalPosition.x - value: -4.25 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalPosition.y - value: 0.1 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalPosition.z - value: 9.18 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} ---- !u!1001 &935761107 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 3512526509595786538, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_Name - value: TanglePegSlot (3) - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_RootOrder - value: 8 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalPosition.x - value: 1.47 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalPosition.y - value: 0.1 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalPosition.z - value: 9.1 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} ---- !u!4 &1050440698 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - m_PrefabInstance: {fileID: 323187617} - m_PrefabAsset: {fileID: 0} ---- !u!114 &1172523946 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 8518691974497511176, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - m_PrefabInstance: {fileID: 935761107} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 866212c246a9c4c5797069099ad745aa, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!114 &1204416257 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 8518691974497511176, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - m_PrefabInstance: {fileID: 1364003720} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 866212c246a9c4c5797069099ad745aa, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!114 &1214958667 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 8518691974497511176, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - m_PrefabInstance: {fileID: 1730283847} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 866212c246a9c4c5797069099ad745aa, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!1001 &1364003720 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 3512526509595786538, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_Name - value: TanglePegSlot (5) - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_RootOrder - value: 10 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalPosition.x - value: -5.08 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalPosition.y - value: 0.1 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalPosition.z - value: 2.48 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} ---- !u!1001 &1378923494 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 3512526509595786538, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_Name - value: TanglePegSlot (6) - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_RootOrder - value: 11 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalPosition.x - value: -1.42 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalPosition.y - value: 0.1 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalPosition.z - value: 0.14 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} ---- !u!4 &1386711891 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 3512526509595786583, guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a, type: 3} - m_PrefabInstance: {fileID: 288475584} - m_PrefabAsset: {fileID: 0} ---- !u!1 &1406884018 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1406884019} - m_Layer: 5 - m_Name: FinishMessage - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!224 &1406884019 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1406884018} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 266503052} - m_Father: {fileID: 876719296} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 824, y: 590} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1514826402 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 8518691974497511176, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - m_PrefabInstance: {fileID: 260969642} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 866212c246a9c4c5797069099ad745aa, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!4 &1552509777 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - m_PrefabInstance: {fileID: 910299761} - m_PrefabAsset: {fileID: 0} ---- !u!1 &1612476492 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1612476495} - - component: {fileID: 1612476494} - - component: {fileID: 1612476493} - m_Layer: 0 - m_Name: Main Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!81 &1612476493 -AudioListener: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1612476492} - m_Enabled: 1 ---- !u!20 &1612476494 -Camera: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1612476492} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} - m_projectionMatrixMode: 1 - m_GateFitMode: 2 - m_FOVAxisMode: 0 - m_Iso: 200 - m_ShutterSpeed: 0.005 - m_Aperture: 16 - m_FocusDistance: 10 - m_FocalLength: 50 - m_BladeCount: 5 - m_Curvature: {x: 2, y: 11} - m_BarrelClipping: 0.25 - m_Anamorphism: 0 - m_SensorSize: {x: 36, y: 24} - m_LensShift: {x: 0, y: 0} - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - far clip plane: 1000 - field of view: 20 - orthographic: 0 - orthographic size: 5 - m_Depth: -1 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 3 - m_HDR: 1 - m_AllowMSAA: 1 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!4 &1612476495 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1612476492} - serializedVersion: 2 - m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} - m_LocalPosition: {x: 0, y: 49.48, z: 2.9} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} ---- !u!114 &1659590737 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 8518691974497511176, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - m_PrefabInstance: {fileID: 910299761} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 866212c246a9c4c5797069099ad745aa, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!1 &1667107463 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1667107464} - - component: {fileID: 1667107467} - - component: {fileID: 1667107466} - - component: {fileID: 1667107465} - - component: {fileID: 1667107469} - - component: {fileID: 1667107473} - - component: {fileID: 1667107468} - - component: {fileID: 1667107472} - - component: {fileID: 1667107471} - - component: {fileID: 1667107470} - m_Layer: 0 - m_Name: Obi Rope - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1667107464 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1667107463} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: 0.34358987, z: -0, w: 0.9391198} - m_LocalPosition: {x: 1.13, y: 0.53, z: 4.71} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1882120510} - m_LocalEulerAnglesHint: {x: 0, y: 40.191, z: 0} ---- !u!114 &1667107465 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1667107463} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 44ab0cc40b59345718856f6e1c1225f3, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 1, y: 8} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.8 ---- !u!114 &1667107466 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1667107463} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 1 - twist: 0 - indexInSystem: 1 ---- !u!114 &1667107467 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1667107463} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b0000007c0000007d0000007e0000007f000000800000008100000082000000830000008400000085000000860000008700000088000000890000008a0000008b0000008c0000008d0000008e0000008f000000900000009100000092000000930000009400000095000000960000009700000098000000990000009a0000009b0000009c0000009d0000009e0000009f000000a0000000a1000000a2000000a3000000a4000000a5000000a6000000a7000000a8000000a9000000aa000000ab000000ac000000ad000000ae000000af000000b0000000b1000000b2000000 - m_AlignBytes: 16 - groupID: 2 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 1 - restLength_: 8.8720665 - elements: - - particle1: 102 - particle2: 103 - restLength: 0.20002283 - constraintForce: 0 - tearResistance: 1 - - particle1: 103 - particle2: 104 - restLength: 0.19997717 - constraintForce: 0 - tearResistance: 1 - - particle1: 104 - particle2: 105 - restLength: 0.35217127 - constraintForce: 0 - tearResistance: 1 - - particle1: 105 - particle2: 106 - restLength: 0.37707853 - constraintForce: 0 - tearResistance: 1 - - particle1: 106 - particle2: 107 - restLength: 0.37768462 - constraintForce: 0 - tearResistance: 1 - - particle1: 107 - particle2: 108 - restLength: 0.3818593 - constraintForce: 0 - tearResistance: 1 - - particle1: 108 - particle2: 109 - restLength: 0.38565263 - constraintForce: 0 - tearResistance: 1 - - particle1: 109 - particle2: 110 - restLength: 0.38304582 - constraintForce: 0 - tearResistance: 1 - - particle1: 110 - particle2: 111 - restLength: 0.38444158 - constraintForce: 0 - tearResistance: 1 - - particle1: 111 - particle2: 112 - restLength: 0.3847864 - constraintForce: 0 - tearResistance: 1 - - particle1: 112 - particle2: 113 - restLength: 0.38408214 - constraintForce: 0 - tearResistance: 1 - - particle1: 113 - particle2: 114 - restLength: 0.384023 - constraintForce: 0 - tearResistance: 1 - - particle1: 114 - particle2: 115 - restLength: 0.38424167 - constraintForce: 0 - tearResistance: 1 - - particle1: 115 - particle2: 116 - restLength: 0.3842686 - constraintForce: 0 - tearResistance: 1 - - particle1: 116 - particle2: 117 - restLength: 0.38410887 - constraintForce: 0 - tearResistance: 1 - - particle1: 117 - particle2: 118 - restLength: 0.38368052 - constraintForce: 0 - tearResistance: 1 - - particle1: 118 - particle2: 119 - restLength: 0.3848515 - constraintForce: 0 - tearResistance: 1 - - particle1: 119 - particle2: 120 - restLength: 0.38470802 - constraintForce: 0 - tearResistance: 1 - - particle1: 120 - particle2: 121 - restLength: 0.38331065 - constraintForce: 0 - tearResistance: 1 - - particle1: 121 - particle2: 122 - restLength: 0.3852491 - constraintForce: 0 - tearResistance: 1 - - particle1: 122 - particle2: 123 - restLength: 0.3818891 - constraintForce: 0 - tearResistance: 1 - - particle1: 123 - particle2: 124 - restLength: 0.27774453 - constraintForce: 0 - tearResistance: 1 - - particle1: 124 - particle2: 125 - restLength: 0.27794865 - constraintForce: 0 - tearResistance: 1 - - particle1: 125 - particle2: 126 - restLength: 0.26502654 - constraintForce: 0 - tearResistance: 1 - - particle1: 126 - particle2: 127 - restLength: 0.20194809 - constraintForce: 0 - tearResistance: 1 - - particle1: 127 - particle2: 128 - restLength: 0.19826613 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: 4d31372b30ca34527b534f09a803ab15, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0.001 - _maxBending: 0.03 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!114 &1667107468 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1667107463} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1667107467} - m_Target: {fileID: 1050440698} - m_ParticleGroup: {fileID: 870036912147276740, guid: 4d31372b30ca34527b534f09a803ab15, type: 2} - m_AttachmentType: 1 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1667107469 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1667107463} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1667107467} - m_Target: {fileID: 1386711891} - m_ParticleGroup: {fileID: -5578146735436999353, guid: 4d31372b30ca34527b534f09a803ab15, type: 2} - m_AttachmentType: 1 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1667107470 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1667107463} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4793f08b8350d44db99d1bc98daf625b, type: 3} - m_Name: - m_EditorClassIdentifier: - outThreshold: 0.08 - inThreshold: 0.05 - outSpeed: 6 - inSpeed: 4 - maxLength: 10 ---- !u!114 &1667107471 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1667107463} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8285ac97113f74d449053378d0e3a56b, type: 3} - m_Name: - m_EditorClassIdentifier: - m_CursorMu: 0.1 - m_SourceMu: 0.5 - direction: 1 ---- !u!114 &1667107472 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1667107463} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1667107467} - m_Target: {fileID: 1050440698} - m_ParticleGroup: {fileID: -4709438462163914631, guid: 4d31372b30ca34527b534f09a803ab15, type: 2} - m_AttachmentType: 1 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &1667107473 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1667107463} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1667107467} - m_Target: {fileID: 1386711891} - m_ParticleGroup: {fileID: 4876123546338928666, guid: 4d31372b30ca34527b534f09a803ab15, type: 2} - m_AttachmentType: 1 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!1 &1693740762 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1693740764} - - component: {fileID: 1693740763} - m_Layer: 0 - m_Name: BurstCollisionWorld - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1693740763 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1693740762} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f1a161c4294214a4fbcb7e9e94800494, type: 3} - m_Name: - m_EditorClassIdentifier: - cellSpans: - m_AlignBytes: 16 ---- !u!4 &1693740764 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1693740762} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1710671967 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 8518691974497511176, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - m_PrefabInstance: {fileID: 1378923494} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 866212c246a9c4c5797069099ad745aa, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!1001 &1730283847 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 3512526509595786538, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_Name - value: TanglePegSlot (4) - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_RootOrder - value: 9 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalPosition.x - value: 1.8 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalPosition.y - value: 0.1 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalPosition.z - value: 4.12 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} ---- !u!1001 &1755147364 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 3512526509595786538, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_Name - value: TanglePegSlot (9) - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_RootOrder - value: 14 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalPosition.x - value: 1.07 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalPosition.y - value: 0.1 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalPosition.z - value: -2.68 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} ---- !u!114 &1810868009 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 8518691974497511176, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - m_PrefabInstance: {fileID: 1861307011} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 866212c246a9c4c5797069099ad745aa, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!1001 &1861307011 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 3512526509595786538, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_Name - value: TanglePegSlot (7) - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_RootOrder - value: 12 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalPosition.x - value: 4.31 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalPosition.y - value: 0.1 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalPosition.z - value: 1.25 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3512526509595786583, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} ---- !u!1 &1882120507 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1882120510} - - component: {fileID: 1882120509} - - component: {fileID: 1882120511} - m_Layer: 0 - m_Name: Obi Solver - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1882120509 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1882120507} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9d174fab52f0c4b8399f25d5c3ea524c, type: 3} - m_Name: - m_EditorClassIdentifier: - simulateWhenInvisible: 1 - m_Backend: 1 - substeps: 12 - maxStepsPerFrame: 1 - synchronization: 1 - parameters: - mode: 0 - interpolation: 0 - gravity: {x: 0, y: 0, z: 0} - ambientWind: {x: 0, y: 0, z: 0} - foamGravityScale: 1 - damping: 0.8 - maxAnisotropy: 3 - sleepThreshold: 0.005 - maxVelocity: 20 - maxAngularVelocity: 10 - collisionMargin: 0.15 - maxDepenetration: 50 - colliderCCD: 1 - particleCCD: 1 - shockPropagation: 0 - surfaceCollisionIterations: 16 - surfaceCollisionTolerance: 0.001 - diffusionMask: {x: 1, y: 1, z: 1, w: 1} - m_MaxSurfaceChunks: 32768 - maxQueryResults: 8192 - maxFoamParticles: 8192 - maxParticleNeighbors: 128 - maxParticleContacts: 4 - useLimits: 0 - killOffLimitsParticles: 0 - boundaryLimits: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 5, y: 5, z: 5} - gravity: {x: 0, y: -9.81, z: 0} - gravitySpace: 1 - ambientWind: {x: 0, y: 0, z: 0} - windSpace: 1 - foamSubsteps: 1 - foamMinNeighbors: 3 - foamCollisions: 0 - maxFoamVelocityStretch: 0.3 - foamRadiusScale: 1 - foamFade: {x: 0.05, y: 0.8} - foamAccelAgingRange: {x: 0.5, y: 0.8} - foamAccelAging: 4 - foamVolumeDensity: 0.1 - foamAmbientDensity: 0.02 - foamScatterColor: {r: 0.8, g: 0.75, b: 0.7, a: 1} - foamAmbientColor: {r: 0.4, g: 0.5, b: 0.6, a: 1} - worldLinearInertiaScale: 0 - worldAngularInertiaScale: 0 - synchronousSpatialQueries: 0 - distanceConstraintParameters: - evaluationOrder: 0 - iterations: 3 - SORFactor: 1 - enabled: 1 - bendingConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 - particleCollisionConstraintParameters: - evaluationOrder: 0 - iterations: 3 - SORFactor: 1 - enabled: 1 - particleFrictionConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 - collisionConstraintParameters: - evaluationOrder: 0 - iterations: 1 - SORFactor: 1 - enabled: 1 - frictionConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 0 - skinConstraintParameters: - evaluationOrder: 0 - iterations: 1 - SORFactor: 1 - enabled: 0 - volumeConstraintParameters: - evaluationOrder: 1 - iterations: 2 - SORFactor: 1 - enabled: 0 - shapeMatchingConstraintParameters: - evaluationOrder: 1 - iterations: 3 - SORFactor: 1 - enabled: 0 - tetherConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 0 - pinConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 - pinholeConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 - stitchConstraintParameters: - evaluationOrder: 1 - iterations: 2 - SORFactor: 1 - enabled: 0 - densityConstraintParameters: - evaluationOrder: 1 - iterations: 2 - SORFactor: 1 - enabled: 0 - stretchShearConstraintParameters: - evaluationOrder: 0 - iterations: 3 - SORFactor: 1 - enabled: 0 - bendTwistConstraintParameters: - evaluationOrder: 0 - iterations: 3 - SORFactor: 1 - enabled: 0 - chainConstraintParameters: - evaluationOrder: 0 - iterations: 3 - SORFactor: 1 - enabled: 0 ---- !u!4 &1882120510 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1882120507} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 1667107464} - - {fileID: 305168490} - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1882120511 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1882120507} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c1cdc16773c1f4ebe94e32c3ae0005bf, type: 3} - m_Name: - m_EditorClassIdentifier: - pegSlots: - - {fileID: 1659590737} - - {fileID: 466069046} - - {fileID: 1514826402} - - {fileID: 1172523946} - - {fileID: 1214958667} - - {fileID: 1204416257} - - {fileID: 1710671967} - - {fileID: 1810868009} - - {fileID: 2078187095} - - {fileID: 2016144237} - pegHoverHeight: 2 - maxPegDistanceFromSlot: 1.5 - framesWithoutContactsToWin: 30 - onFinish: - m_PersistentCalls: - m_Calls: - - m_Target: {fileID: 1406884018} - m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine - m_MethodName: SetActive - m_Mode: 6 - m_Arguments: - m_ObjectArgument: {fileID: 0} - m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine - m_IntArgument: 0 - m_FloatArgument: 0 - m_StringArgument: - m_BoolArgument: 1 - m_CallState: 2 ---- !u!1 &1919818295 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1919818299} - - component: {fileID: 1919818298} - - component: {fileID: 1919818297} - - component: {fileID: 1919818300} - - component: {fileID: 1919818301} - m_Layer: 0 - m_Name: Plane - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!23 &1919818297 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1919818295} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: 359ef2e4b09204eeab112e419c308068, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!33 &1919818298 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1919818295} - m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1919818299 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1919818295} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 5, y: 5, z: 5} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!65 &1919818300 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1919818295} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Size: {x: 10, y: 1, z: 10} - m_Center: {x: 0, y: -0.5, z: 0} ---- !u!114 &1919818301 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1919818295} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6757b231cedd544c583ef8aeaf773b2a, type: 3} - m_Name: - m_EditorClassIdentifier: - thickness: 0 - inverted: 0 - material: {fileID: 0} - filter: -65535 - m_SourceCollider: {fileID: 1919818300} - m_DistanceField: {fileID: 0} ---- !u!114 &2016144237 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 8518691974497511176, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - m_PrefabInstance: {fileID: 1755147364} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 866212c246a9c4c5797069099ad745aa, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!114 &2078187095 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 8518691974497511176, guid: aa6b142bbb2bb4887bebe33010c84c6c, type: 3} - m_PrefabInstance: {fileID: 823195943} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 866212c246a9c4c5797069099ad745aa, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!1660057539 &9223372036854775807 -SceneRoots: - m_ObjectHideFlags: 0 - m_Roots: - - {fileID: 1612476495} - - {fileID: 288475584} - - {fileID: 323187617} - - {fileID: 97762687} - - {fileID: 479604550} - - {fileID: 910299761} - - {fileID: 688047612} - - {fileID: 260969642} - - {fileID: 935761107} - - {fileID: 1730283847} - - {fileID: 1364003720} - - {fileID: 1378923494} - - {fileID: 1861307011} - - {fileID: 823195943} - - {fileID: 1755147364} - - {fileID: 615688260} - - {fileID: 1919818299} - - {fileID: 1882120510} - - {fileID: 876719296} - - {fileID: 1693740764} diff --git a/Assets/Obi/Samples/RopeAndRod/VineSwinging.unity b/Assets/Obi/Samples/RopeAndRod/VineSwinging.unity deleted file mode 100644 index 37912e229..000000000 --- a/Assets/Obi/Samples/RopeAndRod/VineSwinging.unity +++ /dev/null @@ -1,2506 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!29 &1 -OcclusionCullingSettings: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_OcclusionBakeSettings: - smallestOccluder: 5 - smallestHole: 0.25 - backfaceThreshold: 100 - m_SceneGUID: 00000000000000000000000000000000 - m_OcclusionCullingData: {fileID: 0} ---- !u!104 &2 -RenderSettings: - m_ObjectHideFlags: 0 - serializedVersion: 10 - m_Fog: 0 - m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - m_FogMode: 3 - m_FogDensity: 0.01 - m_LinearFogStart: 0 - m_LinearFogEnd: 300 - m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} - m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} - m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} - m_AmbientIntensity: 1 - m_AmbientMode: 0 - m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} - m_HaloStrength: 0.5 - m_FlareStrength: 1 - m_FlareFadeSpeed: 3 - m_HaloTexture: {fileID: 0} - m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} - m_DefaultReflectionMode: 0 - m_DefaultReflectionResolution: 128 - m_ReflectionBounces: 1 - m_ReflectionIntensity: 1 - m_CustomReflection: {fileID: 0} - m_Sun: {fileID: 0} - m_UseRadianceAmbientProbe: 0 ---- !u!157 &3 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 13 - m_BakeOnSceneLoad: 1 - m_GISettings: - serializedVersion: 2 - m_BounceScale: 1 - m_IndirectOutputScale: 1 - m_AlbedoBoost: 1 - m_EnvironmentLightingMode: 0 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 1 - m_LightmapEditorSettings: - serializedVersion: 12 - m_Resolution: 2 - m_BakeResolution: 40 - m_AtlasSize: 1024 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 1 - m_CompAOExponentDirect: 0 - m_ExtractAmbientOcclusion: 0 - m_Padding: 2 - m_LightmapParameters: {fileID: 0} - m_LightmapsBakeMode: 1 - m_TextureCompression: 1 - m_ReflectionCompression: 2 - m_MixedBakeMode: 2 - m_BakeBackend: 0 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 500 - m_PVRBounces: 2 - m_PVREnvironmentSampleCount: 500 - m_PVREnvironmentReferencePointCount: 2048 - m_PVRFilteringMode: 2 - m_PVRDenoiserTypeDirect: 0 - m_PVRDenoiserTypeIndirect: 0 - m_PVRDenoiserTypeAO: 0 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVREnvironmentMIS: 0 - m_PVRCulling: 1 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 5 - m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_ExportTrainingData: 0 - m_TrainingDataDestination: TrainingData - m_LightProbeSampleCountMultiplier: 4 - m_LightingDataAsset: {fileID: 20201, guid: 0000000000000000f000000000000000, type: 0} - m_LightingSettings: {fileID: 4890085278179872738, guid: 6530f45834fcb41a0b4b10b622d95c4c, type: 2} ---- !u!196 &4 -NavMeshSettings: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_BuildSettings: - serializedVersion: 3 - agentTypeID: 0 - agentRadius: 0.5 - agentHeight: 2 - agentSlope: 45 - agentClimb: 0.4 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - minRegionArea: 2 - manualCellSize: 0 - cellSize: 0.16666667 - manualTileSize: 0 - tileSize: 256 - buildHeightMesh: 0 - maxJobWorkers: 0 - preserveTilesOutsideBounds: 0 - debug: - m_Flags: 0 - m_NavMeshData: {fileID: 0} ---- !u!1 &867634196 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 867634197} - - component: {fileID: 867634202} - - component: {fileID: 867634201} - - component: {fileID: 867634200} - - component: {fileID: 867634199} - - component: {fileID: 867634198} - m_Layer: 0 - m_Name: Obi Rope (2) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &867634197 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 867634196} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: -3.31, y: 8.44, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 2108375383} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &867634198 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 867634196} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 867634202} - m_Target: {fileID: 867634197} - m_ParticleGroup: {fileID: 6295150216905737680, guid: 47284b33117284d61b3df44d2620531e, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &867634199 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 867634196} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 867634202} - m_Target: {fileID: 867634197} - m_ParticleGroup: {fileID: -5470652867224400354, guid: 47284b33117284d61b3df44d2620531e, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &867634200 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 867634196} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 071b3247e825f4ba386cdc8e25c6a3e1, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 0, y: 1} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.8 ---- !u!114 &867634201 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 867634196} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 0 ---- !u!114 &867634202 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 867634196} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b0000007c0000007d0000007e0000007f000000800000008100000082000000830000008400000085000000860000008700000088000000890000008a000000 - m_AlignBytes: 16 - groupID: 1 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 1 - restLength_: 7.4081273 - elements: - - particle1: 0 - particle2: 1 - restLength: 0.19471678 - constraintForce: 0 - tearResistance: 1 - - particle1: 1 - particle2: 2 - restLength: 0.19522926 - constraintForce: 0 - tearResistance: 1 - - particle1: 2 - particle2: 3 - restLength: 0.19563924 - constraintForce: 0 - tearResistance: 1 - - particle1: 3 - particle2: 4 - restLength: 0.1955207 - constraintForce: 0 - tearResistance: 1 - - particle1: 4 - particle2: 5 - restLength: 0.19515753 - constraintForce: 0 - tearResistance: 1 - - particle1: 5 - particle2: 6 - restLength: 0.19533375 - constraintForce: 0 - tearResistance: 1 - - particle1: 6 - particle2: 7 - restLength: 0.1954279 - constraintForce: 0 - tearResistance: 1 - - particle1: 7 - particle2: 8 - restLength: 0.19547167 - constraintForce: 0 - tearResistance: 1 - - particle1: 8 - particle2: 9 - restLength: 0.19548716 - constraintForce: 0 - tearResistance: 1 - - particle1: 9 - particle2: 10 - restLength: 0.1954874 - constraintForce: 0 - tearResistance: 1 - - particle1: 10 - particle2: 11 - restLength: 0.19548036 - constraintForce: 0 - tearResistance: 1 - - particle1: 11 - particle2: 12 - restLength: 0.19546823 - constraintForce: 0 - tearResistance: 1 - - particle1: 12 - particle2: 13 - restLength: 0.19545245 - constraintForce: 0 - tearResistance: 1 - - particle1: 13 - particle2: 14 - restLength: 0.195432 - constraintForce: 0 - tearResistance: 1 - - particle1: 14 - particle2: 15 - restLength: 0.19540726 - constraintForce: 0 - tearResistance: 1 - - particle1: 15 - particle2: 16 - restLength: 0.19537927 - constraintForce: 0 - tearResistance: 1 - - particle1: 16 - particle2: 17 - restLength: 0.19535266 - constraintForce: 0 - tearResistance: 1 - - particle1: 17 - particle2: 18 - restLength: 0.195334 - constraintForce: 0 - tearResistance: 1 - - particle1: 18 - particle2: 19 - restLength: 0.19533606 - constraintForce: 0 - tearResistance: 1 - - particle1: 19 - particle2: 20 - restLength: 0.19449836 - constraintForce: 0 - tearResistance: 1 - - particle1: 20 - particle2: 21 - restLength: 0.19448991 - constraintForce: 0 - tearResistance: 1 - - particle1: 21 - particle2: 22 - restLength: 0.19450329 - constraintForce: 0 - tearResistance: 1 - - particle1: 22 - particle2: 23 - restLength: 0.19452573 - constraintForce: 0 - tearResistance: 1 - - particle1: 23 - particle2: 24 - restLength: 0.19455256 - constraintForce: 0 - tearResistance: 1 - - particle1: 24 - particle2: 25 - restLength: 0.19457635 - constraintForce: 0 - tearResistance: 1 - - particle1: 25 - particle2: 26 - restLength: 0.19459741 - constraintForce: 0 - tearResistance: 1 - - particle1: 26 - particle2: 27 - restLength: 0.19461422 - constraintForce: 0 - tearResistance: 1 - - particle1: 27 - particle2: 28 - restLength: 0.19462651 - constraintForce: 0 - tearResistance: 1 - - particle1: 28 - particle2: 29 - restLength: 0.19463308 - constraintForce: 0 - tearResistance: 1 - - particle1: 29 - particle2: 30 - restLength: 0.19463125 - constraintForce: 0 - tearResistance: 1 - - particle1: 30 - particle2: 31 - restLength: 0.19461548 - constraintForce: 0 - tearResistance: 1 - - particle1: 31 - particle2: 32 - restLength: 0.19457068 - constraintForce: 0 - tearResistance: 1 - - particle1: 32 - particle2: 33 - restLength: 0.19447827 - constraintForce: 0 - tearResistance: 1 - - particle1: 33 - particle2: 34 - restLength: 0.19430716 - constraintForce: 0 - tearResistance: 1 - - particle1: 34 - particle2: 35 - restLength: 0.19474815 - constraintForce: 0 - tearResistance: 1 - - particle1: 35 - particle2: 36 - restLength: 0.19477007 - constraintForce: 0 - tearResistance: 1 - - particle1: 36 - particle2: 37 - restLength: 0.19438897 - constraintForce: 0 - tearResistance: 1 - - particle1: 37 - particle2: 38 - restLength: 0.19388771 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: 47284b33117284d61b3df44d2620531e, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0.001 - _maxBending: 0.03 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &929120241 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 929120242} - - component: {fileID: 929120246} - - component: {fileID: 929120245} - - component: {fileID: 929120244} - - component: {fileID: 929120243} - m_Layer: 0 - m_Name: Obi Rope (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &929120242 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 929120241} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: 3.45, y: 8.44, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 2108375383} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &929120243 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 929120241} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 929120246} - m_Target: {fileID: 929120242} - m_ParticleGroup: {fileID: -5470652867224400354, guid: b6dc10b6408e440aaa60cfca8e7dd7d1, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!114 &929120244 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 929120241} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 071b3247e825f4ba386cdc8e25c6a3e1, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 0, y: 1} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.8 ---- !u!114 &929120245 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 929120241} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 1 ---- !u!114 &929120246 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 929120241} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 8b0000008c0000008d0000008e0000008f000000900000009100000092000000930000009400000095000000960000009700000098000000990000009a0000009b0000009c0000009d0000009e0000009f000000a0000000a1000000a2000000a3000000a4000000a5000000a6000000a7000000a8000000a9000000aa000000ab000000ac000000ad000000ae000000af000000b0000000b1000000b2000000b3000000b4000000b5000000b6000000b7000000b8000000b9000000ba000000bb000000bc000000bd000000be000000bf000000c0000000c1000000c2000000c3000000c4000000c5000000c6000000c7000000c8000000c9000000ca000000cb000000cc000000cd000000ce000000cf000000d0000000d1000000d2000000d3000000d4000000d5000000d6000000d7000000d8000000d9000000da000000db000000dc000000dd000000de000000df000000e0000000e1000000e2000000e3000000e4000000e5000000e6000000e7000000e8000000e9000000ea000000eb000000ec000000ed000000ee000000ef000000f0000000f1000000f2000000f3000000f4000000f5000000f6000000f7000000f8000000f9000000fa000000fb000000fc000000fd000000fe000000ff000000000100000101000002010000030100000401000005010000060100000701000008010000090100000a0100000b0100000c0100000d0100000e0100000f010000100100001101000012010000 - m_AlignBytes: 16 - groupID: 2 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 1 - restLength_: 6.8625426 - elements: - - particle1: 139 - particle2: 140 - restLength: 0.19031 - constraintForce: 0 - tearResistance: 1 - - particle1: 140 - particle2: 141 - restLength: 0.19603348 - constraintForce: 0 - tearResistance: 1 - - particle1: 141 - particle2: 142 - restLength: 0.19495249 - constraintForce: 0 - tearResistance: 1 - - particle1: 142 - particle2: 143 - restLength: 0.19936419 - constraintForce: 0 - tearResistance: 1 - - particle1: 143 - particle2: 144 - restLength: 0.19567776 - constraintForce: 0 - tearResistance: 1 - - particle1: 144 - particle2: 145 - restLength: 0.19566679 - constraintForce: 0 - tearResistance: 1 - - particle1: 145 - particle2: 146 - restLength: 0.19812584 - constraintForce: 0 - tearResistance: 1 - - particle1: 146 - particle2: 147 - restLength: 0.194808 - constraintForce: 0 - tearResistance: 1 - - particle1: 147 - particle2: 148 - restLength: 0.1975255 - constraintForce: 0 - tearResistance: 1 - - particle1: 148 - particle2: 149 - restLength: 0.19576502 - constraintForce: 0 - tearResistance: 1 - - particle1: 149 - particle2: 150 - restLength: 0.19633389 - constraintForce: 0 - tearResistance: 1 - - particle1: 150 - particle2: 151 - restLength: 0.19708109 - constraintForce: 0 - tearResistance: 1 - - particle1: 151 - particle2: 152 - restLength: 0.19544911 - constraintForce: 0 - tearResistance: 1 - - particle1: 152 - particle2: 153 - restLength: 0.19775653 - constraintForce: 0 - tearResistance: 1 - - particle1: 153 - particle2: 154 - restLength: 0.19524312 - constraintForce: 0 - tearResistance: 1 - - particle1: 154 - particle2: 155 - restLength: 0.1966927 - constraintForce: 0 - tearResistance: 1 - - particle1: 155 - particle2: 156 - restLength: 0.19639277 - constraintForce: 0 - tearResistance: 1 - - particle1: 156 - particle2: 157 - restLength: 0.19618559 - constraintForce: 0 - tearResistance: 1 - - particle1: 157 - particle2: 158 - restLength: 0.19639325 - constraintForce: 0 - tearResistance: 1 - - particle1: 158 - particle2: 159 - restLength: 0.19669223 - constraintForce: 0 - tearResistance: 1 - - particle1: 159 - particle2: 160 - restLength: 0.19524348 - constraintForce: 0 - tearResistance: 1 - - particle1: 160 - particle2: 161 - restLength: 0.19775689 - constraintForce: 0 - tearResistance: 1 - - particle1: 161 - particle2: 162 - restLength: 0.1954484 - constraintForce: 0 - tearResistance: 1 - - particle1: 162 - particle2: 163 - restLength: 0.19708097 - constraintForce: 0 - tearResistance: 1 - - particle1: 163 - particle2: 164 - restLength: 0.19633389 - constraintForce: 0 - tearResistance: 1 - - particle1: 164 - particle2: 165 - restLength: 0.19576448 - constraintForce: 0 - tearResistance: 1 - - particle1: 165 - particle2: 166 - restLength: 0.19752663 - constraintForce: 0 - tearResistance: 1 - - particle1: 166 - particle2: 167 - restLength: 0.19480836 - constraintForce: 0 - tearResistance: 1 - - particle1: 167 - particle2: 168 - restLength: 0.19812632 - constraintForce: 0 - tearResistance: 1 - - particle1: 168 - particle2: 169 - restLength: 0.19566579 - constraintForce: 0 - tearResistance: 1 - - particle1: 169 - particle2: 170 - restLength: 0.19567765 - constraintForce: 0 - tearResistance: 1 - - particle1: 170 - particle2: 171 - restLength: 0.19936427 - constraintForce: 0 - tearResistance: 1 - - particle1: 171 - particle2: 172 - restLength: 0.19495267 - constraintForce: 0 - tearResistance: 1 - - particle1: 172 - particle2: 173 - restLength: 0.19603318 - constraintForce: 0 - tearResistance: 1 - - particle1: 173 - particle2: 174 - restLength: 0.1903103 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: b6dc10b6408e440aaa60cfca8e7dd7d1, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0.001 - _maxBending: 0.03 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!1 &942810411 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 942810416} - - component: {fileID: 942810415} - - component: {fileID: 942810413} - - component: {fileID: 942810412} - m_Layer: 0 - m_Name: Main Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!81 &942810412 -AudioListener: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 942810411} - m_Enabled: 1 ---- !u!124 &942810413 -Behaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 942810411} - m_Enabled: 1 ---- !u!20 &942810415 -Camera: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 942810411} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} - m_projectionMatrixMode: 1 - m_GateFitMode: 2 - m_FOVAxisMode: 0 - m_Iso: 200 - m_ShutterSpeed: 0.005 - m_Aperture: 16 - m_FocusDistance: 10 - m_FocalLength: 50 - m_BladeCount: 5 - m_Curvature: {x: 2, y: 11} - m_BarrelClipping: 0.25 - m_Anamorphism: 0 - m_SensorSize: {x: 36, y: 24} - m_LensShift: {x: 0, y: 0} - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - far clip plane: 1000 - field of view: 71.6 - orthographic: 0 - orthographic size: 5 - m_Depth: -1 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 3 - m_HDR: 1 - m_AllowMSAA: 1 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!4 &942810416 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 942810411} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 4.8, z: -13.26} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1006563103 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1006563107} - - component: {fileID: 1006563106} - - component: {fileID: 1006563105} - - component: {fileID: 1006563104} - - component: {fileID: 1006563108} - m_Layer: 0 - m_Name: Cube (2) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!23 &1006563104 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1006563103} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 4294967295 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 1 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!65 &1006563105 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1006563103} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!33 &1006563106 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1006563103} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1006563107 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1006563103} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: -0.07, z: 0} - m_LocalScale: {x: 19.468725, y: 1.1407216, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1006563108 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1006563103} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6757b231cedd544c583ef8aeaf773b2a, type: 3} - m_Name: - m_EditorClassIdentifier: - thickness: 0 - inverted: 0 - material: {fileID: 0} - filter: -65535 - m_SourceCollider: {fileID: 1006563105} - m_DistanceField: {fileID: 0} ---- !u!1 &1201433689 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1201433690} - - component: {fileID: 1201433692} - - component: {fileID: 1201433691} - m_Layer: 0 - m_Name: Trigger - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1201433690 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1201433689} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 1, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1247776992} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1201433691 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1201433689} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6757b231cedd544c583ef8aeaf773b2a, type: 3} - m_Name: - m_EditorClassIdentifier: - thickness: 0 - inverted: 0 - material: {fileID: 0} - filter: -65535 - m_SourceCollider: {fileID: 1201433692} - m_DistanceField: {fileID: 0} ---- !u!136 &1201433692 -CapsuleCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1201433689} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 1 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: 0.7 - m_Height: 1.5 - m_Direction: 1 - m_Center: {x: 0, y: -0.25, z: 0} ---- !u!1 &1247776987 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1247776992} - - component: {fileID: 1247776991} - - component: {fileID: 1247776989} - - component: {fileID: 1247776988} - - component: {fileID: 1247776995} - - component: {fileID: 1247776994} - - component: {fileID: 1247776990} - - component: {fileID: 1247776993} - - component: {fileID: 1247776996} - m_Layer: 0 - m_Name: Capsule - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!54 &1247776988 -Rigidbody: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1247776987} - serializedVersion: 5 - m_Mass: 3 - m_LinearDamping: 0 - m_AngularDamping: 0.05 - m_CenterOfMass: {x: 0, y: 0, z: 0} - m_InertiaTensor: {x: 1, y: 1, z: 1} - m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ImplicitCom: 1 - m_ImplicitTensor: 1 - m_UseGravity: 1 - m_IsKinematic: 0 - m_Interpolate: 0 - m_Constraints: 56 - m_CollisionDetection: 0 ---- !u!23 &1247776989 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1247776987} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 4294967295 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 1 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!136 &1247776990 -CapsuleCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1247776987} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: 0.5 - m_Height: 2 - m_Direction: 1 - m_Center: {x: 0, y: 0, z: 0} ---- !u!33 &1247776991 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1247776987} - m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1247776992 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1247776987} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -6.82, y: 6.18, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 1201433690} - m_Father: {fileID: 2108375383} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1247776993 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1247776987} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 82b0f164ac14247fd8a566109fbbe771, type: 3} - m_Name: - m_EditorClassIdentifier: - floorRaycastDistance: 1.2 - acceleration: 80 - maxSpeed: 6 - damping: 0.005 - jumpPower: 10 - airAcceleration: 16 - airMaxSpeed: 12 - extraGravity: -12 - centerOfMass: {x: 0, y: -0.25, z: 0} - P: 2 - D: 0.1 ---- !u!114 &1247776994 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1247776987} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 62359d80fdc0e4315ab6331b78ec5b90, type: 3} - m_Name: - m_EditorClassIdentifier: - kinematicForParticles: 0 ---- !u!114 &1247776995 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1247776987} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6757b231cedd544c583ef8aeaf773b2a, type: 3} - m_Name: - m_EditorClassIdentifier: - thickness: 0 - inverted: 0 - material: {fileID: 0} - filter: 1 - m_SourceCollider: {fileID: 1247776990} - m_DistanceField: {fileID: 0} ---- !u!114 &1247776996 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1247776987} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 50c674b3f8f0045249ac099130c6a6b2, type: 3} - m_Name: - m_EditorClassIdentifier: - solver: {fileID: 2108375382} - climbSpeed: 2 ---- !u!1 &1465091929 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1465091930} - - component: {fileID: 1465091932} - - component: {fileID: 1465091931} - m_Layer: 5 - m_Name: Text - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1465091930 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1465091929} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1997975594} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 291, y: 42.5} - m_SizeDelta: {x: 542, y: 66} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1465091931 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1465091929} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.184, g: 0.184, b: 0.184, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 18 - m_FontStyle: 1 - m_BestFit: 0 - m_MinSize: 5 - m_MaxSize: 200 - m_Alignment: 0 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 1 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: 'Use A,D to move the character. - - Space to jump, Space again to hold - on to a vine when close to it. - - When hanging from a vine, climb up and down - using W,S.' ---- !u!222 &1465091932 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1465091929} - m_CullTransparentMesh: 0 ---- !u!1 &1559710293 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1559710295} - - component: {fileID: 1559710294} - m_Layer: 0 - m_Name: BurstCollisionWorld - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1559710294 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1559710293} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f1a161c4294214a4fbcb7e9e94800494, type: 3} - m_Name: - m_EditorClassIdentifier: - cellSpans: - m_AlignBytes: 16 ---- !u!4 &1559710295 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1559710293} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1624856316 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1624856317} - - component: {fileID: 1624856320} - - component: {fileID: 1624856319} - - component: {fileID: 1624856318} - - component: {fileID: 1624856321} - m_Layer: 0 - m_Name: Obi Rope - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1624856317 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1624856316} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0.7071068, w: 0.7071068} - m_LocalPosition: {x: -5.04, y: 8.44, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 2108375383} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90} ---- !u!114 &1624856318 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1624856316} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} - m_Name: - m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 071b3247e825f4ba386cdc8e25c6a3e1, type: 2} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - uvAnchor: 0 - uvScale: {x: 0, y: 1} - normalizeV: 1 - section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} - thicknessScale: 0.8 ---- !u!114 &1624856319 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1624856316} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 958c969cfb16745f192d4d7bd28b7178, type: 3} - m_Name: - m_EditorClassIdentifier: - decimation: 0 - smoothing: 0 - twist: 0 - indexInSystem: 2 ---- !u!114 &1624856320 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1624856316} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} - m_Name: - m_EditorClassIdentifier: - solverIndices: - serializedContents: 130100001401000015010000160100001701000018010000190100001a0100001b0100001c0100001d0100001e0100001f010000200100002101000022010000230100002401000025010000260100002701000028010000290100002a0100002b0100002c0100002d0100002e0100002f010000300100003101000032010000330100003401000035010000360100003701000038010000390100003a0100003b0100003c0100003d0100003e0100003f010000400100004101000042010000430100004401000045010000460100004701000048010000490100004a0100004b0100004c0100004d0100004e0100004f010000500100005101000052010000530100005401000055010000560100005701000058010000590100005a0100005b0100005c0100005d0100005e0100005f010000600100006101000062010000630100006401000065010000660100006701000068010000690100006a0100006b0100006c0100006d0100006e0100006f010000700100007101000072010000730100007401000075010000760100007701000078010000790100007a0100007b0100007c0100007d0100007e0100007f010000800100008101000082010000830100008401000085010000860100008701000088010000890100008a0100008b0100008c0100008d0100008e0100008f010000900100009101000092010000930100009401000095010000960100009701000098010000990100009a010000 - m_AlignBytes: 16 - groupID: 3 - m_CollisionMaterial: {fileID: 0} - m_SurfaceCollisions: 0 - m_MassScale: 1 - m_SelfCollisions: 1 - restLength_: 6.8625426 - elements: - - particle1: 275 - particle2: 276 - restLength: 0.19031 - constraintForce: 0 - tearResistance: 1 - - particle1: 276 - particle2: 277 - restLength: 0.19603348 - constraintForce: 0 - tearResistance: 1 - - particle1: 277 - particle2: 278 - restLength: 0.19495249 - constraintForce: 0 - tearResistance: 1 - - particle1: 278 - particle2: 279 - restLength: 0.19936419 - constraintForce: 0 - tearResistance: 1 - - particle1: 279 - particle2: 280 - restLength: 0.19567776 - constraintForce: 0 - tearResistance: 1 - - particle1: 280 - particle2: 281 - restLength: 0.19566679 - constraintForce: 0 - tearResistance: 1 - - particle1: 281 - particle2: 282 - restLength: 0.19812584 - constraintForce: 0 - tearResistance: 1 - - particle1: 282 - particle2: 283 - restLength: 0.194808 - constraintForce: 0 - tearResistance: 1 - - particle1: 283 - particle2: 284 - restLength: 0.1975255 - constraintForce: 0 - tearResistance: 1 - - particle1: 284 - particle2: 285 - restLength: 0.19576502 - constraintForce: 0 - tearResistance: 1 - - particle1: 285 - particle2: 286 - restLength: 0.19633389 - constraintForce: 0 - tearResistance: 1 - - particle1: 286 - particle2: 287 - restLength: 0.19708109 - constraintForce: 0 - tearResistance: 1 - - particle1: 287 - particle2: 288 - restLength: 0.19544911 - constraintForce: 0 - tearResistance: 1 - - particle1: 288 - particle2: 289 - restLength: 0.19775653 - constraintForce: 0 - tearResistance: 1 - - particle1: 289 - particle2: 290 - restLength: 0.19524312 - constraintForce: 0 - tearResistance: 1 - - particle1: 290 - particle2: 291 - restLength: 0.1966927 - constraintForce: 0 - tearResistance: 1 - - particle1: 291 - particle2: 292 - restLength: 0.19639277 - constraintForce: 0 - tearResistance: 1 - - particle1: 292 - particle2: 293 - restLength: 0.19618559 - constraintForce: 0 - tearResistance: 1 - - particle1: 293 - particle2: 294 - restLength: 0.19639325 - constraintForce: 0 - tearResistance: 1 - - particle1: 294 - particle2: 295 - restLength: 0.19669223 - constraintForce: 0 - tearResistance: 1 - - particle1: 295 - particle2: 296 - restLength: 0.19524348 - constraintForce: 0 - tearResistance: 1 - - particle1: 296 - particle2: 297 - restLength: 0.19775689 - constraintForce: 0 - tearResistance: 1 - - particle1: 297 - particle2: 298 - restLength: 0.1954484 - constraintForce: 0 - tearResistance: 1 - - particle1: 298 - particle2: 299 - restLength: 0.19708097 - constraintForce: 0 - tearResistance: 1 - - particle1: 299 - particle2: 300 - restLength: 0.19633389 - constraintForce: 0 - tearResistance: 1 - - particle1: 300 - particle2: 301 - restLength: 0.19576448 - constraintForce: 0 - tearResistance: 1 - - particle1: 301 - particle2: 302 - restLength: 0.19752663 - constraintForce: 0 - tearResistance: 1 - - particle1: 302 - particle2: 303 - restLength: 0.19480836 - constraintForce: 0 - tearResistance: 1 - - particle1: 303 - particle2: 304 - restLength: 0.19812632 - constraintForce: 0 - tearResistance: 1 - - particle1: 304 - particle2: 305 - restLength: 0.19566579 - constraintForce: 0 - tearResistance: 1 - - particle1: 305 - particle2: 306 - restLength: 0.19567765 - constraintForce: 0 - tearResistance: 1 - - particle1: 306 - particle2: 307 - restLength: 0.19936427 - constraintForce: 0 - tearResistance: 1 - - particle1: 307 - particle2: 308 - restLength: 0.19495267 - constraintForce: 0 - tearResistance: 1 - - particle1: 308 - particle2: 309 - restLength: 0.19603318 - constraintForce: 0 - tearResistance: 1 - - particle1: 309 - particle2: 310 - restLength: 0.1903103 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: b6dc10b6408e440aaa60cfca8e7dd7d1, type: 2} - tearingEnabled: 0 - tearResistanceMultiplier: 1000 - tearRate: 1 - _distanceConstraintsEnabled: 1 - _stretchingScale: 1 - _stretchCompliance: 0 - _maxCompression: 0 - _bendConstraintsEnabled: 1 - _bendCompliance: 0.001 - _maxBending: 0.03 - _plasticYield: 0 - _plasticCreep: 0 ---- !u!114 &1624856321 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1624856316} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4d03c9194b7ab4aaba4dfa5afec22c69, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Actor: {fileID: 1624856320} - m_Target: {fileID: 1624856317} - m_ParticleGroup: {fileID: -5470652867224400354, guid: b6dc10b6408e440aaa60cfca8e7dd7d1, type: 2} - m_AttachmentType: 0 - m_ConstrainOrientation: 0 - m_Projection: 0 - m_Compliance: 0 - breakThreshold: Infinity ---- !u!1 &1694332649 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1694332650} - - component: {fileID: 1694332654} - - component: {fileID: 1694332653} - - component: {fileID: 1694332652} - - component: {fileID: 1694332651} - m_Layer: 5 - m_Name: FPSDisplay - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1694332650 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1694332649} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1997975594} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 99, y: -31} - m_SizeDelta: {x: 160, y: 30} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1694332651 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1694332649} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: cfabb0440166ab443bba8876756fdfa9, type: 3} - m_Name: - m_EditorClassIdentifier: - m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5} - m_EffectDistance: {x: 1, y: -1} - m_UseGraphicAlpha: 1 ---- !u!114 &1694332652 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1694332649} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f14f49b61044e49ebb2f29511f2b3f41, type: 3} - m_Name: - m_EditorClassIdentifier: - updateInterval: 0.5 - showMedian: 0 - medianLearnrate: 0.05 ---- !u!114 &1694332653 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1694332649} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 20 - m_FontStyle: 0 - m_BestFit: 0 - m_MinSize: 1 - m_MaxSize: 40 - m_Alignment: 0 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 1 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: ---- !u!222 &1694332654 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1694332649} - m_CullTransparentMesh: 0 ---- !u!1 &1735419977 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1735419981} - - component: {fileID: 1735419980} - - component: {fileID: 1735419979} - - component: {fileID: 1735419978} - - component: {fileID: 1735419982} - m_Layer: 0 - m_Name: Cube (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!23 &1735419978 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1735419977} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 4294967295 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 1 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!65 &1735419979 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1735419977} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!33 &1735419980 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1735419977} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1735419981 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1735419977} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -4.89, y: 10, z: 0} - m_LocalScale: {x: 3.9395108, y: 1.1407216, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1735419982 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1735419977} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6757b231cedd544c583ef8aeaf773b2a, type: 3} - m_Name: - m_EditorClassIdentifier: - thickness: 0.05 - inverted: 0 - material: {fileID: 0} - filter: -65535 - m_SourceCollider: {fileID: 1735419979} - m_DistanceField: {fileID: 0} ---- !u!1 &1887103744 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1887103749} - - component: {fileID: 1887103748} - - component: {fileID: 1887103747} - - component: {fileID: 1887103746} - - component: {fileID: 1887103745} - m_Layer: 0 - m_Name: Cube (3) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1887103745 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1887103744} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6757b231cedd544c583ef8aeaf773b2a, type: 3} - m_Name: - m_EditorClassIdentifier: - thickness: 0.05 - inverted: 0 - material: {fileID: 0} - filter: -65535 - m_SourceCollider: {fileID: 1887103747} - m_DistanceField: {fileID: 0} ---- !u!23 &1887103746 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1887103744} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_ForceMeshLod: -1 - m_MeshLodSelectionBias: 0 - m_RenderingLayerMask: 4294967295 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 1 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_GlobalIlluminationMeshLod: 0 - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!65 &1887103747 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1887103744} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 0 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!33 &1887103748 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1887103744} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1887103749 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1887103744} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 3.4, y: 10, z: 0} - m_LocalScale: {x: 3.9395108, y: 1.1407216, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1954069164 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1954069166} - - component: {fileID: 1954069165} - m_Layer: 0 - m_Name: Directional Light - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!108 &1954069165 -Light: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1954069164} - m_Enabled: 1 - serializedVersion: 11 - m_Type: 1 - m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} - m_Intensity: 1 - m_Range: 10 - m_SpotAngle: 30 - m_InnerSpotAngle: 21.802082 - m_CookieSize: 10 - m_Shadows: - m_Type: 2 - m_Resolution: -1 - m_CustomResolution: -1 - m_Strength: 1 - m_Bias: 0.05 - m_NormalBias: 0.4 - m_NearPlane: 0.2 - m_CullingMatrixOverride: - e00: 1 - e01: 0 - e02: 0 - e03: 0 - e10: 0 - e11: 1 - e12: 0 - e13: 0 - e20: 0 - e21: 0 - e22: 1 - e23: 0 - e30: 0 - e31: 0 - e32: 0 - e33: 1 - m_UseCullingMatrixOverride: 0 - m_Cookie: {fileID: 0} - m_DrawHalo: 0 - m_Flare: {fileID: 0} - m_RenderMode: 0 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingLayerMask: 1 - m_Lightmapping: 4 - m_LightShadowCasterMode: 0 - m_AreaSize: {x: 1, y: 1} - m_BounceIntensity: 1 - m_ColorTemperature: 6570 - m_UseColorTemperature: 0 - m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} - m_UseBoundingSphereOverride: 0 - m_UseViewFrustumForShadowCasterCull: 1 - m_ForceVisible: 0 - m_ShadowRadius: 0 - m_ShadowAngle: 0 - m_LightUnit: 1 - m_LuxAtDistance: 1 - m_EnableSpotReflector: 1 ---- !u!4 &1954069166 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1954069164} - serializedVersion: 2 - m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} - m_LocalPosition: {x: 0, y: 3, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} ---- !u!1 &1997975590 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1997975594} - - component: {fileID: 1997975593} - - component: {fileID: 1997975592} - - component: {fileID: 1997975591} - m_Layer: 5 - m_Name: Canvas - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1997975591 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1997975590} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} - m_Name: - m_EditorClassIdentifier: - m_IgnoreReversedGraphics: 1 - m_BlockingObjects: 0 - m_BlockingMask: - serializedVersion: 2 - m_Bits: 4294967295 ---- !u!114 &1997975592 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1997975590} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} - m_Name: - m_EditorClassIdentifier: - m_UiScaleMode: 0 - m_ReferencePixelsPerUnit: 100 - m_ScaleFactor: 1 - m_ReferenceResolution: {x: 800, y: 600} - m_ScreenMatchMode: 0 - m_MatchWidthOrHeight: 0 - m_PhysicalUnit: 3 - m_FallbackScreenDPI: 96 - m_DefaultSpriteDPI: 96 - m_DynamicPixelsPerUnit: 1 - m_PresetInfoIsWorld: 0 ---- !u!223 &1997975593 -Canvas: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1997975590} - m_Enabled: 1 - serializedVersion: 3 - m_RenderMode: 0 - m_Camera: {fileID: 0} - m_PlaneDistance: 100 - m_PixelPerfect: 0 - m_ReceivesEvents: 1 - m_OverrideSorting: 0 - m_OverridePixelPerfect: 0 - m_SortingBucketNormalizedSize: 0 - m_VertexColorAlwaysGammaSpace: 0 - m_AdditionalShaderChannelsFlag: 25 - m_UpdateRectTransformForStandalone: 0 - m_SortingLayerID: 0 - m_SortingOrder: 0 - m_TargetDisplay: 0 ---- !u!224 &1997975594 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1997975590} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0, y: 0, z: 0} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 1465091930} - - {fileID: 1694332650} - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0, y: 0} ---- !u!1 &2108375380 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2108375383} - - component: {fileID: 2108375382} - m_Layer: 0 - m_Name: Obi Solver - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &2108375382 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2108375380} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9d174fab52f0c4b8399f25d5c3ea524c, type: 3} - m_Name: - m_EditorClassIdentifier: - simulateWhenInvisible: 1 - m_Backend: 1 - substeps: 12 - maxStepsPerFrame: 1 - synchronization: 2 - parameters: - mode: 1 - interpolation: 0 - gravity: {x: 0, y: -9.81, z: 0} - ambientWind: {x: 0, y: 0, z: 0} - foamGravityScale: 1 - damping: 0.5 - maxAnisotropy: 3 - sleepThreshold: 0.000001 - maxVelocity: 50 - maxAngularVelocity: 10 - collisionMargin: 0.02 - maxDepenetration: 10 - colliderCCD: 1 - particleCCD: 0 - shockPropagation: 0 - surfaceCollisionIterations: 8 - surfaceCollisionTolerance: 0.005 - diffusionMask: {x: 1, y: 1, z: 1, w: 1} - m_MaxSurfaceChunks: 32768 - maxQueryResults: 8192 - maxFoamParticles: 8192 - maxParticleNeighbors: 128 - maxParticleContacts: 6 - useLimits: 0 - killOffLimitsParticles: 0 - boundaryLimits: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 5, y: 5, z: 5} - gravity: {x: 0, y: -9.81, z: 0} - gravitySpace: 1 - ambientWind: {x: 0, y: 0, z: 0} - windSpace: 1 - foamSubsteps: 1 - foamMinNeighbors: 3 - foamCollisions: 0 - maxFoamVelocityStretch: 0.3 - foamRadiusScale: 1 - foamFade: {x: 0.05, y: 0.8} - foamAccelAgingRange: {x: 0.5, y: 0.8} - foamAccelAging: 4 - foamVolumeDensity: 0.1 - foamAmbientDensity: 0.02 - foamScatterColor: {r: 0.8, g: 0.75, b: 0.7, a: 1} - foamAmbientColor: {r: 0.4, g: 0.5, b: 0.6, a: 1} - worldLinearInertiaScale: 0 - worldAngularInertiaScale: 0 - synchronousSpatialQueries: 0 - distanceConstraintParameters: - evaluationOrder: 0 - iterations: 2 - SORFactor: 1 - enabled: 1 - bendingConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 - particleCollisionConstraintParameters: - evaluationOrder: 0 - iterations: 2 - SORFactor: 1 - enabled: 1 - particleFrictionConstraintParameters: - evaluationOrder: 1 - iterations: 3 - SORFactor: 1 - enabled: 0 - collisionConstraintParameters: - evaluationOrder: 0 - iterations: 1 - SORFactor: 1 - enabled: 1 - frictionConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 - skinConstraintParameters: - evaluationOrder: 0 - iterations: 3 - SORFactor: 1 - enabled: 0 - volumeConstraintParameters: - evaluationOrder: 1 - iterations: 3 - SORFactor: 1 - enabled: 0 - shapeMatchingConstraintParameters: - evaluationOrder: 1 - iterations: 3 - SORFactor: 1 - enabled: 0 - tetherConstraintParameters: - evaluationOrder: 1 - iterations: 3 - SORFactor: 1 - enabled: 0 - pinConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 - pinholeConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 - stitchConstraintParameters: - evaluationOrder: 1 - iterations: 2 - SORFactor: 1 - enabled: 0 - densityConstraintParameters: - evaluationOrder: 1 - iterations: 2 - SORFactor: 1 - enabled: 0 - stretchShearConstraintParameters: - evaluationOrder: 0 - iterations: 3 - SORFactor: 1 - enabled: 0 - bendTwistConstraintParameters: - evaluationOrder: 0 - iterations: 3 - SORFactor: 1 - enabled: 0 - chainConstraintParameters: - evaluationOrder: 0 - iterations: 3 - SORFactor: 1 - enabled: 0 ---- !u!4 &2108375383 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2108375380} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 1247776992} - - {fileID: 1624856317} - - {fileID: 929120242} - - {fileID: 867634197} - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1660057539 &9223372036854775807 -SceneRoots: - m_ObjectHideFlags: 0 - m_Roots: - - {fileID: 942810416} - - {fileID: 1954069166} - - {fileID: 1735419981} - - {fileID: 1006563107} - - {fileID: 2108375383} - - {fileID: 1997975594} - - {fileID: 1887103749} - - {fileID: 1559710295} diff --git a/Assets/Obi/Samples/RopeAndRod/VineSwinging.unity.meta b/Assets/Obi/Samples/RopeAndRod/VineSwinging.unity.meta deleted file mode 100644 index dc9365402..000000000 --- a/Assets/Obi/Samples/RopeAndRod/VineSwinging.unity.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 72bf5bcaef9ac46a8b1d07273f12237f -labels: -- ObiRope -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Samples/RopeAndRod/WrapTheRope.unity b/Assets/Obi/Samples/RopeAndRod/WrapTheRope.unity index d4cbe1d93..afa3e51d7 100644 --- a/Assets/Obi/Samples/RopeAndRod/WrapTheRope.unity +++ b/Assets/Obi/Samples/RopeAndRod/WrapTheRope.unity @@ -43,7 +43,7 @@ RenderSettings: LightmapSettings: m_ObjectHideFlags: 0 serializedVersion: 13 - m_BakeOnSceneLoad: 0 + m_BakeOnSceneLoad: 1 m_GISettings: serializedVersion: 2 m_BounceScale: 1 @@ -502,7 +502,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 0} filter: -65535 m_SourceCollider: {fileID: 599321986} @@ -850,7 +849,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0 - inverted: 0 material: {fileID: 0} filter: -131071 m_SourceCollider: {fileID: 862377249} @@ -907,7 +905,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: fdf58ad80e1cd4860aa12e8da0aa833c, type: 3} m_Name: m_EditorClassIdentifier: - acceleration: 30 + acceleration: 50 --- !u!1 &876719292 GameObject: m_ObjectHideFlags: 0 @@ -1118,7 +1116,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0.05 - inverted: 0 material: {fileID: 0} filter: -65535 m_SourceCollider: {fileID: 1276486560} @@ -1207,7 +1204,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: thickness: 0.05 - inverted: 0 material: {fileID: 0} filter: -65535 m_SourceCollider: {fileID: 1276486561} @@ -1526,6 +1522,184 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!43 &1619481825 +Mesh: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: extrudedMesh + serializedVersion: 12 + m_SubMeshes: + - serializedVersion: 2 + firstByte: 0 + indexCount: 0 + topology: 0 + baseVertex: 0 + firstVertex: 0 + vertexCount: 0 + localAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_Shapes: + vertices: [] + shapes: [] + channels: [] + fullWeights: [] + m_BindPose: [] + m_BoneNameHashes: + m_RootBoneNameHash: 0 + m_BonesAABB: [] + m_VariableBoneCountWeights: + m_Data: + m_MeshCompression: 0 + m_IsReadable: 1 + m_KeepVertices: 1 + m_KeepIndices: 1 + m_IndexFormat: 0 + m_IndexBuffer: + m_VertexData: + serializedVersion: 3 + m_VertexCount: 0 + m_Channels: + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + m_DataSize: 0 + _typelessdata: + m_CompressedMesh: + m_Vertices: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_UV: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Normals: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Tangents: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Weights: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_NormalSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_TangentSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_FloatColors: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_BoneIndices: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_Triangles: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_UVInfo: 0 + m_LocalAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_MeshUsageFlags: 0 + m_CookingOptions: 30 + m_BakedConvexCollisionMesh: + m_BakedTriangleCollisionMesh: + 'm_MeshMetrics[0]': 1 + 'm_MeshMetrics[1]': 1 + m_MeshOptimizationFlags: 1 + m_StreamData: + serializedVersion: 2 + offset: 0 + size: 0 + path: + m_MeshLodInfo: + serializedVersion: 2 + m_LodSelectionCurve: + serializedVersion: 1 + m_LodSlope: 0 + m_LodBias: 0 + m_NumLevels: 1 + m_SubMeshes: + - serializedVersion: 2 + m_Levels: + - serializedVersion: 1 + m_IndexStart: 0 + m_IndexCount: 0 --- !u!1001 &1663334039 PrefabInstance: m_ObjectHideFlags: 0 @@ -1598,6 +1772,52 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 39f0f8f454a2049f3af7bad3dda0481e, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!1 &1686434325 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1686434327} + - component: {fileID: 1686434326} + m_Layer: 0 + m_Name: BurstCollisionWorld + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1686434326 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1686434325} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f1a161c4294214a4fbcb7e9e94800494, type: 3} + m_Name: + m_EditorClassIdentifier: + cellSpans: + m_AlignBytes: 16 +--- !u!4 &1686434327 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1686434325} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &1717570096 PrefabInstance: m_ObjectHideFlags: 0 @@ -1681,6 +1901,7 @@ GameObject: - component: {fileID: 1780856015} - component: {fileID: 1780856020} - component: {fileID: 1780856019} + - component: {fileID: 1780856018} - component: {fileID: 1780856017} - component: {fileID: 1780856021} - component: {fileID: 1780856022} @@ -1720,15 +1941,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 18f853588397d4a80a561203ed92fc8a, type: 3} m_Name: m_EditorClassIdentifier: - material: {fileID: 2100000, guid: 03019be2b7a654429bf322c3ca0c7a0e, type: 2} - renderParams: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 uvAnchor: 0 uvScale: {x: 1, y: 30} normalizeV: 1 @@ -1748,7 +1960,14 @@ MonoBehaviour: decimation: 0.5 smoothing: 0 twist: 0 - indexInSystem: 0 +--- !u!33 &1780856018 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1780856014} + m_Mesh: {fileID: 1619481825} --- !u!23 &1780856019 MeshRenderer: m_ObjectHideFlags: 0 @@ -1809,585 +2028,578 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} m_Name: m_EditorClassIdentifier: - solverIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f0000007000000071000000 - m_AlignBytes: 16 - groupID: 1 + solverIndices: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f0000007000000071000000 m_CollisionMaterial: {fileID: 0} m_SurfaceCollisions: 0 - m_MassScale: 1 m_SelfCollisions: 0 - restLength_: 78.910034 + restLength_: 78.96037 elements: - particle1: 0 particle2: 1 - restLength: 0.657547 + restLength: 0.657959 constraintForce: 0 tearResistance: 1 - particle1: 1 particle2: 2 - restLength: 0.62701416 + restLength: 0.6274185 constraintForce: 0 tearResistance: 1 - particle1: 2 particle2: 3 - restLength: 0.80493164 + restLength: 0.80545807 constraintForce: 0 tearResistance: 1 - particle1: 3 particle2: 4 - restLength: 0.61681366 + restLength: 0.6171951 constraintForce: 0 tearResistance: 1 - particle1: 4 particle2: 5 - restLength: 0.68862915 + restLength: 0.6890564 constraintForce: 0 tearResistance: 1 - particle1: 5 particle2: 6 - restLength: 0.75785065 + restLength: 0.7583618 constraintForce: 0 tearResistance: 1 - particle1: 6 particle2: 7 - restLength: 0.690979 + restLength: 0.6914139 constraintForce: 0 tearResistance: 1 - particle1: 7 particle2: 8 - restLength: 0.65991974 + restLength: 0.6603241 constraintForce: 0 tearResistance: 1 - particle1: 8 particle2: 9 - restLength: 0.69579315 + restLength: 0.6962509 constraintForce: 0 tearResistance: 1 - particle1: 9 particle2: 10 - restLength: 0.73057556 + restLength: 0.73104095 constraintForce: 0 tearResistance: 1 - particle1: 10 particle2: 11 - restLength: 0.7425308 + restLength: 0.7430115 constraintForce: 0 tearResistance: 1 - particle1: 11 particle2: 12 - restLength: 0.65538025 + restLength: 0.65579224 constraintForce: 0 tearResistance: 1 - particle1: 12 particle2: 13 - restLength: 0.67697906 + restLength: 0.6773987 constraintForce: 0 tearResistance: 1 - particle1: 13 particle2: 14 - restLength: 0.69794464 + restLength: 0.6984024 constraintForce: 0 tearResistance: 1 - particle1: 14 particle2: 15 - restLength: 0.71826935 + restLength: 0.7187271 constraintForce: 0 tearResistance: 1 - particle1: 15 particle2: 16 - restLength: 0.7379761 + restLength: 0.7384491 constraintForce: 0 tearResistance: 1 - particle1: 16 particle2: 17 - restLength: 0.6853943 + restLength: 0.68582153 constraintForce: 0 tearResistance: 1 - particle1: 17 particle2: 18 - restLength: 0.67365265 + restLength: 0.6740875 constraintForce: 0 tearResistance: 1 - particle1: 18 particle2: 19 - restLength: 0.68727875 + restLength: 0.6877136 constraintForce: 0 tearResistance: 1 - particle1: 19 particle2: 20 - restLength: 0.7005005 + restLength: 0.70095825 constraintForce: 0 tearResistance: 1 - particle1: 20 particle2: 21 - restLength: 0.71331406 + restLength: 0.7137718 constraintForce: 0 tearResistance: 1 - particle1: 21 particle2: 22 - restLength: 0.72569656 + restLength: 0.7261467 constraintForce: 0 tearResistance: 1 - particle1: 22 particle2: 23 - restLength: 0.70212173 + restLength: 0.70257187 constraintForce: 0 tearResistance: 1 - particle1: 23 particle2: 24 - restLength: 0.6771431 + restLength: 0.6775856 constraintForce: 0 tearResistance: 1 - particle1: 24 particle2: 25 - restLength: 0.6863136 + restLength: 0.6867447 constraintForce: 0 tearResistance: 1 - particle1: 25 particle2: 26 - restLength: 0.6951637 + restLength: 0.6955986 constraintForce: 0 tearResistance: 1 - particle1: 26 particle2: 27 - restLength: 0.7036934 + restLength: 0.70415497 constraintForce: 0 tearResistance: 1 - particle1: 27 particle2: 28 - restLength: 0.7119217 + restLength: 0.71237564 constraintForce: 0 tearResistance: 1 - particle1: 28 particle2: 29 - restLength: 0.7198372 + restLength: 0.72029877 constraintForce: 0 tearResistance: 1 - particle1: 29 particle2: 30 - restLength: 0.6960983 + restLength: 0.69654083 constraintForce: 0 tearResistance: 1 - particle1: 30 particle2: 31 - restLength: 0.6837578 + restLength: 0.6841812 constraintForce: 0 tearResistance: 1 - particle1: 31 particle2: 32 - restLength: 0.68982315 + restLength: 0.69026566 constraintForce: 0 tearResistance: 1 - particle1: 32 particle2: 33 - restLength: 0.6956711 + restLength: 0.6961212 constraintForce: 0 tearResistance: 1 - particle1: 33 particle2: 34 - restLength: 0.7012558 + restLength: 0.7017021 constraintForce: 0 tearResistance: 1 - particle1: 34 particle2: 35 - restLength: 0.7065773 + restLength: 0.70703506 constraintForce: 0 tearResistance: 1 - particle1: 35 particle2: 36 - restLength: 0.7116852 + restLength: 0.7121277 constraintForce: 0 tearResistance: 1 - particle1: 36 particle2: 37 - restLength: 0.7085228 + restLength: 0.70897675 constraintForce: 0 tearResistance: 1 - particle1: 37 particle2: 38 - restLength: 0.68719864 + restLength: 0.68764114 constraintForce: 0 tearResistance: 1 - particle1: 38 particle2: 39 - restLength: 0.69114685 + restLength: 0.69158936 constraintForce: 0 tearResistance: 1 - particle1: 39 particle2: 40 - restLength: 0.6948738 + restLength: 0.6953201 constraintForce: 0 tearResistance: 1 - particle1: 40 particle2: 41 - restLength: 0.69838715 + restLength: 0.6988373 constraintForce: 0 tearResistance: 1 - particle1: 41 particle2: 42 - restLength: 0.7016792 + restLength: 0.7021179 constraintForce: 0 tearResistance: 1 - particle1: 42 particle2: 43 - restLength: 0.70476913 + restLength: 0.70521927 constraintForce: 0 tearResistance: 1 - particle1: 43 particle2: 44 - restLength: 0.70760345 + restLength: 0.7080574 constraintForce: 0 tearResistance: 1 - particle1: 44 particle2: 45 - restLength: 0.7007942 + restLength: 0.70124435 constraintForce: 0 tearResistance: 1 - particle1: 45 particle2: 46 - restLength: 0.6931572 + restLength: 0.6936035 constraintForce: 0 tearResistance: 1 - particle1: 46 particle2: 47 - restLength: 0.6952629 + restLength: 0.6956978 constraintForce: 0 tearResistance: 1 - particle1: 47 particle2: 48 - restLength: 0.6971512 + restLength: 0.6975975 constraintForce: 0 tearResistance: 1 - particle1: 48 particle2: 49 - restLength: 0.69885254 + restLength: 0.6992912 constraintForce: 0 tearResistance: 1 - particle1: 49 particle2: 50 - restLength: 0.70033646 + restLength: 0.7007866 constraintForce: 0 tearResistance: 1 - particle1: 50 particle2: 51 - restLength: 0.70163345 + restLength: 0.7020836 constraintForce: 0 tearResistance: 1 - particle1: 51 particle2: 52 - restLength: 0.70272446 + restLength: 0.7031746 constraintForce: 0 tearResistance: 1 - particle1: 52 particle2: 53 - restLength: 0.7003212 + restLength: 0.70077133 constraintForce: 0 tearResistance: 1 - particle1: 53 particle2: 54 - restLength: 0.6979599 + restLength: 0.6984062 constraintForce: 0 tearResistance: 1 - particle1: 54 particle2: 55 - restLength: 0.6984482 + restLength: 0.6988945 constraintForce: 0 tearResistance: 1 - particle1: 55 particle2: 56 - restLength: 0.6987381 + restLength: 0.6991768 constraintForce: 0 tearResistance: 1 - particle1: 56 particle2: 57 - restLength: 0.69882965 + restLength: 0.6992874 constraintForce: 0 tearResistance: 1 - particle1: 57 particle2: 58 - restLength: 0.6987381 + restLength: 0.6991844 constraintForce: 0 tearResistance: 1 - particle1: 58 particle2: 59 - restLength: 0.6984482 + restLength: 0.6988869 constraintForce: 0 tearResistance: 1 - particle1: 59 particle2: 60 - restLength: 0.6979599 + restLength: 0.6983986 constraintForce: 0 tearResistance: 1 - particle1: 60 particle2: 61 - restLength: 0.7003212 + restLength: 0.70077133 constraintForce: 0 tearResistance: 1 - particle1: 61 particle2: 62 - restLength: 0.70272446 + restLength: 0.7031784 constraintForce: 0 tearResistance: 1 - particle1: 62 particle2: 63 - restLength: 0.7016411 + restLength: 0.7020798 constraintForce: 0 tearResistance: 1 - particle1: 63 particle2: 64 - restLength: 0.7003403 + restLength: 0.7007942 constraintForce: 0 tearResistance: 1 - particle1: 64 particle2: 65 - restLength: 0.6988411 + restLength: 0.6992912 constraintForce: 0 tearResistance: 1 - particle1: 65 particle2: 66 - restLength: 0.6971493 + restLength: 0.6975956 constraintForce: 0 tearResistance: 1 - particle1: 66 particle2: 67 - restLength: 0.6952553 + restLength: 0.6956997 constraintForce: 0 tearResistance: 1 - particle1: 67 particle2: 68 - restLength: 0.6931648 + restLength: 0.6936035 constraintForce: 0 tearResistance: 1 - particle1: 68 particle2: 69 - restLength: 0.7007866 + restLength: 0.70124245 constraintForce: 0 tearResistance: 1 - particle1: 69 particle2: 70 - restLength: 0.7076149 + restLength: 0.7080612 constraintForce: 0 tearResistance: 1 - particle1: 70 particle2: 71 - restLength: 0.7047634 + restLength: 0.7052078 constraintForce: 0 tearResistance: 1 - particle1: 71 particle2: 72 - restLength: 0.70168114 + restLength: 0.70212936 constraintForce: 0 tearResistance: 1 - particle1: 72 particle2: 73 - restLength: 0.69838715 + restLength: 0.69883347 constraintForce: 0 tearResistance: 1 - particle1: 73 particle2: 74 - restLength: 0.6948738 + restLength: 0.6953201 constraintForce: 0 tearResistance: 1 - particle1: 74 particle2: 75 - restLength: 0.69114685 + restLength: 0.69158363 constraintForce: 0 tearResistance: 1 - particle1: 75 particle2: 76 - restLength: 0.68720055 + restLength: 0.68763924 constraintForce: 0 tearResistance: 1 - particle1: 76 particle2: 77 - restLength: 0.70853233 + restLength: 0.7089863 constraintForce: 0 tearResistance: 1 - particle1: 77 particle2: 78 - restLength: 0.7116718 + restLength: 0.71212196 constraintForce: 0 tearResistance: 1 - particle1: 78 particle2: 79 - restLength: 0.7065811 + restLength: 0.7070408 constraintForce: 0 tearResistance: 1 - particle1: 79 particle2: 80 - restLength: 0.7012558 + restLength: 0.7016964 constraintForce: 0 tearResistance: 1 - particle1: 80 particle2: 81 - restLength: 0.6956692 + restLength: 0.6961155 constraintForce: 0 tearResistance: 1 - particle1: 81 particle2: 82 - restLength: 0.6898327 + restLength: 0.6902695 constraintForce: 0 tearResistance: 1 - particle1: 82 particle2: 83 - restLength: 0.6837406 + restLength: 0.6841831 constraintForce: 0 tearResistance: 1 - particle1: 83 particle2: 84 - restLength: 0.69610405 + restLength: 0.6965389 constraintForce: 0 tearResistance: 1 - particle1: 84 particle2: 85 - restLength: 0.719841 + restLength: 0.7203064 constraintForce: 0 tearResistance: 1 - particle1: 85 particle2: 86 - restLength: 0.7119274 + restLength: 0.71237946 constraintForce: 0 tearResistance: 1 - particle1: 86 particle2: 87 - restLength: 0.7036953 + restLength: 0.70414543 constraintForce: 0 tearResistance: 1 - particle1: 87 particle2: 88 - restLength: 0.6951542 + restLength: 0.6955986 constraintForce: 0 tearResistance: 1 - particle1: 88 particle2: 89 - restLength: 0.6863098 + restLength: 0.6867504 constraintForce: 0 tearResistance: 1 - particle1: 89 particle2: 90 - restLength: 0.67714214 + restLength: 0.67757607 constraintForce: 0 tearResistance: 1 - particle1: 90 particle2: 91 - restLength: 0.702137 + restLength: 0.7025757 constraintForce: 0 tearResistance: 1 - particle1: 91 particle2: 92 - restLength: 0.7256918 + restLength: 0.72615623 constraintForce: 0 tearResistance: 1 - particle1: 92 particle2: 93 - restLength: 0.7133045 + restLength: 0.7137613 constraintForce: 0 tearResistance: 1 - particle1: 93 particle2: 94 - restLength: 0.7005091 + restLength: 0.70095825 constraintForce: 0 tearResistance: 1 - particle1: 94 particle2: 95 - restLength: 0.6872835 + restLength: 0.6877241 constraintForce: 0 tearResistance: 1 - particle1: 95 particle2: 96 - restLength: 0.67364407 + restLength: 0.67408085 constraintForce: 0 tearResistance: 1 - particle1: 96 particle2: 97 - restLength: 0.6853914 + restLength: 0.68582535 constraintForce: 0 tearResistance: 1 - particle1: 97 particle2: 98 - restLength: 0.7379751 + restLength: 0.73844147 constraintForce: 0 tearResistance: 1 - particle1: 98 particle2: 99 - restLength: 0.7182741 + restLength: 0.71873474 constraintForce: 0 tearResistance: 1 - particle1: 99 particle2: 100 - restLength: 0.6979418 + restLength: 0.69838905 constraintForce: 0 tearResistance: 1 - particle1: 100 particle2: 101 - restLength: 0.6769719 + restLength: 0.6774101 constraintForce: 0 tearResistance: 1 - particle1: 101 particle2: 102 - restLength: 0.65537786 + restLength: 0.65579367 constraintForce: 0 tearResistance: 1 - particle1: 102 particle2: 103 - restLength: 0.74254274 + restLength: 0.74301386 constraintForce: 0 tearResistance: 1 - particle1: 103 particle2: 104 - restLength: 0.7305646 + restLength: 0.73103285 constraintForce: 0 tearResistance: 1 - particle1: 104 particle2: 105 - restLength: 0.6958027 + restLength: 0.69625187 constraintForce: 0 tearResistance: 1 - particle1: 105 particle2: 106 - restLength: 0.65991473 + restLength: 0.6603303 constraintForce: 0 tearResistance: 1 - particle1: 106 particle2: 107 - restLength: 0.69097257 + restLength: 0.6914048 constraintForce: 0 tearResistance: 1 - particle1: 107 particle2: 108 - restLength: 0.75786567 + restLength: 0.7583585 constraintForce: 0 tearResistance: 1 - particle1: 108 particle2: 109 - restLength: 0.68862224 + restLength: 0.68906343 constraintForce: 0 tearResistance: 1 - particle1: 109 particle2: 110 - restLength: 0.6168027 + restLength: 0.61720514 constraintForce: 0 tearResistance: 1 - particle1: 110 particle2: 111 - restLength: 0.8049487 + restLength: 0.80545086 constraintForce: 0 tearResistance: 1 - particle1: 111 particle2: 112 - restLength: 0.6270089 + restLength: 0.6274201 constraintForce: 0 tearResistance: 1 - particle1: 112 particle2: 113 - restLength: 0.6575437 + restLength: 0.657958 constraintForce: 0 tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 - m_RopeBlueprint: {fileID: 11400000, guid: 7e05f85bfaeb24a649317f63f656b6bb, type: 2} + m_RopeBlueprint: {fileID: 11400000, guid: 4d31372b30ca34527b534f09a803ab15, type: 2} tearingEnabled: 0 tearResistanceMultiplier: 1000 tearRate: 1 @@ -2414,12 +2626,11 @@ MonoBehaviour: m_EditorClassIdentifier: m_Actor: {fileID: 1780856020} m_Target: {fileID: 862377252} - m_ParticleGroup: {fileID: 870036912147276740, guid: 7e05f85bfaeb24a649317f63f656b6bb, type: 2} + m_ParticleGroup: {fileID: 870036912147276740, guid: 4d31372b30ca34527b534f09a803ab15, type: 2} m_AttachmentType: 1 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &1780856022 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2434,12 +2645,11 @@ MonoBehaviour: m_EditorClassIdentifier: m_Actor: {fileID: 1780856020} m_Target: {fileID: 599321989} - m_ParticleGroup: {fileID: -5578146735436999353, guid: 7e05f85bfaeb24a649317f63f656b6bb, type: 2} + m_ParticleGroup: {fileID: -5578146735436999353, guid: 4d31372b30ca34527b534f09a803ab15, type: 2} m_AttachmentType: 1 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &1780856023 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2469,6 +2679,7 @@ GameObject: m_Component: - component: {fileID: 1882120510} - component: {fileID: 1882120509} + - component: {fileID: 1882120508} - component: {fileID: 1882120511} m_Layer: 0 m_Name: Obi Solver @@ -2477,6 +2688,21 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 +--- !u!114 &1882120508 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1882120507} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1d9704d540ac448439a425526f6b2986, type: 3} + m_Name: + m_EditorClassIdentifier: + solvers: + - {fileID: 1882120509} + substeps: 6 --- !u!114 &1882120509 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2491,57 +2717,23 @@ MonoBehaviour: m_EditorClassIdentifier: simulateWhenInvisible: 1 m_Backend: 1 - substeps: 12 - maxStepsPerFrame: 1 - synchronization: 0 parameters: mode: 1 interpolation: 0 gravity: {x: 0, y: 0, z: 0} - ambientWind: {x: 0, y: 0, z: 0} - foamGravityScale: 1 damping: 0.1 maxAnisotropy: 3 sleepThreshold: 0.0001 - maxVelocity: 50 - maxAngularVelocity: 10 collisionMargin: 0.05 maxDepenetration: 50 - colliderCCD: 1 - particleCCD: 0 + continuousCollisionDetection: 1 shockPropagation: 0 surfaceCollisionIterations: 16 surfaceCollisionTolerance: 0.001 - diffusionMask: {x: 1, y: 1, z: 1, w: 1} - m_MaxSurfaceChunks: 32768 - maxQueryResults: 8192 - maxFoamParticles: 8192 - maxParticleNeighbors: 128 - maxParticleContacts: 4 - useLimits: 0 - killOffLimitsParticles: 0 - boundaryLimits: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 5, y: 5, z: 5} gravity: {x: 0, y: -9.81, z: 0} gravitySpace: 1 - ambientWind: {x: 0, y: 0, z: 0} - windSpace: 1 - foamSubsteps: 1 - foamMinNeighbors: 3 - foamCollisions: 0 - maxFoamVelocityStretch: 0.3 - foamRadiusScale: 1 - foamFade: {x: 0.05, y: 0.8} - foamAccelAgingRange: {x: 0.5, y: 0.8} - foamAccelAging: 4 - foamVolumeDensity: 0.1 - foamAmbientDensity: 0.02 - foamScatterColor: {r: 0.8, g: 0.75, b: 0.7, a: 1} - foamAmbientColor: {r: 0.4, g: 0.5, b: 0.6, a: 1} worldLinearInertiaScale: 0 worldAngularInertiaScale: 0 - synchronousSpatialQueries: 0 distanceConstraintParameters: evaluationOrder: 0 iterations: 4 @@ -2597,11 +2789,6 @@ MonoBehaviour: iterations: 2 SORFactor: 1 enabled: 1 - pinholeConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 stitchConstraintParameters: evaluationOrder: 1 iterations: 2 @@ -2678,52 +2865,6 @@ MonoBehaviour: m_StringArgument: m_BoolArgument: 1 m_CallState: 2 ---- !u!1 &1903223953 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1903223955} - - component: {fileID: 1903223954} - m_Layer: 0 - m_Name: BurstCollisionWorld - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1903223954 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1903223953} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f1a161c4294214a4fbcb7e9e94800494, type: 3} - m_Name: - m_EditorClassIdentifier: - cellSpans: - m_AlignBytes: 16 ---- !u!4 &1903223955 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1903223953} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1919818295 GameObject: m_ObjectHideFlags: 0 @@ -2832,4 +2973,4 @@ SceneRoots: - {fileID: 1882120510} - {fileID: 599321989} - {fileID: 876719296} - - {fileID: 1903223955} + - {fileID: 1686434327} diff --git a/Assets/Obi/Scripts/Common/Actors/IObiParticleCollection.cs b/Assets/Obi/Scripts/Common/Actors/IObiParticleCollection.cs index 691131ff6..59bb0dd8a 100644 --- a/Assets/Obi/Scripts/Common/Actors/IObiParticleCollection.cs +++ b/Assets/Obi/Scripts/Common/Actors/IObiParticleCollection.cs @@ -11,13 +11,8 @@ namespace Obi bool usesOrientedParticles { get; } int GetParticleRuntimeIndex(int index); // returns solver or blueprint index, depending on implementation. - Vector3 GetParticlePosition(int index); Quaternion GetParticleOrientation(int index); - - Vector3 GetParticleRestPosition(int index); - Quaternion GetParticleRestOrientation(int index); - void GetParticleAnisotropy(int index, ref Vector4 b1, ref Vector4 b2, ref Vector4 b3); float GetParticleMaxRadius(int index); Color GetParticleColor(int index); diff --git a/Assets/Obi/Scripts/Common/Actors/ObiActor.cs b/Assets/Obi/Scripts/Common/Actors/ObiActor.cs index 35f1a344a..38e59f1a7 100644 --- a/Assets/Obi/Scripts/Common/Actors/ObiActor.cs +++ b/Assets/Obi/Scripts/Common/Actors/ObiActor.cs @@ -26,36 +26,9 @@ namespace Obi } } - private struct BufferedForces - { - public bool dirty; - - public Vector4 force; - public Vector4 acceleration; - public Vector4 impulse; - public Vector4 velChange; - - public Vector4 angularForce; - public Vector4 angularAcceleration; - public Vector4 angularImpulse; - public Vector4 angularVelChange; - - public void Clear() - { - force = Vector4.zero; - acceleration = Vector4.zero; - impulse = Vector4.zero; - velChange = Vector4.zero; - angularForce = Vector4.zero; - angularAcceleration = Vector4.zero; - angularImpulse = Vector4.zero; - angularVelChange = Vector4.zero; - } - } - - public delegate void ActorCallback(ObiActor actor); - public delegate void ActorStepCallback(ObiActor actor, float simulatedTime, float substepTime); - public delegate void ActorBlueprintCallback(ObiActor actor, ObiActorBlueprint blueprint); + public delegate void ActorCallback(ObiActor actor); + public delegate void ActorStepCallback(ObiActor actor,float stepTime); + public delegate void ActorBlueprintCallback(ObiActor actor,ObiActorBlueprint blueprint); /// /// Called when the actor blueprint has been loaded into the solver. @@ -68,72 +41,60 @@ namespace Obi public event ActorBlueprintCallback OnBlueprintUnloaded; /// - /// Called when the blueprint currently in use has been re-generated. This will always be preceded by a call to - /// OnBlueprintUnloaded and OnBlueprintLoaded. + /// Called at the start of the solver's FixedUpdate (for Fixed and LateFixed updaters) or the solver's Update (for Late updaters) /// - public event ActorBlueprintCallback OnBlueprintRegenerated; + public event ActorCallback OnPrepareFrame; /// - /// Called before simulation starts. + /// Called at the beginning of a time step, before dirty constraints and active particles have been updated. /// - public event ActorStepCallback OnSimulationStart; + public event ActorStepCallback OnPrepareStep; /// - /// Called after CPU->GPU data transfers, before collision detection starts. + /// Called at the beginning of a time step, after dirty constraints and active particles have been updated. /// - public event ActorStepCallback OnCollisionDetectionStart; + public event ActorStepCallback OnBeginStep; /// - /// Called before performing substepping. + /// Called at the beginning of each substep. /// - public event ActorStepCallback OnSubstepsStart; + public event ActorStepCallback OnSubstep; /// - /// Called after simulation ends. + /// Called at the end of a timestep, after external forces have been reset and collision callbacks called. /// - public event ActorStepCallback OnSimulationEnd; + public event ActorStepCallback OnEndStep; /// - /// You can use this callback to issue GPU->CPU readbacks. + /// Called at the end of each frame. /// - public event ActorCallback OnRequestReadback; + public event ActorCallback OnInterpolate; - /// - /// Called at the end of each frame, after interpolation but before rendering. - /// - public event ActorStepCallback OnInterpolate; - - [HideInInspector] protected ObiNativeIntList m_ActiveParticleCount; + [HideInInspector] protected int m_ActiveParticleCount = 0; /// /// Index of each one of the actor's particles in the solver. /// - [HideInInspector] public ObiNativeIntList solverIndices; + [HideInInspector] public int[] solverIndices; /// /// For each of the actor's constraint types, offset of every batch in the solver. /// [HideInInspector] public List[] solverBatchOffsets; - public int deformableEdgesOffset { protected set; get; } /**< index of the first deformable edge in the solver that belongs to this rope.*/ - protected ObiSolver m_Solver; protected bool m_Loaded = false; - public int groupID = 0; - private ObiActorBlueprint m_State; + private ObiActorBlueprint state; private ObiActorBlueprint m_BlueprintInstance; private ObiPinConstraintsData m_PinConstraints; - private ObiPinholeConstraintsData m_PinholeConstraints; - private BufferedForces bufferedForces = new BufferedForces(); - [SerializeField] [HideInInspector] protected ObiCollisionMaterial m_CollisionMaterial; - [SerializeField] [HideInInspector] protected bool m_SurfaceCollisions = false; - [SerializeField] [HideInInspector] [Min(ObiUtils.epsilon)] protected float m_MassScale = 1; + [SerializeField][HideInInspector] protected ObiCollisionMaterial m_CollisionMaterial; + [SerializeField][HideInInspector] protected bool m_SurfaceCollisions = false; /// /// The solver in charge of simulating this actor. /// - /// This is the first ObiSolver component found up the actor's hierarchy. + /// This is the first ObiSlver component found up the actor's hierarchy. public ObiSolver solver { get { return m_Solver; } @@ -145,7 +106,7 @@ namespace Obi /// public bool isLoaded { - get { return m_Solver != null && m_Loaded; } + get { return m_Loaded; } } /// @@ -182,29 +143,11 @@ namespace Obi { m_SurfaceCollisions = value; if (m_Solver != null) - { - m_Solver.dirtySimplices |= simplexTypes; - } + m_Solver.dirtySimplices = true; } } } - /// - /// Scale applied to this actor's particle masses. - /// - public float massScale - { - get - { - return m_MassScale; - } - set - { - if (Mathf.Abs(m_MassScale - value) > ObiUtils.epsilon) - SetMassScale(value); - } - } - /// /// Amount of particles allocated by this actor. /// @@ -224,20 +167,7 @@ namespace Obi { get { - return m_ActiveParticleCount != null ? m_ActiveParticleCount[0]:0; - } - } - - /// - /// Buffer of size 1 that contains the amount of active particles in use by this actor. - /// Useful to modify the amount of active particles from a compute shader. - /// - /// This will always be equal to or smaller than . - public ObiNativeIntList activeParticleCountBuffer - { - get - { - return m_ActiveParticleCount; + return m_ActiveParticleCount; } } @@ -266,12 +196,13 @@ namespace Obi } } - public Oni.SimplexType simplexTypes + /// + /// If true, it means external forces aren't applied to the particles directly. + /// + /// For instance, cloth uses aerodynamic constraints to do so, and fluid uses drag. + public virtual bool usesCustomExternalForces { - get - { - return (sourceBlueprint != null) ? sourceBlueprint.simplexTypes : Oni.SimplexType.Point; - } + get { return false; } } /// @@ -334,7 +265,7 @@ namespace Obi /// This is mostly used when the actor needs to change some blueprint data at runtime, /// and you don't want to change the blueprint asset as this would affect all other actors using it. Tearable cloth and ropes /// make use of this. - public ObiActorBlueprint blueprint + public ObiActorBlueprint blueprint { get { @@ -347,9 +278,6 @@ namespace Obi protected virtual void Awake() { - m_ActiveParticleCount = new ObiNativeIntList(); - m_ActiveParticleCount.Add(0); - #if UNITY_EDITOR // Check if this script's GameObject is in a PrefabStage @@ -365,7 +293,8 @@ namespace Obi if (GetComponentInParent() == null) { // Add our own environment root and move it to the PrefabStage scene - var newParent = new GameObject("ObiSolver (Environment)", typeof(ObiSolver)); + var newParent = new GameObject("ObiSolver (Environment)", typeof(ObiSolver), typeof(ObiLateFixedUpdater)); + newParent.GetComponent().solvers.Add(newParent.GetComponent()); UnityEngine.SceneManagement.SceneManager.MoveGameObjectToScene(newParent, gameObject.scene); transform.root.parent = newParent.transform; } @@ -375,9 +304,6 @@ namespace Obi protected virtual void OnDestroy() { - m_ActiveParticleCount.Dispose(); - m_ActiveParticleCount = null; - if (m_BlueprintInstance != null) DestroyImmediate(m_BlueprintInstance); } @@ -389,7 +315,6 @@ namespace Obi solverBatchOffsets[i] = new List(); m_PinConstraints = new ObiPinConstraintsData(); - m_PinholeConstraints = new ObiPinholeConstraintsData(); // when an actor is enabled, grabs the first solver up its hierarchy, // initializes it (if not initialized) and gets added to it. @@ -405,7 +330,6 @@ namespace Obi protected virtual void OnValidate() { - UpdateCollisionMaterials(); } private void OnTransformParentChanged() @@ -421,10 +345,10 @@ namespace Obi { if (m_Solver != null) { - if (sourceBlueprint != null) + if (!m_Solver.AddActor(this)) + m_Solver = null; + else if (sourceBlueprint != null) sourceBlueprint.OnBlueprintGenerate += OnBlueprintRegenerate; - - m_Solver.AddActor(this); } } @@ -435,15 +359,14 @@ namespace Obi { if (m_Solver != null) { + m_Solver.RemoveActor(this); if (sourceBlueprint != null) sourceBlueprint.OnBlueprintGenerate -= OnBlueprintRegenerate; - - m_Solver.RemoveActor(this); } } /// - /// Forcibly changes the solver in charge of this actor + /// Forcibly changed the solver in charge of this actor /// /// The solver we want to put in charge of this actor. /// First it removes the actor from its current solver, then changes the actor's current solver and then readds it to this new solver. @@ -460,75 +383,23 @@ namespace Obi } } - /// - /// Sets the mass of all particles in the actor to their blueprint values, multiplied by a scale factor. - /// - /// new mass scale. - protected void SetMassScale(float scale) - { - if (Application.isPlaying && isLoaded && particleCount > 0) - { - scale = Mathf.Max(ObiUtils.epsilon, scale); - - for (int i = 0; i < particleCount; ++i) - { - int solverIndex = solverIndices[i]; - - if (m_Solver.invMasses[solverIndex] > 0) - m_Solver.invMasses[solverIndex] = sharedBlueprint.invMasses[i] / scale; - - if (m_Solver.invRotationalMasses[solverIndex] > 0 && sharedBlueprint.invRotationalMasses != null && i < sharedBlueprint.invRotationalMasses.Length) - m_Solver.invRotationalMasses[solverIndex] = sharedBlueprint.invRotationalMasses[i] / scale; - } - - UpdateParticleProperties(); - } - } - protected virtual void OnBlueprintRegenerate(ObiActorBlueprint blueprint) { - // Reload by removing the current blueprint from the solver, - // destroying the current blueprint instance if any, - // then adding the shared blueprint again. - + // Reload: RemoveFromSolver(); - - if (m_BlueprintInstance != null) - DestroyImmediate(m_BlueprintInstance); - AddToSolver(); - - OnBlueprintRegenerated?.Invoke(this, blueprint); } protected void UpdateCollisionMaterials() { - if (isLoaded) + if (m_Solver != null && solverIndices != null) { int index = m_CollisionMaterial != null ? m_CollisionMaterial.handle.index : -1; - for (int i = 0; i < solverIndices.count; i++) - { - if (solverIndices[i] < solver.collisionMaterials.count) - solver.collisionMaterials[solverIndices[i]] = index; - } + for (int i = 0; i < solverIndices.Length; i++) + solver.collisionMaterials[solverIndices[i]] = index; } } - public virtual void ProvideDeformableTriangles(ObiNativeIntList deformableTriangles, ObiNativeVector2List deformableUVs) - { - - } - - public virtual void ProvideDeformableEdges(ObiNativeIntList deformableEdges) - { - - } - - public virtual int GetDeformableEdgeCount() - { - return 0; - } - /// /// Copies all data (position, velocity, phase, etc) from one particle to another one. /// @@ -541,8 +412,8 @@ namespace Obi public virtual bool CopyParticle(int actorSourceIndex, int actorDestIndex) { if (!isLoaded || - actorSourceIndex < 0 || actorSourceIndex >= solverIndices.count || - actorDestIndex < 0 || actorDestIndex >= solverIndices.count) + actorSourceIndex < 0 || actorSourceIndex >= solverIndices.Length || + actorDestIndex < 0 || actorDestIndex >= solverIndices.Length) return false; int sourceIndex = solverIndices[actorSourceIndex]; @@ -550,15 +421,13 @@ namespace Obi // Copy solver data: m_Solver.prevPositions[destIndex] = m_Solver.prevPositions[sourceIndex]; + m_Solver.renderablePositions[destIndex] = m_Solver.renderablePositions[sourceIndex]; + m_Solver.startPositions[destIndex] = m_Solver.positions[destIndex] = m_Solver.positions[sourceIndex]; + m_Solver.startOrientations[destIndex] = m_Solver.orientations[destIndex] = m_Solver.orientations[sourceIndex]; m_Solver.restPositions[destIndex] = m_Solver.restPositions[sourceIndex]; - m_Solver.endPositions[destIndex] = m_Solver.startPositions[destIndex] = m_Solver.positions[destIndex] = m_Solver.positions[sourceIndex]; - - m_Solver.prevOrientations[destIndex] = m_Solver.prevOrientations[sourceIndex]; m_Solver.restOrientations[destIndex] = m_Solver.restOrientations[sourceIndex]; - m_Solver.endOrientations[destIndex] = m_Solver.startOrientations[destIndex] = m_Solver.orientations[destIndex] = m_Solver.orientations[sourceIndex]; - m_Solver.velocities[destIndex] = m_Solver.velocities[sourceIndex]; - m_Solver.angularVelocities[destIndex] = m_Solver.angularVelocities[sourceIndex]; + m_Solver.angularVelocities[destIndex] = m_Solver.velocities[sourceIndex]; m_Solver.invMasses[destIndex] = m_Solver.invMasses[sourceIndex]; m_Solver.invRotationalMasses[destIndex] = m_Solver.invRotationalMasses[sourceIndex]; m_Solver.principalRadii[destIndex] = m_Solver.principalRadii[sourceIndex]; @@ -576,7 +445,7 @@ namespace Obi /// Position to teleport the particle to, expressed in solver space. public void TeleportParticle(int actorIndex, Vector3 position) { - if (!isLoaded || actorIndex < 0 || actorIndex >= solverIndices.count) + if (!isLoaded || actorIndex < 0 || actorIndex >= solverIndices.Length) return; int solverIndex = solverIndices[actorIndex]; @@ -584,8 +453,9 @@ namespace Obi Vector4 delta = (Vector4)position - m_Solver.positions[solverIndex]; m_Solver.positions[solverIndex] += delta; m_Solver.prevPositions[solverIndex] += delta; - m_Solver.endPositions[solverIndex] += delta; + m_Solver.renderablePositions[solverIndex] += delta; m_Solver.startPositions[solverIndex] += delta; + } /// @@ -593,10 +463,10 @@ namespace Obi /// /// World space position to teleport the actor to. /// World space rotation to teleport the actor to. - public virtual Matrix4x4 Teleport(Vector3 position, Quaternion rotation) + public virtual void Teleport(Vector3 position, Quaternion rotation) { if (!isLoaded) - return Matrix4x4.identity; + return; // Subtract current transform position/rotation, then add new world space position/rotation. // Lastly, set the transform to the new position/rotation. @@ -609,18 +479,18 @@ namespace Obi Quaternion rotOffset = offset.rotation; - for (int i = 0; i < solverIndices.count; i++) + for (int i = 0; i < solverIndices.Length; i++) { int solverIndex = solverIndices[i]; - m_Solver.positions[solverIndex] = - m_Solver.prevPositions[solverIndex] = - m_Solver.endPositions[solverIndex] = + m_Solver.positions[solverIndex] = + m_Solver.prevPositions[solverIndex] = + m_Solver.renderablePositions[solverIndex] = m_Solver.startPositions[solverIndex] = offset.MultiplyPoint3x4(m_Solver.positions[solverIndex]); m_Solver.orientations[solverIndex] = m_Solver.prevOrientations[solverIndex] = - m_Solver.endOrientations[solverIndex] = + m_Solver.renderableOrientations[solverIndex] = m_Solver.startOrientations[solverIndex] = rotOffset * m_Solver.orientations[solverIndex]; m_Solver.velocities[solverIndex] = Vector4.zero; @@ -630,37 +500,33 @@ namespace Obi transform.position = position; transform.rotation = rotation; - return offset; } protected virtual void SwapWithFirstInactiveParticle(int actorIndex) { // update solver indices: - m_Solver.particleToActor[solverIndices[actorIndex]].indexInActor = activeParticleCount; - m_Solver.particleToActor[solverIndices[activeParticleCount]].indexInActor = actorIndex; - solverIndices.Swap(actorIndex, activeParticleCount); + m_Solver.particleToActor[solverIndices[actorIndex]].indexInActor = m_ActiveParticleCount; + m_Solver.particleToActor[solverIndices[m_ActiveParticleCount]].indexInActor = actorIndex; + + solverIndices.Swap(actorIndex, m_ActiveParticleCount); } /// /// Activates one particle. /// + /// Index in the actor arrays of the particle we will activate. /// - /// True if a particle could be activated. False if there are no particles to activate. + /// True if the particle was inactive. False if the particle was already active. /// /// This operation preserves the relative order of all particles. - public virtual bool ActivateParticle() + public bool ActivateParticle(int actorIndex) { - if (activeParticleCount >= particleCount) + if (IsParticleActive(actorIndex)) return false; - // set active particle radius W to 1. - var radii = m_Solver.principalRadii[solverIndices[activeParticleCount]]; - radii.w = 1; - m_Solver.principalRadii[solverIndices[activeParticleCount]] = radii; - - m_ActiveParticleCount[0]++; + SwapWithFirstInactiveParticle(actorIndex); + m_ActiveParticleCount++; m_Solver.dirtyActiveParticles = true; - m_Solver.dirtySimplices |= simplexTypes; return true; } @@ -674,21 +540,14 @@ namespace Obi /// /// This operation does not preserve the relative order of other particles, because the last active particle will /// swap positions with the particle being deactivated. - public virtual bool DeactivateParticle(int actorIndex) + public bool DeactivateParticle(int actorIndex) { if (!IsParticleActive(actorIndex)) return false; - m_ActiveParticleCount[0]--; - - // set inactive particle W to zero, this allows renderers to ignore it. - var radii = m_Solver.principalRadii[solverIndices[actorIndex]]; - radii.w = 0; - m_Solver.principalRadii[solverIndices[actorIndex]] = radii; - + m_ActiveParticleCount--; SwapWithFirstInactiveParticle(actorIndex); m_Solver.dirtyActiveParticles = true; - m_Solver.dirtySimplices |= simplexTypes; return true; } @@ -700,9 +559,9 @@ namespace Obi /// /// True if the particle is active. False if the particle is inactive. /// - public virtual bool IsParticleActive(int actorIndex) + public bool IsParticleActive(int actorIndex) { - return actorIndex < activeParticleCount; + return actorIndex < m_ActiveParticleCount; } /// @@ -722,27 +581,6 @@ namespace Obi } } - /// - /// Updates particle phases in the solver at runtime, including or removing the self-collision flag. - /// - public virtual void SetDirectionalCollisions(bool dfCollisions) - { - if (m_Solver != null && Application.isPlaying && isLoaded) - { - for (int i = 0; i < particleCount; i++) - { - var norm = m_Solver.normals[solverIndices[i]]; - - if (dfCollisions) - norm.w = sharedBlueprint.restNormals[i].w; - else - norm.w = 0; - - m_Solver.normals[solverIndices[i]] = norm; - } - } - } - /// /// Updates particle phases in the solver at runtime, including or removing the one-sided flag. /// @@ -766,7 +604,7 @@ namespace Obi public void SetSimplicesDirty() { if (m_Solver != null) - m_Solver.dirtySimplices |= simplexTypes; + m_Solver.dirtySimplices = true; } /// @@ -779,16 +617,7 @@ namespace Obi public void SetConstraintsDirty(Oni.ConstraintType constraintType) { if (m_Solver != null) - m_Solver.dirtyConstraints |= 1 << (int)constraintType; - } - - /// - /// Marks rendering dirty. - /// - public void SetRenderingDirty(Oni.RenderingSystemType rendererType) - { - if (m_Solver != null) - m_Solver.dirtyRendering |= (int)rendererType; + m_Solver.dirtyConstraints |= (1 << (int)constraintType); } /// @@ -804,8 +633,6 @@ namespace Obi // pin constraints are a special case, because they're not stored in a blueprint. They are created at runtime at stored in the actor itself. if (type == Oni.ConstraintType.Pin) return m_PinConstraints; - if (type == Oni.ConstraintType.Pinhole) - return m_PinholeConstraints; if (sharedBlueprint != null) return sharedBlueprint.GetConstraintsByType(type); @@ -870,34 +697,9 @@ namespace Obi return Quaternion.identity; } - - /// - /// Given a solver particle index, returns the rest position of that particle. - /// - /// Index of the particle in the solver arrays. - /// - /// The position of a given particle in world space. - /// - public Vector3 GetParticleRestPosition(int solverIndex) - { - if (isLoaded) - return m_Solver.restPositions[solverIndex]; - return Vector3.zero; - } - - /// - /// Given a solver particle index, returns the rest orientation of that particle. - /// - /// Index of the particle in the solver arrays. - /// - /// The orientation of a given particle in world space. - /// - public Quaternion GetParticleRestOrientation(int solverIndex) - { - if (isLoaded) - return m_Solver.restOrientations[solverIndex]; - return Quaternion.identity; - } + /** + * + */ /// /// Given a solver particle index, returns the anisotropic frame of that particle in world space. @@ -910,17 +712,19 @@ namespace Obi { if (isLoaded && usesAnisotropicParticles) { - b1 = m_Solver.transform.TransformDirection(m_Solver.renderableOrientations[solverIndex] * Vector3.right); - b2 = m_Solver.transform.TransformDirection(m_Solver.renderableOrientations[solverIndex] * Vector3.up); - b3 = m_Solver.transform.TransformDirection(m_Solver.renderableOrientations[solverIndex] * Vector3.forward); + int baseIndex = solverIndex * 3; - b1[3] = m_Solver.maxScale * m_Solver.renderableRadii[solverIndex][0]; - b2[3] = m_Solver.maxScale * m_Solver.renderableRadii[solverIndex][1]; - b3[3] = m_Solver.maxScale * m_Solver.renderableRadii[solverIndex][2]; + b1 = m_Solver.transform.TransformDirection(m_Solver.anisotropies[baseIndex]); + b2 = m_Solver.transform.TransformDirection(m_Solver.anisotropies[baseIndex + 1]); + b3 = m_Solver.transform.TransformDirection(m_Solver.anisotropies[baseIndex + 2]); + + b1[3] = m_Solver.maxScale * m_Solver.anisotropies[baseIndex][3]; + b2[3] = m_Solver.maxScale * m_Solver.anisotropies[baseIndex + 1][3]; + b3[3] = m_Solver.maxScale * m_Solver.anisotropies[baseIndex + 2][3]; } else { - b1[3] = b2[3] = b3[3] = m_Solver.maxScale * m_Solver.renderableRadii[solverIndex][0]; + b1[3] = b2[3] = b3[3] = m_Solver.maxScale * m_Solver.principalRadii[solverIndex][0]; } } @@ -1001,8 +805,6 @@ namespace Obi m_Solver.invMasses[solverIndex] = invMass; m_Solver.invRotationalMasses[solverIndex] = invMass; } - - UpdateParticleProperties(); } } @@ -1046,23 +848,54 @@ namespace Obi /// Type of "force" applied. public void AddForce(Vector3 force, ForceMode forceMode) { - if (force.sqrMagnitude > Mathf.Epsilon) - bufferedForces.dirty = true; - switch (forceMode) + Vector3 com; + float mass = GetMass(out com); + + if (!float.IsInfinity(mass)) { - case ForceMode.Force: - bufferedForces.force += (Vector4)force; - break; - case ForceMode.Acceleration: - bufferedForces.acceleration += (Vector4)force; - break; - case ForceMode.Impulse: - bufferedForces.impulse += (Vector4)force; - break; - case ForceMode.VelocityChange: - bufferedForces.velChange += (Vector4)force; - break; + + Vector4 bodyForce = force; + + switch (forceMode) + { + case ForceMode.Force: + { + + bodyForce /= mass; + + for (int i = 0; i < solverIndices.Length; ++i) + m_Solver.externalForces[solverIndices[i]] += bodyForce / m_Solver.invMasses[solverIndices[i]]; + + } + break; + case ForceMode.Acceleration: + { + + for (int i = 0; i < solverIndices.Length; ++i) + m_Solver.externalForces[solverIndices[i]] += bodyForce / m_Solver.invMasses[solverIndices[i]]; + + } + break; + case ForceMode.Impulse: + { + + bodyForce /= mass; + + for (int i = 0; i < solverIndices.Length; ++i) + m_Solver.externalForces[solverIndices[i]] += bodyForce / m_Solver.invMasses[solverIndices[i]] / Time.fixedDeltaTime; + + } + break; + case ForceMode.VelocityChange: + { + + for (int i = 0; i < solverIndices.Length; ++i) + m_Solver.externalForces[solverIndices[i]] += bodyForce / m_Solver.invMasses[solverIndices[i]] / Time.fixedDeltaTime; + + } + break; + } } } @@ -1073,55 +906,97 @@ namespace Obi /// Type of "torque" applied. public void AddTorque(Vector3 force, ForceMode forceMode) { - if (force.sqrMagnitude > Mathf.Epsilon) - bufferedForces.dirty = true; - switch (forceMode) + Vector3 com; + float mass = GetMass(out com); + + if (!float.IsInfinity(mass)) { - case ForceMode.Force: - bufferedForces.angularForce += (Vector4)force; - break; - case ForceMode.Acceleration: - bufferedForces.angularAcceleration += (Vector4)force; - break; - case ForceMode.Impulse: - bufferedForces.angularImpulse += (Vector4)force; - break; - case ForceMode.VelocityChange: - bufferedForces.angularVelChange += (Vector4)force; - break; + + Vector3 bodyForce = force; + + switch (forceMode) + { + case ForceMode.Force: + { + + bodyForce /= mass; + + for (int i = 0; i < solverIndices.Length; ++i) + { + + Vector3 v = Vector3.Cross(bodyForce / m_Solver.invMasses[solverIndices[i]], (Vector3)m_Solver.positions[solverIndices[i]] - com); + m_Solver.externalForces[solverIndices[i]] += new Vector4(v.x, v.y, v.z, 0); + } + + } + break; + case ForceMode.Acceleration: + { + + for (int i = 0; i < solverIndices.Length; ++i) + { + + Vector3 v = Vector3.Cross(bodyForce / m_Solver.invMasses[solverIndices[i]], (Vector3)m_Solver.positions[solverIndices[i]] - com); + m_Solver.externalForces[solverIndices[i]] += new Vector4(v.x, v.y, v.z, 0); + } + + } + break; + case ForceMode.Impulse: + { + + bodyForce /= mass; + + for (int i = 0; i < solverIndices.Length; ++i) + { + + Vector3 v = Vector3.Cross(bodyForce / m_Solver.invMasses[solverIndices[i]] / Time.fixedDeltaTime, (Vector3)m_Solver.positions[solverIndices[i]] - com); + m_Solver.externalForces[solverIndices[i]] += new Vector4(v.x, v.y, v.z, 0); + } + + } + break; + case ForceMode.VelocityChange: + { + + for (int i = 0; i < solverIndices.Length; ++i) + { + + Vector3 v = Vector3.Cross(bodyForce / m_Solver.invMasses[solverIndices[i]] / Time.fixedDeltaTime, (Vector3)m_Solver.positions[solverIndices[i]] - com); + m_Solver.externalForces[solverIndices[i]] += new Vector4(v.x, v.y, v.z, 0); + } + + } + break; + } } } #region Blueprints - private void LoadBlueprintParticles(ObiActorBlueprint bp) + private void LoadBlueprintParticles(ObiActorBlueprint bp, int groupID) { Matrix4x4 l2sTransform = actorLocalToSolverMatrix; Quaternion l2sRotation = l2sTransform.rotation; - for (int i = 0; i < solverIndices.count; i++) + for (int i = 0; i < solverIndices.Length; i++) { int k = solverIndices[i]; if (bp.positions != null && i < bp.positions.Length) { - m_Solver.endPositions[k] = m_Solver.startPositions[k] = m_Solver.prevPositions[k] = m_Solver.positions[k] = l2sTransform.MultiplyPoint3x4(bp.positions[i]); + m_Solver.startPositions[k] = m_Solver.prevPositions[k] = m_Solver.positions[k] = l2sTransform.MultiplyPoint3x4(bp.positions[i]); m_Solver.renderablePositions[k] = l2sTransform.MultiplyPoint3x4(bp.positions[i]); } if (bp.orientations != null && i < bp.orientations.Length) { - m_Solver.endOrientations[k] = m_Solver.startOrientations[k] = m_Solver.prevOrientations[k] = m_Solver.orientations[k] = l2sRotation * bp.orientations[i]; + m_Solver.startOrientations[k] = m_Solver.prevOrientations[k] = m_Solver.orientations[k] = l2sRotation * bp.orientations[i]; m_Solver.renderableOrientations[k] = l2sRotation * bp.orientations[i]; } - // for softbodies, xyz values store SDF normal in particle's local space: needs to be transformed using particle orientation during simulation. - // w value stores sparse SDF if < 0. - if (bp.restNormals != null && i < bp.restNormals.Length) - m_Solver.normals[k] = bp.restNormals[i]; - if (bp.restPositions != null && i < bp.restPositions.Length) m_Solver.restPositions[k] = bp.restPositions[i]; @@ -1135,22 +1010,13 @@ namespace Obi m_Solver.angularVelocities[k] = l2sTransform.MultiplyVector(bp.angularVelocities[i]); if (bp.invMasses != null && i < bp.invMasses.Length) - m_Solver.invMasses[k] = bp.invMasses[i] / m_MassScale; + m_Solver.invMasses[k] = bp.invMasses[i]; if (bp.invRotationalMasses != null && i < bp.invRotationalMasses.Length) - m_Solver.invRotationalMasses[k] = bp.invRotationalMasses[i] / m_MassScale; + m_Solver.invRotationalMasses[k] = bp.invRotationalMasses[i]; if (bp.principalRadii != null && i < bp.principalRadii.Length) - { - Vector4 radii = bp.principalRadii[i]; - radii.w = i < sourceBlueprint.activeParticleCount ? 1 : 0; - m_Solver.principalRadii[k] = radii; - } - else - { - // need inactive emitter particles to zero as their flag. - m_Solver.principalRadii[k] = Vector4.zero; - } + m_Solver.principalRadii[k] = bp.principalRadii[i]; if (bp.filters != null && i < bp.filters.Length) m_Solver.filters[k] = bp.filters[i]; @@ -1161,12 +1027,9 @@ namespace Obi m_Solver.phases[k] = ObiUtils.MakePhase(groupID, 0); } - m_ActiveParticleCount[0] = sourceBlueprint.activeParticleCount; + m_ActiveParticleCount = sourceBlueprint.activeParticleCount; m_Solver.dirtyActiveParticles = true; - m_Solver.dirtyDeformableTriangles = true; - m_Solver.dirtyDeformableEdges = true; - m_Solver.dirtySimplices |= simplexTypes; - m_Solver.dirtyConstraints |= ~0; + m_Solver.dirtySimplices = true; // Push collision materials: UpdateCollisionMaterials(); @@ -1176,12 +1039,9 @@ namespace Obi private void UnloadBlueprintParticles() { // Update active particles. - m_ActiveParticleCount[0] = 0; + m_ActiveParticleCount = 0; m_Solver.dirtyActiveParticles = true; - m_Solver.dirtyDeformableTriangles = true; - m_Solver.dirtyDeformableEdges = true; - m_Solver.dirtySimplices |= simplexTypes; - m_Solver.dirtyConstraints |= ~0; + m_Solver.dirtySimplices = true; } /// @@ -1201,12 +1061,12 @@ namespace Obi { int solverIndex = solverIndices[i]; - solver.startPositions[solverIndex] = solver.endPositions[solverIndex] = solver.positions[solverIndex] = l2sTransform.MultiplyPoint3x4(sourceBlueprint.positions[i]); + solver.renderablePositions[solverIndex] = solver.positions[solverIndex] = l2sTransform.MultiplyPoint3x4(sourceBlueprint.positions[i]); solver.velocities[solverIndex] = l2sTransform.MultiplyVector(sourceBlueprint.velocities[i]); if (usesOrientedParticles) { - solver.startOrientations[solverIndex] = solver.endOrientations[solverIndex] = solver.orientations[solverIndex] = l2sRotation * sourceBlueprint.orientations[i]; + solver.renderableOrientations[solverIndex] = solver.orientations[solverIndex] = l2sRotation * sourceBlueprint.orientations[i]; solver.angularVelocities[solverIndex] = l2sTransform.MultiplyVector(sourceBlueprint.angularVelocities[i]); } } @@ -1224,39 +1084,36 @@ namespace Obi /// The blueprint that we want to fill with current particle data. /// Note that this will not resize the blueprint's data arrays, and that it does not perform range checking. For this reason, /// you must supply a blueprint large enough to store all particles' data. - public bool SaveStateToBlueprint(ObiActorBlueprint bp) + public void SaveStateToBlueprint(ObiActorBlueprint bp) { - if (bp == null || !m_Loaded) - return false; + if (bp == null) + return; Matrix4x4 l2sTransform = actorLocalToSolverMatrix.inverse; Quaternion l2sRotation = l2sTransform.rotation; - // blueprint might have been regenerated, and reduced its size: - for (int i = 0; i < solverIndices.count; i++) + for (int i = 0; i < solverIndices.Length; i++) { int k = solverIndices[i]; - if (bp.positions != null && m_Solver.positions != null && k < m_Solver.positions.count && i < bp.positions.Length) + if (m_Solver.positions != null && k < m_Solver.positions.count) bp.positions[i] = l2sTransform.MultiplyPoint3x4(m_Solver.positions[k]); - if (bp.velocities != null && m_Solver.velocities != null && k < m_Solver.velocities.count && i < bp.velocities.Length) + if (m_Solver.velocities != null && k < m_Solver.velocities.count) bp.velocities[i] = l2sTransform.MultiplyVector(m_Solver.velocities[k]); } - - return true; } protected void StoreState() { - DestroyImmediate(m_State); - m_State = Instantiate(sourceBlueprint); - SaveStateToBlueprint(m_State); + DestroyImmediate(state); + state = Instantiate(sourceBlueprint); + SaveStateToBlueprint(state); } public void ClearState() { - DestroyImmediate(m_State); + DestroyImmediate(state); } #endregion @@ -1264,119 +1121,104 @@ namespace Obi #region Solver callbacks /// - /// Loads this actor's blueprint into the current solver. Automatically called by . + /// Loads this actor's blueprint into a given solver. Automatically called by . /// - internal virtual void LoadBlueprint() + public virtual void LoadBlueprint(ObiSolver solver) { var bp = sharedBlueprint; // in case we have temporary state, load that instead of the original blueprint. if (Application.isPlaying) { - bp = m_State != null ? m_State : sourceBlueprint; + bp = state != null ? state : sourceBlueprint; } m_Loaded = true; - LoadBlueprintParticles(bp); + LoadBlueprintParticles(bp, solver.actors.Count); + solver.dirtyConstraints |= ~0; - OnBlueprintLoaded?.Invoke(this, bp); + if (OnBlueprintLoaded != null) + OnBlueprintLoaded(this, null); } /// /// Unloads this actor's blueprint from a given solver. Automatically called by . /// - internal virtual void UnloadBlueprint() + public virtual void UnloadBlueprint(ObiSolver solver) { // instantiate blueprint and store current state in the instance: if (Application.isPlaying) + { StoreState(); + } m_Loaded = false; // unload the blueprint. + solver.dirtyConstraints |= ~0; UnloadBlueprintParticles(); - OnBlueprintUnloaded?.Invoke(this, sharedBlueprint); + if (OnBlueprintUnloaded != null) + OnBlueprintUnloaded(this, null); } - public virtual void SimulationStart(float timeToSimulate, float substepTime) + public virtual void PrepareFrame() { - OnSimulationStart?.Invoke(this, timeToSimulate, substepTime); - - // Apply any buffered forces/torques: - if (bufferedForces.dirty) - { - float mass = GetMass(out Vector3 com); - - if (!float.IsInfinity(mass)) - { - Vector4 accum; - foreach (var p in solverIndices) - { - accum = bufferedForces.force / m_Solver.invMasses[p] / mass; - accum += bufferedForces.acceleration / m_Solver.invMasses[p]; - accum += bufferedForces.impulse / m_Solver.invMasses[p] / mass / timeToSimulate; - accum += bufferedForces.velChange / m_Solver.invMasses[p] / timeToSimulate; - m_Solver.externalForces[p] += accum; - - accum = bufferedForces.angularForce / m_Solver.invMasses[p] / mass; - accum += bufferedForces.angularAcceleration / m_Solver.invMasses[p]; - accum += bufferedForces.angularImpulse / m_Solver.invMasses[p] / mass / timeToSimulate; - accum += bufferedForces.angularVelChange / m_Solver.invMasses[p] / timeToSimulate; - m_Solver.externalForces[p] += (Vector4)Vector3.Cross(accum, (Vector3)m_Solver.positions[p] - com); - } - } - - bufferedForces.Clear(); - } + if (OnPrepareFrame != null) + OnPrepareFrame(this); } - public virtual void CollisionDetectionStart(float simulatedTime, float substepTime) + public virtual void PrepareStep(float stepTime) { - OnCollisionDetectionStart?.Invoke(this, simulatedTime, substepTime); + if (OnPrepareStep != null) + OnPrepareStep(this, stepTime); } - public virtual void SubstepsStart(float simulatedTime, float substepTime) + public virtual void BeginStep(float stepTime) { - OnSubstepsStart?.Invoke(this, simulatedTime, substepTime); + if (OnBeginStep != null) + OnBeginStep(this,stepTime); } - public virtual void SimulationEnd(float simulatedTime, float substepTime) + public virtual void Substep(float substepTime) { - OnSimulationEnd?.Invoke(this, simulatedTime, substepTime); + if (OnSubstep != null) + OnSubstep(this,substepTime); } - public virtual void RequestReadback() + public virtual void EndStep(float substepTime) { - OnRequestReadback?.Invoke(this); + if (OnEndStep != null) + OnEndStep(this,substepTime); } - public virtual void Interpolate(float simulatedTime, float substepTime) + public virtual void Interpolate() { - // Update particle positions/orientations in the solver: + // Update particle renderable positions/orientations in the solver: if (!Application.isPlaying && isLoaded) { Matrix4x4 l2sTransform = actorLocalToSolverMatrix; Quaternion l2sRotation = l2sTransform.rotation; - for (int i = 0; i < solverIndices.count; i++) + for (int i = 0; i < solverIndices.Length; i++) { int k = solverIndices[i]; - if (sourceBlueprint.positions != null && i < sourceBlueprint.positions.Length) + if (sourceBlueprint.positions != null && i < sourceBlueprint.positions.Length) { - m_Solver.renderablePositions[k] = m_Solver.positions[k] = m_Solver.startPositions[k] = m_Solver.endPositions[k] = l2sTransform.MultiplyPoint3x4(sourceBlueprint.positions[i]); + m_Solver.renderablePositions[k] = l2sTransform.MultiplyPoint3x4(sourceBlueprint.positions[i]); } if (sourceBlueprint.orientations != null && i < sourceBlueprint.orientations.Length) { - m_Solver.renderableOrientations[k] = m_Solver.orientations[k] = m_Solver.startOrientations[k] = m_Solver.endOrientations[k] = l2sRotation * sourceBlueprint.orientations[i]; + m_Solver.renderableOrientations[k] = l2sRotation * sourceBlueprint.orientations[i]; } } } - OnInterpolate?.Invoke(this, simulatedTime, substepTime); + if (OnInterpolate != null) + OnInterpolate(this); } public virtual void OnSolverVisibilityChanged(bool visible) diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/BurstBackend.cs b/Assets/Obi/Scripts/Common/Backends/Burst/BurstBackend.cs index 6a94fc9db..0c4b373cb 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/BurstBackend.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/BurstBackend.cs @@ -10,7 +10,7 @@ namespace Obi { public class BurstBackend : IObiBackend { - #region Solver +#region Solver public ISolverImpl CreateSolver(ObiSolver solver, int capacity) { return new BurstSolverImpl(solver); @@ -20,7 +20,8 @@ namespace Obi if (solver != null) solver.Destroy(); } - #endregion +#endregion + } } #endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/BurstIntegration.cs b/Assets/Obi/Scripts/Common/Backends/Burst/BurstIntegration.cs index baaa099ab..d25a5ba29 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/BurstIntegration.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/BurstIntegration.cs @@ -39,9 +39,7 @@ namespace Obi [MethodImpl(MethodImplOptions.AggressiveInlining)] public static float4 DifferentiateAngular(quaternion rotation, quaternion prevRotation, float dt) { - quaternion deltaq = math.mul(rotation, math.inverse(prevRotation)); - float sign = deltaq.value.w >= 0 ? 1 : -1; - return new float4(sign * deltaq.value.xyz * 2.0f / dt, 0); + return new float4((math.mul(rotation, math.inverse(prevRotation)).value * 2.0f / dt).xyz, 0); } } } diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/BurstJobHandle.cs b/Assets/Obi/Scripts/Common/Backends/Burst/BurstJobHandle.cs index df3caa35c..189ccdd8b 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/BurstJobHandle.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/BurstJobHandle.cs @@ -5,16 +5,22 @@ namespace Obi { public class BurstJobHandle : IObiJobHandle { - public JobHandle jobHandle { get; set; } = new JobHandle(); + private JobHandle handle = new JobHandle(); + + public BurstJobHandle SetHandle(JobHandle newHandle) + { + handle = newHandle; + return this; + } public void Complete() { - jobHandle.Complete(); + handle.Complete(); } public void Release() { - jobHandle = new JobHandle(); + handle = new JobHandle(); } } } diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/BurstMath.cs b/Assets/Obi/Scripts/Common/Backends/Burst/BurstMath.cs index e683dce37..e333ae55d 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/BurstMath.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/BurstMath.cs @@ -1,17 +1,16 @@ -#if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) -using System; -using System.Collections.Generic; -using UnityEngine; -using Unity.Collections; -using Unity.Jobs; -using Unity.Mathematics; -using Unity.Burst; -using System.Runtime.CompilerServices; +#if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) +using System; +using System.Collections.Generic; +using UnityEngine; +using Unity.Collections; +using Unity.Jobs; +using Unity.Mathematics; +using Unity.Burst; +using System.Runtime.CompilerServices; using Unity.Collections.LowLevel.Unsafe; -using System.Threading; -namespace Obi -{ +namespace Obi +{ public static class BurstMath { @@ -20,83 +19,23 @@ namespace Obi public const float one = 1; public static readonly float golden = (math.sqrt(5.0f) + 1) / 2.0f; - public static unsafe void AddRange(this NativeList dst, U[] array) where T : unmanaged where U : unmanaged - { - var tsize = sizeof(T); - var usize = sizeof(U); - - if (tsize == usize) - { - int dstIndex = dst.Length; - dst.ResizeUninitialized(dst.Length + array.Length); - - fixed (U* srcPtr = array) - { - var dstPtr = (T*)dst.GetUnsafePtr() + dstIndex; - UnsafeUtility.MemCpy(dstPtr, srcPtr, usize * array.Length); - } - } - } - - public static unsafe void AddReplicate(this NativeList dst, U value, int length) where T : unmanaged where U : unmanaged - { - var tsize = sizeof(T); - var usize = sizeof(U); - - if (tsize == usize) - { - int dstIndex = dst.Length; - dst.ResizeUninitialized(dst.Length + length); - - var dstPtr = (T*)dst.GetUnsafePtr() + dstIndex; - var srcPtr = UnsafeUtility.AddressOf(ref value); - UnsafeUtility.MemCpyReplicate(dstPtr, srcPtr, tsize, length); - } - } - - public static float AtomicAdd(ref float location, float value) - { - float newCurrentValue = location; - while (true) - { - float currentValue = newCurrentValue; - float newValue = currentValue + value; - newCurrentValue = Interlocked.CompareExchange(ref location, newValue, currentValue); - if (newCurrentValue.Equals(currentValue)) - return newValue; - } - } - + // multiplies a column vector by a row vector. [MethodImpl(MethodImplOptions.AggressiveInlining)] - public unsafe static void AtomicAdd(NativeArray array, int p, float4 data) + public static float3x3 multrnsp(float4 column, float4 row) { - float4* arr = (float4*)array.GetUnsafePtr(); - AtomicAdd(ref arr[p].x, data.x); - AtomicAdd(ref arr[p].y, data.y); - AtomicAdd(ref arr[p].z, data.z); - AtomicAdd(ref arr[p].w, data.w); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public unsafe static void AtomicAdd(NativeArray array, int p, float data) - { - float* arr = (float*)array.GetUnsafePtr(); - AtomicAdd(ref arr[p], data); + return new float3x3(column[0] * row[0], column[0] * row[1], column[0] * row[2], + column[1] * row[0], column[1] * row[1], column[1] * row[2], + column[2] * row[0], column[2] * row[1], column[2] * row[2]); } // multiplies a column vector by a row vector. [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static float3x3 multrnsp(in float4 column, in float4 row) + public static float4x4 multrnsp4(float4 column, float4 row) { - return new float3x3(column.xyz * row[0], column.xyz * row[1], column.xyz * row[2]); - } - - // multiplies a column vector by a row vector. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static float4x4 multrnsp4(in float4 column, float4 row) - { - row[3] = 0; - return new float4x4(column * row[0], column * row[1], column * row[2], float4.zero); + return new float4x4(column[0] * row[0], column[0] * row[1], column[0] * row[2], 0, + column[1] * row[0], column[1] * row[1], column[1] * row[2], 0, + column[2] * row[0], column[2] * row[1], column[2] * row[2], 0, + 0, 0, 0, 1); } [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -108,33 +47,6 @@ namespace Obi return math.dot(onto, vector) * onto / len; } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static float3 project(this float3 vector, float3 onto) - { - float len = math.lengthsq(onto); - if (len < epsilon) - return float3.zero; - return math.dot(onto, vector) * onto / len; - } - - /*[MethodImpl(MethodImplOptions.AggressiveInlining)] - public static float4 GetInvParticleInertiaTensor(float4 principalRadii, float invRotationalMass) - { - float4 sqrRadii = principalRadii * principalRadii; - return new float4(5 * invRotationalMass / math.max(new float3(sqrRadii[1] + sqrRadii[2], - sqrRadii[0] + sqrRadii[2], - sqrRadii[0] + sqrRadii[1]), epsilon), 0); - }*/ - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static float4 GetParticleInertiaTensor(float4 principalRadii, float invRotationalMass) - { - float4 sqrRadii = principalRadii * principalRadii; - return 0.2f / (invRotationalMass + epsilon) * new float4(sqrRadii[1] + sqrRadii[2], - sqrRadii[0] + sqrRadii[2], - sqrRadii[0] + sqrRadii[1], 0); - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static float4x4 TransformInertiaTensor(float4 tensor, quaternion rotation) { @@ -171,41 +83,30 @@ namespace Obi NativeArray rigidbodies, NativeArray linearDeltas, NativeArray angularDeltas, - BurstInertialFrame solverToWorld) + BurstAffineTransform solverToWorld) { float4 linear = rigidbodies[rigidbodyIndex].velocity + linearDeltas[rigidbodyIndex]; float4 angular = rigidbodies[rigidbodyIndex].angularVelocity + angularDeltas[rigidbodyIndex]; - float4 r = solverToWorld.frame.TransformPoint(point) - rigidbodies[rigidbodyIndex].com; + float4 r = solverToWorld.TransformPoint(point) - rigidbodies[rigidbodyIndex].com; - // calculate rigidbody velocity: - float4 wsRigidbodyVelocity = linear + new float4(math.cross(angular.xyz, r.xyz), 0); - - // calculate solver velocity: - float4 wsSolverVelocity = solverToWorld.velocity + new float4(math.cross(solverToWorld.angularVelocity.xyz, point.xyz), 0); - - // convert the resulting velocity back to solver space: - return solverToWorld.frame.InverseTransformVector(wsRigidbodyVelocity - wsSolverVelocity); + // Point is assumed to be expressed in solver space. Since rigidbodies are expressed in world space, we need to convert the + // point to world space, and convert the resulting velocity back to solver space. + return solverToWorld.InverseTransformVector(linear + new float4(math.cross(angular.xyz, r.xyz), 0)); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static float4 GetRigidbodyVelocityAtPoint(int rigidbodyIndex, float4 point, NativeArray rigidbodies, - BurstInertialFrame solverToWorld) + BurstAffineTransform solverToWorld) { float4 linear = rigidbodies[rigidbodyIndex].velocity; float4 angular = rigidbodies[rigidbodyIndex].angularVelocity; - float4 r = solverToWorld.frame.TransformPoint(point) - rigidbodies[rigidbodyIndex].com; - - // calculate rigidbody velocity: - float4 wsRigidbodyVelocity = linear + new float4(math.cross(angular.xyz, r.xyz), 0); - - // calculate solver velocity: - float4 wsSolverVelocity = solverToWorld.velocity + new float4(math.cross(solverToWorld.angularVelocity.xyz, point.xyz), 0); + float4 r = solverToWorld.TransformPoint(point) - rigidbodies[rigidbodyIndex].com; // Point is assumed to be expressed in solver space. Since rigidbodies are expressed in world space, we need to convert the // point to world space, and convert the resulting velocity back to solver space. - return solverToWorld.frame.InverseTransformVector(wsRigidbodyVelocity - wsSolverVelocity); + return solverToWorld.InverseTransformVector(linear + new float4(math.cross(angular.xyz, r.xyz), 0)); } [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -219,12 +120,8 @@ namespace Obi { float4 impulseWS = solverToWorld.TransformVector(impulse); float4 r = solverToWorld.TransformPoint(point) - rigidbodies[rigidbodyIndex].com; - - float4 linearDelta = rigidbodies[rigidbodyIndex].inverseMass * impulseWS; - float4 angularDelta = math.mul(rigidbodies[rigidbodyIndex].inverseInertiaTensor, new float4(math.cross(r.xyz, impulseWS.xyz), 0)); - - AtomicAdd(linearDeltas, rigidbodyIndex, linearDelta); - AtomicAdd(angularDeltas, rigidbodyIndex, angularDelta); + linearDeltas[rigidbodyIndex] += rigidbodies[rigidbodyIndex].inverseMass * impulseWS; + angularDeltas[rigidbodyIndex] += math.mul(rigidbodies[rigidbodyIndex].inverseInertiaTensor, new float4(math.cross(r.xyz, impulseWS.xyz), 0)); } [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -240,7 +137,7 @@ namespace Obi // convert quaternion delta to angular acceleration: quaternion newRotation = math.normalize(new quaternion(rotationWS.value + deltaWS.value)); - AtomicAdd(angularDeltas, rigidbodyIndex, BurstIntegration.DifferentiateAngular(newRotation, rotationWS, dt)); + angularDeltas[rigidbodyIndex] += BurstIntegration.DifferentiateAngular(newRotation, rotationWS, dt); } [MethodImpl(MethodImplOptions.AggressiveInlining)] @@ -250,15 +147,6 @@ namespace Obi if (dot < 0) normal -= 2 * dot * forward; } - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void OneSidedNormal2(float4 xij, ref float4 nij) - { - float dot = math.dot(xij.xyz, nij.xyz); - if (dot < 0) - nij = xij - 2 * dot * nij; - else nij = xij; - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static float EllipsoidRadius(float4 normSolverDirection, quaternion orientation, float3 radii) { @@ -269,20 +157,15 @@ namespace Obi public static quaternion ExtractRotation(float4x4 matrix, quaternion rotation, int iterations) { - return ExtractRotation((float3x3)matrix, rotation, iterations); - } - - public static quaternion ExtractRotation(float3x3 matrix, quaternion rotation, int iterations) - { - float3x3 R; + float4x4 R; for (int i = 0; i < iterations; ++i) { - R = rotation.toMatrix3(); - float3 omega = (math.cross(R.c0, matrix.c0) + math.cross(R.c1, matrix.c1) + math.cross(R.c2, matrix.c2)) / - (math.abs(math.dot(R.c0, matrix.c0) + math.dot(R.c1, matrix.c1) + math.dot(R.c2, matrix.c2)) + epsilon); + R = rotation.toMatrix(); + float3 omega = (math.cross(R.c0.xyz, matrix.c0.xyz) + math.cross(R.c1.xyz, matrix.c1.xyz) + math.cross(R.c2.xyz, matrix.c2.xyz)) / + (math.abs(math.dot(R.c0.xyz, matrix.c0.xyz) + math.dot(R.c1.xyz, matrix.c1.xyz) + math.dot(R.c2.xyz, matrix.c2.xyz)) + BurstMath.epsilon); float w = math.length(omega); - if (w < epsilon) + if (w < BurstMath.epsilon) break; rotation = math.normalize(math.mul(quaternion.AxisAngle((1.0f / w) * omega, w), rotation)); @@ -320,25 +203,6 @@ namespace Obi 0, 0, 0, 1); } - public static float3x3 toMatrix3(this quaternion q) - { - float xx = q.value.x * q.value.x; - float xy = q.value.x * q.value.y; - float xz = q.value.x * q.value.z; - float xw = q.value.x * q.value.w; - - float yy = q.value.y * q.value.y; - float yz = q.value.y * q.value.z; - float yw = q.value.y * q.value.w; - - float zz = q.value.z * q.value.z; - float zw = q.value.z * q.value.w; - - return new float3x3(1 - 2 * (yy + zz), 2 * (xy - zw), 2 * (xz + yw), - 2 * (xy + zw), 1 - 2 * (xx + zz), 2 * (yz - xw), - 2 * (xz - yw), 2 * (yz + xw), 1 - 2 * (xx + yy)); - } - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static float4x4 asDiagonal(this float4 v) { @@ -348,11 +212,6 @@ namespace Obi 0, 0, 0, v.w); } - /** * Modulo operator that also follows intuition for negative arguments. That is , -1 mod 3 = 2, not -1. */ - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static float3 nfmod(float3 a, float3 b) { return a - b * math.floor(a / b); } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static float nfmod(float a, float b) { return a - b * math.floor(a / b); } - [MethodImpl(MethodImplOptions.AggressiveInlining)] public static float4 diagonal(this float4x4 value) { @@ -403,8 +262,8 @@ namespace Obi V.c0 = V0; V.c1 = V1; V.c2 = V2; - } - + } + static float3 unitOrthogonal(this float3 input) { // Find a vector to cross() the input with. @@ -419,9 +278,9 @@ namespace Obi float invnm = 1 / math.length(input.yz); return new float3(0, -input.z * invnm, input.y * invnm); } - } - - // D is symmetric, S is an eigen value + } + + // D is symmetric, S is an eigen value static float3 EigenVector(float3x3 D, float S) { // Compute a cofactor matrix of D - sI. @@ -458,8 +317,7 @@ namespace Obi { V[0] = 1; return V; } - - if (index == 0) + else if (index == 0) { V[0] = c0p[0]; V[1] = c1p[0]; V[2] = c2p[0]; } @@ -472,8 +330,8 @@ namespace Obi V = c2p; } return math.normalize(V); - } - + } + static float3 EigenValues(float3x3 D) { float one_third = 1 / 3.0f; @@ -532,8 +390,8 @@ namespace Obi } return new float3(e2, e1, e0); - } - + } + public struct CachedTri { public float4 vertex; @@ -554,8 +412,8 @@ namespace Obi data[2] = math.dot(edge1, edge1); data[3] = data[0] * data[2] - data[1] * data[1]; } - } - + } + public static float4 NearestPointOnTri(in CachedTri tri, float4 p, out float4 bary) @@ -718,21 +576,7 @@ namespace Obi float4 ap = p - a; float4 ab = b - a; - mu = math.dot(ap, ab) / (math.dot(ab, ab) + epsilon); - - if (clampToSegment) - mu = math.saturate(mu); - - return a + ab * mu; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static float3 NearestPointOnEdge(float3 a, float3 b, float3 p, out float mu, bool clampToSegment = true) - { - float3 ap = p - a; - float3 ab = b - a; - - mu = math.dot(ap, ab) / (math.dot(ab, ab) + epsilon); + mu = math.dot(ap, ab) / math.dot(ab, ab); if (clampToSegment) mu = math.saturate(mu); @@ -835,178 +679,6 @@ namespace Obi return center; } - // https://fgiesen.wordpress.com/2009/12/13/decoding-morton-codes/ - - // "Insert" a 0 bit after each of the 16 low bits of x - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static uint Part1By1(uint x) - { - x &= 0x0000ffff; // x = ---- ---- ---- ---- fedc ba98 7654 3210 - x = (x ^ (x << 8)) & 0x00ff00ff; // x = ---- ---- fedc ba98 ---- ---- 7654 3210 - x = (x ^ (x << 4)) & 0x0f0f0f0f; // x = ---- fedc ---- ba98 ---- 7654 ---- 3210 - x = (x ^ (x << 2)) & 0x33333333; // x = --fe --dc --ba --98 --76 --54 --32 --10 - x = (x ^ (x << 1)) & 0x55555555; // x = -f-e -d-c -b-a -9-8 -7-6 -5-4 -3-2 -1-0 - return x; - } - - - // "Insert" two 0 bits after each of the 10 low bits of x - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static uint Part1By2(uint x) - { - x &= 0x000003ff; // x = ---- ---- ---- ---- ---- --98 7654 3210 - x = (x ^ (x << 16)) & 0xff0000ff; // x = ---- --98 ---- ---- ---- ---- 7654 3210 - x = (x ^ (x << 8)) & 0x0300f00f; // x = ---- --98 ---- ---- 7654 ---- ---- 3210 - x = (x ^ (x << 4)) & 0x030c30c3; // x = ---- --98 ---- 76-- --54 ---- 32-- --10 - x = (x ^ (x << 2)) & 0x09249249; // x = ---- 9--8 --7- -6-- 5--4 --3- -2-- 1--0 - return x; - } - - // Inverse of Part1By1 - "delete" all odd-indexed bits - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static uint Compact1By1(uint x) - { - x &= 0x55555555; // x = -f-e -d-c -b-a -9-8 -7-6 -5-4 -3-2 -1-0 - x = (x ^ (x >> 1)) & 0x33333333; // x = --fe --dc --ba --98 --76 --54 --32 --10 - x = (x ^ (x >> 2)) & 0x0f0f0f0f; // x = ---- fedc ---- ba98 ---- 7654 ---- 3210 - x = (x ^ (x >> 4)) & 0x00ff00ff; // x = ---- ---- fedc ba98 ---- ---- 7654 3210 - x = (x ^ (x >> 8)) & 0x0000ffff; // x = ---- ---- ---- ---- fedc ba98 7654 3210 - return x; - } - - // Inverse of Part1By2 - "delete" all bits not at positions divisible by 3 - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static uint Compact1By2(uint x) - { - x &= 0x09249249; // x = ---- 9--8 --7- -6-- 5--4 --3- -2-- 1--0 - x = (x ^ (x >> 2)) & 0x030c30c3; // x = ---- --98 ---- 76-- --54 ---- 32-- --10 - x = (x ^ (x >> 4)) & 0x0300f00f; // x = ---- --98 ---- ---- 7654 ---- ---- 3210 - x = (x ^ (x >> 8)) & 0xff0000ff; // x = ---- --98 ---- ---- ---- ---- 7654 3210 - x = (x ^ (x >> 16)) & 0x000003ff; // x = ---- ---- ---- ---- ---- --98 7654 3210 - return x; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static uint EncodeMorton2(uint2 coords) - { - return (Part1By1(coords.y) << 1) + Part1By1(coords.x); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static uint EncodeMorton3(uint3 coords) - { - return (Part1By2(coords.z) << 2) + (Part1By2(coords.y) << 1) + Part1By2(coords.x); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static uint3 DecodeMorton2(uint code) - { - return new uint3(Compact1By1(code >> 0), Compact1By1(code >> 1), 0); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static uint3 DecodeMorton3(uint code) - { - return new uint3(Compact1By2(code >> 0), Compact1By2(code >> 1), Compact1By2(code >> 2)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static float4 UnpackFloatRGBA(float v) - { - uint rgba = math.asuint(v); - float r = ((rgba & 0xff000000) >> 24) / 255f; - float g = ((rgba & 0x00ff0000) >> 16) / 255f; - float b = ((rgba & 0x0000ff00) >> 8) / 255f; - float a = (rgba & 0x000000ff) / 255f; - return new float4(r, g, b, a); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static float PackFloatRGBA(float4 enc) - { - uint rgba = ((uint)(enc.x * 255f) << 24) + - ((uint)(enc.y * 255f) << 16) + - ((uint)(enc.z * 255f) << 8) + - (uint)(enc.w * 255f); - return math.asfloat(rgba); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static float2 UnpackFloatRG(float v) - { - uint rgba = math.asuint(v); - float r = ((rgba & 0xffff0000) >> 16) / 65535f; - float g = (rgba & 0x0000ffff) / 65535f; - return new float2(r, g); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static float PackFloatRG(float2 enc) - { - uint rgba = ((uint)(enc.x * 65535f) << 16) + - (uint)(enc.y * 65535f); - return math.asfloat(rgba); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - static float2 OctWrap(float2 v) - { - return (1.0f - math.abs(v.yx)) * new float2(v.x >= 0.0f ? 1.0f : -1.0f, v.y >= 0.0f ? 1.0f : -1.0f); - } - - // use octahedral encoding to reduce to 2 coords, then pack them as two 16 bit values in a 32 bit float. - public static float OctEncode(float3 n) - { - n /= math.abs(n.x) + math.abs(n.y) + math.abs(n.z); - n.xy = n.z >= 0.0 ? n.xy : OctWrap(n.xy); - n.xy = n.xy * 0.5f + 0.5f; - - uint nx = (uint)(n.x * 0xffff); - uint ny = (uint)(n.y * 0xffff); - return math.asfloat((nx << 16) | (ny & 0xffff)); - } - - public static float3 OctDecode(float k) - { - uint d = math.asuint(k); - float2 f = new float2((d >> 16) / 65535f, (d & 0xffff) / 65535f) * 2f - 1f; - - float3 n = new float3(f.x, f.y, 1.0f - math.abs(f.x) - math.abs(f.y)); - float t = math.saturate(-n.z); - n.x += n.x >= 0.0f ? -t : t; - n.y += n.y >= 0.0f ? -t : t; - return math.normalize(n); - } - - public static float Remap01(float value, float min_, float max_) - { - return (math.min(value, max_) - math.min(value, min_)) / (max_ - min_); - } - - public static float3 Sort(this float3 f) - { - float aux; - if (f.x > f.y) - { - aux = f.x; - f.x = f.y; - f.y = aux; - } - if (f.x > f.z) - { - aux = f.x; - f.x = f.z; - f.z = aux; - } - if (f.y > f.z) - { - aux = f.y; - f.y = f.z; - f.z = aux; - } - return new float3(f.z,f.y,f.x); - } - public static unsafe void RemoveRangeBurst(this NativeList list, int index, int count) where T : unmanaged { @@ -1029,57 +701,6 @@ namespace Obi list.RemoveAtSwapBack(list.Length - 1); } } - - //https://www.shadertoy.com/view/4djSRW - public static float3 Hash33(float3 p3) - { - p3 = math.frac(p3 * new float3(.1031f, .1030f, .0973f)); - p3 += math.dot(p3, p3.yxz + 33.33f); - return math.frac((p3.xxy + p3.yxx) * p3.zyx); - } - - public static float Hash13(float3 p3) - { - p3 = math.frac(p3 * .1031f); - p3 += math.dot(p3, p3.zyx + 31.32f); - return math.frac((p3.x + p3.y) * p3.z); - } - - public static float2 Hash21(float p) - { - float3 p3 = math.frac(new float3(p) * new float3(.1031f, .1030f, .0973f)); - p3 += math.dot(p3, p3.yzx + 33.33f); - return math.frac((p3.xx + p3.yz) * p3.zy); - } - - public static float3 Hash31(float p) - { - float3 p3 = math.frac(new float3(p) * new float3(.1031f, .1030f, .0973f)); - p3 += math.dot(p3, p3.yzx + 33.33f); - return math.frac((p3.xxy + p3.yzz) * p3.zyx); - } - - public static void RandomInCylinder(float seed, float4 pos, float4 dir, float length, float radius, out float4 position, out float3 velocity) - { - float3 rand = Hash31(seed); - - float3 b1 = dir.xyz; - float3 b2 = math.normalizesafe(math.cross(b1, new float3(1, 0, 0))); - float3 b3 = math.cross(b2, b1); - - float theta = rand.y * 2 * math.PI; - float2 disc = radius * math.sqrt(rand.x) * new float2(math.cos(theta), math.sin(theta)); - - velocity = b2 * disc.x + b3 * disc.y; - position = new float4(pos.xyz + b1 * length * rand.z + velocity, 0); - } - - public static void RandomInBox(float seed, float4 center, float4 size, out float4 position, out float3 velocity) - { - float3 rand = Hash31(seed); - velocity = (rand - new float3(0.5f, 0.5f, 0.5f)) * size.xyz; - position = new float4(center.xyz + velocity, 0); - } - } -} + } +} #endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstBox.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstBox.cs index 44adb2feb..e5e2cf7d7 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstBox.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstBox.cs @@ -1,15 +1,14 @@ #if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) -using Unity.Burst; using Unity.Collections; -using Unity.Jobs; using Unity.Mathematics; namespace Obi { - public struct BurstBox : BurstLocalOptimization.IDistanceFunction + public struct BurstBox : BurstLocalOptimization.IDistanceFunction, IBurstCollider { public BurstColliderShape shape; public BurstAffineTransform colliderToSolver; + public float dt; public void Evaluate(float4 point, float4 radii, quaternion orientation, ref BurstLocalOptimization.SurfacePoint projectedPoint) { @@ -19,7 +18,7 @@ namespace Obi // clamp the point to the surface of the box: point = colliderToSolver.InverseTransformPointUnscaled(point) - center; - if (shape.is2D) + if (shape.is2D != 0) point[2] = 0; // get minimum distance for each axis: @@ -56,100 +55,39 @@ namespace Obi projectedPoint.normal = colliderToSolver.TransformDirection(projectedPoint.normal); } - public static JobHandle GenerateContacts(ObiColliderWorld world, - BurstSolverImpl solver, - NativeList contactPairs, - NativeQueue contactQueue, - NativeArray contactOffsetsPerType, - float deltaTime, - JobHandle inputDeps) + public void Contacts(int colliderIndex, + int rigidbodyIndex, + NativeArray rigidbodies, + + NativeArray positions, + NativeArray orientations, + NativeArray velocities, + NativeArray radii, + + NativeArray simplices, + in BurstAabb simplexBounds, + int simplexIndex, + int simplexStart, + int simplexSize, + + NativeQueue.ParallelWriter contacts, + int optimizationIterations, + float optimizationTolerance) { - int pairCount = contactOffsetsPerType[(int)Oni.ShapeType.Box + 1] - contactOffsetsPerType[(int)Oni.ShapeType.Box]; - if (pairCount == 0) return inputDeps; - - var job = new GenerateBoxContactsJob - { - contactPairs = contactPairs, - - positions = solver.positions, - orientations = solver.orientations, - velocities = solver.velocities, - invMasses = solver.invMasses, - radii = solver.principalRadii, - - simplices = solver.simplices, - simplexCounts = solver.simplexCounts, - - transforms = world.colliderTransforms.AsNativeArray(), - shapes = world.colliderShapes.AsNativeArray(), - - contactsQueue = contactQueue.AsParallelWriter(), - - worldToSolver = solver.worldToSolver, - deltaTime = deltaTime, - parameters = solver.abstraction.parameters, - firstPair = contactOffsetsPerType[(int)Oni.ShapeType.Box] - }; - - inputDeps = job.Schedule(pairCount, 8, inputDeps); - return inputDeps; - } - } - - [BurstCompile] - struct GenerateBoxContactsJob : IJobParallelFor - { - [ReadOnly] public NativeList contactPairs; - - // particle arrays: - [ReadOnly] public NativeArray velocities; - [ReadOnly] public NativeArray positions; - [ReadOnly] public NativeArray orientations; - [ReadOnly] public NativeArray invMasses; - [ReadOnly] public NativeArray radii; - - // simplex arrays: - [ReadOnly] public NativeArray simplices; - [ReadOnly] public SimplexCounts simplexCounts; - - // collider arrays: - [ReadOnly] public NativeArray transforms; - [ReadOnly] public NativeArray shapes; - - [WriteOnly] - [NativeDisableParallelForRestriction] - public NativeQueue.ParallelWriter contactsQueue; - - // auxiliar data: - [ReadOnly] public int firstPair; - [ReadOnly] public BurstAffineTransform worldToSolver; - [ReadOnly] public float deltaTime; - [ReadOnly] public Oni.SolverParameters parameters; - - public void Execute(int i) - { - int simplexIndex = contactPairs[firstPair + i].bodyA; - int colliderIndex = contactPairs[firstPair + i].bodyB; - - int simplexStart = simplexCounts.GetSimplexStartAndSize(simplexIndex, out int simplexSize); - - BurstAffineTransform colliderToSolver = worldToSolver * transforms[colliderIndex]; - - BurstBox shape = new BurstBox { colliderToSolver = colliderToSolver, shape = shapes[colliderIndex] }; - + var co = new BurstContact() { bodyA = simplexIndex, bodyB = colliderIndex }; float4 simplexBary = BurstMath.BarycenterForSimplexOfSize(simplexSize); - var colliderPoint = BurstLocalOptimization.Optimize(ref shape, positions, orientations, radii, simplices, simplexStart, simplexSize, - ref simplexBary, out _, parameters.surfaceCollisionIterations, parameters.surfaceCollisionTolerance); - contactsQueue.Enqueue(new BurstContact - { - bodyA = simplexIndex, - bodyB = colliderIndex, - pointA = simplexBary, - pointB = colliderPoint.point, - normal = colliderPoint.normal * shape.shape.sign - }); + var colliderPoint = BurstLocalOptimization.Optimize(ref this, positions, orientations, radii, simplices, simplexStart, simplexSize, + ref simplexBary, out float4 convexPoint, optimizationIterations, optimizationTolerance); + + co.pointB = colliderPoint.point; + co.normal = colliderPoint.normal; + co.pointA = simplexBary; + + contacts.Enqueue(co); } + } + } #endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstCapsule.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstCapsule.cs index c66e8df36..e23c0b11b 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstCapsule.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstCapsule.cs @@ -1,22 +1,21 @@ #if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) -using Unity.Burst; using Unity.Collections; -using Unity.Jobs; using Unity.Mathematics; namespace Obi { - public struct BurstCapsule : BurstLocalOptimization.IDistanceFunction + public struct BurstCapsule : BurstLocalOptimization.IDistanceFunction, IBurstCollider { public BurstColliderShape shape; public BurstAffineTransform colliderToSolver; + public float dt; public void Evaluate(float4 point, float4 radii, quaternion orientation, ref BurstLocalOptimization.SurfacePoint projectedPoint) { float4 center = shape.center * colliderToSolver.scale; point = colliderToSolver.InverseTransformPointUnscaled(point) - center; - if (shape.is2D) + if (shape.is2D != 0) point[2] = 0; int direction = (int)shape.size.z; @@ -37,100 +36,38 @@ namespace Obi projectedPoint.normal = colliderToSolver.TransformDirection(normal); } - public static JobHandle GenerateContacts(ObiColliderWorld world, - BurstSolverImpl solver, - NativeList contactPairs, - NativeQueue contactQueue, - NativeArray contactOffsetsPerType, - float deltaTime, - JobHandle inputDeps) + public void Contacts(int colliderIndex, + int rigidbodyIndex, + NativeArray rigidbodies, + + NativeArray positions, + NativeArray orientations, + NativeArray velocities, + NativeArray radii, + + NativeArray simplices, + in BurstAabb simplexBounds, + int simplexIndex, + int simplexStart, + int simplexSize, + + NativeQueue.ParallelWriter contacts, + int optimizationIterations, + float optimizationTolerance) { - int pairCount = contactOffsetsPerType[(int)Oni.ShapeType.Capsule + 1] - contactOffsetsPerType[(int)Oni.ShapeType.Capsule]; - if (pairCount == 0) return inputDeps; - - var job = new GenerateCapsuleContactsJob - { - contactPairs = contactPairs, - - positions = solver.positions, - orientations = solver.orientations, - velocities = solver.velocities, - invMasses = solver.invMasses, - radii = solver.principalRadii, - - simplices = solver.simplices, - simplexCounts = solver.simplexCounts, - - transforms = world.colliderTransforms.AsNativeArray(), - shapes = world.colliderShapes.AsNativeArray(), - - contactsQueue = contactQueue.AsParallelWriter(), - - worldToSolver = solver.worldToSolver, - deltaTime = deltaTime, - parameters = solver.abstraction.parameters, - firstPair = contactOffsetsPerType[(int)Oni.ShapeType.Capsule] - }; - - inputDeps = job.Schedule(pairCount, 8, inputDeps); - return inputDeps; - } - } - - [BurstCompile] - struct GenerateCapsuleContactsJob : IJobParallelFor - { - [ReadOnly] public NativeList contactPairs; - - // particle arrays: - [ReadOnly] public NativeArray velocities; - [ReadOnly] public NativeArray positions; - [ReadOnly] public NativeArray orientations; - [ReadOnly] public NativeArray invMasses; - [ReadOnly] public NativeArray radii; - - // simplex arrays: - [ReadOnly] public NativeArray simplices; - [ReadOnly] public SimplexCounts simplexCounts; - - // collider arrays: - [ReadOnly] public NativeArray transforms; - [ReadOnly] public NativeArray shapes; - - [WriteOnly] - [NativeDisableParallelForRestriction] - public NativeQueue.ParallelWriter contactsQueue; - - // auxiliar data: - [ReadOnly] public int firstPair; - [ReadOnly] public BurstAffineTransform worldToSolver; - [ReadOnly] public float deltaTime; - [ReadOnly] public Oni.SolverParameters parameters; - - public void Execute(int i) - { - int simplexIndex = contactPairs[firstPair + i].bodyA; - int colliderIndex = contactPairs[firstPair + i].bodyB; - - int simplexStart = simplexCounts.GetSimplexStartAndSize(simplexIndex, out int simplexSize); - - BurstAffineTransform colliderToSolver = worldToSolver * transforms[colliderIndex]; - - BurstCapsule shape = new BurstCapsule { colliderToSolver = colliderToSolver, shape = shapes[colliderIndex] }; - + var co = new BurstContact() { bodyA = simplexIndex, bodyB = colliderIndex }; float4 simplexBary = BurstMath.BarycenterForSimplexOfSize(simplexSize); - var colliderPoint = BurstLocalOptimization.Optimize(ref shape, positions, orientations, radii, simplices, simplexStart, simplexSize, - ref simplexBary, out _, parameters.surfaceCollisionIterations, parameters.surfaceCollisionTolerance); - contactsQueue.Enqueue(new BurstContact - { - bodyA = simplexIndex, - bodyB = colliderIndex, - pointA = simplexBary, - pointB = colliderPoint.point, - normal = colliderPoint.normal * shape.shape.sign - }); + var colliderPoint = BurstLocalOptimization.Optimize(ref this, positions, orientations, radii, simplices, simplexStart, simplexSize, + ref simplexBary, out float4 convexPoint, optimizationIterations, optimizationTolerance); + + co.pointB = colliderPoint.point; + co.normal = colliderPoint.normal; + co.pointA = simplexBary; + + contacts.Enqueue(co); } } + } #endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstColliderShape.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstColliderShape.cs index 88c580a4e..af31c7a9d 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstColliderShape.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstColliderShape.cs @@ -14,28 +14,12 @@ namespace Obi public ColliderShape.ShapeType type; public float contactOffset; - public int dataIndex; // index of the associated collider data in the collision world. + public int dataIndex; public int rigidbodyIndex; // index of the associated rigidbody in the collision world. public int materialIndex; // index of the associated material in the collision world. - public int forceZoneIndex; // index of the associated force zone in the collision world. public int filter; - public int flags; // first bit whether the collider is 2D (1) or 3D (0), second bit whether it's a trigger (1) or regular collider (0), - // third bit determines whether shape is inverted or not. - - public bool is2D - { - get => (flags & 1) != 0; - set => flags |= value ? 1 : 0; - } - public bool isTrigger - { - get => (flags & 1 << 1) != 0 || forceZoneIndex >= 0; - set => flags |= value ? 1 << 1 : 0; - } - public float sign - { - get => (flags & 1 << 2) != 0 ? -1 : 1; - } + public int flags; // for now, only used for trigger (1) or regular collider (0). + public int is2D; // whether the collider is 2D (1) or 3D (0). } } #endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstColliderWorld.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstColliderWorld.cs index 3f0823cc6..97736248e 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstColliderWorld.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstColliderWorld.cs @@ -4,8 +4,6 @@ using Unity.Collections; using Unity.Jobs; using Unity.Mathematics; using Unity.Burst; -using System.Threading; -using Unity.Collections.LowLevel.Unsafe; namespace Obi { @@ -20,32 +18,24 @@ namespace Obi public int entity; } - public int referenceCount { get; private set; } = 0; - public int colliderCount { get; private set; } = 0; + private int refCount = 0; + private int colliderCount = 0; private NativeMultilevelGrid grid; private NativeQueue movingColliders; - - private NativeArray colliderTypeCounts; - private NativeQueue contactPairQueue; - public NativeList contactPairs; - public NativeArray contactOffsetsPerType; - public NativeQueue colliderContactQueue; public ObiNativeCellSpanList cellSpans; + public int referenceCount { get { return refCount; } } + public void Awake() { + this.grid = new NativeMultilevelGrid(1000, Allocator.Persistent); this.movingColliders = new NativeQueue(Allocator.Persistent); this.colliderContactQueue = new NativeQueue(Allocator.Persistent); - this.contactPairQueue = new NativeQueue(Allocator.Persistent); - this.colliderTypeCounts = new NativeArray(Oni.ColliderShapeTypeCount, Allocator.Persistent); - this.contactOffsetsPerType = new NativeArray(Oni.ColliderShapeTypeCount + 1, Allocator.Persistent); - this.contactPairs = new NativeList(Allocator.Persistent); - this.cellSpans = new ObiNativeCellSpanList(); ObiColliderWorld.GetInstance().RegisterImplementation(this); @@ -57,30 +47,23 @@ namespace Obi grid.Dispose(); movingColliders.Dispose(); - - colliderTypeCounts.Dispose(); - contactPairQueue.Dispose(); - contactPairs.Dispose(); - contactOffsetsPerType.Dispose(); - colliderContactQueue.Dispose(); - cellSpans.Dispose(); } public void IncreaseReferenceCount() { - referenceCount++; + refCount++; } public void DecreaseReferenceCount() { - if (--referenceCount <= 0 && gameObject != null) + if (--refCount <= 0 && gameObject != null) DestroyImmediate(gameObject); } - public void SetColliders(ObiNativeColliderShapeList shapes, ObiNativeAabbList bounds, ObiNativeAffineTransformList transforms) + public void SetColliders(ObiNativeColliderShapeList shapes, ObiNativeAabbList bounds, ObiNativeAffineTransformList transforms, int count) { - colliderCount = shapes.count; + colliderCount = count; // insert new empty cellspans at the end if needed: while (colliderCount > cellSpans.count) @@ -91,10 +74,6 @@ namespace Obi { } - public void SetForceZones(ObiNativeForceZoneList rigidbody) - { - } - public void SetCollisionMaterials(ObiNativeCollisionMaterialList materials) { @@ -183,7 +162,7 @@ namespace Obi new int4(GridHash.Quantize(velocityBounds.max.xyz, cellSize), level)); // if the collider is 2D, project it to the z = 0 cells. - if (shapes[i].is2D) + if (shapes[i].is2D != 0) { newSpan.min[2] = 0; newSpan.max[2] = 0; @@ -194,7 +173,7 @@ namespace Obi if (i >= colliderCount || cellIndices[i] != newSpan) { // Add the collider to the list of moving colliders: - movingColliders.Enqueue(new MovingCollider + movingColliders.Enqueue(new MovingCollider() { oldSpan = cellIndices[i], newSpan = newSpan, @@ -251,7 +230,6 @@ namespace Obi [ReadOnly] public NativeArray invMasses; [ReadOnly] public NativeArray radii; [ReadOnly] public NativeArray filters; - [ReadOnly] public NativeArray particleMaterialIndices; // simplex arrays: [ReadOnly] public NativeArray simplices; @@ -265,27 +243,47 @@ namespace Obi [ReadOnly] public NativeArray rigidbodies; [ReadOnly] public NativeArray bounds; + // distance field data: + [ReadOnly] public NativeArray distanceFieldHeaders; + [ReadOnly] public NativeArray distanceFieldNodes; + + // triangle mesh data: + [ReadOnly] public NativeArray triangleMeshHeaders; + [ReadOnly] public NativeArray bihNodes; + [ReadOnly] public NativeArray triangles; + [ReadOnly] public NativeArray vertices; + + // edge mesh data: + [ReadOnly] public NativeArray edgeMeshHeaders; + [ReadOnly] public NativeArray edgeBihNodes; + [ReadOnly] public NativeArray edges; + [ReadOnly] public NativeArray edgeVertices; + + // height field data: + [ReadOnly] public NativeArray heightFieldHeaders; + [ReadOnly] public NativeArray heightFieldSamples; + + // output contacts queue: [WriteOnly] [NativeDisableParallelForRestriction] - public NativeQueue.ParallelWriter contactPairQueue; - - [NativeDisableParallelForRestriction] - public NativeArray colliderTypeCounts; + public NativeQueue.ParallelWriter contactsQueue; // auxiliar data: [ReadOnly] public BurstAffineTransform solverToWorld; + [ReadOnly] public BurstAffineTransform worldToSolver; [ReadOnly] public float deltaTime; [ReadOnly] public Oni.SolverParameters parameters; public void Execute(int i) { int simplexStart = simplexCounts.GetSimplexStartAndSize(i, out int simplexSize); + BurstAabb simplexBoundsSS = simplexBounds[i]; // get all colliders overlapped by the cell bounds, in all grid levels: - BurstAabb simplexBoundsWS = simplexBounds[i].Transformed(solverToWorld); + BurstAabb simplexBoundsWS = simplexBoundsSS.Transformed(solverToWorld); NativeList candidates = new NativeList(16,Allocator.Temp); - // max size of the simplex bounds in cells: + // max size of the particle bounds in cells: int3 maxSize = new int3(10); bool is2D = parameters.mode == Oni.SolverParameters.Mode.Mode2D; @@ -362,203 +360,139 @@ namespace Obi if (shouldCollide && simplexBoundsWS.IntersectsAabb(in colliderBoundsWS, is2D)) { - // increment the amount of contacts for this shape type: - Interlocked.Increment(ref ((int*)colliderTypeCounts.GetUnsafePtr())[(int)shape.type]); - - // enqueue a new contact pair: - contactPairQueue.Enqueue(new Oni.ContactPair{ - bodyA = i, - bodyB = c - }); + // generate contacts for the collider: + BurstAffineTransform colliderToSolver = worldToSolver * transforms[c]; + GenerateContacts(in shape, in colliderToSolver, c, rb, i, simplexStart, simplexSize, simplexBoundsSS); } } } } } - } - [BurstCompile] - struct PrefixSumJob : IJob - { - [ReadOnly] public NativeArray array; - public NativeArray sum; - - public void Execute() + private void GenerateContacts(in BurstColliderShape shape, + in BurstAffineTransform colliderToSolver, + int colliderIndex, + int rigidbodyIndex, + int simplexIndex, + int simplexStart, + int simplexSize, + in BurstAabb simplexBoundsSS) { - sum[0] = 0; - for (int i = 1; i < sum.Length; ++i) - sum[i] = sum[i - 1] + array[i-1]; - } - } + float4x4 solverToCollider; + BurstAabb simplexBoundsCS; - [BurstCompile] - struct SortContactPairsByShape : IJob - { - public NativeQueue contactPairQueue; - [ReadOnly] public NativeArray shapes; - [ReadOnly] public NativeArray start; // prefix sum - public NativeArray count; - - public NativeList contactPairs; - - public void Execute() - { - contactPairs.ResizeUninitialized(contactPairQueue.Count); - - while (!contactPairQueue.IsEmpty()) + switch (shape.type) { - var pair = contactPairQueue.Dequeue(); - int shapeType = (int)shapes[pair.bodyB].type; + case ColliderShape.ShapeType.Sphere: + BurstSphere sphereShape = new BurstSphere() { colliderToSolver = colliderToSolver, shape = shape, dt = deltaTime }; + sphereShape.Contacts(colliderIndex, rigidbodyIndex, rigidbodies, positions, orientations, velocities, radii, simplices, in simplexBoundsSS, + simplexIndex, simplexStart, simplexSize, contactsQueue, parameters.surfaceCollisionIterations, parameters.surfaceCollisionTolerance); + break; + case ColliderShape.ShapeType.Box: + BurstBox boxShape = new BurstBox() { colliderToSolver = colliderToSolver, shape = shape, dt = deltaTime }; + boxShape.Contacts(colliderIndex, rigidbodyIndex, rigidbodies, positions, orientations, velocities, radii, simplices, in simplexBoundsSS, + simplexIndex, simplexStart, simplexSize, contactsQueue, parameters.surfaceCollisionIterations, parameters.surfaceCollisionTolerance); + break; + case ColliderShape.ShapeType.Capsule: + BurstCapsule capsuleShape = new BurstCapsule(){colliderToSolver = colliderToSolver,shape = shape, dt = deltaTime }; + capsuleShape.Contacts(colliderIndex, rigidbodyIndex, rigidbodies, positions, orientations, velocities, radii, simplices, in simplexBoundsSS, + simplexIndex, simplexStart, simplexSize, contactsQueue, parameters.surfaceCollisionIterations, parameters.surfaceCollisionTolerance); + break; + case ColliderShape.ShapeType.SignedDistanceField: - // write the pair directly at its position in the sorted array: - contactPairs[start[shapeType] + (--count[shapeType])] = pair; + if (shape.dataIndex < 0) return; + + BurstDistanceField distanceFieldShape = new BurstDistanceField() + { + colliderToSolver = colliderToSolver, + solverToWorld = solverToWorld, + shape = shape, + distanceFieldHeaders = distanceFieldHeaders, + dfNodes = distanceFieldNodes, + dt = deltaTime, + collisionMargin = parameters.collisionMargin + }; + + distanceFieldShape.Contacts(colliderIndex, rigidbodyIndex, rigidbodies, positions, orientations, velocities, radii, simplices, in simplexBoundsSS, + simplexIndex, simplexStart, simplexSize, contactsQueue, parameters.surfaceCollisionIterations, parameters.surfaceCollisionTolerance); + + break; + case ColliderShape.ShapeType.Heightmap: + + if (shape.dataIndex < 0) return; + + // invert a full matrix here to accurately represent collider bounds scale. + solverToCollider = math.inverse(float4x4.TRS(colliderToSolver.translation.xyz, colliderToSolver.rotation, colliderToSolver.scale.xyz)); + simplexBoundsCS = simplexBoundsSS.Transformed(solverToCollider); + + BurstHeightField heightmapShape = new BurstHeightField() + { + colliderToSolver = colliderToSolver, + solverToWorld = solverToWorld, + shape = shape, + header = heightFieldHeaders[shape.dataIndex], + heightFieldSamples = heightFieldSamples, + collisionMargin = parameters.collisionMargin, + dt = deltaTime + }; + + heightmapShape.Contacts(colliderIndex, rigidbodyIndex, rigidbodies, positions, orientations, velocities, radii, simplices, in simplexBoundsCS, + simplexIndex, simplexStart, simplexSize, contactsQueue, parameters.surfaceCollisionIterations, parameters.surfaceCollisionTolerance); + + break; + case ColliderShape.ShapeType.TriangleMesh: + + if (shape.dataIndex < 0) return; + + // invert a full matrix here to accurately represent collider bounds scale. + solverToCollider = math.inverse(float4x4.TRS(colliderToSolver.translation.xyz, colliderToSolver.rotation, colliderToSolver.scale.xyz)); + simplexBoundsCS = simplexBoundsSS.Transformed(solverToCollider); + + BurstTriangleMesh triangleMeshShape = new BurstTriangleMesh() + { + colliderToSolver = colliderToSolver, + solverToWorld = solverToWorld, + shape = shape, + header = triangleMeshHeaders[shape.dataIndex], + bihNodes = bihNodes, + triangles = triangles, + vertices = vertices, + collisionMargin = parameters.collisionMargin, + dt = deltaTime + }; + + triangleMeshShape.Contacts(colliderIndex, rigidbodyIndex, rigidbodies, positions, orientations, velocities, radii, simplices, in simplexBoundsCS, + simplexIndex, simplexStart, simplexSize, contactsQueue, parameters.surfaceCollisionIterations, parameters.surfaceCollisionTolerance); + + break; + case ColliderShape.ShapeType.EdgeMesh: + + if (shape.dataIndex < 0) return; + + // invert a full matrix here to accurately represent collider bounds scale. + solverToCollider = math.inverse(float4x4.TRS(colliderToSolver.translation.xyz, colliderToSolver.rotation, colliderToSolver.scale.xyz)); + simplexBoundsCS = simplexBoundsSS.Transformed(solverToCollider); + + BurstEdgeMesh edgeMeshShape = new BurstEdgeMesh() + { + colliderToSolver = colliderToSolver, + shape = shape, + header = edgeMeshHeaders[shape.dataIndex], + edgeBihNodes = edgeBihNodes, + edges = edges, + vertices = edgeVertices, + dt = deltaTime + }; + + edgeMeshShape.Contacts(colliderIndex, rigidbodyIndex, rigidbodies, positions, orientations, velocities, radii, simplices, in simplexBoundsCS, + simplexIndex, simplexStart, simplexSize, contactsQueue, parameters.surfaceCollisionIterations, parameters.surfaceCollisionTolerance); + + break; } } + } - [BurstCompile] - unsafe struct ApplyForceZonesJob : IJobParallelFor - { - // particle arrays: - [NativeDisableParallelForRestriction] public NativeArray externalForces; - [NativeDisableParallelForRestriction] public NativeArray wind; - [NativeDisableParallelForRestriction] public NativeArray velocities; - [NativeDisableParallelForRestriction] public NativeArray colors; - [NativeDisableParallelForRestriction] public NativeArray life; - [ReadOnly] public NativeArray positions; - [ReadOnly] public NativeArray invMasses; - - // simplex arrays: - [ReadOnly] public NativeArray simplices; - [ReadOnly] public SimplexCounts simplexCounts; - - // collider arrays: - [ReadOnly] public NativeArray transforms; - [ReadOnly] public NativeArray shapes; - [ReadOnly] public NativeArray forceZones; - - // contacts - [ReadOnly] public NativeArray contacts; - - // auxiliar data: - [ReadOnly] public BurstAffineTransform worldToSolver; - [ReadOnly] public float deltaTime; - - public void Execute(int i) - { - var contact = contacts[i]; - int forceZoneIndex = shapes[contact.bodyB].forceZoneIndex; - - if (forceZoneIndex >= 0) - { - int simplexStart = simplexCounts.GetSimplexStartAndSize(contact.bodyA, out int simplexSize); - for (int j = 0; j < simplexSize; ++j) - { - int particleIndex = simplices[simplexStart + j]; - - float distance = -math.dot(positions[particleIndex] - contact.pointB, contact.normal); - if (distance < 0) continue; - - float4 axis = (worldToSolver * transforms[contact.bodyB]).TransformDirection(new float4(0, 0, 1, 0)); - - // calculate falloff region based on min/max distances: - float falloff = 1; - float range = forceZones[forceZoneIndex].maxDistance - forceZones[forceZoneIndex].minDistance; - if (math.abs(range) > BurstMath.epsilon) - falloff = math.pow(math.saturate((distance - forceZones[forceZoneIndex].minDistance) / range), forceZones[forceZoneIndex].falloffPower); - - float forceIntensity = forceZones[forceZoneIndex].intensity * falloff; - float dampIntensity = forceZones[forceZoneIndex].damping * falloff; - - // tint particles: - float mix = math.pow(1 - math.saturate(forceZones[forceZoneIndex].color.a * falloff), deltaTime); - colors[particleIndex] = math.lerp((Vector4)forceZones[forceZoneIndex].color, colors[particleIndex], mix); - - // calculate force direction, depending on the type of the force field: - float4 result = float4.zero; - switch (forceZones[forceZoneIndex].type) - { - case ForceZone.ZoneType.Radial: - result = contact.normal * forceIntensity; - break; - case ForceZone.ZoneType.Vortex: - result = new float4(math.cross(axis.xyz * forceIntensity, contact.normal.xyz).xyz, 0); - break; - case ForceZone.ZoneType.Directional: - result = axis * forceIntensity; - break; - default: - BurstMath.AtomicAdd(life, particleIndex, -forceIntensity * deltaTime); - continue; - } - - // apply damping: - switch (forceZones[forceZoneIndex].dampingDir) - { - case ForceZone.DampingDirection.ForceDirection: - { - float4 forceDir = math.normalizesafe(result); - result -= forceDir * math.dot(velocities[particleIndex], forceDir) * dampIntensity; - } - break; - case ForceZone.DampingDirection.SurfaceDirection: - result -= contact.normal * math.dot(velocities[particleIndex], contact.normal) * dampIntensity; - break; - default: - result -= velocities[particleIndex] * dampIntensity; - break; - } - - if (invMasses[particleIndex] > 0) - { - switch (forceZones[forceZoneIndex].mode) - { - case ForceZone.ForceMode.Acceleration: - BurstMath.AtomicAdd(externalForces, particleIndex, result / simplexSize / invMasses[particleIndex]); - break; - case ForceZone.ForceMode.Force: - BurstMath.AtomicAdd(externalForces, particleIndex, result / simplexSize); - break; - case ForceZone.ForceMode.Wind: - BurstMath.AtomicAdd(wind, particleIndex, result / simplexSize); - break; - } - } - - } - } - } - } - - public JobHandle ApplyForceZones(BurstSolverImpl solver, float deltaTime, JobHandle inputDeps) - { - var world = ObiColliderWorld.GetInstance(); - - var applyForceFieldsJob = new ApplyForceZonesJob - { - contacts = solver.abstraction.colliderContacts.AsNativeArray(), - - positions = solver.positions, - velocities = solver.velocities, - externalForces = solver.externalForces, - wind = solver.wind, - invMasses = solver.invMasses, - life = solver.life, - colors = solver.colors, - - simplices = solver.simplices, - simplexCounts = solver.simplexCounts, - - transforms = world.colliderTransforms.AsNativeArray(), - shapes = world.colliderShapes.AsNativeArray(), - forceZones = world.forceZones.AsNativeArray(), - - worldToSolver = solver.worldToSolver, - deltaTime = deltaTime, - }; - - return applyForceFieldsJob.Schedule(solver.abstraction.colliderContacts.count, 64, inputDeps); - } public JobHandle GenerateContacts(BurstSolverImpl solver, float deltaTime, JobHandle inputDeps) { @@ -575,7 +509,6 @@ namespace Obi invMasses = solver.invMasses, radii = solver.principalRadii, filters = solver.filters, - particleMaterialIndices = solver.collisionMaterials, simplices = solver.simplices, simplexCounts = solver.simplexCounts, @@ -587,46 +520,33 @@ namespace Obi collisionMaterials = world.collisionMaterials.AsNativeArray(), bounds = world.colliderAabbs.AsNativeArray(), - contactPairQueue = contactPairQueue.AsParallelWriter(), - colliderTypeCounts = colliderTypeCounts, + distanceFieldHeaders = world.distanceFieldContainer.headers.AsNativeArray(), + distanceFieldNodes = world.distanceFieldContainer.dfNodes.AsNativeArray(), + triangleMeshHeaders = world.triangleMeshContainer.headers.AsNativeArray(), + bihNodes = world.triangleMeshContainer.bihNodes.AsNativeArray(), + triangles = world.triangleMeshContainer.triangles.AsNativeArray(), + vertices = world.triangleMeshContainer.vertices.AsNativeArray(), + + edgeMeshHeaders = world.edgeMeshContainer.headers.AsNativeArray(), + edgeBihNodes = world.edgeMeshContainer.bihNodes.AsNativeArray(), + edges = world.edgeMeshContainer.edges.AsNativeArray(), + edgeVertices = world.edgeMeshContainer.vertices.AsNativeArray(), + + heightFieldHeaders = world.heightFieldContainer.headers.AsNativeArray(), + heightFieldSamples = world.heightFieldContainer.samples.AsNativeArray(), + + contactsQueue = colliderContactQueue.AsParallelWriter(), solverToWorld = solver.solverToWorld, + worldToSolver = solver.worldToSolver, deltaTime = deltaTime, parameters = solver.abstraction.parameters }; - inputDeps = generateColliderContactsJob.Schedule(solver.simplexCounts.simplexCount, 16, inputDeps); + return generateColliderContactsJob.Schedule(solver.simplexCounts.simplexCount, 16, inputDeps); - var prefixSumJob = new PrefixSumJob - { - array = colliderTypeCounts, - sum = contactOffsetsPerType - }; - inputDeps = prefixSumJob.Schedule(inputDeps); - - var sortPairsJob = new SortContactPairsByShape - { - contactPairQueue = contactPairQueue, - shapes = world.colliderShapes.AsNativeArray(), - start = contactOffsetsPerType, - count = colliderTypeCounts, - contactPairs = contactPairs - }; - inputDeps = sortPairsJob.Schedule(inputDeps); - - inputDeps.Complete(); - - inputDeps = BurstSphere.GenerateContacts(world,solver,contactPairs,colliderContactQueue,contactOffsetsPerType,deltaTime,inputDeps); - inputDeps = BurstBox.GenerateContacts(world,solver,contactPairs,colliderContactQueue, contactOffsetsPerType,deltaTime,inputDeps); - inputDeps = BurstCapsule.GenerateContacts(world, solver, contactPairs, colliderContactQueue, contactOffsetsPerType, deltaTime, inputDeps); - inputDeps = BurstDistanceField.GenerateContacts(world, solver, contactPairs, colliderContactQueue, contactOffsetsPerType, deltaTime, inputDeps); - inputDeps = BurstTriangleMesh.GenerateContacts(world, solver, contactPairs, colliderContactQueue, contactOffsetsPerType, deltaTime, inputDeps); - inputDeps = BurstHeightField.GenerateContacts(world, solver, contactPairs, colliderContactQueue, contactOffsetsPerType, deltaTime, inputDeps); - inputDeps = BurstEdgeMesh.GenerateContacts(world, solver, contactPairs, colliderContactQueue, contactOffsetsPerType, deltaTime, inputDeps); - - return inputDeps; } } } -#endif +#endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstDistanceField.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstDistanceField.cs index 1ebf5c041..613303262 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstDistanceField.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstDistanceField.cs @@ -1,15 +1,17 @@ #if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) -using Unity.Burst; using Unity.Collections; -using Unity.Jobs; using Unity.Mathematics; namespace Obi { - public struct BurstDistanceField : BurstLocalOptimization.IDistanceFunction + public struct BurstDistanceField : BurstLocalOptimization.IDistanceFunction, IBurstCollider { public BurstColliderShape shape; public BurstAffineTransform colliderToSolver; + public BurstAffineTransform solverToWorld; + + public float dt; + public float collisionMargin; public NativeArray distanceFieldHeaders; public NativeArray dfNodes; @@ -18,143 +20,47 @@ namespace Obi { point = colliderToSolver.InverseTransformPoint(point); - if (shape.is2D) + if (shape.is2D != 0) point[2] = 0; var header = distanceFieldHeaders[shape.dataIndex]; - float4 sample = DFTraverse(point, in header); + float4 sample = DFTraverse(point, 0, in header, in dfNodes); float4 normal = new float4(math.normalize(sample.xyz), 0); projectedPoint.point = colliderToSolver.TransformPoint(point - normal * (sample[3] - shape.contactOffset)); projectedPoint.normal = colliderToSolver.TransformDirection(normal); } - private float4 DFTraverse(float4 particlePosition, in DistanceFieldHeader header) + public void Contacts(int colliderIndex, + int rigidbodyIndex, + NativeArray rigidbodies, + + NativeArray positions, + NativeArray orientations, + NativeArray velocities, + NativeArray radii, + + NativeArray simplices, + in BurstAabb simplexBounds, + int simplexIndex, + int simplexStart, + int simplexSize, + + NativeQueue.ParallelWriter contacts, + int optimizationIterations, + float optimizationTolerance) { - var stack = new NativeArray(12, Allocator.Temp); - int stackTop = 0; - - stack[stackTop++] = 0; - - while (stackTop > 0) - { - int nodeIndex = stack[--stackTop]; - var node = dfNodes[header.firstNode + nodeIndex]; - - // if the child node exists, recurse down the df octree: - if (node.firstChild >= 0) - stack[stackTop++] = node.firstChild + node.GetOctant(particlePosition); - else - return node.SampleWithGradient(particlePosition); - } - return float4.zero; - } - - public static JobHandle GenerateContacts(ObiColliderWorld world, - BurstSolverImpl solver, - NativeList contactPairs, - NativeQueue contactQueue, - NativeArray contactOffsetsPerType, - float deltaTime, - JobHandle inputDeps) - { - int pairCount = contactOffsetsPerType[(int)Oni.ShapeType.SignedDistanceField + 1] - contactOffsetsPerType[(int)Oni.ShapeType.SignedDistanceField]; - if (pairCount == 0) return inputDeps; - - var job = new GenerateDistanceFieldContactsJob - { - contactPairs = contactPairs, - - positions = solver.positions, - orientations = solver.orientations, - velocities = solver.velocities, - invMasses = solver.invMasses, - radii = solver.principalRadii, - - simplices = solver.simplices, - simplexCounts = solver.simplexCounts, - - transforms = world.colliderTransforms.AsNativeArray(), - shapes = world.colliderShapes.AsNativeArray(), - rigidbodies = world.rigidbodies.AsNativeArray(), - - distanceFieldHeaders = world.distanceFieldContainer.headers.AsNativeArray(), - distanceFieldNodes = world.distanceFieldContainer.dfNodes.AsNativeArray(), - - contactsQueue = contactQueue.AsParallelWriter(), - - solverToWorld = solver.inertialFrame, - worldToSolver = solver.worldToSolver, - deltaTime = deltaTime, - parameters = solver.abstraction.parameters, - firstPair = contactOffsetsPerType[(int)Oni.ShapeType.SignedDistanceField] - }; - - inputDeps = job.Schedule(pairCount, 1, inputDeps); - return inputDeps; - } - } - - [BurstCompile] - struct GenerateDistanceFieldContactsJob : IJobParallelFor - { - [ReadOnly] public NativeList contactPairs; - - // particle arrays: - [ReadOnly] public NativeArray velocities; - [ReadOnly] public NativeArray positions; - [ReadOnly] public NativeArray orientations; - [ReadOnly] public NativeArray invMasses; - [ReadOnly] public NativeArray radii; - - // simplex arrays: - [ReadOnly] public NativeArray simplices; - [ReadOnly] public SimplexCounts simplexCounts; - - // collider arrays: - [ReadOnly] public NativeArray transforms; - [ReadOnly] public NativeArray shapes; - [ReadOnly] public NativeArray rigidbodies; - - // distance field data: - [ReadOnly] public NativeArray distanceFieldHeaders; - [ReadOnly] public NativeArray distanceFieldNodes; - - [WriteOnly] - [NativeDisableParallelForRestriction] - public NativeQueue.ParallelWriter contactsQueue; - - // auxiliar data: - [ReadOnly] public int firstPair; - [ReadOnly] public BurstInertialFrame solverToWorld; - [ReadOnly] public BurstAffineTransform worldToSolver; - [ReadOnly] public float deltaTime; - [ReadOnly] public Oni.SolverParameters parameters; - - public void Execute(int i) - { - - int simplexIndex = contactPairs[firstPair + i].bodyA; - int colliderIndex = contactPairs[firstPair + i].bodyB; - int rigidbodyIndex = shapes[colliderIndex].rigidbodyIndex; - - if (shapes[colliderIndex].dataIndex < 0) return; - - int simplexStart = simplexCounts.GetSimplexStartAndSize(simplexIndex, out int simplexSize); - BurstAffineTransform colliderToSolver = worldToSolver * transforms[colliderIndex]; - - BurstDistanceField dfShape = new BurstDistanceField() - { - colliderToSolver = colliderToSolver, - shape = shapes[colliderIndex], - distanceFieldHeaders = distanceFieldHeaders, - dfNodes = distanceFieldNodes - }; - + if (shape.dataIndex < 0) return; + var co = new BurstContact() { bodyA = simplexIndex, bodyB = colliderIndex }; float4 simplexBary = BurstMath.BarycenterForSimplexOfSize(simplexSize); - var colliderPoint = BurstLocalOptimization.Optimize(ref dfShape, positions, orientations, radii, simplices, simplexStart, simplexSize, - ref simplexBary, out float4 simplexPoint, parameters.surfaceCollisionIterations, parameters.surfaceCollisionTolerance); + + var colliderPoint = BurstLocalOptimization.Optimize(ref this, positions, orientations, radii, simplices, simplexStart, simplexSize, + ref simplexBary, out float4 simplexPoint, optimizationIterations, optimizationTolerance); + + co.pointB = colliderPoint.point; + co.normal = colliderPoint.normal; + co.pointA = simplexBary; float4 velocity = float4.zero; float simplexRadius = 0; @@ -170,18 +76,31 @@ namespace Obi rbVelocity = BurstMath.GetRigidbodyVelocityAtPoint(rigidbodyIndex, colliderPoint.point, rigidbodies, solverToWorld); float dAB = math.dot(simplexPoint - colliderPoint.point, colliderPoint.normal); - float vel = math.dot(velocity - rbVelocity, colliderPoint.normal); + float vel = math.dot(velocity - rbVelocity, colliderPoint.normal); - //if (vel * deltaTime + dAB <= simplexRadius + shapes[colliderIndex].contactOffset + parameters.collisionMargin) - contactsQueue.Enqueue(new BurstContact - { - bodyA = simplexIndex, - bodyB = colliderIndex, - pointA = simplexBary, - pointB = colliderPoint.point, - normal = colliderPoint.normal * dfShape.shape.sign - }); + if (vel * dt + dAB <= simplexRadius + shape.contactOffset + collisionMargin) + contacts.Enqueue(co); } + + private static float4 DFTraverse(float4 particlePosition, + int nodeIndex, + in DistanceFieldHeader header, + in NativeArray dfNodes) + { + var node = dfNodes[header.firstNode + nodeIndex]; + + // if the child node exists, recurse down the df octree: + if (node.firstChild >= 0) + { + int octant = node.GetOctant(particlePosition); + return DFTraverse(particlePosition, node.firstChild + octant, in header, in dfNodes); + } + else + { + return node.SampleWithGradient(particlePosition); + } + } + } } diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstEdgeMesh.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstEdgeMesh.cs index 754887774..026d6fd5a 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstEdgeMesh.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstEdgeMesh.cs @@ -1,17 +1,16 @@ #if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) -using Unity.Burst; using Unity.Collections; -using Unity.Jobs; using Unity.Mathematics; namespace Obi { - public struct BurstEdgeMesh : BurstLocalOptimization.IDistanceFunction + public struct BurstEdgeMesh : BurstLocalOptimization.IDistanceFunction, IBurstCollider { public BurstColliderShape shape; public BurstAffineTransform colliderToSolver; public int dataOffset; + public float dt; public EdgeMeshHeader header; public NativeArray edgeBihNodes; @@ -22,12 +21,12 @@ namespace Obi { point = colliderToSolver.InverseTransformPointUnscaled(point); - if (shape.is2D) + if (shape.is2D != 0) point[2] = 0; Edge t = edges[header.firstEdge + dataOffset]; - float4 v1 = (new float4(vertices[header.firstVertex + t.i1], 0, 0) + shape.center) * colliderToSolver.scale; - float4 v2 = (new float4(vertices[header.firstVertex + t.i2], 0, 0) + shape.center) * colliderToSolver.scale; + float4 v1 = (new float4(vertices[header.firstVertex + t.i1], 0) + shape.center) * colliderToSolver.scale; + float4 v2 = (new float4(vertices[header.firstVertex + t.i2], 0) + shape.center) * colliderToSolver.scale; float4 nearestPoint = BurstMath.NearestPointOnEdge(v1, v2, point, out float mu); float4 normal = math.normalizesafe(point - nearestPoint); @@ -36,175 +35,90 @@ namespace Obi projectedPoint.point = colliderToSolver.TransformPointUnscaled(nearestPoint + normal * shape.contactOffset); } - public static JobHandle GenerateContacts(ObiColliderWorld world, - BurstSolverImpl solver, - NativeList contactPairs, - NativeQueue contactQueue, - NativeArray contactOffsetsPerType, - float deltaTime, - JobHandle inputDeps) + + public void Contacts(int colliderIndex, + int rigidbodyIndex, + NativeArray rigidbodies, + + NativeArray positions, + NativeArray orientations, + NativeArray velocities, + NativeArray radii, + + NativeArray simplices, + in BurstAabb simplexBounds, + int simplexIndex, + int simplexStart, + int simplexSize, + + NativeQueue.ParallelWriter contacts, + int optimizationIterations, + float optimizationTolerance) { - int pairCount = contactOffsetsPerType[(int)Oni.ShapeType.EdgeMesh + 1] - contactOffsetsPerType[(int)Oni.ShapeType.EdgeMesh]; - if (pairCount == 0) return inputDeps; + if (shape.dataIndex < 0) return; - var job = new GenerateEdgeMeshContactsJob - { - contactPairs = contactPairs, - - positions = solver.positions, - orientations = solver.orientations, - velocities = solver.velocities, - invMasses = solver.invMasses, - radii = solver.principalRadii, - - simplices = solver.simplices, - simplexCounts = solver.simplexCounts, - simplexBounds = solver.simplexBounds, - - transforms = world.colliderTransforms.AsNativeArray(), - shapes = world.colliderShapes.AsNativeArray(), - rigidbodies = world.rigidbodies.AsNativeArray(), - - edgeMeshHeaders = world.edgeMeshContainer.headers.AsNativeArray(), - edgeBihNodes = world.edgeMeshContainer.bihNodes.AsNativeArray(), - edges = world.edgeMeshContainer.edges.AsNativeArray(), - edgeVertices = world.edgeMeshContainer.vertices.AsNativeArray(), - - contactsQueue = contactQueue.AsParallelWriter(), - - solverToWorld = solver.solverToWorld, - worldToSolver = solver.worldToSolver, - deltaTime = deltaTime, - parameters = solver.abstraction.parameters, - firstPair = contactOffsetsPerType[(int)Oni.ShapeType.TriangleMesh] - }; - - inputDeps = job.Schedule(pairCount, 1, inputDeps); - return inputDeps; + BIHTraverse(colliderIndex, simplexIndex, simplexStart, simplexSize, + positions, orientations, radii, simplices, in simplexBounds, 0, contacts, optimizationIterations, optimizationTolerance); } - } - [BurstCompile] - struct GenerateEdgeMeshContactsJob : IJobParallelFor - { - [ReadOnly] public NativeList contactPairs; - - // particle arrays: - [ReadOnly] public NativeArray velocities; - [ReadOnly] public NativeArray positions; - [ReadOnly] public NativeArray orientations; - [ReadOnly] public NativeArray invMasses; - [ReadOnly] public NativeArray radii; - - // simplex arrays: - [ReadOnly] public NativeArray simplices; - [ReadOnly] public SimplexCounts simplexCounts; - [ReadOnly] public NativeArray simplexBounds; - - // collider arrays: - [ReadOnly] public NativeArray transforms; - [ReadOnly] public NativeArray shapes; - [ReadOnly] public NativeArray rigidbodies; - - // edge mesh data: - [ReadOnly] public NativeArray edgeMeshHeaders; - [ReadOnly] public NativeArray edgeBihNodes; - [ReadOnly] public NativeArray edges; - [ReadOnly] public NativeArray edgeVertices; - - [WriteOnly] - [NativeDisableParallelForRestriction] - public NativeQueue.ParallelWriter contactsQueue; - - // auxiliar data: - [ReadOnly] public int firstPair; - [ReadOnly] public BurstAffineTransform solverToWorld; - [ReadOnly] public BurstAffineTransform worldToSolver; - [ReadOnly] public float deltaTime; - [ReadOnly] public Oni.SolverParameters parameters; - - public void Execute(int i) + private void BIHTraverse(int colliderIndex, + int simplexIndex, + int simplexStart, + int simplexSize, + NativeArray positions, + NativeArray orientations, + NativeArray radii, + NativeArray simplices, + in BurstAabb simplexBounds, + int nodeIndex, + NativeQueue.ParallelWriter contacts, + int optimizationIterations, + float optimizationTolerance) { - int simplexIndex = contactPairs[firstPair + i].bodyA; - int colliderIndex = contactPairs[firstPair + i].bodyB; - var shape = shapes[colliderIndex]; + var node = edgeBihNodes[header.firstNode + nodeIndex]; - if (shape.dataIndex < 0) - return; - - var header = edgeMeshHeaders[shape.dataIndex]; - - int simplexStart = simplexCounts.GetSimplexStartAndSize(simplexIndex, out int simplexSize); - var simplexBound = simplexBounds[simplexIndex]; - - BurstAffineTransform colliderToSolver = worldToSolver * transforms[colliderIndex]; - - // invert a full matrix here to accurately represent collider bounds scale. - var solverToCollider = math.inverse(float4x4.TRS(colliderToSolver.translation.xyz, colliderToSolver.rotation, colliderToSolver.scale.xyz)); - var simplexBoundsCS = simplexBound.Transformed(solverToCollider); - - float4 marginCS = new float4((shape.contactOffset + parameters.collisionMargin) / colliderToSolver.scale.xyz, 0); - - BurstEdgeMesh edgeMeshShape = new BurstEdgeMesh() + if (node.firstChild >= 0) { - colliderToSolver = colliderToSolver, - shape = shape, - header = header, - edgeBihNodes = edgeBihNodes, - edges = edges, - vertices = edgeVertices - }; + // visit min node: + if (simplexBounds.min[node.axis] <= node.min + shape.center[node.axis]) + BIHTraverse(colliderIndex, simplexIndex, simplexStart, simplexSize, + positions, orientations, radii, simplices, in simplexBounds, + node.firstChild, contacts, optimizationIterations, optimizationTolerance); - NativeQueue queue = new NativeQueue(Allocator.Temp); - - queue.Enqueue(0); - - while (!queue.IsEmpty()) + // visit max node: + if (simplexBounds.max[node.axis] >= node.max + shape.center[node.axis]) + BIHTraverse(colliderIndex, simplexIndex, simplexStart, simplexSize, + positions, orientations, radii, simplices, in simplexBounds, + node.firstChild + 1, contacts, optimizationIterations, optimizationTolerance); + } + else { - int nodeIndex = queue.Dequeue(); - var node = edgeBihNodes[header.firstNode + nodeIndex]; - - // leaf node: - if (node.firstChild < 0) + // check for contact against all triangles: + for (dataOffset = node.start; dataOffset < node.start + node.count; ++dataOffset) { - // check for contact against all triangles: - for (int dataOffset = node.start; dataOffset < node.start + node.count; ++dataOffset) + Edge t = edges[header.firstEdge + dataOffset]; + float4 v1 = new float4(vertices[header.firstVertex + t.i1], 0) + shape.center; + float4 v2 = new float4(vertices[header.firstVertex + t.i2], 0) + shape.center; + BurstAabb edgeBounds = new BurstAabb(v1, v2, shape.contactOffset + 0.01f); + + if (edgeBounds.IntersectsAabb(simplexBounds, shape.is2D != 0)) { - Edge t = edges[header.firstEdge + dataOffset]; - float4 v1 = new float4(edgeVertices[header.firstVertex + t.i1], 0, 0) + shape.center; - float4 v2 = new float4(edgeVertices[header.firstVertex + t.i2], 0, 0) + shape.center; - BurstAabb edgeBounds = new BurstAabb(v1, v2, marginCS); + var co = new BurstContact() { bodyA = simplexIndex, bodyB = colliderIndex }; + float4 simplexBary = BurstMath.BarycenterForSimplexOfSize(simplexSize); - if (edgeBounds.IntersectsAabb(simplexBoundsCS, shape.is2D)) - { - float4 simplexBary = BurstMath.BarycenterForSimplexOfSize(simplexSize); + var colliderPoint = BurstLocalOptimization.Optimize(ref this, positions, orientations, radii, simplices, simplexStart, simplexSize, + ref simplexBary, out float4 convexPoint, optimizationIterations, optimizationTolerance); - edgeMeshShape.dataOffset = dataOffset; - var colliderPoint = BurstLocalOptimization.Optimize(ref edgeMeshShape, positions, orientations, radii, simplices, simplexStart, simplexSize, - ref simplexBary, out float4 convexPoint, parameters.surfaceCollisionIterations, parameters.surfaceCollisionTolerance); + co.pointB = colliderPoint.point; + co.normal = colliderPoint.normal; + co.pointA = simplexBary; - contactsQueue.Enqueue(new BurstContact(){ - bodyA = simplexIndex, - bodyB = colliderIndex, - pointA = simplexBary, - pointB = colliderPoint.point, - normal = colliderPoint.normal * edgeMeshShape.shape.sign - }); - } + contacts.Enqueue(co); } } - else // check min and/or max children: - { - // visit min node: - if (simplexBoundsCS.min[node.axis] <= node.min) - queue.Enqueue(node.firstChild); - - // visit max node: - if (simplexBoundsCS.max[node.axis] >= node.max) - queue.Enqueue(node.firstChild + 1); - } } } + } } diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstHeightField.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstHeightField.cs index 321510321..31f46c182 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstHeightField.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstHeightField.cs @@ -1,15 +1,17 @@ #if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) -using Unity.Burst; using Unity.Collections; -using Unity.Jobs; using Unity.Mathematics; namespace Obi { - public struct BurstHeightField : BurstLocalOptimization.IDistanceFunction + public struct BurstHeightField : BurstLocalOptimization.IDistanceFunction, IBurstCollider { + public BurstColliderShape shape; public BurstAffineTransform colliderToSolver; + public BurstAffineTransform solverToWorld; + public float dt; + public float collisionMargin; public BurstMath.CachedTri tri; public float4 triNormal; @@ -21,7 +23,7 @@ namespace Obi { point = colliderToSolver.InverseTransformPoint(point); - float4 nearestPoint = BurstMath.NearestPointOnTri(tri, point, out _); + float4 nearestPoint = BurstMath.NearestPointOnTri(tri, point, out float4 bary); float4 normal = math.normalizesafe(point - nearestPoint); // flip the contact normal if it points below ground: (doesn't work with holes) @@ -31,123 +33,30 @@ namespace Obi projectedPoint.normal = colliderToSolver.TransformDirection(normal); } - public static JobHandle GenerateContacts(ObiColliderWorld world, - BurstSolverImpl solver, - NativeList contactPairs, - NativeQueue contactQueue, - NativeArray contactOffsetsPerType, - float deltaTime, - JobHandle inputDeps) + public void Contacts(int colliderIndex, + int rigidbodyIndex, + NativeArray rigidbodies, + + NativeArray positions, + NativeArray orientations, + NativeArray velocities, + NativeArray radii, + + NativeArray simplices, + in BurstAabb simplexBounds, + int simplexIndex, + int simplexStart, + int simplexSize, + + NativeQueue.ParallelWriter contacts, + int optimizationIterations, + float optimizationTolerance) { - int pairCount = contactOffsetsPerType[(int)Oni.ShapeType.Heightmap + 1] - contactOffsetsPerType[(int)Oni.ShapeType.Heightmap]; - if (pairCount == 0) return inputDeps; + if (shape.dataIndex < 0) return; - var job = new GenerateHeightFieldContactsJob - { - contactPairs = contactPairs, + triNormal = float4.zero; - positions = solver.positions, - orientations = solver.orientations, - velocities = solver.velocities, - invMasses = solver.invMasses, - radii = solver.principalRadii, - - simplices = solver.simplices, - simplexCounts = solver.simplexCounts, - simplexBounds = solver.simplexBounds, - - transforms = world.colliderTransforms.AsNativeArray(), - shapes = world.colliderShapes.AsNativeArray(), - rigidbodies = world.rigidbodies.AsNativeArray(), - - heightFieldHeaders = world.heightFieldContainer.headers.AsNativeArray(), - heightFieldSamples = world.heightFieldContainer.samples.AsNativeArray(), - - contactsQueue = contactQueue.AsParallelWriter(), - - solverToWorld = solver.inertialFrame, - worldToSolver = solver.worldToSolver, - deltaTime = deltaTime, - parameters = solver.abstraction.parameters, - firstPair = contactOffsetsPerType[(int)Oni.ShapeType.Heightmap] - }; - - inputDeps = job.Schedule(pairCount, 1, inputDeps); - return inputDeps; - } - - } - - [BurstCompile] - struct GenerateHeightFieldContactsJob : IJobParallelFor - { - [ReadOnly] public NativeList contactPairs; - - // particle arrays: - [ReadOnly] public NativeArray velocities; - [ReadOnly] public NativeArray positions; - [ReadOnly] public NativeArray orientations; - [ReadOnly] public NativeArray invMasses; - [ReadOnly] public NativeArray radii; - - // simplex arrays: - [ReadOnly] public NativeArray simplices; - [ReadOnly] public SimplexCounts simplexCounts; - [ReadOnly] public NativeArray simplexBounds; - - // collider arrays: - [ReadOnly] public NativeArray transforms; - [ReadOnly] public NativeArray shapes; - [ReadOnly] public NativeArray rigidbodies; - - // height field data: - [ReadOnly] public NativeArray heightFieldHeaders; - [ReadOnly] public NativeArray heightFieldSamples; - - [WriteOnly] - [NativeDisableParallelForRestriction] - public NativeQueue.ParallelWriter contactsQueue; - - // auxiliar data: - [ReadOnly] public int firstPair; - [ReadOnly] public BurstInertialFrame solverToWorld; - [ReadOnly] public BurstAffineTransform worldToSolver; - [ReadOnly] public float deltaTime; - [ReadOnly] public Oni.SolverParameters parameters; - - public void Execute(int i) - { - - int simplexIndex = contactPairs[firstPair + i].bodyA; - int colliderIndex = contactPairs[firstPair + i].bodyB; - var shape = shapes[colliderIndex]; - - if (shape.dataIndex < 0) - return; - - var header = heightFieldHeaders[shape.dataIndex]; - int rigidbodyIndex = shapes[colliderIndex].rigidbodyIndex; - - int simplexStart = simplexCounts.GetSimplexStartAndSize(simplexIndex, out int simplexSize); - var simplexBound = simplexBounds[simplexIndex]; - - BurstAffineTransform colliderToSolver = worldToSolver * transforms[colliderIndex]; - - // invert a full matrix here to accurately represent collider bounds scale. - var solverToCollider = math.inverse(float4x4.TRS(colliderToSolver.translation.xyz, colliderToSolver.rotation, colliderToSolver.scale.xyz)); - var simplexBoundsCS = simplexBound.Transformed(solverToCollider); - - BurstHeightField triangleMeshShape = new BurstHeightField() - { - colliderToSolver = colliderToSolver, - shape = shapes[colliderIndex], - header = heightFieldHeaders[shapes[colliderIndex].dataIndex], - heightFieldSamples = heightFieldSamples - }; - - float4 triNormal = float4.zero; - - var co = new BurstContact { bodyA = simplexIndex, bodyB = colliderIndex }; + var co = new BurstContact() { bodyA = simplexIndex, bodyB = colliderIndex }; int resolutionU = (int)shape.center.x; int resolutionV = (int)shape.center.y; @@ -157,8 +66,8 @@ namespace Obi float cellHeight = shape.size.z / (resolutionV - 1); // calculate particle bounds min/max cells: - int2 min = new int2((int)math.floor(simplexBoundsCS.min[0] / cellWidth), (int)math.floor(simplexBoundsCS.min[2] / cellHeight)); - int2 max = new int2((int)math.floor(simplexBoundsCS.max[0] / cellWidth), (int)math.floor(simplexBoundsCS.max[2] / cellHeight)); + int2 min = new int2((int)math.floor(simplexBounds.min[0] / cellWidth), (int)math.floor(simplexBounds.min[2] / cellHeight)); + int2 max = new int2((int)math.floor(simplexBounds.max[0] / cellWidth), (int)math.floor(simplexBounds.max[2] / cellHeight)); for (int su = min[0]; su <= max[0]; ++su) { @@ -197,11 +106,11 @@ namespace Obi float4 v2 = new float4(max_x, h4, max_z, 0); float4 v3 = new float4(min_x, h1, min_z, 0); - triangleMeshShape.tri.Cache(v1, v2, v3); + tri.Cache(v1, v2, v3); triNormal.xyz = math.normalizesafe(math.cross((v2 - v1).xyz, (v3 - v1).xyz)); - var colliderPoint = BurstLocalOptimization.Optimize(ref triangleMeshShape, positions, orientations, radii, simplices, simplexStart, simplexSize, - ref simplexBary, out convexPoint, parameters.surfaceCollisionIterations, parameters.surfaceCollisionTolerance); + var colliderPoint = BurstLocalOptimization.Optimize(ref this, positions, orientations, radii, simplices, simplexStart, simplexSize, + ref simplexBary, out convexPoint, optimizationIterations, optimizationTolerance); float4 velocity = float4.zero; float simplexRadius = 0; @@ -219,12 +128,12 @@ namespace Obi float dAB = math.dot(convexPoint - colliderPoint.point, colliderPoint.normal); float vel = math.dot(velocity - rbVelocity, colliderPoint.normal); - if (vel * deltaTime + dAB <= simplexRadius + shape.contactOffset + parameters.collisionMargin) + if (vel * dt + dAB <= simplexRadius + shape.contactOffset + collisionMargin) { co.pointB = colliderPoint.point; - co.normal = colliderPoint.normal * triangleMeshShape.shape.sign; + co.normal = colliderPoint.normal; co.pointA = simplexBary; - contactsQueue.Enqueue(co); + contacts.Enqueue(co); } // ------contact against the second triangle------: @@ -232,11 +141,11 @@ namespace Obi v2 = new float4(max_x, h4, max_z, 0); v3 = new float4(max_x, h2, min_z, 0); - triangleMeshShape.tri.Cache(v1, v2, v3); + tri.Cache(v1, v2, v3); triNormal.xyz = math.normalizesafe(math.cross((v2 - v1).xyz, (v3 - v1).xyz)); - colliderPoint = BurstLocalOptimization.Optimize(ref triangleMeshShape, positions, orientations, radii, simplices, simplexStart, simplexSize, - ref simplexBary, out convexPoint, parameters.surfaceCollisionIterations, parameters.surfaceCollisionTolerance); + colliderPoint = BurstLocalOptimization.Optimize(ref this, positions, orientations, radii, simplices, simplexStart, simplexSize, + ref simplexBary, out convexPoint, optimizationIterations, optimizationTolerance); velocity = float4.zero; simplexRadius = 0; @@ -254,19 +163,21 @@ namespace Obi dAB = math.dot(convexPoint - colliderPoint.point, colliderPoint.normal); vel = math.dot(velocity - rbVelocity, colliderPoint.normal); - if (vel * deltaTime + dAB <= simplexRadius + shape.contactOffset + parameters.collisionMargin) + if (vel * dt + dAB <= simplexRadius + shape.contactOffset + collisionMargin) { co.pointB = colliderPoint.point; - co.normal = colliderPoint.normal * triangleMeshShape.shape.sign; + co.normal = colliderPoint.normal; co.pointA = simplexBary; - contactsQueue.Enqueue(co); + contacts.Enqueue(co); } } } } } + } + } } diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstLocalOptimization.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstLocalOptimization.cs index 16da88c46..0b0570e08 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstLocalOptimization.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstLocalOptimization.cs @@ -50,7 +50,6 @@ namespace Obi convexRadii += radii[particle] * convexBary[j]; convexOrientation.value += orientations[particle].value * convexBary[j]; } - convexPoint.w = 0; } public static SurfacePoint Optimize(ref T function, @@ -113,7 +112,6 @@ namespace Obi { int particle = simplices[simplexStart + j]; float4 candidate = positions[particle] - convexPoint; - candidate.w = 0; // here, we adjust the candidate by projecting it to the engrosed simplex's surface: candidate -= pointInFunction.normal * (radii[particle].x - convexThickness.x); @@ -178,8 +176,6 @@ namespace Obi float4 candidateC = positions[simplices[simplexStart]] - pointInFunction.point; float4 candidateD = positions[simplices[simplexStart + 1]] - pointInFunctionD.point; - candidateC.w = 0; - candidateD.w = 0; candidateC -= pointInFunction.normal * (radii[simplices[simplexStart]].x - convexThickness.x); candidateD -= pointInFunctionD.normal * (radii[simplices[simplexStart + 1]].x - convexThicknessD.x); diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstSimplex.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstSimplex.cs index d042894d9..35f990289 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstSimplex.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstSimplex.cs @@ -24,9 +24,9 @@ namespace Obi { if (simplexSize == 3) { - tri.Cache(new float4(positions[simplices[simplexStart]].xyz,0), - new float4(positions[simplices[simplexStart + 1]].xyz,0), - new float4(positions[simplices[simplexStart + 2]].xyz,0)); + tri.Cache(positions[simplices[simplexStart]], + positions[simplices[simplexStart + 1]], + positions[simplices[simplexStart + 2]]); } } @@ -35,17 +35,16 @@ namespace Obi switch (simplexSize) { case 1: - default: { - float4 p1 = positions[simplices[simplexStart]]; p1.w = 0; + float4 p1 = positions[simplices[simplexStart]]; projectedPoint.bary = new float4(1, 0, 0, 0); projectedPoint.point = p1; } break; case 2: { - float4 p1 = positions[simplices[simplexStart]]; p1.w = 0; - float4 p2 = positions[simplices[simplexStart + 1]]; p2.w = 0; + float4 p1 = positions[simplices[simplexStart]]; + float4 p2 = positions[simplices[simplexStart + 1]]; BurstMath.NearestPointOnEdge(p1, p2, point, out float mu); projectedPoint.bary = new float4(1 - mu, mu, 0, 0); projectedPoint.point = p1 * projectedPoint.bary[0] + p2 * projectedPoint.bary[1]; diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstSphere.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstSphere.cs index cd5b297f1..327262365 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstSphere.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstSphere.cs @@ -1,22 +1,21 @@ #if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) -using Unity.Burst; using Unity.Collections; -using Unity.Jobs; using Unity.Mathematics; namespace Obi { - public struct BurstSphere : BurstLocalOptimization.IDistanceFunction + public struct BurstSphere : BurstLocalOptimization.IDistanceFunction, IBurstCollider { public BurstColliderShape shape; public BurstAffineTransform colliderToSolver; + public float dt; public void Evaluate(float4 point, float4 radii, quaternion orientation, ref BurstLocalOptimization.SurfacePoint projectedPoint) { float4 center = shape.center * colliderToSolver.scale; point = colliderToSolver.InverseTransformPointUnscaled(point) - center; - if (shape.is2D) + if (shape.is2D != 0) point[2] = 0; float radius = shape.size.x * math.cmax(colliderToSolver.scale.xyz); @@ -28,98 +27,36 @@ namespace Obi projectedPoint.normal = colliderToSolver.TransformDirection(normal); } - public static JobHandle GenerateContacts(ObiColliderWorld world, - BurstSolverImpl solver, - NativeList contactPairs, - NativeQueue contactQueue, - NativeArray contactOffsetsPerType, - float deltaTime, - JobHandle inputDeps) + public void Contacts(int colliderIndex, + int rigidbodyIndex, + NativeArray rigidbodies, + + NativeArray positions, + NativeArray orientations, + NativeArray velocities, + NativeArray radii, + + NativeArray simplices, + in BurstAabb simplexBounds, + int simplexIndex, + int simplexStart, + int simplexSize, + + NativeQueue.ParallelWriter contacts, + int optimizationIterations, + float optimizationTolerance) { - int pairCount = contactOffsetsPerType[(int)Oni.ShapeType.Sphere + 1] - contactOffsetsPerType[(int)Oni.ShapeType.Sphere]; - if (pairCount == 0) return inputDeps; - - var job = new GenerateSphereContactsJob - { - contactPairs = contactPairs, - - positions = solver.positions, - orientations = solver.orientations, - velocities = solver.velocities, - invMasses = solver.invMasses, - radii = solver.principalRadii, - - simplices = solver.simplices, - simplexCounts = solver.simplexCounts, - - transforms = world.colliderTransforms.AsNativeArray(), - shapes = world.colliderShapes.AsNativeArray(), - - contactsQueue = contactQueue.AsParallelWriter(), - - worldToSolver = solver.worldToSolver, - deltaTime = deltaTime, - parameters = solver.abstraction.parameters, - firstPair = contactOffsetsPerType[(int)Oni.ShapeType.Sphere] - }; - - inputDeps = job.Schedule(pairCount, 8, inputDeps); - return inputDeps; - } - } - - [BurstCompile] - struct GenerateSphereContactsJob : IJobParallelFor - { - [ReadOnly] public NativeList contactPairs; - - // particle arrays: - [ReadOnly] public NativeArray velocities; - [ReadOnly] public NativeArray positions; - [ReadOnly] public NativeArray orientations; - [ReadOnly] public NativeArray invMasses; - [ReadOnly] public NativeArray radii; - - // simplex arrays: - [ReadOnly] public NativeArray simplices; - [ReadOnly] public SimplexCounts simplexCounts; - - // collider arrays: - [ReadOnly] public NativeArray transforms; - [ReadOnly] public NativeArray shapes; - - [WriteOnly] - [NativeDisableParallelForRestriction] - public NativeQueue.ParallelWriter contactsQueue; - - // auxiliar data: - [ReadOnly] public int firstPair; - [ReadOnly] public BurstAffineTransform worldToSolver; - [ReadOnly] public float deltaTime; - [ReadOnly] public Oni.SolverParameters parameters; - - public void Execute(int i) - { - int simplexIndex = contactPairs[firstPair + i].bodyA; - int colliderIndex = contactPairs[firstPair + i].bodyB; - - int simplexStart = simplexCounts.GetSimplexStartAndSize(simplexIndex, out int simplexSize); - - BurstAffineTransform colliderToSolver = worldToSolver * transforms[colliderIndex]; - - BurstSphere shape = new BurstSphere { colliderToSolver = colliderToSolver, shape = shapes[colliderIndex] }; - + var co = new BurstContact() { bodyA = simplexIndex, bodyB = colliderIndex }; float4 simplexBary = BurstMath.BarycenterForSimplexOfSize(simplexSize); - var colliderPoint = BurstLocalOptimization.Optimize(ref shape, positions, orientations, radii, simplices, simplexStart, simplexSize, - ref simplexBary, out _, parameters.surfaceCollisionIterations, parameters.surfaceCollisionTolerance); - contactsQueue.Enqueue(new BurstContact { - bodyA = simplexIndex, - bodyB = colliderIndex, - pointA = simplexBary, - pointB = colliderPoint.point, - normal = colliderPoint.normal * shape.shape.sign - }); + var colliderPoint = BurstLocalOptimization.Optimize(ref this, positions, orientations, radii, simplices, simplexStart, simplexSize, + ref simplexBary, out float4 convexPoint, optimizationIterations, optimizationTolerance); + + co.pointB = colliderPoint.point; + co.normal = colliderPoint.normal; + co.pointA = simplexBary; + + contacts.Enqueue(co); } } diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstTriangleMesh.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstTriangleMesh.cs index 6ef8be0bf..6edf852f4 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstTriangleMesh.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/BurstTriangleMesh.cs @@ -1,23 +1,30 @@ #if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) -using Unity.Burst; using Unity.Collections; -using Unity.Jobs; using Unity.Mathematics; namespace Obi { - public struct BurstTriangleMesh : BurstLocalOptimization.IDistanceFunction + public struct BurstTriangleMesh : BurstLocalOptimization.IDistanceFunction, IBurstCollider { public BurstColliderShape shape; public BurstAffineTransform colliderToSolver; + public BurstAffineTransform solverToWorld; - public BurstMath.CachedTri tri; + public TriangleMeshHeader header; + public NativeArray bihNodes; + public NativeArray triangles; + public NativeArray vertices; + + public float dt; + public float collisionMargin; + + private BurstMath.CachedTri tri; public void Evaluate(float4 point, float4 radii, quaternion orientation, ref BurstLocalOptimization.SurfacePoint projectedPoint) { point = colliderToSolver.InverseTransformPointUnscaled(point); - if (shape.is2D) + if (shape.is2D != 0) point[2] = 0; float4 nearestPoint = BurstMath.NearestPointOnTri(tri, point, out float4 bary); @@ -27,194 +34,116 @@ namespace Obi projectedPoint.normal = colliderToSolver.TransformDirection(normal); } - public static JobHandle GenerateContacts(ObiColliderWorld world, - BurstSolverImpl solver, - NativeList contactPairs, - NativeQueue contactQueue, - NativeArray contactOffsetsPerType, - float deltaTime, - JobHandle inputDeps) + public void Contacts(int colliderIndex, + int rigidbodyIndex, + NativeArray rigidbodies, + + NativeArray positions, + NativeArray orientations, + NativeArray velocities, + NativeArray radii, + + NativeArray simplices, + in BurstAabb simplexBounds, + int simplexIndex, + int simplexStart, + int simplexSize, + + NativeQueue.ParallelWriter contacts, + int optimizationIterations, + float optimizationTolerance) { - int pairCount = contactOffsetsPerType[(int)Oni.ShapeType.TriangleMesh + 1] - contactOffsetsPerType[(int)Oni.ShapeType.TriangleMesh]; - if (pairCount == 0) return inputDeps; - var job = new GenerateTriangleMeshContactsJob - { - contactPairs = contactPairs, - - positions = solver.positions, - orientations = solver.orientations, - velocities = solver.velocities, - invMasses = solver.invMasses, - radii = solver.principalRadii, - - simplices = solver.simplices, - simplexCounts = solver.simplexCounts, - simplexBounds = solver.simplexBounds, - - transforms = world.colliderTransforms.AsNativeArray(), - shapes = world.colliderShapes.AsNativeArray(), - rigidbodies = world.rigidbodies.AsNativeArray(), - - triangleMeshHeaders = world.triangleMeshContainer.headers.AsNativeArray(), - bihNodes = world.triangleMeshContainer.bihNodes.AsNativeArray(), - triangles = world.triangleMeshContainer.triangles.AsNativeArray(), - vertices = world.triangleMeshContainer.vertices.AsNativeArray(), - - contactsQueue = contactQueue.AsParallelWriter(), - - solverToWorld = solver.inertialFrame, - worldToSolver = solver.worldToSolver, - deltaTime = deltaTime, - parameters = solver.abstraction.parameters, - firstPair = contactOffsetsPerType[(int)Oni.ShapeType.TriangleMesh] - }; - - inputDeps = job.Schedule(pairCount, 1, inputDeps); - return inputDeps; + BIHTraverse(colliderIndex, rigidbodyIndex, simplexIndex, simplexStart, simplexSize, + rigidbodies, positions, orientations, velocities, radii, simplices, in simplexBounds, 0, contacts, optimizationIterations, optimizationTolerance); + } - } - [BurstCompile] - struct GenerateTriangleMeshContactsJob : IJobParallelFor - { - [ReadOnly] public NativeList contactPairs; - - // particle arrays: - [ReadOnly] public NativeArray velocities; - [ReadOnly] public NativeArray positions; - [ReadOnly] public NativeArray orientations; - [ReadOnly] public NativeArray invMasses; - [ReadOnly] public NativeArray radii; - - // simplex arrays: - [ReadOnly] public NativeArray simplices; - [ReadOnly] public SimplexCounts simplexCounts; - [ReadOnly] public NativeArray simplexBounds; - - // collider arrays: - [ReadOnly] public NativeArray transforms; - [ReadOnly] public NativeArray shapes; - [ReadOnly] public NativeArray rigidbodies; - - // triangle mesh data: - [ReadOnly] public NativeArray triangleMeshHeaders; - [ReadOnly] public NativeArray bihNodes; - [ReadOnly] public NativeArray triangles; - [ReadOnly] public NativeArray vertices; - - [WriteOnly] - [NativeDisableParallelForRestriction] - public NativeQueue.ParallelWriter contactsQueue; - - // auxiliar data: - [ReadOnly] public int firstPair; - [ReadOnly] public BurstInertialFrame solverToWorld; - [ReadOnly] public BurstAffineTransform worldToSolver; - [ReadOnly] public float deltaTime; - [ReadOnly] public Oni.SolverParameters parameters; - - public void Execute(int i) + private void BIHTraverse(int colliderIndex, + int rigidbodyIndex, + int simplexIndex, + int simplexStart, + int simplexSize, + NativeArray rigidbodies, + NativeArray positions, + NativeArray orientations, + NativeArray velocities, + NativeArray radii, + NativeArray simplices, + in BurstAabb simplexBounds, + int nodeIndex, + NativeQueue.ParallelWriter contacts, + int optimizationIterations, + float optimizationTolerance) { - int simplexIndex = contactPairs[firstPair + i].bodyA; - int colliderIndex = contactPairs[firstPair + i].bodyB; - var shape = shapes[colliderIndex]; + var node = bihNodes[header.firstNode + nodeIndex]; - if (shape.dataIndex < 0) - return; + if (node.firstChild >= 0) + { + // visit min node: + if (simplexBounds.min[node.axis] <= node.min) + BIHTraverse(colliderIndex, rigidbodyIndex, simplexIndex, simplexStart, simplexSize, + rigidbodies, positions, orientations, velocities, radii, simplices, in simplexBounds, + node.firstChild, contacts, optimizationIterations, optimizationTolerance); - int rigidbodyIndex = shape.rigidbodyIndex; - var header = triangleMeshHeaders[shape.dataIndex]; - - int simplexStart = simplexCounts.GetSimplexStartAndSize(simplexIndex, out int simplexSize); - var simplexBound = simplexBounds[simplexIndex]; - - BurstAffineTransform colliderToSolver = worldToSolver * transforms[colliderIndex]; - - // invert a full matrix here to accurately represent collider bounds scale. - var solverToCollider = math.inverse(float4x4.TRS(colliderToSolver.translation.xyz, colliderToSolver.rotation, colliderToSolver.scale.xyz)); - var simplexBoundsCS = simplexBound.Transformed(solverToCollider); - - float4 marginCS = new float4((shape.contactOffset + parameters.collisionMargin) / colliderToSolver.scale.xyz, 0); - - BurstTriangleMesh triangleMeshShape = new BurstTriangleMesh() + // visit max node: + if (simplexBounds.max[node.axis] >= node.max) + BIHTraverse(colliderIndex, rigidbodyIndex, simplexIndex, simplexStart, simplexSize, + rigidbodies, positions, orientations, velocities, radii, simplices, in simplexBounds, + node.firstChild + 1, contacts, optimizationIterations, optimizationTolerance); + } + else { - colliderToSolver = colliderToSolver, - shape = shape - }; - - NativeQueue queue = new NativeQueue(Allocator.Temp); - - queue.Enqueue(0); - - while (!queue.IsEmpty()) - { - int nodeIndex = queue.Dequeue(); - var node = bihNodes[header.firstNode + nodeIndex]; - - // leaf node: - if (node.firstChild < 0) + // check for contact against all triangles: + for (int dataOffset = node.start; dataOffset < node.start + node.count; ++dataOffset) { - // check for contact against all triangles: - for (int dataOffset = node.start; dataOffset < node.start + node.count; ++dataOffset) + Triangle t = triangles[header.firstTriangle + dataOffset]; + float4 v1 = new float4(vertices[header.firstVertex + t.i1], 0); + float4 v2 = new float4(vertices[header.firstVertex + t.i2], 0); + float4 v3 = new float4(vertices[header.firstVertex + t.i3], 0); + BurstAabb triangleBounds = new BurstAabb(v1, v2, v3, shape.contactOffset + collisionMargin); + + if (triangleBounds.IntersectsAabb(simplexBounds, shape.is2D != 0)) { - Triangle t = triangles[header.firstTriangle + dataOffset]; - float4 v1 = new float4(vertices[header.firstVertex + t.i1], 0); - float4 v2 = new float4(vertices[header.firstVertex + t.i2], 0); - float4 v3 = new float4(vertices[header.firstVertex + t.i3], 0); - BurstAabb triangleBounds = new BurstAabb(v1, v2, v3, marginCS); + float4 simplexBary = BurstMath.BarycenterForSimplexOfSize(simplexSize); + tri.Cache(v1 * colliderToSolver.scale, v2 * colliderToSolver.scale, v3 * colliderToSolver.scale); - if (triangleBounds.IntersectsAabb(simplexBoundsCS, shape.is2D)) + var colliderPoint = BurstLocalOptimization.Optimize(ref this, positions, orientations, radii, simplices, simplexStart, simplexSize, + ref simplexBary, out float4 simplexPoint, optimizationIterations, optimizationTolerance); + + float4 velocity = float4.zero; + float simplexRadius = 0; + for (int j = 0; j < simplexSize; ++j) { - float4 simplexBary = BurstMath.BarycenterForSimplexOfSize(simplexSize); + int particleIndex = simplices[simplexStart + j]; + simplexRadius += radii[particleIndex].x * simplexBary[j]; + velocity += velocities[particleIndex] * simplexBary[j]; + } - triangleMeshShape.tri.Cache(v1 * colliderToSolver.scale, v2 * colliderToSolver.scale, v3 * colliderToSolver.scale); + float4 rbVelocity = float4.zero; + if (rigidbodyIndex >= 0) + rbVelocity = BurstMath.GetRigidbodyVelocityAtPoint(rigidbodyIndex, colliderPoint.point, rigidbodies, solverToWorld); - var colliderPoint = BurstLocalOptimization.Optimize(ref triangleMeshShape, positions, orientations, radii, simplices, simplexStart, simplexSize, - ref simplexBary, out float4 simplexPoint, parameters.surfaceCollisionIterations, parameters.surfaceCollisionTolerance); + float dAB = math.dot(simplexPoint - colliderPoint.point, colliderPoint.normal); + float vel = math.dot(velocity - rbVelocity, colliderPoint.normal); - float4 velocity = float4.zero; - float simplexRadius = 0; - for (int j = 0; j < simplexSize; ++j) + if (vel * dt + dAB <= simplexRadius + shape.contactOffset + collisionMargin) + { + contacts.Enqueue(new BurstContact() { - int particleIndex = simplices[simplexStart + j]; - simplexRadius += radii[particleIndex].x * simplexBary[j]; - velocity += velocities[particleIndex] * simplexBary[j]; - } - - float4 rbVelocity = float4.zero; - if (rigidbodyIndex >= 0) - rbVelocity = BurstMath.GetRigidbodyVelocityAtPoint(rigidbodyIndex, colliderPoint.point, rigidbodies, solverToWorld); - - float dAB = math.dot(simplexPoint - colliderPoint.point, colliderPoint.normal); - float vel = math.dot(velocity - rbVelocity, colliderPoint.normal); - - if (vel * deltaTime + dAB <= simplexRadius + shape.contactOffset + parameters.collisionMargin) - { - contactsQueue.Enqueue(new BurstContact() - { - bodyA = simplexIndex, - bodyB = colliderIndex, - pointA = simplexBary, - pointB = colliderPoint.point, - normal = colliderPoint.normal * triangleMeshShape.shape.sign - }); - } + bodyA = simplexIndex, + bodyB = colliderIndex, + pointA = simplexBary, + pointB = colliderPoint.point, + normal = colliderPoint.normal, + }); } } } - else // check min and/or max children: - { - // visit min node: - if (simplexBoundsCS.min[node.axis] <= node.min) - queue.Enqueue(node.firstChild); - - // visit max node: - if (simplexBoundsCS.max[node.axis] >= node.max) - queue.Enqueue(node.firstChild + 1); - } } } + } + } #endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/IBurstCollider.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/IBurstCollider.cs new file mode 100644 index 000000000..dd6e73bc2 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/IBurstCollider.cs @@ -0,0 +1,29 @@ +#if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) +using Unity.Collections; +using Unity.Mathematics; + +namespace Obi +{ + interface IBurstCollider + { + void Contacts(int colliderIndex, + int rigidbodyIndex, + NativeArray rigidbodies, + + NativeArray positions, + NativeArray orientations, + NativeArray velocities, + NativeArray radii, + + NativeArray simplices, + in BurstAabb simplexBounds, + int simplexIndex, + int simplexStart, + int simplexSize, + + NativeQueue.ParallelWriter contacts, + int optimizationIterations, + float optimizationTolerance); + } +} +#endif \ No newline at end of file diff --git a/Assets/Obi/Editor/Common/Blueprints/ObiActorBlueprintEditorStage.cs.meta b/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/IBurstCollider.cs.meta similarity index 83% rename from Assets/Obi/Editor/Common/Blueprints/ObiActorBlueprintEditorStage.cs.meta rename to Assets/Obi/Scripts/Common/Backends/Burst/Collisions/IBurstCollider.cs.meta index 91b16abee..63ab565a5 100644 --- a/Assets/Obi/Editor/Common/Blueprints/ObiActorBlueprintEditorStage.cs.meta +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Collisions/IBurstCollider.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 4c8d9d8042d49436c89c515b001088ac +guid: 424c135125b644408aeda26a57bd6e40 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Aerodynamics/BurstAerodynamicConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Aerodynamics/BurstAerodynamicConstraintsBatch.cs index 2c66cbdc9..3fc159964 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Aerodynamics/BurstAerodynamicConstraintsBatch.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Aerodynamics/BurstAerodynamicConstraintsBatch.cs @@ -26,12 +26,12 @@ namespace Obi m_ConstraintCount = count; } - public override JobHandle Initialize(JobHandle inputDeps, float stepTime, float substepTime, int steps, float timeLeft) + public override JobHandle Initialize(JobHandle inputDeps, float substepTime) { return inputDeps; } - public override JobHandle Evaluate(JobHandle inputDeps, float stepTime, float substepTime, int steps, float timeLeft) + public override JobHandle Evaluate(JobHandle inputDeps, float stepTime, float substepTime, int substeps) { var projectConstraints = new AerodynamicConstraintsBatchJob() { diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Bend/BurstBendConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Bend/BurstBendConstraintsBatch.cs index 18997515c..b163b493e 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Bend/BurstBendConstraintsBatch.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Bend/BurstBendConstraintsBatch.cs @@ -42,7 +42,7 @@ namespace Obi applyConstraints.particleIndices = this.particleIndices; } - public override JobHandle Evaluate(JobHandle inputDeps, float stepTime, float substepTime, int steps, float timeLeft) + public override JobHandle Evaluate(JobHandle inputDeps, float stepTime, float substepTime, int substeps) { projectConstraints.positions = solverImplementation.positions; projectConstraints.invMasses = solverImplementation.invMasses; @@ -97,6 +97,7 @@ namespace Obi float4 bendVector = positions[p3] - (positions[p1] + positions[p2] + positions[p3]) / 3.0f; float bend = math.length(bendVector); + float constraint = bend - restBends[i]; constraint = math.max(0, constraint - stiffnesses[i].x) + diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/BendTwist/BurstBendTwistConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/BendTwist/BurstBendTwistConstraintsBatch.cs index bea412444..c34acf76c 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/BendTwist/BurstBendTwistConstraintsBatch.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/BendTwist/BurstBendTwistConstraintsBatch.cs @@ -32,7 +32,7 @@ namespace Obi m_ConstraintCount = count; } - public override JobHandle Evaluate(JobHandle inputDeps, float stepTime, float substepTime, int steps, float timeLeft) + public override JobHandle Evaluate(JobHandle inputDeps, float stepTime, float substepTime, int substeps) { var projectConstraints = new BendTwistConstraintsBatchJob() { @@ -107,11 +107,12 @@ namespace Obi quaternion omega_plus; omega_plus.value = omega.value + rest.value; //delta Omega with - omega_0 omega.value -= rest.value; //delta Omega with + omega_0 + if (math.lengthsq(omega.value) > math.lengthsq(omega_plus.value)) omega = omega_plus; // plasticity - if (math.lengthsq(omega.value.xyz) > plasticity[i].x * plasticity[i].x) + if (math.lengthsq(omega.value) > plasticity[i].x * plasticity[i].x) { rest.value += omega.value * plasticity[i].y * deltaTime; restDarboux[i] = rest; diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/BurstConstraintsBatchImpl.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/BurstConstraintsBatchImpl.cs index 35f19d56b..5594e4786 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/BurstConstraintsBatchImpl.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/BurstConstraintsBatchImpl.cs @@ -24,7 +24,11 @@ namespace Obi public bool enabled { - set { m_Enabled = value; } + set + { + if (m_Enabled != value) + m_Enabled = value; + } get { return m_Enabled; } } @@ -46,17 +50,22 @@ namespace Obi protected NativeArray particleIndices; protected NativeArray lambdas; - public virtual JobHandle Initialize(JobHandle inputDeps, float stepTime, float substepTime, int steps, float timeLeft) + public virtual JobHandle Initialize(JobHandle inputDeps, float substepTime) { if (lambdas.IsCreated) { - inputDeps = new ClearLambdasJob {lambdas = lambdas}.Schedule(lambdas.Length, 256, inputDeps); + // no need for jobs here, memclear is faster and we don't pay scheduling overhead. + unsafe + { + UnsafeUtility.MemClear(NativeArrayUnsafeUtility.GetUnsafeBufferPointerWithoutChecks(lambdas), + lambdas.Length * UnsafeUtility.SizeOf()); + } } return inputDeps; } // implemented by concrete constraint subclasses. - public abstract JobHandle Evaluate(JobHandle inputDeps, float stepTime, float substepTime, int steps, float timeLeft); + public abstract JobHandle Evaluate(JobHandle inputDeps, float stepTime, float substepTime, int substeps); public abstract JobHandle Apply(JobHandle inputDeps, float substepTime); public virtual void Destroy() @@ -95,16 +104,6 @@ namespace Obi counts[particleIndex] = 0; } } - - [BurstCompile] - public struct ClearLambdasJob : IJobParallelFor - { - public NativeArray lambdas; - public void Execute(int i) - { - lambdas[i] = 0; - } - } } } #endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/BurstConstraintsImpl.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/BurstConstraintsImpl.cs index 961b8de13..2b502be8b 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/BurstConstraintsImpl.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/BurstConstraintsImpl.cs @@ -9,8 +9,8 @@ namespace Obi { public interface IBurstConstraintsImpl : IConstraints { - JobHandle Initialize(JobHandle inputDeps, float stepTime, float substepTime, int steps, float timeLeft); - JobHandle Project(JobHandle inputDeps, float stepTime, float substepTime, int steps, float timeLeft); + JobHandle Initialize(JobHandle inputDeps, float substepTime); + JobHandle Project(JobHandle inputDeps, float stepTime, float substepTime, int substeps); void Dispose(); IConstraintsBatchImpl CreateConstraintsBatch(); @@ -63,14 +63,14 @@ namespace Obi return count; } - public JobHandle Initialize(JobHandle inputDeps, float stepTime, float substepTime, int steps, float timeLeft) + public JobHandle Initialize(JobHandle inputDeps, float substepTime) { // initialize all batches in parallel: if (batches.Count > 0) { NativeArray deps = new NativeArray(batches.Count, Allocator.TempJob, NativeArrayOptions.UninitializedMemory); for (int i = 0; i < batches.Count; ++i) - deps[i] = batches[i].enabled ? batches[i].Initialize(inputDeps, stepTime, substepTime, steps, timeLeft) : inputDeps; + deps[i] = batches[i].enabled ? batches[i].Initialize(inputDeps, substepTime) : inputDeps; JobHandle result = JobHandle.CombineDependencies(deps); deps.Dispose(); @@ -81,7 +81,7 @@ namespace Obi return inputDeps; } - public JobHandle Project(JobHandle inputDeps, float stepTime, float substepTime, int steps, float timeLeft) + public JobHandle Project(JobHandle inputDeps, float stepTime, float substepTime, int substeps) { UnityEngine.Profiling.Profiler.BeginSample("Project"); @@ -90,11 +90,11 @@ namespace Obi switch(parameters.evaluationOrder) { case Oni.ConstraintParameters.EvaluationOrder.Sequential: - inputDeps = EvaluateSequential(inputDeps, stepTime, substepTime, steps, timeLeft); + inputDeps = EvaluateSequential(inputDeps, stepTime, substepTime, substeps); break; case Oni.ConstraintParameters.EvaluationOrder.Parallel: - inputDeps = EvaluateParallel(inputDeps, stepTime, substepTime, steps, timeLeft); + inputDeps = EvaluateParallel(inputDeps, stepTime, substepTime, substeps); break; } @@ -103,14 +103,14 @@ namespace Obi return inputDeps; } - protected virtual JobHandle EvaluateSequential(JobHandle inputDeps, float stepTime, float substepTime,int steps, float timeLeft) + protected virtual JobHandle EvaluateSequential(JobHandle inputDeps, float stepTime, float substepTime,int substeps) { // evaluate and apply all batches: for (int i = 0; i < batches.Count; ++i) { if (batches[i].enabled) { - inputDeps = batches[i].Evaluate(inputDeps, stepTime, substepTime, steps, timeLeft); + inputDeps = batches[i].Evaluate(inputDeps, stepTime, substepTime, substeps); inputDeps = batches[i].Apply(inputDeps, substepTime); m_Solver.ScheduleBatchedJobsIfNeeded(); } @@ -119,13 +119,13 @@ namespace Obi return inputDeps; } - protected virtual JobHandle EvaluateParallel(JobHandle inputDeps, float stepTime, float substepTime, int steps, float timeLeft) + protected virtual JobHandle EvaluateParallel(JobHandle inputDeps, float stepTime, float substepTime, int substeps) { // evaluate all batches: for (int i = 0; i < batches.Count; ++i) if (batches[i].enabled) { - inputDeps = batches[i].Evaluate(inputDeps, stepTime, substepTime, steps, timeLeft); + inputDeps = batches[i].Evaluate(inputDeps, stepTime, substepTime, substeps); m_Solver.ScheduleBatchedJobsIfNeeded(); } diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Chain/BurstChainConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Chain/BurstChainConstraintsBatch.cs index 2a177188d..080e3a65b 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Chain/BurstChainConstraintsBatch.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Chain/BurstChainConstraintsBatch.cs @@ -30,7 +30,7 @@ namespace Obi m_ConstraintCount = count; } - public override JobHandle Evaluate(JobHandle inputDeps, float stepTime, float substepTime, int steps, float timeLeft) + public override JobHandle Evaluate(JobHandle inputDeps, float stepTime, float substepTime, int substeps) { var projectConstraints = new ChainConstraintsBatchJob() @@ -88,14 +88,12 @@ namespace Obi { int numEdges = numIndices[c] - 1; int first = firstIndex[c]; - float minLength = restLengths[c].x; + float minLength = restLengths[c].y; float maxLength = restLengths[c].y; // (ni:constraint gradient, di:desired lenght) NativeArray ni = new NativeArray(numEdges, Allocator.Temp); - - // calculate ai (subdiagonals), bi (diagonals) and ci (superdiagonals): - NativeArray diagonals = new NativeArray(numEdges, Allocator.Temp); + NativeArray di = new NativeArray(numEdges, Allocator.Temp); for (int i = 0; i < numEdges; ++i) { @@ -106,10 +104,20 @@ namespace Obi float4 diff = p1 - p2; float distance = math.length(diff); + float correction = 0; + + if (distance >= maxLength) + correction = distance - maxLength; + else if (distance <= minLength) + correction = distance - minLength; + + di[i] = correction; ni[i] = new float4(diff/(distance + BurstMath.epsilon)); } - // calculate ai, bi and ci (superdiagonals): + // calculate ai (subdiagonals), bi (diagonals) and ci (superdiagonals): + NativeArray diagonals = new NativeArray(numEdges, Allocator.Temp); + for (int i = 0; i < numEdges; ++i) { int edge = first + i; @@ -127,47 +135,34 @@ namespace Obi -w__i * math.dot(n_i_, n__i));// ci } + NativeArray sweep = new NativeArray(numEdges, Allocator.Temp); + // solve step #1, forward sweep: - // reuse diagonals.xy to store sweep results ci_ and di_: for (int i = 0; i < numEdges; ++i) { int edge = first + i; - float4 p1 = positions[particleIndices[edge]]; - float4 p2 = positions[particleIndices[edge + 1]]; - float cip_ = (i > 0) ? diagonals[i - 1].x : 0; - float dip_ = (i > 0) ? diagonals[i - 1].y : 0; + float cip_ = (i > 0) ? sweep[i - 1].x : 0; + float dip_ = (i > 0) ? sweep[i - 1].y : 0; float den = diagonals[i].y - cip_ * diagonals[i].x; - float3 d = diagonals[i]; - if (math.abs(den) > BurstMath.epsilon) + if (den != 0) { - float distance = math.distance(p1, p2); - float correction = 0; - - if (distance >= maxLength) - correction = distance - maxLength; - else if (distance <= minLength) - correction = distance - minLength; - - d.xy = new float2(d.z / den, - (correction - dip_ * d.x) / den); - + sweep[i] = new float2((diagonals[i].z / den), + (di[i] - dip_ * diagonals[i].x) / den); } else - d.xy = float2.zero; - - diagonals[i] = d; + sweep[i] = float2.zero; } - // solve step #2, backward sweep. reuse diagonals.z to store solution xi: + // solve step #2, backward sweep: + NativeArray xi = new NativeArray(numEdges, Allocator.Temp); for (int i = numEdges - 1; i >= 0; --i) { - float xi_ = (i < numEdges - 1) ? diagonals[i + 1].z : 0; + int edge = first + i; - float3 d = diagonals[i]; - d.z = d.y - d.x * xi_; - diagonals[i] = d; + float xi_ = (i < numEdges - 1) ? xi[i + 1] : 0; + xi[i] = sweep[i].y - sweep[i].x * xi_; } // calculate deltas: @@ -178,11 +173,11 @@ namespace Obi float4 ni__ = (i > 0) ? ni[i - 1] : float4.zero; float4 n_i_ = (i < numIndices[c] - 1) ? ni[i] : float4.zero; - float xi_ = (i > 0) ? diagonals[i - 1].z : 0; - float nxi = (i < numIndices[c] - 1) ? diagonals[i].z : 0; + float xi_ = (i > 0) ? xi[i - 1] : 0; + float nxi = (i < numIndices[c] - 1) ? xi[i] : 0; int p = particleIndices[index]; - deltas[p] += invMasses[p] * (ni__ * xi_ - n_i_ * nxi); + deltas[p] -= invMasses[p] * (-ni__ * xi_ + n_i_ * nxi); counts[p]++; } } diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/ColliderCollision/BurstColliderCollisionConstraints.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/ColliderCollision/BurstColliderCollisionConstraints.cs index b139b9481..e7d0e1a22 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/ColliderCollision/BurstColliderCollisionConstraints.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/ColliderCollision/BurstColliderCollisionConstraints.cs @@ -24,7 +24,9 @@ namespace Obi public override int GetConstraintCount() { - return ((BurstSolverImpl)solver).abstraction.colliderContacts.count; + if (!((BurstSolverImpl)solver).colliderContacts.IsCreated) + return 0; + return ((BurstSolverImpl)solver).colliderContacts.Length; } } } diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/ColliderCollision/BurstColliderCollisionConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/ColliderCollision/BurstColliderCollisionConstraintsBatch.cs index 35538e876..12cd97c1b 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/ColliderCollision/BurstColliderCollisionConstraintsBatch.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/ColliderCollision/BurstColliderCollisionConstraintsBatch.cs @@ -17,7 +17,7 @@ namespace Obi m_ConstraintType = Oni.ConstraintType.Collision; } - public override JobHandle Initialize(JobHandle inputDeps, float stepTime, float substepTime, int steps, float timeLeft) + public override JobHandle Initialize(JobHandle inputDeps, float substepTime) { var updateContacts = new UpdateContactsJob() { @@ -26,7 +26,7 @@ namespace Obi velocities = solverImplementation.velocities, radii = solverImplementation.principalRadii, invMasses = solverImplementation.invMasses, - invRotationalMasses = solverImplementation.invRotationalMasses, + invInertiaTensors = solverImplementation.invInertiaTensors, particleMaterialIndices = solverImplementation.collisionMaterials, collisionMaterials = ObiColliderWorld.GetInstance().collisionMaterials.AsNativeArray(), @@ -39,14 +39,13 @@ namespace Obi rigidbodyLinearDeltas = solverImplementation.abstraction.rigidbodyLinearDeltas.AsNativeArray(), rigidbodyAngularDeltas = solverImplementation.abstraction.rigidbodyAngularDeltas.AsNativeArray(), - contacts = ((BurstSolverImpl)constraints.solver).abstraction.colliderContacts.AsNativeArray(), - effectiveMasses = ((BurstSolverImpl)constraints.solver).abstraction.contactEffectiveMasses.AsNativeArray(), + contacts = ((BurstSolverImpl)constraints.solver).colliderContacts, inertialFrame = ((BurstSolverImpl)constraints.solver).inertialFrame }; - return updateContacts.Schedule(((BurstSolverImpl)constraints.solver).abstraction.colliderContacts.count, 128, inputDeps); + return updateContacts.Schedule(((BurstSolverImpl)constraints.solver).colliderContacts.Length, 128, inputDeps); } - public override JobHandle Evaluate(JobHandle inputDeps, float stepTime, float substepTime, int steps, float timeLeft) + public override JobHandle Evaluate(JobHandle inputDeps, float stepTime, float substepTime, int substeps) { var parameters = solverAbstraction.GetConstraintParameters(m_ConstraintType); @@ -73,13 +72,11 @@ namespace Obi deltas = solverAbstraction.positionDeltas.AsNativeArray(), counts = solverAbstraction.positionConstraintCounts.AsNativeArray(), - contacts = ((BurstSolverImpl)constraints.solver).abstraction.colliderContacts.AsNativeArray(), - effectiveMasses = ((BurstSolverImpl)constraints.solver).abstraction.contactEffectiveMasses.AsNativeArray(), + contacts = ((BurstSolverImpl)constraints.solver).colliderContacts, inertialFrame = ((BurstSolverImpl)constraints.solver).inertialFrame, constraintParameters = parameters, solverParameters = solverAbstraction.parameters, - steps = steps, - timeLeft = timeLeft, + substeps = substeps, stepTime = stepTime, substepTime = substepTime }; @@ -92,7 +89,7 @@ namespace Obi var applyConstraints = new ApplyCollisionConstraintsBatchJob() { - contacts = ((BurstSolverImpl)constraints.solver).abstraction.colliderContacts.AsNativeArray(), + contacts = ((BurstSolverImpl)constraints.solver).colliderContacts, simplices = solverImplementation.simplices, simplexCounts = solverImplementation.simplexCounts, @@ -111,7 +108,7 @@ namespace Obi /** * Updates contact data (such as contact distance) at the beginning of each substep. This is - * necessary because contacts are generated only once at the beginning of each step, not every substep. + * necessary because contacts are generalted only once at the beginning of each step, not every substep. */ [BurstCompile] public struct UpdateContactsJob : IJobParallelFor @@ -121,7 +118,7 @@ namespace Obi [ReadOnly] public NativeArray velocities; [ReadOnly] public NativeArray radii; [ReadOnly] public NativeArray invMasses; - [ReadOnly] public NativeArray invRotationalMasses; + [ReadOnly] public NativeArray invInertiaTensors; [ReadOnly] public NativeArray particleMaterialIndices; [ReadOnly] public NativeArray collisionMaterials; @@ -136,14 +133,12 @@ namespace Obi [ReadOnly] public NativeArray rigidbodyLinearDeltas; [ReadOnly] public NativeArray rigidbodyAngularDeltas; - public NativeArray effectiveMasses; public NativeArray contacts; [ReadOnly] public BurstInertialFrame inertialFrame; public void Execute(int i) { var contact = contacts[i]; - var efMasses = effectiveMasses[i]; int simplexStart = simplexCounts.GetSimplexStartAndSize(contact.bodyA, out int simplexSize); @@ -155,7 +150,7 @@ namespace Obi float4 simplexPrevPosition = float4.zero; quaternion simplexPrevOrientation = new quaternion(0, 0, 0, 0); float simplexInvMass = 0; - float simplexInvRotationalMass = 0; + float4 simplexInvInertia = float4.zero; float simplexRadius = 0; for (int j = 0; j < simplexSize; ++j) @@ -165,7 +160,7 @@ namespace Obi simplexPrevPosition += prevPositions[particleIndex] * contact.pointA[j]; simplexPrevOrientation.value += prevOrientations[particleIndex].value * contact.pointA[j]; simplexInvMass += invMasses[particleIndex] * contact.pointA[j]; - simplexInvRotationalMass = invRotationalMasses[particleIndex] * contact.pointA[j]; + simplexInvInertia += invInertiaTensors[particleIndex] * contact.pointA[j]; simplexRadius += BurstMath.EllipsoidRadius(contact.normal, prevOrientations[particleIndex], radii[particleIndex].xyz) * contact.pointA[j]; } @@ -173,7 +168,7 @@ namespace Obi int rigidbodyIndex = shapes[contact.bodyB].rigidbodyIndex; if (rigidbodyIndex >= 0) { - relativeVelocity -= BurstMath.GetRigidbodyVelocityAtPoint(rigidbodyIndex, contact.pointB, rigidbodies, rigidbodyLinearDeltas, rigidbodyAngularDeltas, inertialFrame); + relativeVelocity -= BurstMath.GetRigidbodyVelocityAtPoint(rigidbodyIndex, contact.pointB, rigidbodies, rigidbodyLinearDeltas, rigidbodyAngularDeltas, inertialFrame.frame); int bMaterialIndex = shapes[contact.bodyB].materialIndex; rollingContacts |= bMaterialIndex >= 0 ? collisionMaterials[bMaterialIndex].rollingContacts > 0 : false; @@ -185,21 +180,17 @@ namespace Obi // calculate contact point in A's surface: float4 contactPoint = contact.pointB + contact.normal * contact.distance; - // calculate contact tangent (first friction direction) using relative velocity: - contact.CalculateTangent(relativeVelocity); + // update contact orthonormal basis: + contact.CalculateBasis(relativeVelocity); // calculate A's contact mass. - float4 invInertiaTensor = math.rcp(BurstMath.GetParticleInertiaTensor(simplexRadius, simplexInvRotationalMass) + new float4(BurstMath.epsilon)); - efMasses.CalculateContactMassesA(simplexInvMass, invInertiaTensor, simplexPrevPosition, simplexPrevOrientation, contactPoint, contact.normal, contact.tangent, contact.bitangent, rollingContacts); + contact.CalculateContactMassesA(simplexInvMass, simplexInvInertia, simplexPrevPosition, simplexPrevOrientation, contactPoint, rollingContacts); // calculate B's contact mass. if (rigidbodyIndex >= 0) - efMasses.CalculateContactMassesB(rigidbodies[rigidbodyIndex], inertialFrame.frame, contact.pointB, contact.normal, contact.tangent, contact.bitangent); - else - efMasses.ClearContactMassesB(); + contact.CalculateContactMassesB(rigidbodies[rigidbodyIndex], inertialFrame.frame); contacts[i] = contact; - effectiveMasses[i] = efMasses; } } @@ -229,14 +220,12 @@ namespace Obi [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray counts; public NativeArray contacts; - [ReadOnly] public NativeArray effectiveMasses; [ReadOnly] public BurstInertialFrame inertialFrame; [ReadOnly] public Oni.ConstraintParameters constraintParameters; [ReadOnly] public Oni.SolverParameters solverParameters; [ReadOnly] public float stepTime; [ReadOnly] public float substepTime; - [ReadOnly] public float timeLeft; - [ReadOnly] public int steps; + [ReadOnly] public int substeps; public void Execute() { @@ -248,15 +237,12 @@ namespace Obi int colliderIndex = contact.bodyB; // Skip contacts involving triggers: - if (shapes[colliderIndex].isTrigger) + if (shapes[colliderIndex].flags > 0) continue; // Get the rigidbody index (might be < 0, in that case there's no rigidbody present) int rigidbodyIndex = shapes[colliderIndex].rigidbodyIndex; - float frameEnd = stepTime * steps; - float substepsToEnd = timeLeft / substepTime; - // Combine collision materials (use material from first particle in simplex) BurstCollisionMaterial material = CombineCollisionMaterials(simplices[simplexStart], colliderIndex); @@ -276,24 +262,24 @@ namespace Obi } // project position to the end of the full step: - float4 posA = math.lerp(simplexPrevPosition, simplexPosition, substepsToEnd); + float4 posA = math.lerp(simplexPrevPosition, simplexPosition, substeps); posA += -contact.normal * simplexRadius; float4 posB = contact.pointB; if (rigidbodyIndex >= 0) - posB += BurstMath.GetRigidbodyVelocityAtPoint(rigidbodyIndex, contact.pointB, rigidbodies, rigidbodyLinearDeltas, rigidbodyAngularDeltas, inertialFrame) * frameEnd; + posB += BurstMath.GetRigidbodyVelocityAtPoint(rigidbodyIndex, contact.pointB, rigidbodies, rigidbodyLinearDeltas, rigidbodyAngularDeltas, inertialFrame.frame) * stepTime; // adhesion: - float lambda = contact.SolveAdhesion(effectiveMasses[i].TotalNormalInvMass, posA, posB, material.stickDistance, material.stickiness, stepTime); + float lambda = contact.SolveAdhesion(posA, posB, material.stickDistance, material.stickiness, stepTime); // depenetration: - lambda += contact.SolvePenetration(effectiveMasses[i].TotalNormalInvMass, posA, posB, solverParameters.maxDepenetration * stepTime); + lambda += contact.SolvePenetration(posA, posB, solverParameters.maxDepenetration * stepTime); // Apply normal impulse to both simplex and rigidbody: if (math.abs(lambda) > BurstMath.epsilon) { - float4 delta = lambda * contact.normal * BurstMath.BaryScale(contact.pointA) / substepsToEnd; + float4 delta = lambda * contact.normal * BurstMath.BaryScale(contact.pointA) / substeps; for (int j = 0; j < simplexSize; ++j) { int particleIndex = simplices[simplexStart + j]; @@ -312,8 +298,8 @@ namespace Obi } if (rigidbodyIndex >= 0) - { - BurstMath.ApplyImpulse(rigidbodyIndex, -lambda / frameEnd * contact.normal, contact.pointB, rigidbodies, rigidbodyLinearDeltas, rigidbodyAngularDeltas, inertialFrame.frame); + { + BurstMath.ApplyImpulse(rigidbodyIndex, -lambda / stepTime * contact.normal, contact.pointB, rigidbodies, rigidbodyLinearDeltas, rigidbodyAngularDeltas, inertialFrame.frame); } } diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/ColliderCollision/BurstColliderFrictionConstraints.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/ColliderCollision/BurstColliderFrictionConstraints.cs index 5d57a75e3..e7be9989a 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/ColliderCollision/BurstColliderFrictionConstraints.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/ColliderCollision/BurstColliderFrictionConstraints.cs @@ -25,7 +25,9 @@ namespace Obi public override int GetConstraintCount() { - return ((BurstSolverImpl)solver).abstraction.colliderContacts.count; + if (!((BurstSolverImpl)solver).colliderContacts.IsCreated) + return 0; + return ((BurstSolverImpl)solver).colliderContacts.Length; } } } diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/ColliderCollision/BurstColliderFrictionConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/ColliderCollision/BurstColliderFrictionConstraintsBatch.cs index bd39b1612..6505d5302 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/ColliderCollision/BurstColliderFrictionConstraintsBatch.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/ColliderCollision/BurstColliderFrictionConstraintsBatch.cs @@ -15,13 +15,16 @@ namespace Obi m_ConstraintType = Oni.ConstraintType.Friction; } - public override JobHandle Initialize(JobHandle inputDeps, float stepTime, float substepTime, int steps, float timeLeft) + public override JobHandle Initialize(JobHandle inputDeps, float substepTime) { return inputDeps; } - public override JobHandle Evaluate(JobHandle inputDeps, float stepTime, float substepTime, int steps, float timeLeft) + public override JobHandle Evaluate(JobHandle inputDeps, float stepTime, float substepTime, int substeps) { + if (!((BurstSolverImpl)constraints.solver).colliderContacts.IsCreated) + return inputDeps; + var projectConstraints = new FrictionConstraintsBatchJob() { positions = solverImplementation.positions, @@ -30,7 +33,7 @@ namespace Obi prevOrientations = solverImplementation.prevOrientations, invMasses = solverImplementation.invMasses, - invRotationalMasses = solverImplementation.invRotationalMasses, + invInertiaTensors = solverImplementation.invInertiaTensors, radii = solverImplementation.principalRadii, particleMaterialIndices = solverImplementation.collisionMaterials, @@ -49,10 +52,9 @@ namespace Obi orientationDeltas = solverImplementation.orientationDeltas, orientationCounts = solverImplementation.orientationConstraintCounts, - contacts = ((BurstSolverImpl)constraints.solver).abstraction.colliderContacts.AsNativeArray(), - effectiveMasses = ((BurstSolverImpl)constraints.solver).abstraction.contactEffectiveMasses.AsNativeArray(), + contacts = ((BurstSolverImpl)constraints.solver).colliderContacts, inertialFrame = ((BurstSolverImpl)constraints.solver).inertialFrame, - steps = steps, + substeps = substeps, stepTime = stepTime, substepTime = substepTime }; @@ -61,11 +63,14 @@ namespace Obi public override JobHandle Apply(JobHandle inputDeps, float substepTime) { + if (!((BurstSolverImpl)constraints.solver).colliderContacts.IsCreated) + return inputDeps; + var parameters = solverAbstraction.GetConstraintParameters(m_ConstraintType); var applyConstraints = new ApplyCollisionConstraintsBatchJob() { - contacts = ((BurstSolverImpl)constraints.solver).abstraction.colliderContacts.AsNativeArray(), + contacts = ((BurstSolverImpl)constraints.solver).colliderContacts, simplices = solverImplementation.simplices, simplexCounts = solverImplementation.simplexCounts, @@ -91,7 +96,7 @@ namespace Obi [ReadOnly] public NativeArray prevOrientations; [ReadOnly] public NativeArray invMasses; - [ReadOnly] public NativeArray invRotationalMasses; + [ReadOnly] public NativeArray invInertiaTensors; [ReadOnly] public NativeArray radii; [ReadOnly] public NativeArray particleMaterialIndices; @@ -113,11 +118,10 @@ namespace Obi [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray orientationCounts; public NativeArray contacts; - [ReadOnly] public NativeArray effectiveMasses; [ReadOnly] public BurstInertialFrame inertialFrame; [ReadOnly] public float stepTime; [ReadOnly] public float substepTime; - [ReadOnly] public int steps; + [ReadOnly] public int substeps; public void Execute() { @@ -130,7 +134,7 @@ namespace Obi int colliderIndex = contact.bodyB; // Skip contacts involving triggers: - if (shapes[colliderIndex].isTrigger) + if (shapes[colliderIndex].flags > 0) continue; // Get the rigidbody index (might be < 0, in that case there's no rigidbody present) @@ -145,9 +149,9 @@ namespace Obi float4 prevPositionA = float4.zero; float4 linearVelocityA = float4.zero; float4 angularVelocityA = float4.zero; - float invRotationalMassA = 0; + float4 invInertiaTensorA = float4.zero; quaternion orientationA = new quaternion(0, 0, 0, 0); - float4 simplexRadiiA = float4.zero; + float simplexRadiusA = 0; for (int j = 0; j < simplexSize; ++j) { @@ -155,17 +159,17 @@ namespace Obi prevPositionA += prevPositions[particleIndex] * contact.pointA[j]; linearVelocityA += BurstIntegration.DifferentiateLinear(positions[particleIndex],prevPositions[particleIndex], substepTime) * contact.pointA[j]; angularVelocityA += BurstIntegration.DifferentiateAngular(orientations[particleIndex], prevOrientations[particleIndex], substepTime) * contact.pointA[j]; - invRotationalMassA += invRotationalMasses[particleIndex] * contact.pointA[j]; + invInertiaTensorA += invInertiaTensors[particleIndex] * contact.pointA[j]; orientationA.value += orientations[particleIndex].value * contact.pointA[j]; - simplexRadiiA += radii[particleIndex] * contact.pointA[j]; + simplexRadiusA += BurstMath.EllipsoidRadius(contact.normal, prevOrientations[particleIndex], radii[particleIndex].xyz) * contact.pointA[j]; } - + float4 relativeVelocity = linearVelocityA; // Add particle angular velocity if rolling contacts are enabled: if (material.rollingContacts > 0) { - rA = -contact.normal * BurstMath.EllipsoidRadius(contact.normal, orientationA, simplexRadiiA.xyz); + rA = -contact.normal * simplexRadiusA; relativeVelocity += new float4(math.cross(angularVelocityA.xyz, rA.xyz), 0); } @@ -174,11 +178,11 @@ namespace Obi { // Note: unlike rA, that is expressed in solver space, rB is expressed in world space. rB = inertialFrame.frame.TransformPoint(contact.pointB) - rigidbodies[rigidbodyIndex].com; - relativeVelocity -= BurstMath.GetRigidbodyVelocityAtPoint(rigidbodyIndex, contact.pointB, rigidbodies, rigidbodyLinearDeltas, rigidbodyAngularDeltas, inertialFrame); + relativeVelocity -= BurstMath.GetRigidbodyVelocityAtPoint(rigidbodyIndex, contact.pointB, rigidbodies, rigidbodyLinearDeltas, rigidbodyAngularDeltas, inertialFrame.frame); } // Determine impulse magnitude: - float2 impulses = contact.SolveFriction(effectiveMasses[i].TotalTangentInvMass, effectiveMasses[i].TotalBitangentInvMass, relativeVelocity, material.staticFriction, material.dynamicFriction, stepTime); + float2 impulses = contact.SolveFriction(relativeVelocity, material.staticFriction, material.dynamicFriction, stepTime); if (math.abs(impulses.x) > BurstMath.epsilon || math.abs(impulses.y) > BurstMath.epsilon) { @@ -190,7 +194,8 @@ namespace Obi for (int j = 0; j < simplexSize; ++j) { int particleIndex = simplices[simplexStart + j]; - deltas[particleIndex] += (tangentImpulse * effectiveMasses[i].tangentInvMassA + bitangentImpulse * effectiveMasses[i].bitangentInvMassA) * substepTime * contact.pointA[j] * baryScale; + //(tangentImpulse * contact.tangentInvMassA + bitangentImpulse * contact.bitangentInvMassA) * dt; + deltas[particleIndex] += (tangentImpulse * contact.tangentInvMassA + bitangentImpulse * contact.bitangentInvMassA) * substepTime * contact.pointA[j] * baryScale; counts[particleIndex]++; } @@ -203,8 +208,7 @@ namespace Obi if (material.rollingContacts > 0) { // Calculate angular velocity deltas due to friction impulse: - float4 invInertiaTensor = math.rcp(BurstMath.GetParticleInertiaTensor(simplexRadiiA, invRotationalMassA) + new float4(BurstMath.epsilon)); - float4x4 solverInertiaA = BurstMath.TransformInertiaTensor(invInertiaTensor, orientationA); + float4x4 solverInertiaA = BurstMath.TransformInertiaTensor(invInertiaTensorA, orientationA); float4 angVelDeltaA = math.mul(solverInertiaA, new float4(math.cross(rA.xyz, totalImpulse.xyz), 0)); float4 angVelDeltaB = float4.zero; diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Density/BurstDensityConstraints.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Density/BurstDensityConstraints.cs index 5110160a2..602e3b3f1 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Density/BurstDensityConstraints.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Density/BurstDensityConstraints.cs @@ -1,8 +1,9 @@ #if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) +using System; +using Unity.Jobs; using Unity.Burst; using Unity.Collections; using Unity.Collections.LowLevel.Unsafe; -using Unity.Jobs; using Unity.Mathematics; namespace Obi @@ -11,6 +12,10 @@ namespace Obi { public NativeList fluidParticles; + public NativeArray eta; + public NativeArray smoothPositions; + public NativeArray anisotropies; + public BurstDensityConstraints(BurstSolverImpl solver) : base(solver, Oni.ConstraintType.Density) { fluidParticles = new NativeList(Allocator.Persistent); @@ -34,12 +39,12 @@ namespace Obi batch.Destroy(); } - protected override JobHandle EvaluateSequential(JobHandle inputDeps, float stepTime, float substepTime, int steps, float timeLeft) + protected override JobHandle EvaluateSequential(JobHandle inputDeps, float stepTime, float substepTime, int substeps) { - return EvaluateParallel(inputDeps, stepTime, substepTime, steps, timeLeft); + return EvaluateParallel(inputDeps, stepTime, substepTime, substeps); } - protected override JobHandle EvaluateParallel(JobHandle inputDeps, float stepTime, float substepTime, int steps, float timeLeft) + protected override JobHandle EvaluateParallel(JobHandle inputDeps, float stepTime, float substepTime, int substeps) { inputDeps = UpdateInteractions(inputDeps); @@ -48,41 +53,15 @@ namespace Obi { if (batches[i].enabled) { - inputDeps = batches[i].Evaluate(inputDeps, stepTime, substepTime, steps, timeLeft); + inputDeps = batches[i].Evaluate(inputDeps, stepTime, substepTime, substeps); m_Solver.ScheduleBatchedJobsIfNeeded(); } } - // calculate per-particle density lambdas: + // calculate per-particle lambdas: inputDeps = CalculateLambdas(inputDeps, substepTime); - // calculate viscosity/vorticity: - for (int i = 0; i < batches.Count; ++i) - { - if (batches[i].enabled) - { - inputDeps = batches[i].ViscosityAndVorticity(inputDeps); - m_Solver.ScheduleBatchedJobsIfNeeded(); - } - } - - // apply viscosity/vorticity positional deltas: - var app = new ApplyPositionDeltasJob() - { - fluidParticles = fluidParticles, - positions = m_Solver.positions, - deltas = m_Solver.positionDeltas, - counts = m_Solver.positionConstraintCounts, - anisotropies = m_Solver.anisotropies, - normals = m_Solver.normals, - fluidData = m_Solver.fluidData, - matchingRotations = m_Solver.orientationDeltas, - linearFromAngular = m_Solver.restPositions, - }; - - inputDeps = app.Schedule(fluidParticles.Length, 64, inputDeps); - - // apply density positional deltas: + // then apply them: for (int i = 0; i < batches.Count; ++i) { if (batches[i].enabled) @@ -95,23 +74,29 @@ namespace Obi return inputDeps; } - public JobHandle CalculateVelocityCorrections(JobHandle inputDeps, float deltaTime) + public JobHandle ApplyVelocityCorrections(JobHandle inputDeps, float deltaTime) { + eta = new NativeArray(((BurstSolverImpl)solver).particleCount, Allocator.TempJob); + for (int i = 0; i < batches.Count; ++i) { if (batches[i].enabled) { - inputDeps = batches[i].CalculateNormals(inputDeps, deltaTime); + inputDeps = batches[i].CalculateViscosityAndNormals(inputDeps, deltaTime); m_Solver.ScheduleBatchedJobsIfNeeded(); } } - return inputDeps; - } + for (int i = 0; i < batches.Count; ++i) + { + if (batches[i].enabled) + { + inputDeps = batches[i].CalculateVorticity(inputDeps); + m_Solver.ScheduleBatchedJobsIfNeeded(); + } + } - public JobHandle ApplyVelocityCorrections(JobHandle inputDeps, float deltaTime) - { - inputDeps = ApplyAtmosphere(inputDeps, deltaTime); + inputDeps = ApplyVorticityAndAtmosphere(inputDeps, deltaTime); m_Solver.ScheduleBatchedJobsIfNeeded(); return inputDeps; @@ -121,7 +106,10 @@ namespace Obi { // if the constraints are deactivated or we need no anisotropy: if (((BurstSolverImpl)solver).abstraction.parameters.maxAnisotropy <= 1) - return inputDeps; + return IdentityAnisotropy(inputDeps); + + smoothPositions = new NativeArray(((BurstSolverImpl)solver).particleCount, Allocator.TempJob); + anisotropies = new NativeArray(((BurstSolverImpl)solver).particleCount, Allocator.TempJob); for (int i = 0; i < batches.Count; ++i) { @@ -151,11 +139,8 @@ namespace Obi // clear existing fluid data: var clearData = new ClearFluidDataJob() { - fluidParticles = fluidParticles, - fluidData = m_Solver.fluidData, - massCenters = m_Solver.normals, - prevMassCenters = m_Solver.renderablePositions, - moments = m_Solver.anisotropies + fluidParticles = fluidParticles.AsDeferredJobArray(), + fluidData = ((BurstSolverImpl)solver).abstraction.fluidData.AsNativeArray(), }; inputDeps = clearData.Schedule(fluidParticles.Length, 64, inputDeps); @@ -165,7 +150,7 @@ namespace Obi { pairs = m_Solver.fluidInteractions, positions = m_Solver.positions, - fluidMaterials = m_Solver.fluidMaterials, + radii = m_Solver.smoothingRadii, densityKernel = new Poly6Kernel(((BurstSolverImpl)solver).abstraction.parameters.mode == Oni.SolverParameters.Mode.Mode2D), gradientKernel = new SpikyKernel(((BurstSolverImpl)solver).abstraction.parameters.mode == Oni.SolverParameters.Mode.Mode2D), }; @@ -176,65 +161,64 @@ namespace Obi private JobHandle CalculateLambdas(JobHandle inputDeps, float deltaTime) { // calculate lagrange multipliers: - var calculateLambdas = new CalculateLambdasJob + var calculateLambdas = new CalculateLambdasJob() { - fluidParticles = fluidParticles, - positions = m_Solver.positions, - prevPositions = m_Solver.prevPositions, - matchingRotations = m_Solver.restPositions.Reinterpret(), - principalRadii = m_Solver.principalRadii, - fluidMaterials = m_Solver.fluidMaterials, + fluidParticles = fluidParticles.AsDeferredJobArray(), + invMasses = m_Solver.invMasses, + radii = m_Solver.smoothingRadii, + restDensities = m_Solver.restDensities, + surfaceTension = m_Solver.surfaceTension, densityKernel = new Poly6Kernel(m_Solver.abstraction.parameters.mode == Oni.SolverParameters.Mode.Mode2D), gradientKernel = new SpikyKernel(m_Solver.abstraction.parameters.mode == Oni.SolverParameters.Mode.Mode2D), - fluidData = m_Solver.fluidData, - - massCenters = m_Solver.normals, - prevMassCenters = m_Solver.renderablePositions, - moments = m_Solver.anisotropies, - - deltas = m_Solver.positionDeltas, - counts = m_Solver.positionConstraintCounts, - - solverParams = m_Solver.abstraction.parameters + normals = m_Solver.normals, + vorticity = m_Solver.vorticities, + fluidData = m_Solver.fluidData }; return calculateLambdas.Schedule(fluidParticles.Length,64,inputDeps); } - private JobHandle ApplyAtmosphere(JobHandle inputDeps, float deltaTime) + private JobHandle ApplyVorticityAndAtmosphere(JobHandle inputDeps, float deltaTime) { - var conf = new ApplyAtmosphereJob + // calculate lagrange multipliers: + var conf = new ApplyVorticityConfinementAndAtmosphere() { - fluidParticles = fluidParticles, + fluidParticles = fluidParticles.AsDeferredJobArray(), wind = m_Solver.wind, - fluidInterface = m_Solver.fluidInterface, - fluidMaterials2 = m_Solver.fluidMaterials2, - principalRadii = m_Solver.principalRadii, + vorticities = m_Solver.vorticities, + eta = eta, + atmosphericDrag = m_Solver.athmosphericDrag, + atmosphericPressure = m_Solver.athmosphericPressure, + vorticityConfinement = m_Solver.vortConfinement, + restDensities = m_Solver.restDensities, normals = m_Solver.normals, fluidData = m_Solver.fluidData, velocities = m_Solver.velocities, - angularVelocities = m_Solver.angularVelocities, - vorticity = m_Solver.restOrientations.Reinterpret(), - vorticityAccelerations = m_Solver.orientationDeltas.Reinterpret(), - linearAccelerations = m_Solver.positionDeltas, - linearFromAngular = m_Solver.restPositions, - angularDiffusion = m_Solver.anisotropies, - positions = m_Solver.positions, - prevPositions = m_Solver.prevPositions, - dt = deltaTime, - solverParams = m_Solver.abstraction.parameters + dt = deltaTime }; return conf.Schedule(fluidParticles.Length, 64, inputDeps); } + private JobHandle IdentityAnisotropy(JobHandle inputDeps) + { + var idAnisotropy = new IdentityAnisotropyJob() + { + fluidParticles = fluidParticles.AsDeferredJobArray(), + principalAxes = m_Solver.anisotropies, + radii = m_Solver.principalRadii + }; + + return idAnisotropy.Schedule(fluidParticles.Length, 64, inputDeps); + } + private JobHandle AverageSmoothPositions(JobHandle inputDeps) { var average = new AverageSmoothPositionsJob() { - fluidParticles = fluidParticles, + fluidParticles = fluidParticles.AsDeferredJobArray(), renderablePositions = m_Solver.renderablePositions, - anisotropies = m_Solver.anisotropies + smoothPositions = smoothPositions }; return average.Schedule(fluidParticles.Length, 64, inputDeps); @@ -244,16 +228,13 @@ namespace Obi { var average = new AverageAnisotropyJob() { - fluidParticles = fluidParticles, + fluidParticles = fluidParticles.AsDeferredJobArray(), renderablePositions = m_Solver.renderablePositions, - renderableOrientations = m_Solver.renderableOrientations, + smoothPositions = smoothPositions, principalRadii = m_Solver.principalRadii, - anisotropies = m_Solver.anisotropies, + anisotropies = anisotropies, maxAnisotropy = m_Solver.abstraction.parameters.maxAnisotropy, - renderableRadii = m_Solver.renderableRadii, - fluidData = m_Solver.fluidData, - life = m_Solver.life, - solverParams = m_Solver.abstraction.parameters + principalAxes = m_Solver.anisotropies }; return average.Schedule(fluidParticles.Length, 64, inputDeps); @@ -262,19 +243,12 @@ namespace Obi [BurstCompile] public struct ClearFluidDataJob : IJobParallelFor { - [ReadOnly] public NativeList fluidParticles; + [ReadOnly] public NativeArray fluidParticles; [NativeDisableContainerSafetyRestriction][NativeDisableParallelForRestriction] public NativeArray fluidData; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray massCenters; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray prevMassCenters; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray moments; public void Execute(int i) { - int p = fluidParticles[i]; - fluidData[p] = float4.zero; - massCenters[p] = float4.zero; - prevMassCenters[p] = float4.zero; - moments[p] = float4x4.zero; + fluidData[fluidParticles[i]] = float4.zero; } } @@ -282,7 +256,7 @@ namespace Obi public struct UpdateInteractionsJob : IJobParallelFor { [ReadOnly] public NativeArray positions; - [ReadOnly] public NativeArray fluidMaterials; + [ReadOnly] public NativeArray radii; [ReadOnly] public Poly6Kernel densityKernel; [ReadOnly] public SpikyKernel gradientKernel; @@ -295,16 +269,16 @@ namespace Obi var pair = pairs[i]; // calculate normalized gradient vector: - pair.gradient = new float4((positions[pair.particleA] - positions[pair.particleB]).xyz,0); + pair.gradient = (positions[pair.particleA] - positions[pair.particleB]); float distance = math.length(pair.gradient); pair.gradient /= distance + math.FLT_MIN_NORMAL; // calculate and store average density and gradient kernels: - pair.avgKernel = (densityKernel.W(distance, fluidMaterials[pair.particleA].x) + - densityKernel.W(distance, fluidMaterials[pair.particleB].x)) * 0.5f; + pair.avgKernel = (densityKernel.W(distance, radii[pair.particleA]) + + densityKernel.W(distance, radii[pair.particleB])) * 0.5f; - pair.avgGradient = (gradientKernel.W(distance, fluidMaterials[pair.particleA].x) + - gradientKernel.W(distance, fluidMaterials[pair.particleB].x)) * 0.5f; + pair.avgGradient = (gradientKernel.W(distance, radii[pair.particleA]) + + gradientKernel.W(distance, radii[pair.particleB])) * 0.5f; pairs[i] = pair; } @@ -313,239 +287,164 @@ namespace Obi [BurstCompile] public struct CalculateLambdasJob : IJobParallelFor { - [ReadOnly] public NativeList fluidParticles; - [ReadOnly] public NativeArray positions; - [ReadOnly] public NativeArray prevPositions; - [ReadOnly] public NativeArray principalRadii; - [ReadOnly] public NativeArray fluidMaterials; + [ReadOnly] public NativeArray fluidParticles; + [ReadOnly] public NativeArray invMasses; + [ReadOnly] public NativeArray radii; + [ReadOnly] public NativeArray restDensities; + [ReadOnly] public NativeArray surfaceTension; [ReadOnly] public Poly6Kernel densityKernel; - [ReadOnly] public SpikyKernel gradientKernel; - - [ReadOnly] public Oni.SolverParameters solverParams; + [ReadOnly] public SpikyKernel gradientKernel; + [NativeDisableContainerSafetyRestriction][NativeDisableParallelForRestriction] public NativeArray normals; + [NativeDisableContainerSafetyRestriction][NativeDisableParallelForRestriction] public NativeArray vorticity; [NativeDisableContainerSafetyRestriction][NativeDisableParallelForRestriction] public NativeArray fluidData; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray massCenters; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray prevMassCenters; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray moments; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray matchingRotations; - - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray deltas; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray counts; - public void Execute(int p) { int i = fluidParticles[p]; - float restVolume = math.pow(principalRadii[i].x * 2, 3 - (int)solverParams.mode); - float4 data = fluidData[i]; - - float grad = restVolume * gradientKernel.W(0, fluidMaterials[i].x); - - // self particle contribution to density, gradient and mass centers: - data += new float4(densityKernel.W(0, fluidMaterials[i].x), 0, grad, grad * grad + data[2] * data[2]); - massCenters[i] += new float4(positions[i].xyz, 1) / positions[i].w; - prevMassCenters[i] += new float4(prevPositions[i].xyz, 1) / positions[i].w; - - // usually, we'd weight density by mass (density contrast formulation) by dividing by invMass. Then, multiply by invMass when - // calculating the state equation (density / restDensity - 1, restDensity = mass / volume, so density * invMass * restVolume - 1 - // We end up with density / invMass * invMass * restVolume - 1, invMass cancels out. - float constraint = math.max(0, data[0] * restVolume - 1) * fluidMaterials[i].w; - - // calculate lambda: - data[1] = -constraint / (positions[i].w * data[3] + math.FLT_MIN_NORMAL); - - fluidData[i] = data; - - // get total neighborhood mass: - float M = massCenters[i][3]; - massCenters[i] /= massCenters[i][3]; - prevMassCenters[i] /= prevMassCenters[i][3]; - - // update moments: - moments[i] += (BurstMath.multrnsp4(positions[i], prevPositions[i]) + float4x4.identity * math.pow(principalRadii[i].x, 2) * 0.001f) / positions[i].w; - moments[i] -= M * BurstMath.multrnsp4(massCenters[i], prevMassCenters[i]); - - // extract neighborhood orientation delta: - matchingRotations[i] = BurstMath.ExtractRotation(moments[i], quaternion.identity, 5); - - // viscosity and vorticity: - float4 viscGoal = new float4(massCenters[i].xyz + math.rotate(matchingRotations[i], (prevPositions[i] - prevMassCenters[i]).xyz), 0); - deltas[i] += (viscGoal - positions[i]) * fluidMaterials[i].z; - - counts[i]++; - } - } - - [BurstCompile] - public struct ApplyPositionDeltasJob : IJobParallelFor - { - [ReadOnly] public NativeList fluidParticles; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray positions; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray deltas; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray counts; - - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray normals; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray anisotropies; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray matchingRotations; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray linearFromAngular; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray fluidData; - - public void Execute(int p) - { - int i = fluidParticles[p]; - - if (counts[i] > 0) - { - positions[i] += new float4(deltas[i].xyz,0) / counts[i]; - deltas[i] = float4.zero; - counts[i] = 0; - } - normals[i] = float4.zero; - anisotropies[i] = float4x4.zero; - linearFromAngular[i] = float4.zero; - matchingRotations[i] = new quaternion(0, 0, 0, 0); + vorticity[i] = float4.zero; - // zero out fluidData.z in preparation to accumulate relative velocity. float4 data = fluidData[i]; - data.z = 0; + + float grad = gradientKernel.W(0, radii[i]) / invMasses[i] / restDensities[i]; + + // self particle contribution to density and gradient: + data += new float4(densityKernel.W(0, radii[i]), 0, grad, grad * grad + data[2] * data[2]); + + // weight by mass: + data[0] /= invMasses[i]; + + // evaluate density constraint (clamp pressure): + float constraint = math.max(-0.5f * surfaceTension[i], data[0] / restDensities[i] - 1); + + // calculate lambda: + data[1] = -constraint / (invMasses[i] * data[3] + math.FLT_MIN_NORMAL); + fluidData[i] = data; } } [BurstCompile] - public struct ApplyAtmosphereJob : IJobParallelFor + public struct ApplyVorticityConfinementAndAtmosphere : IJobParallelFor { - [ReadOnly] public NativeList fluidParticles; + [ReadOnly] public NativeArray fluidParticles; [ReadOnly] public NativeArray wind; - [ReadOnly] public NativeArray fluidInterface; - [ReadOnly] public NativeArray fluidMaterials2; - [ReadOnly] public NativeArray principalRadii; + [ReadOnly] public NativeArray vorticities; + [ReadOnly] public NativeArray atmosphericDrag; + [ReadOnly] public NativeArray atmosphericPressure; + [ReadOnly] public NativeArray vorticityConfinement; + [ReadOnly] public NativeArray restDensities; [ReadOnly] public NativeArray normals; [ReadOnly] public NativeArray fluidData; - [ReadOnly] public NativeArray linearFromAngular; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray positions; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray prevPositions; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray linearAccelerations; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray vorticityAccelerations; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray vorticity; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray angularDiffusion; + [DeallocateOnJobCompletion] [ReadOnly] public NativeArray eta; - [NativeDisableContainerSafetyRestriction][NativeDisableParallelForRestriction] public NativeArray angularVelocities; [NativeDisableContainerSafetyRestriction][NativeDisableParallelForRestriction] public NativeArray velocities; [ReadOnly] public float dt; - [ReadOnly] public Oni.SolverParameters solverParams; public void Execute(int p) { int i = fluidParticles[p]; - float restVolume = math.pow(principalRadii[i].x * 2, 3 - (int)solverParams.mode); - //atmospheric drag: float4 velocityDiff = velocities[i] - wind[i]; // particles near the surface should experience drag: - velocities[i] -= fluidInterface[i].x * velocityDiff * math.max(0, 1 - fluidData[i][0] * restVolume) * dt; + velocities[i] -= atmosphericDrag[i] * velocityDiff * math.max(0, 1 - fluidData[i][0] / restDensities[i]) * dt; // ambient pressure: - velocities[i] += fluidInterface[i].y * normals[i] * dt; + velocities[i] += atmosphericPressure[i] * normals[i] * dt; - // angular accel due to baroclinity: - angularVelocities[i] += new float4(fluidMaterials2[i].z * math.cross(-normals[i].xyz, -velocityDiff.xyz), 0) * dt; - angularVelocities[i] -= fluidMaterials2[i].w * angularDiffusion[i].c0; + // apply vorticity confinement: + velocities[i] += new float4(math.cross(math.normalizesafe(eta[i]).xyz,vorticities[i].xyz), 0) * vorticityConfinement[i] * dt; + } + } - // micropolar vorticity: - velocities[i] += fluidMaterials2[i].x * linearAccelerations[i] * dt; - vorticity[i] += fluidMaterials2[i].x * (vorticityAccelerations[i] * 0.5f - vorticity[i]) * dt; - vorticity[i] -= fluidMaterials2[i].y * angularDiffusion[i].c1; + [BurstCompile] + public struct IdentityAnisotropyJob : IJobParallelFor + { + [ReadOnly] public NativeArray fluidParticles; + [ReadOnly] public NativeArray radii; - linearAccelerations[i] = float4.zero; - vorticityAccelerations[i] = float4.zero; - angularDiffusion[i] = float4x4.zero; + [NativeDisableContainerSafetyRestriction][NativeDisableParallelForRestriction] public NativeArray principalAxes; - // we want to add together linear and angular velocity fields and use result to advect particles without modifying either field: - positions[i] += new float4(linearFromAngular[i].xyz * dt,0); - prevPositions[i] += new float4(linearFromAngular[i].xyz * dt, 0); + public void Execute(int p) + { + int i = fluidParticles[p]; + + // align the principal axes of the particle with the solver axes: + principalAxes[i * 3] = new float4(1,0,0,radii[i].x); + principalAxes[i * 3 + 1] = new float4(0,1,0,radii[i].x); + principalAxes[i * 3 + 2] = new float4(0,0,1,radii[i].x); } } [BurstCompile] public struct AverageSmoothPositionsJob : IJobParallelFor { - [ReadOnly] public NativeList fluidParticles; + [ReadOnly] public NativeArray fluidParticles; [ReadOnly] public NativeArray renderablePositions; - [NativeDisableContainerSafetyRestriction][NativeDisableParallelForRestriction] public NativeArray anisotropies; + [NativeDisableContainerSafetyRestriction][NativeDisableParallelForRestriction] public NativeArray smoothPositions; public void Execute(int p) { int i = fluidParticles[p]; - var smoothPos = anisotropies[i]; - - if (smoothPos.c3.w > 0) - smoothPos.c3 /= smoothPos.c3.w; + if (smoothPositions[i].w > 0) + smoothPositions[i] /= smoothPositions[i].w; else - smoothPos.c3.xyz = renderablePositions[i].xyz; - - anisotropies[i] = smoothPos; + smoothPositions[i] = renderablePositions[i]; } } [BurstCompile] public struct AverageAnisotropyJob : IJobParallelFor { - [ReadOnly] public NativeList fluidParticles; + [ReadOnly] public NativeArray fluidParticles; [ReadOnly] public NativeArray principalRadii; [ReadOnly] public float maxAnisotropy; - [ReadOnly] public NativeArray anisotropies; - [ReadOnly] public NativeArray life; - [NativeDisableContainerSafetyRestriction][NativeDisableParallelForRestriction] public NativeArray fluidData; + [ReadOnly] + [DeallocateOnJobCompletion] + public NativeArray smoothPositions; + + [ReadOnly] + [DeallocateOnJobCompletion] + public NativeArray anisotropies; + [NativeDisableContainerSafetyRestriction][NativeDisableParallelForRestriction] public NativeArray renderablePositions; - [NativeDisableContainerSafetyRestriction][NativeDisableParallelForRestriction] public NativeArray renderableOrientations; - [NativeDisableContainerSafetyRestriction][NativeDisableParallelForRestriction] public NativeArray renderableRadii; - - [ReadOnly] public Oni.SolverParameters solverParams; + [NativeDisableContainerSafetyRestriction][NativeDisableParallelForRestriction] public NativeArray principalAxes; public void Execute(int p) { int i = fluidParticles[p]; - if (anisotropies[i].c3.w > 0 && (anisotropies[i].c0[0] + anisotropies[i].c1[1] + anisotropies[i].c2[2]) > 0.01f) + if (smoothPositions[i].w > 0 && (anisotropies[i].c0[0] + anisotropies[i].c1[1] + anisotropies[i].c2[2]) > 0.01f) { float3 singularValues; float3x3 u; - BurstMath.EigenSolve(math.float3x3(anisotropies[i] / anisotropies[i].c3.w), out singularValues, out u); + BurstMath.EigenSolve(anisotropies[i] / smoothPositions[i].w, out singularValues, out u); float max = singularValues[0]; float3 s = math.max(singularValues,new float3(max / maxAnisotropy)) / max * principalRadii[i].x; - renderableOrientations[i] = quaternion.LookRotationSafe(u.c2,u.c1); - renderableRadii[i] = new float4(s.xyz,1); + principalAxes[i * 3] = new float4(u.c0, s.x); + principalAxes[i * 3 + 1] = new float4(u.c1, s.y); + principalAxes[i * 3 + 2] = new float4(u.c2, s.z); } else { float radius = principalRadii[i].x / maxAnisotropy; - renderableOrientations[i] = quaternion.identity; - renderableRadii[i] = new float4(radius,radius,radius,1); - - float4 data = fluidData[i]; - data.x = 1 / math.pow(math.abs(radius * 2), 3 - (int)solverParams.mode); // normal volume of an isolated particle. - fluidData[i] = data; + principalAxes[i * 3] = new float4(1, 0, 0, radius); + principalAxes[i * 3 + 1] = new float4(0, 1, 0, radius); + principalAxes[i * 3 + 2] = new float4(0, 0, 1, radius); } - renderablePositions[i] = math.lerp(renderablePositions[i], anisotropies[i].c3, math.min((maxAnisotropy - 1)/3.0f,1)); - - // inactive particles have radii.w == 0, set it right away for particles killed during this frame - // to keep them from being rendered during this frame instead of waiting to do it at the start of next sim step: - float4 radii = renderableRadii[i]; - radii.w = life[i] <= 0 ? 0 : radii.w; - renderableRadii[i] = radii; + renderablePositions[i] = smoothPositions[i]; } } } diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Density/BurstDensityConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Density/BurstDensityConstraintsBatch.cs index c37438008..c44762137 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Density/BurstDensityConstraintsBatch.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Density/BurstDensityConstraintsBatch.cs @@ -1,9 +1,11 @@ #if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) +using UnityEngine; using Unity.Jobs; using Unity.Collections; using Unity.Collections.LowLevel.Unsafe; using Unity.Mathematics; using Unity.Burst; +using System.Collections; namespace Obi { @@ -17,12 +19,12 @@ namespace Obi m_ConstraintType = Oni.ConstraintType.Density; } - public override JobHandle Initialize(JobHandle inputDeps, float stepTime, float substepTime, int steps, float timeLeft) + public override JobHandle Initialize(JobHandle inputDeps, float substepTime) { return inputDeps; } - public override JobHandle Evaluate(JobHandle inputDeps, float stepTime, float substepTime, int steps, float timeLeft) + public override JobHandle Evaluate(JobHandle inputDeps, float stepTime, float substepTime, int substeps) { // update densities and gradients: @@ -30,16 +32,13 @@ namespace Obi { pairs = ((BurstSolverImpl)constraints.solver).fluidInteractions, positions = solverImplementation.positions, - prevPositions = solverImplementation.prevPositions, - principalRadii = solverImplementation.principalRadii, - fluidMaterials = solverImplementation.fluidMaterials, + invMasses = solverImplementation.invMasses, + restDensities = solverImplementation.restDensities, + diffusion = solverImplementation.diffusion, + userData = solverImplementation.userData, fluidData = solverImplementation.fluidData, - moments = solverImplementation.anisotropies, - massCenters = solverImplementation.normals, - prevMassCenters = solverImplementation.renderablePositions, - densityKernel = new Poly6Kernel(solverAbstraction.parameters.mode == Oni.SolverParameters.Mode.Mode2D), batchData = batchData, - solverParams = solverAbstraction.parameters + dt = substepTime }; int batchCount = batchData.isLast ? batchData.workItemCount : 1; @@ -53,14 +52,15 @@ namespace Obi // update densities and gradients: var apply = new ApplyDensityConstraintsJob() { - principalRadii = solverImplementation.principalRadii, - fluidMaterials = solverImplementation.fluidMaterials, + invMasses = solverImplementation.invMasses, + radii = solverImplementation.smoothingRadii, + restDensities = solverImplementation.restDensities, + surfaceTension = solverImplementation.surfaceTension, pairs = ((BurstSolverImpl)constraints.solver).fluidInteractions, densityKernel = new Poly6Kernel(solverAbstraction.parameters.mode == Oni.SolverParameters.Mode.Mode2D), positions = solverImplementation.positions, fluidData = solverImplementation.fluidData, batchData = batchData, - solverParams = solverAbstraction.parameters, sorFactor = parameters.SORFactor }; @@ -68,54 +68,36 @@ namespace Obi return apply.Schedule(batchData.workItemCount, batchCount, inputDeps); } - public JobHandle CalculateNormals(JobHandle inputDeps, float deltaTime) + public JobHandle CalculateViscosityAndNormals(JobHandle inputDeps, float deltaTime) { - int batchCount = batchData.isLast ? batchData.workItemCount : 1; - - var vorticity = new NormalsJob() + var viscosity = new NormalsViscosityAndVorticityJob() { - invMasses = solverImplementation.invMasses, positions = solverImplementation.positions, - principalRadii = solverImplementation.principalRadii, - fluidMaterials = solverImplementation.fluidMaterials, - fluidMaterials2 = solverImplementation.fluidMaterials2, + invMasses = solverImplementation.invMasses, + radii = solverImplementation.smoothingRadii, + restDensities = solverImplementation.restDensities, + viscosities = solverImplementation.viscosities, fluidData = solverImplementation.fluidData, - fluidInterface = solverImplementation.fluidInterface, - velocities = solverImplementation.velocities, - angularVelocities = solverImplementation.angularVelocities, - - vorticityAccelerations = solverImplementation.orientationDeltas.Reinterpret(), - vorticity = solverImplementation.restOrientations.Reinterpret(), - linearAccelerations = solverImplementation.positionDeltas, - linearFromAngular = solverImplementation.restPositions, - angularDiffusion = solverImplementation.anisotropies, - - userData = solverImplementation.userData, pairs = ((BurstSolverImpl)constraints.solver).fluidInteractions, + velocities = solverImplementation.velocities, + vorticities = solverImplementation.vorticities, normals = solverImplementation.normals, - densityKernel = new Poly6Kernel(solverAbstraction.parameters.mode == Oni.SolverParameters.Mode.Mode2D), - gradKernel = new SpikyKernel(solverAbstraction.parameters.mode == Oni.SolverParameters.Mode.Mode2D), - solverParams = solverAbstraction.parameters, - batchData = batchData, - dt = deltaTime, + batchData = batchData }; - return vorticity.Schedule(batchData.workItemCount, batchCount, inputDeps); + int batchCount = batchData.isLast ? batchData.workItemCount : 1; + return viscosity.Schedule(batchData.workItemCount, batchCount, inputDeps); } - public JobHandle ViscosityAndVorticity(JobHandle inputDeps) + public JobHandle CalculateVorticity(JobHandle inputDeps) { - var eta = new ViscosityVorticityJob() + var eta = new CalculateVorticityEta() { - positions = solverImplementation.positions, - prevPositions = solverImplementation.prevPositions, - matchingRotations = solverImplementation.restPositions.Reinterpret(), + invMasses = solverImplementation.invMasses, + restDensities = solverImplementation.restDensities, pairs = ((BurstSolverImpl)constraints.solver).fluidInteractions, - massCenters = solverImplementation.normals, - prevMassCenters = solverImplementation.renderablePositions, - fluidParams = solverImplementation.fluidMaterials, - deltas = solverImplementation.positionDeltas, - counts = solverImplementation.positionConstraintCounts, + vorticities = solverImplementation.vorticities, + eta = ((BurstDensityConstraints)this.constraints).eta, batchData = batchData }; @@ -128,8 +110,8 @@ namespace Obi var accumulateSmooth = new AccumulateSmoothPositionsJob() { renderablePositions = solverImplementation.renderablePositions, - anisotropies = solverImplementation.anisotropies, - fluidMaterials = solverImplementation.fluidMaterials, + smoothPositions = ((BurstDensityConstraints)this.constraints).smoothPositions, + radii = solverImplementation.smoothingRadii, densityKernel = new Poly6Kernel(solverAbstraction.parameters.mode == Oni.SolverParameters.Mode.Mode2D), pairs = ((BurstSolverImpl)constraints.solver).fluidInteractions, batchData = batchData @@ -144,7 +126,8 @@ namespace Obi var accumulateAnisotropy = new AccumulateAnisotropyJob() { renderablePositions = solverImplementation.renderablePositions, - anisotropies = solverImplementation.anisotropies, + smoothPositions = ((BurstDensityConstraints)this.constraints).smoothPositions, + anisotropies = ((BurstDensityConstraints)this.constraints).anisotropies, pairs = ((BurstSolverImpl)constraints.solver).fluidInteractions, batchData = batchData }; @@ -157,174 +140,16 @@ namespace Obi public struct UpdateDensitiesJob : IJobParallelFor { [ReadOnly] public NativeArray positions; - [ReadOnly] public NativeArray prevPositions; - [ReadOnly] public NativeArray fluidMaterials; - [ReadOnly] public NativeArray principalRadii; - [ReadOnly] public NativeArray pairs; - - [NativeDisableContainerSafetyRestriction][NativeDisableParallelForRestriction] public NativeArray fluidData; - - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray moments; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray massCenters; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray prevMassCenters; - - [ReadOnly] public Poly6Kernel densityKernel; - [ReadOnly] public BatchData batchData; - - [ReadOnly] public Oni.SolverParameters solverParams; - - public void Execute(int workItemIndex) - { - int start, end; - batchData.GetConstraintRange(workItemIndex, out start, out end); - - for (int i = start; i < end; ++i) - { - var pair = pairs[i]; - - float restVolumeA = math.pow(principalRadii[pair.particleA].x * 2, 3 - (int)solverParams.mode); - float restVolumeB = math.pow(principalRadii[pair.particleB].x * 2, 3 - (int)solverParams.mode); - - float gradA = restVolumeB * pair.avgGradient; - float gradB = restVolumeA * pair.avgGradient; - - float vA = restVolumeB / restVolumeA; - float vB = restVolumeA / restVolumeB; - - // accumulate pbf data (density, gradients): - fluidData[pair.particleA] += new float4(vA * pair.avgKernel, 0, gradA, gradA * gradA); - fluidData[pair.particleB] += new float4(vB * pair.avgKernel, 0, gradB, gradB * gradB); - - // accumulate masses for COMs and moment matrices: - float wAvg = pair.avgKernel / ((densityKernel.W(0, fluidMaterials[pair.particleA].x) + densityKernel.W(0, fluidMaterials[pair.particleB].x)) * 0.5f); - - massCenters[pair.particleA] += wAvg * new float4(positions[pair.particleB].xyz, 1) / positions[pair.particleB].w; - massCenters[pair.particleB] += wAvg * new float4(positions[pair.particleA].xyz, 1) / positions[pair.particleA].w; - - prevMassCenters[pair.particleA] += wAvg * new float4(prevPositions[pair.particleB].xyz, 1) / positions[pair.particleB].w; - prevMassCenters[pair.particleB] += wAvg * new float4(prevPositions[pair.particleA].xyz, 1) / positions[pair.particleA].w; - - moments[pair.particleA] += wAvg * (BurstMath.multrnsp4(positions[pair.particleB], prevPositions[pair.particleB]) + float4x4.identity * math.pow(principalRadii[pair.particleB].x, 2) * 0.001f) / positions[pair.particleB].w; - moments[pair.particleB] += wAvg * (BurstMath.multrnsp4(positions[pair.particleA], prevPositions[pair.particleA]) + float4x4.identity * math.pow(principalRadii[pair.particleA].x, 2) * 0.001f) / positions[pair.particleA].w; - } - } - } - - [BurstCompile] - public struct ApplyDensityConstraintsJob : IJobParallelFor - { - [ReadOnly] public NativeArray principalRadii; - [ReadOnly] public NativeArray fluidMaterials; - [ReadOnly] public NativeArray pairs; - [ReadOnly] public Poly6Kernel densityKernel; - [ReadOnly] public CohesionKernel cohesionKernel; - - [NativeDisableContainerSafetyRestriction][NativeDisableParallelForRestriction] public NativeArray positions; - [NativeDisableContainerSafetyRestriction][NativeDisableParallelForRestriction] public NativeArray fluidData; - - [ReadOnly] public BatchData batchData; - [ReadOnly] public float sorFactor; - [ReadOnly] public Oni.SolverParameters solverParams; - - public void Execute(int workItemIndex) - { - int start, end; - batchData.GetConstraintRange(workItemIndex, out start, out end); - - for (int i = start; i < end; ++i) - { - var pair = pairs[i]; - - float restVolumeA = math.pow(principalRadii[pair.particleA].x * 2, 3 - (int)solverParams.mode); - float restVolumeB = math.pow(principalRadii[pair.particleB].x * 2, 3 - (int)solverParams.mode); - - float dist = math.length(positions[pair.particleA].xyz - positions[pair.particleB].xyz); // TODO: FIX! we cant read positions while we are writing to them. - - // calculate tensile instability correction factor: - float cAvg = (cohesionKernel.W(dist, fluidMaterials[pair.particleA].x * 1.4f) + cohesionKernel.W(dist, fluidMaterials[pair.particleB].x * 1.4f)) * 0.5f; - float st = 0.2f * cAvg * (1 - math.saturate(math.abs(fluidMaterials[pair.particleA].y - fluidMaterials[pair.particleB].y))) * (fluidMaterials[pair.particleA].y + fluidMaterials[pair.particleB].y) * 0.5f; - float scorrA = -st / (positions[pair.particleA].w * fluidData[pair.particleA][3] + math.FLT_MIN_NORMAL); - float scorrB = -st / (positions[pair.particleB].w * fluidData[pair.particleB][3] + math.FLT_MIN_NORMAL); - - // calculate position delta: - float4 delta = pair.gradient * pair.avgGradient * ((fluidData[pair.particleA][1] + scorrA) * restVolumeB + (fluidData[pair.particleB][1] + scorrB) * restVolumeA) * sorFactor; - delta.w = 0; - positions[pair.particleA] += delta * positions[pair.particleA].w; - positions[pair.particleB] -= delta * positions[pair.particleB].w; - - } - } - } - - [BurstCompile] - public struct ViscosityVorticityJob : IJobParallelFor - { - [ReadOnly] public NativeArray positions; - [ReadOnly] public NativeArray prevPositions; - [ReadOnly] public NativeArray matchingRotations; - [ReadOnly] public NativeArray fluidParams; - [ReadOnly] public NativeArray pairs; - - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray massCenters; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray prevMassCenters; - - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray deltas; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray counts; - - [ReadOnly] public BatchData batchData; - - public void Execute(int workItemIndex) - { - int start, end; - batchData.GetConstraintRange(workItemIndex, out start, out end); - - for (int i = start; i < end; ++i) - { - var pair = pairs[i]; - - float visc = math.min(fluidParams[pair.particleA].z, fluidParams[pair.particleB].z); - - // viscosity: - float4 goalA = new float4(massCenters[pair.particleB].xyz + math.rotate(matchingRotations[pair.particleB], (prevPositions[pair.particleA] - prevMassCenters[pair.particleB]).xyz), 0); - float4 goalB = new float4(massCenters[pair.particleA].xyz + math.rotate(matchingRotations[pair.particleA], (prevPositions[pair.particleB] - prevMassCenters[pair.particleA]).xyz), 0); - deltas[pair.particleA] += (goalA - positions[pair.particleA]) * visc; - deltas[pair.particleB] += (goalB - positions[pair.particleB]) * visc; - - counts[pair.particleA]++; - counts[pair.particleB]++; - } - } - } - - [BurstCompile] - public struct NormalsJob : IJobParallelFor - { [ReadOnly] public NativeArray invMasses; - [ReadOnly] public NativeArray velocities; - [ReadOnly] public NativeArray angularVelocities; - [ReadOnly] public NativeArray positions; - [ReadOnly] public NativeArray vorticity; - - [ReadOnly] public NativeArray principalRadii; - [ReadOnly] public NativeArray fluidMaterials; - [ReadOnly] public NativeArray fluidMaterials2; - [ReadOnly] public NativeArray fluidInterface; + [ReadOnly] public NativeArray restDensities; + [ReadOnly] public NativeArray diffusion; [ReadOnly] public NativeArray pairs; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray fluidData; [NativeDisableContainerSafetyRestriction][NativeDisableParallelForRestriction] public NativeArray userData; - [NativeDisableContainerSafetyRestriction][NativeDisableParallelForRestriction] public NativeArray normals; + [NativeDisableContainerSafetyRestriction][NativeDisableParallelForRestriction] public NativeArray fluidData; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray linearAccelerations; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray vorticityAccelerations; - - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray linearFromAngular; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray angularDiffusion; - - [ReadOnly] public Poly6Kernel densityKernel; - [ReadOnly] public SpikyKernel gradKernel; [ReadOnly] public BatchData batchData; - [ReadOnly] public Oni.SolverParameters solverParams; + [ReadOnly] public float dt; public void Execute(int workItemIndex) @@ -336,70 +161,143 @@ namespace Obi { var pair = pairs[i]; - float restVolumeA = math.pow(principalRadii[pair.particleA].x * 2, 3 - (int)solverParams.mode); - float restVolumeB = math.pow(principalRadii[pair.particleB].x * 2, 3 - (int)solverParams.mode); + float restVolumeA = 1.0f / invMasses[pair.particleA] / restDensities[pair.particleA]; + float restVolumeB = 1.0f / invMasses[pair.particleB] / restDensities[pair.particleB]; - float invDensityA = invMasses[pair.particleA] / fluidData[pair.particleA].x; - float invDensityB = invMasses[pair.particleB] / fluidData[pair.particleB].x; + float gradA = restVolumeB * pair.avgGradient; + float gradB = restVolumeA * pair.avgGradient; - float3 relVel = velocities[pair.particleA].xyz - velocities[pair.particleB].xyz; - float3 relAng = angularVelocities[pair.particleA].xyz - angularVelocities[pair.particleB].xyz; - float3 relVort = vorticity[pair.particleA].xyz - vorticity[pair.particleB].xyz; - float4 d = new float4((positions[pair.particleA] - positions[pair.particleB]).xyz,0); - float dist = math.length(d); + float vA = restVolumeB / restVolumeA; + float vB = restVolumeA / restVolumeB; - float avgGrad = (gradKernel.W(dist, fluidMaterials[pair.particleA].x) + - gradKernel.W(dist, fluidMaterials[pair.particleB].x)) * 0.5f; - float avgKern = (densityKernel.W(dist, fluidMaterials[pair.particleA].x) + - densityKernel.W(dist, fluidMaterials[pair.particleB].x)) * 0.5f; - float avgNorm = (densityKernel.W(0, fluidMaterials[pair.particleA].x) + - densityKernel.W(0, fluidMaterials[pair.particleB].x)) * 0.5f; + // accumulate pbf data (density, gradients): + fluidData[pair.particleA] += new float4(vA * pair.avgKernel, 0, gradA, gradA * gradA); + fluidData[pair.particleB] += new float4(vB * pair.avgKernel, 0, gradB, gradB * gradB); // property diffusion: - float diffusionSpeed = (fluidInterface[pair.particleA].w + fluidInterface[pair.particleB].w) * avgKern * dt; - float4 userDelta = (userData[pair.particleB] - userData[pair.particleA]) * solverParams.diffusionMask * diffusionSpeed; - userData[pair.particleA] += restVolumeB / restVolumeA * userDelta; - userData[pair.particleB] -= restVolumeA / restVolumeB * userDelta; + float diffusionSpeed = (diffusion[pair.particleA] + diffusion[pair.particleB]) * pair.avgKernel * dt; + float4 userDelta = (userData[pair.particleB] - userData[pair.particleA]) * diffusionSpeed; + userData[pair.particleA] += vA * userDelta; + userData[pair.particleB] -= vB * userDelta; + } + } + } + + [BurstCompile] + public struct ApplyDensityConstraintsJob : IJobParallelFor + { + [ReadOnly] public NativeArray invMasses; + [ReadOnly] public NativeArray radii; + [ReadOnly] public NativeArray restDensities; + [ReadOnly] public NativeArray surfaceTension; + [ReadOnly] public NativeArray pairs; + [ReadOnly] public Poly6Kernel densityKernel; + + [NativeDisableContainerSafetyRestriction][NativeDisableParallelForRestriction] public NativeArray positions; + [NativeDisableContainerSafetyRestriction][NativeDisableParallelForRestriction] public NativeArray fluidData; + + [ReadOnly] public BatchData batchData; + [ReadOnly] public float sorFactor; + + public void Execute(int workItemIndex) + { + int start, end; + batchData.GetConstraintRange(workItemIndex, out start, out end); + + for (int i = start; i < end; ++i) + { + var pair = pairs[i]; + + float restVolumeA = 1.0f / invMasses[pair.particleA] / restDensities[pair.particleA]; + float restVolumeB = 1.0f / invMasses[pair.particleB] / restDensities[pair.particleB]; + + // calculate tensile instability correction factor: + float wAvg = pair.avgKernel / ((densityKernel.W(0, radii[pair.particleA]) + densityKernel.W(0, radii[pair.particleB])) * 0.5f); + float scorrA = -(0.001f + 0.2f * surfaceTension[pair.particleA]) * wAvg / (invMasses[pair.particleA] * fluidData[pair.particleA][3]); + float scorrB = -(0.001f + 0.2f * surfaceTension[pair.particleB]) * wAvg / (invMasses[pair.particleB] * fluidData[pair.particleB][3]); + + // calculate position delta: + float4 delta = pair.gradient * pair.avgGradient * ((fluidData[pair.particleA][1] + scorrA) * restVolumeB + (fluidData[pair.particleB][1] + scorrB) * restVolumeA) * sorFactor; + positions[pair.particleA] += delta * invMasses[pair.particleA]; + positions[pair.particleB] -= delta * invMasses[pair.particleB]; + } + } + } + + [BurstCompile] + public struct NormalsViscosityAndVorticityJob : IJobParallelFor + { + [ReadOnly] public NativeArray positions; + [ReadOnly] public NativeArray invMasses; + [ReadOnly] public NativeArray radii; + [ReadOnly] public NativeArray restDensities; + [ReadOnly] public NativeArray viscosities; + [ReadOnly] public NativeArray fluidData; + [ReadOnly] public NativeArray pairs; + + [NativeDisableContainerSafetyRestriction][NativeDisableParallelForRestriction] public NativeArray velocities; + [NativeDisableContainerSafetyRestriction][NativeDisableParallelForRestriction] public NativeArray vorticities; + [NativeDisableContainerSafetyRestriction][NativeDisableParallelForRestriction] public NativeArray normals; + + [ReadOnly] public BatchData batchData; + + public void Execute(int workItemIndex) + { + int start, end; + batchData.GetConstraintRange(workItemIndex, out start, out end); + + for (int i = start; i < end; ++i) + { + var pair = pairs[i]; + + float restVolumeA = 1.0f / invMasses[pair.particleA] / restDensities[pair.particleA]; + float restVolumeB = 1.0f / invMasses[pair.particleB] / restDensities[pair.particleB]; + + // XSPH viscosity: + float viscosityCoeff = math.min(viscosities[pair.particleA], viscosities[pair.particleB]); + float4 relVelocity = velocities[pair.particleB] - velocities[pair.particleA]; + float4 viscosity = viscosityCoeff * relVelocity * pair.avgKernel; + velocities[pair.particleA] += viscosity * restVolumeB; + velocities[pair.particleB] -= viscosity * restVolumeA; + + // calculate vorticity: + float4 vgrad = pair.gradient * pair.avgGradient; + float4 vorticity = new float4(math.cross(relVelocity.xyz,vgrad.xyz),0); + vorticities[pair.particleA] += vorticity * restVolumeB; + vorticities[pair.particleB] += vorticity * restVolumeA; // calculate color field normal: - float4 normGrad = d / (dist + BurstMath.epsilon); - float4 vgrad = normGrad * avgGrad; - float radius = (fluidMaterials[pair.particleA].x + fluidMaterials[pair.particleB].x) * 0.5f; - normals[pair.particleA] += vgrad * radius * restVolumeB; - normals[pair.particleB] -= vgrad * radius * restVolumeA; + float radius = (radii[pair.particleA] + radii[pair.particleB]) * 0.5f; + normals[pair.particleA] += vgrad * radius / invMasses[pair.particleB] / fluidData[pair.particleB][0]; + normals[pair.particleB] -= vgrad * radius / invMasses[pair.particleA] / fluidData[pair.particleA][0]; + } + } + } - // measure relative velocity for foam generation: - float4 dataA = fluidData[pair.particleA]; - float4 dataB = fluidData[pair.particleB]; - float relVelMag = math.length(relVel) + BurstMath.epsilon; - float avgVelDiffKernel = 1 - math.min(1, dist / (radius + BurstMath.epsilon)); - float rv = relVelMag * (1 - math.dot(relVel / relVelMag, normGrad.xyz)) * avgVelDiffKernel; - dataA.z += rv; - dataB.z += rv; - fluidData[pair.particleA] = dataA; - fluidData[pair.particleB] = dataB; + [BurstCompile] + public struct CalculateVorticityEta : IJobParallelFor + { + [ReadOnly] public NativeArray vorticities; + [ReadOnly] public NativeArray invMasses; + [ReadOnly] public NativeArray restDensities; - // micropolar: curl of linear/angular velocity: - float3 velCross = math.cross(relVel, vgrad.xyz); - float3 vortCross = math.cross(relVort, vgrad.xyz); - linearAccelerations[pair.particleA] += new float4(vortCross / invMasses[pair.particleB] * invDensityA, 0); - linearAccelerations[pair.particleB] += new float4(vortCross / invMasses[pair.particleA] * invDensityB, 0); - vorticityAccelerations[pair.particleA] += new float4(velCross / invMasses[pair.particleB] * invDensityA, 0); - vorticityAccelerations[pair.particleB] += new float4(velCross / invMasses[pair.particleA] * invDensityB, 0); + [NativeDisableContainerSafetyRestriction][NativeDisableParallelForRestriction] public NativeArray pairs; + [NativeDisableContainerSafetyRestriction][NativeDisableParallelForRestriction] public NativeArray eta; - // angular diffusion: - float4x4 diffA = angularDiffusion[pair.particleA]; - float4x4 diffB = angularDiffusion[pair.particleB]; - diffA.c0 += new float4(relAng * avgKern / invMasses[pair.particleB] * invDensityA, 0); - diffB.c0 -= new float4(relAng * avgKern / invMasses[pair.particleA] * invDensityB, 0); - diffA.c1 += new float4(relVort * avgKern / invMasses[pair.particleB] * invDensityA, 0); - diffB.c1 -= new float4(relVort * avgKern / invMasses[pair.particleA] * invDensityB, 0); - angularDiffusion[pair.particleA] = diffA; - angularDiffusion[pair.particleB] = diffB; + [ReadOnly] public BatchData batchData; - // linear velocity due to baroclinity: - linearFromAngular[pair.particleA] += new float4(math.cross(angularVelocities[pair.particleB].xyz, d.xyz) * avgKern / avgNorm, 0); - linearFromAngular[pair.particleB] -= new float4(math.cross(angularVelocities[pair.particleA].xyz, d.xyz) * avgKern / avgNorm, 0); + public void Execute(int workItemIndex) + { + int start, end; + batchData.GetConstraintRange(workItemIndex, out start, out end); + + for (int i = start; i < end; ++i) + { + var pair = pairs[i]; + + float4 vgrad = pair.gradient * pair.avgGradient; + eta[pair.particleA] += math.length(vorticities[pair.particleA]) * vgrad / invMasses[pair.particleB] / restDensities[pair.particleB]; + eta[pair.particleB] -= math.length(vorticities[pair.particleB]) * vgrad / invMasses[pair.particleA] / restDensities[pair.particleA]; } } } @@ -408,10 +306,10 @@ namespace Obi public struct AccumulateSmoothPositionsJob : IJobParallelFor { [ReadOnly] public NativeArray renderablePositions; - [ReadOnly] public NativeArray fluidMaterials; + [ReadOnly] public NativeArray radii; [ReadOnly] public Poly6Kernel densityKernel; - [NativeDisableContainerSafetyRestriction][NativeDisableParallelForRestriction] public NativeArray anisotropies; + [NativeDisableContainerSafetyRestriction][NativeDisableParallelForRestriction] public NativeArray smoothPositions; [NativeDisableContainerSafetyRestriction][NativeDisableParallelForRestriction] public NativeArray pairs; [ReadOnly] public BatchData batchData; @@ -425,19 +323,14 @@ namespace Obi { var pair = pairs[i]; - float distance = math.length((renderablePositions[pair.particleA] - renderablePositions[pair.particleB]).xyz); + float4 gradient = (renderablePositions[pair.particleA] - renderablePositions[pair.particleB]); + float distance = math.length(gradient); - pair.avgKernel = (densityKernel.W(distance, fluidMaterials[pair.particleA].x) + - densityKernel.W(distance, fluidMaterials[pair.particleB].x)) * 0.5f; + pair.avgKernel = (densityKernel.W(distance, radii[pair.particleA]) + + densityKernel.W(distance, radii[pair.particleB])) * 0.5f; - var A = anisotropies[pair.particleA]; - var B = anisotropies[pair.particleB]; - - A.c3 += new float4(renderablePositions[pair.particleB].xyz,1) * pair.avgKernel; - B.c3 += new float4(renderablePositions[pair.particleA].xyz,1) * pair.avgKernel; - - anisotropies[pair.particleA] = A; - anisotropies[pair.particleB] = B; + smoothPositions[pair.particleA] += new float4(renderablePositions[pair.particleB].xyz,1) * pair.avgKernel; + smoothPositions[pair.particleB] += new float4(renderablePositions[pair.particleA].xyz,1) * pair.avgKernel; pairs[i] = pair; } @@ -448,9 +341,10 @@ namespace Obi public struct AccumulateAnisotropyJob : IJobParallelFor { [ReadOnly] public NativeArray renderablePositions; + [ReadOnly] public NativeArray smoothPositions; [ReadOnly] public NativeArray pairs; - [NativeDisableContainerSafetyRestriction][NativeDisableParallelForRestriction] public NativeArray anisotropies; + [NativeDisableContainerSafetyRestriction][NativeDisableParallelForRestriction] public NativeArray anisotropies; [ReadOnly] public BatchData batchData; @@ -463,15 +357,15 @@ namespace Obi { var pair = pairs[i]; - float4 distanceA = (renderablePositions[pair.particleB] - anisotropies[pair.particleA].c3) * pair.avgKernel; - float4 distanceB = (renderablePositions[pair.particleA] - anisotropies[pair.particleB].c3) * pair.avgKernel; + float4 distanceA = renderablePositions[pair.particleB] - smoothPositions[pair.particleA]; + float4 distanceB = renderablePositions[pair.particleA] - smoothPositions[pair.particleB]; - anisotropies[pair.particleA] += BurstMath.multrnsp4(distanceA,distanceA); - anisotropies[pair.particleB] += BurstMath.multrnsp4(distanceB,distanceB); + anisotropies[pair.particleA] += BurstMath.multrnsp(distanceA,distanceA) * pair.avgKernel; + anisotropies[pair.particleB] += BurstMath.multrnsp(distanceB,distanceB) * pair.avgKernel; } } } } } -#endif +#endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Density/Kernels/CohesionKernel.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Density/Kernels/CohesionKernel.cs deleted file mode 100644 index ed30bdf36..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Density/Kernels/CohesionKernel.cs +++ /dev/null @@ -1,15 +0,0 @@ -#if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) -using System; -using Unity.Mathematics; - -namespace Obi -{ - public struct CohesionKernel - { - public float W(float r, float h) - { - return math.cos(math.min(r, h) * 3 * math.PI / (2 * h)); - } - } -} -#endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Density/Kernels/CohesionKernel.cs.meta b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Density/Kernels/CohesionKernel.cs.meta deleted file mode 100644 index 9278ccede..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Density/Kernels/CohesionKernel.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d2bcf975ae59e4fcf9412ec328a3e2b9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Distance/BurstDistanceConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Distance/BurstDistanceConstraintsBatch.cs index 4d83f2e44..5bdf72c08 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Distance/BurstDistanceConstraintsBatch.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Distance/BurstDistanceConstraintsBatch.cs @@ -39,7 +39,7 @@ namespace Obi applyConstraints.particleIndices = this.particleIndices; } - public override JobHandle Evaluate(JobHandle inputDeps, float stepTime, float substepTime, int steps, float timeLeft) + public override JobHandle Evaluate(JobHandle inputDeps, float stepTime, float substepTime, int substeps) { projectConstraints.positions = solverImplementation.positions; projectConstraints.invMasses = solverImplementation.invMasses; @@ -62,7 +62,7 @@ namespace Obi return applyConstraints.Schedule(m_ConstraintCount, 64, inputDeps); } - [BurstCompile] + [BurstCompile] public struct DistanceConstraintsBatchJob : IJobParallelFor { [ReadOnly] public NativeArray particleIndices; diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/ParticleCollision/BurstParticleCollisionConstraints.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/ParticleCollision/BurstParticleCollisionConstraints.cs index 5401abd7b..02bb86246 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/ParticleCollision/BurstParticleCollisionConstraints.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/ParticleCollision/BurstParticleCollisionConstraints.cs @@ -25,7 +25,9 @@ namespace Obi public override int GetConstraintCount() { - return ((BurstSolverImpl)solver).abstraction.particleContacts.count; + if (!((BurstSolverImpl)solver).particleContacts.IsCreated) + return 0; + return ((BurstSolverImpl)solver).particleContacts.Length; } } } diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/ParticleCollision/BurstParticleCollisionConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/ParticleCollision/BurstParticleCollisionConstraintsBatch.cs index e7b438b30..735144267 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/ParticleCollision/BurstParticleCollisionConstraintsBatch.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/ParticleCollision/BurstParticleCollisionConstraintsBatch.cs @@ -24,7 +24,7 @@ namespace Obi this.batchData = batchData; } - public override JobHandle Initialize(JobHandle inputDeps, float stepTime, float substepTime, int steps, float timeLeft) + public override JobHandle Initialize(JobHandle inputDeps, float substepTime) { var updateContacts = new UpdateParticleContactsJob() { @@ -33,7 +33,7 @@ namespace Obi velocities = solverImplementation.velocities, radii = solverImplementation.principalRadii, invMasses = solverImplementation.invMasses, - invRotationalMasses = solverImplementation.invRotationalMasses, + invInertiaTensors = solverImplementation.invInertiaTensors, simplices = solverImplementation.simplices, simplexCounts = solverImplementation.simplexCounts, @@ -41,8 +41,7 @@ namespace Obi particleMaterialIndices = solverImplementation.collisionMaterials, collisionMaterials = ObiColliderWorld.GetInstance().collisionMaterials.AsNativeArray(), - contacts = ((BurstSolverImpl)constraints.solver).abstraction.particleContacts.AsNativeArray(), - effectiveMasses = ((BurstSolverImpl)constraints.solver).abstraction.particleContactEffectiveMasses.AsNativeArray(), + contacts = ((BurstSolverImpl)constraints.solver).particleContacts, batchData = batchData }; @@ -50,7 +49,7 @@ namespace Obi return updateContacts.Schedule(batchData.workItemCount, batchCount, inputDeps); } - public override JobHandle Evaluate(JobHandle inputDeps, float stepTime, float substepTime, int steps, float timeLeft) + public override JobHandle Evaluate(JobHandle inputDeps, float stepTime, float substepTime, int substeps) { var parameters = solverAbstraction.GetConstraintParameters(m_ConstraintType); @@ -61,7 +60,6 @@ namespace Obi invMasses = solverImplementation.invMasses, radii = solverImplementation.principalRadii, particleMaterialIndices = solverImplementation.collisionMaterials, - fluidInterface = solverImplementation.fluidInterface, collisionMaterials = ObiColliderWorld.GetInstance().collisionMaterials.AsNativeArray(), simplices = solverImplementation.simplices, @@ -69,9 +67,7 @@ namespace Obi deltas = solverImplementation.positionDeltas, counts = solverImplementation.positionConstraintCounts, - userData = solverImplementation.userData, - contacts = solverAbstraction.particleContacts.AsNativeArray(), - effectiveMasses = ((BurstSolverImpl)constraints.solver).abstraction.particleContactEffectiveMasses.AsNativeArray(), + contacts = ((BurstSolverImpl)constraints.solver).particleContacts, batchData = batchData, constraintParameters = parameters, @@ -90,7 +86,7 @@ namespace Obi var applyConstraints = new ApplyBatchedCollisionConstraintsBatchJob() { - contacts = solverAbstraction.particleContacts.AsNativeArray(), + contacts = ((BurstSolverImpl)constraints.solver).particleContacts, simplices = solverImplementation.simplices, simplexCounts = solverImplementation.simplexCounts, @@ -121,7 +117,7 @@ namespace Obi [ReadOnly] public NativeArray velocities; [ReadOnly] public NativeArray radii; [ReadOnly] public NativeArray invMasses; - [ReadOnly] public NativeArray invRotationalMasses; + [ReadOnly] public NativeArray invInertiaTensors; [ReadOnly] public NativeArray particleMaterialIndices; [ReadOnly] public NativeArray collisionMaterials; @@ -130,7 +126,6 @@ namespace Obi [ReadOnly] public NativeArray simplices; [ReadOnly] public SimplexCounts simplexCounts; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray effectiveMasses; [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray contacts; [ReadOnly] public BatchData batchData; @@ -143,7 +138,6 @@ namespace Obi for (int i = start; i < end; ++i) { var contact = contacts[i]; - var efMasses = effectiveMasses[i]; int simplexStartA = simplexCounts.GetSimplexStartAndSize(contact.bodyA, out int simplexSizeA); int simplexStartB = simplexCounts.GetSimplexStartAndSize(contact.bodyB, out int simplexSizeB); @@ -153,14 +147,14 @@ namespace Obi quaternion simplexPrevOrientationA = new quaternion(0, 0, 0, 0); float simplexRadiusA = 0; float simplexInvMassA = 0; - float simplexInvRotationalMassA = 0; + float4 simplexInvInertiaA = float4.zero; float4 simplexVelocityB = float4.zero; float4 simplexPrevPositionB = float4.zero; quaternion simplexPrevOrientationB = new quaternion(0, 0, 0, 0); float simplexRadiusB = 0; float simplexInvMassB = 0; - float simplexInvRotationalMassB = 0; + float4 simplexInvInertiaB = float4.zero; for (int j = 0; j < simplexSizeA; ++j) { @@ -169,7 +163,7 @@ namespace Obi simplexPrevPositionA += prevPositions[particleIndex] * contact.pointA[j]; simplexPrevOrientationA.value += prevOrientations[particleIndex].value * contact.pointA[j]; simplexInvMassA += invMasses[particleIndex] * contact.pointA[j]; - simplexInvRotationalMassA += invRotationalMasses[particleIndex] * contact.pointA[j]; + simplexInvInertiaA += invInertiaTensors[particleIndex] * contact.pointA[j]; simplexRadiusA += BurstMath.EllipsoidRadius(contact.normal, prevOrientations[particleIndex], radii[particleIndex].xyz) * contact.pointA[j]; } @@ -180,21 +174,20 @@ namespace Obi simplexPrevPositionB += prevPositions[particleIndex] * contact.pointB[j]; simplexPrevOrientationB.value += prevOrientations[particleIndex].value * contact.pointB[j]; simplexInvMassB += invMasses[particleIndex] * contact.pointB[j]; - simplexInvRotationalMassB += invRotationalMasses[particleIndex] * contact.pointB[j]; + simplexInvInertiaB += invInertiaTensors[particleIndex] * contact.pointB[j]; simplexRadiusB += BurstMath.EllipsoidRadius(contact.normal, prevOrientations[particleIndex], radii[particleIndex].xyz) * contact.pointB[j]; } - simplexPrevPositionA.w = 0; - simplexPrevPositionB.w = 0; - // update contact distance - float4 contactPointA = simplexPrevPositionA - contact.normal * simplexRadiusA; - float4 contactPointB = simplexPrevPositionB + contact.normal * simplexRadiusB; + float dAB = math.dot(simplexPrevPositionA - simplexPrevPositionB, contact.normal); + contact.distance = dAB - (simplexRadiusA + simplexRadiusB); - contact.distance = math.dot(contactPointA - contactPointB, contact.normal); + // calculate contact points: + float4 contactPointA = simplexPrevPositionB + contact.normal * (contact.distance + simplexRadiusB); + float4 contactPointB = simplexPrevPositionA - contact.normal * (contact.distance + simplexRadiusA); // update contact basis: - contact.CalculateTangent(simplexVelocityA - simplexVelocityB); + contact.CalculateBasis(simplexVelocityA - simplexVelocityB); // update contact masses: int aMaterialIndex = particleMaterialIndices[simplices[simplexStartA]]; @@ -202,14 +195,10 @@ namespace Obi bool rollingContacts = (aMaterialIndex >= 0 ? collisionMaterials[aMaterialIndex].rollingContacts > 0 : false) | (bMaterialIndex >= 0 ? collisionMaterials[bMaterialIndex].rollingContacts > 0 : false); - float4 invInertiaTensorA = math.rcp(BurstMath.GetParticleInertiaTensor(simplexRadiusA, simplexInvRotationalMassA) + new float4(BurstMath.epsilon)); - float4 invInertiaTensorB = math.rcp(BurstMath.GetParticleInertiaTensor(simplexRadiusB, simplexInvRotationalMassB) + new float4(BurstMath.epsilon)); - - efMasses.CalculateContactMassesA(simplexInvMassA, invInertiaTensorA, simplexPrevPositionA, simplexPrevOrientationA, contactPointA, contact.normal, contact.tangent, contact.bitangent, rollingContacts); - efMasses.CalculateContactMassesB(simplexInvMassB, invInertiaTensorB, simplexPrevPositionB, simplexPrevOrientationB, contactPointB, contact.normal, contact.tangent, contact.bitangent, rollingContacts); + contact.CalculateContactMassesA(simplexInvMassA, simplexInvInertiaA, simplexPrevPositionA, simplexPrevOrientationA, contactPointA, rollingContacts); + contact.CalculateContactMassesB(simplexInvMassB, simplexInvInertiaB, simplexPrevPositionB, simplexPrevOrientationB, contactPointB, rollingContacts); contacts[i] = contact; - effectiveMasses[i] = efMasses; } } } @@ -221,7 +210,6 @@ namespace Obi [ReadOnly] public NativeArray invMasses; [ReadOnly] public NativeArray radii; [ReadOnly] public NativeArray particleMaterialIndices; - [ReadOnly] public NativeArray fluidInterface; [ReadOnly] public NativeArray collisionMaterials; // simplex arrays: @@ -230,10 +218,8 @@ namespace Obi [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray positions; [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray deltas; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray userData; [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray counts; [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray contacts; - [ReadOnly] public NativeArray effectiveMasses; [ReadOnly] public Oni.ConstraintParameters constraintParameters; [ReadOnly] public Oni.SolverParameters solverParameters; @@ -254,42 +240,34 @@ namespace Obi int simplexStartA = simplexCounts.GetSimplexStartAndSize(contact.bodyA, out int simplexSizeA); int simplexStartB = simplexCounts.GetSimplexStartAndSize(contact.bodyB, out int simplexSizeB); + // Combine collision materials: BurstCollisionMaterial material = CombineCollisionMaterials(simplices[simplexStartA], simplices[simplexStartB]); float4 simplexPositionA = float4.zero, simplexPositionB = float4.zero; float simplexRadiusA = 0, simplexRadiusB = 0; - float4 simplexUserDataA = float4.zero, simplexUserDataB = float4.zero; - float miscibility = 0; for (int j = 0; j < simplexSizeA; ++j) { int particleIndex = simplices[simplexStartA + j]; simplexPositionA += positions[particleIndex] * contact.pointA[j]; simplexRadiusA += BurstMath.EllipsoidRadius(contact.normal, orientations[particleIndex], radii[particleIndex].xyz) * contact.pointA[j]; - simplexUserDataA += userData[particleIndex] * contact.pointA[j]; - miscibility += fluidInterface[particleIndex].w * contact.pointA[j]; } for (int j = 0; j < simplexSizeB; ++j) { int particleIndex = simplices[simplexStartB + j]; simplexPositionB += positions[particleIndex] * contact.pointB[j]; simplexRadiusB += BurstMath.EllipsoidRadius(contact.normal, orientations[particleIndex], radii[particleIndex].xyz) * contact.pointA[j]; - simplexUserDataB += userData[particleIndex] * contact.pointB[j]; - miscibility += fluidInterface[particleIndex].w * contact.pointB[j]; } - simplexPositionA.w = 0; - simplexPositionB.w = 0; - float4 posA = simplexPositionA - contact.normal * simplexRadiusA; float4 posB = simplexPositionB + contact.normal * simplexRadiusB; // adhesion: - float lambda = contact.SolveAdhesion(effectiveMasses[i].TotalNormalInvMass, posA, posB, material.stickDistance, material.stickiness, substepTime); + float lambda = contact.SolveAdhesion(posA, posB, material.stickDistance, material.stickiness, substepTime); // depenetration: - lambda += contact.SolvePenetration(effectiveMasses[i].TotalNormalInvMass, posA, posB, solverParameters.maxDepenetration * substepTime); + lambda += contact.SolvePenetration(posA, posB, solverParameters.maxDepenetration * substepTime); // Apply normal impulse to both particles (w/ shock propagation): if (math.abs(lambda) > BurstMath.epsilon) @@ -314,27 +292,20 @@ namespace Obi } } - // property diffusion: - if (contact.distance < solverParameters.collisionMargin) - { - float diffusionSpeed = miscibility * 0.5f * substepTime; - float4 userDelta = (simplexUserDataB - simplexUserDataA) * solverParameters.diffusionMask * diffusionSpeed; - - for (int j = 0; j < simplexSizeA; ++j) - userData[simplices[simplexStartA + j]] += userDelta * contact.pointA[j]; - - for (int j = 0; j < simplexSizeB; ++j) - userData[simplices[simplexStartB + j]] -= userDelta * contact.pointB[j]; - } - // Apply position deltas immediately, if using sequential evaluation: if (constraintParameters.evaluationOrder == Oni.ConstraintParameters.EvaluationOrder.Sequential) { for (int j = 0; j < simplexSizeA; ++j) - ApplyPositionDelta(simplices[simplexStartA + j], constraintParameters.SORFactor, ref positions, ref deltas, ref counts); + { + int particleIndex = simplices[simplexStartA + j]; + BurstConstraintsBatchImpl.ApplyPositionDelta(particleIndex, constraintParameters.SORFactor, ref positions, ref deltas, ref counts); + } for (int j = 0; j < simplexSizeB; ++j) - ApplyPositionDelta(simplices[simplexStartB + j], constraintParameters.SORFactor, ref positions, ref deltas, ref counts); + { + int particleIndex = simplices[simplexStartB + j]; + BurstConstraintsBatchImpl.ApplyPositionDelta(particleIndex, constraintParameters.SORFactor, ref positions, ref deltas, ref counts); + } } contacts[i] = contact; diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/ParticleCollision/BurstParticleFrictionConstraints.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/ParticleCollision/BurstParticleFrictionConstraints.cs index 0eda6086a..3e9974dde 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/ParticleCollision/BurstParticleFrictionConstraints.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/ParticleCollision/BurstParticleFrictionConstraints.cs @@ -24,7 +24,9 @@ namespace Obi public override int GetConstraintCount() { - return ((BurstSolverImpl)solver).abstraction.particleContacts.count; + if (!((BurstSolverImpl)solver).particleContacts.IsCreated) + return 0; + return ((BurstSolverImpl)solver).particleContacts.Length; } } } diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/ParticleCollision/BurstParticleFrictionConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/ParticleCollision/BurstParticleFrictionConstraintsBatch.cs index f69bc41a3..c96cfbd21 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/ParticleCollision/BurstParticleFrictionConstraintsBatch.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/ParticleCollision/BurstParticleFrictionConstraintsBatch.cs @@ -24,13 +24,15 @@ namespace Obi this.batchData = batchData; } - public override JobHandle Initialize(JobHandle inputDeps, float stepTime, float substepTime, int steps, float timeLeft) + public override JobHandle Initialize(JobHandle inputDeps, float substepTime) { return inputDeps; } - public override JobHandle Evaluate(JobHandle inputDeps, float stepTime, float substepTime, int steps, float timeLeft) + public override JobHandle Evaluate(JobHandle inputDeps, float stepTime, float substepTime, int substeps) { + if (!((BurstSolverImpl)constraints.solver).particleContacts.IsCreated) + return inputDeps; var projectConstraints = new ParticleFrictionConstraintsBatchJob() { @@ -40,7 +42,7 @@ namespace Obi prevOrientations = solverImplementation.prevOrientations, invMasses = solverImplementation.invMasses, - invRotationalMasses = solverImplementation.invRotationalMasses, + invInertiaTensors = solverImplementation.invInertiaTensors, radii = solverImplementation.principalRadii, particleMaterialIndices = solverImplementation.collisionMaterials, collisionMaterials = ObiColliderWorld.GetInstance().collisionMaterials.AsNativeArray(), @@ -52,8 +54,7 @@ namespace Obi counts = solverImplementation.positionConstraintCounts, orientationDeltas = solverImplementation.orientationDeltas, orientationCounts = solverImplementation.orientationConstraintCounts, - contacts = ((BurstSolverImpl)constraints.solver).abstraction.particleContacts.AsNativeArray(), - effectiveMasses = ((BurstSolverImpl)constraints.solver).abstraction.particleContactEffectiveMasses.AsNativeArray(), + contacts = ((BurstSolverImpl)constraints.solver).particleContacts, batchData = batchData, substepTime = substepTime, @@ -65,12 +66,14 @@ namespace Obi public override JobHandle Apply(JobHandle inputDeps, float substepTime) { + if (!((BurstSolverImpl)constraints.solver).particleContacts.IsCreated) + return inputDeps; var parameters = solverAbstraction.GetConstraintParameters(m_ConstraintType); var applyConstraints = new ApplyBatchedCollisionConstraintsBatchJob() { - contacts = solverAbstraction.particleContacts.AsNativeArray(), + contacts = ((BurstSolverImpl)constraints.solver).particleContacts, simplices = solverImplementation.simplices, simplexCounts = solverImplementation.simplexCounts, @@ -99,7 +102,7 @@ namespace Obi [ReadOnly] public NativeArray prevOrientations; [ReadOnly] public NativeArray invMasses; - [ReadOnly] public NativeArray invRotationalMasses; + [ReadOnly] public NativeArray invInertiaTensors; [ReadOnly] public NativeArray radii; [ReadOnly] public NativeArray particleMaterialIndices; [ReadOnly] public NativeArray collisionMaterials; @@ -115,7 +118,6 @@ namespace Obi [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray orientationCounts; [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray contacts; - [ReadOnly] public NativeArray effectiveMasses; [ReadOnly] public BatchData batchData; [ReadOnly] public float substepTime; @@ -138,16 +140,16 @@ namespace Obi float4 prevPositionA = float4.zero; float4 linearVelocityA = float4.zero; float4 angularVelocityA = float4.zero; - float invRotationalMassA = 0; + float4 invInertiaTensorA = float4.zero; quaternion orientationA = new quaternion(0, 0, 0, 0); - float4 simplexRadiiA = float4.zero; + float simplexRadiusA = 0; float4 prevPositionB = float4.zero; float4 linearVelocityB = float4.zero; float4 angularVelocityB = float4.zero; - float invRotationalMassB = 0; + float4 invInertiaTensorB = float4.zero; quaternion orientationB = new quaternion(0, 0, 0, 0); - float4 simplexRadiiB = float4.zero; + float simplexRadiusB = 0; for (int j = 0; j < simplexSizeA; ++j) { @@ -155,9 +157,9 @@ namespace Obi prevPositionA += prevPositions[particleIndex] * contact.pointA[j]; linearVelocityA += BurstIntegration.DifferentiateLinear(positions[particleIndex], prevPositions[particleIndex], substepTime) * contact.pointA[j]; angularVelocityA += BurstIntegration.DifferentiateAngular(orientations[particleIndex], prevOrientations[particleIndex], substepTime) * contact.pointA[j]; - invRotationalMassA += invRotationalMasses[particleIndex] * contact.pointA[j]; + invInertiaTensorA += invInertiaTensors[particleIndex] * contact.pointA[j]; orientationA.value += orientations[particleIndex].value * contact.pointA[j]; - simplexRadiiA += radii[particleIndex] * contact.pointA[j]; + simplexRadiusA += BurstMath.EllipsoidRadius(contact.normal, prevOrientations[particleIndex], radii[particleIndex].xyz) * contact.pointA[j]; } for (int j = 0; j < simplexSizeB; ++j) { @@ -165,9 +167,9 @@ namespace Obi prevPositionB += prevPositions[particleIndex] * contact.pointB[j]; linearVelocityB += BurstIntegration.DifferentiateLinear(positions[particleIndex], prevPositions[particleIndex], substepTime) * contact.pointB[j]; angularVelocityB += BurstIntegration.DifferentiateAngular(orientations[particleIndex], prevOrientations[particleIndex], substepTime) * contact.pointB[j]; - invRotationalMassB += invRotationalMasses[particleIndex] * contact.pointB[j]; + invInertiaTensorB += invInertiaTensors[particleIndex] * contact.pointB[j]; orientationB.value += orientations[particleIndex].value * contact.pointB[j]; - simplexRadiiB += radii[particleIndex] * contact.pointB[j]; + simplexRadiusB += BurstMath.EllipsoidRadius(contact.normal, prevOrientations[particleIndex], radii[particleIndex].xyz) * contact.pointB[j]; } float4 rA = float4.zero, rB = float4.zero; @@ -175,8 +177,8 @@ namespace Obi // Consider angular velocities if rolling contacts are enabled: if (material.rollingContacts > 0) { - rA = -contact.normal * BurstMath.EllipsoidRadius(contact.normal, orientationA, simplexRadiiA.xyz); - rB = contact.normal * BurstMath.EllipsoidRadius(contact.normal, orientationB, simplexRadiiB.xyz); + rA = -contact.normal * simplexRadiusA; + rB = contact.normal * simplexRadiusB; linearVelocityA += new float4(math.cross(angularVelocityA.xyz, rA.xyz), 0); linearVelocityB += new float4(math.cross(angularVelocityB.xyz, rB.xyz), 0); @@ -185,8 +187,8 @@ namespace Obi // Calculate relative velocity: float4 relativeVelocity = linearVelocityA - linearVelocityB; - // Calculate friction impulses (in the tangent and bitangent directions): - float2 impulses = contact.SolveFriction(effectiveMasses[i].TotalTangentInvMass, effectiveMasses[i].TotalBitangentInvMass, relativeVelocity, material.staticFriction, material.dynamicFriction, substepTime); + // Calculate friction impulses (in the tangent and bitangent ddirections): + float2 impulses = contact.SolveFriction(relativeVelocity, material.staticFriction, material.dynamicFriction, substepTime); // Apply friction impulses to both particles: if (math.abs(impulses.x) > BurstMath.epsilon || math.abs(impulses.y) > BurstMath.epsilon) @@ -199,7 +201,7 @@ namespace Obi for (int j = 0; j < simplexSizeA; ++j) { int particleIndex = simplices[simplexStartA + j]; - deltas[particleIndex] += (tangentImpulse * effectiveMasses[i].tangentInvMassA + bitangentImpulse * effectiveMasses[i].bitangentInvMassA) * substepTime * contact.pointA[j] * baryScale; + deltas[particleIndex] += (tangentImpulse * contact.tangentInvMassA + bitangentImpulse * contact.bitangentInvMassA) * substepTime * contact.pointA[j] * baryScale; counts[particleIndex]++; } @@ -207,16 +209,13 @@ namespace Obi for (int j = 0; j < simplexSizeB; ++j) { int particleIndex = simplices[simplexStartB + j]; - deltas[particleIndex] -= (tangentImpulse * effectiveMasses[i].tangentInvMassB + bitangentImpulse * effectiveMasses[i].bitangentInvMassB) * substepTime * contact.pointB[j] * baryScale; + deltas[particleIndex] -= (tangentImpulse * contact.tangentInvMassB + bitangentImpulse * contact.bitangentInvMassB) * substepTime * contact.pointB[j] * baryScale; counts[particleIndex]++; } // Rolling contacts: if (material.rollingContacts > 0) { - float4 invInertiaTensorA = math.rcp(BurstMath.GetParticleInertiaTensor(simplexRadiiA, invRotationalMassA) + new float4(BurstMath.epsilon)); - float4 invInertiaTensorB = math.rcp(BurstMath.GetParticleInertiaTensor(simplexRadiiB, invRotationalMassB) + new float4(BurstMath.epsilon)); - // Calculate angular velocity deltas due to friction impulse: float4x4 solverInertiaA = BurstMath.TransformInertiaTensor(invInertiaTensorA, orientationA); float4x4 solverInertiaB = BurstMath.TransformInertiaTensor(invInertiaTensorB, orientationB); @@ -253,7 +252,7 @@ namespace Obi for (int j = 0; j < simplexSizeB; ++j) { - int particleIndex = simplices[simplexStartB + j]; + int particleIndex = simplices[simplexStartB+ j]; quaternion qB = orientationDeltas[particleIndex]; qB.value += orientationDeltaB.value; orientationDeltas[particleIndex] = qB; diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Pin/BurstPinConstraints.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Pin/BurstPinConstraints.cs index d552207ec..530040132 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Pin/BurstPinConstraints.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Pin/BurstPinConstraints.cs @@ -1,6 +1,5 @@ #if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) using System; -using Unity.Jobs; namespace Obi { @@ -22,20 +21,6 @@ namespace Obi batches.Remove(batch as BurstPinConstraintsBatch); batch.Destroy(); } - - public JobHandle ProjectRenderablePositions(JobHandle inputDeps) - { - for (int i = 0; i < batches.Count; ++i) - { - if (batches[i].enabled) - { - inputDeps = batches[i].ProjectRenderablePositions(inputDeps); - m_Solver.ScheduleBatchedJobsIfNeeded(); - } - } - - return inputDeps; - } } } #endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Pin/BurstPinConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Pin/BurstPinConstraintsBatch.cs index 18a58a6b7..bf8efe8cc 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Pin/BurstPinConstraintsBatch.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Pin/BurstPinConstraintsBatch.cs @@ -6,7 +6,6 @@ using Unity.Collections.LowLevel.Unsafe; using Unity.Mathematics; using Unity.Burst; using System.Collections.Generic; -using System.Threading; namespace Obi { @@ -34,29 +33,7 @@ namespace Obi m_ConstraintCount = count; } - public override JobHandle Initialize(JobHandle inputDeps, float stepTime, float substepTime, int steps, float timeLeft) - { - var clearPins = new ClearPinsJob - { - colliderIndices = colliderIndices, - shapes = ObiColliderWorld.GetInstance().colliderShapes.AsNativeArray(), - rigidbodies = ObiColliderWorld.GetInstance().rigidbodies.AsNativeArray(), - }; - inputDeps = clearPins.Schedule(m_ConstraintCount, 128, inputDeps); - - var updatePins = new UpdatePinsJob - { - colliderIndices = colliderIndices, - shapes = ObiColliderWorld.GetInstance().colliderShapes.AsNativeArray(), - rigidbodies = ObiColliderWorld.GetInstance().rigidbodies.AsNativeArray(), - }; - inputDeps = updatePins.Schedule(m_ConstraintCount, 128, inputDeps); - - // clear lambdas: - return base.Initialize(inputDeps, stepTime, substepTime, steps, timeLeft); - } - - public override JobHandle Evaluate(JobHandle inputDeps, float stepTime, float substepTime, int steps, float timeLeft) + public override JobHandle Evaluate(JobHandle inputDeps, float stepTime, float substepTime, int substeps) { var projectConstraints = new PinConstraintsBatchJob() { @@ -86,13 +63,12 @@ namespace Obi inertialFrame = ((BurstSolverImpl)constraints.solver).inertialFrame, stepTime = stepTime, - steps = steps, substepTime = substepTime, - timeLeft = timeLeft, + substeps = substeps, activeConstraintCount = m_ConstraintCount }; - return projectConstraints.Schedule(m_ConstraintCount, 16, inputDeps); + return projectConstraints.Schedule(inputDeps); } public override JobHandle Apply(JobHandle inputDeps, float substepTime) @@ -118,78 +94,8 @@ namespace Obi return applyConstraints.Schedule(inputDeps); } - public JobHandle ProjectRenderablePositions(JobHandle inputDeps) - { - var project = new ProjectRenderablePositionsJob() - { - particleIndices = particleIndices, - colliderIndices = colliderIndices, - offsets = offsets, - stiffnesses = stiffnesses, - restDarboux = restDarbouxVectors, - - transforms = ObiColliderWorld.GetInstance().colliderTransforms.AsNativeArray(), - - renderablePositions = solverImplementation.renderablePositions, - renderableOrientations = solverImplementation.renderableOrientations, - - inertialFrame = ((BurstSolverImpl)constraints.solver).inertialFrame, - }; - - return project.Schedule(m_ConstraintCount, 16, inputDeps); - } - [BurstCompile] - public unsafe struct ClearPinsJob : IJobParallelFor - { - [ReadOnly] public NativeArray colliderIndices; - [ReadOnly] public NativeArray shapes; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray rigidbodies; - - public void Execute(int i) - { - int colliderIndex = colliderIndices[i]; - - // no collider to pin to, so ignore the constraint. - if (colliderIndex < 0) - return; - - int rigidbodyIndex = shapes[colliderIndex].rigidbodyIndex; - if (rigidbodyIndex >= 0) - { - BurstRigidbody* arr = (BurstRigidbody*)rigidbodies.GetUnsafePtr(); - Interlocked.Exchange(ref arr[rigidbodyIndex].constraintCount, 0); - } - } - } - - [BurstCompile] - public unsafe struct UpdatePinsJob : IJobParallelFor - { - [ReadOnly] public NativeArray colliderIndices; - [ReadOnly] public NativeArray shapes; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray rigidbodies; - - public void Execute(int i) - { - int colliderIndex = colliderIndices[i]; - - // no collider to pin to, so ignore the constraint. - if (colliderIndex < 0) - return; - - // Increment the amount of constraints affecting this rigidbody for mass splitting: - int rigidbodyIndex = shapes[colliderIndex].rigidbodyIndex; - if (rigidbodyIndex >= 0) - { - BurstRigidbody* arr = (BurstRigidbody*)rigidbodies.GetUnsafePtr(); - Interlocked.Increment(ref arr[rigidbodyIndex].constraintCount); - } - } - } - - [BurstCompile] - public unsafe struct PinConstraintsBatchJob : IJobParallelFor + public unsafe struct PinConstraintsBatchJob : IJob { [ReadOnly] public NativeArray particleIndices; [ReadOnly] public NativeArray colliderIndices; @@ -197,7 +103,7 @@ namespace Obi [ReadOnly] public NativeArray offsets; [ReadOnly] public NativeArray stiffnesses; [ReadOnly] public NativeArray restDarboux; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray lambdas; + public NativeArray lambdas; [ReadOnly] public NativeArray positions; [ReadOnly] public NativeArray prevPositions; @@ -208,8 +114,8 @@ namespace Obi [ReadOnly] public NativeArray shapes; [ReadOnly] public NativeArray transforms; [ReadOnly] public NativeArray rigidbodies; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray rigidbodyLinearDeltas; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray rigidbodyAngularDeltas; + public NativeArray rigidbodyLinearDeltas; + public NativeArray rigidbodyAngularDeltas; [NativeDisableContainerSafetyRestriction][NativeDisableParallelForRestriction] public NativeArray deltas; [NativeDisableContainerSafetyRestriction][NativeDisableParallelForRestriction] public NativeArray counts; @@ -219,113 +125,112 @@ namespace Obi [ReadOnly] public BurstInertialFrame inertialFrame; [ReadOnly] public float stepTime; [ReadOnly] public float substepTime; - [ReadOnly] public float timeLeft; - [ReadOnly] public int steps; + [ReadOnly] public int substeps; [ReadOnly] public int activeConstraintCount; - public void Execute(int i) + public void Execute() { - int particleIndex = particleIndices[i]; - int colliderIndex = colliderIndices[i]; - - // no collider to pin to, so ignore the constraint. - if (colliderIndex < 0) - return; - - int rigidbodyIndex = shapes[colliderIndex].rigidbodyIndex; - - float frameEnd = stepTime * steps; - float substepsToEnd = timeLeft / substepTime; - - // calculate time adjusted compliances - float2 compliances = stiffnesses[i].xy / (substepTime * substepTime); - - // project particle position to the end of the full step: - float4 particlePosition = math.lerp(prevPositions[particleIndex], positions[particleIndex], substepsToEnd); - - // express pin offset in world space: - float4 worldPinOffset = transforms[colliderIndex].TransformPoint(offsets[i]); - float4 predictedPinOffset = worldPinOffset; - quaternion predictedRotation = transforms[colliderIndex].rotation; - - float rigidbodyLinearW = 0; - float rigidbodyAngularW = 0; - - if (rigidbodyIndex >= 0) + for (int i = 0; i < activeConstraintCount; ++i) { - var rigidbody = rigidbodies[rigidbodyIndex]; + int particleIndex = particleIndices[i]; + int colliderIndex = colliderIndices[i]; - // predict offset point position using rb velocity at that point (can't integrate transform since position != center of mass) - float4 velocityAtPoint = BurstMath.GetRigidbodyVelocityAtPoint(rigidbodyIndex, inertialFrame.frame.InverseTransformPoint(worldPinOffset), rigidbodies, rigidbodyLinearDeltas, rigidbodyAngularDeltas, inertialFrame); - predictedPinOffset = BurstIntegration.IntegrateLinear(predictedPinOffset, inertialFrame.frame.TransformVector(velocityAtPoint), frameEnd); + // no collider to pin to, so ignore the constraint. + if (colliderIndex < 0) + continue; - // predict rotation at the end of the step: - predictedRotation = BurstIntegration.IntegrateAngular(predictedRotation, rigidbody.angularVelocity + rigidbodyAngularDeltas[rigidbodyIndex], stepTime); + int rigidbodyIndex = shapes[colliderIndex].rigidbodyIndex; - // calculate linear and angular rigidbody effective masses (mass splitting: multiply by constraint count) - rigidbodyLinearW = rigidbody.inverseMass * rigidbody.constraintCount; - rigidbodyAngularW = BurstMath.RotationalInvMass(rigidbody.inverseInertiaTensor, - worldPinOffset - rigidbody.com, - math.normalizesafe(inertialFrame.frame.TransformPoint(particlePosition) - predictedPinOffset)) * rigidbody.constraintCount; + // calculate time adjusted compliances + float2 compliances = stiffnesses[i].xy / (substepTime * substepTime); - } + // project particle position to the end of the full step: + float4 particlePosition = math.lerp(prevPositions[particleIndex], positions[particleIndex], substeps); - // Transform pin position to solver space for constraint solving: - predictedPinOffset = inertialFrame.frame.InverseTransformPoint(predictedPinOffset); - predictedRotation = math.mul(math.conjugate(inertialFrame.frame.rotation), predictedRotation); + // express pin offset in world space: + float4 worldPinOffset = transforms[colliderIndex].TransformPoint(offsets[i]); + float4 predictedPinOffset = worldPinOffset; + quaternion predictedRotation = transforms[colliderIndex].rotation; - float4 gradient = particlePosition - predictedPinOffset; - float constraint = math.length(gradient); - float4 gradientDir = gradient / (constraint + BurstMath.epsilon); - - float4 lambda = lambdas[i]; - float linearDLambda = (-constraint - compliances.x * lambda.w) / (invMasses[particleIndex] + rigidbodyLinearW + rigidbodyAngularW + compliances.x + BurstMath.epsilon); - lambda.w += linearDLambda; - float4 correction = linearDLambda * gradientDir; - - deltas[particleIndex] += correction * invMasses[particleIndex] / substepsToEnd; - counts[particleIndex]++; - - if (rigidbodyIndex >= 0) - { - BurstMath.ApplyImpulse(rigidbodyIndex, - -correction / frameEnd, - inertialFrame.frame.InverseTransformPoint(worldPinOffset), - rigidbodies, rigidbodyLinearDeltas, rigidbodyAngularDeltas, inertialFrame.frame); - } - - if (rigidbodyAngularW > 0 || invRotationalMasses[particleIndex] > 0) - { - // bend/twist constraint: - quaternion omega = math.mul(math.conjugate(orientations[particleIndex]), predictedRotation); //darboux vector - - quaternion omega_plus; - omega_plus.value = omega.value + restDarboux[i].value; //delta Omega with - omega_0 - omega.value -= restDarboux[i].value; //delta Omega with + omega_0 - if (math.lengthsq(omega.value) > math.lengthsq(omega_plus.value)) - omega = omega_plus; - - float3 dlambda = (omega.value.xyz - compliances.y * lambda.xyz) / (compliances.y + invRotationalMasses[particleIndex] + rigidbodyAngularW + BurstMath.epsilon); - lambda.xyz += dlambda; - - //discrete Darboux vector does not have vanishing scalar part - quaternion dlambdaQ = new quaternion(dlambda[0], dlambda[1], dlambda[2], 0); - - quaternion orientDelta = orientationDeltas[particleIndex]; - orientDelta.value += math.mul(predictedRotation, dlambdaQ).value * invRotationalMasses[particleIndex] / substepsToEnd; - orientationDeltas[particleIndex] = orientDelta; - orientationCounts[particleIndex]++; + float rigidbodyLinearW = 0; + float rigidbodyAngularW = 0; if (rigidbodyIndex >= 0) { - BurstMath.ApplyDeltaQuaternion(rigidbodyIndex, - predictedRotation, - -math.mul(orientations[particleIndex], dlambdaQ).value * rigidbodyAngularW, - rigidbodyAngularDeltas, inertialFrame.frame, frameEnd); - } - } + var rigidbody = rigidbodies[rigidbodyIndex]; - lambdas[i] = lambda; + // predict offset point position: + float4 velocityAtPoint = BurstMath.GetRigidbodyVelocityAtPoint(rigidbodyIndex, inertialFrame.frame.InverseTransformPoint(worldPinOffset), rigidbodies, rigidbodyLinearDeltas, rigidbodyAngularDeltas, inertialFrame.frame); + predictedPinOffset = BurstIntegration.IntegrateLinear(predictedPinOffset, inertialFrame.frame.TransformVector(velocityAtPoint), stepTime); + + // predict rotation at the end of the step: + predictedRotation = BurstIntegration.IntegrateAngular(predictedRotation, rigidbody.angularVelocity + rigidbodyAngularDeltas[rigidbodyIndex], stepTime); + + // calculate linear and angular rigidbody weights: + rigidbodyLinearW = rigidbody.inverseMass; + rigidbodyAngularW = BurstMath.RotationalInvMass(rigidbody.inverseInertiaTensor, + worldPinOffset - rigidbody.com, + math.normalizesafe(inertialFrame.frame.TransformPoint(particlePosition) - predictedPinOffset)); + + } + + // Transform pin position to solver space for constraint solving: + predictedPinOffset = inertialFrame.frame.InverseTransformPoint(predictedPinOffset); + predictedRotation = math.mul(math.conjugate(inertialFrame.frame.rotation), predictedRotation); + + float4 gradient = particlePosition - predictedPinOffset; + float constraint = math.length(gradient); + float4 gradientDir = gradient / (constraint + BurstMath.epsilon); + + float4 lambda = lambdas[i]; + float linearDLambda = (-constraint - compliances.x * lambda.w) / (invMasses[particleIndex] + rigidbodyLinearW + rigidbodyAngularW + compliances.x + BurstMath.epsilon); + lambda.w += linearDLambda; + float4 correction = linearDLambda * gradientDir; + + deltas[particleIndex] += correction * invMasses[particleIndex] / substeps; + counts[particleIndex]++; + + if (rigidbodyIndex >= 0) + { + BurstMath.ApplyImpulse(rigidbodyIndex, + -correction / stepTime * 1, + inertialFrame.frame.InverseTransformPoint(worldPinOffset), + rigidbodies, rigidbodyLinearDeltas, rigidbodyAngularDeltas, inertialFrame.frame); + } + + if (rigidbodyAngularW > 0 || invRotationalMasses[particleIndex] > 0) + { + // bend/twist constraint: + quaternion omega = math.mul(math.conjugate(orientations[particleIndex]), predictedRotation); //darboux vector + + quaternion omega_plus; + omega_plus.value = omega.value + restDarboux[i].value; //delta Omega with - omega_0 + omega.value -= restDarboux[i].value; //delta Omega with + omega_0 + if (math.lengthsq(omega.value) > math.lengthsq(omega_plus.value)) + omega = omega_plus; + + float3 dlambda = (omega.value.xyz - compliances.y * lambda.xyz) / new float3(compliances.y + invRotationalMasses[particleIndex] + rigidbodyAngularW + BurstMath.epsilon); + lambda.xyz += dlambda; + + //discrete Darboux vector does not have vanishing scalar part + quaternion dlambdaQ = new quaternion(dlambda[0], dlambda[1], dlambda[2], 0); + + quaternion orientDelta = orientationDeltas[particleIndex]; + orientDelta.value += math.mul(predictedRotation, dlambdaQ).value * invRotationalMasses[particleIndex] / substeps; + orientationDeltas[particleIndex] = orientDelta; + orientationCounts[particleIndex]++; + + if (rigidbodyIndex >= 0) + { + BurstMath.ApplyDeltaQuaternion(rigidbodyIndex, + predictedRotation, + -math.mul(orientations[particleIndex], dlambdaQ).value * rigidbodyAngularW, + rigidbodyAngularDeltas, inertialFrame.frame, stepTime); + } + } + + lambdas[i] = lambda; + } } } @@ -370,40 +275,6 @@ namespace Obi } } } - - [BurstCompile] - public struct ProjectRenderablePositionsJob : IJobParallelFor - { - [ReadOnly] public NativeArray particleIndices; - [ReadOnly] public NativeArray colliderIndices; - - [ReadOnly] public NativeArray offsets; - [ReadOnly] public NativeArray stiffnesses; - [ReadOnly] public NativeArray restDarboux; - - [ReadOnly] public NativeArray transforms; - - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray renderablePositions; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray renderableOrientations; - - [ReadOnly] public BurstInertialFrame inertialFrame; - - public void Execute(int i) - { - int particleIndex = particleIndices[i]; - int colliderIndex = colliderIndices[i]; - - // no collider to pin to or projection deactivated, so ignore the constraint. - if (colliderIndex < 0 || offsets[i].w < 0.5f) - return; - - BurstAffineTransform attachmentMatrix = inertialFrame.frame.Inverse() * transforms[colliderIndex]; - - renderablePositions[particleIndex] = attachmentMatrix.TransformPoint(offsets[i]); - if (stiffnesses[i].y < 10000) - renderableOrientations[particleIndex] = math.mul(attachmentMatrix.rotation, restDarboux[i]); - } - } } } #endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Pinhole.meta b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Pinhole.meta deleted file mode 100644 index 75112eaea..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Pinhole.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 744a58a1ca5364e0a86c93e04770c0b8 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Pinhole/BurstPinholeConstraints.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Pinhole/BurstPinholeConstraints.cs deleted file mode 100644 index 7c962bbc0..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Pinhole/BurstPinholeConstraints.cs +++ /dev/null @@ -1,26 +0,0 @@ -#if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) -using System; - -namespace Obi -{ - public class BurstPinholeConstraints : BurstConstraintsImpl - { - public BurstPinholeConstraints(BurstSolverImpl solver) : base(solver, Oni.ConstraintType.Pinhole) - { - } - - public override IConstraintsBatchImpl CreateConstraintsBatch() - { - var dataBatch = new BurstPinholeConstraintsBatch(this); - batches.Add(dataBatch); - return dataBatch; - } - - public override void RemoveBatch(IConstraintsBatchImpl batch) - { - batches.Remove(batch as BurstPinholeConstraintsBatch); - batch.Destroy(); - } - } -} -#endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Pinhole/BurstPinholeConstraints.cs.meta b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Pinhole/BurstPinholeConstraints.cs.meta deleted file mode 100644 index 17b0fea75..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Pinhole/BurstPinholeConstraints.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 71db1a3a2698147deb04f0264e4a728f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Pinhole/BurstPinholeConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Pinhole/BurstPinholeConstraintsBatch.cs deleted file mode 100644 index 7f0a2b9c9..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Pinhole/BurstPinholeConstraintsBatch.cs +++ /dev/null @@ -1,490 +0,0 @@ - #if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) -using UnityEngine; -using Unity.Jobs; -using Unity.Collections; -using Unity.Collections.LowLevel.Unsafe; -using Unity.Mathematics; -using Unity.Burst; -using System.Collections.Generic; -using System.Threading; - -namespace Obi -{ - public class BurstPinholeConstraintsBatch : BurstConstraintsBatchImpl, IPinholeConstraintsBatchImpl - { - private NativeArray colliderIndices; - private NativeArray offsets; - private NativeArray edgeMus; - private NativeArray edgeRanges; - private NativeArray edgeRangeMus; - private NativeArray parameters; - private NativeArray relativeVelocities; - - public BurstPinholeConstraintsBatch(BurstPinholeConstraints constraints) - { - m_Constraints = constraints; - m_ConstraintType = Oni.ConstraintType.Pinhole; - } - - public void SetPinholeConstraints(ObiNativeIntList particleIndices, ObiNativeIntList colliderIndices, ObiNativeVector4List offsets, ObiNativeFloatList edgeMus, ObiNativeIntList edgeRanges, ObiNativeFloatList edgeRangeMus, ObiNativeFloatList parameters, ObiNativeFloatList relativeVelocities, ObiNativeFloatList lambdas, int count) - { - this.particleIndices = particleIndices.AsNativeArray(); - this.colliderIndices = colliderIndices.AsNativeArray(); - this.offsets = offsets.AsNativeArray(); - this.edgeMus = edgeMus.AsNativeArray(); - this.edgeRanges = edgeRanges.AsNativeArray(); - this.edgeRangeMus = edgeRangeMus.AsNativeArray(); - this.parameters = parameters.AsNativeArray(); - this.relativeVelocities = relativeVelocities.AsNativeArray(); - this.lambdas = lambdas.AsNativeArray(); - m_ConstraintCount = count; - } - - public override JobHandle Initialize(JobHandle inputDeps, float stepTime, float substepTime, int steps, float timeLeft) - { - var clearPins = new ClearPinsJob - { - colliderIndices = colliderIndices, - shapes = ObiColliderWorld.GetInstance().colliderShapes.AsNativeArray(), - rigidbodies = ObiColliderWorld.GetInstance().rigidbodies.AsNativeArray(), - }; - inputDeps = clearPins.Schedule(m_ConstraintCount, 128, inputDeps); - - var updatePins = new UpdatePinsJob - { - particleIndices = particleIndices, - colliderIndices = colliderIndices, - offsets = offsets, - edgeMus = edgeMus, - edgeRangeMus = edgeRangeMus, - relativeVelocities = relativeVelocities, - parameters = parameters, - edgeRanges = edgeRanges, - - positions = solverImplementation.positions, - prevPositions = solverImplementation.prevPositions, - invMasses = solverImplementation.invMasses, - - deformableEdges = solverImplementation.abstraction.deformableEdges.AsNativeArray(), - - shapes = ObiColliderWorld.GetInstance().colliderShapes.AsNativeArray(), - transforms = ObiColliderWorld.GetInstance().colliderTransforms.AsNativeArray(), - rigidbodies = ObiColliderWorld.GetInstance().rigidbodies.AsNativeArray(), - rigidbodyLinearDeltas = solverImplementation.abstraction.rigidbodyLinearDeltas.AsNativeArray(), - rigidbodyAngularDeltas = solverImplementation.abstraction.rigidbodyAngularDeltas.AsNativeArray(), - - inertialFrame = ((BurstSolverImpl)constraints.solver).inertialFrame, - stepTime = stepTime, - steps = steps, - substepTime = substepTime, - timeLeft = timeLeft, - activeConstraintCount = m_ConstraintCount - }; - inputDeps = updatePins.Schedule(m_ConstraintCount, 128, inputDeps); - - // clear lambdas: - return base.Initialize(inputDeps, stepTime, substepTime, steps, timeLeft); - } - - public override JobHandle Evaluate(JobHandle inputDeps, float stepTime, float substepTime, int steps, float timeLeft) - { - var projectConstraints = new PinholeConstraintsBatchJob() - { - particleIndices = particleIndices, - colliderIndices = colliderIndices, - offsets = offsets, - edgeMus = edgeMus, - parameters = parameters, - lambdas = lambdas, - - positions = solverImplementation.positions, - prevPositions = solverImplementation.prevPositions, - invMasses = solverImplementation.invMasses, - - deformableEdges = solverImplementation.abstraction.deformableEdges.AsNativeArray(), - - shapes = ObiColliderWorld.GetInstance().colliderShapes.AsNativeArray(), - transforms = ObiColliderWorld.GetInstance().colliderTransforms.AsNativeArray(), - rigidbodies = ObiColliderWorld.GetInstance().rigidbodies.AsNativeArray(), - rigidbodyLinearDeltas = solverImplementation.abstraction.rigidbodyLinearDeltas.AsNativeArray(), - rigidbodyAngularDeltas = solverImplementation.abstraction.rigidbodyAngularDeltas.AsNativeArray(), - - deltas = solverImplementation.positionDeltas, - counts = solverImplementation.positionConstraintCounts, - - inertialFrame = ((BurstSolverImpl)constraints.solver).inertialFrame, - stepTime = stepTime, - steps = steps, - substepTime = substepTime, - timeLeft = timeLeft, - activeConstraintCount = m_ConstraintCount - }; - - return projectConstraints.Schedule(m_ConstraintCount, 16, inputDeps); - } - - public override JobHandle Apply(JobHandle inputDeps, float substepTime) - { - var cparameters = solverAbstraction.GetConstraintParameters(m_ConstraintType); - - var applyConstraints = new ApplyPinholeConstraintsBatchJob() - { - particleIndices = particleIndices, - deformableEdges = solverImplementation.abstraction.deformableEdges.AsNativeArray(), - - positions = solverImplementation.positions, - deltas = solverImplementation.positionDeltas, - counts = solverImplementation.positionConstraintCounts, - - sorFactor = cparameters.SORFactor, - activeConstraintCount = m_ConstraintCount, - }; - - return applyConstraints.Schedule(inputDeps); - } - - [BurstCompile] - public unsafe struct ClearPinsJob : IJobParallelFor - { - [ReadOnly] public NativeArray colliderIndices; - [ReadOnly] public NativeArray shapes; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray rigidbodies; - - public void Execute(int i) - { - int colliderIndex = colliderIndices[i]; - - // no collider to pin to, so ignore the constraint. - if (colliderIndex < 0) - return; - - int rigidbodyIndex = shapes[colliderIndex].rigidbodyIndex; - if (rigidbodyIndex >= 0) - { - BurstRigidbody* arr = (BurstRigidbody*)rigidbodies.GetUnsafePtr(); - Interlocked.Exchange(ref arr[rigidbodyIndex].constraintCount, 0); - } - } - } - - [BurstCompile] - public unsafe struct UpdatePinsJob : IJobParallelFor - { - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray particleIndices; - - [ReadOnly] public NativeArray edgeRanges; - [ReadOnly] public NativeArray edgeRangeMus; - [ReadOnly] public NativeArray offsets; - [ReadOnly] public NativeArray parameters; // compliance, friction, motor speed, motor force, clamp behavior. - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray edgeMus; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray relativeVelocities; - - [ReadOnly] public NativeArray positions; - [ReadOnly] public NativeArray prevPositions; - [ReadOnly] public NativeArray invMasses; - - [ReadOnly] public NativeArray deformableEdges; - - [ReadOnly] public NativeArray colliderIndices; - [ReadOnly] public NativeArray shapes; - [ReadOnly] public NativeArray transforms; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray rigidbodies; - - [ReadOnly] public NativeArray rigidbodyLinearDeltas; - [ReadOnly] public NativeArray rigidbodyAngularDeltas; - - [ReadOnly] public BurstInertialFrame inertialFrame; - [ReadOnly] public float stepTime; - [ReadOnly] public float substepTime; - [ReadOnly] public float timeLeft; - [ReadOnly] public int steps; - [ReadOnly] public int activeConstraintCount; - - private bool IsEdgeValid(int edgeIndex, int nextEdgeIndex, float mix) - { - return mix < 0 ? deformableEdges[nextEdgeIndex * 2 + 1] == deformableEdges[edgeIndex * 2] : - deformableEdges[nextEdgeIndex * 2] == deformableEdges[edgeIndex * 2 + 1]; - } - - private bool ClampToRange(int i, int edgeIndex, ref float mix) - { - bool clamped = false; - if (edgeIndex == edgeRanges[i].x && mix < edgeRangeMus[i].x) - { - mix = edgeRangeMus[i].x; - clamped = true; - } - if (edgeIndex == edgeRanges[i].y && mix > edgeRangeMus[i].y) - { - mix = edgeRangeMus[i].y; - clamped = true; - } - return clamped; - } - - public void Execute(int i) - { - int edgeIndex = particleIndices[i]; - int colliderIndex = colliderIndices[i]; - - // if no collider or edge, ignore the constraint. - if (colliderIndex < 0 || edgeIndex < 0) - return; - - // Increment the amount of constraints affecting this rigidbody for mass splitting: - int rigidbodyIndex = shapes[colliderIndex].rigidbodyIndex; - if (rigidbodyIndex >= 0) - { - BurstRigidbody* arr = (BurstRigidbody*)rigidbodies.GetUnsafePtr(); - Interlocked.Increment(ref arr[rigidbodyIndex].constraintCount); - } - - float frameEnd = stepTime * steps; - float substepsToEnd = timeLeft / substepTime; - - int p1 = deformableEdges[edgeIndex * 2]; - int p2 = deformableEdges[edgeIndex * 2 + 1]; - int edgeCount = math.max(0, edgeRanges[i].y - edgeRanges[i].x + 1); - - // express pin offset in world space: - float4 worldPinOffset = transforms[colliderIndex].TransformPoint(offsets[i]); - float4 predictedPinOffset = worldPinOffset; - - if (rigidbodyIndex >= 0) - { - // predict offset point position using rb velocity at that point (can't integrate transform since position != center of mass) - float4 pointVelocity = BurstMath.GetRigidbodyVelocityAtPoint(rigidbodyIndex, inertialFrame.frame.InverseTransformPoint(worldPinOffset), rigidbodies, rigidbodyLinearDeltas, rigidbodyAngularDeltas, inertialFrame); - predictedPinOffset = BurstIntegration.IntegrateLinear(predictedPinOffset, inertialFrame.frame.TransformVector(pointVelocity), frameEnd); - } - - // transform pinhole position to solver space for constraint solving: - float4 solverPredictedOffset = inertialFrame.frame.InverseTransformPoint(predictedPinOffset); - - // get current edge data: - float4 particlePosition1 = math.lerp(prevPositions[p1], positions[p1], substepsToEnd); - float4 particlePosition2 = math.lerp(prevPositions[p2], positions[p2], substepsToEnd); - float edgeLength = math.length(particlePosition1 - particlePosition2) + BurstMath.epsilon; - BurstMath.NearestPointOnEdge(particlePosition1, particlePosition2, solverPredictedOffset, out float mix, false); - - // calculate current relative velocity between rope and pinhole: - float velocity = (mix - edgeMus[i]) / substepTime * edgeLength; // vel = pos / time. - relativeVelocities[i] = velocity; - - //apply motor force: - float targetAccel = (parameters[i * 5 + 2] - velocity) / substepTime; // accel = vel / time. - float maxAccel = parameters[i * 5 + 3] * math.max(math.lerp(invMasses[p1], invMasses[p2], mix), BurstMath.epsilon); // accel = force / mass. Guard against inf*0 - velocity += math.clamp(targetAccel, -maxAccel, maxAccel) * substepTime; - - // calculate new position by adding motor acceleration: - float corrMix = edgeMus[i] + velocity * substepTime / edgeLength; - - // apply artificial friction by interpolating predicted position and corrected position. - mix = math.lerp(mix, corrMix, parameters[i * 5 + 1]); - - // move to an adjacent edge if needed: - if (!ClampToRange(i, edgeIndex, ref mix) && (mix < 0 || mix > 1)) - { - bool clampOnEnd = parameters[i * 5 + 4] > 0.5f; - - // calculate distance we need to travel along edge chain: - float distToTravel = math.length(particlePosition1 - particlePosition2) * (mix < 0 ? -mix : mix - 1); - - int nextEdgeIndex; - for (int k = 0; k < 10; ++k) // look up to 10 edges away. - { - // calculate index of next edge: - nextEdgeIndex = mix < 0 ? edgeIndex - 1 : edgeIndex + 1; - nextEdgeIndex = edgeRanges[i].x + (int)BurstMath.nfmod(nextEdgeIndex - edgeRanges[i].x, edgeCount); - - // see if it's valid - if (!IsEdgeValid(edgeIndex, nextEdgeIndex, mix)) - { - // disable constraint if needed - if (!clampOnEnd) { particleIndices[i] = -1; return; } - - // otherwise clamp: - mix = math.saturate(mix); - break; - } - - // advance to next edge: - edgeIndex = nextEdgeIndex; - p1 = deformableEdges[edgeIndex * 2]; - p2 = deformableEdges[edgeIndex * 2 + 1]; - particlePosition1 = math.lerp(prevPositions[p1], positions[p1], substepsToEnd); - particlePosition2 = math.lerp(prevPositions[p2], positions[p2], substepsToEnd); - edgeLength = math.length(particlePosition1 - particlePosition2) + BurstMath.epsilon; - - // stop if we reached target edge: - if (distToTravel <= edgeLength) - { - mix = mix < 0 ? 1 - math.saturate(distToTravel / edgeLength) : math.saturate(distToTravel / edgeLength); - ClampToRange(i, edgeIndex, ref mix); - break; - } - - // stop if we reached end of range: - if (ClampToRange(i, edgeIndex, ref mix)) - break; - - distToTravel -= edgeLength; - } - } - - edgeMus[i] = mix; - particleIndices[i] = edgeIndex; - } - } - - [BurstCompile] - public unsafe struct PinholeConstraintsBatchJob : IJobParallelFor - { - [ReadOnly] public NativeArray particleIndices; - [ReadOnly] public NativeArray colliderIndices; - - [ReadOnly] public NativeArray offsets; - [ReadOnly] public NativeArray parameters; // compliance, friction, motor speed, motor force, clamp behavior. - [ReadOnly] public NativeArray edgeMus; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray lambdas; - - [ReadOnly] public NativeArray positions; - [ReadOnly] public NativeArray prevPositions; - [ReadOnly] public NativeArray invMasses; - - [ReadOnly] public NativeArray deformableEdges; - - [ReadOnly] public NativeArray shapes; - [ReadOnly] public NativeArray transforms; - [ReadOnly] public NativeArray rigidbodies; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray rigidbodyLinearDeltas; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray rigidbodyAngularDeltas; - - [NativeDisableContainerSafetyRestriction][NativeDisableParallelForRestriction] public NativeArray deltas; - [NativeDisableContainerSafetyRestriction][NativeDisableParallelForRestriction] public NativeArray counts; - - [ReadOnly] public BurstInertialFrame inertialFrame; - [ReadOnly] public float stepTime; - [ReadOnly] public float substepTime; - [ReadOnly] public float timeLeft; - [ReadOnly] public int steps; - [ReadOnly] public int activeConstraintCount; - - public void Execute(int i) - { - int edgeIndex = particleIndices[i]; - int colliderIndex = colliderIndices[i]; - - // if no collider or edge, ignore the constraint. - if (edgeIndex < 0 || colliderIndex < 0) - return; - - float frameEnd = stepTime * steps; - float substepsToEnd = timeLeft / substepTime; - - // calculate time adjusted compliance - float compliance = parameters[i * 5] / (substepTime * substepTime); - - int p1 = deformableEdges[edgeIndex * 2]; - int p2 = deformableEdges[edgeIndex * 2 + 1]; - - // calculate projection on current edge: - float mix = edgeMus[i]; - float4 particlePosition1 = math.lerp(prevPositions[p1], positions[p1], substepsToEnd); - float4 particlePosition2 = math.lerp(prevPositions[p2], positions[p2], substepsToEnd); - float4 projection = math.lerp(particlePosition1, particlePosition2, mix); - - // express pin offset in world space: - float4 worldPinOffset = transforms[colliderIndex].TransformPoint(offsets[i]); - float4 predictedPinOffset = worldPinOffset; - - float rigidbodyLinearW = 0; - float rigidbodyAngularW = 0; - - int rigidbodyIndex = shapes[colliderIndex].rigidbodyIndex; - if (rigidbodyIndex >= 0) - { - var rigidbody = rigidbodies[rigidbodyIndex]; - - // predict offset point position using rb velocity at that point (can't integrate transform since position != center of mass) - float4 pointVelocity = BurstMath.GetRigidbodyVelocityAtPoint(rigidbodyIndex, inertialFrame.frame.InverseTransformPoint(worldPinOffset), rigidbodies, rigidbodyLinearDeltas, rigidbodyAngularDeltas, inertialFrame); - predictedPinOffset = BurstIntegration.IntegrateLinear(predictedPinOffset, inertialFrame.frame.TransformVector(pointVelocity), frameEnd); - - // calculate linear and angular rigidbody effective masses (mass splitting: multiply by constraint count) - rigidbodyLinearW = rigidbody.inverseMass * rigidbody.constraintCount; - rigidbodyAngularW = BurstMath.RotationalInvMass(rigidbody.inverseInertiaTensor, - worldPinOffset - rigidbody.com, - math.normalizesafe(inertialFrame.frame.TransformPoint(projection) - predictedPinOffset)) * rigidbody.constraintCount; - } - - // Transform pinhole position to solver space for constraint solving: - predictedPinOffset = inertialFrame.frame.InverseTransformPoint(predictedPinOffset); - - float4 gradient = projection - predictedPinOffset; - float constraint = math.length(gradient); - float4 gradientDir = gradient / (constraint + BurstMath.epsilon); - - float lambda = (-constraint - compliance * lambdas[i]) / (math.lerp(invMasses[p1], invMasses[p2], mix) + rigidbodyLinearW + rigidbodyAngularW + compliance + BurstMath.epsilon); - lambdas[i] += lambda; - float4 correction = lambda * gradientDir; - - float baryScale = BurstMath.BaryScale(new float4(1 - mix, mix, 0, 0)); - - deltas[p1] += correction * baryScale * invMasses[p1] * (1 - mix) / substepsToEnd; - counts[p1]++; - - deltas[p2] += correction * baryScale * invMasses[p2] * mix / substepsToEnd; - counts[p2]++; - - if (rigidbodyIndex >= 0) - { - BurstMath.ApplyImpulse(rigidbodyIndex, - -correction / frameEnd, - inertialFrame.frame.InverseTransformPoint(worldPinOffset), - rigidbodies, rigidbodyLinearDeltas, rigidbodyAngularDeltas, inertialFrame.frame); - } - } - } - - [BurstCompile] - public struct ApplyPinholeConstraintsBatchJob : IJob - { - [ReadOnly] public NativeArray particleIndices; - [ReadOnly] public float sorFactor; - - [ReadOnly] public NativeArray deformableEdges; - - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray positions; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray deltas; - [NativeDisableContainerSafetyRestriction] [NativeDisableParallelForRestriction] public NativeArray counts; - - [ReadOnly] public int activeConstraintCount; - - public void Execute() - { - for (int i = 0; i < activeConstraintCount; ++i) - { - int edgeIndex = particleIndices[i]; - if (edgeIndex < 0) continue; - - int p1 = deformableEdges[edgeIndex * 2]; - int p2 = deformableEdges[edgeIndex * 2 + 1]; - - if (counts[p1] > 0) - { - positions[p1] += deltas[p1] * sorFactor / counts[p1]; - deltas[p1] = float4.zero; - counts[p1] = 0; - } - - if (counts[p2] > 0) - { - positions[p2] += deltas[p2] * sorFactor / counts[p2]; - deltas[p2] = float4.zero; - counts[p2] = 0; - } - } - } - } - } -} -#endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Pinhole/BurstPinholeConstraintsBatch.cs.meta b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Pinhole/BurstPinholeConstraintsBatch.cs.meta deleted file mode 100644 index a62fb0bef..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Pinhole/BurstPinholeConstraintsBatch.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7c3a800919e2e435785c5beca1029b70 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/ShapeMatching/BurstShapeMatchingConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/ShapeMatching/BurstShapeMatchingConstraintsBatch.cs index bb7f43537..c73dc01c4 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/ShapeMatching/BurstShapeMatchingConstraintsBatch.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/ShapeMatching/BurstShapeMatchingConstraintsBatch.cs @@ -23,8 +23,6 @@ namespace Obi private NativeArray linearTransforms; private NativeArray plasticDeformations; - private bool m_RecalculateRestShape = false; - public BurstShapeMatchingConstraintsBatch(BurstShapeMatchingConstraints constraints) { m_Constraints = constraints; @@ -69,37 +67,13 @@ namespace Obi Aqq.Dispose(); } - public override JobHandle Initialize(JobHandle inputDeps, float stepTime, float substepTime, int steps, float timeLeft) + public override JobHandle Initialize(JobHandle inputDeps, float substepTime) { return inputDeps; } - public override JobHandle Evaluate(JobHandle inputDeps, float stepTime, float substepTime, int steps, float timeLeft) + public override JobHandle Evaluate(JobHandle inputDeps, float stepTime, float substepTime, int substeps) { - if (m_RecalculateRestShape) - { - m_RecalculateRestShape = false; - - var calculateRest = new ShapeMatchingCalculateRestJob() - { - particleIndices = particleIndices, - firstIndex = firstIndex, - numIndices = numIndices, - restComs = restComs, - coms = coms, - Aqq = Aqq, - deformation = plasticDeformations, - - restPositions = solverAbstraction.restPositions.AsNativeArray(), - restOrientations = solverAbstraction.restOrientations.AsNativeArray(), - principalRadii = solverAbstraction.principalRadii.AsNativeArray(), - invMasses = solverAbstraction.invMasses.AsNativeArray(), - invRotationalMasses = solverAbstraction.invRotationalMasses.AsNativeArray(), - }; - - inputDeps = calculateRest.Schedule(numIndices.Length, 64, inputDeps); - } - var projectConstraints = new ShapeMatchingConstraintsBatchJob() { particleIndices = particleIndices, @@ -120,7 +94,7 @@ namespace Obi restOrientations = solverImplementation.restOrientations, invMasses = solverImplementation.invMasses, invRotationalMasses = solverImplementation.invRotationalMasses, - principalRadii = solverImplementation.principalRadii, + invInertiaTensors = solverImplementation.invInertiaTensors, deltas = solverImplementation.positionDeltas, counts = solverImplementation.positionConstraintCounts, @@ -153,7 +127,25 @@ namespace Obi public void CalculateRestShapeMatching() { - m_RecalculateRestShape = true; + var deps = ((BurstSolverImpl)constraints.solver).RecalculateInertiaTensors(new JobHandle()); + + var calculateRest = new ShapeMatchingCalculateRestJob() + { + particleIndices = particleIndices, + firstIndex = firstIndex, + numIndices = numIndices, + restComs = restComs, + coms = coms, + Aqq = Aqq, + deformation = plasticDeformations, + + restPositions = solverAbstraction.restPositions.AsNativeArray(), + restOrientations = solverAbstraction.restOrientations.AsNativeArray(), + invMasses = solverAbstraction.invMasses.AsNativeArray(), + invInertiaTensors = solverAbstraction.invInertiaTensors.AsNativeArray(), + }; + + calculateRest.Schedule(numIndices.Length, 64, deps).Complete(); } protected static void RecalculateRestData(int i, @@ -164,10 +156,9 @@ namespace Obi ref NativeArray deformation, ref NativeArray numIndices, ref NativeArray invMasses, - ref NativeArray invRotationalMasses, ref NativeArray restPositions, ref NativeArray restOrientations, - ref NativeArray principalRadii) + ref NativeArray invInertiaTensors) { int k = 0; float maximumMass = 10000; @@ -194,7 +185,7 @@ namespace Obi particleR[3][3] = 0; _Rqq += math.mul(particleR, - math.mul(BurstMath.GetParticleInertiaTensor(principalRadii[k], invRotationalMasses[k]).asDiagonal(), + math.mul(math.rcp(invInertiaTensors[k] + new float4(BurstMath.epsilon)).asDiagonal(), math.transpose(particleR)) ); @@ -234,8 +225,7 @@ namespace Obi [ReadOnly] public NativeArray restPositions; [ReadOnly] public NativeArray restOrientations; [ReadOnly] public NativeArray invMasses; - [ReadOnly] public NativeArray invRotationalMasses; - [ReadOnly] public NativeArray principalRadii; + [ReadOnly] public NativeArray invInertiaTensors; public void Execute(int i) { @@ -247,10 +237,9 @@ namespace Obi ref deformation, ref numIndices, ref invMasses, - ref invRotationalMasses, ref restPositions, ref restOrientations, - ref principalRadii); + ref invInertiaTensors); } } @@ -276,7 +265,7 @@ namespace Obi [ReadOnly] public NativeArray restOrientations; [ReadOnly] public NativeArray invMasses; [ReadOnly] public NativeArray invRotationalMasses; - [ReadOnly] public NativeArray principalRadii; + [ReadOnly] public NativeArray invInertiaTensors; [NativeDisableContainerSafetyRestriction][NativeDisableParallelForRestriction] public NativeArray orientations; [NativeDisableContainerSafetyRestriction][NativeDisableParallelForRestriction] public NativeArray deltas; @@ -309,7 +298,7 @@ namespace Obi particleRT[3][3] = 0; Rpq += math.mul(particleR, - math.mul(BurstMath.GetParticleInertiaTensor(principalRadii[k], invRotationalMasses[k]).asDiagonal(), + math.mul(math.rcp(invInertiaTensors[k] + new float4(BurstMath.epsilon)).asDiagonal(), math.transpose(particleRT)) ); @@ -338,7 +327,7 @@ namespace Obi linearTransforms[i] = math.mul(Apq_def, Aqq[i]); // extract rotation from transform matrix, using warmstarting and few iterations: - constraintOrientations[i] = BurstMath.ExtractRotation(Apq_def, constraintOrientations[i], 5); + constraintOrientations[i] = BurstMath.ExtractRotation(Apq_def, constraintOrientations[i], 2); // finally, obtain rotation matrix: float4x4 R = constraintOrientations[i].toMatrix(); @@ -411,10 +400,9 @@ namespace Obi ref deformation, ref numIndices, ref invMasses, - ref invRotationalMasses, ref restPositions, ref restOrientations, - ref principalRadii); + ref invInertiaTensors); } } @@ -430,10 +418,9 @@ namespace Obi ref deformation, ref numIndices, ref invMasses, - ref invRotationalMasses, ref restPositions, ref restOrientations, - ref principalRadii); + ref invInertiaTensors); } } } diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Skin/BurstSkinConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Skin/BurstSkinConstraintsBatch.cs index 85d1a9796..01ebb638b 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Skin/BurstSkinConstraintsBatch.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Skin/BurstSkinConstraintsBatch.cs @@ -33,7 +33,7 @@ namespace Obi m_ConstraintCount = count; } - public override JobHandle Evaluate(JobHandle inputDeps, float stepTime, float substepTime, int steps, float timeLeft) + public override JobHandle Evaluate(JobHandle inputDeps, float stepTime, float substepTime, int substeps) { var projectConstraints = new SkinConstraintsBatchJob() { diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Stitch/BurstStitchConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Stitch/BurstStitchConstraintsBatch.cs index 934e06c45..58cabef91 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Stitch/BurstStitchConstraintsBatch.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Stitch/BurstStitchConstraintsBatch.cs @@ -27,7 +27,7 @@ namespace Obi m_ConstraintCount = count; } - public override JobHandle Evaluate(JobHandle inputDeps, float stepTime, float substepTime, int steps, float timeLeft) + public override JobHandle Evaluate(JobHandle inputDeps, float stepTime, float substepTime, int substeps) { var projectConstraints = new StitchConstraintsBatchJob() { diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/StretchShear/BurstStretchShearConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/StretchShear/BurstStretchShearConstraintsBatch.cs index 006153e1a..4824c5bab 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/StretchShear/BurstStretchShearConstraintsBatch.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/StretchShear/BurstStretchShearConstraintsBatch.cs @@ -33,7 +33,7 @@ namespace Obi m_ConstraintCount = count; } - public override JobHandle Evaluate(JobHandle inputDeps, float stepTime, float substepTime, int steps, float timeLeft) + public override JobHandle Evaluate(JobHandle inputDeps, float stepTime, float substepTime, int substeps) { var projectConstraints = new StretchShearConstraintsBatchJob() { @@ -126,8 +126,8 @@ namespace Obi // subtract third director vector (0,0,1): gamma[2] -= 1; - float3 W = new float3((w1 + w2) / (restLengths[i] + BurstMath.epsilon) + invRotationalMasses[q] * 4.0f * restLengths[i]); - float3 dlambda = (gamma - compliances * lambdas[i]) / (W + compliances + BurstMath.epsilon); + float3 W = new float3((w1 + w2) / (restLengths[i] + BurstMath.epsilon) + invRotationalMasses[q] * 4.0f * restLengths[i] + BurstMath.epsilon); + float3 dlambda = (gamma - compliances * lambdas[i]) / (compliances + W); lambdas[i] += dlambda; // convert lambda delta lambda back to world space: @@ -142,10 +142,7 @@ namespace Obi // calculate rotation delta: quaternion rotDelta = math.mul(new quaternion(dlambda[0], dlambda[1], dlambda[2], 0.0f),q_e_3_bar); rotDelta.value *= 2.0f * invRotationalMasses[q] * restLengths[i]; - - quaternion orDelta = orientationDeltas[q]; - orDelta.value += rotDelta.value; - orientationDeltas[q] = orDelta; + orientationDeltas[q] = rotDelta; counts[p1]++; counts[p2]++; diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Tether/BurstTetherConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Tether/BurstTetherConstraintsBatch.cs index eb1a4ee28..4e3cd237c 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Tether/BurstTetherConstraintsBatch.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Tether/BurstTetherConstraintsBatch.cs @@ -29,7 +29,7 @@ namespace Obi m_ConstraintCount = count; } - public override JobHandle Evaluate(JobHandle inputDeps, float stepTime, float substepTime, int steps, float timeLeft) + public override JobHandle Evaluate(JobHandle inputDeps, float stepTime, float substepTime, int substeps) { var projectConstraints = new TetherConstraintsBatchJob() { diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Volume/BurstVolumeConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Volume/BurstVolumeConstraintsBatch.cs index f813744dc..6d49fcd21 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Volume/BurstVolumeConstraintsBatch.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Constraints/Volume/BurstVolumeConstraintsBatch.cs @@ -40,7 +40,7 @@ namespace Obi } - public override JobHandle Evaluate(JobHandle inputDeps, float stepTime, float substepTime, int steps, float timeLeft) + public override JobHandle Evaluate(JobHandle inputDeps, float stepTime, float substepTime, int substeps) { var projectConstraints = new VolumeConstraintsBatchJob() { @@ -106,7 +106,10 @@ namespace Obi { float compliance = pressureStiffness[i].y / deltaTimeSqr; + NativeList particleIndices = new NativeList(numTriangles[i] * 3, Allocator.Temp); + // calculate volume: + float volume = 0; for (int j = 0; j < numTriangles[i]; ++j) { int v = (firstTriangle[i] + j) * 3; @@ -114,12 +117,21 @@ namespace Obi int i2 = triangles[v + 1]; int i3 = triangles[v + 2]; - gradients[i1] = new float4(0, 0, 0, 1); - gradients[i2] = new float4(0, 0, 0, 1); - gradients[i3] = new float4(0, 0, 0, 1); + particleIndices.Add(i1); + particleIndices.Add(i2); + particleIndices.Add(i3); + + //calculate this triangle's volume contribution: + volume += math.dot(math.cross(positions[i1].xyz, positions[i2].xyz), positions[i3].xyz) / 6.0f; } - float volume = 0; + particleIndices.Sort(); + int particleCount = particleIndices.AsArray().Unique(); + + // accumulate particle gradients: + for (int j = 0; j < particleCount; ++j) + gradients[particleIndices[j]] = float4.zero; + for (int j = 0; j < numTriangles[i]; ++j) { int v = (firstTriangle[i] + j) * 3; @@ -131,28 +143,14 @@ namespace Obi gradients[i1] += new float4(math.cross(positions[i2].xyz, positions[i3].xyz), 0); gradients[i2] += new float4(math.cross(positions[i3].xyz, positions[i1].xyz), 0); gradients[i3] += new float4(math.cross(positions[i1].xyz, positions[i2].xyz), 0); - - //calculate this triangle's volume contribution: - volume += math.dot(math.cross(positions[i1].xyz, positions[i2].xyz), positions[i3].xyz) / 6.0f; } // calculate constraint denominator (G(Cj)*inv(M)): float denominator = 0; - for (int j = 0; j < numTriangles[i]; ++j) + for (int j = 0; j < particleCount; ++j) { - int v = (firstTriangle[i] + j) * 3; - int i1 = triangles[v]; - int i2 = triangles[v + 1]; - int i3 = triangles[v + 2]; - - denominator += invMasses[i1] * math.lengthsq(gradients[i1].xyz) * gradients[i1].w; - gradients[i1] = new float4(gradients[i1].xyz,0); - - denominator += invMasses[i2] * math.lengthsq(gradients[i2].xyz) * gradients[i2].w; - gradients[i2] = new float4(gradients[i2].xyz, 0); - - denominator += invMasses[i3] * math.lengthsq(gradients[i3].xyz) * gradients[i3].w; - gradients[i3] = new float4(gradients[i3].xyz, 0); + int p = particleIndices[j]; + denominator += invMasses[p] * math.lengthsq(gradients[p]); } // equality constraint: volume - pressure * rest volume = 0 @@ -163,21 +161,11 @@ namespace Obi lambdas[i] += dlambda; // calculate position deltas: - for (int j = 0; j < numTriangles[i]; ++j) + for (int j = 0; j < particleCount; ++j) { - int v = (firstTriangle[i] + j) * 3; - int i1 = triangles[v]; - int i2 = triangles[v + 1]; - int i3 = triangles[v + 2]; - - deltas[i1] += dlambda * invMasses[i1] * gradients[i1]; - counts[i1]++; - - deltas[i2] += dlambda * invMasses[i2] * gradients[i2]; - counts[i2]++; - - deltas[i3] += dlambda * invMasses[i3] * gradients[i3]; - counts[i3]++; + int p = particleIndices[j]; + deltas[p] += dlambda * invMasses[p] * gradients[p]; + counts[p]++; } } } diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/BurstAabb.cs b/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/BurstAabb.cs index 5fea22d30..a02213b38 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/BurstAabb.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/BurstAabb.cs @@ -24,16 +24,16 @@ namespace Obi this.max = max; } - public BurstAabb(float4 v1, float4 v2, float4 v3, float4 margin) + public BurstAabb(float4 v1, float4 v2, float4 v3, float margin) { - min = math.min(math.min(v1, v2), v3) - margin; - max = math.max(math.max(v1, v2), v3) + margin; + min = math.min(math.min(v1, v2), v3) - new float4(margin, margin, margin, 0); + max = math.max(math.max(v1, v2), v3) + new float4(margin, margin, margin, 0); } - public BurstAabb(float4 v1, float4 v2, float4 margin) + public BurstAabb(float2 v1, float2 v2, float margin) { - min = math.min(v1, v2) - margin; - max = math.max(v1, v2) + margin; + min = new float4(math.min(v1, v2) - new float2(margin, margin),0,0); + max = new float4(math.max(v1, v2) + new float2(margin, margin),0,0); } public BurstAabb(float4 previousPosition, float4 position, float radius) @@ -50,7 +50,7 @@ namespace Obi public float MaxAxisLength() { - return math.cmax((max - min).xyz); + return math.cmax(max - min); } public void EncapsulateParticle(float4 position, float radius) diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/BurstAffineTransform.cs b/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/BurstAffineTransform.cs index f601191d2..cda36e3f0 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/BurstAffineTransform.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/BurstAffineTransform.cs @@ -36,13 +36,6 @@ namespace Obi 1 / scale); } - public BurstAffineTransform Integrate(float4 linearVelocity, float4 angularVelocity, float dt) - { - return new BurstAffineTransform(BurstIntegration.IntegrateLinear(translation, linearVelocity, dt), - BurstIntegration.IntegrateAngular(rotation, angularVelocity, dt), - scale); - } - public BurstAffineTransform Interpolate(BurstAffineTransform other, float translationalMu, float rotationalMu, float scaleMu) { return new BurstAffineTransform(math.lerp(translation, other.translation, translationalMu), diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/BurstCollisionMaterial.cs b/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/BurstCollisionMaterial.cs index a93368131..6bb3d5994 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/BurstCollisionMaterial.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/BurstCollisionMaterial.cs @@ -25,7 +25,7 @@ namespace Obi switch (frictionCombineMode) { - default: // average + case Oni.MaterialCombineMode.Average: result.dynamicFriction = (a.dynamicFriction + b.dynamicFriction) * 0.5f; result.staticFriction = (a.staticFriction + b.staticFriction) * 0.5f; result.rollingFriction = (a.rollingFriction + b.rollingFriction) * 0.5f; @@ -37,22 +37,22 @@ namespace Obi result.rollingFriction = math.min(a.rollingFriction, b.rollingFriction); break; - case Oni.MaterialCombineMode.Multiply: - result.dynamicFriction = a.dynamicFriction * b.dynamicFriction; - result.staticFriction = a.staticFriction * b.staticFriction; - result.rollingFriction = a.rollingFriction * b.rollingFriction; - break; - case Oni.MaterialCombineMode.Maximum: result.dynamicFriction = math.max(a.dynamicFriction, b.dynamicFriction); result.staticFriction = math.max(a.staticFriction, b.staticFriction); result.rollingFriction = math.max(a.rollingFriction, b.rollingFriction); break; + + case Oni.MaterialCombineMode.Multiply: + result.dynamicFriction = a.dynamicFriction * b.dynamicFriction; + result.staticFriction = a.staticFriction * b.staticFriction; + result.rollingFriction = a.rollingFriction * b.rollingFriction; + break; } switch (stickCombineMode) { - default: // average + case Oni.MaterialCombineMode.Average: result.stickiness = (a.stickiness + b.stickiness) * 0.5f; break; @@ -60,13 +60,13 @@ namespace Obi result.stickiness = math.min(a.stickiness, b.stickiness); break; - case Oni.MaterialCombineMode.Multiply: - result.stickiness = a.stickiness * b.stickiness; - break; - case Oni.MaterialCombineMode.Maximum: result.stickiness = math.max(a.stickiness, b.stickiness); break; + + case Oni.MaterialCombineMode.Multiply: + result.stickiness = a.stickiness * b.stickiness; + break; } result.stickDistance = math.max(a.stickDistance, b.stickDistance); diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/BurstInertialFrame.cs b/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/BurstInertialFrame.cs index a1e7b5513..a49d7d566 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/BurstInertialFrame.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/BurstInertialFrame.cs @@ -38,11 +38,6 @@ namespace Obi angularAcceleration = float4.zero; } - public float4 VelocityAtPoint(float4 point) - { - return velocity + new float4(math.cross(angularVelocity.xyz, (point - prevFrame.translation).xyz), 0); - } - public void Update(float4 position, float4 scale, quaternion rotation, float dt) { prevFrame = frame; diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/BurstPrefixSum.cs b/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/BurstPrefixSum.cs deleted file mode 100644 index c214ce9e9..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/BurstPrefixSum.cs +++ /dev/null @@ -1,128 +0,0 @@ -#if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) -using System.Collections.Generic; -using Unity.Burst; -using Unity.Collections; -using Unity.Collections.LowLevel.Unsafe; -using Unity.Jobs; -using Unity.Mathematics; - -namespace Obi -{ - public class BurstPrefixSum - { - private int inputSize; - private const int numBlocks = 8; - - private NativeArray blockSums; - - public BurstPrefixSum(int inputSize) - { - this.inputSize = inputSize; - blockSums = new NativeArray(numBlocks, Allocator.Persistent); - } - - public void Dispose() - { - if (blockSums.IsCreated) - blockSums.Dispose(); - } - - public unsafe JobHandle Sum(NativeArray input, NativeArray result, int* count, JobHandle inputDeps) - { - - // calculate partial prefix sums, one per block: - var job = new BlockSumJob - { - input = input, - output = result, - blocks = blockSums, - count = count - }; - inputDeps = job.Schedule(numBlocks, 1, inputDeps); - - var job3 = new BlockSum - { - blocks = blockSums - }; - inputDeps = job3.Schedule(inputDeps); - - // add the scanned partial block sums to the result: - var job2 = new PrefixSumJob - { - prefixBlocks = blockSums, - output = result, - count = count - }; - return job2.Schedule(numBlocks, 1, inputDeps); - } - - [BurstCompile] - unsafe struct BlockSumJob : IJobParallelFor - { - [ReadOnly] public NativeArray input; - [NativeDisableParallelForRestriction] public NativeArray output; - public NativeArray blocks; - - [ReadOnly] [NativeDisableUnsafePtrRestriction] public int* count; - - public void Execute(int block) - { - int length = *count + 1; // add 1 to get total sum in last element+1 - int blockSize = (int)math.ceil(length / (float)numBlocks); - - int start = block * blockSize; - int end = math.min(start + blockSize, length); - - output[start] = 0; - - if (blockSize == 0) { blocks[block] = 0; return; } - - for (int i = start + 1; i < end; ++i) - output[i] = output[i - 1] + input[i - 1]; - - blocks[block] = output[end - 1] + input[end - 1]; - } - } - - [BurstCompile] - struct BlockSum : IJob - { - public NativeArray blocks; - - public void Execute() - { - int aux = blocks[0]; - blocks[0] = 0; - - for (int i = 1; i < blocks.Length; ++i) - { - int a = blocks[i]; - blocks[i] = blocks[i - 1] + aux; - aux = a; - } - } - } - - [BurstCompile] - unsafe struct PrefixSumJob : IJobParallelFor - { - [ReadOnly] public NativeArray prefixBlocks; - [NativeDisableParallelForRestriction] public NativeArray output; - - [ReadOnly] [NativeDisableUnsafePtrRestriction] public int* count; - - public void Execute(int block) - { - int length = *count + 1; // add 1 to get total sum in last element+1 - int blockSize = (int)math.ceil(length / (float)numBlocks); - - int start = block * blockSize; - int end = math.min(start + blockSize, length); - - for (int i = start; i < end; ++i) - output[i] += prefixBlocks[block]; - } - } - } -} -#endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/BurstPrefixSum.cs.meta b/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/BurstPrefixSum.cs.meta deleted file mode 100644 index 3cd7558fd..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/BurstPrefixSum.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7fa11563c202445279d5e04b0eb1631b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/BurstQueryShape.cs b/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/BurstQueryShape.cs index b56880310..39f7cf90c 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/BurstQueryShape.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/BurstQueryShape.cs @@ -9,7 +9,7 @@ namespace Obi public float4 size; public QueryShape.QueryType type; public float contactOffset; - public float maxDistance; + public float distance; public int filter; } } diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/BurstRigidbody.cs b/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/BurstRigidbody.cs index 7df6296a1..6406cc850 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/BurstRigidbody.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/BurstRigidbody.cs @@ -15,7 +15,7 @@ namespace Obi public float4 com; public float inverseMass; - public int constraintCount; + private int pad0; private int pad1; private int pad2; } diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/ConstraintBatcher/ConstraintBatcher.cs b/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/ConstraintBatcher/ConstraintBatcher.cs index 5f2c182bc..f1fcfb1f9 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/ConstraintBatcher/ConstraintBatcher.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/ConstraintBatcher/ConstraintBatcher.cs @@ -1,4 +1,4 @@ -#if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) +#if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) using System; using Unity.Collections; using Unity.Mathematics; diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/ConstraintBatcher/ConstraintSorter.cs b/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/ConstraintBatcher/ConstraintSorter.cs index 3b3bf9ee9..f15939bf9 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/ConstraintBatcher/ConstraintSorter.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/ConstraintBatcher/ConstraintSorter.cs @@ -1,4 +1,4 @@ -#if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) +#if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) using System; using System.Collections.Generic; using Unity.Collections; @@ -9,7 +9,7 @@ using Unity.Jobs; namespace Obi { - public class ConstraintSorter where T : unmanaged, IConstraint + public class ConstraintSorter where T : unmanaged, IConstraint { public struct ConstraintComparer : IComparer where K : IConstraint @@ -28,7 +28,7 @@ namespace Obi public JobHandle SortConstraints(int particleCount, NativeArray constraints, ref NativeArray sortedConstraints, - JobHandle handle) + JobHandle handle) { // Count the amount of digits in the largest particle index that can be referenced by a constraint: NativeArray totalCountUpToDigit = new NativeArray(particleCount + 1, Allocator.TempJob); @@ -59,16 +59,16 @@ namespace Obi { InOutArray = sortedConstraints, NextElementIndex = totalCountUpToDigit, - comparer = new ConstraintComparer() + comparer = new ConstraintComparer() }.Schedule(totalCountUpToDigit.Length, numPerBatch, handle); return handle; } [BurstCompile] - public struct CountSortPerFirstParticleJob : IJob + public struct CountSortPerFirstParticleJob : IJob { - [ReadOnly][NativeDisableContainerSafetyRestriction] public NativeArray input; + [ReadOnly] [NativeDisableContainerSafetyRestriction] public NativeArray input; public NativeArray output; [NativeDisableContainerSafetyRestriction] public NativeArray digitCount; @@ -117,7 +117,7 @@ namespace Obi [NativeDisableContainerSafetyRestriction] public NativeArray InOutArray; // Typically lastDigitIndex is resulting RadixSortPerBodyAJob.digitCount. nextElementIndex[i] = index of first element with bodyA index == i + 1 - [NativeDisableContainerSafetyRestriction][DeallocateOnJobCompletion] public NativeArray NextElementIndex; + [NativeDisableContainerSafetyRestriction] [DeallocateOnJobCompletion] public NativeArray NextElementIndex; [ReadOnly] public ConstraintComparer comparer; diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/ConstraintBatcher/IConstraint.cs b/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/ConstraintBatcher/IConstraint.cs index 2015869be..5c1470577 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/ConstraintBatcher/IConstraint.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/ConstraintBatcher/IConstraint.cs @@ -1,10 +1,9 @@ #if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) -namespace Obi +using System; + +public interface IConstraint { - public interface IConstraint - { - int GetParticleCount(); - int GetParticle(int index); - } + int GetParticleCount(); + int GetParticle(int index); } #endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/GridHash.cs b/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/GridHash.cs index fe57581a0..c572cea82 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/GridHash.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/GridHash.cs @@ -1,76 +1,118 @@ #if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) using Unity.Mathematics; -namespace Obi +public struct GridHash { - public struct GridHash + public readonly static int3[] cellOffsets3D = { - public readonly static int3[] cellOffsets3D = - { - new int3(1,0,0), - new int3(0,1,0), - new int3(1,1,0), - new int3(0,0,1), - new int3(1,0,1), - new int3(0,1,1), - new int3(1,1,1), - new int3(-1,1,0), - new int3(-1,-1,1), - new int3(0,-1,1), - new int3(1,-1,1), - new int3(-1,0,1), - new int3(-1,1,1) - }; + new int3(1,0,0), + new int3(0,1,0), + new int3(1,1,0), + new int3(0,0,1), + new int3(1,0,1), + new int3(0,1,1), + new int3(1,1,1), + new int3(-1,1,0), + new int3(-1,-1,1), + new int3(0,-1,1), + new int3(1,-1,1), + new int3(-1,0,1), + new int3(-1,1,1) + }; - public readonly static int3[] cellOffsets = - { - new int3(0, 0, 0), - new int3(-1, 0, 0), - new int3(0, -1, 0), - new int3(0, 0, -1), - new int3(1, 0, 0), - new int3(0, 1, 0), - new int3(0, 0, 1) - }; + public readonly static int3[] cellOffsets = + { + new int3(0, 0, 0), + new int3(-1, 0, 0), + new int3(0, -1, 0), + new int3(0, 0, -1), + new int3(1, 0, 0), + new int3(0, 1, 0), + new int3(0, 0, 1) + }; - public readonly static int2[] cell2DOffsets = - { - new int2(0, 0), - new int2(-1, 0), - new int2(0, -1), - new int2(1, 0), - new int2(0, 1), - }; + public readonly static int2[] cell2DOffsets = + { + new int2(0, 0), + new int2(-1, 0), + new int2(0, -1), + new int2(1, 0), + new int2(0, 1), + }; - public static int3 Quantize(float3 v, float cellSize) + public static int Hash(float3 v, float cellSize) + { + return Hash(Quantize(v, cellSize)); + } + + public static int3 Quantize(float3 v, float cellSize) + { + return new int3(math.floor(v / cellSize)); + } + + public static int Hash(float2 v, float cellSize) + { + return Hash(Quantize(v, cellSize)); + } + + public static int2 Quantize(float2 v, float cellSize) + { + return new int2(math.floor(v / cellSize)); + } + + public static int Hash(int3 grid) + { + unchecked { - return new int3(math.floor(v / cellSize)); + // Simple int3 hash based on a pseudo mix of : + // 1) https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function + // 2) https://en.wikipedia.org/wiki/Jenkins_hash_function + int hash = grid.x; + hash = (hash * 397) ^ grid.y; + hash = (hash * 397) ^ grid.z; + hash += hash << 3; + hash ^= hash >> 11; + hash += hash << 15; + return hash; } + } - public static int2 Quantize(float2 v, float cellSize) + public static int Hash(int2 grid) + { + unchecked { - return new int2(math.floor(v / cellSize)); + // Simple int3 hash based on a pseudo mix of : + // 1) https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function + // 2) https://en.wikipedia.org/wiki/Jenkins_hash_function + int hash = grid.x; + hash = (hash * 397) ^ grid.y; + hash += hash << 3; + hash ^= hash >> 11; + hash += hash << 15; + return hash; } + } - public static int Hash(in int4 cellIndex, int maxCells) - { - const int p1 = 73856093; - const int p2 = 19349663; - const int p3 = 83492791; - const int p4 = 10380569; - return math.abs(p1 * cellIndex.x ^ p2 * cellIndex.y ^ p3 * cellIndex.z ^ p4 * cellIndex.w) % maxCells; - } + public static ulong Hash(ulong hash, ulong key) + { + const ulong m = 0xc6a4a7935bd1e995UL; + const int r = 47; - public static int Hash(in int3 cellIndex, int maxCells) - { - const int p1 = 73856093; - const int p2 = 19349663; - const int p3 = 83492791; - return ((p1 * cellIndex.x ^ p2 * cellIndex.y ^ p3 * cellIndex.z) & 0x7fffffff) % maxCells; + ulong h = hash; + ulong k = key; - /*var index = cellIndex - new int3(-32, -32, -32); - return index.x + index.y * 64 + index.z * 64 * 64;*/ - } + k *= m; + k ^= k >> r; + k *= m; + + h ^= k; + h *= m; + + h ^= h >> r; + h *= m; + h ^= h >> r; + + return h; } } #endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/NativeMultilevelGrid.cs b/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/NativeMultilevelGrid.cs index aa210c062..c70f198fb 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/NativeMultilevelGrid.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/NativeMultilevelGrid.cs @@ -23,9 +23,7 @@ namespace Obi public unsafe struct NativeMultilevelGrid : IDisposable where T : unmanaged, IEquatable { - public const float minSize = 0.01f; // minimum cell size is 1 centimeter, enough for very small particles. - public const int minLevel = -6; // grid level for minSize. - public const int maxLevel = 17; + public const float minSize = 0.01f; /** * A cell in the multilevel grid. Coords are 4-dimensional, the 4th component is the grid level. @@ -60,7 +58,7 @@ namespace Obi { get { - return contents.ElementAt(index); + return UnsafeUtility.ReadArrayElement(contents.Ptr, index); } } @@ -71,7 +69,11 @@ namespace Obi public bool Remove(K entity) { - int index = contents.IndexOf(entity); + //int index = contents.IndexOf(entity); + int index = -1; + for (int i = 0; i < contents.Length; ++i) + if (contents[i].Equals(entity)) { index = i; break; } + if (index >= 0) { contents.RemoveAtSwapBack(index); @@ -86,15 +88,15 @@ namespace Obi } } - public NativeParallelHashMap grid; + public NativeHashMap grid; public NativeList> usedCells; - public NativeParallelHashMap populatedLevels; + public NativeHashMap populatedLevels; public NativeMultilevelGrid(int capacity, Allocator label) { - grid = new NativeParallelHashMap(capacity, label); + grid = new NativeHashMap(capacity, label); usedCells = new NativeList>(label); - populatedLevels = new NativeParallelHashMap(10, label); + populatedLevels = new NativeHashMap(10, label); } public int CellCount @@ -170,16 +172,14 @@ namespace Obi [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int GridLevelForSize(float size) { - // the magic number is 1/log(2), used because log_a(x) = log_b(x) / log_b(a) - // level is clamped between MIN_LEVEL and MAX_LEVEL, then remapped to (0, MAX_LEVEL - MIN_LEVEL) - // this allows us to avoid InterlockedMax issues on GPU, since it doesn't work on negative numbers on some APIs. - return math.clamp((int)math.ceil(math.log(size) * 1.44269504089f), minLevel, maxLevel) - minLevel; + // the magic number is 1/log(2) + return (int)math.ceil(math.log(math.max(size,minSize)) * 1.44269504089f); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static float CellSizeOfLevel(int level) { - return math.exp2(level + minLevel); + return math.exp2(level); } /** @@ -187,7 +187,7 @@ namespace Obi */ public static int4 GetParentCellCoords(int4 cellCoords, int level) { - float decimation = math.exp2(level - cellCoords[3]); + float decimation = CellSizeOfLevel(level - cellCoords[3]); int4 cell = (int4)math.floor((float4)cellCoords / decimation); cell[3] = level; return cell; diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/ParticleGrid.cs b/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/ParticleGrid.cs index b2c8ccdae..5fab570fc 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/ParticleGrid.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/ParticleGrid.cs @@ -4,7 +4,6 @@ using Unity.Collections; using Unity.Jobs; using Unity.Mathematics; using Unity.Burst; -using UnityEngine; namespace Obi { @@ -21,14 +20,34 @@ namespace Obi public NativeQueue particleContactQueue; public NativeQueue fluidInteractionQueue; + + [BurstCompile] + struct CalculateCellCoords : IJobParallelFor + { + [ReadOnly] public NativeArray simplexBounds; + public NativeArray cellCoords; + [ReadOnly] public bool is2D; + + public void Execute(int i) + { + int level = NativeMultilevelGrid.GridLevelForSize(simplexBounds[i].AverageAxisLength()); + float cellSize = NativeMultilevelGrid.CellSizeOfLevel(level); + + // get new particle cell coordinate: + int4 newCellCoord = new int4(GridHash.Quantize(simplexBounds[i].center.xyz, cellSize), level); + + // if the solver is 2D, project the particle to the z = 0 cell. + if (is2D) newCellCoord[2] = 0; + + cellCoords[i] = newCellCoord; + } + } + [BurstCompile] struct UpdateGrid : IJob { public NativeMultilevelGrid grid; - [ReadOnly] public NativeArray simplexBounds; - public NativeArray cellCoords; - - [ReadOnly] public Oni.SolverParameters parameters; + [ReadOnly] public NativeArray cellCoords; [ReadOnly] public int simplexCount; public void Execute() @@ -37,17 +56,6 @@ namespace Obi for (int i = 0; i < simplexCount; ++i) { - int level = NativeMultilevelGrid.GridLevelForSize(simplexBounds[i].MaxAxisLength()); - float cellSize = NativeMultilevelGrid.CellSizeOfLevel(level); - - // get new cell coordinate: - int4 newCellCoord = new int4(GridHash.Quantize(simplexBounds[i].center.xyz, cellSize), level); - - // if the solver is 2D, project to the z = 0 cell. - if (parameters.mode == Oni.SolverParameters.Mode.Mode2D) newCellCoord[2] = 0; - - cellCoords[i] = newCellCoord; - // add to new cell: int cellIndex = grid.GetOrCreateCell(cellCoords[i]); var newCell = grid.usedCells[cellIndex]; @@ -61,7 +69,6 @@ namespace Obi public struct GenerateParticleParticleContactsJob : IJobParallelFor { [ReadOnly] public NativeMultilevelGrid grid; - [DeallocateOnJobCompletion] [ReadOnly] public NativeArray gridLevels; @@ -73,13 +80,14 @@ namespace Obi [ReadOnly] public NativeArray invMasses; [ReadOnly] public NativeArray radii; [ReadOnly] public NativeArray normals; - [ReadOnly] public NativeArray fluidMaterials; + [ReadOnly] public NativeArray fluidRadii; [ReadOnly] public NativeArray phases; [ReadOnly] public NativeArray filters; // simplex arrays: [ReadOnly] public NativeArray simplices; [ReadOnly] public SimplexCounts simplexCounts; + [ReadOnly] public NativeArray simplexBounds; [ReadOnly] public NativeArray particleMaterialIndices; [ReadOnly] public NativeArray collisionMaterials; @@ -157,7 +165,7 @@ namespace Obi } // neighboring cells in levels above the current one: - int levelIndex = gridLevels.IndexOf(cellCoords.w); + int levelIndex = gridLevels.IndexOf(cellCoords.w); if (levelIndex >= 0) { levelIndex++; @@ -194,10 +202,10 @@ namespace Obi for (int j = 0; j < simplexSize; ++j) { int particleIndex = simplices[simplexStart + j]; - group = math.max(group, ObiUtils.GetGroupFromPhase(phases[particleIndex])); flags |= ObiUtils.GetFlagsFromPhase(phases[particleIndex]); category |= filters[particleIndex] & ObiUtils.FilterCategoryBitmask; mask |= (filters[particleIndex] & ObiUtils.FilterMaskBitmask) >> 16; + group = math.max(group, ObiUtils.GetGroupFromPhase(phases[particleIndex])); restPositionsEnabled |= restPositions[particleIndex].w > 0.5f; } @@ -206,6 +214,10 @@ namespace Obi private void InteractionTest(int A, int B, ref BurstSimplex simplexShape) { + // skip the pair if their bounds don't intersect: + if (!simplexBounds[A].IntersectsAabb(simplexBounds[B])) + return; + // get the start index and size of each simplex: int simplexStartA = simplexCounts.GetSimplexStartAndSize(A, out int simplexSizeA); int simplexStartB = simplexCounts.GetSimplexStartAndSize(B, out int simplexSizeB); @@ -235,14 +247,17 @@ namespace Obi // if all simplices are fluid, check their smoothing radii: if ((flagsA & ObiUtils.ParticleFlags.Fluid) != 0 && (flagsB & ObiUtils.ParticleFlags.Fluid) != 0) { - // for fluid we only consider the first particle in each simplex. int particleA = simplices[simplexStartA]; int particleB = simplices[simplexStartB]; - // Calculate particle center distance: - float d2 = math.lengthsq(positions[particleA].xyz - positions[particleB].xyz); + // for fluid we only consider the first particle in each simplex. + float4 predictedPositionA = positions[particleA] + velocities[particleA] * dt; + float4 predictedPositionB = positions[particleB] + velocities[particleB] * dt; - float fluidDistance = math.max(fluidMaterials[particleA].x, fluidMaterials[particleB].x) + collisionMargin; + // Calculate particle center distance: + float d2 = math.lengthsq(predictedPositionA - predictedPositionB); + + float fluidDistance = math.max(fluidRadii[particleA], fluidRadii[particleB]); if (d2 <= fluidDistance * fluidDistance) { fluidInteractionsQueue.Enqueue(new FluidInteraction { particleA = particleA, particleB = particleB }); @@ -284,7 +299,7 @@ namespace Obi // compare distance along contact normal with radius. if (math.dot(simplexPoint - restPoint.point, restPoint.normal) < simplexRadiusA + simplexRadiusB) - return; + return; } simplexBary = BurstMath.BarycenterForSimplexOfSize(simplexSizeA); @@ -295,16 +310,13 @@ namespace Obi simplices, simplexStartA, simplexSizeA, ref simplexBary, out simplexPoint, optimizationIterations, optimizationTolerance); simplexRadiusA = 0; simplexRadiusB = 0; - float4 velocityA = float4.zero, velocityB = float4.zero, normalA = float4.zero, normalB = float4.zero; - float invMassA = 0, invMassB = 0; + float4 velocityA = float4.zero, velocityB = float4.zero, normalB = float4.zero; for (int j = 0; j < simplexSizeA; ++j) { int particleIndex = simplices[simplexStartA + j]; simplexRadiusA += radii[particleIndex].x * simplexBary[j]; velocityA += velocities[particleIndex] * simplexBary[j]; - normalA += (normals[particleIndex].w < 0 ? new float4(math.rotate(orientations[particleIndex],normals[particleIndex].xyz), normals[particleIndex].w) : normals[particleIndex]) * simplexBary[j]; - invMassA += invMasses[particleIndex] * simplexBary[j]; } for (int j = 0; j < simplexSizeB; ++j) @@ -312,53 +324,111 @@ namespace Obi int particleIndex = simplices[simplexStartB + j]; simplexRadiusB += radii[particleIndex].x * surfacePoint.bary[j]; velocityB += velocities[particleIndex] * surfacePoint.bary[j]; - normalB += (normals[particleIndex].w < 0 ? new float4(math.rotate(orientations[particleIndex], normals[particleIndex].xyz), normals[particleIndex].w) : normals[particleIndex]) * surfacePoint.bary[j]; - invMassB += invMasses[particleIndex] * simplexBary[j]; + normalB += normals[particleIndex] * surfacePoint.bary[j]; } - // no contact between fixed simplices: - //if (!(invMassA > 0 || invMassB > 0)) - // return; - float dAB = math.dot(simplexPoint - surfacePoint.point, surfacePoint.normal); - float vel = math.dot(velocityA - velocityB, surfacePoint.normal); + float vel = math.dot(velocityA - velocityB, surfacePoint.normal); // check if the projected velocity along the contact normal will get us within collision distance. if (vel * dt + dAB <= simplexRadiusA + simplexRadiusB + collisionMargin) { // adapt collision normal for one-sided simplices: if ((flagsB & ObiUtils.ParticleFlags.OneSided) != 0 && categoryA < categoryB) - BurstMath.OneSidedNormal(normalB, ref surfacePoint.normal); + BurstMath.OneSidedNormal(normalB, ref surfacePoint.normal); - // during inter-collision, if either particle contains SDF data and they overlap: - if (groupA != groupB && (normalB.w < 0 || normalA.w < 0) && dAB * 1.05f <= simplexRadiusA + simplexRadiusB) - { - // as normal, pick SDF gradient belonging to least penetration distance: - float4 nij = normalB; - if (normalB.w >= 0 || (normalA.w < 0 && normalB.w < normalA.w)) - nij = new float4(-normalA.xyz, normalA.w); - - // for boundary particles, use one sided sphere normal: - if (math.abs(nij.w) <= math.max(simplexRadiusA, simplexRadiusB) * 1.5f) - BurstMath.OneSidedNormal(nij, ref surfacePoint.normal); - else - surfacePoint.normal = nij; - } - - surfacePoint.normal.w = 0; - contactsQueue.Enqueue(new BurstContact + contactsQueue.Enqueue(new BurstContact() { bodyA = A, bodyB = B, pointA = simplexBary, pointB = surfacePoint.bary, normal = surfacePoint.normal - }); + }); } } } } + [BurstCompile] + public struct InterpolateDiffusePropertiesJob : IJobParallelFor + { + [ReadOnly] public NativeMultilevelGrid grid; + + [DeallocateOnJobCompletion] + [ReadOnly] public NativeArray cellOffsets; + + [ReadOnly] public NativeArray positions; + [ReadOnly] public NativeArray properties; + [ReadOnly] public NativeArray diffusePositions; + [ReadOnly] public Poly6Kernel densityKernel; + + public NativeArray diffuseProperties; + public NativeArray neighbourCount; + + [DeallocateOnJobCompletion] + [ReadOnly] public NativeArray gridLevels; + + [ReadOnly] public BurstInertialFrame inertialFrame; + [ReadOnly] public bool mode2D; + + public void Execute(int p) + { + neighbourCount[p] = 0; + float4 diffuseProperty = float4.zero; + float kernelSum = 0; + + int offsetCount = mode2D ? 4 : 8; + + float4 solverDiffusePosition = inertialFrame.frame.InverseTransformPoint(diffusePositions[p]); + + for (int k = 0; k < gridLevels.Length; ++k) + { + int l = gridLevels[k]; + float radius = NativeMultilevelGrid.CellSizeOfLevel(l); + + float4 cellCoords = math.floor(solverDiffusePosition / radius); + + cellCoords[3] = 0; + if (mode2D) + cellCoords[2] = 0; + + float4 posInCell = solverDiffusePosition - (cellCoords * radius + new float4(radius * 0.5f)); + int4 quadrant = (int4)math.sign(posInCell); + + quadrant[3] = l; + + for (int i = 0; i < offsetCount; ++i) + { + int cellIndex; + if (grid.TryGetCellIndex((int4)cellCoords + cellOffsets[i] * quadrant, out cellIndex)) + { + var cell = grid.usedCells[cellIndex]; + for (int n = 0; n < cell.Length; ++n) + { + float4 r = solverDiffusePosition - positions[cell[n]]; + r[3] = 0; + if (mode2D) + r[2] = 0; + + float d = math.length(r); + if (d <= radius) + { + float w = densityKernel.W(d, radius); + kernelSum += w; + diffuseProperty += properties[cell[n]] * w; + neighbourCount[p]++; + } + } + } + } + } + + if (kernelSum > BurstMath.epsilon) + diffuseProperties[p] = diffuseProperty / kernelSum; + } + } + public ParticleGrid() { this.grid = new NativeMultilevelGrid(1000, Allocator.Persistent); @@ -366,15 +436,22 @@ namespace Obi this.fluidInteractionQueue = new NativeQueue(Allocator.Persistent); } - public void Update(BurstSolverImpl solver, JobHandle inputDeps) + public void Update(BurstSolverImpl solver, float deltaTime, JobHandle inputDeps) { + var calculateCells = new CalculateCellCoords + { + simplexBounds = solver.simplexBounds, + cellCoords = solver.cellCoords, + is2D = solver.abstraction.parameters.mode == Oni.SolverParameters.Mode.Mode2D, + }; + + inputDeps = calculateCells.Schedule(solver.simplexCounts.simplexCount, 4, inputDeps); + var updateGrid = new UpdateGrid { grid = grid, - simplexBounds = solver.simplexBounds, - simplexCount = solver.simplexCounts.simplexCount, cellCoords = solver.cellCoords, - parameters = solver.abstraction.parameters + simplexCount = solver.simplexCounts.simplexCount }; updateGrid.Schedule(inputDeps).Complete(); } @@ -395,12 +472,13 @@ namespace Obi invMasses = solver.invMasses, radii = solver.principalRadii, normals = solver.normals, - fluidMaterials = solver.fluidMaterials, + fluidRadii = solver.smoothingRadii, phases = solver.phases, filters = solver.filters, simplices = solver.simplices, simplexCounts = solver.simplexCounts, + simplexBounds = solver.simplexBounds, particleMaterialIndices = solver.abstraction.collisionMaterials.AsNativeArray(), collisionMaterials = ObiColliderWorld.GetInstance().collisionMaterials.AsNativeArray(), @@ -416,11 +494,49 @@ namespace Obi return generateParticleContactsJob.Schedule(grid.CellCount, 1); } + public JobHandle InterpolateDiffuseProperties(BurstSolverImpl solver, + NativeArray properties, + NativeArray diffusePositions, + NativeArray diffuseProperties, + NativeArray neighbourCount, + int diffuseCount) + { + + NativeArray offsets = new NativeArray(8, Allocator.TempJob); + offsets[0] = new int4(0, 0, 0, 1); + offsets[1] = new int4(1, 0, 0, 1); + offsets[2] = new int4(0, 1, 0, 1); + offsets[3] = new int4(1, 1, 0, 1); + offsets[4] = new int4(0, 0, 1, 1); + offsets[5] = new int4(1, 0, 1, 1); + offsets[6] = new int4(0, 1, 1, 1); + offsets[7] = new int4(1, 1, 1, 1); + + var interpolateDiffusePropertiesJob = new InterpolateDiffusePropertiesJob + { + grid = grid, + positions = solver.abstraction.positions.AsNativeArray(), + cellOffsets = offsets, + properties = properties, + diffusePositions = diffusePositions, + diffuseProperties = diffuseProperties, + neighbourCount = neighbourCount, + densityKernel = new Poly6Kernel(solver.abstraction.parameters.mode == Oni.SolverParameters.Mode.Mode2D), + gridLevels = grid.populatedLevels.GetKeyArray(Allocator.TempJob), + inertialFrame = solver.inertialFrame, + mode2D = solver.abstraction.parameters.mode == Oni.SolverParameters.Mode.Mode2D + }; + + return interpolateDiffusePropertiesJob.Schedule(diffuseCount, 64); + } + public JobHandle SpatialQuery(BurstSolverImpl solver, NativeArray shapes, NativeArray transforms, NativeQueue results) { + var world = ObiColliderWorld.GetInstance(); + var job = new SpatialQueryJob { grid = grid, diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/Queries/BurstContact.cs b/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/Queries/BurstContact.cs index 483053074..aee21d6f2 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/Queries/BurstContact.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/Queries/BurstContact.cs @@ -1,5 +1,6 @@ #if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) using Unity.Mathematics; +using Unity.Collections; namespace Obi { @@ -8,25 +9,34 @@ namespace Obi public float4 pointA; // point A, expressed as simplex barycentric coords for simplices, as a solver-space position for colliders. public float4 pointB; // point B, expressed as simplex barycentric coords for simplices, as a solver-space position for colliders. - public float4 normal; // contact normal on bodyB's surface. - public float4 tangent; // contact tangent on bodyB's surface. + public float4 normal; + public float4 tangent; + public float4 bitangent; - public float distance; // distance between bodyA's and bodyB's surface. + public float distance; - public float normalLambda; - public float tangentLambda; - public float bitangentLambda; - public float stickLambda; - public float rollingFrictionImpulse; + float normalLambda; + float tangentLambda; + float bitangentLambda; + float stickLambda; + float rollingFrictionImpulse; public int bodyA; public int bodyB; + public float normalInvMassA; + public float tangentInvMassA; + public float bitangentInvMassA; + + public float normalInvMassB; + public float tangentInvMassB; + public float bitangentInvMassB; + + public double pad0; // padding to ensure correct alignment to 128 bytes. + public int GetParticleCount() { return 2; } public int GetParticle(int index) { return index == 0 ? bodyA : bodyB; } - public float4 bitangent => math.normalizesafe(new float4(math.cross(normal.xyz, tangent.xyz), 0)); - public override string ToString() { return bodyA + "," + bodyB; @@ -40,15 +50,85 @@ namespace Obi return first; } - public void CalculateTangent(float4 relativeVelocity) + public float TotalNormalInvMass { - tangent = math.normalizesafe(relativeVelocity - math.dot(relativeVelocity, normal) * normal); + get { return normalInvMassA + normalInvMassB; } } - public float SolveAdhesion(float normalMass, float4 posA, float4 posB, float stickDistance, float stickiness, float dt) + public float TotalTangentInvMass + { + get { return tangentInvMassA + tangentInvMassB; } + } + + public float TotalBitangentInvMass + { + get { return bitangentInvMassA + bitangentInvMassB; } + } + + public void CalculateBasis(float4 relativeVelocity) + { + tangent = math.normalizesafe(relativeVelocity - math.dot(relativeVelocity, normal) * normal); + bitangent = math.normalizesafe(new float4(math.cross(normal.xyz, tangent.xyz),0)); + } + + public void CalculateContactMassesA(float invMass, + float4 inverseInertiaTensor, + float4 position, + quaternion orientation, + float4 contactPoint, + bool rollingContacts) + { + // initialize inverse linear masses: + normalInvMassA = tangentInvMassA = bitangentInvMassA = invMass; + + if (rollingContacts) + { + float4 rA = contactPoint - position; + float4x4 solverInertiaA = BurstMath.TransformInertiaTensor(inverseInertiaTensor, orientation); + + normalInvMassA += BurstMath.RotationalInvMass(solverInertiaA, rA, normal); + tangentInvMassA += BurstMath.RotationalInvMass(solverInertiaA, rA, tangent); + bitangentInvMassA += BurstMath.RotationalInvMass(solverInertiaA, rA, bitangent); + } + } + + public void CalculateContactMassesB(float invMass, + float4 inverseInertiaTensor, + float4 position, + quaternion orientation, + float4 contactPoint, + bool rollingContacts) + { + // initialize inverse linear masses: + normalInvMassB = tangentInvMassB = bitangentInvMassB = invMass; + + if (rollingContacts) + { + float4 rB = contactPoint - position; + float4x4 solverInertiaB = BurstMath.TransformInertiaTensor(inverseInertiaTensor, orientation); + + normalInvMassB += BurstMath.RotationalInvMass(solverInertiaB, rB, normal); + tangentInvMassB += BurstMath.RotationalInvMass(solverInertiaB, rB, tangent); + bitangentInvMassB += BurstMath.RotationalInvMass(solverInertiaB, rB, bitangent); + } + } + + + public void CalculateContactMassesB(in BurstRigidbody rigidbody, in BurstAffineTransform solver2World) + { + float4 rB = solver2World.TransformPoint(pointB) - rigidbody.com; + + // initialize inverse linear masses: + normalInvMassB = tangentInvMassB = bitangentInvMassB = rigidbody.inverseMass; + normalInvMassB += BurstMath.RotationalInvMass(rigidbody.inverseInertiaTensor, rB, normal); + tangentInvMassB += BurstMath.RotationalInvMass(rigidbody.inverseInertiaTensor, rB, tangent); + bitangentInvMassB += BurstMath.RotationalInvMass(rigidbody.inverseInertiaTensor, rB, bitangent); + } + + public float SolveAdhesion(float4 posA, float4 posB, float stickDistance, float stickiness, float dt) { - if (normalMass <= 0 || stickDistance <= 0 || stickiness <= 0 || dt <= 0) + if (TotalNormalInvMass <= 0 || stickDistance <= 0 || stickiness <= 0 || dt <= 0) return 0; distance = math.dot(posA - posB, normal); @@ -57,7 +137,7 @@ namespace Obi float constraint = stickiness * (1 - math.max(distance / stickDistance, 0)) * dt; // calculate lambda multiplier: - float dlambda = -constraint / normalMass; + float dlambda = -constraint / TotalNormalInvMass; // accumulate lambda: float newStickinessLambda = math.min(stickLambda + dlambda, 0); @@ -69,9 +149,10 @@ namespace Obi return lambdaChange; } - public float SolvePenetration(float normalMass, float4 posA, float4 posB, float maxDepenetrationDelta) + public float SolvePenetration(float4 posA, float4 posB, float maxDepenetrationDelta) { - if (normalMass <= 0) + + if (TotalNormalInvMass <= 0) return 0; //project position delta to normal vector: @@ -81,7 +162,7 @@ namespace Obi float maxProjection = math.max(-distance - maxDepenetrationDelta, 0); // calculate lambda multiplier: - float dlambda = -(distance + maxProjection) / normalMass; + float dlambda = -(distance + maxProjection) / TotalNormalInvMass; // accumulate lambda: float newLambda = math.max(normalLambda + dlambda, 0); @@ -93,11 +174,11 @@ namespace Obi return lambdaChange; } - public float2 SolveFriction(float tangentMass, float bitangentMass, float4 relativeVelocity, float staticFriction, float dynamicFriction, float dt) + public float2 SolveFriction(float4 relativeVelocity, float staticFriction, float dynamicFriction, float dt) { float2 lambdaChange = float2.zero; - if (tangentMass <= 0 || bitangentMass <= 0 || + if (TotalTangentInvMass <= 0 || TotalBitangentInvMass <= 0 || (dynamicFriction <= 0 && staticFriction <= 0) || (normalLambda <= 0 && stickLambda <= 0)) return lambdaChange; @@ -110,7 +191,7 @@ namespace Obi float staticFrictionCone = normalLambda / dt * staticFriction; // tangent impulse: - float tangentLambdaDelta = -tangentPosDelta / tangentMass; + float tangentLambdaDelta = -tangentPosDelta / TotalTangentInvMass; float newTangentLambda = tangentLambda + tangentLambdaDelta; if (math.abs(newTangentLambda) > staticFrictionCone) @@ -120,7 +201,7 @@ namespace Obi tangentLambda = newTangentLambda; // bitangent impulse: - float bitangentLambdaDelta = -bitangentPosDelta / bitangentMass; + float bitangentLambdaDelta = -bitangentPosDelta / TotalBitangentInvMass; float newBitangentLambda = bitangentLambda + bitangentLambdaDelta; if (math.abs(newBitangentLambda) > staticFrictionCone) @@ -158,6 +239,6 @@ namespace Obi return rolling_impulse_change; } - } +} } #endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/Queries/BurstQueryResult.cs b/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/Queries/BurstQueryResult.cs index 5306e2cd6..7d676052c 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/Queries/BurstQueryResult.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/Queries/BurstQueryResult.cs @@ -10,9 +10,9 @@ namespace Obi public float4 queryPoint; // point B, expressed as simplex barycentric coords for simplices, as a solver-space position for colliders. public float4 normal; public float distance; - public float distanceAlongRay; public int simplexIndex; public int queryIndex; + public int pad0; // padding to ensure correct alignment. } } #endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Queries/BurstBoxQuery.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Queries/BurstBoxQuery.cs index b56f3e35b..4be8d5f1b 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Queries/BurstBoxQuery.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Queries/BurstBoxQuery.cs @@ -67,29 +67,17 @@ namespace Obi int optimizationIterations, float optimizationTolerance) { - var co = new BurstQueryResult { simplexIndex = simplexIndex, queryIndex = shapeIndex }; + var co = new BurstQueryResult() { simplexIndex = simplexIndex, queryIndex = shapeIndex }; float4 simplexBary = BurstMath.BarycenterForSimplexOfSize(simplexSize); - var colliderPoint = BurstLocalOptimization.Optimize(ref this, positions, orientations, radii, simplices, simplexStart, simplexSize, - ref simplexBary, out float4 convexPoint, optimizationIterations, optimizationTolerance); - - float4 simplexPrevPosition = float4.zero; - float simplexRadius = 0; - - for (int j = 0; j < simplexSize; ++j) - { - int particleIndex = simplices[simplexStart + j]; - simplexPrevPosition += positions[particleIndex] * simplexBary[j]; - simplexRadius += BurstMath.EllipsoidRadius(colliderPoint.normal, orientations[particleIndex], radii[particleIndex].xyz) * simplexBary[j]; - } + var colliderPoint = BurstLocalOptimization.Optimize(ref this, positions, orientations, radii, simplices, simplexStart, simplexSize, + ref simplexBary, out float4 convexPoint, optimizationIterations, optimizationTolerance); co.queryPoint = colliderPoint.point; co.normal = colliderPoint.normal; co.simplexBary = simplexBary; - co.distance = math.dot(simplexPrevPosition - colliderPoint.point, colliderPoint.normal) - simplexRadius; - if (co.distance <= shape.maxDistance) - results.Enqueue(co); + results.Enqueue(co); } } diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Queries/BurstRay.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Queries/BurstRay.cs index b89248af2..ce2533383 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Queries/BurstRay.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Queries/BurstRay.cs @@ -1,7 +1,6 @@ #if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) using Unity.Collections; using Unity.Mathematics; -using UnityEngine; namespace Obi { @@ -18,7 +17,7 @@ namespace Obi // express ray in simplex space (ellipsoid == scaled sphere) float4 rayOrigin = math.mul(colliderToSimplex, new float4(shape.center.xyz,1)); - float4 rayDirection = math.normalizesafe(math.mul(colliderToSimplex, new float4(shape.size.xyz,0))); + float4 rayDirection = math.normalizesafe(math.mul(colliderToSimplex, new float4((shape.size - shape.center).xyz,0))); float rayDistance = ObiUtils.RaySphereIntersection(rayOrigin.xyz, rayDirection.xyz, float3.zero, 1); @@ -26,7 +25,7 @@ namespace Obi { point = colliderToSolver.InverseTransformPointUnscaled(point); - float4 centerLine = BurstMath.NearestPointOnEdge(shape.center * colliderToSolver.scale, (shape.center + shape.size) * colliderToSolver.scale, point, out float mu); + float4 centerLine = BurstMath.NearestPointOnEdge(shape.center * colliderToSolver.scale, shape.size * colliderToSolver.scale, point, out float mu); float4 centerToPoint = point - centerLine; float distanceToCenter = math.length(centerToPoint); @@ -58,33 +57,17 @@ namespace Obi int optimizationIterations, float optimizationTolerance) { - var co = new BurstQueryResult { simplexIndex = simplexIndex, queryIndex = shapeIndex }; + var co = new BurstQueryResult() { simplexIndex = simplexIndex, queryIndex = shapeIndex }; float4 simplexBary = BurstMath.BarycenterForSimplexOfSize(simplexSize); - var colliderPoint = BurstLocalOptimization.Optimize(ref this, positions, orientations, radii, simplices, simplexStart, simplexSize, - ref simplexBary, out float4 convexPoint, optimizationIterations, optimizationTolerance); + var colliderPoint = BurstLocalOptimization.Optimize(ref this, positions, orientations, radii, simplices, simplexStart, simplexSize, + ref simplexBary, out float4 convexPoint, optimizationIterations, optimizationTolerance); - float4 simplexPrevPosition = float4.zero; - float simplexRadius = 0; - - for (int j = 0; j < simplexSize; ++j) - { - int particleIndex = simplices[simplexStart + j]; - simplexPrevPosition += positions[particleIndex] * simplexBary[j]; - simplexRadius += BurstMath.EllipsoidRadius(colliderPoint.normal, orientations[particleIndex], radii[particleIndex].xyz) * simplexBary[j]; - } - - co.queryPoint = colliderPoint.point; + co.queryPoint = colliderPoint.point; co.normal = colliderPoint.normal; co.simplexBary = simplexBary; - co.distance = math.dot(simplexPrevPosition - colliderPoint.point, colliderPoint.normal) - simplexRadius; - if (co.distance <= shape.maxDistance) - { - float4 pointOnRay = colliderPoint.point + colliderPoint.normal * co.distance; - co.distanceAlongRay = math.dot(pointOnRay.xyz - shape.center.xyz, math.normalizesafe(shape.size.xyz)); - results.Enqueue(co); - } + results.Enqueue(co); } } diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Queries/BurstSphereQuery.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Queries/BurstSphereQuery.cs index 82cf497eb..e36412357 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Queries/BurstSphereQuery.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Queries/BurstSphereQuery.cs @@ -39,29 +39,17 @@ namespace Obi int optimizationIterations, float optimizationTolerance) { - var co = new BurstQueryResult { simplexIndex = simplexIndex, queryIndex = shapeIndex }; + var co = new BurstQueryResult() { simplexIndex = simplexIndex, queryIndex = shapeIndex }; float4 simplexBary = BurstMath.BarycenterForSimplexOfSize(simplexSize); - var colliderPoint = BurstLocalOptimization.Optimize(ref this, positions, orientations, radii, simplices, simplexStart, simplexSize, - ref simplexBary, out float4 convexPoint, optimizationIterations, optimizationTolerance); - - float4 simplexPrevPosition = float4.zero; - float simplexRadius = 0; - - for (int j = 0; j < simplexSize; ++j) - { - int particleIndex = simplices[simplexStart + j]; - simplexPrevPosition += positions[particleIndex] * simplexBary[j]; - simplexRadius += BurstMath.EllipsoidRadius(colliderPoint.normal, orientations[particleIndex], radii[particleIndex].xyz) * simplexBary[j]; - } + var colliderPoint = BurstLocalOptimization.Optimize(ref this, positions, orientations, radii, simplices, simplexStart, simplexSize, + ref simplexBary, out float4 convexPoint, optimizationIterations, optimizationTolerance); co.queryPoint = colliderPoint.point; co.normal = colliderPoint.normal; co.simplexBary = simplexBary; - co.distance = math.dot(simplexPrevPosition - colliderPoint.point, colliderPoint.normal) - simplexRadius; - if (co.distance <= shape.maxDistance) - results.Enqueue(co); + results.Enqueue(co); } } diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Queries/SpatialQueryJob.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Queries/SpatialQueryJob.cs index 1059408e3..6ea4f5875 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Queries/SpatialQueryJob.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Queries/SpatialQueryJob.cs @@ -54,7 +54,7 @@ namespace Obi { var cell = grid.usedCells[c]; - // calculate thickened grid bounds: + // calculate thickedned grid bounds: float size = NativeMultilevelGrid.CellSizeOfLevel(cell.Coords.w); float4 cellPos = (float4)cell.Coords * size; BurstAabb cellBounds = new BurstAabb(cellPos - new float4(size), cellPos + new float4(2 * size)); @@ -85,7 +85,7 @@ namespace Obi private BurstAabb CalculateShapeAABB(in BurstQueryShape shape) { - float offset = shape.contactOffset + shape.maxDistance; + float offset = shape.contactOffset + shape.distance; switch (shape.type) { case QueryShape.QueryType.Sphere: @@ -93,7 +93,7 @@ namespace Obi case QueryShape.QueryType.Box: return new BurstAabb(shape.center - shape.size*0.5f - offset, shape.center + shape.size * 0.5f + offset); case QueryShape.QueryType.Ray: - return new BurstAabb(shape.center, shape.center + shape.size, offset); + return new BurstAabb(shape.center, shape.size, offset); } return new BurstAabb(); } @@ -108,22 +108,57 @@ namespace Obi switch (shape.type) { case QueryShape.QueryType.Sphere: - BurstSphereQuery sphereShape = new BurstSphereQuery { colliderToSolver = shapeToSolver, shape = shape}; + BurstSphereQuery sphereShape = new BurstSphereQuery() { colliderToSolver = shapeToSolver, shape = shape}; sphereShape.Query(shapeIndex, positions, orientations, radii, simplices, simplexIndex, simplexStart, simplexSize, results, parameters.surfaceCollisionIterations, parameters.surfaceCollisionTolerance); break; case QueryShape.QueryType.Box: - BurstBoxQuery boxShape = new BurstBoxQuery { colliderToSolver = shapeToSolver, shape = shape}; + BurstBoxQuery boxShape = new BurstBoxQuery() { colliderToSolver = shapeToSolver, shape = shape}; boxShape.Query(shapeIndex, positions, orientations, radii, simplices, simplexIndex, simplexStart, simplexSize, results, parameters.surfaceCollisionIterations, parameters.surfaceCollisionTolerance); break; case QueryShape.QueryType.Ray: - BurstRay rayShape = new BurstRay { colliderToSolver = shapeToSolver, shape = shape }; + BurstRay rayShape = new BurstRay() { colliderToSolver = shapeToSolver, shape = shape }; rayShape.Query(shapeIndex, positions, orientations, radii, simplices, simplexIndex, simplexStart, simplexSize, results, parameters.surfaceCollisionIterations, parameters.surfaceCollisionTolerance); break; } } } + + [BurstCompile] + public struct CalculateQueryDistances : IJobParallelFor + { + [ReadOnly] public NativeArray prevPositions; + [ReadOnly] public NativeArray prevOrientations; + [ReadOnly] public NativeArray radii; + + // simplex arrays: + [ReadOnly] public NativeArray simplices; + [ReadOnly] public SimplexCounts simplexCounts; + + public NativeArray queryResults; + + public void Execute(int i) + { + var result = queryResults[i]; + + int simplexStart = simplexCounts.GetSimplexStartAndSize(result.simplexIndex, out int simplexSize); + + float4 simplexPrevPosition = float4.zero; + float simplexRadius = 0; + + for (int j = 0; j < simplexSize; ++j) + { + int particleIndex = simplices[simplexStart + j]; + simplexPrevPosition += prevPositions[particleIndex] * result.simplexBary[j]; + simplexRadius += BurstMath.EllipsoidRadius(result.normal, prevOrientations[particleIndex], radii[particleIndex].xyz) * result.simplexBary[j]; + } + + // update contact distance + result.distance = math.dot(simplexPrevPosition - result.queryPoint, result.normal) - simplexRadius; + queryResults[i] = result; + } + } } #endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/Common.meta b/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/Common.meta deleted file mode 100644 index 632682d7c..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/Common.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 3595afed529f346669fbe538323cd7d2 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/Common/BuildParticleMeshDataJob.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/Common/BuildParticleMeshDataJob.cs deleted file mode 100644 index bcb706819..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/Common/BuildParticleMeshDataJob.cs +++ /dev/null @@ -1,62 +0,0 @@ -#if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) -using Unity.Jobs; -using Unity.Collections; -using Unity.Mathematics; -using Unity.Burst; -using UnityEngine; - -namespace Obi -{ - [BurstCompile] - struct BuildParticleMeshDataJob : IJobParallelFor - { - [ReadOnly] public NativeArray particleIndices; - [ReadOnly] public NativeArray rendererIndices; - [ReadOnly] public NativeArray rendererData; - - [ReadOnly] public NativeArray renderablePositions; - [ReadOnly] public NativeArray renderableOrientations; - [ReadOnly] public NativeArray renderableRadii; - [ReadOnly] public NativeArray colors; - - [NativeDisableParallelForRestriction] public NativeArray vertices; - [NativeDisableParallelForRestriction] public NativeArray indices; - - [ReadOnly] public int firstParticle; - - public void Execute(int i) - { - int p = particleIndices[firstParticle + i]; - int r = rendererIndices[firstParticle + i]; - - ParticleVertex v = new ParticleVertex(); - - v.pos = new float4(renderablePositions[p].xyz, 1); - v.color = colors[p] * (Vector4)rendererData[r].color; - v.b1 = new float4(math.mul(renderableOrientations[p], new float3(1, 0, 0)), renderableRadii[p][0] * renderableRadii[p][3] * rendererData[r].radiusScale); - v.b2 = new float4(math.mul(renderableOrientations[p], new float3(0, 1, 0)), renderableRadii[p][1] * renderableRadii[p][3] * rendererData[r].radiusScale); - v.b3 = new float4(math.mul(renderableOrientations[p], new float3(0, 0, 1)), renderableRadii[p][2] * renderableRadii[p][3] * rendererData[r].radiusScale); - - v.offset = new float3(1, 1, 0); - vertices[i * 4] = v; - - v.offset = new float3(-1, 1, 0); - vertices[i * 4 + 1] = v; - - v.offset = new float3(-1, -1, 0); - vertices[i * 4 + 2] = v; - - v.offset = new float3(1, -1, 0); - vertices[i * 4 + 3] = v; - - indices[i * 6] = (i * 4 + 2); - indices[i * 6 + 1] = (i * 4 + 1); - indices[i * 6 + 2] = (i * 4); - - indices[i * 6 + 3] = (i * 4 + 3); - indices[i * 6 + 4] = (i * 4 + 2); - indices[i * 6 + 5] = (i * 4); - } - } -} -#endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/Common/BuildParticleMeshDataJob.cs.meta b/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/Common/BuildParticleMeshDataJob.cs.meta deleted file mode 100644 index c205bf0f6..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/Common/BuildParticleMeshDataJob.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: cacb4a3597ee245a6b40358728c300e9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/Common/BurstFoamRenderSystem.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/Common/BurstFoamRenderSystem.cs deleted file mode 100644 index 0b369f2a2..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/Common/BurstFoamRenderSystem.cs +++ /dev/null @@ -1,247 +0,0 @@ -#if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) -using UnityEngine; -using UnityEngine.Rendering; -using Unity.Jobs; -using Unity.Collections; -using Unity.Mathematics; -using Unity.Burst; -using Unity.Collections.LowLevel.Unsafe; -using System.Collections.Generic; - -#if (SRP_UNIVERSAL) -using UnityEngine.Rendering.Universal; -#endif - -namespace Obi -{ - - public class BurstFoamRenderSystem : ObiFoamRenderSystem - { - protected NativeArray sortHandles; - - protected struct SortHandleComparer : IComparer - { - public int Compare(float2 a, float2 b) - { - return b.y.CompareTo(a.y); - } - } - - protected SortHandleComparer comparer = new SortHandleComparer(); - - public BurstFoamRenderSystem(ObiSolver solver) : base(solver) - { -#if (SRP_UNIVERSAL) - if (GraphicsSettings.currentRenderPipeline is UniversalRenderPipelineAsset) - renderBatch = new ProceduralRenderBatch(0, Resources.Load("ObiMaterials/URP/Fluid/FoamParticlesURP"), new RenderBatchParams(true)); - else -#endif - renderBatch = new ProceduralRenderBatch(0, Resources.Load("ObiMaterials/Fluid/FoamParticles"), new RenderBatchParams(true)); - ReallocateRenderBatch(); - } - - public override void Dispose() - { - base.Dispose(); - - if (sortHandles.IsCreated) - sortHandles.Dispose(); - } - - private void ReallocateRenderBatch() - { - // in case the amount of particles allocated does not match - // the amount requested by the solver, reallocate - if (!sortHandles.IsCreated || m_Solver.foamPositions.count * 4 != renderBatch.vertexCount) - { - renderBatch.Dispose(); - renderBatch.vertexCount = m_Solver.foamPositions.count * 4; - renderBatch.triangleCount = m_Solver.foamPositions.count * 2; - renderBatch.Initialize(layout); - - if (sortHandles.IsCreated) - sortHandles.Dispose(); - sortHandles = new NativeArray(m_Solver.foamPositions.count, Allocator.Persistent); - } - } - - public override void Setup() - { - } - - public override void Step() - { - } - - public override unsafe void Render() - { - if (!Application.isPlaying) - return; - - var solver = m_Solver.implementation as BurstSolverImpl; - - ReallocateRenderBatch(); - - foreach (Camera camera in cameras) - { - if (camera == null) - continue; - - JobHandle inputDeps = new JobHandle(); - var sortJob = sortHandles.Slice(0, m_Solver.foamCount[3]).SortJob(comparer); - - //Clear all triangle indices to zero: - UnsafeUtility.MemClear( - NativeArrayUnsafeUtility.GetUnsafeBufferPointerWithoutChecks(renderBatch.triangles), - UnsafeUtility.SizeOf() * renderBatch.triangles.Length); - - var projectJob = new ProjectOnSortAxisJob - { - inputPositions = solver.abstraction.foamPositions.AsNativeArray(), - sortHandles = sortHandles, - sortAxis = solver.abstraction.transform.InverseTransformDirection(camera.transform.forward) - }; - - inputDeps = projectJob.Schedule(m_Solver.foamCount[3], 256, inputDeps); - - inputDeps = sortJob.Schedule(inputDeps); - - var sortParticlesJob = new SortParticles - { - sortHandles = sortHandles, - inputPositions = solver.abstraction.foamPositions.AsNativeArray(), - inputVelocities = solver.abstraction.foamVelocities.AsNativeArray(), - inputColors = solver.abstraction.foamColors.AsNativeArray(), - inputAttributes = solver.abstraction.foamAttributes.AsNativeArray(), - - outputPositions = solver.auxPositions, - outputVelocities = solver.auxVelocities, - outputColors = solver.auxColors, - outputAttributes = solver.auxAttributes - }; - - inputDeps = sortParticlesJob.Schedule(m_Solver.foamCount[3], 256, inputDeps); - - var meshJob = new BuildFoamMeshDataJob - { - inputPositions = solver.auxPositions, - inputVelocities = solver.auxVelocities, - inputColors = solver.auxColors, - inputAttributes = solver.auxAttributes, - - vertices = renderBatch.vertices, - indices = renderBatch.triangles, - }; - - inputDeps = meshJob.Schedule(m_Solver.foamCount[3], 128, inputDeps); - - inputDeps.Complete(); - - renderBatch.mesh.SetVertexBufferData(renderBatch.vertices, 0, 0, renderBatch.vertexCount, 0, MeshUpdateFlags.DontValidateIndices | MeshUpdateFlags.DontRecalculateBounds | MeshUpdateFlags.DontResetBoneBounds | MeshUpdateFlags.DontNotifyMeshUsers); - renderBatch.mesh.SetIndexBufferData(renderBatch.triangles, 0, 0, renderBatch.triangleCount * 3, MeshUpdateFlags.DontRecalculateBounds | MeshUpdateFlags.DontValidateIndices); - - matProps.SetFloat("_FadeDepth", 0); - matProps.SetFloat("_VelocityStretching", m_Solver.maxFoamVelocityStretch); - matProps.SetFloat("_RadiusScale", m_Solver.foamRadiusScale); - matProps.SetFloat("_FadeIn", m_Solver.foamFade.x); - matProps.SetFloat("_FadeOut", m_Solver.foamFade.y); - matProps.SetFloat("_ScatterDensity", m_Solver.foamVolumeDensity); - matProps.SetFloat("_AmbientDensity", m_Solver.foamAmbientDensity); - matProps.SetColor("_ScatterColor", m_Solver.foamScatterColor); - matProps.SetColor("_AmbientColor", m_Solver.foamAmbientColor); - - var rp = renderBatch.renderParams; - rp.worldBounds = m_Solver.bounds; - rp.camera = camera; - rp.matProps = matProps; - - Graphics.RenderMesh(rp, renderBatch.mesh, 0, m_Solver.transform.localToWorldMatrix, m_Solver.transform.localToWorldMatrix); - } - } - - - - [BurstCompile] - unsafe struct ProjectOnSortAxisJob : IJobParallelFor - { - [ReadOnly] public NativeArray inputPositions; - [NativeDisableParallelForRestriction] public NativeArray sortHandles; - - public float3 sortAxis; - - public void Execute(int i) - { - sortHandles[i] = new float2(i, math.dot(inputPositions[i].xyz, sortAxis)); - } - } - - [BurstCompile] - unsafe struct SortParticles : IJobParallelFor - { - [ReadOnly] public NativeArray sortHandles; - - [ReadOnly] public NativeArray inputPositions; - [ReadOnly] public NativeArray inputVelocities; - [ReadOnly] public NativeArray inputColors; - [ReadOnly] public NativeArray inputAttributes; - - [NativeDisableParallelForRestriction] public NativeArray outputPositions; - [NativeDisableParallelForRestriction] public NativeArray outputVelocities; - [NativeDisableParallelForRestriction] public NativeArray outputColors; - [NativeDisableParallelForRestriction] public NativeArray outputAttributes; - - public void Execute(int i) - { - int o = (int)sortHandles[i].x; - outputPositions[i] = inputPositions[o]; - outputVelocities[i] = inputVelocities[o]; - outputColors[i] = inputColors[o]; - outputAttributes[i] = inputAttributes[o]; - } - } - - [BurstCompile] - struct BuildFoamMeshDataJob : IJobParallelFor - { - [ReadOnly] public NativeArray inputPositions; - [ReadOnly] public NativeArray inputVelocities; - [ReadOnly] public NativeArray inputColors; - [ReadOnly] public NativeArray inputAttributes; - - [NativeDisableParallelForRestriction] public NativeArray vertices; - [NativeDisableParallelForRestriction] public NativeArray indices; - - public void Execute(int i) - { - DiffuseParticleVertex v = new DiffuseParticleVertex(); - - v.pos = new float4(inputPositions[i].xyz, 1); - v.color = inputColors[i]; - v.velocity = inputVelocities[i]; - v.attributes = inputAttributes[i]; - - v.offset = new float3(1, 1, 0); - vertices[i * 4] = v; - - v.offset = new float3(-1, 1, 0); - vertices[i * 4 + 1] = v; - - v.offset = new float3(-1, -1, 0); - vertices[i * 4 + 2] = v; - - v.offset = new float3(1, -1, 0); - vertices[i * 4 + 3] = v; - - indices[i * 6] = (i * 4 + 2); - indices[i * 6 + 1] = (i * 4 + 1); - indices[i * 6 + 2] = (i * 4); - - indices[i * 6 + 3] = (i * 4 + 3); - indices[i * 6 + 4] = (i * 4 + 2); - indices[i * 6 + 5] = (i * 4); - } - } - - } -} -#endif diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/Common/BurstFoamRenderSystem.cs.meta b/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/Common/BurstFoamRenderSystem.cs.meta deleted file mode 100644 index 5f9e611de..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/Common/BurstFoamRenderSystem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 555e1cc2122984a93afc0f6f31fa173b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/Common/BurstInstancedParticleRenderSystem.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/Common/BurstInstancedParticleRenderSystem.cs deleted file mode 100644 index 3441e2db0..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/Common/BurstInstancedParticleRenderSystem.cs +++ /dev/null @@ -1,100 +0,0 @@ -#if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) -using UnityEngine; - -using Unity.Jobs; -using Unity.Collections; -using Unity.Mathematics; -using Unity.Burst; - -namespace Obi -{ - - public class BurstInstancedParticleRenderSystem : ObiInstancedParticleRenderSystem - { - - public BurstInstancedParticleRenderSystem(ObiSolver solver) : base(solver) - { - } - - public override void Render() - { - using (m_RenderMarker.Auto()) - { - var instanceTransformsJob = new InstancedParticleTransforms - { - activeParticles = activeParticles.AsNativeArray(), - rendererData = rendererData.AsNativeArray(), - rendererIndex = rendererIndex.AsNativeArray(), - instanceTransforms = instanceTransforms.AsNativeArray(), - instanceColors = instanceColors.AsNativeArray(), - - renderablePositions = m_Solver.renderablePositions.AsNativeArray(), - renderableOrientations = m_Solver.renderableOrientations.AsNativeArray(), - renderableRadii = m_Solver.renderableRadii.AsNativeArray(), - colors = m_Solver.colors.AsNativeArray(), - solverToWorld = m_Solver.transform.localToWorldMatrix - }; - - instanceTransformsJob.Schedule(activeParticles.count, 32).Complete(); - - var mpb = new MaterialPropertyBlock(); - - //Draw instances: - for (int i = 0; i < batchList.Count; i++) - { - var batch = batchList[i]; - - if (batch.instanceCount > 0) - { - // workaround for RenderMeshInstanced bug - // (https://forum.unity.com/threads/gpu-instanced-custom-properties-dont-take-unity_baseinstanceid-into-account.1520602/) - // also, no NativeArray<> overload :( - mpb.SetVectorArray("_Colors", instanceColors.AsNativeArray().Slice(batch.firstInstance, batch.instanceCount).ToArray()); - - var rp = batch.renderParams; - rp.material = batch.material; - rp.worldBounds = m_Solver.bounds; - rp.matProps = mpb; - - // TODO: use generic overload to pass matrix + instance color. - Graphics.RenderMeshInstanced(rp, batch.mesh, 0, instanceTransforms.AsNativeArray(), batch.instanceCount, batch.firstInstance); - } - } - - } - } - - [BurstCompile] - struct InstancedParticleTransforms : IJobParallelFor - { - [ReadOnly] public NativeArray activeParticles; - [ReadOnly] public NativeArray rendererData; - [ReadOnly] public NativeArray rendererIndex; - - [ReadOnly] public NativeArray renderablePositions; - [ReadOnly] public NativeArray renderableOrientations; - [ReadOnly] public NativeArray renderableRadii; - [ReadOnly] public NativeArray colors; - [ReadOnly] public float4x4 solverToWorld; - - [NativeDisableParallelForRestriction] public NativeArray instanceTransforms; - [NativeDisableParallelForRestriction] public NativeArray instanceColors; - - public void Execute(int i) - { - int p = activeParticles[i]; - - Matrix4x4 tfrm = float4x4.TRS(renderablePositions[p].xyz, - renderableOrientations[p], - renderableRadii[p].xyz * renderableRadii[p][3] * rendererData[rendererIndex[i]].radiusScale); - - instanceTransforms[i] = math.mul(solverToWorld, tfrm); - - instanceColors[i] = colors[p] * (Vector4)rendererData[rendererIndex[i]].color; - } - - } - } -} -#endif - diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/Common/BurstInstancedParticleRenderSystem.cs.meta b/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/Common/BurstInstancedParticleRenderSystem.cs.meta deleted file mode 100644 index 2910089fc..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/Common/BurstInstancedParticleRenderSystem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b3896a2253db543bcaa92126d83a7ba0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/Common/BurstParticleRenderSystem.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/Common/BurstParticleRenderSystem.cs deleted file mode 100644 index 7b1460a3e..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/Common/BurstParticleRenderSystem.cs +++ /dev/null @@ -1,58 +0,0 @@ -#if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) -using UnityEngine; -using UnityEngine.Rendering; - -using Unity.Jobs; -using Unity.Mathematics; - -namespace Obi -{ - public class BurstParticleRenderSystem : ObiParticleRenderSystem - { - public BurstParticleRenderSystem(ObiSolver solver) : base(solver) - { - m_Solver = solver; - } - - public override void Render() - { - using (m_RenderMarker.Auto()) - { - for (int i = 0; i < batchList.Count; ++i) - { - var batch = batchList[i]; - - var buildArraysJob = new BuildParticleMeshDataJob - { - particleIndices = activeParticles.AsNativeArray(), - rendererIndices = rendererIndex.AsNativeArray(), - rendererData = rendererData.AsNativeArray(), - - renderablePositions = m_Solver.renderablePositions.AsNativeArray(), - renderableOrientations = m_Solver.renderableOrientations.AsNativeArray(), - renderableRadii = m_Solver.renderableRadii.AsNativeArray(), - colors = m_Solver.colors.AsNativeArray(), - - vertices = batch.vertices, - indices = batch.triangles, - - firstParticle = batch.firstParticle, - }; - - buildArraysJob.Schedule(batch.vertexCount / 4, 32).Complete(); - - batch.mesh.SetVertexBufferData(batch.vertices, 0, 0, batch.vertexCount, 0, MeshUpdateFlags.DontValidateIndices | MeshUpdateFlags.DontRecalculateBounds | MeshUpdateFlags.DontResetBoneBounds | MeshUpdateFlags.DontNotifyMeshUsers); - batch.mesh.SetIndexBufferData(batch.triangles, 0, 0, batch.triangleCount * 3, MeshUpdateFlags.DontRecalculateBounds | MeshUpdateFlags.DontValidateIndices); - - var rp = batch.renderParams; - rp.worldBounds = m_Solver.bounds; - - Graphics.RenderMesh(rp, batch.mesh, 0, m_Solver.transform.localToWorldMatrix, m_Solver.transform.localToWorldMatrix); - } - - } - } - } -} -#endif - diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/Common/BurstParticleRenderSystem.cs.meta b/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/Common/BurstParticleRenderSystem.cs.meta deleted file mode 100644 index 89d3acbbf..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/Common/BurstParticleRenderSystem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d1d1ddc20ab7148e3ac806e3559ba2b8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod.meta b/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod.meta deleted file mode 100644 index 0222329ff..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 68fb3be53914247609d4e6da4f249e52 -labels: -- ObiRope -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/BurstChainRopeRenderSystem.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/BurstChainRopeRenderSystem.cs deleted file mode 100644 index 2fefee058..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/BurstChainRopeRenderSystem.cs +++ /dev/null @@ -1,139 +0,0 @@ -#if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) -using UnityEngine; - -using Unity.Jobs; -using Unity.Collections; -using Unity.Mathematics; -using Unity.Burst; -using Unity.Collections.LowLevel.Unsafe; - -namespace Obi -{ - - public class BurstChainRopeRenderSystem : ObiChainRopeRenderSystem - { - protected Matrix4x4[] transformsArray = new Matrix4x4[1023]; - - public BurstChainRopeRenderSystem(ObiSolver solver) : base(solver) - { - } - - public override void Setup() - { - base.Setup(); - } - - public override void Render() - { - using (m_RenderMarker.Auto()) - { - // generate raw frames using parallel transport - var instanceTransformsJob = new InstanceTransforms() - { - rendererData = rendererData.AsNativeArray(), - chunkData = chunkData.AsNativeArray(), - modifiers = modifiers.AsNativeArray(), - elements = elements.AsNativeArray(), - - instanceTransforms = instanceTransforms.AsNativeArray(), - instanceColors = instanceColors.AsNativeArray(), - - renderablePositions = m_Solver.renderablePositions.AsNativeArray(), - renderableOrientations = m_Solver.renderableOrientations.AsNativeArray(), - principalRadii = m_Solver.principalRadii.AsNativeArray(), - colors = m_Solver.colors.AsNativeArray(), - solverToWorld = m_Solver.transform.localToWorldMatrix, - }; - - instanceTransformsJob.Schedule(chunkData.count, 8).Complete(); - - //Draw instances: - for (int i = 0; i < batchList.Count; i++) - { - var batch = batchList[i]; - - var rp = batch.renderParams; - rp.material = batch.material; - rp.worldBounds = m_Solver.bounds; - - Graphics.RenderMeshInstanced(rp, batch.mesh, 0, instanceTransforms.AsNativeArray(), batch.instanceCount, batch.firstInstance); - } - - } - } - - [BurstCompile] - struct InstanceTransforms : IJobParallelFor - { - [ReadOnly] public NativeArray rendererData; - [ReadOnly] public NativeArray chunkData; - [ReadOnly] public NativeArray modifiers; - [ReadOnly] public NativeArray elements; - - [ReadOnly] public NativeArray renderablePositions; - [ReadOnly] public NativeArray renderableOrientations; - [ReadOnly] public NativeArray principalRadii; - [ReadOnly] public NativeArray colors; - [ReadOnly] public float4x4 solverToWorld; - - [NativeDisableParallelForRestriction] public NativeArray instanceTransforms; - [NativeDisableParallelForRestriction] public NativeArray instanceColors; - - public void Execute(int i) - { - int firstIndex = i > 0 ? chunkData[i - 1].offset : 0; - int elementCount = chunkData[i].offset - firstIndex; - - var rendererIndex = chunkData[i].rendererIndex; - var renderer = rendererData[rendererIndex]; - - float3 rendScale = ((float4)renderer.scale).xyz; - - int firstModifier = rendererIndex > 0 ? rendererData[rendererIndex - 1].modifierOffset : 0; - int modifierCount = renderer.modifierOffset - firstModifier; - - var modifier = new ObiRopeChainRenderer.LinkModifier(); - modifier.Clear(); - - BurstPathFrame frame = new BurstPathFrame(); - frame.Reset(); - - float twist = -renderer.twist * elementCount * renderer.twistAnchor; - frame.SetTwist(twist); - - // parallel transport: - for (int m = 0; m < elementCount; ++m) - { - if (modifierCount > 0) - modifier = modifiers[firstModifier + m % modifierCount]; - - int index = firstIndex + m; - float4 pos = renderablePositions[elements[index].x]; - float4 nextPos = renderablePositions[elements[index].y]; - float4 vector = nextPos - pos; - float3 tangent = math.normalizesafe(vector.xyz); - - if (renderer.usesOrientedParticles == 1) - { - frame.Transport(nextPos.xyz, tangent, math.rotate(renderableOrientations[elements[index].x], new float3(0, 1, 0)), twist); - twist += renderer.twist; - } - else - frame.Transport(nextPos.xyz, tangent, renderer.twist); - - var rotation = quaternion.LookRotationSafe(frame.tangent, frame.normal); - var position = (pos + vector * 0.5f).xyz + math.mul(rotation, modifier.translation); - var scale = principalRadii[elements[index].x].x * 2 * rendScale * modifier.scale; - - rotation = math.mul(rotation, quaternion.Euler(math.radians(modifier.rotation))); - - instanceTransforms[index] = math.mul(solverToWorld,float4x4.TRS(position,rotation,scale)); - instanceColors[index] = (colors[elements[index].x] + colors[elements[index].y]) * 0.5f; - } - } - - } - } -} -#endif - diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/BurstChainRopeRenderSystem.cs.meta b/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/BurstChainRopeRenderSystem.cs.meta deleted file mode 100644 index ce727dba7..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/BurstChainRopeRenderSystem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3c63ccd17bfc14b40a403c1c9a0be2c0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/BurstExtrudedRopeRenderSystem.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/BurstExtrudedRopeRenderSystem.cs deleted file mode 100644 index c133f40bb..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/BurstExtrudedRopeRenderSystem.cs +++ /dev/null @@ -1,215 +0,0 @@ -#if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) -using UnityEngine; -using UnityEngine.Rendering; - -using Unity.Jobs; -using Unity.Collections; -using Unity.Mathematics; -using Unity.Burst; - -namespace Obi -{ - public class BurstExtrudedRopeRenderSystem : ObiExtrudedRopeRenderSystem - { - public BurstExtrudedRopeRenderSystem(ObiSolver solver) : base(solver) - { - } - - public override void Setup() - { - base.Setup(); - - // Initialize each batch: - for (int i = 0; i < batchList.Count; ++i) - batchList[i].Initialize(layout, false); - } - - public override void Render() - { - if (pathSmootherSystem == null) - return; - - using (m_RenderMarker.Auto()) - { - var handles = new NativeArray(batchList.Count, Allocator.Temp); - - for (int i = 0; i < batchList.Count; ++i) - { - var batch = batchList[i]; - - var meshJob = new BuildExtrudedMesh - { - pathSmootherIndices = pathSmootherIndices.AsNativeArray(), - chunkOffsets = pathSmootherSystem.chunkOffsets.AsNativeArray(), - - frames = pathSmootherSystem.smoothFrames.AsNativeArray(), - frameOffsets = pathSmootherSystem.smoothFrameOffsets.AsNativeArray(), - frameCounts = pathSmootherSystem.smoothFrameCounts.AsNativeArray(), - - sectionData = sectionData.AsNativeArray(), - sectionOffsets = sectionOffsets.AsNativeArray(), - sectionIndices = sectionIndices.AsNativeArray(), - - vertexOffsets = vertexOffsets.AsNativeArray(), - triangleOffsets = triangleOffsets.AsNativeArray(), - triangleCounts = triangleCounts.AsNativeArray(), - - pathData = pathSmootherSystem.pathData.AsNativeArray(), - rendererData = rendererData.AsNativeArray(), - - vertices = batch.vertices, - tris = batch.triangles, - - firstRenderer = batch.firstRenderer - }; - handles[i] = meshJob.Schedule(batch.rendererCount, 1); - } - - JobHandle.CombineDependencies(handles).Complete(); - handles.Dispose(); - - for (int i = 0; i < batchList.Count; ++i) - { - var batch = batchList[i]; - - batch.mesh.SetVertexBufferData(batch.vertices, 0, 0, batch.vertexCount, 0, MeshUpdateFlags.DontValidateIndices | MeshUpdateFlags.DontRecalculateBounds); - batch.mesh.SetIndexBufferData(batch.triangles, 0, 0, batch.triangleCount * 3, MeshUpdateFlags.DontValidateIndices | MeshUpdateFlags.DontRecalculateBounds); - - var rp = batch.renderParams; - rp.worldBounds = m_Solver.bounds; - - Graphics.RenderMesh(rp, batch.mesh, 0, m_Solver.transform.localToWorldMatrix, m_Solver.transform.localToWorldMatrix); - } - } - } - - [BurstCompile] - struct BuildExtrudedMesh : IJobParallelFor - { - [ReadOnly] public NativeArray pathSmootherIndices; - [ReadOnly] public NativeArray chunkOffsets; - - [ReadOnly] public NativeArray frames; - [ReadOnly] public NativeArray frameOffsets; - [ReadOnly] public NativeArray frameCounts; - - [ReadOnly] public NativeArray sectionData; - [ReadOnly] public NativeArray sectionOffsets; - [ReadOnly] public NativeArray sectionIndices; - - [ReadOnly] public NativeArray vertexOffsets; - [ReadOnly] public NativeArray triangleOffsets; - [ReadOnly] public NativeArray triangleCounts; - - [ReadOnly] public NativeArray rendererData; - [ReadOnly] public NativeArray pathData; - - [NativeDisableParallelForRestriction] public NativeArray vertices; - [NativeDisableParallelForRestriction] public NativeArray tris; - - [ReadOnly] public int firstRenderer; - - public void Execute(int u) - { - int k = firstRenderer + u; - int s = pathSmootherIndices[k]; - - float3 vertex = float3.zero; - float3 normal = float3.zero; - float4 texTangent = float4.zero; - - int tri = 0; - int sectionIndex = 0; - int sectionStart = sectionOffsets[sectionIndices[k]]; - int sectionSegments = (sectionOffsets[sectionIndices[k] + 1] - sectionStart) - 1; - int verticesPerSection = sectionSegments + 1; // the last vertex in each section must be duplicated, due to uv wraparound. - - float smoothLength = 0; - for (int i = chunkOffsets[s]; i < chunkOffsets[s + 1]; ++i) - smoothLength += pathData[i].smoothLength; - - float vCoord = -rendererData[k].uvScale.y * pathData[chunkOffsets[s]].restLength * rendererData[k].uvAnchor; - float actualToRestLengthRatio = smoothLength / pathData[chunkOffsets[s]].restLength; - - int firstVertex = vertexOffsets[k]; - int firstTriangle = triangleOffsets[k]; - - // clear out triangle indices for this rope: - for (int i = firstTriangle; i < firstTriangle + triangleCounts[k]; ++i) - { - int offset = i * 3; - tris[offset] = 0; - tris[offset+1] = 0; - tris[offset+2] = 0; - } - - // for each chunk in the rope: - for (int i = chunkOffsets[s]; i < chunkOffsets[s + 1]; ++i) - { - int firstFrame = frameOffsets[i]; - int frameCount = frameCounts[i]; - - for (int f = 0; f < frameCount; ++f) - { - // Calculate previous and next curve indices: - int prevIndex = firstFrame + math.max(f - 1, 0); - int index = firstFrame + f; - - // advance v texcoord: - vCoord += rendererData[k].uvScale.y * (math.distance(frames[index].position, frames[prevIndex].position) / - (rendererData[k].normalizeV == 1 ? smoothLength : actualToRestLengthRatio)); - - // calculate section thickness and scale the basis vectors by it: - float sectionThickness = frames[index].thickness * rendererData[k].thicknessScale; - - // Loop around each segment: - int nextSectionIndex = sectionIndex + 1; - for (int j = 0; j <= sectionSegments; ++j) - { - // make just one copy of the section vertex: - float2 sectionVertex = sectionData[sectionStart + j]; - - // calculate normal using section vertex, curve normal and binormal: - normal.x = (sectionVertex.x * frames[index].normal.x + sectionVertex.y * frames[index].binormal.x) * sectionThickness; - normal.y = (sectionVertex.x * frames[index].normal.y + sectionVertex.y * frames[index].binormal.y) * sectionThickness; - normal.z = (sectionVertex.x * frames[index].normal.z + sectionVertex.y * frames[index].binormal.z) * sectionThickness; - - // offset curve position by normal: - vertex.x = frames[index].position.x + normal.x; - vertex.y = frames[index].position.y + normal.y; - vertex.z = frames[index].position.z + normal.z; - - // cross(normal, curve tangent) - texTangent.xyz = math.cross(normal, frames[index].tangent); - texTangent.w = -1; - - vertices[firstVertex + sectionIndex * verticesPerSection + j] = new ProceduralRopeVertex - { - pos = vertex, - normal = normal, - tangent = texTangent, - color = frames[index].color, - uv = new float2(j / (float)sectionSegments * rendererData[k].uvScale.x, vCoord) - }; - - if (j < sectionSegments && f < frameCount - 1) - { - int offset = firstTriangle * 3; - tris[offset + tri++] = (firstVertex + sectionIndex * verticesPerSection + j); - tris[offset + tri++] = (firstVertex + nextSectionIndex * verticesPerSection + j); - tris[offset + tri++] = (firstVertex + sectionIndex * verticesPerSection + (j + 1)); - - tris[offset + tri++] = (firstVertex + sectionIndex * verticesPerSection + (j + 1)); - tris[offset + tri++] = (firstVertex + nextSectionIndex * verticesPerSection + j); - tris[offset + tri++] = (firstVertex + nextSectionIndex * verticesPerSection + (j + 1)); - } - } - sectionIndex++; - } - } - } - } - } -} -#endif - diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/BurstExtrudedRopeRenderSystem.cs.meta b/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/BurstExtrudedRopeRenderSystem.cs.meta deleted file mode 100644 index 0fced1ff8..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/BurstExtrudedRopeRenderSystem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 10b89fddf68724bc9ad3305774d86ee1 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/BurstLineRopeRenderSystem.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/BurstLineRopeRenderSystem.cs deleted file mode 100644 index 80dbaf029..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/BurstLineRopeRenderSystem.cs +++ /dev/null @@ -1,215 +0,0 @@ -#if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) -using UnityEngine; -using UnityEngine.Rendering; - -using Unity.Jobs; -using Unity.Collections; -using Unity.Mathematics; -using Unity.Burst; - -namespace Obi -{ - public class BurstLineRopeRenderSystem : ObiLineRopeRenderSystem - { - public BurstLineRopeRenderSystem(ObiSolver solver) : base(solver) - { - } - - public override void Setup() - { - base.Setup(); - - // Initialize each batch: - for (int i = 0; i < batchList.Count; ++i) - batchList[i].Initialize(layout, false); - } - - public override void Render(){} - - public override void RenderFromCamera(Camera camera) - { - if (pathSmootherSystem == null) - return; - - using (m_RenderMarker.Auto()) - { - var handles = new NativeArray(batchList.Count, Allocator.Temp); - - for (int i = 0; i < batchList.Count; ++i) - { - var batch = batchList[i]; - - var meshJob = new BuildLineMesh - { - pathSmootherIndices = pathSmootherIndices.AsNativeArray(), - chunkOffsets = pathSmootherSystem.chunkOffsets.AsNativeArray(), - - frames = pathSmootherSystem.smoothFrames.AsNativeArray(), - frameOffsets = pathSmootherSystem.smoothFrameOffsets.AsNativeArray(), - frameCounts = pathSmootherSystem.smoothFrameCounts.AsNativeArray(), - - vertexOffsets = vertexOffsets.AsNativeArray(), - triangleOffsets = triangleOffsets.AsNativeArray(), - triangleCounts = triangleCounts.AsNativeArray(), - - pathData = pathSmootherSystem.pathData.AsNativeArray(), - rendererData = rendererData.AsNativeArray(), - - vertices = batch.vertices, - tris = batch.triangles, - - firstRenderer = batch.firstRenderer, - localSpaceCamera = m_Solver.transform.InverseTransformPoint(camera.transform.position) - }; - handles[i] = meshJob.Schedule(batch.rendererCount, 1); - } - - JobHandle.CombineDependencies(handles).Complete(); - handles.Dispose(); - - for (int i = 0; i < batchList.Count; ++i) - { - var batch = batchList[i]; - - batch.mesh.SetVertexBufferData(batch.vertices, 0, 0, batch.vertexCount, 0, MeshUpdateFlags.DontValidateIndices | MeshUpdateFlags.DontRecalculateBounds); - batch.mesh.SetIndexBufferData(batch.triangles, 0, 0, batch.triangleCount * 3, MeshUpdateFlags.DontValidateIndices | MeshUpdateFlags.DontRecalculateBounds); - - var rp = batch.renderParams; - rp.worldBounds = m_Solver.bounds; - - Graphics.RenderMesh(rp, batch.mesh, 0, m_Solver.transform.localToWorldMatrix, m_Solver.transform.localToWorldMatrix); - } - } - } - - [BurstCompile] - struct BuildLineMesh : IJobParallelFor - { - [ReadOnly] public NativeArray pathSmootherIndices; - [ReadOnly] public NativeArray chunkOffsets; - - [ReadOnly] public NativeArray frames; - [ReadOnly] public NativeArray frameOffsets; - [ReadOnly] public NativeArray frameCounts; - - [ReadOnly] public NativeArray vertexOffsets; - [ReadOnly] public NativeArray triangleOffsets; - [ReadOnly] public NativeArray triangleCounts; - - [ReadOnly] public NativeArray rendererData; - [ReadOnly] public NativeArray pathData; - - [NativeDisableParallelForRestriction] public NativeArray vertices; - [NativeDisableParallelForRestriction] public NativeArray tris; - - [ReadOnly] public int firstRenderer; - - [ReadOnly] public float3 localSpaceCamera; - - public void Execute(int u) - { - int k = firstRenderer + u; - int s = pathSmootherIndices[k]; - - float3 vertex = float3.zero; - float3 normal = float3.zero; - float4 bitangent = float4.zero; - - int tri = 0; - int sectionIndex = 0; - int firstVertex = vertexOffsets[k]; - int firstTriangle = triangleOffsets[k]; - - float smoothLength = 0; - for (int i = chunkOffsets[s]; i < chunkOffsets[s + 1]; ++i) - smoothLength += pathData[i].smoothLength; - - float vCoord = -rendererData[k].uvScale.y * pathData[chunkOffsets[s]].restLength * rendererData[k].uvAnchor; - float actualToRestLengthRatio = smoothLength / pathData[chunkOffsets[s]].restLength; - - // clear out triangle indices for this rope: - for (int i = firstTriangle; i < firstTriangle + triangleCounts[k]; ++i) - { - int offset = i * 3; - tris[offset] = 0; - tris[offset+1] = 0; - tris[offset+2] = 0; - } - - // for each chunk in the rope: - for (int i = chunkOffsets[s]; i < chunkOffsets[s + 1]; ++i) - { - int firstFrame = frameOffsets[i]; - int frameCount = frameCounts[i]; - - for (int f = 0; f < frameCount; ++f) - { - // Calculate previous and next curve indices: - int prevIndex = firstFrame + math.max(f - 1, 0); - int index = firstFrame + f; - - // advance v texcoord: - vCoord += rendererData[k].uvScale.y * (math.distance(frames[index].position, frames[prevIndex].position) / - (rendererData[k].normalizeV == 1 ? smoothLength : actualToRestLengthRatio)); - - // calculate section thickness and scale the basis vectors by it: - float sectionThickness = frames[index].thickness * rendererData[k].thicknessScale; - - normal.x = frames[index].position.x - localSpaceCamera.x; - normal.y = frames[index].position.y - localSpaceCamera.y; - normal.z = frames[index].position.z - localSpaceCamera.z; - normal = math.normalize(normal); - - bitangent.x = -(normal.y * frames[index].tangent.z - normal.z * frames[index].tangent.y); - bitangent.y = -(normal.z * frames[index].tangent.x - normal.x * frames[index].tangent.z); - bitangent.z = -(normal.x * frames[index].tangent.y - normal.y * frames[index].tangent.x); - bitangent.xyz = math.normalize(bitangent.xyz); - bitangent.w = 1; - - vertex.x = frames[index].position.x - bitangent.x * sectionThickness; - vertex.y = frames[index].position.y - bitangent.y * sectionThickness; - vertex.z = frames[index].position.z - bitangent.z * sectionThickness; - - vertices[firstVertex + sectionIndex * 2] = new ProceduralRopeVertex - { - pos = vertex, - normal = -normal, - tangent = bitangent, - color = frames[index].color, - uv = new float2(0, vCoord) - }; - - vertex.x = frames[index].position.x + bitangent.x * sectionThickness; - vertex.y = frames[index].position.y + bitangent.y * sectionThickness; - vertex.z = frames[index].position.z + bitangent.z * sectionThickness; - - vertices[firstVertex + sectionIndex * 2 + 1] = new ProceduralRopeVertex - { - pos = vertex, - normal = -normal, - tangent = bitangent, - color = frames[index].color, - uv = new float2(1, vCoord) - }; - - if (f < frameCount - 1) - { - int offset = firstTriangle * 3; - tris[offset + tri++] = firstVertex + sectionIndex * 2; - tris[offset + tri++] = firstVertex + (sectionIndex + 1) * 2; - tris[offset + tri++] = firstVertex + sectionIndex * 2 + 1; - - tris[offset + tri++] = firstVertex + sectionIndex * 2 + 1; - tris[offset + tri++] = firstVertex + (sectionIndex + 1) * 2; - tris[offset + tri++] = firstVertex + (sectionIndex + 1) * 2 + 1; - } - - sectionIndex++; - } - } - } - } - } -} -#endif - diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/BurstLineRopeRenderSystem.cs.meta b/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/BurstLineRopeRenderSystem.cs.meta deleted file mode 100644 index 7ab2fc4ea..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/BurstLineRopeRenderSystem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5f950cc46a13e4273856e2ec96c59eb9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/BurstMeshRopeRenderSystem.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/BurstMeshRopeRenderSystem.cs deleted file mode 100644 index 3a78845b1..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/BurstMeshRopeRenderSystem.cs +++ /dev/null @@ -1,272 +0,0 @@ -#if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) -using UnityEngine; - -using Unity.Jobs; -using Unity.Collections; -using Unity.Mathematics; -using Unity.Burst; -using UnityEngine.Rendering; - -namespace Obi -{ - public class BurstMeshRopeRenderSystem : ObiMeshRopeRenderSystem - { - public BurstMeshRopeRenderSystem(ObiSolver solver) : base(solver) - { - } - - protected override void CloseBatches() - { - for (int i = 0; i < batchList.Count; ++i) - batchList[i].Initialize(sortedRenderers, meshData, meshIndices, layout, false); - - base.CloseBatches(); - } - - public override void Render() - { - if (pathSmootherSystem == null) - return; - - using (m_RenderMarker.Auto()) - { - var handles = new NativeArray(batchList.Count, Allocator.Temp); - - for (int i = 0; i < batchList.Count; ++i) - { - var batch = batchList[i]; - - var meshJob = new BuildRopeMeshJob - { - chunkOffsets = pathSmootherSystem.chunkOffsets.AsNativeArray(), - pathSmootherIndices = pathSmootherIndices.AsNativeArray(), - - frames = pathSmootherSystem.smoothFrames.AsNativeArray(), - frameOffsets = pathSmootherSystem.smoothFrameOffsets.AsNativeArray(), - frameCounts = pathSmootherSystem.smoothFrameCounts.AsNativeArray(), - - vertexOffsets = vertexOffsets.AsNativeArray(), - - meshIndices = meshIndices.AsNativeArray(), - meshData = meshData.meshData.AsNativeArray(), - - rendererData = rendererData.AsNativeArray(), - pathData = pathSmootherSystem.pathData.AsNativeArray(), - - sortedIndices = sortedIndices.AsNativeArray(), - sortedOffsets = sortedOffsets.AsNativeArray(), - - positions = meshData.restPositions.AsNativeArray(), - normals = meshData.restNormals.AsNativeArray(), - tangents = meshData.restTangents.AsNativeArray(), - colors = meshData.restColors.AsNativeArray(), - - vertices = batch.dynamicVertexData.AsNativeArray(), - - firstRenderer = batch.firstRenderer - - }; - handles[i] = meshJob.Schedule(batch.rendererCount, 1); - } - - JobHandle.CombineDependencies(handles).Complete(); - handles.Dispose(); - - for (int i = 0; i < batchList.Count; ++i) - { - var batch = batchList[i]; - - batch.mesh.SetVertexBufferData(batch.dynamicVertexData.AsNativeArray(), 0, 0, batch.vertexCount, 0, MeshUpdateFlags.DontValidateIndices | MeshUpdateFlags.DontRecalculateBounds | MeshUpdateFlags.DontResetBoneBounds | MeshUpdateFlags.DontNotifyMeshUsers); - - var rp = batch.renderParams; - rp.worldBounds = m_Solver.bounds; - - for (int m = 0; m < batch.materials.Length; ++m) - { - rp.material = batch.materials[m]; - Graphics.RenderMesh(rp, batch.mesh, m, m_Solver.transform.localToWorldMatrix, m_Solver.transform.localToWorldMatrix); - - // Unity bug: Graphics.RenderMesh consistently crashes when existing play mode (seems fixed in 2021.3.4f1) - // https://issuetracker.unity3d.com/issues/the-editor-crashes-on-exit-when-using-graphics-dot-rendermesh - //renderParams.material = batch.materials[m]; - //renderParams.camera = null; - //Graphics.RenderMesh(renderParams, batch.mesh, m, m_Solver.transform.localToWorldMatrix); - } - } - } - } - - [BurstCompile] - struct BuildRopeMeshJob : IJobParallelFor - { - [ReadOnly] public NativeArray pathSmootherIndices; - [ReadOnly] public NativeArray chunkOffsets; - [ReadOnly] public NativeArray frames; - [ReadOnly] public NativeArray frameOffsets; - [ReadOnly] public NativeArray frameCounts; - - [ReadOnly] public NativeArray vertexOffsets; - - [ReadOnly] public NativeArray meshIndices; - [ReadOnly] public NativeArray meshData; - - [ReadOnly] public NativeArray rendererData; - [ReadOnly] public NativeArray pathData; - - [ReadOnly] public NativeArray sortedIndices; - [ReadOnly] public NativeArray sortedOffsets; - - [ReadOnly] public NativeArray positions; - [ReadOnly] public NativeArray normals; - [ReadOnly] public NativeArray tangents; - [ReadOnly] public NativeArray colors; - - [NativeDisableParallelForRestriction] public NativeArray vertices; - - [ReadOnly] public int firstRenderer; - - public void Execute(int i) - { - int rendererIndex = firstRenderer + i; - int pathIndex = pathSmootherIndices[rendererIndex]; - var renderer = rendererData[rendererIndex]; - - // get mesh data: - var mesh = meshData[meshIndices[rendererIndex]]; - var sortedOffset = sortedOffsets[rendererIndex]; - - // get index of first output vertex: - int firstOutputVertex = vertexOffsets[rendererIndex]; - - // get index of first chunk, ignore others (no support for tearing): - int chunkIndex = chunkOffsets[pathIndex]; - - // get first frame and frame count: - int firstFrame = frameOffsets[chunkIndex]; - int lastFrame = firstFrame + frameCounts[chunkIndex] - 1; - - // get mesh deform axis: - int axis = (int)renderer.axis; - - // initialize scale vector: - float3 actualScale = (Vector3)renderer.scale; - - // calculate stretch ratio: - float stretchRatio = renderer.stretchWithRope == 1 ? pathData[chunkIndex].smoothLength / pathData[chunkIndex].restLength : 1; - - // squashing factor, makes mesh thinner when stretched and thicker when compresssed. - float squashing = math.clamp(1 + renderer.volumeScaling * (1 / math.max(stretchRatio, 0.01f) - 1), 0.01f, 2); - - // calculate scale along swept axis so that the mesh spans the entire lenght of the rope if required. - if (renderer.spanEntireLength == 1) - { - float totalMeshLength = renderer.meshSizeAlongAxis * renderer.instances; - float totalSpacing = renderer.instanceSpacing * (renderer.instances - 1); - actualScale[axis] = pathData[chunkIndex].restLength / (totalMeshLength + totalSpacing); - } - - // adjust axis lenght by stretch ratio: - actualScale[axis] *= stretchRatio; - - // init loop variables: - float lengthAlongAxis = renderer.offset; - int index = firstFrame; - int nextIndex = firstFrame + 1; - int prevIndex = firstFrame; - float nextMagnitude = math.distance(frames[index].position, frames[nextIndex].position); - float prevMagnitude = nextMagnitude; - - for (int k = 0; k < renderer.instances; ++k) - { - for (int j = 0; j < mesh.vertexCount; ++j) - { - int currVIndex = mesh.firstVertex + sortedIndices[sortedOffset + j]; - int prevVIndex = mesh.firstVertex + sortedIndices[sortedOffset + math.max(0,j - 1)]; - - // calculate how much we've advanced in the sort axis since the last vertex: - lengthAlongAxis += (positions[currVIndex][axis] - positions[prevVIndex][axis]) * actualScale[axis]; - - // check if we have moved to a new section of the curve: - BurstPathFrame frame; - if (lengthAlongAxis < 0) - { - while (-lengthAlongAxis > prevMagnitude && index > firstFrame) - { - lengthAlongAxis += prevMagnitude; - index = math.max(index - 1, firstFrame); - nextIndex = math.min(index + 1, lastFrame); - prevIndex = math.max(index - 1, firstFrame); - nextMagnitude = math.distance(frames[index].position, frames[nextIndex].position); - prevMagnitude = math.distance(frames[index].position, frames[prevIndex].position); - } - - var offset = float3.zero; - if (index == prevIndex) - { - offset = frames[index].position - frames[nextIndex].position; - prevMagnitude = math.length(offset); - } - - frame = InterpolateFrames(frames[index], frames[prevIndex], offset, -lengthAlongAxis / prevMagnitude); - } - else - { - while (lengthAlongAxis > nextMagnitude && index < lastFrame) - { - lengthAlongAxis -= nextMagnitude; - index = math.min(index + 1, lastFrame); - nextIndex = math.min(index + 1, lastFrame); - prevIndex = math.max(index - 1, firstFrame); - nextMagnitude = math.distance(frames[index].position, frames[nextIndex].position); - prevMagnitude = math.distance(frames[index].position, frames[prevIndex].position); - } - - var offset = float3.zero; - if (index == nextIndex) - { - offset = frames[index].position - frames[prevIndex].position; - nextMagnitude = math.length(offset); - } - - frame = InterpolateFrames(frames[index], frames[nextIndex], offset, lengthAlongAxis / nextMagnitude); - } - - // update basis matrix: - var basis = frame.ToMatrix(axis); - - // calculate vertex offset from curve: - float3 offsetFromCurve = positions[currVIndex] * actualScale * frame.thickness * squashing; - offsetFromCurve[axis] = 0; - - // write modified vertex data: - vertices[firstOutputVertex + sortedIndices[sortedOffset + j]] = new RopeMeshVertex - { - pos = frame.position + math.mul(basis, offsetFromCurve), - normal = math.mul(basis, normals[currVIndex]), - tangent = new float4(math.mul(basis, tangents[currVIndex].xyz), tangents[currVIndex].w), - color = colors[currVIndex] * frame.color, - }; - } - - firstOutputVertex += mesh.vertexCount; - lengthAlongAxis += renderer.instanceSpacing * actualScale[axis]; - } - } - - BurstPathFrame InterpolateFrames(BurstPathFrame a, BurstPathFrame b, float3 bOffset, float t) - { - // this offset is used to displace a copy of the first and last frames of the path, - // to ensure meshes extrude correctly prior to the first or past the last frame. - b.position += bOffset; - var interp = (1 - t) * a + t * b; - - // (no need to renormalize tangent, since offsetFromCurve[axis] = 0) - interp.normal = math.normalize(interp.normal); - interp.binormal = math.normalize(interp.binormal); - return interp; - } - } - } -} -#endif - diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/BurstMeshRopeRenderSystem.cs.meta b/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/BurstMeshRopeRenderSystem.cs.meta deleted file mode 100644 index a4927d494..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/BurstMeshRopeRenderSystem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1578f081848d045dba76cd147f835e7c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/BurstPathFrame.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/BurstPathFrame.cs deleted file mode 100644 index cbf52794a..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/BurstPathFrame.cs +++ /dev/null @@ -1,170 +0,0 @@ -#if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) -using System.Runtime.InteropServices; -using UnityEngine; -using Unity.Mathematics; - -namespace Obi -{ - [StructLayout(LayoutKind.Sequential)] - public struct BurstPathFrame - { - public enum Axis - { - X = 0, - Y = 1, - Z = 2 - } - - public float3 position; - public float3 tangent; - public float3 normal; - public float3 binormal; - public float4 color; - public float thickness; - - public BurstPathFrame(float3 position, float3 tangent, float3 normal, float3 binormal, float4 color, float thickness) - { - this.position = position; - this.normal = normal; - this.tangent = tangent; - this.binormal = binormal; - this.color = color; - this.thickness = thickness; - } - - public void Reset() - { - position = float3.zero; - tangent = new float3(0, 0, 1); - normal = new float3(0, 1, 0); - binormal = new float3(1, 0, 0); - color = new float4(1, 1, 1, 1); - thickness = 0; - } - - public static BurstPathFrame operator +(BurstPathFrame c1, BurstPathFrame c2) - { - return new BurstPathFrame(c1.position + c2.position, c1.tangent + c2.tangent, c1.normal + c2.normal, c1.binormal + c2.binormal, c1.color + c2.color, c1.thickness + c2.thickness); - } - - public static BurstPathFrame operator *(float f, BurstPathFrame c) - { - return new BurstPathFrame(c.position * f, c.tangent * f, c.normal * f, c.binormal * f, c.color * f, c.thickness * f); - } - - public static void WeightedSum(float w1, float w2, float w3, in BurstPathFrame c1, in BurstPathFrame c2, in BurstPathFrame c3, ref BurstPathFrame sum) - { - sum.position.x = c1.position.x * w1 + c2.position.x * w2 + c3.position.x * w3; - sum.position.y = c1.position.y * w1 + c2.position.y * w2 + c3.position.y * w3; - sum.position.z = c1.position.z * w1 + c2.position.z * w2 + c3.position.z * w3; - - sum.tangent.x = c1.tangent.x * w1 + c2.tangent.x * w2 + c3.tangent.x * w3; - sum.tangent.y = c1.tangent.y * w1 + c2.tangent.y * w2 + c3.tangent.y * w3; - sum.tangent.z = c1.tangent.z * w1 + c2.tangent.z * w2 + c3.tangent.z * w3; - - sum.normal.x = c1.normal.x * w1 + c2.normal.x * w2 + c3.normal.x * w3; - sum.normal.y = c1.normal.y * w1 + c2.normal.y * w2 + c3.normal.y * w3; - sum.normal.z = c1.normal.z * w1 + c2.normal.z * w2 + c3.normal.z * w3; - - sum.binormal.x = c1.binormal.x * w1 + c2.binormal.x * w2 + c3.binormal.x * w3; - sum.binormal.y = c1.binormal.y * w1 + c2.binormal.y * w2 + c3.binormal.y * w3; - sum.binormal.z = c1.binormal.z * w1 + c2.binormal.z * w2 + c3.binormal.z * w3; - - sum.color.x = c1.color.x * w1 + c2.color.x * w2 + c3.color.x * w3; - sum.color.y = c1.color.y * w1 + c2.color.y * w2 + c3.color.y * w3; - sum.color.z = c1.color.z * w1 + c2.color.z * w2 + c3.color.z * w3; - sum.color.w = c1.color.w * w1 + c2.color.w * w2 + c3.color.w * w3; - - sum.thickness = c1.thickness * w1 + c2.thickness * w2 + c3.thickness * w3; - } - - public void SetTwist(float twist) - { - quaternion twistQ = quaternion.AxisAngle(tangent, math.radians(twist)); - normal = math.mul(twistQ, normal); - binormal = math.mul(twistQ, binormal); - } - - public static quaternion FromToRotation(float3 aFrom, float3 aTo) - { - float3 axis = math.cross(aFrom, aTo); - float angle = math.acos(math.clamp(math.dot(math.normalize(aFrom), math.normalize(aTo)), -1f, 1f)); - return quaternion.AxisAngle(math.normalize(axis), angle); - } - - public void SetTwistAndTangent(float twist, float3 tangent) - { - this.tangent = tangent; - normal = math.normalize(new float3(tangent.y, tangent.x, 0)); - binormal = math.cross(normal, tangent); - - quaternion twistQ = quaternion.AxisAngle(tangent, math.radians(twist)); - normal = math.mul(twistQ, normal); - binormal = math.mul(twistQ, binormal); - } - - public void Transport(in BurstPathFrame frame, float twist) - { - // Calculate delta rotation: - quaternion rotQ = Quaternion.FromToRotation(tangent, frame.tangent); - quaternion twistQ = quaternion.AxisAngle(frame.tangent, math.radians(twist)); - quaternion finalQ = math.mul(twistQ, rotQ); - - // Rotate previous frame axes to obtain the new ones: - normal = math.mul(finalQ, normal); - binormal = math.mul(finalQ, binormal); - tangent = frame.tangent; - position = frame.position; - thickness = frame.thickness; - color = frame.color; - } - - public void Transport(float3 newPosition, float3 newTangent, float twist) - { - // Calculate delta rotation: - quaternion rotQ = Quaternion.FromToRotation(tangent, newTangent); - quaternion twistQ = quaternion.AxisAngle(newTangent, math.radians(twist)); - quaternion finalQ = math.mul(twistQ, rotQ); - - // Rotate previous frame axes to obtain the new ones: - normal = math.mul(finalQ, normal); - binormal = math.mul(finalQ, binormal); - tangent = newTangent; - position = newPosition; - - } - - // Transport, hinting the normal. - public void Transport(float3 newPosition, float3 newTangent, float3 newNormal, float twist) - { - normal = math.mul(quaternion.AxisAngle(newTangent, math.radians(twist)), newNormal); - tangent = newTangent; - binormal = math.cross(normal, tangent); - position = newPosition; - } - - public float3x3 ToMatrix(int mainAxis) - { - float3x3 basis = new float3x3(); - - int xo = (mainAxis) % 3; - int yo = (mainAxis + 1) % 3; - int zo = (mainAxis + 2) % 3; - - basis[xo] = tangent; - basis[yo] = binormal; - basis[zo] = normal; - - return basis; - } - - public void DebugDraw(float size) - { - Debug.DrawRay(position, binormal * size, Color.red); - Debug.DrawRay(position, normal * size, Color.green); - Debug.DrawRay(position, tangent * size, Color.blue); - } - } -} -#endif - diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/BurstPathFrame.cs.meta b/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/BurstPathFrame.cs.meta deleted file mode 100644 index 284880b92..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/BurstPathFrame.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4827bd4bd4feb46bfbe458174871b8ee -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/BurstPathSmootherRenderSystem.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/BurstPathSmootherRenderSystem.cs deleted file mode 100644 index 3d1136240..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/BurstPathSmootherRenderSystem.cs +++ /dev/null @@ -1,63 +0,0 @@ -#if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) -using Unity.Jobs; -using Unity.Mathematics; - -namespace Obi -{ - public class BurstPathSmootherRenderSystem : ObiPathSmootherRenderSystem - { - public BurstPathSmootherRenderSystem(ObiSolver solver) : base(solver) - { - } - - public override void Render() - { - using (m_RenderMarker.Auto()) - { - base.Render(); - - // generate raw frames using parallel transport - var parallelTransportJob = new ParallelTransportJob - { - pathFrames = rawFrames.AsNativeArray(), - frameOffsets = rawFrameOffsets.AsNativeArray(), - particleIndices = particleIndices.AsNativeArray(), - renderablePositions = m_Solver.renderablePositions.AsNativeArray(), - renderableOrientations = m_Solver.renderableOrientations.AsNativeArray(), - principalRadii = m_Solver.principalRadii.AsNativeArray(), - colors = m_Solver.colors.AsNativeArray(), - pathData = pathData.AsNativeArray() - }; - - var handle = parallelTransportJob.Schedule(rawFrameOffsets.count, 4); - - // throw away unneeded frames using decimation - var decimationJob = new DecimateChunksJob - { - inputFrames = rawFrames.AsNativeArray(), - inputFrameOffsets = rawFrameOffsets.AsNativeArray(), - outputFrameCounts = decimatedFrameCounts.AsNativeArray(), - pathData = pathData.AsNativeArray() - }; - - handle = decimationJob.Schedule(rawFrameOffsets.count, 4, handle); - - // smooth chunks: - var chaikinJob = new ChaikinSmoothChunksJob() - { - inputFrames = rawFrames.AsNativeArray(), - inputFrameOffsets = rawFrameOffsets.AsNativeArray(), - inputFrameCounts = decimatedFrameCounts.AsNativeArray(), - outputFrames = smoothFrames.AsNativeArray(), - outputFrameOffsets = smoothFrameOffsets.AsNativeArray(), - outputFrameCounts = smoothFrameCounts.AsNativeArray(), - pathData = pathData.AsNativeArray() - }; - - chaikinJob.Schedule(rawFrameOffsets.count, 4, handle).Complete(); - } - } - } -} -#endif - diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/BurstPathSmootherRenderSystem.cs.meta b/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/BurstPathSmootherRenderSystem.cs.meta deleted file mode 100644 index 7cf39ab54..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/BurstPathSmootherRenderSystem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: be61f37ff31ff43ebb9bc8a55bd3edc7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/ChaikinSmoothChunksJob.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/ChaikinSmoothChunksJob.cs deleted file mode 100644 index 9a7587f81..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/ChaikinSmoothChunksJob.cs +++ /dev/null @@ -1,93 +0,0 @@ -#if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) -using Unity.Burst; -using Unity.Collections; -using Unity.Collections.LowLevel.Unsafe; -using Unity.Jobs; -using Unity.Mathematics; - -namespace Obi -{ - [BurstCompile] - struct ChaikinSmoothChunksJob : IJobParallelFor - { - [NativeDisableParallelForRestriction] public NativeArray inputFrames; - [ReadOnly] public NativeArray inputFrameOffsets; - [ReadOnly] public NativeArray inputFrameCounts; - - [NativeDisableParallelForRestriction] public NativeArray outputFrames; - [ReadOnly] public NativeArray outputFrameOffsets; - [NativeDisableParallelForRestriction] public NativeArray outputFrameCounts; - - [NativeDisableParallelForRestriction] public NativeArray pathData; - - public void Execute(int i) - { - int firstInputIndex = i > 0 ? inputFrameOffsets[i - 1] : 0; - int inputFrameCount = inputFrameCounts[i]; - - int firstOutputIndex = outputFrameOffsets[i]; - - int k = (int)pathData[i].smoothing; - - // No work to do. just copy the input to the output: - if (k == 0) - { - outputFrameCounts[i] = inputFrameCount; - for (int j = 0; j < inputFrameCount; ++j) - outputFrames[firstOutputIndex + j] = inputFrames[firstInputIndex + j]; - } - else - { - // precalculate some quantities: - int pCount = (int)math.pow(2, k); - int n0 = inputFrameCount - 1; - float twoRaisedToMinusKPlus1 = math.pow(2, -(k + 1)); - float twoRaisedToMinusK = math.pow(2, -k); - float twoRaisedToMinus2K = math.pow(2, -2 * k); - float twoRaisedToMinus2KMinus1 = math.pow(2, -2 * k - 1); - - outputFrameCounts[i] = (inputFrameCount - 2) * pCount + 2; - - // calculate initial curve points: - outputFrames[firstOutputIndex] = (0.5f + twoRaisedToMinusKPlus1) * inputFrames[firstInputIndex] + (0.5f - twoRaisedToMinusKPlus1) * inputFrames[firstInputIndex + 1]; - outputFrames[firstOutputIndex + pCount * n0 - pCount + 1] = (0.5f - twoRaisedToMinusKPlus1) * inputFrames[firstInputIndex + n0 - 1] + (0.5f + twoRaisedToMinusKPlus1) * inputFrames[firstInputIndex + n0]; - - // calculate internal points: - for (int j = 1; j <= pCount; ++j) - { - // precalculate coefficients: - float F = 0.5f - twoRaisedToMinusKPlus1 - (j - 1) * (twoRaisedToMinusK - j * twoRaisedToMinus2KMinus1); - float G = 0.5f + twoRaisedToMinusKPlus1 + (j - 1) * (twoRaisedToMinusK - j * twoRaisedToMinus2K); - float H = (j - 1) * j * twoRaisedToMinus2KMinus1; - - for (int l = 1; l < n0; ++l) - { - BurstPathFrame.WeightedSum(F, G, H, - in GetElementAsRef(inputFrames, firstInputIndex + l - 1), - in GetElementAsRef(inputFrames, firstInputIndex + l), - in GetElementAsRef(inputFrames, firstInputIndex + l + 1), - ref GetElementAsRef(outputFrames, firstOutputIndex + (l - 1) * pCount + j)); - } - } - - // make first and last curve points coincide with original points: - outputFrames[firstOutputIndex] = inputFrames[firstInputIndex]; - outputFrames[firstOutputIndex + outputFrameCounts[i] - 1] = inputFrames[firstInputIndex + inputFrameCount - 1]; - } - - var data = pathData[i]; - data.smoothLength = 0; - for (int j = firstOutputIndex + 1; j < firstOutputIndex + outputFrameCounts[i]; ++j) - data.smoothLength += math.distance(outputFrames[j - 1].position, outputFrames[j].position); - - pathData[i] = data; - - } - - private static unsafe ref T GetElementAsRef(NativeArray array, int index) where T : unmanaged - { - return ref UnsafeUtility.ArrayElementAsRef(array.GetUnsafePtr(), index); - } - } -} -#endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/ChaikinSmoothChunksJob.cs.meta b/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/ChaikinSmoothChunksJob.cs.meta deleted file mode 100644 index 450b2cf70..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/ChaikinSmoothChunksJob.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 0b479f3e1bd184363a9259c4d737b611 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/DecimateChunksJob.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/DecimateChunksJob.cs deleted file mode 100644 index 6129c63b1..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/DecimateChunksJob.cs +++ /dev/null @@ -1,79 +0,0 @@ -#if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) -using Unity.Burst; -using Unity.Collections; -using Unity.Jobs; -using Unity.Mathematics; - -namespace Obi -{ - [BurstCompile] - struct DecimateChunksJob : IJobParallelFor - { - [ReadOnly] public NativeArray inputFrameOffsets; - [NativeDisableParallelForRestriction] public NativeArray inputFrames; - [NativeDisableParallelForRestriction] public NativeArray outputFrameCounts; - - [ReadOnly] public NativeArray pathData; - - public void Execute(int i) - { - - int firstInputIndex = i > 0 ? inputFrameOffsets[i - 1] : 0; - int inputFrameCount = inputFrameOffsets[i] - firstInputIndex; - - // no decimation, no work to do, just return: - if (pathData[i].decimation < 0.00001f || inputFrameCount < 3) - { - outputFrameCounts[i] = inputFrameCount; - return; - } - - float scaledThreshold = pathData[i].decimation * pathData[i].decimation * 0.01f; - - int start = 0; - int end = inputFrameCount - 1; - outputFrameCounts[i] = 0; - - while (start < end) - { - // add starting point: - inputFrames[firstInputIndex + outputFrameCounts[i]++] = inputFrames[firstInputIndex + start]; - - var newEnd = end; - - while (true) - { - int maxDistanceIndex = 0; - float maxDistance = 0; - - // find the point that's furthest away from the current segment: - for (int k = start + 1; k < newEnd; k++) - { - var nearest = BurstMath.NearestPointOnEdge(inputFrames[firstInputIndex + start].position, - inputFrames[firstInputIndex + newEnd].position, - inputFrames[firstInputIndex + k].position, out _); - float d = math.lengthsq(nearest - inputFrames[firstInputIndex + k].position); - - if (d > maxDistance) - { - maxDistanceIndex = k; - maxDistance = d; - } - } - - if (maxDistance <= scaledThreshold) - break; - - newEnd = maxDistanceIndex; - } - - start = newEnd; - } - - // add the last point: - inputFrames[firstInputIndex + outputFrameCounts[i]++] = inputFrames[firstInputIndex + end]; - - } - } -} -#endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/DecimateChunksJob.cs.meta b/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/DecimateChunksJob.cs.meta deleted file mode 100644 index 2fdbac832..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/DecimateChunksJob.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6e3177e6c6643442db096e939f5d7109 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/ParallelTransportJob.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/ParallelTransportJob.cs deleted file mode 100644 index bd8390adf..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/ParallelTransportJob.cs +++ /dev/null @@ -1,89 +0,0 @@ -#if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) -using Unity.Burst; -using Unity.Collections; -using Unity.Jobs; -using Unity.Mathematics; - -namespace Obi -{ - [BurstCompile] - struct ParallelTransportJob : IJobParallelFor - { - [NativeDisableParallelForRestriction] public NativeArray pathFrames; - [ReadOnly] public NativeArray frameOffsets; - [ReadOnly] public NativeArray particleIndices; - - [ReadOnly] public NativeArray renderablePositions; - [ReadOnly] public NativeArray renderableOrientations; - [ReadOnly] public NativeArray principalRadii; - [ReadOnly] public NativeArray colors; - [ReadOnly] public NativeArray pathData; - - public void Execute(int i) - { - BurstPathFrame nextFrame = new BurstPathFrame(); - BurstPathFrame currFrame = new BurstPathFrame(); - BurstPathFrame prevFrame = new BurstPathFrame(); - - nextFrame.Reset(); - currFrame.Reset(); - prevFrame.Reset(); - - int firstIndex = i > 0 ? frameOffsets[i - 1] : 0; - int frameCount = frameOffsets[i] - firstIndex; - - // initialize current and previous frame: - PathFrameFromParticle(ref currFrame, particleIndices[firstIndex], pathData[i].usesOrientedParticles == 1, false); - prevFrame = currFrame; - - // parallel transport: - for (int m = 1; m <= frameCount; ++m) - { - int index = firstIndex + math.min(m, frameCount - 1); - int pIndex = particleIndices[index]; - - // generate curve frame from particle: - PathFrameFromParticle(ref nextFrame, pIndex, pathData[i].usesOrientedParticles == 1); - - if (pathData[i].usesOrientedParticles == 1) - { - // copy frame directly. - prevFrame = currFrame; - } - else - { - // perform parallel transport, using forward / backward average to calculate tangent. - // if the average is too small, reuse the previous frame tangent. - currFrame.tangent = math.normalizesafe((currFrame.position - prevFrame.position) + - (nextFrame.position - currFrame.position), prevFrame.tangent); - prevFrame.Transport(currFrame, pathData[i].twist); - } - - // advance current frame: - currFrame = nextFrame; - pathFrames[firstIndex + m - 1] = prevFrame; - } - - } - - private void PathFrameFromParticle(ref BurstPathFrame frame, int particleIndex, bool useOrientedParticles, bool interpolateOrientation = false) - { - // Update current frame values from particles: - frame.position = renderablePositions[particleIndex].xyz; - frame.thickness = principalRadii[particleIndex][0]; - frame.color = colors[particleIndex]; - - // Use particle orientation if possible: - if (useOrientedParticles) - { - quaternion current = renderableOrientations[particleIndex]; - quaternion previous = renderableOrientations[math.max(0, particleIndex - 1)]; - float4x4 average = (interpolateOrientation ? math.slerp(current, previous, 0.5f) : current).toMatrix(); - frame.normal = average.c1.xyz; - frame.binormal = average.c0.xyz; - frame.tangent = average.c2.xyz; - } - } - } -} -#endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/ParallelTransportJob.cs.meta b/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/ParallelTransportJob.cs.meta deleted file mode 100644 index b07ca0faf..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering/RopeAndRod/ParallelTransportJob.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7c4018fb5d53646be9ef6c91f07c7eb6 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Solver/ApplyInertialForcesJob.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Solver/ApplyInertialForcesJob.cs index ab3d68e66..fa1cc8e1a 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Solver/ApplyInertialForcesJob.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Solver/ApplyInertialForcesJob.cs @@ -24,12 +24,8 @@ namespace Obi [ReadOnly] public float worldAngularInertiaScale; [NativeDisableParallelForRestriction] public NativeArray velocities; - [NativeDisableParallelForRestriction] public NativeArray wind; [ReadOnly] public float deltaTime; - [ReadOnly] public float4 ambientWind; - [ReadOnly] public BurstInertialFrame inertialFrame; - [ReadOnly] public bool inertialWind; public void Execute(int index) { @@ -44,14 +40,6 @@ namespace Obi velocities[i] -= (inertialAccel * worldLinearInertiaScale + angularAccel * worldAngularInertiaScale) * deltaTime; } - - wind[i] = ambientWind; - - if (inertialWind) - { - float4 wsPos = inertialFrame.frame.TransformPoint(positions[i]); - wind[i] -= inertialFrame.frame.InverseTransformVector(inertialFrame.VelocityAtPoint(wsPos)); - } } } } diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Solver/BoundsReductionJob.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Solver/BoundsReductionJob.cs index f6ec1072b..89da4b413 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Solver/BoundsReductionJob.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Solver/BoundsReductionJob.cs @@ -10,52 +10,18 @@ using System.Collections; namespace Obi { [BurstCompile] - struct CalculateSimplexBoundsJob : IJobParallelFor + struct ParticleToBoundsJob : IJobParallelFor { - [ReadOnly] public NativeArray radii; - [ReadOnly] public NativeArray fluidMaterials; + [ReadOnly] public NativeArray activeParticles; [ReadOnly] public NativeArray positions; - [ReadOnly] public NativeArray velocities; + [ReadOnly] public NativeArray radii; - // simplex arrays: - [ReadOnly] public NativeArray simplices; - [ReadOnly] public SimplexCounts simplexCounts; - - [ReadOnly] public NativeArray particleMaterialIndices; - [ReadOnly] public NativeArray collisionMaterials; - public NativeArray simplexBounds; - public NativeArray reducedBounds; - - [ReadOnly] public Oni.SolverParameters parameters; - [ReadOnly] public float dt; + public NativeArray bounds; public void Execute(int i) { - int simplexStart = simplexCounts.GetSimplexStartAndSize(i, out int simplexSize); - - var sxBounds = new BurstAabb(float.MaxValue, float.MinValue); - var soBounds = new BurstAabb(float.MaxValue, float.MinValue); - - for (int j = 0; j < simplexSize; ++j) - { - int p = simplices[simplexStart + j]; - - int m = particleMaterialIndices[p]; - float solidRadius = radii[p].x + (m >= 0 ? collisionMaterials[m].stickDistance : 0); - - // Expand simplex bounds, using both the particle's original position and its velocity. - // Add collision margin for both fluid neighborhood too (prevents explosions at high pressures due to neighborhood deficiency) - sxBounds.EncapsulateParticle(positions[p], - BurstIntegration.IntegrateLinear(positions[p], velocities[p], dt * parameters.particleCCD), - math.max(solidRadius, fluidMaterials[p].x * 0.5f) + parameters.collisionMargin); - - soBounds.EncapsulateParticle(positions[p], - BurstIntegration.IntegrateLinear(positions[p], velocities[p], dt), - solidRadius); - } - - simplexBounds[i] = sxBounds; - reducedBounds[i] = soBounds; + int p = activeParticles[i]; + bounds[i] = new BurstAabb(positions[p] - radii[p].x, positions[p] + radii[p].x); } } diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Solver/BuildSimplexAabbs.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Solver/BuildSimplexAabbs.cs new file mode 100644 index 000000000..d8931f228 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Solver/BuildSimplexAabbs.cs @@ -0,0 +1,55 @@ +#if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) +using UnityEngine; +using Unity.Jobs; +using Unity.Collections; +using Unity.Mathematics; +using Unity.Burst; +using System; +using System.Collections; + +namespace Obi +{ + + [BurstCompile] + struct BuildSimplexAabbs : IJobParallelFor + { + [ReadOnly] public NativeArray radii; + [ReadOnly] public NativeArray fluidRadii; + [ReadOnly] public NativeArray positions; + [ReadOnly] public NativeArray velocities; + + // simplex arrays: + [ReadOnly] public NativeArray simplices; + [ReadOnly] public SimplexCounts simplexCounts; + + [ReadOnly] public NativeArray particleMaterialIndices; + [ReadOnly] public NativeArray collisionMaterials; + [ReadOnly] public float collisionMargin; + [ReadOnly] public float continuousCollisionDetection; + [ReadOnly] public float dt; + + public NativeArray simplexBounds; + + public void Execute(int i) + { + int simplexStart = simplexCounts.GetSimplexStartAndSize(i, out int simplexSize); + + var bounds = new BurstAabb(float.MaxValue, float.MinValue); + for (int j = 0; j < simplexSize; ++j) + { + int p = simplices[simplexStart + j]; + + // Find this particle's stick distance: + int m = particleMaterialIndices[p]; + float stickDistance = m >= 0 ? collisionMaterials[m].stickDistance : 0; + + // Expand simplex bounds, using both the particle's original position and its velocity: + bounds.EncapsulateParticle(positions[p], positions[p] + velocities[p] * continuousCollisionDetection * dt, + math.max(radii[p].x + stickDistance, fluidRadii[p] * 0.5f) + collisionMargin); + } + + simplexBounds[i] = bounds; + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Obi/Editor/RopeAndRod/Utils/ObiPinholeEditor.cs.meta b/Assets/Obi/Scripts/Common/Backends/Burst/Solver/BuildSimplexAabbs.cs.meta similarity index 83% rename from Assets/Obi/Editor/RopeAndRod/Utils/ObiPinholeEditor.cs.meta rename to Assets/Obi/Scripts/Common/Backends/Burst/Solver/BuildSimplexAabbs.cs.meta index 97fc35243..d0ff571de 100644 --- a/Assets/Obi/Editor/RopeAndRod/Utils/ObiPinholeEditor.cs.meta +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Solver/BuildSimplexAabbs.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: f58defb5faddb428ea91cd06eecd8729 +guid: 7834dd4a6de2346b5b36154d6aaa531a MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Solver/BurstSolverImpl.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Solver/BurstSolverImpl.cs index 3a3f2766a..309143c7e 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Solver/BurstSolverImpl.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Solver/BurstSolverImpl.cs @@ -1,339 +1,970 @@ -#if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) using UnityEngine; using Unity.Jobs; using Unity.Mathematics; using Unity.Collections; +#if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) +using UnityEngine; +using Unity.Jobs; +using Unity.Mathematics; +using Unity.Collections; -namespace Obi { public class BurstSolverImpl : ISolverImpl { public ObiSolver abstraction { get; } public int particleCount { get { return abstraction.positions.count; } } public int activeParticleCount { get { return abstraction.activeParticles.count; } } public BurstInertialFrame inertialFrame { get { return m_InertialFrame; } } public BurstAffineTransform solverToWorld { get { return m_InertialFrame.frame; } } public BurstAffineTransform worldToSolver { get { return m_InertialFrame.frame.Inverse(); } } public uint activeFoamParticleCount { private set; get; } private const int maxBatches = 17; private ConstraintBatcher collisionConstraintBatcher; private ConstraintBatcher fluidConstraintBatcher; // Per-type constraints array: private IBurstConstraintsImpl[] constraints; // Per-type iteration padding array: private int[] padding = new int[Oni.ConstraintTypeCount]; // job handle: private BurstJobHandle jobHandle; // particle contact generation: public ParticleGrid particleGrid; public NativeArray particleBatchData; // fluid interaction generation: public NativeArray fluidInteractions; public NativeArray fluidBatchData; // collider contact generation: private BurstColliderWorld colliderGrid; // deformable triangles: private NativeArray deformableTriangles; private NativeArray deformableUVs; // deformable edges: private NativeArray deformableEdges; +namespace Obi +{ + public class BurstSolverImpl : ISolverImpl + { + ObiSolver m_Solver; - // simplices: - public NativeArray simplices; public SimplexCounts simplexCounts; private BurstInertialFrame m_InertialFrame; // local to world inertial frame. private int scheduledJobCounter = 0; - - // cached particle data arrays (just wrappers over raw unmanaged data held by the abstract solver) - public NativeArray activeParticles; public NativeArray deadParticles; public NativeArray positions; public NativeArray restPositions; public NativeArray prevPositions; public NativeArray renderablePositions; public NativeArray orientations; public NativeArray restOrientations; public NativeArray prevOrientations; public NativeArray renderableOrientations; public NativeArray velocities; public NativeArray angularVelocities; public NativeArray invMasses; public NativeArray invRotationalMasses; public NativeArray externalForces; public NativeArray externalTorques; public NativeArray wind; public NativeArray positionDeltas; public NativeArray orientationDeltas; public NativeArray positionConstraintCounts; public NativeArray orientationConstraintCounts; public NativeArray colors; public NativeArray collisionMaterials; public NativeArray phases; public NativeArray filters; public NativeArray renderableRadii; public NativeArray principalRadii; public NativeArray normals; private NativeArray tangents; public NativeArray life; public NativeArray fluidData; public NativeArray userData; public NativeArray fluidInterface; public NativeArray fluidMaterials; - public NativeArray fluidMaterials2; - public NativeArray anisotropies; - - // aux foam data: - public NativeArray auxPositions; - public NativeArray auxVelocities; - public NativeArray auxColors; - public NativeArray auxAttributes; - public NativeArray cellCoords; public NativeArray simplexBounds; - public NativeArray reducedBounds; public BurstAabb solverBounds; private ConstraintSorter contactSorter; public BurstSolverImpl(ObiSolver solver) { this.abstraction = solver; jobHandle = new BurstJobHandle(); contactSorter = new ConstraintSorter(); // Initialize collision world: GetOrCreateColliderWorld(); colliderGrid.IncreaseReferenceCount(); - - // Initialize contact generation acceleration structure: - particleGrid = new ParticleGrid(); // Initialize constraint batcher: collisionConstraintBatcher = new ConstraintBatcher(maxBatches); fluidConstraintBatcher = new ConstraintBatcher(maxBatches); // Initialize constraint arrays: constraints = new IBurstConstraintsImpl[Oni.ConstraintTypeCount]; constraints[(int)Oni.ConstraintType.Tether] = new BurstTetherConstraints(this); constraints[(int)Oni.ConstraintType.Volume] = new BurstVolumeConstraints(this); constraints[(int)Oni.ConstraintType.Chain] = new BurstChainConstraints(this); constraints[(int)Oni.ConstraintType.Bending] = new BurstBendConstraints(this); constraints[(int)Oni.ConstraintType.Distance] = new BurstDistanceConstraints(this); constraints[(int)Oni.ConstraintType.ShapeMatching] = new BurstShapeMatchingConstraints(this); constraints[(int)Oni.ConstraintType.BendTwist] = new BurstBendTwistConstraints(this); constraints[(int)Oni.ConstraintType.StretchShear] = new BurstStretchShearConstraints(this); constraints[(int)Oni.ConstraintType.Pin] = new BurstPinConstraints(this); constraints[(int)Oni.ConstraintType.ParticleCollision] = new BurstParticleCollisionConstraints(this); constraints[(int)Oni.ConstraintType.Density] = new BurstDensityConstraints(this); constraints[(int)Oni.ConstraintType.Collision] = new BurstColliderCollisionConstraints(this); constraints[(int)Oni.ConstraintType.Skin] = new BurstSkinConstraints(this); constraints[(int)Oni.ConstraintType.Aerodynamics] = new BurstAerodynamicConstraints(this); constraints[(int)Oni.ConstraintType.Stitch] = new BurstStitchConstraints(this); constraints[(int)Oni.ConstraintType.ParticleFriction] = new BurstParticleFrictionConstraints(this); constraints[(int)Oni.ConstraintType.Friction] = new BurstColliderFrictionConstraints(this); constraints[(int)Oni.ConstraintType.Pinhole] = new BurstPinholeConstraints(this); var c = constraints[(int)Oni.ConstraintType.Collision] as BurstColliderCollisionConstraints; c.CreateConstraintsBatch(); var f = constraints[(int)Oni.ConstraintType.Friction] as BurstColliderFrictionConstraints; f.CreateConstraintsBatch(); } public void Destroy() { for (int i = 0; i < constraints.Length; ++i) if (constraints[i] != null) constraints[i].Dispose(); // Get rid of particle and collider grids: particleGrid.Dispose(); if (colliderGrid != null) colliderGrid.DecreaseReferenceCount(); collisionConstraintBatcher.Dispose(); fluidConstraintBatcher.Dispose(); if (simplexBounds.IsCreated) simplexBounds.Dispose(); if (reducedBounds.IsCreated) reducedBounds.Dispose(); if (tangents.IsCreated) tangents.Dispose(); if (particleBatchData.IsCreated) particleBatchData.Dispose(); if (fluidInteractions.IsCreated) fluidInteractions.Dispose(); if (fluidBatchData.IsCreated) fluidBatchData.Dispose(); if (auxPositions.IsCreated) auxPositions.Dispose(); if (auxVelocities.IsCreated) auxVelocities.Dispose(); if (auxColors.IsCreated) auxColors.Dispose(); if (auxAttributes.IsCreated) auxAttributes.Dispose(); } // Utility function to count scheduled jobs. Call it once per job. // Will JobHandle.ScheduleBatchedJobs once there's a good bunch of scheduled jobs. public void ScheduleBatchedJobsIfNeeded() { if (scheduledJobCounter++ > 16) { scheduledJobCounter = 0; JobHandle.ScheduleBatchedJobs(); } } private void GetOrCreateColliderWorld() { colliderGrid = GameObject.FindObjectOfType(); if (colliderGrid == null) { var world = new GameObject("BurstCollisionWorld", typeof(BurstColliderWorld)); colliderGrid = world.GetComponent(); } } public void InitializeFrame(Vector4 translation, Vector4 scale, Quaternion rotation) { m_InertialFrame = new BurstInertialFrame(translation, scale, rotation); } public void UpdateFrame(Vector4 translation, Vector4 scale, Quaternion rotation, float deltaTime) { m_InertialFrame.Update(translation, scale, rotation, deltaTime); } public IObiJobHandle ApplyFrame(float worldLinearInertiaScale, float worldAngularInertiaScale, float deltaTime) { // inverse linear part: float4x4 linear = float4x4.TRS(float3.zero, inertialFrame.frame.rotation, math.rcp(inertialFrame.frame.scale.xyz)); float4x4 linearInv = math.transpose(linear); // non-inertial frame accelerations: float4 angularVel = math.mul(linearInv, math.mul(float4x4.Scale(inertialFrame.angularVelocity.xyz), linear)).diagonal(); float4 eulerAccel = math.mul(linearInv, math.mul(float4x4.Scale(inertialFrame.angularAcceleration.xyz), linear)).diagonal(); float4 inertialAccel = math.mul(linearInv, inertialFrame.acceleration); var applyInertialForces = new ApplyInertialForcesJob { activeParticles = activeParticles, positions = positions, velocities = velocities, invMasses = invMasses, angularVel = angularVel, inertialAccel = inertialAccel, eulerAccel = eulerAccel, worldLinearInertiaScale = worldLinearInertiaScale, worldAngularInertiaScale = worldAngularInertiaScale, wind = wind, ambientWind = new float4(abstraction.parameters.ambientWind, 0), inertialFrame = inertialFrame, deltaTime = deltaTime, inertialWind = abstraction.windSpace == Space.World }; jobHandle.jobHandle = applyInertialForces.Schedule(activeParticleCount, 64); return jobHandle; } public void SetDeformableTriangles(ObiNativeIntList indices, ObiNativeVector2List uvs) { deformableTriangles = indices.AsNativeArray(); deformableUVs = uvs.AsNativeArray(); } public void SetDeformableEdges(ObiNativeIntList indices) { deformableEdges = indices.AsNativeArray(); } public void SetSimplices(ObiNativeIntList simplices, SimplexCounts counts) { this.simplices = simplices.AsNativeArray(); this.simplexCounts = counts; - - cellCoords = abstraction.cellCoords.AsNativeArray(); if (simplexBounds.IsCreated) simplexBounds.Dispose(); simplexBounds = new NativeArray(counts.simplexCount, Allocator.Persistent); - - if (reducedBounds.IsCreated) reducedBounds.Dispose(); - - reducedBounds = new NativeArray(counts.simplexCount, Allocator.Persistent); } public void SetActiveParticles(ObiNativeIntList activeIndices) { activeParticles = activeIndices.AsNativeArray(); } public IObiJobHandle UpdateBounds(IObiJobHandle inputDeps, float stepTime) { - BurstJobHandle burstHandle = inputDeps as BurstJobHandle; if (burstHandle == null) return inputDeps; - - // calculate bounding boxes for all simplices: - var boundsJob = new CalculateSimplexBoundsJob() - { - radii = principalRadii, - fluidMaterials = fluidMaterials, - positions = positions, - velocities = velocities, - simplices = simplices, - simplexCounts = simplexCounts, - particleMaterialIndices = collisionMaterials, - collisionMaterials = ObiColliderWorld.GetInstance().collisionMaterials.AsNativeArray(), - parameters = abstraction.parameters, - simplexBounds = simplexBounds, - reducedBounds = reducedBounds, - dt = stepTime - }; - - burstHandle.jobHandle = boundsJob.Schedule(simplexCounts.simplexCount, 64, burstHandle.jobHandle); - - // parallel reduction: - int chunkSize = 4; int chunks = simplexCounts.simplexCount; int stride = 1; while (chunks > 1) { var reductionJob = new BoundsReductionJob() { bounds = reducedBounds, stride = stride, size = chunkSize, }; burstHandle.jobHandle = reductionJob.Schedule(chunks, 1, burstHandle.jobHandle); chunks = (int)math.ceil(chunks / (float)chunkSize); stride *= chunkSize; } - - var countRef = abstraction.deadParticles.GetCountReference(Allocator.TempJob); - var lifetimeJob = new UpdateParticleLifetimesJob - { - activeParticles = activeParticles, - life = life, - deadParticles = deadParticles, - deadParticleCount = countRef, - dt = stepTime, - }; - - burstHandle.jobHandle = lifetimeJob.Schedule(activeParticleCount, 64, burstHandle.jobHandle); - burstHandle.jobHandle.Complete(); - - abstraction.deadParticles.count = countRef.Value; - countRef.Dispose(); return burstHandle; } public void GetBounds(ref Vector3 min, ref Vector3 max) - { - // update solver bounds struct: - if (reducedBounds.IsCreated && reducedBounds.Length > 0) - { - solverBounds.min = reducedBounds[0].min; - solverBounds.max = reducedBounds[0].max; - } - - min = solverBounds.min.xyz; - max = solverBounds.max.xyz; - } public int GetConstraintCount(Oni.ConstraintType type) { if ((int)type > 0 && (int)type < constraints.Length) return constraints[(int)type].GetConstraintCount(); return 0; } public void SetParameters(Oni.SolverParameters parameters) { - } public void SetConstraintGroupParameters(Oni.ConstraintType type, ref Oni.ConstraintParameters parameters) { // No need to implement. This backend grabs parameters from the abstraction when it needs them. } public void ParticleCountChanged(ObiSolver solver) { deadParticles = abstraction.deadParticles.AsNativeArray(abstraction.deadParticles.capacity); positions = abstraction.positions.AsNativeArray(); restPositions = abstraction.restPositions.AsNativeArray(); prevPositions = abstraction.prevPositions.AsNativeArray(); renderablePositions = abstraction.renderablePositions.AsNativeArray(); orientations = abstraction.orientations.AsNativeArray(); restOrientations = abstraction.restOrientations.AsNativeArray(); prevOrientations = abstraction.prevOrientations.AsNativeArray(); renderableOrientations = abstraction.renderableOrientations.AsNativeArray(); colors = abstraction.colors.AsNativeArray(); velocities = abstraction.velocities.AsNativeArray(); angularVelocities = abstraction.angularVelocities.AsNativeArray(); invMasses = abstraction.invMasses.AsNativeArray(); invRotationalMasses = abstraction.invRotationalMasses.AsNativeArray(); externalForces = abstraction.externalForces.AsNativeArray(); externalTorques = abstraction.externalTorques.AsNativeArray(); wind = abstraction.wind.AsNativeArray(); positionDeltas = abstraction.positionDeltas.AsNativeArray(); orientationDeltas = abstraction.orientationDeltas.AsNativeArray(); positionConstraintCounts = abstraction.positionConstraintCounts.AsNativeArray(); orientationConstraintCounts = abstraction.orientationConstraintCounts.AsNativeArray(); collisionMaterials = abstraction.collisionMaterials.AsNativeArray(); phases = abstraction.phases.AsNativeArray(); filters = abstraction.filters.AsNativeArray(); renderableRadii = abstraction.renderableRadii.AsNativeArray(); principalRadii = abstraction.principalRadii.AsNativeArray(); normals = abstraction.normals.AsNativeArray(); life = abstraction.life.AsNativeArray(); fluidData = abstraction.fluidData.AsNativeArray(); userData = abstraction.userData.AsNativeArray(); fluidInterface = abstraction.fluidInterface.AsNativeArray(); fluidMaterials = abstraction.fluidMaterials.AsNativeArray(); - fluidMaterials2 = abstraction.fluidMaterials2.AsNativeArray(); anisotropies = abstraction.anisotropies.AsNativeArray(); cellCoords = abstraction.cellCoords.AsNativeArray(); if (tangents.IsCreated) tangents.Dispose(); tangents = new NativeArray(normals.Length, Allocator.Persistent, NativeArrayOptions.UninitializedMemory); } public void MaxFoamParticleCountChanged(ObiSolver solver) - { - if (auxPositions.IsCreated) - auxPositions.Dispose(); - if (auxVelocities.IsCreated) - auxVelocities.Dispose(); - if (auxColors.IsCreated) - auxColors.Dispose(); - if (auxAttributes.IsCreated) - auxAttributes.Dispose(); - - auxPositions = new NativeArray((int)abstraction.maxFoamParticles, Allocator.Persistent); - auxVelocities = new NativeArray((int)abstraction.maxFoamParticles, Allocator.Persistent); - auxColors = new NativeArray((int)abstraction.maxFoamParticles, Allocator.Persistent); - auxAttributes = new NativeArray((int)abstraction.maxFoamParticles, Allocator.Persistent); - } public void SetRigidbodyArrays(ObiSolver solver) { // No need to implement. This backend grabs arrays from the abstraction when it needs them. } public IConstraintsBatchImpl CreateConstraintsBatch(Oni.ConstraintType type) { return constraints[(int)type].CreateConstraintsBatch(); } public void DestroyConstraintsBatch(IConstraintsBatchImpl batch) { if (batch != null) constraints[(int)batch.constraintType].RemoveBatch(batch); } public void FinishSimulation() { - // Wipe all forces to zero. However we can't wipe wind here, since we - // need wind values during interpolation to calculate rope normals. - abstraction.externalForces.WipeToZero(); - abstraction.externalTorques.WipeToZero(); - - // store current end positions as the start positions for the next step. - abstraction.startPositions.CopyFrom(abstraction.endPositions); - abstraction.startOrientations.CopyFrom(abstraction.endOrientations); - abstraction.endPositions.CopyFrom(abstraction.positions); abstraction.endOrientations.CopyFrom(abstraction.orientations); } - - public void PushData() + public ObiSolver abstraction { + get { return m_Solver; } } - public void RequestReadback() + public int particleCount { - } public IObiJobHandle CollisionDetection(IObiJobHandle inputDeps, float stepTime) { BurstJobHandle burstHandle = inputDeps as BurstJobHandle; if (burstHandle == null) return inputDeps; + get { return m_Solver.positions.count; } + } - burstHandle.jobHandle = FindFluidParticles(burstHandle.jobHandle); burstHandle.jobHandle = GenerateContacts(burstHandle.jobHandle, stepTime); return burstHandle; } protected JobHandle FindFluidParticles(JobHandle inputDeps) { var d = constraints[(int)Oni.ConstraintType.Density] as BurstDensityConstraints; // Update positions: var findFluidJob = new FindFluidParticlesJob() { activeParticles = activeParticles, phases = phases, fluidParticles = d.fluidParticles, }; return findFluidJob.Schedule(inputDeps); } protected JobHandle GenerateContacts(JobHandle inputDeps, float deltaTime) { // Dispose of previous fluid interactions. // We need fluid data during interpolation, for anisotropic fluid particles. For this reason, // we can't dispose of these arrays in ResetForces() at the end of each full step. They must use persistent allocation. if (fluidInteractions.IsCreated) fluidInteractions.Dispose(); if (fluidBatchData.IsCreated) fluidBatchData.Dispose(); - if (particleBatchData.IsCreated) particleBatchData.Dispose(); - - // get constraint parameters for constraint types that depend on broadphases: - var collisionParameters = abstraction.GetConstraintParameters(Oni.ConstraintType.Collision); var particleCollisionParameters = abstraction.GetConstraintParameters(Oni.ConstraintType.ParticleCollision); var densityParameters = abstraction.GetConstraintParameters(Oni.ConstraintType.Density); // if no enabled constraints that require broadphase info, skip it entirely. if (collisionParameters.enabled || particleCollisionParameters.enabled || densityParameters.enabled) { - // generate particle-particle and particle-collider interactions in parallel: - JobHandle generateParticleInteractionsHandle = inputDeps, generateContactsHandle = inputDeps; // particle-particle interactions (contacts, fluids) if (particleCollisionParameters.enabled || densityParameters.enabled) { particleGrid.Update(this, inputDeps); generateParticleInteractionsHandle = particleGrid.GenerateContacts(this, deltaTime); } // particle-collider interactions (contacts) if (collisionParameters.enabled) { generateContactsHandle = colliderGrid.GenerateContacts(this, deltaTime, inputDeps); } JobHandle.CombineDependencies(generateParticleInteractionsHandle, generateContactsHandle).Complete(); - - // allocate arrays for interactions and batch data: particleBatchData = new NativeArray(maxBatches, Allocator.Persistent, NativeArrayOptions.UninitializedMemory); fluidInteractions = new NativeArray(particleGrid.fluidInteractionQueue.Count, Allocator.Persistent, NativeArrayOptions.UninitializedMemory); fluidBatchData = new NativeArray(maxBatches, Allocator.Persistent, NativeArrayOptions.UninitializedMemory); - - // allocate effective mass arrays: - abstraction.contactEffectiveMasses.ResizeUninitialized(colliderGrid.colliderContactQueue.Count); - abstraction.particleContactEffectiveMasses.ResizeUninitialized(particleGrid.particleContactQueue.Count); - - // dequeue contacts/interactions into temporary arrays: - var rawParticleContacts = new NativeArray(particleGrid.particleContactQueue.Count, Allocator.TempJob, NativeArrayOptions.UninitializedMemory); var sortedParticleContacts = new NativeArray(particleGrid.particleContactQueue.Count, Allocator.TempJob, NativeArrayOptions.UninitializedMemory); var rawFluidInteractions = new NativeArray(particleGrid.fluidInteractionQueue.Count, Allocator.TempJob, NativeArrayOptions.UninitializedMemory); - - abstraction.particleContacts.ResizeUninitialized(particleGrid.particleContactQueue.Count); DequeueIntoArrayJob dequeueParticleContacts = new DequeueIntoArrayJob { InputQueue = particleGrid.particleContactQueue, OutputArray = rawParticleContacts }; - - abstraction.colliderContacts.ResizeUninitialized(colliderGrid.colliderContactQueue.Count); DequeueIntoArrayJob dequeueColliderContacts = new DequeueIntoArrayJob { InputQueue = colliderGrid.colliderContactQueue, OutputArray = abstraction.colliderContacts.AsNativeArray() }; DequeueIntoArrayJob dequeueFluidInteractions = new DequeueIntoArrayJob { InputQueue = particleGrid.fluidInteractionQueue, OutputArray = rawFluidInteractions }; var dequeueHandle = JobHandle.CombineDependencies(dequeueParticleContacts.Schedule(), dequeueFluidInteractions.Schedule(), dequeueColliderContacts.Schedule()); // Sort contacts for jitter-free gauss-seidel (sequential) solving: dequeueHandle = contactSorter.SortConstraints(simplexCounts.simplexCount, rawParticleContacts, ref sortedParticleContacts, dequeueHandle); ContactProvider contactProvider = new ContactProvider() { contacts = sortedParticleContacts, sortedContacts = abstraction.particleContacts.AsNativeArray(), simplices = simplices, simplexCounts = simplexCounts }; FluidInteractionProvider fluidProvider = new FluidInteractionProvider() { interactions = rawFluidInteractions, sortedInteractions = fluidInteractions, }; // batch particle contacts: var activeParticleBatchCount = new NativeArray(1, Allocator.TempJob); var particleBatchHandle = collisionConstraintBatcher.BatchConstraints(ref contactProvider, particleCount, ref particleBatchData, ref activeParticleBatchCount, dequeueHandle); // batch fluid interactions: var activeFluidBatchCount = new NativeArray(1, Allocator.TempJob); var fluidBatchHandle = fluidConstraintBatcher.BatchConstraints(ref fluidProvider, particleCount, ref fluidBatchData, ref activeFluidBatchCount, dequeueHandle); JobHandle.CombineDependencies(particleBatchHandle, fluidBatchHandle).Complete(); // Generate particle contact/friction batches: var pc = constraints[(int)Oni.ConstraintType.ParticleCollision] as BurstParticleCollisionConstraints; var pf = constraints[(int)Oni.ConstraintType.ParticleFriction] as BurstParticleFrictionConstraints; for (int i = 0; i < pc.batches.Count; ++i) pc.batches[i].enabled = false; for (int i = 0; i < pf.batches.Count; ++i) pf.batches[i].enabled = false; for (int i = 0; i < activeParticleBatchCount[0]; ++i) { // create extra batches if not enough: if (i == pc.batches.Count) { pc.CreateConstraintsBatch(); pf.CreateConstraintsBatch(); } pc.batches[i].enabled = true; pf.batches[i].enabled = true; (pc.batches[i] as BurstParticleCollisionConstraintsBatch).batchData = particleBatchData[i]; (pf.batches[i] as BurstParticleFrictionConstraintsBatch ).batchData = particleBatchData[i]; } // Generate fluid interaction batches: var dc = constraints[(int)Oni.ConstraintType.Density] as BurstDensityConstraints; for (int i = 0; i < dc.batches.Count; ++i) dc.batches[i].enabled = false; for (int i = 0; i < activeFluidBatchCount[0]; ++i) { // create extra batches if not enough: if (i == dc.batches.Count) dc.CreateConstraintsBatch(); dc.batches[i].enabled = true; (dc.batches[i] as BurstDensityConstraintsBatch).batchData = fluidBatchData[i]; } // dispose of temporary buffers: rawParticleContacts.Dispose(); rawFluidInteractions.Dispose(); sortedParticleContacts.Dispose(); activeParticleBatchCount.Dispose(); activeFluidBatchCount.Dispose(); inputDeps = colliderGrid.ApplyForceZones(this, deltaTime, inputDeps); } return inputDeps; } public IObiJobHandle Substep(IObiJobHandle handle, float stepTime, float substepTime, int steps, float timeLeft) { BurstJobHandle burstHandle = handle as BurstJobHandle; if (burstHandle == null) return handle; - - // Apply aerodynamics - burstHandle.jobHandle = constraints[(int)Oni.ConstraintType.Aerodynamics].Project(burstHandle.jobHandle, stepTime, substepTime, steps, timeLeft); - - // Predict positions: - var predictPositions = new PredictPositionsJob() { activeParticles = activeParticles, phases = phases, buoyancies = fluidInterface, externalForces = externalForces, inverseMasses = invMasses, positions = positions, previousPositions = prevPositions, velocities = velocities, externalTorques = externalTorques, inverseRotationalMasses = invRotationalMasses, orientations = orientations, previousOrientations = prevOrientations, angularVelocities = angularVelocities, gravity = new float4(abstraction.parameters.gravity, 0), deltaTime = substepTime, is2D = abstraction.parameters.mode == Oni.SolverParameters.Mode.Mode2D }; burstHandle.jobHandle = predictPositions.Schedule(activeParticles.Length, 128, burstHandle.jobHandle); - - // Project position constraints: - burstHandle.jobHandle = ApplyConstraints(burstHandle.jobHandle, stepTime, substepTime, steps, timeLeft); - - // Enforce solver boundary limits: - burstHandle.jobHandle = EnforceLimits(burstHandle.jobHandle); // Update velocities: var updateVelocitiesJob = new UpdateVelocitiesJob { activeParticles = activeParticles, inverseMasses = invMasses, previousPositions = prevPositions, positions = positions, velocities = velocities, inverseRotationalMasses = invRotationalMasses, previousOrientations = prevOrientations, orientations = orientations, angularVelocities = angularVelocities, deltaTime = substepTime, is2D = abstraction.parameters.mode == Oni.SolverParameters.Mode.Mode2D }; burstHandle.jobHandle = updateVelocitiesJob.Schedule(activeParticles.Length, 128, burstHandle.jobHandle); - - // calculate particle velocity correction: - burstHandle.jobHandle = CalculateVelocityCorrections(burstHandle.jobHandle, substepTime); - - // Update diffuse particles: - int substepsLeft = (int)math.round(timeLeft / substepTime); - int foamPadding = (int)math.ceil(abstraction.substeps / (float)abstraction.foamSubsteps); - - if (substepsLeft % foamPadding == 0) - burstHandle.jobHandle = UpdateDiffuseParticles(burstHandle.jobHandle, substepTime * foamPadding); - - // correct particle velocities: - burstHandle.jobHandle = ApplyVelocityCorrections(burstHandle.jobHandle, substepTime); // update particle positions: var updatePositionsJob = new UpdatePositionsJob { activeParticles = activeParticles, positions = positions, previousPositions = prevPositions, velocities = velocities, orientations = orientations, previousOrientations = prevOrientations, angularVelocities = angularVelocities, velocityScale = math.pow(1 - math.saturate(abstraction.parameters.damping), substepTime), sleepThreshold = abstraction.parameters.sleepThreshold, maxVelocity = abstraction.parameters.maxVelocity, maxAngularVelocity = abstraction.parameters.maxAngularVelocity }; burstHandle.jobHandle = updatePositionsJob.Schedule(activeParticles.Length, 128, burstHandle.jobHandle); return burstHandle; } private JobHandle CalculateVelocityCorrections(JobHandle inputDeps, float deltaTime) { var densityParameters = abstraction.GetConstraintParameters(Oni.ConstraintType.Density); if (densityParameters.enabled) { var d = constraints[(int)Oni.ConstraintType.Density] as BurstDensityConstraints; if (d != null) { return d.CalculateVelocityCorrections(inputDeps, deltaTime); } } return inputDeps; } private JobHandle ApplyVelocityCorrections(JobHandle inputDeps, float deltaTime) { var densityParameters = abstraction.GetConstraintParameters(Oni.ConstraintType.Density); if (densityParameters.enabled) { var d = constraints[(int)Oni.ConstraintType.Density] as BurstDensityConstraints; if (d != null) { return d.ApplyVelocityCorrections(inputDeps, deltaTime); } } return inputDeps; } private JobHandle ApplyConstraints(JobHandle inputDeps, float stepTime, float substepTime, int steps, float timeLeft) { // calculate max amount of iterations required, and initialize constraints.. int maxIterations = 0; for (int i = 0; i < Oni.ConstraintTypeCount; ++i) { var parameters = abstraction.GetConstraintParameters((Oni.ConstraintType)i); if (parameters.enabled) { maxIterations = math.max(maxIterations, parameters.iterations); inputDeps = constraints[i].Initialize(inputDeps, stepTime, substepTime, steps, timeLeft); } } // calculate iteration paddings: for (int i = 0; i < Oni.ConstraintTypeCount; ++i) { var parameters = abstraction.GetConstraintParameters((Oni.ConstraintType)i); if (parameters.enabled && parameters.iterations > 0) padding[i] = (int)math.ceil(maxIterations / (float)parameters.iterations); else padding[i] = maxIterations; } // perform projection iterations: for (int i = 1; i < maxIterations; ++i) { for (int j = 0; j < Oni.ConstraintTypeCount; ++j) { if (j != (int)Oni.ConstraintType.Aerodynamics) { var parameters = abstraction.GetConstraintParameters((Oni.ConstraintType)j); if (parameters.enabled && i % padding[j] == 0) inputDeps = constraints[j].Project(inputDeps, stepTime, substepTime, steps, timeLeft); } } } // final iteration, all groups together: for (int i = 0; i < Oni.ConstraintTypeCount; ++i) { if (i != (int)Oni.ConstraintType.Aerodynamics) { var parameters = abstraction.GetConstraintParameters((Oni.ConstraintType)i); if (parameters.enabled && parameters.iterations > 0) inputDeps = constraints[i].Project(inputDeps, stepTime, substepTime, steps, timeLeft); } } // Despite friction constraints being applied after collision (since coulomb friction depends on normal impulse) // we perform a collision iteration right at the end to ensure the final state meets the Signorini-Fichera conditions. var param = abstraction.GetConstraintParameters(Oni.ConstraintType.ParticleCollision); if (param.enabled && param.iterations > 0) inputDeps = constraints[(int)Oni.ConstraintType.ParticleCollision].Project(inputDeps, stepTime, substepTime, steps, timeLeft); param = abstraction.GetConstraintParameters(Oni.ConstraintType.Collision); if (param.enabled && param.iterations > 0) inputDeps = constraints[(int)Oni.ConstraintType.Collision].Project(inputDeps, stepTime, substepTime, steps, timeLeft); return inputDeps; } private JobHandle EnforceLimits(JobHandle inputDeps) + public int activeParticleCount { - if (!abstraction.useLimits) return inputDeps; + get { return abstraction.activeParticles.count; } + } - var boundaryLimits = new EnforceLimitsJob { activeParticles = activeParticles, positions = positions, prevPositions = prevPositions, life = life, phases = phases, boundaryLimits = new BurstAabb(new float4(abstraction.boundaryLimits.min, 0), new float4(abstraction.boundaryLimits.max, 0)), killOffLimits = abstraction.killOffLimitsParticles }; return boundaryLimits.Schedule(activeParticleCount, 64, inputDeps); - } public IObiJobHandle ApplyInterpolation(IObiJobHandle inputDeps, ObiNativeVector4List startPositions, ObiNativeQuaternionList startOrientations, float stepTime, float unsimulatedTime) { if (inputDeps == null) inputDeps = new BurstJobHandle(); BurstJobHandle burstHandle = inputDeps as BurstJobHandle; if (burstHandle == null) return inputDeps; // Interpolate particle positions and orientations. var interpolate = new InterpolationJob { positions = positions, endPositions = abstraction.endPositions.AsNativeArray(), startPositions = startPositions.AsNativeArray(), renderablePositions = renderablePositions, orientations = orientations, endOrientations = abstraction.endOrientations.AsNativeArray(), startOrientations = startOrientations.AsNativeArray(), renderableOrientations = renderableOrientations, principalRadii = principalRadii, renderableRadii = renderableRadii, - - blendFactor = stepTime > 0 ? unsimulatedTime / stepTime : 0, interpolationMode = abstraction.parameters.interpolation }; burstHandle.jobHandle = interpolate.Schedule(abstraction.positions.count, 128, burstHandle.jobHandle); // Update deformable triangle normals var resetNormals = new ResetNormals() { phases = phases, normals = normals, tangents = tangents }; burstHandle.jobHandle = resetNormals.Schedule(normals.Length, 128, burstHandle.jobHandle); // Update deformable triangle normals var updateTriNormals = new UpdateTriangleNormalsJob() { renderPositions = renderablePositions, deformableTriangles = deformableTriangles, deformableTriangleUVs = deformableUVs, normals = normals, tangents = tangents }; burstHandle.jobHandle = updateTriNormals.Schedule(deformableTriangles.Length / 3, 1, burstHandle.jobHandle); - - // Update deformable edge normals - var updateEdgeNormals = new UpdateEdgeNormalsJob() { renderPositions = renderablePositions, velocities = velocities, deformableEdges = deformableEdges, wind = wind, normals = normals, }; burstHandle.jobHandle = updateEdgeNormals.Schedule(deformableEdges.Length / 2, 1, burstHandle.jobHandle); - - // Update deformable triangle orientations - var updateOrientations = new RenderableOrientationFromNormals() { phases = phases, normals = normals, tangents = tangents, renderableOrientations = renderableOrientations }; burstHandle.jobHandle = updateOrientations.Schedule(normals.Length, 128, burstHandle.jobHandle); - - // project renderable position/orientation of pinned particles: - var pinparam = abstraction.GetConstraintParameters(Oni.ConstraintType.Pin); if (pinparam.enabled && pinparam.iterations > 0) - { - var d = constraints[(int)Oni.ConstraintType.Pin] as BurstPinConstraints; - if (Application.isPlaying && d != null) - burstHandle.jobHandle = d.ProjectRenderablePositions(burstHandle.jobHandle); } - - //make sure density constraints are enabled, otherwise particles have no neighbors and neighbor lists will be uninitialized. - var param = abstraction.GetConstraintParameters(Oni.ConstraintType.Density); if (param.enabled && param.iterations > 0) - { - // Fluid laplacian/anisotropy (only if we're in play mode, in-editor we have no particlegrid/sorted data). - var d = constraints[(int)Oni.ConstraintType.Density] as BurstDensityConstraints; - if (Application.isPlaying && d != null) - burstHandle.jobHandle = d.CalculateAnisotropyLaplacianSmoothing(burstHandle.jobHandle); } return burstHandle; } private unsafe JobHandle UpdateDiffuseParticles(JobHandle inputDeps, float deltaTime) + public BurstInertialFrame inertialFrame { - var system = abstraction.GetRenderSystem() as BurstFoamRenderSystem; - if (system != null) + get { return m_InertialFrame; } + } + + public BurstAffineTransform solverToWorld + { + get { return m_InertialFrame.frame; } + } + + public BurstAffineTransform worldToSolver + { + get { return m_InertialFrame.frame.Inverse(); } + } + + private const int maxBatches = 17; + + private ConstraintBatcher collisionConstraintBatcher; + private ConstraintBatcher fluidConstraintBatcher; + + // Per-type constraints array: + private IBurstConstraintsImpl[] constraints; + + // Per-type iteration padding array: + private int[] padding = new int[Oni.ConstraintTypeCount]; + + // Pool job handles to avoid runtime alloc: + private JobHandlePool jobHandlePool; + + // particle contact generation: + public ParticleGrid particleGrid; + public NativeArray particleContacts; + public NativeArray particleBatchData; + + // fluid interaction generation: + public NativeArray fluidInteractions; + public NativeArray fluidBatchData; + + // collider contact generation: + private BurstColliderWorld colliderGrid; + public NativeArray colliderContacts; + + // misc data: + public NativeArray activeParticles; + private NativeList deformableTriangles; + + public NativeArray simplices; + public SimplexCounts simplexCounts; + + private BurstInertialFrame m_InertialFrame; // local to world inertial frame. + private int scheduledJobCounter = 0; + + // cached particle data arrays (just wrappers over raw unmanaged data held by the abstract solver) + public NativeArray positions; + public NativeArray restPositions; + public NativeArray prevPositions; + public NativeArray renderablePositions; + + public NativeArray orientations; + public NativeArray restOrientations; + public NativeArray prevOrientations; + public NativeArray renderableOrientations; + + public NativeArray velocities; + public NativeArray angularVelocities; + + public NativeArray invMasses; + public NativeArray invRotationalMasses; + public NativeArray invInertiaTensors; + + public NativeArray externalForces; + public NativeArray externalTorques; + public NativeArray wind; + + public NativeArray positionDeltas; + public NativeArray orientationDeltas; + public NativeArray positionConstraintCounts; + public NativeArray orientationConstraintCounts; + + public NativeArray collisionMaterials; + public NativeArray phases; + public NativeArray filters; + public NativeArray anisotropies; + public NativeArray principalRadii; + public NativeArray normals; + + public NativeArray vorticities; + public NativeArray fluidData; + public NativeArray userData; + public NativeArray smoothingRadii; + public NativeArray buoyancies; + public NativeArray restDensities; + public NativeArray viscosities; + public NativeArray surfaceTension; + public NativeArray vortConfinement; + public NativeArray athmosphericDrag; + public NativeArray athmosphericPressure; + public NativeArray diffusion; + + public NativeArray cellCoords; + public NativeArray simplexBounds; + + private ConstraintSorter contactSorter; + + public BurstSolverImpl(ObiSolver solver) + { + this.m_Solver = solver; + + jobHandlePool = new JobHandlePool(4); + contactSorter = new ConstraintSorter(); + + // Initialize collision world: + GetOrCreateColliderWorld(); + colliderGrid.IncreaseReferenceCount(); + + deformableTriangles = new NativeList(64, Allocator.Persistent); + + // Initialize contact generation acceleration structure: + particleGrid = new ParticleGrid(); + + // Initialize constraint batcher: + collisionConstraintBatcher = new ConstraintBatcher(maxBatches); + fluidConstraintBatcher = new ConstraintBatcher(maxBatches); + + // Initialize constraint arrays: + constraints = new IBurstConstraintsImpl[Oni.ConstraintTypeCount]; + constraints[(int)Oni.ConstraintType.Tether] = new BurstTetherConstraints(this); + constraints[(int)Oni.ConstraintType.Volume] = new BurstVolumeConstraints(this); + constraints[(int)Oni.ConstraintType.Chain] = new BurstChainConstraints(this); + constraints[(int)Oni.ConstraintType.Bending] = new BurstBendConstraints(this); + constraints[(int)Oni.ConstraintType.Distance] = new BurstDistanceConstraints(this); + constraints[(int)Oni.ConstraintType.ShapeMatching] = new BurstShapeMatchingConstraints(this); + constraints[(int)Oni.ConstraintType.BendTwist] = new BurstBendTwistConstraints(this); + constraints[(int)Oni.ConstraintType.StretchShear] = new BurstStretchShearConstraints(this); + constraints[(int)Oni.ConstraintType.Pin] = new BurstPinConstraints(this); + constraints[(int)Oni.ConstraintType.ParticleCollision] = new BurstParticleCollisionConstraints(this); + constraints[(int)Oni.ConstraintType.Density] = new BurstDensityConstraints(this); + constraints[(int)Oni.ConstraintType.Collision] = new BurstColliderCollisionConstraints(this); + constraints[(int)Oni.ConstraintType.Skin] = new BurstSkinConstraints(this); + constraints[(int)Oni.ConstraintType.Aerodynamics] = new BurstAerodynamicConstraints(this); + constraints[(int)Oni.ConstraintType.Stitch] = new BurstStitchConstraints(this); + constraints[(int)Oni.ConstraintType.ParticleFriction] = new BurstParticleFrictionConstraints(this); + constraints[(int)Oni.ConstraintType.Friction] = new BurstColliderFrictionConstraints(this); + + var c = constraints[(int)Oni.ConstraintType.Collision] as BurstColliderCollisionConstraints; + c.CreateConstraintsBatch(); + + var f = constraints[(int)Oni.ConstraintType.Friction] as BurstColliderFrictionConstraints; + f.CreateConstraintsBatch(); + } + + public void Destroy() + { + for (int i = 0; i < constraints.Length; ++i) + if (constraints[i] != null) + constraints[i].Dispose(); + + // Get rid of particle and collider grids: + particleGrid.Dispose(); + + if (colliderGrid != null) + colliderGrid.DecreaseReferenceCount(); + + collisionConstraintBatcher.Dispose(); + fluidConstraintBatcher.Dispose(); + + if (deformableTriangles.IsCreated) + deformableTriangles.Dispose(); + if (simplexBounds.IsCreated) + simplexBounds.Dispose(); + + if (particleContacts.IsCreated) + particleContacts.Dispose(); + if (particleBatchData.IsCreated) + particleBatchData.Dispose(); + if (fluidInteractions.IsCreated) + fluidInteractions.Dispose(); + if (fluidBatchData.IsCreated) + fluidBatchData.Dispose(); + if (colliderContacts.IsCreated) + colliderContacts.Dispose(); + + } + + public void ReleaseJobHandles() + { + jobHandlePool.ReleaseAll(); + } + + // Utility function to count scheduled jobs. Call it once per job. + // Will JobHandle.ScheduleBatchedJobs once there's a good bunch of scheduled jobs. + public void ScheduleBatchedJobsIfNeeded() + { + if (scheduledJobCounter++ > 16) { - int* dispatchPtr = (int*)abstraction.foamCount.AddressOfElement(0); + scheduledJobCounter = 0; + JobHandle.ScheduleBatchedJobs(); + } + } + + private void GetOrCreateColliderWorld() + { + colliderGrid = GameObject.FindObjectOfType(); + if (colliderGrid == null) + { + var world = new GameObject("BurstCollisionWorld", typeof(BurstColliderWorld)); + colliderGrid = world.GetComponent(); + } + } - for (int i = 0; i < system.renderers.Count; ++i) + public void InitializeFrame(Vector4 translation, Vector4 scale, Quaternion rotation) + { + m_InertialFrame = new BurstInertialFrame(translation, scale, rotation); + } + + public void UpdateFrame(Vector4 translation, Vector4 scale, Quaternion rotation, float deltaTime) + { + m_InertialFrame.Update(translation, scale, rotation, deltaTime); + } + + public void ApplyFrame(float worldLinearInertiaScale, float worldAngularInertiaScale, float deltaTime) + { + // inverse linear part: + float4x4 linear = float4x4.TRS(float3.zero, inertialFrame.frame.rotation, math.rcp(inertialFrame.frame.scale.xyz)); + float4x4 linearInv = math.transpose(linear); + + // non-inertial frame accelerations: + float4 angularVel = math.mul(linearInv, math.mul(float4x4.Scale(inertialFrame.angularVelocity.xyz), linear)).diagonal(); + float4 eulerAccel = math.mul(linearInv, math.mul(float4x4.Scale(inertialFrame.angularAcceleration.xyz), linear)).diagonal(); + float4 inertialAccel = math.mul(linearInv, inertialFrame.acceleration); + + var applyInertialForces = new ApplyInertialForcesJob() + { + activeParticles = activeParticles, + positions = positions, + velocities = velocities, + invMasses = invMasses, + angularVel = angularVel, + inertialAccel = inertialAccel, + eulerAccel = eulerAccel, + worldLinearInertiaScale = worldLinearInertiaScale, + worldAngularInertiaScale = worldAngularInertiaScale, + deltaTime = deltaTime, + }; + + applyInertialForces.Schedule(activeParticleCount, 64).Complete(); + } + + public int GetDeformableTriangleCount() + { + return deformableTriangles.Length / 3; + } + + public void SetDeformableTriangles(int[] indices, int num, int destOffset) + { + if (destOffset + num >= deformableTriangles.Length / 3) + deformableTriangles.ResizeUninitialized((destOffset + num) * 3); + for (int i = 0; i < num * 3; ++i) + deformableTriangles[i + destOffset * 3] = indices[i]; + } + + public int RemoveDeformableTriangles(int num, int sourceOffset) + { + if (deformableTriangles.IsCreated) + { + int amount = deformableTriangles.Length / 3; + + if (num < 0) { - float seed = Time.frameCount % 16535 + UnityEngine.Random.value; - - if (system.renderers[i] is ObiFoamEmitter) - { - var emitter = system.renderers[i] as ObiFoamEmitter; - int particlesToEmit = emitter.GetParticleNumberToEmit(deltaTime); - - var emitJob = new EmitParticlesJob - { - outputPositions = abstraction.foamPositions.AsNativeArray(), - outputVelocities = abstraction.foamVelocities.AsNativeArray(), - outputColors = abstraction.foamColors.AsNativeArray(), - outputAttributes = abstraction.foamAttributes.AsNativeArray(), - - dispatchBuffer = abstraction.foamCount.AsNativeArray(), - - emitterShape = (uint)emitter.shape, - emitterPosition = new float4(emitter.shapeTransform != null ? abstraction.transform.InverseTransformPoint(emitter.shapeTransform.position) : Vector3.zero,0), - emitterRotation = emitter.shapeTransform != null ? emitter.shapeTransform.rotation * Quaternion.Inverse(abstraction.transform.rotation) : Quaternion.identity, - emitterSize = new float4(emitter.shapeSize,0), - - randomSeed = seed, - buoyancy = system.renderers[i].buoyancy, - drag = system.renderers[i].drag, - airdrag = math.pow(1 - math.saturate(system.renderers[i].atmosphericDrag), deltaTime), - airAging = system.renderers[i].airAging, - particleSize = system.renderers[i].size, - sizeRandom = system.renderers[i].sizeRandom, - lifetime = system.renderers[i].lifetime, - lifetimeRandom = system.renderers[i].lifetimeRandom, - foamColor = (Vector4)system.renderers[i].color, - - deltaTime = deltaTime - }; - - inputDeps = emitJob.Schedule(particlesToEmit, 128, inputDeps); - } - else - { - var emitJob = new GenerateParticlesJob - { - // when the actor gets removed from solver, solverIndices is destroyed and - // this job may still be running. As a solution, create a temporary copy of the array. - activeParticles = new NativeArray(system.renderers[i].actor.solverIndices.AsNativeArray(), Allocator.TempJob), - positions = positions, - velocities = velocities, - angularVelocities = angularVelocities, - principalRadii = principalRadii, - fluidData = fluidData, - - outputPositions = abstraction.foamPositions.AsNativeArray(), - outputVelocities = abstraction.foamVelocities.AsNativeArray(), - outputColors = abstraction.foamColors.AsNativeArray(), - outputAttributes = abstraction.foamAttributes.AsNativeArray(), - - dispatchBuffer = abstraction.foamCount.AsNativeArray(), - - randomSeed = seed, - vorticityRange = system.renderers[i].vorticityRange, - velocityRange = system.renderers[i].velocityRange, - foamGenerationRate = system.renderers[i].foamGenerationRate, - potentialIncrease = system.renderers[i].foamPotential, - potentialDiffusion = math.pow(1 - math.saturate(system.renderers[i].foamPotentialDiffusion), deltaTime), - buoyancy = system.renderers[i].buoyancy, - drag = system.renderers[i].drag, - airdrag = math.pow(1 - math.saturate(system.renderers[i].atmosphericDrag), deltaTime), - isosurface = system.renderers[i].isosurface, - airAging = system.renderers[i].airAging, - particleSize = system.renderers[i].size, - sizeRandom = system.renderers[i].sizeRandom, - lifetime = system.renderers[i].lifetime, - lifetimeRandom = system.renderers[i].lifetimeRandom, - foamColor = (Vector4)system.renderers[i].color, - - deltaTime = deltaTime - }; - - inputDeps = emitJob.Schedule(system.renderers[i].actor.activeParticleCount, 128, inputDeps); - } + deformableTriangles.Clear(); + return amount; } - var updateJob = new UpdateParticlesJob - { - positions = positions, - orientations = renderableOrientations, - principalRadii = renderableRadii, - velocities = velocities, - angularVelocities = angularVelocities, - fluidData = fluidData, - fluidMaterial = fluidMaterials, + int set = ClampArrayAccess(amount, num, sourceOffset); + int end = sourceOffset + set; + // TODO: replace by built in method in 0.9.0 + deformableTriangles.RemoveRangeBurst(sourceOffset * 3, (end - sourceOffset) * 3 ); + + return set; + } + return 0; + } + + public void SetSimplices(ObiNativeIntList simplices, SimplexCounts counts) + { + this.simplices = simplices.AsNativeArray(); + this.simplexCounts = counts; + + if (simplexBounds.IsCreated) + simplexBounds.Dispose(); + + simplexBounds = new NativeArray(counts.simplexCount, Allocator.Persistent); + cellCoords = abstraction.cellCoords.AsNativeArray(); + } + + public void SetActiveParticles(ObiNativeIntList indices) + { + activeParticles = indices.AsNativeArray(); + } + + int ClampArrayAccess(int size, int num, int offset) + { + return math.min(num, math.max(0, size - offset)); + } + + public JobHandle RecalculateInertiaTensors(JobHandle inputDeps) + { + var updateInertiaTensors = new UpdateInertiaTensorsJob() + { + activeParticles = activeParticles, + inverseMasses = abstraction.invMasses.AsNativeArray(), + inverseRotationalMasses = abstraction.invRotationalMasses.AsNativeArray(), + principalRadii = abstraction.principalRadii.AsNativeArray(), + inverseInertiaTensors = abstraction.invInertiaTensors.AsNativeArray(), + }; + + return updateInertiaTensors.Schedule(activeParticleCount, 128, inputDeps); + } + + public void GetBounds(ref Vector3 min, ref Vector3 max) + { + int chunkSize = 4; + NativeArray bounds = new NativeArray(activeParticleCount, Allocator.Persistent, NativeArrayOptions.UninitializedMemory); + + var particleBoundsJob = new ParticleToBoundsJob() + { + activeParticles = activeParticles, + positions = positions, + radii = principalRadii, + bounds = bounds + }; + + JobHandle reduction = particleBoundsJob.Schedule(activeParticles.Length, 64); + + // parallel reduction: + int chunks = bounds.Length; + int stride = 1; + + while (chunks > 1) + { + var reductionJob = new BoundsReductionJob() + { + bounds = bounds, + stride = stride, + size = chunkSize, + }; + reduction = reductionJob.Schedule(chunks, 1, reduction); + + chunks = (int)math.ceil(chunks / (float)chunkSize); + stride *= chunkSize; + } + + reduction.Complete(); + + // the parallel reduction leaves the final bounds in the first entry: + if (bounds.Length > 0) + { + min = bounds[0].min.xyz; + max = bounds[0].max.xyz; + } + + bounds.Dispose(); + } + + public void ResetForces() + { + abstraction.externalForces.WipeToZero(); + abstraction.externalTorques.WipeToZero(); + abstraction.wind.WipeToZero(); + + // We're at the end of a whole step (not a substep), so dispose of contact buffers: + if (particleContacts.IsCreated) + particleContacts.Dispose(); + if (particleBatchData.IsCreated) + particleBatchData.Dispose(); + if (colliderContacts.IsCreated) + colliderContacts.Dispose(); + } + + public int GetConstraintCount(Oni.ConstraintType type) + { + if ((int)type > 0 && (int)type < constraints.Length) + return constraints[(int)type].GetConstraintCount(); + return 0; + } + + public void GetCollisionContacts(Oni.Contact[] contacts, int count) + { + NativeArray.Copy(colliderContacts.Reinterpret(),0, contacts,0,count); + } + + public void GetParticleCollisionContacts(Oni.Contact[] contacts, int count) + { + NativeArray.Copy(particleContacts.Reinterpret(),0, contacts,0,count); + } + + public void SetParameters(Oni.SolverParameters parameters) + { + // No need to implement. This backend grabs parameters from the abstraction when it needs them. + } + + public void SetConstraintGroupParameters(Oni.ConstraintType type, ref Oni.ConstraintParameters parameters) + { + // No need to implement. This backend grabs parameters from the abstraction when it needs them. + } + + public void ParticleCountChanged(ObiSolver solver) + { + positions = abstraction.positions.AsNativeArray(); + restPositions = abstraction.restPositions.AsNativeArray(); + prevPositions = abstraction.prevPositions.AsNativeArray(); + renderablePositions = abstraction.renderablePositions.AsNativeArray(); + + orientations = abstraction.orientations.AsNativeArray(); + restOrientations = abstraction.restOrientations.AsNativeArray(); + prevOrientations = abstraction.prevOrientations.AsNativeArray(); + renderableOrientations = abstraction.renderableOrientations.AsNativeArray(); + + velocities = abstraction.velocities.AsNativeArray(); + angularVelocities = abstraction.angularVelocities.AsNativeArray(); + + invMasses = abstraction.invMasses.AsNativeArray(); + invRotationalMasses = abstraction.invRotationalMasses.AsNativeArray(); + invInertiaTensors = abstraction.invInertiaTensors.AsNativeArray(); + + externalForces = abstraction.externalForces.AsNativeArray(); + externalTorques = abstraction.externalTorques.AsNativeArray(); + wind = abstraction.wind.AsNativeArray(); + + positionDeltas = abstraction.positionDeltas.AsNativeArray(); + orientationDeltas = abstraction.orientationDeltas.AsNativeArray(); + positionConstraintCounts = abstraction.positionConstraintCounts.AsNativeArray(); + orientationConstraintCounts = abstraction.orientationConstraintCounts.AsNativeArray(); + + collisionMaterials = abstraction.collisionMaterials.AsNativeArray(); + phases = abstraction.phases.AsNativeArray(); + filters = abstraction.filters.AsNativeArray(); + anisotropies = abstraction.anisotropies.AsNativeArray(); + principalRadii = abstraction.principalRadii.AsNativeArray(); + normals = abstraction.normals.AsNativeArray(); + + vorticities = abstraction.vorticities.AsNativeArray(); + fluidData = abstraction.fluidData.AsNativeArray(); + userData = abstraction.userData.AsNativeArray(); + smoothingRadii = abstraction.smoothingRadii.AsNativeArray(); + buoyancies = abstraction.buoyancies.AsNativeArray(); + restDensities = abstraction.restDensities.AsNativeArray(); + viscosities = abstraction.viscosities.AsNativeArray(); + surfaceTension = abstraction.surfaceTension.AsNativeArray(); + vortConfinement = abstraction.vortConfinement.AsNativeArray(); + athmosphericDrag = abstraction.atmosphericDrag.AsNativeArray(); + athmosphericPressure = abstraction.atmosphericPressure.AsNativeArray(); + diffusion = abstraction.diffusion.AsNativeArray(); + } + + public void SetRigidbodyArrays(ObiSolver solver) + { + // No need to implement. This backend grabs arrays from the abstraction when it needs them. + } + + public IConstraintsBatchImpl CreateConstraintsBatch(Oni.ConstraintType type) + { + return constraints[(int)type].CreateConstraintsBatch(); + } + + public void DestroyConstraintsBatch(IConstraintsBatchImpl batch) + { + if (batch != null) + constraints[(int)batch.constraintType].RemoveBatch(batch); + } + + public IObiJobHandle CollisionDetection(float stepTime) + { + var fluidHandle = FindFluidParticles(); + + var inertiaUpdate = RecalculateInertiaTensors(fluidHandle); + + return jobHandlePool.Borrow().SetHandle(GenerateContacts(inertiaUpdate, stepTime)); + } + + protected JobHandle FindFluidParticles() + { + var d = constraints[(int)Oni.ConstraintType.Density] as BurstDensityConstraints; + + // Update positions: + var findFluidJob = new FindFluidParticlesJob() + { + activeParticles = activeParticles, + phases = m_Solver.phases.AsNativeArray(), + fluidParticles = d.fluidParticles, + }; + + return findFluidJob.Schedule(); + } + + protected JobHandle UpdateSimplexBounds(JobHandle inputDeps, float deltaTime) + { + var buildAabbs = new BuildSimplexAabbs + { + radii = principalRadii, + fluidRadii = smoothingRadii, + positions = positions, + velocities = velocities, + + simplices = simplices, + simplexCounts = simplexCounts, + simplexBounds = simplexBounds, + + particleMaterialIndices = abstraction.collisionMaterials.AsNativeArray(), + collisionMaterials = ObiColliderWorld.GetInstance().collisionMaterials.AsNativeArray(), + collisionMargin = abstraction.parameters.collisionMargin, + continuousCollisionDetection = abstraction.parameters.continuousCollisionDetection, + dt = deltaTime, + }; + return buildAabbs.Schedule(simplexCounts.simplexCount, 32, inputDeps); + } + + protected JobHandle GenerateContacts(JobHandle inputDeps, float deltaTime) + { + // Dispose of previous fluid interactions. + // We need fluid data during interpolation, for anisotropic fluid particles. For this reason, + // we can't dispose of these arrays in ResetForces() at the end of each full step. They must use persistent allocation. + + if (fluidInteractions.IsCreated) + fluidInteractions.Dispose(); + if (fluidBatchData.IsCreated) + fluidBatchData.Dispose(); + + // get constraint parameters for constraint types that depend on broadphases: + var collisionParameters = m_Solver.GetConstraintParameters(Oni.ConstraintType.Collision); + var particleCollisionParameters = m_Solver.GetConstraintParameters(Oni.ConstraintType.ParticleCollision); + var densityParameters = m_Solver.GetConstraintParameters(Oni.ConstraintType.Density); + + // if no enabled constraints that require broadphase info, skip it entirely. + if (collisionParameters.enabled || + particleCollisionParameters.enabled || + densityParameters.enabled) + { + // update the bounding box of each simplex: + inputDeps = UpdateSimplexBounds(inputDeps, deltaTime); + + + // generate particle-particle and particle-collider interactions in parallel: + JobHandle generateParticleInteractionsHandle = inputDeps, generateContactsHandle = inputDeps; + + // particle-particle interactions (contacts, fluids) + if (particleCollisionParameters.enabled || densityParameters.enabled) + { + particleGrid.Update(this, deltaTime, inputDeps); + generateParticleInteractionsHandle = particleGrid.GenerateContacts(this, deltaTime); + } + + // particle-collider interactions (contacts) + if (collisionParameters.enabled) + { + generateContactsHandle = colliderGrid.GenerateContacts(this, deltaTime, inputDeps); + } + + JobHandle.CombineDependencies(generateParticleInteractionsHandle, generateContactsHandle).Complete(); + + // allocate arrays for interactions and batch data: + particleContacts = new NativeArray(particleGrid.particleContactQueue.Count, Allocator.TempJob, NativeArrayOptions.UninitializedMemory); + particleBatchData = new NativeArray(maxBatches, Allocator.TempJob, NativeArrayOptions.UninitializedMemory); + + fluidInteractions = new NativeArray(particleGrid.fluidInteractionQueue.Count, Allocator.Persistent, NativeArrayOptions.UninitializedMemory); + fluidBatchData = new NativeArray(maxBatches, Allocator.Persistent, NativeArrayOptions.UninitializedMemory); + + colliderContacts = new NativeArray(colliderGrid.colliderContactQueue.Count, Allocator.TempJob, NativeArrayOptions.UninitializedMemory); + + // dequeue contacts/interactions into temporary arrays: + var rawParticleContacts = new NativeArray(particleGrid.particleContactQueue.Count, Allocator.TempJob, NativeArrayOptions.UninitializedMemory); + var sortedParticleContacts = new NativeArray(particleGrid.particleContactQueue.Count, Allocator.TempJob, NativeArrayOptions.UninitializedMemory); + var rawFluidInteractions = new NativeArray(particleGrid.fluidInteractionQueue.Count, Allocator.TempJob, NativeArrayOptions.UninitializedMemory); + + DequeueIntoArrayJob dequeueParticleContacts = new DequeueIntoArrayJob() + { + InputQueue = particleGrid.particleContactQueue, + OutputArray = rawParticleContacts + }; + + DequeueIntoArrayJob dequeueFluidInteractions = new DequeueIntoArrayJob() + { + InputQueue = particleGrid.fluidInteractionQueue, + OutputArray = rawFluidInteractions + }; + + DequeueIntoArrayJob dequeueColliderContacts = new DequeueIntoArrayJob() + { + InputQueue = colliderGrid.colliderContactQueue, + OutputArray = colliderContacts + }; + + var dequeueHandle = JobHandle.CombineDependencies(dequeueParticleContacts.Schedule(), dequeueFluidInteractions.Schedule(), dequeueColliderContacts.Schedule()); + + // Sort contacts for jitter-free gauss-seidel (sequential) solving: + dequeueHandle = contactSorter.SortConstraints(simplexCounts.simplexCount, rawParticleContacts, ref sortedParticleContacts, dequeueHandle); + + ContactProvider contactProvider = new ContactProvider() + { + contacts = sortedParticleContacts, + sortedContacts = particleContacts, simplices = simplices, - simplexCounts = simplexCounts, - - grid = particleGrid.grid, - gridLevels = particleGrid.grid.populatedLevels.GetKeyArray(Allocator.TempJob), - - densityKernel = new Poly6Kernel(abstraction.parameters.mode == Oni.SolverParameters.Mode.Mode2D), - - inputPositions = abstraction.foamPositions.AsNativeArray(), - inputVelocities = abstraction.foamVelocities.AsNativeArray(), - inputColors = abstraction.foamColors.AsNativeArray(), - inputAttributes = abstraction.foamAttributes.AsNativeArray(), - - outputPositions = auxPositions, - outputVelocities = auxVelocities, - outputColors = auxColors, - outputAttributes = auxAttributes, - - dispatchBuffer = abstraction.foamCount.AsNativeArray(), - - parameters = abstraction.parameters, - - agingOverPopulation = new Vector3(abstraction.foamAccelAgingRange.x, abstraction.foamAccelAgingRange.y, abstraction.foamAccelAging), - minFluidNeighbors = abstraction.foamMinNeighbors, - currentAliveParticles = dispatchPtr[3], - deltaTime = deltaTime + simplexCounts = simplexCounts }; - inputDeps = IJobParallelForDeferExtensions.Schedule(updateJob, &dispatchPtr[3], 64, inputDeps); - - var copyJob = new CopyJob + FluidInteractionProvider fluidProvider = new FluidInteractionProvider() { - inputPositions = auxPositions, - inputVelocities = auxVelocities, - inputColors = auxColors, - inputAttributes = auxAttributes, - - outputPositions = abstraction.foamPositions.AsNativeArray(), - outputVelocities = abstraction.foamVelocities.AsNativeArray(), - outputColors = abstraction.foamColors.AsNativeArray(), - outputAttributes = abstraction.foamAttributes.AsNativeArray(), - - dispatchBuffer = abstraction.foamCount.AsNativeArray() + interactions = rawFluidInteractions, + sortedInteractions = fluidInteractions, }; - inputDeps = IJobParallelForDeferExtensions.Schedule(copyJob, &dispatchPtr[7], 256, inputDeps); + // batch particle contacts: + var activeParticleBatchCount = new NativeArray(1, Allocator.TempJob); + var particleBatchHandle = collisionConstraintBatcher.BatchConstraints(ref contactProvider, particleCount, ref particleBatchData, ref activeParticleBatchCount, dequeueHandle); - activeFoamParticleCount = (uint)dispatchPtr[3]; + // batch fluid interactions: + var activeFluidBatchCount = new NativeArray(1, Allocator.TempJob); + var fluidBatchHandle = fluidConstraintBatcher.BatchConstraints(ref fluidProvider, particleCount, ref fluidBatchData, ref activeFluidBatchCount, dequeueHandle); + + JobHandle.CombineDependencies(particleBatchHandle, fluidBatchHandle).Complete(); + + // Generate particle contact/friction batches: + var pc = constraints[(int)Oni.ConstraintType.ParticleCollision] as BurstParticleCollisionConstraints; + var pf = constraints[(int)Oni.ConstraintType.ParticleFriction] as BurstParticleFrictionConstraints; + + for (int i = 0; i < pc.batches.Count; ++i) + pc.batches[i].enabled = false; + + for (int i = 0; i < pf.batches.Count; ++i) + pf.batches[i].enabled = false; + + for (int i = 0; i < activeParticleBatchCount[0]; ++i) + { + // create extra batches if not enough: + if (i == pc.batches.Count) + { + pc.CreateConstraintsBatch(); + pf.CreateConstraintsBatch(); + } + + pc.batches[i].enabled = true; + pf.batches[i].enabled = true; + + (pc.batches[i] as BurstParticleCollisionConstraintsBatch).batchData = particleBatchData[i]; + (pf.batches[i] as BurstParticleFrictionConstraintsBatch ).batchData = particleBatchData[i]; + } + + // Generate fluid interaction batches: + var dc = constraints[(int)Oni.ConstraintType.Density] as BurstDensityConstraints; + + for (int i = 0; i < dc.batches.Count; ++i) + dc.batches[i].enabled = false; + + for (int i = 0; i < activeFluidBatchCount[0]; ++i) + { + // create extra batches if not enough: + if (i == dc.batches.Count) + dc.CreateConstraintsBatch(); + + dc.batches[i].enabled = true; + + (dc.batches[i] as BurstDensityConstraintsBatch).batchData = fluidBatchData[i]; + } + + // dispose of temporary buffers: + rawParticleContacts.Dispose(); + rawFluidInteractions.Dispose(); + sortedParticleContacts.Dispose(); + activeParticleBatchCount.Dispose(); + activeFluidBatchCount.Dispose(); + + } + + return inputDeps; + } + + public IObiJobHandle Substep(float stepTime, float substepTime, int substeps) + { + // Apply aerodynamics + JobHandle aerodynamicsHandle = constraints[(int)Oni.ConstraintType.Aerodynamics].Project(new JobHandle(), stepTime, substepTime, substeps); + + // Predict positions: + var predictPositions = new PredictPositionsJob() + { + activeParticles = activeParticles, + phases = phases, + buoyancies = buoyancies, + + externalForces = externalForces, + inverseMasses = invMasses, + positions = positions, + previousPositions = prevPositions, + velocities = velocities, + + externalTorques = externalTorques, + inverseRotationalMasses = invRotationalMasses, + orientations = orientations, + previousOrientations = prevOrientations, + angularVelocities = angularVelocities, + + gravity = new float4(m_Solver.parameters.gravity, 0), + deltaTime = substepTime, + is2D = abstraction.parameters.mode == Oni.SolverParameters.Mode.Mode2D + }; + + JobHandle predictPositionsHandle = predictPositions.Schedule(activeParticles.Length, 128, aerodynamicsHandle); + + // Project position constraints: + JobHandle projectionHandle = ApplyConstraints(predictPositionsHandle, stepTime, substepTime, substeps); + + // Update velocities: + var updateVelocitiesJob = new UpdateVelocitiesJob() + { + activeParticles = activeParticles, + + inverseMasses = invMasses, + previousPositions = prevPositions, + positions = positions, + velocities = velocities, + + inverseRotationalMasses = invRotationalMasses, + previousOrientations = prevOrientations, + orientations = orientations, + angularVelocities = angularVelocities, + + deltaTime = substepTime, + is2D = abstraction.parameters.mode == Oni.SolverParameters.Mode.Mode2D + }; + + JobHandle updateVelocitiesHandle = updateVelocitiesJob.Schedule(activeParticles.Length, 128, projectionHandle); + + // velocity constraints: + JobHandle velocityCorrectionsHandle = ApplyVelocityCorrections(updateVelocitiesHandle, substepTime); + + // Update positions: + var updatePositionsJob = new UpdatePositionsJob() + { + activeParticles = activeParticles, + positions = positions, + previousPositions = prevPositions, + velocities = velocities, + orientations = orientations, + previousOrientations = prevOrientations, + angularVelocities = angularVelocities, + velocityScale = math.pow(1 - math.clamp(m_Solver.parameters.damping, 0, 1), substepTime), + sleepThreshold = m_Solver.parameters.sleepThreshold + }; + + JobHandle updatePositionsHandle = updatePositionsJob.Schedule(activeParticles.Length, 128, velocityCorrectionsHandle); + + return jobHandlePool.Borrow().SetHandle(updatePositionsHandle); + } + + private JobHandle ApplyVelocityCorrections(JobHandle inputDeps, float deltaTime) + { + var densityParameters = m_Solver.GetConstraintParameters(Oni.ConstraintType.Density); + + if (densityParameters.enabled) + { + var d = constraints[(int)Oni.ConstraintType.Density] as BurstDensityConstraints; + if (d != null) + { + return d.ApplyVelocityCorrections(inputDeps, deltaTime); + } } return inputDeps; - } public void SpatialQuery(ObiNativeQueryShapeList shapes, ObiNativeAffineTransformList transforms, ObiNativeQueryResultList results) { var resultsQueue = new NativeQueue(Allocator.Persistent); particleGrid.SpatialQuery(this, shapes.AsNativeArray(), transforms.AsNativeArray(), resultsQueue).Complete(); int count = resultsQueue.Count; results.ResizeUninitialized(count); var dequeueQueryResults = new DequeueIntoArrayJob() { InputQueue = resultsQueue, OutputArray = results.AsNativeArray() }; dequeueQueryResults.Schedule().Complete(); resultsQueue.Dispose(); } public int GetParticleGridSize() { return particleGrid.grid.usedCells.Length; } public void GetParticleGrid(ObiNativeAabbList cells) { particleGrid.GetCells(cells); } } } -#endif + } + private JobHandle ApplyConstraints(JobHandle inputDeps, float stepTime, float substepTime, int substeps) + { + // calculate max amount of iterations required, and initialize constraints.. + int maxIterations = 0; + for (int i = 0; i < Oni.ConstraintTypeCount; ++i) + { + var parameters = m_Solver.GetConstraintParameters((Oni.ConstraintType)i); + if (parameters.enabled) + { + maxIterations = math.max(maxIterations, parameters.iterations); + inputDeps = constraints[i].Initialize(inputDeps, substepTime); + } + } + + // calculate iteration paddings: + for (int i = 0; i < Oni.ConstraintTypeCount; ++i) + { + var parameters = m_Solver.GetConstraintParameters((Oni.ConstraintType)i); + if (parameters.enabled && parameters.iterations > 0) + padding[i] = (int)math.ceil(maxIterations / (float)parameters.iterations); + else + padding[i] = maxIterations; + } + + // perform projection iterations: + for (int i = 1; i < maxIterations; ++i) + { + for (int j = 0; j < Oni.ConstraintTypeCount; ++j) + { + if (j != (int)Oni.ConstraintType.Aerodynamics) + { + var parameters = m_Solver.GetConstraintParameters((Oni.ConstraintType)j); + if (parameters.enabled && i % padding[j] == 0) + inputDeps = constraints[j].Project(inputDeps, stepTime, substepTime, substeps); + } + } + } + + // final iteration, all groups together: + for (int i = 0; i < Oni.ConstraintTypeCount; ++i) + { + if (i != (int)Oni.ConstraintType.Aerodynamics) + { + var parameters = m_Solver.GetConstraintParameters((Oni.ConstraintType)i); + if (parameters.enabled && parameters.iterations > 0) + inputDeps = constraints[i].Project(inputDeps, stepTime, substepTime, substeps); + } + } + + // Despite friction constraints being applied after collision (since coulomb friction depends on normal impulse) + // we perform a collision iteration right at the end to ensure the final state meets the Signorini-Fichera conditions. + var param = m_Solver.GetConstraintParameters(Oni.ConstraintType.ParticleCollision); + if (param.enabled && param.iterations > 0) + inputDeps = constraints[(int)Oni.ConstraintType.ParticleCollision].Project(inputDeps, stepTime, substepTime, substeps); + param = m_Solver.GetConstraintParameters(Oni.ConstraintType.Collision); + if (param.enabled && param.iterations > 0) + inputDeps = constraints[(int)Oni.ConstraintType.Collision].Project(inputDeps, stepTime, substepTime, substeps); + + return inputDeps; + } + + public void ApplyInterpolation(ObiNativeVector4List startPositions, ObiNativeQuaternionList startOrientations, float stepTime, float unsimulatedTime) + { + + // Interpolate particle positions and orientations. + var interpolate = new InterpolationJob() + { + positions = positions, + startPositions = startPositions.AsNativeArray(), + renderablePositions = renderablePositions, + + orientations = orientations, + startOrientations = startOrientations.AsNativeArray(), + renderableOrientations = renderableOrientations, + + deltaTime = stepTime, + unsimulatedTime = unsimulatedTime, + interpolationMode = m_Solver.parameters.interpolation + }; + + JobHandle jobHandle = interpolate.Schedule(m_Solver.positions.count, 128); + + // Update deformable triangle normals + var updateNormals = new UpdateNormalsJob() + { + renderPositions = renderablePositions, + deformableTriangles = deformableTriangles, + normals = normals + }; + + jobHandle = updateNormals.Schedule(jobHandle); + + // fluid laplacian/anisotropy: + var d = constraints[(int)Oni.ConstraintType.Density] as BurstDensityConstraints; + if (d != null) + jobHandle = d.CalculateAnisotropyLaplacianSmoothing(jobHandle); + + // update axis: + var updatePrincipalAxis = new UpdatePrincipalAxisJob() + { + activeParticles = activeParticles, + renderableOrientations = renderableOrientations, + phases = phases, + principalRadii = principalRadii, + principalAxis = anisotropies, + }; + + jobHandle = updatePrincipalAxis.Schedule(activeParticles.Length, 128, jobHandle); + + jobHandle.Complete(); + + } + + public void InterpolateDiffuseProperties(ObiNativeVector4List properties, + ObiNativeVector4List diffusePositions, + ObiNativeVector4List diffuseProperties, + ObiNativeIntList neighbourCount, + int diffuseCount) + { + particleGrid.InterpolateDiffuseProperties(this, + properties.AsNativeArray(), + diffusePositions.AsNativeArray(), + diffuseProperties.AsNativeArray(), + neighbourCount.AsNativeArray(), + diffuseCount).Complete(); + } + + public void SpatialQuery(ObiNativeQueryShapeList shapes, ObiNativeAffineTransformList transforms, ObiNativeQueryResultList results) + { + var resultsQueue = new NativeQueue(Allocator.Persistent); + + particleGrid.SpatialQuery(this, + shapes.AsNativeArray(), + transforms.AsNativeArray(), + resultsQueue).Complete(); + + int count = resultsQueue.Count; + results.ResizeUninitialized(count); + + var dequeueQueryResults = new DequeueIntoArrayJob() + { + InputQueue = resultsQueue, + OutputArray = results.AsNativeArray() + }; + + var dequeueHandle = dequeueQueryResults.Schedule(); + + var distanceJob = new CalculateQueryDistances() + { + prevPositions = prevPositions, + prevOrientations = prevOrientations, + radii = principalRadii, + simplices = simplices, + simplexCounts = simplexCounts, + queryResults = results.AsNativeArray() + }; + + distanceJob.Schedule(count, 16, dequeueHandle).Complete(); + + resultsQueue.Dispose(); + } + + public int GetParticleGridSize() + { + return particleGrid.grid.usedCells.Length; + } + public void GetParticleGrid(ObiNativeAabbList cells) + { + particleGrid.GetCells(cells); + } + } +} +#endif diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Solver/EnforceLimitsJob.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Solver/EnforceLimitsJob.cs deleted file mode 100644 index b1b57c39a..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Solver/EnforceLimitsJob.cs +++ /dev/null @@ -1,42 +0,0 @@ -#if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) -using Unity.Jobs; -using Unity.Collections; -using Unity.Mathematics; -using Unity.Burst; - -namespace Obi -{ - [BurstCompile] - struct EnforceLimitsJob : IJobParallelFor - { - [NativeDisableParallelForRestriction] public NativeArray positions; - [NativeDisableParallelForRestriction] public NativeArray prevPositions; - [NativeDisableParallelForRestriction] public NativeArray life; - [ReadOnly] public NativeArray phases; - - [ReadOnly] public NativeArray activeParticles; - [ReadOnly] public bool killOffLimits; - - [ReadOnly] public BurstAabb boundaryLimits; - - public void Execute(int index) - { - int i = activeParticles[index]; - - float4 pos = positions[i]; - float4 prevPos = prevPositions[i]; - - bool outside = math.any(math.step(pos, boundaryLimits.min).xyz + math.step(boundaryLimits.max, pos).xyz); - - if ((phases[i] & (int)ObiUtils.ParticleFlags.Isolated) != 0) - life[i] = outside && killOffLimits ? 0 : life[i]; - - pos.xyz = math.clamp(pos, boundaryLimits.min, boundaryLimits.max).xyz; - prevPos.xyz = math.clamp(prevPos, boundaryLimits.min, boundaryLimits.max).xyz; - - positions[i] = pos; - prevPositions[i] = prevPos; - } - } -} -#endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Solver/EnforceLimitsJob.cs.meta b/Assets/Obi/Scripts/Common/Backends/Burst/Solver/EnforceLimitsJob.cs.meta deleted file mode 100644 index 5e27e1ea8..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Solver/EnforceLimitsJob.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 354e2117ba6e94ad8afbfe95160a553b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Solver/FoamParticlesJob.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Solver/FoamParticlesJob.cs deleted file mode 100644 index aeb42e47d..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Solver/FoamParticlesJob.cs +++ /dev/null @@ -1,361 +0,0 @@ -#if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) -using Unity.Jobs; -using Unity.Collections; -using Unity.Mathematics; -using Unity.Burst; -using Unity.Collections.LowLevel.Unsafe; -using System.Threading; - -namespace Obi -{ - [BurstCompile] - unsafe struct EmitParticlesJob : IJobParallelFor - { - [NativeDisableParallelForRestriction] public NativeArray outputPositions; - [NativeDisableParallelForRestriction] public NativeArray outputVelocities; - [NativeDisableParallelForRestriction] public NativeArray outputColors; - [NativeDisableParallelForRestriction] public NativeArray outputAttributes; - - [NativeDisableParallelForRestriction] public NativeArray dispatchBuffer; - - public uint emitterShape; - public float4 emitterPosition; - public quaternion emitterRotation; - public float4 emitterSize; - - public float lifetime; - public float lifetimeRandom; - public float particleSize; - public float sizeRandom; - public float buoyancy; - public float drag; - public float airdrag; - public float airAging; - public float isosurface; - public float4 foamColor; - - public float randomSeed; - public float deltaTime; - - public void Execute(int i) - { - int* dispatch = (int*)dispatchBuffer.GetUnsafePtr(); - - // atomically increment alive particle counter: - int count = Interlocked.Add(ref dispatch[3], 1) - 1; - - if (count < outputPositions.Length) - { - // initialize foam particle in a random position inside the cylinder spawned by fluid particle: - float3 radialVelocity; - float4 pos; - - if (emitterShape == 0) - BurstMath.RandomInCylinder(randomSeed + i, -new float4(0, 1, 0, 0) * emitterSize.y * 0.5f, new float4(0, 1, 0, 0), emitterSize.y, math.max(emitterSize.x, emitterSize.z) * 0.5f, out pos, out radialVelocity); - else - BurstMath.RandomInBox(randomSeed + i, float4.zero, emitterSize, out pos, out radialVelocity); - - float2 random = BurstMath.Hash21(randomSeed - i); - - // calculate initial life/size/color: - float initialLife = math.max (0, lifetime - lifetime * random.x * lifetimeRandom); - float initialSize = particleSize - particleSize * random.y * sizeRandom; - - outputPositions[count] = new float4(emitterPosition.xyz + math.rotate(emitterRotation, pos.xyz), 0); - outputVelocities[count] = new float4(0,0,0, buoyancy); - outputColors[count] = foamColor; - outputAttributes[count] = new float4(1, 1 / initialLife, initialSize, BurstMath.PackFloatRGBA(new float4(airAging / 50.0f, airdrag, drag, isosurface))); - } - } - } - - [BurstCompile] - unsafe struct GenerateParticlesJob : IJobParallelFor - { - [ReadOnly] [DeallocateOnJobCompletion] public NativeArray activeParticles; - [ReadOnly] public NativeArray positions; - [ReadOnly] public NativeArray velocities; - [ReadOnly] public NativeArray principalRadii; - [ReadOnly] public NativeArray fluidData; - [NativeDisableParallelForRestriction] public NativeArray angularVelocities; - - [NativeDisableParallelForRestriction] public NativeArray outputPositions; - [NativeDisableParallelForRestriction] public NativeArray outputVelocities; - [NativeDisableParallelForRestriction] public NativeArray outputColors; - [NativeDisableParallelForRestriction] public NativeArray outputAttributes; - - [NativeDisableParallelForRestriction] public NativeArray dispatchBuffer; - - public float2 vorticityRange; - public float2 velocityRange; - public float potentialIncrease; - public float potentialDiffusion; - public float foamGenerationRate; - - public float lifetime; - public float lifetimeRandom; - public float particleSize; - public float sizeRandom; - public float buoyancy; - public float drag; - public float airdrag; - public float airAging; - public float isosurface; - public float4 foamColor; - - public float randomSeed; - public float deltaTime; - - public void Execute(int i) - { - int* dispatch = (int*)dispatchBuffer.GetUnsafePtr(); - - int p = activeParticles[i]; - - float4 angVel = angularVelocities[p]; - float2 potential = BurstMath.UnpackFloatRG(angVel.w); - - // calculate foam potential increase: - float vorticityPotential = BurstMath.Remap01(fluidData[p].z, vorticityRange.x, vorticityRange.y); - float velocityPotential = BurstMath.Remap01(math.length(velocities[p].xyz), velocityRange.x, velocityRange.y); - float potentialDelta = velocityPotential * vorticityPotential * deltaTime * potentialIncrease; - - // update foam potential: - potential.y = math.saturate(potential.y * potentialDiffusion + potentialDelta); - - // calculate amount of emitted particles - potential.x += foamGenerationRate * potential.y * deltaTime; - int emitCount = (int)potential.x; - potential.x -= emitCount; - - for (int j = 0; j < emitCount; ++j) - { - // atomically increment alive particle counter: - int count = Interlocked.Add(ref dispatch[3], 1) - 1; - - if (count < outputPositions.Length) - { - // initialize foam particle in a random position inside the cylinder spawned by fluid particle: - float3 radialVelocity; - float4 pos; - BurstMath.RandomInCylinder(randomSeed + p + j, positions[p], math.normalizesafe(velocities[p]), math.length(velocities[p]) * deltaTime, principalRadii[p].x, out pos, out radialVelocity); - - float2 random = BurstMath.Hash21(randomSeed - p - j); - - // calculate initial life/size/color: - float initialLife = velocityPotential * (lifetime - lifetime * random.x * lifetimeRandom); - float initialSize = particleSize - particleSize * random.y * sizeRandom; - - outputPositions[count] = pos; - outputVelocities[count] = velocities[p] + new float4(radialVelocity, buoyancy); - outputColors[count] = foamColor; - outputAttributes[count] = new float4(1, 1/initialLife, initialSize, BurstMath.PackFloatRGBA(new float4(airAging/50.0f, airdrag, drag, isosurface))); - } - } - - angVel.w = BurstMath.PackFloatRG(potential); - angularVelocities[p] = angVel; - } - } - - [BurstCompile] - unsafe struct UpdateParticlesJob : IJobParallelForDefer - { - [ReadOnly] public NativeArray positions; - [ReadOnly] public NativeArray orientations; - [ReadOnly] public NativeArray velocities; - [ReadOnly] public NativeArray angularVelocities; - [ReadOnly] public NativeArray principalRadii; - [ReadOnly] public NativeArray fluidData; - [ReadOnly] public NativeArray fluidMaterial; - - [ReadOnly] public NativeArray simplices; - [ReadOnly] public SimplexCounts simplexCounts; - - [ReadOnly] public NativeMultilevelGrid grid; - [DeallocateOnJobCompletion] - [ReadOnly] public NativeArray gridLevels; - - [ReadOnly] public Poly6Kernel densityKernel; - - [ReadOnly] public NativeArray inputPositions; - [ReadOnly] public NativeArray inputVelocities; - [ReadOnly] public NativeArray inputColors; - [ReadOnly] public NativeArray inputAttributes; - - [NativeDisableParallelForRestriction] public NativeArray outputPositions; - [NativeDisableParallelForRestriction] public NativeArray outputVelocities; - [NativeDisableParallelForRestriction] public NativeArray outputColors; - [NativeDisableParallelForRestriction] public NativeArray outputAttributes; - - [NativeDisableParallelForRestriction] public NativeArray dispatchBuffer; - - [ReadOnly] public Oni.SolverParameters parameters; - - public float3 agingOverPopulation; - public int minFluidNeighbors; - public float deltaTime; - public int currentAliveParticles; - - static readonly int4[] offsets = - { - new int4(0, 0, 0, 1), - new int4(1, 0, 0, 1), - new int4(0, 1, 0, 1), - new int4(1, 1, 0, 1), - new int4(0, 0, 1, 1), - new int4(1, 0, 1, 1), - new int4(0, 1, 1, 1), - new int4(1, 1, 1, 1) - }; - - public void Execute(int i) - { - int* dispatch = (int*)dispatchBuffer.GetUnsafePtr(); - int count = Interlocked.Add(ref dispatch[3], -1); - - if (count < inputPositions.Length && inputAttributes[count].x > 0) - { - int aliveCount = Interlocked.Add(ref dispatch[7], 1) - 1; - - float4 attributes = inputAttributes[count]; - float4 packedData = BurstMath.UnpackFloatRGBA(attributes.w); - - int offsetCount = ((int)parameters.mode == 1) ? 4 : 8; - float4 advectedVelocity = float4.zero; - float4 advectedAngVelocity = float4.zero; - float kernelSum = -packedData.w; - uint neighbourCount = 0; - - float4 diffusePos = inputPositions[count]; - - for (int k = 0; k < gridLevels.Length; ++k) - { - int l = gridLevels[k]; - float radius = NativeMultilevelGrid.CellSizeOfLevel(l); - float interactionDist = radius * 0.5f; - - float4 cellCoords = math.floor(diffusePos / radius); - - cellCoords[3] = 0; - if ((int)parameters.mode == 1) - cellCoords[2] = 0; - - float4 posInCell = diffusePos - (cellCoords * radius + new float4(interactionDist)); - int4 quadrant = (int4)math.sign(posInCell); - - quadrant[3] = l; - - for (int o = 0; o < offsetCount; ++o) - { - int cellIndex; - if (grid.TryGetCellIndex((int4)cellCoords + offsets[o] * quadrant, out cellIndex)) - { - var cell = grid.usedCells[cellIndex]; - for (int n = 0; n < cell.Length; ++n) - { - int simplexStart = simplexCounts.GetSimplexStartAndSize(cell[n], out int simplexSize); - - for (int a = 0; a < simplexSize; ++a) - { - int p = simplices[simplexStart + a]; - float4 normal = diffusePos - positions[p]; - - normal[3] = 0; - if ((int)parameters.mode == 1) - normal[2] = 0; - - float d = math.length(normal); - if (d <= interactionDist) - { - float3 radii = fluidMaterial[p].x * (principalRadii[p].xyz / principalRadii[p].x); - - float4 angVel = new float4(math.cross(angularVelocities[p].xyz, normal.xyz), 0); - advectedAngVelocity += angVel * densityKernel.W(d, radii.x) / densityKernel.W(0, radii.x); - - normal.xyz = math.mul(math.conjugate(orientations[p]), normal.xyz) / radii; - d = math.length(normal) * radii.x; - - // scale by volume (* 1 / normalized density) - float w = densityKernel.W(d, radii.x) / fluidData[p].x; - - kernelSum += w; - advectedVelocity += velocities[p] * w; - neighbourCount++; - } - } - } - } - } - } - - float4 forces = float4.zero; - float velocityScale = 1; - float agingScale = 1 + BurstMath.Remap01(currentAliveParticles / (float)inputPositions.Length, agingOverPopulation.x, agingOverPopulation.y) * (agingOverPopulation.z - 1); - - // foam/bubble particle: - if (kernelSum > BurstMath.epsilon && neighbourCount >= minFluidNeighbors) - { - // advection: - forces = packedData.z / deltaTime * (advectedVelocity / (kernelSum + packedData.w) + advectedAngVelocity - inputVelocities[count]); - - // buoyancy: - forces -= new float4(parameters.gravity * parameters.foamGravityScale * inputVelocities[count].w * math.saturate(kernelSum), 0); - - } - else // ballistic: - { - // gravity: - forces += new float4(parameters.gravity * parameters.foamGravityScale, 0); - - // atmospheric drag/aging: - velocityScale = packedData.y; - agingScale *= packedData.x * 50; - } - - // don't change 4th component, as its used to store buoyancy control parameter. - forces[3] = 0; - - // update particle data: - attributes.x -= attributes.y * deltaTime * agingScale; - outputAttributes[aliveCount] = attributes; - outputColors[aliveCount] = inputColors[count]; - - // integrate: - outputVelocities[aliveCount] = (inputVelocities[count] + forces * deltaTime) * velocityScale; - outputPositions[aliveCount] = new float4((inputPositions[count] + outputVelocities[aliveCount] * deltaTime).xyz,neighbourCount); - } - } - } - - [BurstCompile] - unsafe struct CopyJob : IJobParallelForDefer - { - [ReadOnly] public NativeArray inputPositions; - [ReadOnly] public NativeArray inputVelocities; - [ReadOnly] public NativeArray inputColors; - [ReadOnly] public NativeArray inputAttributes; - - [NativeDisableParallelForRestriction] public NativeArray outputPositions; - [NativeDisableParallelForRestriction] public NativeArray outputVelocities; - [NativeDisableParallelForRestriction] public NativeArray outputColors; - [NativeDisableParallelForRestriction] public NativeArray outputAttributes; - - [NativeDisableParallelForRestriction] public NativeArray dispatchBuffer; - - public void Execute(int i) - { - if (i == 0) - { - dispatchBuffer[3] = dispatchBuffer[7]; - dispatchBuffer[7] = 0; - } - - outputPositions[i] = inputPositions[i]; - outputVelocities[i] = inputVelocities[i]; - outputColors[i] = inputColors[i]; - outputAttributes[i] = inputAttributes[i]; - } - } -} -#endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Solver/FoamParticlesJob.cs.meta b/Assets/Obi/Scripts/Common/Backends/Burst/Solver/FoamParticlesJob.cs.meta deleted file mode 100644 index bdd0b48ee..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Solver/FoamParticlesJob.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 54f132d8cdea34935be3c33b0d1ca4d1 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Solver/InterpolationJob.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Solver/InterpolationJob.cs index 63fdcd543..02625fce0 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Solver/InterpolationJob.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Solver/InterpolationJob.cs @@ -3,49 +3,38 @@ using Unity.Jobs; using Unity.Collections; using Unity.Mathematics; using Unity.Burst; -using UnityEngine; namespace Obi { [BurstCompile] struct InterpolationJob : IJobParallelFor { - [ReadOnly] public NativeArray positions; [ReadOnly] public NativeArray startPositions; - [ReadOnly] public NativeArray endPositions; + [ReadOnly] public NativeArray positions; [WriteOnly] public NativeArray renderablePositions; - [ReadOnly] public NativeArray orientations; [ReadOnly] public NativeArray startOrientations; - [ReadOnly] public NativeArray endOrientations; + [ReadOnly] public NativeArray orientations; [WriteOnly] public NativeArray renderableOrientations; - [ReadOnly] public NativeArray principalRadii; - [WriteOnly] public NativeArray renderableRadii; - - [ReadOnly] public float blendFactor; + [ReadOnly] public float deltaTime; + [ReadOnly] public float unsimulatedTime; [ReadOnly] public Oni.SolverParameters.Interpolation interpolationMode; // The code actually running on the job public void Execute(int i) { - if (interpolationMode == Oni.SolverParameters.Interpolation.Interpolate) + if (interpolationMode == Oni.SolverParameters.Interpolation.Interpolate && deltaTime > 0) { - renderablePositions[i] = math.lerp(startPositions[i], endPositions[i], blendFactor); - renderableOrientations[i] = math.normalize(math.slerp(startOrientations[i], endOrientations[i], blendFactor)); - renderableRadii[i] = principalRadii[i]; - } - else if (interpolationMode == Oni.SolverParameters.Interpolation.Extrapolate) - { - renderablePositions[i] = math.lerp(endPositions[i], positions[i], blendFactor); - renderableOrientations[i] = math.normalize(math.slerp(endOrientations[i], orientations[i], blendFactor)); - renderableRadii[i] = principalRadii[i]; + float alpha = unsimulatedTime / deltaTime; + + renderablePositions[i] = math.lerp(startPositions[i], positions[i], alpha); + renderableOrientations[i] = math.normalize(math.slerp(startOrientations[i], orientations[i], alpha)); } else { - renderablePositions[i] = endPositions[i]; - renderableOrientations[i] = math.normalize(endOrientations[i]); - renderableRadii[i] = principalRadii[i]; + renderablePositions[i] = positions[i]; + renderableOrientations[i] = math.normalize(orientations[i]); } } } diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Solver/PredictPositionsJob.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Solver/PredictPositionsJob.cs index 106fa3877..4c204d7b0 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Solver/PredictPositionsJob.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Solver/PredictPositionsJob.cs @@ -14,7 +14,7 @@ namespace Obi { [ReadOnly] public NativeArray activeParticles; [ReadOnly] public NativeArray phases; - [ReadOnly] public NativeArray buoyancies; + [ReadOnly] public NativeArray buoyancies; // linear/position properties: [ReadOnly] public NativeArray externalForces; @@ -48,7 +48,7 @@ namespace Obi // Adjust gravity for buoyant fluid particles: if ((phases[i] & (int)ObiUtils.ParticleFlags.Fluid) != 0) - effectiveGravity *= -buoyancies[i].z; + effectiveGravity *= -buoyancies[i]; // apply external forces and gravity: float4 vel = velocities[i] + (inverseMasses[i] * externalForces[i] + effectiveGravity) * deltaTime; @@ -63,13 +63,13 @@ namespace Obi if (inverseRotationalMasses[i] > 0) { // apply external torques (simplification: we don't use full inertia tensor here) - float3 angularVel = angularVelocities[i].xyz + inverseRotationalMasses[i] * externalTorques[i].xyz * deltaTime; + float4 angularVel = angularVelocities[i] + inverseRotationalMasses[i] * externalTorques[i] * deltaTime; // project angular velocity to 2D plane normal if needed: if (is2D) - angularVel = angularVel.project(new float3(0, 0, 1)); + angularVel = angularVel.project(new float4(0, 0, 1, 0)); - angularVelocities[i] = new float4(angularVel, angularVelocities[i].w); + angularVelocities[i] = angularVel; } // integrate velocities: diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Solver/UpdateInertiaTensorsJob.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Solver/UpdateInertiaTensorsJob.cs new file mode 100644 index 000000000..90cfe23db --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Solver/UpdateInertiaTensorsJob.cs @@ -0,0 +1,38 @@ +#if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) +using UnityEngine; +using Unity.Jobs; +using Unity.Collections; +using Unity.Mathematics; +using Unity.Burst; +using System; +using System.Collections; + +namespace Obi +{ + [BurstCompile] + struct UpdateInertiaTensorsJob : IJobParallelFor + { + [ReadOnly] public NativeArray activeParticles; + + [ReadOnly] public NativeArray inverseMasses; + [ReadOnly] public NativeArray inverseRotationalMasses; + [ReadOnly] public NativeArray principalRadii; + + [NativeDisableParallelForRestriction] + public NativeArray inverseInertiaTensors; + + public void Execute(int index) + { + int i = activeParticles[index]; + + float4 sqrRadii = principalRadii[i] * principalRadii[i]; + + inverseInertiaTensors[i] = 5 * inverseRotationalMasses[i] * new float4( + 1 / math.max(sqrRadii[1] + sqrRadii[2], BurstMath.epsilon), + 1 / math.max(sqrRadii[0] + sqrRadii[2], BurstMath.epsilon), + 1 / math.max(sqrRadii[0] + sqrRadii[1], BurstMath.epsilon), + 0); + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Obi/Editor/Common/Collisions/ObiForceZoneEditor.cs.meta b/Assets/Obi/Scripts/Common/Backends/Burst/Solver/UpdateInertiaTensorsJob.cs.meta similarity index 83% rename from Assets/Obi/Editor/Common/Collisions/ObiForceZoneEditor.cs.meta rename to Assets/Obi/Scripts/Common/Backends/Burst/Solver/UpdateInertiaTensorsJob.cs.meta index 99479b1eb..87288db8c 100644 --- a/Assets/Obi/Editor/Common/Collisions/ObiForceZoneEditor.cs.meta +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Solver/UpdateInertiaTensorsJob.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 724435a7a84154b27bb0c8ea49b611df +guid: fac27eeae85e84131bebdf89ad1d6802 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Solver/UpdateNormalsJob.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Solver/UpdateNormalsJob.cs index 5b568c508..a9594ef29 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Solver/UpdateNormalsJob.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Solver/UpdateNormalsJob.cs @@ -1,122 +1,43 @@ #if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) +using UnityEngine; using Unity.Jobs; using Unity.Collections; using Unity.Mathematics; using Unity.Burst; -using UnityEngine; +using System; +using System.Collections; namespace Obi { - [BurstCompile] - struct ResetNormals : IJobParallelFor + struct UpdateNormalsJob : IJob { - [ReadOnly] public NativeArray phases; + [ReadOnly] public NativeList deformableTriangles; + [ReadOnly] public NativeArray renderPositions; public NativeArray normals; - [WriteOnly] public NativeArray tangents; - public void Execute(int i) + public void Execute() { - // leave fluid and softbody normals intact. - if ((phases[i] & (int)ObiUtils.ParticleFlags.Fluid) == 0 && normals[i].w >= 0) - { + for (int i = 0; i < normals.Length; ++i) normals[i] = float4.zero; - tangents[i] = float4.zero; - } - } - } - [BurstCompile] - unsafe struct UpdateTriangleNormalsJob : IJobParallelFor - { - [ReadOnly] public NativeArray deformableTriangles; - [ReadOnly] public NativeArray deformableTriangleUVs; - [ReadOnly] public NativeArray renderPositions; - - [NativeDisableParallelForRestriction] public NativeArray normals; - [NativeDisableParallelForRestriction] public NativeArray tangents; - - public void Execute(int i) - { - int p1 = deformableTriangles[i*3]; - int p2 = deformableTriangles[i*3 + 1]; - int p3 = deformableTriangles[i*3 + 2]; - - float3 m1 = (renderPositions[p2] - renderPositions[p1]).xyz; - float3 m2 = (renderPositions[p3] - renderPositions[p1]).xyz; - - float2 s = deformableTriangleUVs[i * 3 + 1] - deformableTriangleUVs[i * 3]; - float2 t = deformableTriangleUVs[i * 3 + 2] - deformableTriangleUVs[i * 3]; - - float4 normal = new float4(math.cross(m1, m2), 0); - float4 tangent = float4.zero; - - float area = s.x * t.y - t.x * s.y; - - if (math.abs(area) > BurstMath.epsilon) + // Accumulate normals: + for (int i = 0; i < deformableTriangles.Length; i += 3) { - tangent = new float4(t.y * m1.x - s.y * m2.x, - t.y * m1.y - s.y * m2.y, - t.y * m1.z - s.y * m2.z, 0) / area; + float4 v1 = renderPositions[deformableTriangles[i]]; + float4 v2 = renderPositions[deformableTriangles[i + 1]]; + float4 v3 = renderPositions[deformableTriangles[i + 2]]; + + float4 n = new float4(math.cross((v2 - v1).xyz, (v3 - v1).xyz), 0); + + normals[deformableTriangles[i]] += n; + normals[deformableTriangles[i + 1]] += n; + normals[deformableTriangles[i + 2]] += n; } - BurstMath.AtomicAdd(normals, p1, normal); - BurstMath.AtomicAdd(normals, p2, normal); - BurstMath.AtomicAdd(normals, p3, normal); - - BurstMath.AtomicAdd(tangents, p1, tangent); - BurstMath.AtomicAdd(tangents, p2, tangent); - BurstMath.AtomicAdd(tangents, p3, tangent); - } - } - - [BurstCompile] - unsafe struct UpdateEdgeNormalsJob : IJobParallelFor - { - [ReadOnly] public NativeArray deformableEdges; - [ReadOnly] public NativeArray velocities; - [ReadOnly] public NativeArray wind; - [ReadOnly] public NativeArray renderPositions; - - [NativeDisableParallelForRestriction] public NativeArray normals; - - public void Execute(int i) - { - int p1 = deformableEdges[i * 2]; - int p2 = deformableEdges[i * 2 + 1]; - - float4 edge = renderPositions[p2] - renderPositions[p1]; - float4 avgWind = (velocities[p1] + velocities[p2]) * 0.5f - (wind[p1] + wind[p2]) * 0.5f; - float4 normal = avgWind - math.projectsafe(avgWind, edge); - - BurstMath.AtomicAdd(normals, p1, normal); - BurstMath.AtomicAdd(normals, p2, normal); - } - } - - [BurstCompile] - struct RenderableOrientationFromNormals : IJobParallelFor - { - [ReadOnly] public NativeArray phases; - - public NativeArray normals; - public NativeArray tangents; - - [WriteOnly] public NativeArray renderableOrientations; - - public void Execute(int i) - { - if (((phases[i] & (int)ObiUtils.ParticleFlags.Fluid) == 0 && normals[i].w >= 0) && // not fluid or softbody (no SDF stored) - math.lengthsq(normals[i]) > BurstMath.epsilon && - math.lengthsq(tangents[i]) > BurstMath.epsilon) - { + for (int i = 0; i < normals.Length; ++i) normals[i] = math.normalizesafe(normals[i]); - tangents[i] = math.normalizesafe(tangents[i]); - - // particle orientation from normal/tangent: - renderableOrientations[i] = quaternion.LookRotation(normals[i].xyz, tangents[i].xyz); - } } } } -#endif +#endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Solver/UpdateParticleLifetimesJob.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Solver/UpdateParticleLifetimesJob.cs deleted file mode 100644 index dd65527ab..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Solver/UpdateParticleLifetimesJob.cs +++ /dev/null @@ -1,41 +0,0 @@ -#if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) -using UnityEngine; -using Unity.Jobs; -using Unity.Collections; -using Unity.Collections.LowLevel.Unsafe; -using Unity.Mathematics; -using Unity.Burst; -using System; -using System.Collections; -using System.Threading; - -namespace Obi -{ - [BurstCompile] - unsafe struct UpdateParticleLifetimesJob : IJobParallelFor - { - [ReadOnly] public NativeArray activeParticles; - [NativeDisableParallelForRestriction] public NativeArray life; - - [NativeDisableParallelForRestriction] public NativeArray deadParticles; - [NativeDisableContainerSafetyRestriction] public NativeReference deadParticleCount; - - [ReadOnly] public float dt; - - public void Execute(int i) - { - int p = activeParticles[i]; - - life[p] -= dt; - - if (life[p] <= 0) - { - int* countRef = (int*)deadParticleCount.GetUnsafePtr(); - int count = Interlocked.Increment(ref countRef[0]) - 1; - deadParticles[count] = p; - life[p] = 0; - } - } - } -} -#endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Solver/UpdateParticleLifetimesJob.cs.meta b/Assets/Obi/Scripts/Common/Backends/Burst/Solver/UpdateParticleLifetimesJob.cs.meta deleted file mode 100644 index 460f21027..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Solver/UpdateParticleLifetimesJob.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e2ac6f480787440e7bd2610e4545bd9e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Solver/UpdatePositionsJob.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Solver/UpdatePositionsJob.cs index 9401d9bc9..ff7d6590a 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Solver/UpdatePositionsJob.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Solver/UpdatePositionsJob.cs @@ -26,42 +26,25 @@ namespace Obi [ReadOnly] public float velocityScale; [ReadOnly] public float sleepThreshold; - [ReadOnly] public float maxVelocity; - [ReadOnly] public float maxAngularVelocity; // The code actually running on the job public void Execute(int index) { int i = activeParticles[index]; - float4 velocity = velocities[i]; - float4 angVelocity = angularVelocities[i]; - // damp velocities: - velocity *= velocityScale; - angVelocity.xyz *= velocityScale; - - // clamp velocities: - float velMagnitude = math.length(velocity); - float angularVelMagnitude = math.length(angVelocity.xyz); - - if (velMagnitude > BurstMath.epsilon) - velocity *= math.min(maxVelocity, velMagnitude) / velMagnitude; - - if (angularVelMagnitude > BurstMath.epsilon) - angVelocity.xyz *= math.min(maxAngularVelocity, angularVelMagnitude) / angularVelMagnitude; + velocities[i] *= velocityScale; + angularVelocities[i] *= velocityScale; // if the kinetic energy is below the sleep threshold, keep the particle at its previous position. - if (velMagnitude * velMagnitude * 0.5f + angularVelMagnitude * angularVelMagnitude * 0.5f <= sleepThreshold) + if (math.lengthsq(velocities[i]) * 0.5f + math.lengthsq(angularVelocities[i]) * 0.5f <= sleepThreshold) { positions[i] = previousPositions[i]; orientations[i] = previousOrientations[i]; - velocity = float4.zero; - angVelocity.xyz = float3.zero; + velocities[i] = float4.zero; + angularVelocities[i] = float4.zero; } - velocities[i] = velocity; - angularVelocities[i] = angVelocity; } } } diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Solver/UpdatePrincipalAxisJob.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Solver/UpdatePrincipalAxisJob.cs new file mode 100644 index 000000000..09a537194 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Solver/UpdatePrincipalAxisJob.cs @@ -0,0 +1,50 @@ +#if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) +using UnityEngine; +using Unity.Jobs; +using Unity.Collections; +using Unity.Mathematics; +using Unity.Burst; +using System; +using System.Collections; + +namespace Obi +{ + [BurstCompile] + struct UpdatePrincipalAxisJob : IJobParallelFor + { + [ReadOnly] public NativeArray activeParticles; + [ReadOnly] public NativeArray renderableOrientations; + [ReadOnly] public NativeArray phases; + [ReadOnly] public NativeArray principalRadii; + + [NativeDisableParallelForRestriction] + public NativeArray principalAxis; + + public void Execute(int index) + { + int i = activeParticles[index]; + + // fluid particles get their principal axes from the neighborhood matrix, so skip them. + if ((phases[i] & (int)ObiUtils.ParticleFlags.Fluid) == 0) + { + int i3 = i * 3; + float4x4 rot = renderableOrientations[i].toMatrix(); + + // set axis direction: + float4 pAxis1 = rot.c0; + float4 pAxis2 = rot.c1; + float4 pAxis3 = rot.c2; + + // set axis length: + pAxis1[3] = principalRadii[i][0]; + pAxis2[3] = principalRadii[i][1]; + pAxis3[3] = principalRadii[i][2]; + + principalAxis[i3] = pAxis1; + principalAxis[i3+1] = pAxis2; + principalAxis[i3+2] = pAxis3; + } + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Solver/UpdatePrincipalAxisJob.cs.meta b/Assets/Obi/Scripts/Common/Backends/Burst/Solver/UpdatePrincipalAxisJob.cs.meta new file mode 100644 index 000000000..711a4fc8c --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Solver/UpdatePrincipalAxisJob.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 22028834877974573b3b29b8a2b8f6cc +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Solver/UpdateVelocitiesJob.cs b/Assets/Obi/Scripts/Common/Backends/Burst/Solver/UpdateVelocitiesJob.cs index 32a189640..1d6159fca 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Solver/UpdateVelocitiesJob.cs +++ b/Assets/Obi/Scripts/Common/Backends/Burst/Solver/UpdateVelocitiesJob.cs @@ -24,7 +24,7 @@ namespace Obi [ReadOnly] public NativeArray inverseRotationalMasses; [ReadOnly] public NativeArray previousOrientations; [NativeDisableParallelForRestriction] public NativeArray orientations; - [NativeDisableParallelForRestriction] public NativeArray angularVelocities; + [NativeDisableParallelForRestriction] [WriteOnly] public NativeArray angularVelocities; [ReadOnly] public float deltaTime; [ReadOnly] public bool is2D; @@ -49,7 +49,7 @@ namespace Obi velocities[i] = float4.zero; if (inverseRotationalMasses[i] > 0) - angularVelocities[i] = new float4(BurstIntegration.DifferentiateAngular(orientations[i], previousOrientations[i], deltaTime).xyz, angularVelocities[i].w); + angularVelocities[i] = BurstIntegration.DifferentiateAngular(orientations[i], previousOrientations[i], deltaTime); else angularVelocities[i] = float4.zero; } diff --git a/Assets/Obi/Scripts/Common/Backends/Compute.meta b/Assets/Obi/Scripts/Common/Backends/Compute.meta deleted file mode 100644 index 18db0ca74..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 4e491460f88fa4ee49cdb796a0b8a923 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Collisions.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Collisions.meta deleted file mode 100644 index bd5f862e3..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Collisions.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 1816ef976b3b64da7bf7a71a91e97d0f -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeBox.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeBox.cs deleted file mode 100644 index c79f40e3c..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeBox.cs +++ /dev/null @@ -1,42 +0,0 @@ -using UnityEngine; - -namespace Obi -{ - public class ComputeBox - { - private ComputeShader shader; - private int kernel; - - public ComputeBox() - { - shader = GameObject.Instantiate(Resources.Load("Compute/BoxShape")); - kernel = shader.FindKernel("GenerateContacts"); - } - - public void GenerateContacts(ComputeSolverImpl solver, ComputeColliderWorld world) - { - shader.SetInt("maxContacts", ComputeColliderWorld.maxContacts); - shader.SetInt("pointCount", solver.simplexCounts.pointCount); - shader.SetInt("edgeCount", solver.simplexCounts.edgeCount); - shader.SetInt("triangleCount", solver.simplexCounts.triangleCount); - shader.SetInt("surfaceCollisionIterations", solver.abstraction.parameters.surfaceCollisionIterations); - shader.SetFloat("surfaceCollisionTolerance", solver.abstraction.parameters.surfaceCollisionTolerance); - shader.SetFloat("collisionMargin", solver.abstraction.parameters.collisionMargin); - - shader.SetBuffer(kernel, "worldToSolver", solver.worldToSolverBuffer); - shader.SetBuffer(kernel, "simplices", solver.simplices); - shader.SetBuffer(kernel, "positions", solver.positionsBuffer); - shader.SetBuffer(kernel, "orientations", solver.orientationsBuffer); - shader.SetBuffer(kernel, "velocities", solver.velocitiesBuffer); - shader.SetBuffer(kernel, "principalRadii", solver.principalRadiiBuffer); - shader.SetBuffer(kernel, "transforms", world.transformsBuffer); - shader.SetBuffer(kernel, "shapes", world.shapesBuffer); - shader.SetBuffer(kernel, "contactPairs", world.contactPairs); - shader.SetBuffer(kernel, "contactOffsetsPerType", world.contactOffsetsPerType); - shader.SetBuffer(kernel, "contacts", solver.abstraction.colliderContacts.computeBuffer); - shader.SetBuffer(kernel, "dispatchBuffer", world.dispatchBuffer); - shader.DispatchIndirect(kernel, world.dispatchBuffer, 32 + 16 * (int)Oni.ShapeType.Box); - } - - } -} diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeBox.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeBox.cs.meta deleted file mode 100644 index d5d5809e7..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeBox.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 669f5cb47192b4a08864250bd4ba3872 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeCapsule.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeCapsule.cs deleted file mode 100644 index 576fe40e6..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeCapsule.cs +++ /dev/null @@ -1,42 +0,0 @@ -using UnityEngine; - -namespace Obi -{ - public class ComputeCapsule - { - private ComputeShader shader; - private int kernel; - - public ComputeCapsule() - { - shader = GameObject.Instantiate(Resources.Load("Compute/CapsuleShape")); - kernel = shader.FindKernel("GenerateContacts"); - } - - public void GenerateContacts(ComputeSolverImpl solver, ComputeColliderWorld world) - { - shader.SetInt("maxContacts", ComputeColliderWorld.maxContacts); - shader.SetInt("pointCount", solver.simplexCounts.pointCount); - shader.SetInt("edgeCount", solver.simplexCounts.edgeCount); - shader.SetInt("triangleCount", solver.simplexCounts.triangleCount); - shader.SetInt("surfaceCollisionIterations", solver.abstraction.parameters.surfaceCollisionIterations); - shader.SetFloat("surfaceCollisionTolerance", solver.abstraction.parameters.surfaceCollisionTolerance); - shader.SetFloat("collisionMargin", solver.abstraction.parameters.collisionMargin); - - shader.SetBuffer(kernel, "worldToSolver", solver.worldToSolverBuffer); - shader.SetBuffer(kernel, "simplices", solver.simplices); - shader.SetBuffer(kernel, "positions", solver.positionsBuffer); - shader.SetBuffer(kernel, "orientations", solver.orientationsBuffer); - shader.SetBuffer(kernel, "velocities", solver.velocitiesBuffer); - shader.SetBuffer(kernel, "principalRadii", solver.principalRadiiBuffer); - shader.SetBuffer(kernel, "transforms", world.transformsBuffer); - shader.SetBuffer(kernel, "shapes", world.shapesBuffer); - shader.SetBuffer(kernel, "contactPairs", world.contactPairs); - shader.SetBuffer(kernel, "contactOffsetsPerType", world.contactOffsetsPerType); - shader.SetBuffer(kernel, "contacts", solver.abstraction.colliderContacts.computeBuffer); - shader.SetBuffer(kernel, "dispatchBuffer", world.dispatchBuffer); - shader.DispatchIndirect(kernel, world.dispatchBuffer, 32 + 16 * (int)Oni.ShapeType.Capsule); - } - - } -} diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeCapsule.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeCapsule.cs.meta deleted file mode 100644 index 13e33af82..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeCapsule.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b8577fc7696f14a5bad666ce7bdbd424 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeColliderWorld.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeColliderWorld.cs deleted file mode 100644 index 96b57bd12..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeColliderWorld.cs +++ /dev/null @@ -1,479 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine; - -namespace Obi -{ - public class ComputeColliderWorld : MonoBehaviour, IColliderWorldImpl - { - public int referenceCount { get; private set; } = 0; - - public int colliderCount { get; private set; } = 0; - public int rigidbodyCount { get; private set; } = -1; // make sure the buffer is created even if there's 0. - public int forceZoneCount { get; private set; } = -1; // make sure the buffer is created even if there's 0. - public int materialCount { get; private set; } = -1; // make sure the buffer is created even if there's 0. - - public int triangleMeshCount { get; private set; } = -1; - public int edgeMeshCount { get; private set; } = -1; - public int distanceFieldCount { get; private set; } = -1; - public int heightFieldCount { get; private set; } = -1; - - private ComputePrefixSum prefixSum; - - private ComputeShader gridShader; - private int buildKernel; - private int gridPopulationKernel; - private int sortKernel; - private int contactsKernel; - private int clearKernel; - private int prefixSumPairsKernel; - private int sortPairsKernel; - private int applyForceZonesKernel; - private int writeForceZoneResultsKernel; - - public GraphicsBuffer materialsBuffer; - public GraphicsBuffer aabbsBuffer; - public GraphicsBuffer transformsBuffer; - public GraphicsBuffer shapesBuffer; - public GraphicsBuffer forceZonesBuffer; - public GraphicsBuffer rigidbodiesBuffer; - public GraphicsBuffer sortedColliderIndicesBuffer; - - public GraphicsBuffer cellIndicesBuffer; //for each collider, the IDs of the 8 cells it covers. - public GraphicsBuffer cellOffsetsBuffer; //for each cell, start offset in the sorted span indices buffer. - - public GraphicsBuffer cellCountsBuffer; // for each cell, how many colliders in it. - public GraphicsBuffer offsetInCells; // for each collider, its offset in each of the 8 cells. - public GraphicsBuffer levelPopulation; // buffer storing amount of entries in each grid level - - private GraphicsBuffer colliderTypeCounts; // amount of contacts against each collider type. - public GraphicsBuffer unsortedContactPairs; // unsorted contact pairs. - public GraphicsBuffer contactPairs; // list of contact pairs. - public GraphicsBuffer contactOffsetsPerType; // offset in the contact pairs array for each collider type. - - public GraphicsBuffer dispatchBuffer; // dispatch info for iterating trough contacts. - - public GraphicsBuffer heightFieldHeaders; - public GraphicsBuffer heightFieldSamples; - - public GraphicsBuffer distanceFieldHeaders; - public GraphicsBuffer dfNodes; - - public GraphicsBuffer edgeMeshHeaders; - public GraphicsBuffer edgeBihNodes; - public GraphicsBuffer edges; - public GraphicsBuffer edgeVertices; - - public GraphicsBuffer triangleMeshHeaders; - public GraphicsBuffer bihNodes; - public GraphicsBuffer triangles; - public GraphicsBuffer vertices; - - public const int maxContacts = 512 * 512; - public const int maxCells = 512 * 512; - public const int cellsPerCollider = 8; - private const int maxGridLevels = 24; - private uint[] colliderCountClear = new uint[Oni.ColliderShapeTypeCount]; - private uint[] dispatchClear = { 0, 1, 1, 0, // contacts - 0, 1, 1, 0, // pairs - 0, 1, 1, 0, // spheres - 0, 1, 1, 0, // boxes - 0, 1, 1, 0, // capsules - 0, 1, 1, 0, // heighmaps - 0, 1, 1, 0, // tri mesh - 0, 1, 1, 0, // edge mesh - 0, 1, 1, 0, // distance field - }; - - private ComputeSphere spheres; - private ComputeBox boxes; - private ComputeCapsule capsules; - private ComputeTriangleMesh triangleMeshes; - private ComputeEdgeMesh edgeMeshes; - private ComputeDistanceField distanceFields; - private ComputeHeightField heightFields; - - // for each particle in parallel: - // determine its cell span in the collider grid. - // iterate over all of them, generating contacts. - - // we just need to get collider indices from each cell. - // sort by cell, store offset for each cell. - - // each collider keeps track of 8 uints: IDs of the cells it overlaps. unused are invalid. - // each collider must know offset within each cell: another 8 units per collider. - // we can keep using the same system as we did with particles. - - - public void Awake() - { - ObiColliderWorld.GetInstance().RegisterImplementation(this); - - prefixSum = new ComputePrefixSum(maxCells); - - gridShader = Resources.Load("Compute/ColliderGrid"); - buildKernel = gridShader.FindKernel("BuildUnsortedList"); - gridPopulationKernel = gridShader.FindKernel("FindPopulatedLevels"); - sortKernel = gridShader.FindKernel("SortList"); - contactsKernel = gridShader.FindKernel("BuildContactList"); - clearKernel = gridShader.FindKernel("Clear"); - prefixSumPairsKernel = gridShader.FindKernel("PrefixSumColliderCounts"); - sortPairsKernel = gridShader.FindKernel("SortContactPairs"); - applyForceZonesKernel = gridShader.FindKernel("ApplyForceZones"); - writeForceZoneResultsKernel = gridShader.FindKernel("WriteForceZoneResults"); - - gridShader.SetInt("shapeTypeCount", Oni.ColliderShapeTypeCount); - gridShader.SetInt("maxContacts", maxContacts); - gridShader.SetInt("colliderCount", colliderCount); - gridShader.SetInt("cellsPerCollider", cellsPerCollider); - gridShader.SetInt("maxCells", maxCells); - - cellOffsetsBuffer = new GraphicsBuffer(GraphicsBuffer.Target.Structured, maxCells, 4); - cellCountsBuffer = new GraphicsBuffer(GraphicsBuffer.Target.Structured, maxCells, 4); - - // first entry is amount of non-empty levels in the grid. - // next maxGridLevels entries hold the indices of the non-empty levels. - // final maxGridLevels entries hold the population of each level. - levelPopulation = new GraphicsBuffer(GraphicsBuffer.Target.Structured, maxGridLevels + 1, 4); - - colliderTypeCounts = new GraphicsBuffer(GraphicsBuffer.Target.Structured, Oni.ColliderShapeTypeCount, 4); - contactOffsetsPerType = new GraphicsBuffer(GraphicsBuffer.Target.Structured, Oni.ColliderShapeTypeCount + 1, 4); - unsortedContactPairs = new GraphicsBuffer(GraphicsBuffer.Target.Structured, maxContacts, 8); - - contactPairs = new GraphicsBuffer(GraphicsBuffer.Target.Structured, maxContacts, 8); - dispatchBuffer = new GraphicsBuffer(GraphicsBuffer.Target.IndirectArguments, dispatchClear.Length, sizeof(uint)); - - spheres = new ComputeSphere(); - boxes = new ComputeBox(); - capsules = new ComputeCapsule(); - triangleMeshes = new ComputeTriangleMesh(); - edgeMeshes = new ComputeEdgeMesh(); - distanceFields = new ComputeDistanceField(); - heightFields = new ComputeHeightField(); - } - - public void OnDestroy() - { - ObiColliderWorld.GetInstance().UnregisterImplementation(this); - - prefixSum.Dispose(); - - cellOffsetsBuffer.Dispose(); - cellCountsBuffer.Dispose(); - levelPopulation.Dispose(); - - contactPairs.Dispose(); - dispatchBuffer.Dispose(); - - colliderTypeCounts.Dispose(); - contactOffsetsPerType.Dispose(); - unsortedContactPairs.Dispose(); - - if (cellIndicesBuffer != null) - cellIndicesBuffer.Dispose(); - if (offsetInCells != null) - offsetInCells.Dispose(); - if (sortedColliderIndicesBuffer != null) - sortedColliderIndicesBuffer.Dispose(); - } - - public void IncreaseReferenceCount() - { - referenceCount++; - } - public void DecreaseReferenceCount() - { - if (--referenceCount <= 0 && gameObject != null) - DestroyImmediate(gameObject); - } - - public void SetColliders(ObiNativeColliderShapeList shapes, ObiNativeAabbList bounds, ObiNativeAffineTransformList transforms) - { - if (colliderCount != shapes.count || aabbsBuffer == null || !aabbsBuffer.IsValid()) - aabbsBuffer = bounds.AsComputeBuffer(); - else - bounds.Upload(); - - if (colliderCount != shapes.count || shapesBuffer == null || !shapesBuffer.IsValid()) - shapesBuffer = shapes.AsComputeBuffer(); - else - shapes.Upload(); - - if (colliderCount != shapes.count || transformsBuffer == null || !transformsBuffer.IsValid()) - transformsBuffer = transforms.AsComputeBuffer(); - else - transforms.Upload(); - - // Only update in case the amount of colliders has changed: - if (colliderCount != shapes.count) - { - colliderCount = shapes.count; - gridShader.SetInt("colliderCount", colliderCount); - - if (cellIndicesBuffer != null) - { - cellIndicesBuffer.Release(); - cellIndicesBuffer = null; - } - if (offsetInCells != null) - { - offsetInCells.Release(); - offsetInCells = null; - } - if (sortedColliderIndicesBuffer != null) - { - sortedColliderIndicesBuffer.Release(); - sortedColliderIndicesBuffer = null; - } - - if (colliderCount > 0) - { - cellIndicesBuffer = new GraphicsBuffer(GraphicsBuffer.Target.Structured, colliderCount * cellsPerCollider, 4); - offsetInCells = new GraphicsBuffer(GraphicsBuffer.Target.Structured, colliderCount * cellsPerCollider, 4); - sortedColliderIndicesBuffer = new GraphicsBuffer(GraphicsBuffer.Target.Structured, colliderCount * cellsPerCollider, 4); - } - } - } - - public void SetForceZones(ObiNativeForceZoneList forceZones) - { - // Changing the count of a NativeList should not invalidate compute buffer. Only need to invalidate if *capacity* changes, it's up to the user to - // regenerate the compute buffer in case it is needed, or Uplodad() the new data in case it is not (because our compute buffer maps full capacity, instead of only up to count) - if (forceZoneCount != forceZones.count || forceZonesBuffer == null || !forceZonesBuffer.IsValid()) - { - forceZoneCount = forceZones.count; - forceZonesBuffer = forceZones.SafeAsComputeBuffer(); - } - else - forceZones.Upload(); - } - - public void SetRigidbodies(ObiNativeRigidbodyList rigidbody) - { - if (rigidbodyCount != rigidbody.count || rigidbodiesBuffer == null || !rigidbodiesBuffer.IsValid()) - { - rigidbodyCount = rigidbody.count; - rigidbodiesBuffer = rigidbody.SafeAsComputeBuffer(); - } - else - rigidbody.Upload(); - } - - public void SetCollisionMaterials(ObiNativeCollisionMaterialList materials) - { - if (materialCount != materials.count || materialsBuffer == null || !materialsBuffer.IsValid()) - { - materialCount = materials.count; - materialsBuffer = materials.SafeAsComputeBuffer(); - } - else - materials.Upload(); - } - - public void SetTriangleMeshData(ObiNativeTriangleMeshHeaderList headers, ObiNativeBIHNodeList nodes, ObiNativeTriangleList triangles, ObiNativeVector3List vertices) - { - if (triangleMeshCount != headers.count || triangleMeshHeaders == null || !triangleMeshHeaders.IsValid()) - { - triangleMeshCount = headers.count; - triangleMeshHeaders = headers.SafeAsComputeBuffer(); - bihNodes = nodes.SafeAsComputeBuffer(); - this.triangles = triangles.SafeAsComputeBuffer(); - this.vertices = vertices.SafeAsComputeBuffer(); - } - } - - public void SetEdgeMeshData(ObiNativeEdgeMeshHeaderList headers, ObiNativeBIHNodeList nodes, ObiNativeEdgeList edges, ObiNativeVector2List vertices) - { - if (edgeMeshCount != headers.count || edgeMeshHeaders == null || !edgeMeshHeaders.IsValid()) - { - edgeMeshCount = headers.count; - edgeMeshHeaders = headers.SafeAsComputeBuffer(); - edgeBihNodes = nodes.SafeAsComputeBuffer(); - this.edges = edges.SafeAsComputeBuffer(); - edgeVertices = vertices.SafeAsComputeBuffer(); - } - } - - public void SetDistanceFieldData(ObiNativeDistanceFieldHeaderList headers, ObiNativeDFNodeList nodes) - { - if (distanceFieldCount != headers.count || distanceFieldHeaders == null || !distanceFieldHeaders.IsValid()) - { - distanceFieldCount = headers.count; - distanceFieldHeaders = headers.SafeAsComputeBuffer(); - dfNodes = nodes.SafeAsComputeBuffer(); - } - } - - public void SetHeightFieldData(ObiNativeHeightFieldHeaderList headers, ObiNativeFloatList samples) - { - if (heightFieldCount != headers.count || heightFieldHeaders == null || !heightFieldHeaders.IsValid()) - { - heightFieldCount = headers.count; - heightFieldHeaders = headers.SafeAsComputeBuffer(); - heightFieldSamples = samples.SafeAsComputeBuffer(); - } - } - - public void UpdateWorld(float deltaTime) - { - if (colliderCount > 0) - { - - int colliderThreadGroups = ComputeMath.ThreadGroupCount(colliderCount, 128); - int capacityThreadGroups = ComputeMath.ThreadGroupCount(colliderCount * 8, 128); - int cellThreadGroups = ComputeMath.ThreadGroupCount(maxCells, 128); - - // clear grid: - gridShader.SetBuffer(clearKernel, "cellOffsets", cellOffsetsBuffer); - gridShader.SetBuffer(clearKernel, "cellIndices", cellIndicesBuffer); - gridShader.SetBuffer(clearKernel, "cellCounts", cellCountsBuffer); - gridShader.SetBuffer(clearKernel, "levelPopulation", levelPopulation); - gridShader.Dispatch(clearKernel, Mathf.Max(cellThreadGroups, capacityThreadGroups), 1, 1); - - // build cell list: - gridShader.SetBuffer(buildKernel, "aabbs", aabbsBuffer); - gridShader.SetBuffer(buildKernel, "shapes", shapesBuffer); - gridShader.SetBuffer(buildKernel, "rigidbodies", rigidbodiesBuffer); - gridShader.SetBuffer(buildKernel, "collisionMaterials", materialsBuffer); - gridShader.SetBuffer(buildKernel, "cellIndices", cellIndicesBuffer); - gridShader.SetBuffer(buildKernel, "cellCounts", cellCountsBuffer); - gridShader.SetBuffer(buildKernel, "offsetInCells", offsetInCells); - gridShader.SetBuffer(buildKernel, "levelPopulation", levelPopulation); - gridShader.Dispatch(buildKernel, colliderThreadGroups, 1, 1); - - // find populated grid levels: - gridShader.SetBuffer(gridPopulationKernel, "levelPopulation", levelPopulation); - gridShader.Dispatch(gridPopulationKernel, 1, 1, 1); - - // prefix sum: - prefixSum.Sum(cellCountsBuffer, cellOffsetsBuffer); - - // sort particle indices: - gridShader.SetBuffer(sortKernel, "sortedColliderIndices", sortedColliderIndicesBuffer); - gridShader.SetBuffer(sortKernel, "offsetInCells", offsetInCells); - gridShader.SetBuffer(sortKernel, "cellIndices", cellIndicesBuffer); - gridShader.SetBuffer(sortKernel, "cellOffsets", cellOffsetsBuffer); - gridShader.Dispatch(sortKernel, capacityThreadGroups, 1, 1); - } - } - - public void ApplyForceZones(ComputeSolverImpl solver, float deltaTime) - { - if (colliderCount > 0) - { - if (solver.activeParticlesBuffer != null && solver.simplices != null && forceZonesBuffer != null) - { - gridShader.SetInt("pointCount", solver.simplexCounts.pointCount); - gridShader.SetInt("edgeCount", solver.simplexCounts.edgeCount); - gridShader.SetInt("triangleCount", solver.simplexCounts.triangleCount); - gridShader.SetFloat("deltaTime", deltaTime); - - gridShader.SetBuffer(applyForceZonesKernel, "contacts", solver.abstraction.colliderContacts.computeBuffer); - gridShader.SetBuffer(applyForceZonesKernel, "dispatchBuffer", dispatchBuffer); - - gridShader.SetBuffer(applyForceZonesKernel, "simplices", solver.simplices); - gridShader.SetBuffer(applyForceZonesKernel, "positions", solver.positionsBuffer); - gridShader.SetBuffer(applyForceZonesKernel, "velocities", solver.velocitiesBuffer); - gridShader.SetBuffer(applyForceZonesKernel, "colors", solver.colorsBuffer); - gridShader.SetBuffer(applyForceZonesKernel, "invMasses", solver.invMassesBuffer); - - gridShader.SetBuffer(applyForceZonesKernel, "transforms", transformsBuffer); - gridShader.SetBuffer(applyForceZonesKernel, "shapes", shapesBuffer); - gridShader.SetBuffer(applyForceZonesKernel, "forceZones", forceZonesBuffer); - gridShader.SetBuffer(applyForceZonesKernel, "deltasAsInt", solver.positionDeltasIntBuffer); - gridShader.SetBuffer(applyForceZonesKernel, "orientationDeltasAsInt", solver.orientationDeltasIntBuffer); - gridShader.SetBuffer(applyForceZonesKernel, "worldToSolver", solver.worldToSolverBuffer); - - gridShader.DispatchIndirect(applyForceZonesKernel, dispatchBuffer); - - int threadGroups = ComputeMath.ThreadGroupCount(solver.activeParticleCount, 128); - gridShader.SetInt("particleCount", solver.activeParticleCount); - - gridShader.SetBuffer(writeForceZoneResultsKernel, "activeParticles", solver.activeParticlesBuffer); - gridShader.SetBuffer(writeForceZoneResultsKernel, "externalForces", solver.externalForcesBuffer); - gridShader.SetBuffer(writeForceZoneResultsKernel, "life", solver.lifeBuffer); - gridShader.SetBuffer(writeForceZoneResultsKernel, "wind", solver.windBuffer); - gridShader.SetBuffer(writeForceZoneResultsKernel, "deltasAsInt", solver.positionDeltasIntBuffer); - gridShader.SetBuffer(writeForceZoneResultsKernel, "orientationDeltasAsInt", solver.orientationDeltasIntBuffer); - - gridShader.Dispatch(writeForceZoneResultsKernel, threadGroups, 1, 1); - } - } - } - - public void GenerateContacts(ComputeSolverImpl solver, float deltaTime) - { - if (colliderCount > 0) - { - int particleThreadGroups = ComputeMath.ThreadGroupCount(solver.simplexCounts.simplexCount, 128); - - colliderTypeCounts.SetData(colliderCountClear); - dispatchBuffer.SetData(dispatchClear); - - if (solver.activeParticlesBuffer != null && solver.simplices != null) - { - solver.abstraction.colliderContacts.computeBuffer.SetCounterValue(0); - - gridShader.SetInt("pointCount", solver.simplexCounts.pointCount); - gridShader.SetInt("edgeCount", solver.simplexCounts.edgeCount); - gridShader.SetInt("triangleCount", solver.simplexCounts.triangleCount); - - gridShader.SetFloat("colliderCCD", solver.abstraction.parameters.colliderCCD); - gridShader.SetInt("surfaceCollisionIterations", solver.abstraction.parameters.surfaceCollisionIterations); - gridShader.SetFloat("surfaceCollisionTolerance", solver.abstraction.parameters.surfaceCollisionTolerance); - gridShader.SetInt("mode", (int)solver.abstraction.parameters.mode); - gridShader.SetFloat("deltaTime", deltaTime); - - gridShader.SetBuffer(contactsKernel, "simplices", solver.simplices); - gridShader.SetBuffer(contactsKernel, "simplexBounds", solver.simplexBounds); - gridShader.SetBuffer(contactsKernel, "positions", solver.positionsBuffer); - gridShader.SetBuffer(contactsKernel, "orientations", solver.orientationsBuffer); - gridShader.SetBuffer(contactsKernel, "principalRadii", solver.principalRadiiBuffer); - gridShader.SetBuffer(contactsKernel, "filters", solver.filtersBuffer); - gridShader.SetBuffer(contactsKernel, "sortedColliderIndices", sortedColliderIndicesBuffer); - gridShader.SetBuffer(contactsKernel, "aabbs", aabbsBuffer); - gridShader.SetBuffer(contactsKernel, "transforms", transformsBuffer); - gridShader.SetBuffer(contactsKernel, "shapes", shapesBuffer); - gridShader.SetBuffer(contactsKernel, "rigidbodies", rigidbodiesBuffer); - gridShader.SetBuffer(contactsKernel, "collisionMaterials", materialsBuffer); - gridShader.SetBuffer(contactsKernel, "collisionMaterialIndices", solver.collisionMaterialIndexBuffer); - gridShader.SetBuffer(contactsKernel, "cellIndices", cellIndicesBuffer); - gridShader.SetBuffer(contactsKernel, "cellOffsets", cellOffsetsBuffer); - gridShader.SetBuffer(contactsKernel, "cellCounts", cellCountsBuffer); - gridShader.SetBuffer(contactsKernel, "levelPopulation", levelPopulation); - - gridShader.SetBuffer(contactsKernel, "solverToWorld", solver.solverToWorldBuffer); - gridShader.SetBuffer(contactsKernel, "colliderTypeCounts", colliderTypeCounts); - gridShader.SetBuffer(contactsKernel, "unsortedContactPairs", unsortedContactPairs); - gridShader.SetBuffer(contactsKernel, "dispatchBuffer", dispatchBuffer); - - gridShader.Dispatch(contactsKernel, particleThreadGroups, 1, 1); - - gridShader.SetBuffer(prefixSumPairsKernel, "colliderTypeCounts", colliderTypeCounts); - gridShader.SetBuffer(prefixSumPairsKernel, "contactOffsetsPerType", contactOffsetsPerType); - gridShader.SetBuffer(prefixSumPairsKernel, "dispatchBuffer", dispatchBuffer); - - gridShader.Dispatch(prefixSumPairsKernel, 1, 1, 1); - - gridShader.SetBuffer(sortPairsKernel, "shapes", shapesBuffer); - gridShader.SetBuffer(sortPairsKernel, "unsortedContactPairs", unsortedContactPairs); - gridShader.SetBuffer(sortPairsKernel, "contactPairs", contactPairs); - gridShader.SetBuffer(sortPairsKernel, "colliderTypeCounts", colliderTypeCounts); - gridShader.SetBuffer(sortPairsKernel, "contactOffsetsPerType", contactOffsetsPerType); - gridShader.SetBuffer(sortPairsKernel, "dispatchBuffer", dispatchBuffer); - - gridShader.DispatchIndirect(sortPairsKernel, dispatchBuffer, 16); - - boxes.GenerateContacts(solver, this); - spheres.GenerateContacts(solver, this); - capsules.GenerateContacts(solver, this); - triangleMeshes.GenerateContacts(solver, this, deltaTime); - edgeMeshes.GenerateContacts(solver, this, deltaTime); - distanceFields.GenerateContacts(solver, this, deltaTime); - heightFields.GenerateContacts(solver, this, deltaTime); - } - } - } - - } -} diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeColliderWorld.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeColliderWorld.cs.meta deleted file mode 100644 index 54b57c22d..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeColliderWorld.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ce0ddc77554954cd78643d83b0505396 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeDistanceField.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeDistanceField.cs deleted file mode 100644 index 2c6214afa..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeDistanceField.cs +++ /dev/null @@ -1,50 +0,0 @@ -using UnityEngine; - -namespace Obi -{ - public class ComputeDistanceField - { - private ComputeShader shader; - private int kernel; - - public ComputeDistanceField() - { - shader = GameObject.Instantiate(Resources.Load("Compute/DistanceFieldShape")); - kernel = shader.FindKernel("GenerateContacts"); - } - - public void GenerateContacts(ComputeSolverImpl solver, ComputeColliderWorld world, float deltaTime) - { - if (world.distanceFieldHeaders != null) - { - shader.SetInt("maxContacts", ComputeColliderWorld.maxContacts); - shader.SetInt("pointCount", solver.simplexCounts.pointCount); - shader.SetInt("edgeCount", solver.simplexCounts.edgeCount); - shader.SetInt("triangleCount", solver.simplexCounts.triangleCount); - shader.SetInt("surfaceCollisionIterations", solver.abstraction.parameters.surfaceCollisionIterations); - shader.SetFloat("surfaceCollisionTolerance", solver.abstraction.parameters.surfaceCollisionTolerance); - shader.SetFloat("collisionMargin", solver.abstraction.parameters.collisionMargin); - shader.SetFloat("deltaTime", deltaTime); - - shader.SetBuffer(kernel, "worldToSolver", solver.worldToSolverBuffer); - shader.SetBuffer(kernel, "simplices", solver.simplices); - shader.SetBuffer(kernel, "positions", solver.positionsBuffer); - shader.SetBuffer(kernel, "orientations", solver.orientationsBuffer); - shader.SetBuffer(kernel, "velocities", solver.velocitiesBuffer); - shader.SetBuffer(kernel, "principalRadii", solver.principalRadiiBuffer); - shader.SetBuffer(kernel, "transforms", world.transformsBuffer); - shader.SetBuffer(kernel, "shapes", world.shapesBuffer); - shader.SetBuffer(kernel, "contactPairs", world.contactPairs); - shader.SetBuffer(kernel, "contactOffsetsPerType", world.contactOffsetsPerType); - shader.SetBuffer(kernel, "contacts", solver.abstraction.colliderContacts.computeBuffer); - shader.SetBuffer(kernel, "dispatchBuffer", world.dispatchBuffer); - - shader.SetBuffer(kernel, "distanceFieldHeaders", world.distanceFieldHeaders); - shader.SetBuffer(kernel, "dfNodes", world.dfNodes); - - shader.DispatchIndirect(kernel, world.dispatchBuffer, 32 + 16 * (int)Oni.ShapeType.SignedDistanceField); - } - } - - } -} diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeDistanceField.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeDistanceField.cs.meta deleted file mode 100644 index 578a29d2d..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeDistanceField.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e43826d84a91b447c88f6d65a6e329ac -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeEdgeMesh.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeEdgeMesh.cs deleted file mode 100644 index c36045c54..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeEdgeMesh.cs +++ /dev/null @@ -1,53 +0,0 @@ -using UnityEngine; - -namespace Obi -{ - public class ComputeEdgeMesh - { - private ComputeShader shader; - private int kernel; - - public ComputeEdgeMesh() - { - shader = GameObject.Instantiate(Resources.Load("Compute/EdgeMeshShape")); - kernel = shader.FindKernel("GenerateContacts"); - } - - public void GenerateContacts(ComputeSolverImpl solver, ComputeColliderWorld world, float deltaTime) - { - if (world.edgeMeshHeaders != null) - { - shader.SetInt("maxContacts", ComputeColliderWorld.maxContacts); - shader.SetInt("pointCount", solver.simplexCounts.pointCount); - shader.SetInt("edgeCount", solver.simplexCounts.edgeCount); - shader.SetInt("triangleCount", solver.simplexCounts.triangleCount); - shader.SetInt("surfaceCollisionIterations", solver.abstraction.parameters.surfaceCollisionIterations); - shader.SetFloat("surfaceCollisionTolerance", solver.abstraction.parameters.surfaceCollisionTolerance); - shader.SetFloat("collisionMargin", solver.abstraction.parameters.collisionMargin); - shader.SetFloat("deltaTime", deltaTime); - - shader.SetBuffer(kernel, "worldToSolver", solver.worldToSolverBuffer); - shader.SetBuffer(kernel, "simplices", solver.simplices); - shader.SetBuffer(kernel, "simplexBounds", solver.simplexBounds); - shader.SetBuffer(kernel, "positions", solver.positionsBuffer); - shader.SetBuffer(kernel, "orientations", solver.orientationsBuffer); - shader.SetBuffer(kernel, "velocities", solver.velocitiesBuffer); - shader.SetBuffer(kernel, "principalRadii", solver.principalRadiiBuffer); - shader.SetBuffer(kernel, "transforms", world.transformsBuffer); - shader.SetBuffer(kernel, "shapes", world.shapesBuffer); - shader.SetBuffer(kernel, "contactPairs", world.contactPairs); - shader.SetBuffer(kernel, "contactOffsetsPerType", world.contactOffsetsPerType); - shader.SetBuffer(kernel, "contacts", solver.abstraction.colliderContacts.computeBuffer); - shader.SetBuffer(kernel, "dispatchBuffer", world.dispatchBuffer); - - shader.SetBuffer(kernel, "edgeMeshHeaders", world.edgeMeshHeaders); - shader.SetBuffer(kernel, "edgeBihNodes", world.edgeBihNodes); - shader.SetBuffer(kernel, "edges", world.edges); - shader.SetBuffer(kernel, "edgeVertices", world.edgeVertices); - - shader.DispatchIndirect(kernel, world.dispatchBuffer, 32 + 16 * (int)Oni.ShapeType.EdgeMesh); - } - } - - } -} diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeEdgeMesh.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeEdgeMesh.cs.meta deleted file mode 100644 index a2552e67d..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeEdgeMesh.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6191dad6170694a7c8f9eca0cd733e7a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeHeightField.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeHeightField.cs deleted file mode 100644 index 2e8cd1442..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeHeightField.cs +++ /dev/null @@ -1,51 +0,0 @@ -using UnityEngine; - -namespace Obi -{ - public class ComputeHeightField - { - private ComputeShader shader; - private int kernel; - - public ComputeHeightField() - { - shader = GameObject.Instantiate(Resources.Load("Compute/HeightfieldShape")); - kernel = shader.FindKernel("GenerateContacts"); - } - - public void GenerateContacts(ComputeSolverImpl solver, ComputeColliderWorld world, float deltaTime) - { - if (world.heightFieldHeaders != null) - { - shader.SetInt("maxContacts", ComputeColliderWorld.maxContacts); - shader.SetInt("pointCount", solver.simplexCounts.pointCount); - shader.SetInt("edgeCount", solver.simplexCounts.edgeCount); - shader.SetInt("triangleCount", solver.simplexCounts.triangleCount); - shader.SetInt("surfaceCollisionIterations", solver.abstraction.parameters.surfaceCollisionIterations); - shader.SetFloat("surfaceCollisionTolerance", solver.abstraction.parameters.surfaceCollisionTolerance); - shader.SetFloat("collisionMargin", solver.abstraction.parameters.collisionMargin); - shader.SetFloat("deltaTime", deltaTime); - - shader.SetBuffer(kernel, "worldToSolver", solver.worldToSolverBuffer); - shader.SetBuffer(kernel, "simplices", solver.simplices); - shader.SetBuffer(kernel, "simplexBounds", solver.simplexBounds); - shader.SetBuffer(kernel, "positions", solver.positionsBuffer); - shader.SetBuffer(kernel, "orientations", solver.orientationsBuffer); - shader.SetBuffer(kernel, "velocities", solver.velocitiesBuffer); - shader.SetBuffer(kernel, "principalRadii", solver.principalRadiiBuffer); - shader.SetBuffer(kernel, "transforms", world.transformsBuffer); - shader.SetBuffer(kernel, "shapes", world.shapesBuffer); - shader.SetBuffer(kernel, "contactPairs", world.contactPairs); - shader.SetBuffer(kernel, "contactOffsetsPerType", world.contactOffsetsPerType); - shader.SetBuffer(kernel, "contacts", solver.abstraction.colliderContacts.computeBuffer); - shader.SetBuffer(kernel, "dispatchBuffer", world.dispatchBuffer); - - shader.SetBuffer(kernel, "heightFieldHeaders", world.heightFieldHeaders); - shader.SetBuffer(kernel, "heightFieldSamples", world.heightFieldSamples); - - shader.DispatchIndirect(kernel, world.dispatchBuffer, 32 + 16 * (int)Oni.ShapeType.Heightmap); - } - } - - } -} diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeHeightField.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeHeightField.cs.meta deleted file mode 100644 index f97c873ae..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeHeightField.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c209374faec0f47adacedb911e8582fd -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeSphere.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeSphere.cs deleted file mode 100644 index aa4a272ae..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeSphere.cs +++ /dev/null @@ -1,42 +0,0 @@ -using UnityEngine; - -namespace Obi -{ - public class ComputeSphere - { - private ComputeShader shader; - private int kernel; - - public ComputeSphere() - { - shader = GameObject.Instantiate(Resources.Load("Compute/SphereShape")); - kernel = shader.FindKernel("GenerateContacts"); - } - - public void GenerateContacts(ComputeSolverImpl solver, ComputeColliderWorld world) - { - shader.SetInt("maxContacts", ComputeColliderWorld.maxContacts); - shader.SetInt("pointCount", solver.simplexCounts.pointCount); - shader.SetInt("edgeCount", solver.simplexCounts.edgeCount); - shader.SetInt("triangleCount", solver.simplexCounts.triangleCount); - shader.SetInt("surfaceCollisionIterations", solver.abstraction.parameters.surfaceCollisionIterations); - shader.SetFloat("surfaceCollisionTolerance", solver.abstraction.parameters.surfaceCollisionTolerance); - shader.SetFloat("collisionMargin", solver.abstraction.parameters.collisionMargin); - - shader.SetBuffer(kernel, "worldToSolver", solver.worldToSolverBuffer); - shader.SetBuffer(kernel, "simplices", solver.simplices); - shader.SetBuffer(kernel, "positions", solver.positionsBuffer); - shader.SetBuffer(kernel, "orientations", solver.orientationsBuffer); - shader.SetBuffer(kernel, "velocities", solver.velocitiesBuffer); - shader.SetBuffer(kernel, "principalRadii", solver.principalRadiiBuffer); - shader.SetBuffer(kernel, "transforms", world.transformsBuffer); - shader.SetBuffer(kernel, "shapes", world.shapesBuffer); - shader.SetBuffer(kernel, "contactPairs", world.contactPairs); - shader.SetBuffer(kernel, "contactOffsetsPerType", world.contactOffsetsPerType); - shader.SetBuffer(kernel, "contacts", solver.abstraction.colliderContacts.computeBuffer); - shader.SetBuffer(kernel, "dispatchBuffer", world.dispatchBuffer); - shader.DispatchIndirect(kernel, world.dispatchBuffer, 32 + 16 * (int)Oni.ShapeType.Sphere); - } - - } -} diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeSphere.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeSphere.cs.meta deleted file mode 100644 index 3a907d4a4..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeSphere.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8994093c1331f405b92c10a6401791d3 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeTriangleMesh.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeTriangleMesh.cs deleted file mode 100644 index 5dd29a772..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeTriangleMesh.cs +++ /dev/null @@ -1,53 +0,0 @@ -using UnityEngine; - -namespace Obi -{ - public class ComputeTriangleMesh - { - private ComputeShader shader; - private int kernel; - - public ComputeTriangleMesh() - { - shader = GameObject.Instantiate(Resources.Load("Compute/TriangleMeshShape")); - kernel = shader.FindKernel("GenerateContacts"); - } - - public void GenerateContacts(ComputeSolverImpl solver, ComputeColliderWorld world, float deltaTime) - { - if (world.triangleMeshHeaders != null) - { - shader.SetInt("maxContacts", ComputeColliderWorld.maxContacts); - shader.SetInt("pointCount", solver.simplexCounts.pointCount); - shader.SetInt("edgeCount", solver.simplexCounts.edgeCount); - shader.SetInt("triangleCount", solver.simplexCounts.triangleCount); - shader.SetInt("surfaceCollisionIterations", solver.abstraction.parameters.surfaceCollisionIterations); - shader.SetFloat("surfaceCollisionTolerance", solver.abstraction.parameters.surfaceCollisionTolerance); - shader.SetFloat("collisionMargin", solver.abstraction.parameters.collisionMargin); - shader.SetFloat("deltaTime", deltaTime); - - shader.SetBuffer(kernel, "worldToSolver", solver.worldToSolverBuffer); - shader.SetBuffer(kernel, "simplices", solver.simplices); - shader.SetBuffer(kernel, "simplexBounds", solver.simplexBounds); - shader.SetBuffer(kernel, "positions", solver.positionsBuffer); - shader.SetBuffer(kernel, "orientations", solver.orientationsBuffer); - shader.SetBuffer(kernel, "velocities", solver.velocitiesBuffer); - shader.SetBuffer(kernel, "principalRadii", solver.principalRadiiBuffer); - shader.SetBuffer(kernel, "transforms", world.transformsBuffer); - shader.SetBuffer(kernel, "shapes", world.shapesBuffer); - shader.SetBuffer(kernel, "contactPairs", world.contactPairs); - shader.SetBuffer(kernel, "contactOffsetsPerType", world.contactOffsetsPerType); - shader.SetBuffer(kernel, "contacts", solver.abstraction.colliderContacts.computeBuffer); - shader.SetBuffer(kernel, "dispatchBuffer", world.dispatchBuffer); - - shader.SetBuffer(kernel, "triangleMeshHeaders", world.triangleMeshHeaders); - shader.SetBuffer(kernel, "bihNodes", world.bihNodes); - shader.SetBuffer(kernel, "triangles", world.triangles); - shader.SetBuffer(kernel, "vertices", world.vertices); - - shader.DispatchIndirect(kernel, world.dispatchBuffer, 32 + 16 * (int)Oni.ShapeType.TriangleMesh); - } - } - - } -} diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeTriangleMesh.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeTriangleMesh.cs.meta deleted file mode 100644 index 5de323c83..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/ComputeTriangleMesh.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f52cda7e406964ef4bf980e6ff1f91ec -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/SpatialQueries.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/SpatialQueries.cs deleted file mode 100644 index 2f93cc574..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/SpatialQueries.cs +++ /dev/null @@ -1,245 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine; - -namespace Obi -{ - - public class SpatialQueries - { - private ComputePrefixSum prefixSum; - - private ComputeShader gridShader; - private int buildKernel; - private int gridPopulationKernel; - private int sortKernel; - private int contactsKernel; - private int clearKernel; - private int prefixSumPairsKernel; - private int sortPairsKernel; - - public GraphicsBuffer sortedShapeIndicesBuffer; - - public GraphicsBuffer cellIndicesBuffer; //for each collider, the IDs of the 8 cells it covers. - public GraphicsBuffer cellOffsetsBuffer; //for each cell, start offset in the sorted span indices buffer. - - public GraphicsBuffer cellCountsBuffer; // for each cell, how many colliders in it. - public GraphicsBuffer offsetInCells; // for each collider, its offset in each of the 8 cells. - public GraphicsBuffer levelPopulation; // buffer storing the lowest and highest populated level. - - private GraphicsBuffer queryTypeCounts; // amount of contacts against each collider type. - public GraphicsBuffer unsortedContactPairs; // unsorted contact pairs. - public GraphicsBuffer contactPairs; // list of contact pairs. - public GraphicsBuffer contactOffsetsPerType; // offset in the contact pairs array for each collider type. - - public GraphicsBuffer dispatchBuffer; // dispatch info for iterating trough contacts. - - private const int maxCells = 512 * 512; - private const int cellsPerShape = 8; - private const int maxGridLevels = 24; - private uint[] queryCountClear = new uint[Oni.QueryTypeCount]; - private uint[] dispatchClear = { 0, 1, 1, 0, // contacts - 0, 1, 1, 0, // pairs - 0, 1, 1, 0, // spheres - 0, 1, 1, 0, // boxes - 0, 1, 1, 0 // rays - }; - - private ComputeSphereQuery spheres; - private ComputeBoxQuery boxes; - private ComputeRayQuery rays; - - public SpatialQueries(uint capacity) - { - gridShader = Resources.Load("Compute/SpatialQueries"); - buildKernel = gridShader.FindKernel("BuildUnsortedList"); - gridPopulationKernel = gridShader.FindKernel("FindPopulatedLevels"); - sortKernel = gridShader.FindKernel("SortList"); - contactsKernel = gridShader.FindKernel("BuildContactList"); - clearKernel = gridShader.FindKernel("Clear"); - prefixSumPairsKernel = gridShader.FindKernel("PrefixSumColliderCounts"); - sortPairsKernel = gridShader.FindKernel("SortContactPairs"); - - gridShader.SetInt("shapeTypeCount", Oni.QueryTypeCount); - gridShader.SetInt("cellsPerShape", cellsPerShape); - gridShader.SetInt("maxCells", (int)maxCells); - - cellOffsetsBuffer = new GraphicsBuffer(GraphicsBuffer.Target.Structured, maxCells, 4); - cellCountsBuffer = new GraphicsBuffer(GraphicsBuffer.Target.Structured, maxCells, 4); - levelPopulation = new GraphicsBuffer(GraphicsBuffer.Target.Structured, maxGridLevels + 1, 4); - dispatchBuffer = new GraphicsBuffer(GraphicsBuffer.Target.IndirectArguments, dispatchClear.Length, sizeof(uint)); - - queryTypeCounts = new GraphicsBuffer(GraphicsBuffer.Target.Structured, Oni.QueryTypeCount, 4); - contactOffsetsPerType = new GraphicsBuffer(GraphicsBuffer.Target.Structured, Oni.QueryTypeCount + 1, 4); - - prefixSum = new ComputePrefixSum(maxCells); - spheres = new ComputeSphereQuery(); - boxes = new ComputeBoxQuery(); - rays = new ComputeRayQuery(); - - SetCapacity(capacity); - } - - public void Dispose() - { - prefixSum?.Dispose(); - - cellOffsetsBuffer?.Dispose(); - cellCountsBuffer?.Dispose(); - levelPopulation?.Dispose(); - dispatchBuffer?.Dispose(); - - queryTypeCounts?.Dispose(); - contactOffsetsPerType?.Dispose(); - - DisposeOfResultsData(); - DisposeOfQueryData(); - } - - private void DisposeOfResultsData() - { - contactPairs?.Dispose(); - unsortedContactPairs?.Dispose(); - } - - private void DisposeOfQueryData() - { - cellIndicesBuffer?.Dispose(); - offsetInCells?.Dispose(); - sortedShapeIndicesBuffer?.Dispose(); - } - - private void SetCapacity(uint capacity) - { - DisposeOfResultsData(); - - gridShader.SetInt("maxResults", (int)capacity); - - if (capacity > 0) - { - unsortedContactPairs = new GraphicsBuffer(GraphicsBuffer.Target.Structured, (int)capacity, 8); - contactPairs = new GraphicsBuffer(GraphicsBuffer.Target.Structured, (int)capacity, 8); - } - } - - public void SpatialQuery(ComputeSolverImpl solver, - GraphicsBuffer shapes, - GraphicsBuffer transforms, - GraphicsBuffer results) - { - results.SetCounterValue(0); - - if (solver.activeParticlesBuffer == null || solver.simplices == null) - return; - - // If the maximum amount of query results has changed, set capacity: - if (contactPairs == null || !contactPairs.IsValid() || contactPairs.count != solver.abstraction.maxQueryResults) - SetCapacity(solver.abstraction.maxQueryResults); - - // In case we still have zero capacity, just bail out. - if (contactPairs == null || !contactPairs.IsValid()) - return; - - // Check whether we need to reallocate space for queries: - if (cellIndicesBuffer == null || !cellIndicesBuffer.IsValid() || shapes.count * cellsPerShape >= cellIndicesBuffer.count) - { - DisposeOfQueryData(); - - cellIndicesBuffer = new GraphicsBuffer(GraphicsBuffer.Target.Structured, shapes.count * cellsPerShape * 2, 4); - offsetInCells = new GraphicsBuffer(GraphicsBuffer.Target.Structured, shapes.count * cellsPerShape * 2, 4); - sortedShapeIndicesBuffer = new GraphicsBuffer(GraphicsBuffer.Target.Structured, shapes.count * cellsPerShape * 2, 4); - } - - gridShader.SetInt("queryCount", shapes.count); - - int particleThreadGroups = ComputeMath.ThreadGroupCount(solver.simplexCounts.simplexCount, 128); - int shapeThreadGroups = ComputeMath.ThreadGroupCount(shapes.count, 128); - int capacityThreadGroups = ComputeMath.ThreadGroupCount(shapes.count * 8, 128); - int cellThreadGroups = ComputeMath.ThreadGroupCount(maxCells, 128); - - queryTypeCounts.SetData(queryCountClear); - dispatchBuffer.SetData(dispatchClear); - - // clear grid: - gridShader.SetBuffer(clearKernel, "cellOffsets", cellOffsetsBuffer); - gridShader.SetBuffer(clearKernel, "cellIndices", cellIndicesBuffer); - gridShader.SetBuffer(clearKernel, "cellCounts", cellCountsBuffer); - gridShader.SetBuffer(clearKernel, "levelPopulation", levelPopulation); - gridShader.Dispatch(clearKernel, Mathf.Max(cellThreadGroups, capacityThreadGroups), 1, 1); - - // build cell list: - gridShader.SetBuffer(buildKernel, "shapes", shapes); - gridShader.SetBuffer(buildKernel, "transforms", transforms); - gridShader.SetBuffer(buildKernel, "cellIndices", cellIndicesBuffer); - gridShader.SetBuffer(buildKernel, "cellCounts", cellCountsBuffer); - gridShader.SetBuffer(buildKernel, "offsetInCells", offsetInCells); - gridShader.SetBuffer(buildKernel, "levelPopulation", levelPopulation); - gridShader.SetBuffer(buildKernel, "worldToSolver", solver.worldToSolverBuffer); - gridShader.Dispatch(buildKernel, shapeThreadGroups, 1, 1); - - // find populated grid levels: - gridShader.SetBuffer(gridPopulationKernel, "levelPopulation", levelPopulation); - gridShader.Dispatch(gridPopulationKernel, 1, 1, 1); - - // prefix sum: - prefixSum.Sum(cellCountsBuffer, cellOffsetsBuffer); - - // sort query indices: - gridShader.SetBuffer(sortKernel, "sortedColliderIndices", sortedShapeIndicesBuffer); - gridShader.SetBuffer(sortKernel, "offsetInCells", offsetInCells); - gridShader.SetBuffer(sortKernel, "cellIndices", cellIndicesBuffer); - gridShader.SetBuffer(sortKernel, "cellOffsets", cellOffsetsBuffer); - gridShader.Dispatch(sortKernel, capacityThreadGroups, 1, 1); - - - gridShader.SetInt("pointCount", solver.simplexCounts.pointCount); - gridShader.SetInt("edgeCount", solver.simplexCounts.edgeCount); - gridShader.SetInt("triangleCount", solver.simplexCounts.triangleCount); - gridShader.SetInt("surfaceCollisionIterations", solver.abstraction.parameters.surfaceCollisionIterations); - gridShader.SetFloat("surfaceCollisionTolerance", solver.abstraction.parameters.surfaceCollisionTolerance); - gridShader.SetInt("mode", (int)solver.abstraction.parameters.mode); - - gridShader.SetBuffer(contactsKernel, "simplices", solver.simplices); - gridShader.SetBuffer(contactsKernel, "simplexBounds", solver.simplexBounds); - gridShader.SetBuffer(contactsKernel, "positions", solver.positionsBuffer); - gridShader.SetBuffer(contactsKernel, "orientations", solver.orientationsBuffer); - gridShader.SetBuffer(contactsKernel, "principalRadii", solver.principalRadiiBuffer); - gridShader.SetBuffer(contactsKernel, "filters", solver.filtersBuffer); - gridShader.SetBuffer(contactsKernel, "sortedColliderIndices", sortedShapeIndicesBuffer); - gridShader.SetBuffer(contactsKernel, "transforms", transforms); - gridShader.SetBuffer(contactsKernel, "shapes", shapes); - gridShader.SetBuffer(contactsKernel, "collisionMaterialIndices", solver.collisionMaterialIndexBuffer); - gridShader.SetBuffer(contactsKernel, "cellIndices", cellIndicesBuffer); - gridShader.SetBuffer(contactsKernel, "cellOffsets", cellOffsetsBuffer); - gridShader.SetBuffer(contactsKernel, "cellCounts", cellCountsBuffer); - gridShader.SetBuffer(contactsKernel, "levelPopulation", levelPopulation); - - gridShader.SetBuffer(contactsKernel, "solverToWorld", solver.solverToWorldBuffer); - gridShader.SetBuffer(contactsKernel, "worldToSolver", solver.worldToSolverBuffer); - gridShader.SetBuffer(contactsKernel, "colliderTypeCounts", queryTypeCounts); - gridShader.SetBuffer(contactsKernel, "unsortedContactPairs", unsortedContactPairs); - gridShader.SetBuffer(contactsKernel, "dispatchBuffer", dispatchBuffer); - - gridShader.Dispatch(contactsKernel, particleThreadGroups, 1, 1); - - gridShader.SetBuffer(prefixSumPairsKernel, "colliderTypeCounts", queryTypeCounts); - gridShader.SetBuffer(prefixSumPairsKernel, "contactOffsetsPerType", contactOffsetsPerType); - gridShader.SetBuffer(prefixSumPairsKernel, "dispatchBuffer", dispatchBuffer); - - gridShader.Dispatch(prefixSumPairsKernel, 1, 1, 1); - - gridShader.SetBuffer(sortPairsKernel, "shapes", shapes); - gridShader.SetBuffer(sortPairsKernel, "unsortedContactPairs", unsortedContactPairs); - gridShader.SetBuffer(sortPairsKernel, "contactPairs", contactPairs); - gridShader.SetBuffer(sortPairsKernel, "colliderTypeCounts", queryTypeCounts); - gridShader.SetBuffer(sortPairsKernel, "contactOffsetsPerType", contactOffsetsPerType); - gridShader.SetBuffer(sortPairsKernel, "dispatchBuffer", dispatchBuffer); - - gridShader.DispatchIndirect(sortPairsKernel, dispatchBuffer, 16); - - boxes.GetResults(solver, this, transforms, shapes, results); - spheres.GetResults(solver, this, transforms, shapes, results); - rays.GetResults(solver, this, transforms, shapes, results); - } - } -} diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/SpatialQueries.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/SpatialQueries.cs.meta deleted file mode 100644 index 6edfb4372..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Collisions/SpatialQueries.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 01c4905e2f6964e7b91a3262bbd54229 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/ComputeBackend.cs b/Assets/Obi/Scripts/Common/Backends/Compute/ComputeBackend.cs deleted file mode 100644 index 4ca52c2c5..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/ComputeBackend.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace Obi -{ - public class ComputeBackend : IObiBackend - { - #region Solver - public ISolverImpl CreateSolver(ObiSolver solver, int capacity) - { - return new ComputeSolverImpl(solver); - } - public void DestroySolver(ISolverImpl solver) - { - if (solver != null) - solver.Destroy(); - } - #endregion - } -} diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/ComputeBackend.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/ComputeBackend.cs.meta deleted file mode 100644 index af17c5d58..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/ComputeBackend.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8c68d8c4a741f459ea53d69f8eddbfef -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/ComputeJobHandle.cs b/Assets/Obi/Scripts/Common/Backends/Compute/ComputeJobHandle.cs deleted file mode 100644 index e60292901..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/ComputeJobHandle.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; - -namespace Obi -{ - public class ComputeJobHandle : IObiJobHandle - { - public void Complete() - { - } - - public void Release() - { - } - } -} \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/ComputeJobHandle.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/ComputeJobHandle.cs.meta deleted file mode 100644 index 0b145fa5d..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/ComputeJobHandle.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4dc5d7005f3f2458bbdc5c1756153cac -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/ComputeMath.cs b/Assets/Obi/Scripts/Common/Backends/Compute/ComputeMath.cs deleted file mode 100644 index 7ec820cbd..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/ComputeMath.cs +++ /dev/null @@ -1,16 +0,0 @@ - -namespace Obi -{ - public static class ComputeMath - { - public static int ThreadGroupCount(int elements, int numThreads) - { - return elements / numThreads + 1; - } - - public static int NextMultiple(int baseNumber, int number) - { - return ((baseNumber / number) + 1) * number; - } - } -} diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/ComputeMath.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/ComputeMath.cs.meta deleted file mode 100644 index 62890efdd..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/ComputeMath.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d0df3a211b1614ebbb0f5144e868546e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Aerodynamics/ComputeAerodynamicConstraints.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Aerodynamics/ComputeAerodynamicConstraints.cs deleted file mode 100644 index 9d3c6b7e8..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Aerodynamics/ComputeAerodynamicConstraints.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using UnityEngine; - -namespace Obi -{ - public class ComputeAerodynamicConstraints : ComputeConstraintsImpl - { - public ComputeShader constraintsShader; - public int projectKernel; - - public ComputeAerodynamicConstraints(ComputeSolverImpl solver) : base(solver, Oni.ConstraintType.Aerodynamics) - { - constraintsShader = GameObject.Instantiate(Resources.Load("Compute/AerodynamicConstraints")); - projectKernel = constraintsShader.FindKernel("Project"); - } - - public override IConstraintsBatchImpl CreateConstraintsBatch() - { - var dataBatch = new ComputeAerodynamicConstraintsBatch(this); - batches.Add(dataBatch); - return dataBatch; - } - - public override void RemoveBatch(IConstraintsBatchImpl batch) - { - batches.Remove(batch as ComputeAerodynamicConstraintsBatch); - batch.Destroy(); - } - } -} diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Aerodynamics/ComputeAerodynamicConstraints.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Aerodynamics/ComputeAerodynamicConstraints.cs.meta deleted file mode 100644 index ec3d6752e..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Aerodynamics/ComputeAerodynamicConstraints.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b5bb44136361b4a2d948bf85825e53b9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Aerodynamics/ComputeAerodynamicConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Aerodynamics/ComputeAerodynamicConstraintsBatch.cs deleted file mode 100644 index a5f725462..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Aerodynamics/ComputeAerodynamicConstraintsBatch.cs +++ /dev/null @@ -1,52 +0,0 @@ -using UnityEngine; - -namespace Obi -{ - public class ComputeAerodynamicConstraintsBatch : ComputeConstraintsBatchImpl, IAerodynamicConstraintsBatchImpl - { - GraphicsBuffer aerodynamicCoeffs; - - public ComputeAerodynamicConstraintsBatch(ComputeAerodynamicConstraints constraints) - { - m_Constraints = constraints; - m_ConstraintType = Oni.ConstraintType.Aerodynamics; - } - - public void SetAerodynamicConstraints(ObiNativeIntList particleIndices, ObiNativeFloatList aerodynamicCoeffs, int count) - { - this.particleIndices = particleIndices.AsComputeBuffer(); - this.aerodynamicCoeffs = aerodynamicCoeffs.AsComputeBuffer(); - - m_ConstraintCount = count; - } - - public override void Evaluate(float stepTime, float substepTime, int steps, float timeLeft) - { - if (m_ConstraintCount > 0) - { - var shader = ((ComputeAerodynamicConstraints)m_Constraints).constraintsShader; - int projectKernel = ((ComputeAerodynamicConstraints)m_Constraints).projectKernel; - - shader.SetBuffer(projectKernel, "particleIndices", particleIndices); - shader.SetBuffer(projectKernel, "aerodynamicCoeffs", aerodynamicCoeffs); - - shader.SetBuffer(projectKernel, "positions", solverImplementation.positionsBuffer); - shader.SetBuffer(projectKernel, "normals", solverImplementation.normalsBuffer); - shader.SetBuffer(projectKernel, "wind", solverImplementation.windBuffer); - shader.SetBuffer(projectKernel, "invMasses", solverImplementation.invMassesBuffer); - shader.SetBuffer(projectKernel, "velocities", solverImplementation.velocitiesBuffer); - - shader.SetInt("activeConstraintCount", m_ConstraintCount); - shader.SetFloat("deltaTime", substepTime); - - int threadGroups = ComputeMath.ThreadGroupCount(m_ConstraintCount, 128); - shader.Dispatch(projectKernel, threadGroups, 1, 1); - } - } - - public override void Apply(float substepTime) - { - } - - } -} \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Aerodynamics/ComputeAerodynamicConstraintsBatch.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Aerodynamics/ComputeAerodynamicConstraintsBatch.cs.meta deleted file mode 100644 index d19b18bc4..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Aerodynamics/ComputeAerodynamicConstraintsBatch.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 84f8c85144ba84d59bdf603d907ae5fb -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Bend/ComputeBendConstraints.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Bend/ComputeBendConstraints.cs deleted file mode 100644 index 29de0b6fc..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Bend/ComputeBendConstraints.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using UnityEngine; - -namespace Obi -{ - public class ComputeBendConstraints : ComputeConstraintsImpl - { - public ComputeShader constraintsShader; - public int projectKernel; - public int applyKernel; - - public ComputeBendConstraints(ComputeSolverImpl solver) : base(solver, Oni.ConstraintType.Bending) - { - constraintsShader = GameObject.Instantiate(Resources.Load("Compute/BendConstraints")); - projectKernel = constraintsShader.FindKernel("Project"); - applyKernel = constraintsShader.FindKernel("Apply"); - } - - public override IConstraintsBatchImpl CreateConstraintsBatch() - { - var dataBatch = new ComputeBendConstraintsBatch(this); - batches.Add(dataBatch); - return dataBatch; - } - - public override void RemoveBatch(IConstraintsBatchImpl batch) - { - batches.Remove(batch as ComputeBendConstraintsBatch); - batch.Destroy(); - } - } -} diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Bend/ComputeBendConstraints.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Bend/ComputeBendConstraints.cs.meta deleted file mode 100644 index cca007683..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Bend/ComputeBendConstraints.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ac9c52f073f794c47a6cbb7b41cf023c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Bend/ComputeBendConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Bend/ComputeBendConstraintsBatch.cs deleted file mode 100644 index 7c0f7da7b..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Bend/ComputeBendConstraintsBatch.cs +++ /dev/null @@ -1,75 +0,0 @@ -using UnityEngine; - -namespace Obi -{ - public class ComputeBendConstraintsBatch : ComputeConstraintsBatchImpl, IBendConstraintsBatchImpl - { - GraphicsBuffer restBends; - GraphicsBuffer stiffnesses; - - public ComputeBendConstraintsBatch(ComputeBendConstraints constraints) - { - m_Constraints = constraints; - m_ConstraintType = Oni.ConstraintType.Bending; - } - - public void SetBendConstraints(ObiNativeIntList particleIndices, ObiNativeFloatList restBends, ObiNativeVector2List bendingStiffnesses, ObiNativeVector2List plasticity, ObiNativeFloatList lambdas, int count) - { - this.particleIndices = particleIndices.AsComputeBuffer(); - this.restBends = restBends.AsComputeBuffer(); - this.stiffnesses = bendingStiffnesses.AsComputeBuffer(); - this.lambdas = lambdas.AsComputeBuffer(); - this.lambdasList = lambdas; - - m_ConstraintCount = count; - } - - public override void Evaluate(float stepTime, float substepTime, int steps, float timeLeft) - { - if (m_ConstraintCount > 0) - { - var shader = ((ComputeBendConstraints)m_Constraints).constraintsShader; - int projectKernel = ((ComputeBendConstraints)m_Constraints).projectKernel; - - shader.SetBuffer(projectKernel, "particleIndices", particleIndices); - shader.SetBuffer(projectKernel, "restBends", restBends); - shader.SetBuffer(projectKernel, "stiffnesses", stiffnesses); - shader.SetBuffer(projectKernel, "lambdas", lambdas); - - shader.SetBuffer(projectKernel, "positions", solverImplementation.positionsBuffer); - shader.SetBuffer(projectKernel, "invMasses", solverImplementation.invMassesBuffer); - shader.SetBuffer(projectKernel, "deltasAsInt", solverImplementation.positionDeltasIntBuffer); - shader.SetBuffer(projectKernel, "positionConstraintCounts", solverImplementation.positionConstraintCountBuffer); - - shader.SetInt("activeConstraintCount", m_ConstraintCount); - shader.SetFloat("deltaTime", substepTime); - - int threadGroups = ComputeMath.ThreadGroupCount(m_ConstraintCount, 128); - shader.Dispatch(projectKernel, threadGroups, 1, 1); - } - } - - public override void Apply(float deltaTime) - { - if (m_ConstraintCount > 0) - { - var parameters = solverAbstraction.GetConstraintParameters(m_ConstraintType); - - var shader = ((ComputeBendConstraints)m_Constraints).constraintsShader; - int applyKernel = ((ComputeBendConstraints)m_Constraints).applyKernel; - - shader.SetBuffer(applyKernel, "particleIndices", particleIndices); - shader.SetBuffer(applyKernel, "positions", solverImplementation.positionsBuffer); - shader.SetBuffer(applyKernel, "deltasAsInt", solverImplementation.positionDeltasIntBuffer); - shader.SetBuffer(applyKernel, "positionConstraintCounts", solverImplementation.positionConstraintCountBuffer); - - shader.SetInt("activeConstraintCount", m_ConstraintCount); - shader.SetFloat("sorFactor", parameters.SORFactor); - - int threadGroups = ComputeMath.ThreadGroupCount(m_ConstraintCount, 128); - shader.Dispatch(applyKernel, threadGroups, 1, 1); - } - } - - } -} \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Bend/ComputeBendConstraintsBatch.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Bend/ComputeBendConstraintsBatch.cs.meta deleted file mode 100644 index 3c5bc0d66..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Bend/ComputeBendConstraintsBatch.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 49d201b7a15f44e17b27019b972e9844 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/BendTwist/ComputeBendTwistConstraints.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/BendTwist/ComputeBendTwistConstraints.cs deleted file mode 100644 index 3d51f9465..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/BendTwist/ComputeBendTwistConstraints.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using UnityEngine; - -namespace Obi -{ - public class ComputeBendTwistConstraints : ComputeConstraintsImpl - { - public ComputeShader constraintsShader; - public int projectKernel; - public int applyKernel; - - public ComputeBendTwistConstraints(ComputeSolverImpl solver) : base(solver, Oni.ConstraintType.BendTwist) - { - constraintsShader = GameObject.Instantiate(Resources.Load("Compute/BendTwistConstraints")); - projectKernel = constraintsShader.FindKernel("Project"); - applyKernel = constraintsShader.FindKernel("Apply"); - } - - public override IConstraintsBatchImpl CreateConstraintsBatch() - { - var dataBatch = new ComputeBendTwistConstraintsBatch(this); - batches.Add(dataBatch); - return dataBatch; - } - - public override void RemoveBatch(IConstraintsBatchImpl batch) - { - batches.Remove(batch as ComputeBendTwistConstraintsBatch); - batch.Destroy(); - } - } -} diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/BendTwist/ComputeBendTwistConstraints.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/BendTwist/ComputeBendTwistConstraints.cs.meta deleted file mode 100644 index 1ca860429..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/BendTwist/ComputeBendTwistConstraints.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 442edc2bc0aec4bf181b4332f0c8dd46 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/BendTwist/ComputeBendTwistConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/BendTwist/ComputeBendTwistConstraintsBatch.cs deleted file mode 100644 index 3efed6f5f..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/BendTwist/ComputeBendTwistConstraintsBatch.cs +++ /dev/null @@ -1,81 +0,0 @@ -using UnityEngine; - -namespace Obi -{ - public class ComputeBendTwistConstraintsBatch : ComputeConstraintsBatchImpl, IBendTwistConstraintsBatchImpl - { - GraphicsBuffer orientationIndices; - GraphicsBuffer restDarboux; - GraphicsBuffer stiffnesses; - GraphicsBuffer plasticity; - - public ComputeBendTwistConstraintsBatch(ComputeBendTwistConstraints constraints) - { - m_Constraints = constraints; - m_ConstraintType = Oni.ConstraintType.BendTwist; - } - - public void SetBendTwistConstraints(ObiNativeIntList orientationIndices, ObiNativeQuaternionList restDarboux, ObiNativeVector3List stiffnesses, ObiNativeVector2List plasticity, ObiNativeFloatList lambdas, int count) - { - this.orientationIndices = orientationIndices.AsComputeBuffer(); - this.restDarboux = restDarboux.AsComputeBuffer(); - this.stiffnesses = stiffnesses.AsComputeBuffer(); - this.plasticity = plasticity.AsComputeBuffer(); - this.lambdas = lambdas.AsComputeBuffer(); - this.lambdasList = lambdas; - - m_ConstraintCount = count; - } - - public override void Evaluate(float stepTime, float substepTime, int steps, float timeLeft) - { - if (m_ConstraintCount > 0) - { - var shader = ((ComputeBendTwistConstraints)m_Constraints).constraintsShader; - int projectKernel = ((ComputeBendTwistConstraints)m_Constraints).projectKernel; - - shader.SetBuffer(projectKernel, "orientationIndices", orientationIndices); - shader.SetBuffer(projectKernel, "restDarboux", restDarboux); - shader.SetBuffer(projectKernel, "stiffnesses", stiffnesses); - shader.SetBuffer(projectKernel, "plasticity", plasticity); - shader.SetBuffer(projectKernel, "lambdas", lambdas); - - shader.SetBuffer(projectKernel, "orientations", solverImplementation.orientationsBuffer); - shader.SetBuffer(projectKernel, "invRotationalMasses", solverImplementation.invRotationalMassesBuffer); - - shader.SetBuffer(projectKernel, "orientationDeltasAsInt", solverImplementation.orientationDeltasIntBuffer); - shader.SetBuffer(projectKernel, "orientationConstraintCounts", solverImplementation.orientationConstraintCountBuffer); - - shader.SetInt("activeConstraintCount", m_ConstraintCount); - shader.SetFloat("deltaTime", substepTime); - - int threadGroups = ComputeMath.ThreadGroupCount(m_ConstraintCount, 128); - shader.Dispatch(projectKernel, threadGroups, 1, 1); - } - } - - public override void Apply(float substepTime) - { - if (m_ConstraintCount > 0) - { - var parameters = solverAbstraction.GetConstraintParameters(m_ConstraintType); - - var shader = ((ComputeBendTwistConstraints)m_Constraints).constraintsShader; - int applyKernel = ((ComputeBendTwistConstraints)m_Constraints).applyKernel; - - shader.SetBuffer(applyKernel, "orientationIndices", orientationIndices); - shader.SetBuffer(applyKernel, "orientations", solverImplementation.orientationsBuffer); - - shader.SetBuffer(applyKernel, "orientationDeltasAsInt", solverImplementation.orientationDeltasIntBuffer); - shader.SetBuffer(applyKernel, "orientationConstraintCounts", solverImplementation.orientationConstraintCountBuffer); - - shader.SetInt("activeConstraintCount", m_ConstraintCount); - shader.SetFloat("sorFactor", parameters.SORFactor); - - int threadGroups = ComputeMath.ThreadGroupCount(m_ConstraintCount, 128); - shader.Dispatch(applyKernel, threadGroups, 1, 1); - } - } - - } -} \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/BendTwist/ComputeBendTwistConstraintsBatch.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/BendTwist/ComputeBendTwistConstraintsBatch.cs.meta deleted file mode 100644 index 10707e48a..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/BendTwist/ComputeBendTwistConstraintsBatch.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f5806beebf896460d87156df3e045b57 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Chain/ComputeChainConstraints.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Chain/ComputeChainConstraints.cs deleted file mode 100644 index 354112192..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Chain/ComputeChainConstraints.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using UnityEngine; - -namespace Obi -{ - public class ComputeChainConstraints : ComputeConstraintsImpl - { - public ComputeShader constraintsShader; - public int projectKernel; - public int applyKernel; - - public ComputeChainConstraints(ComputeSolverImpl solver) : base(solver, Oni.ConstraintType.Chain) - { - constraintsShader = GameObject.Instantiate(Resources.Load("Compute/ChainConstraints")); - projectKernel = constraintsShader.FindKernel("Project"); - applyKernel = constraintsShader.FindKernel("Apply"); - } - - public override IConstraintsBatchImpl CreateConstraintsBatch() - { - var dataBatch = new ComputeChainConstraintsBatch(this); - batches.Add(dataBatch); - return dataBatch; - } - - public override void RemoveBatch(IConstraintsBatchImpl batch) - { - batches.Remove(batch as ComputeChainConstraintsBatch); - batch.Destroy(); - } - } -} diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Chain/ComputeChainConstraints.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Chain/ComputeChainConstraints.cs.meta deleted file mode 100644 index 923342584..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Chain/ComputeChainConstraints.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 0c28cd2bd740f4bebb4c8559b395ed0e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Chain/ComputeChainConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Chain/ComputeChainConstraintsBatch.cs deleted file mode 100644 index 2009f6ac9..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Chain/ComputeChainConstraintsBatch.cs +++ /dev/null @@ -1,97 +0,0 @@ -using UnityEngine; - -namespace Obi -{ - public class ComputeChainConstraintsBatch : ComputeConstraintsBatchImpl, IChainConstraintsBatchImpl - { - GraphicsBuffer firstIndex; - GraphicsBuffer numIndices; - GraphicsBuffer restLengths; - - GraphicsBuffer ni; - GraphicsBuffer diagonals; - - public ComputeChainConstraintsBatch(ComputeChainConstraints constraints) - { - m_Constraints = constraints; - m_ConstraintType = Oni.ConstraintType.Chain; - } - - public void SetChainConstraints(ObiNativeIntList particleIndices, ObiNativeVector2List restLengths, ObiNativeIntList firstIndex, ObiNativeIntList numIndex, int count) - { - this.particleIndices = particleIndices.AsComputeBuffer(); - this.firstIndex = firstIndex.AsComputeBuffer(); - this.numIndices = numIndex.AsComputeBuffer(); - this.restLengths = restLengths.AsComputeBuffer(); - - int numEdges = 0; - for (int i = 0; i < numIndex.count; ++i) - numEdges += numIndex[i] - 1; - - ni = new GraphicsBuffer(GraphicsBuffer.Target.Structured, numEdges, 16); - diagonals = new GraphicsBuffer(GraphicsBuffer.Target.Structured, numEdges, 12); - - m_ConstraintCount = count; - } - - public override void Destroy() - { - ni.Dispose(); - diagonals.Dispose(); - } - - public override void Evaluate(float stepTime, float substepTime, int steps, float timeLeft) - { - if (m_ConstraintCount > 0) - { - var shader = ((ComputeChainConstraints)m_Constraints).constraintsShader; - int projectKernel = ((ComputeChainConstraints)m_Constraints).projectKernel; - - shader.SetBuffer(projectKernel, "particleIndices", particleIndices); - shader.SetBuffer(projectKernel, "firstIndex", firstIndex); - shader.SetBuffer(projectKernel, "numIndices", numIndices); - shader.SetBuffer(projectKernel, "restLengths", restLengths); - - shader.SetBuffer(projectKernel, "ni", ni); - shader.SetBuffer(projectKernel, "diagonals", diagonals); - - shader.SetBuffer(projectKernel, "positions", solverImplementation.positionsBuffer); - shader.SetBuffer(projectKernel, "invMasses", solverImplementation.invMassesBuffer); - shader.SetBuffer(projectKernel, "deltasAsInt", solverImplementation.positionDeltasIntBuffer); - shader.SetBuffer(projectKernel, "positionConstraintCounts", solverImplementation.positionConstraintCountBuffer); - - shader.SetInt("activeConstraintCount", m_ConstraintCount); - shader.SetFloat("deltaTime", substepTime); - - int threadGroups = ComputeMath.ThreadGroupCount(m_ConstraintCount, 128); - shader.Dispatch(projectKernel, threadGroups, 1, 1); - } - } - - public override void Apply(float substepTime) - { - if (m_ConstraintCount > 0) - { - var parameters = solverAbstraction.GetConstraintParameters(m_ConstraintType); - - var shader = ((ComputeChainConstraints)m_Constraints).constraintsShader; - int applyKernel = ((ComputeChainConstraints)m_Constraints).applyKernel; - - shader.SetBuffer(applyKernel, "particleIndices", particleIndices); - shader.SetBuffer(applyKernel, "firstIndex", firstIndex); - shader.SetBuffer(applyKernel, "numIndices", numIndices); - - shader.SetBuffer(applyKernel, "positions", solverImplementation.positionsBuffer); - shader.SetBuffer(applyKernel, "deltasAsInt", solverImplementation.positionDeltasIntBuffer); - shader.SetBuffer(applyKernel, "positionConstraintCounts", solverImplementation.positionConstraintCountBuffer); - - shader.SetInt("activeConstraintCount", m_ConstraintCount); - shader.SetFloat("sorFactor", parameters.SORFactor); - - int threadGroups = ComputeMath.ThreadGroupCount(m_ConstraintCount, 128); - shader.Dispatch(applyKernel, threadGroups, 1, 1); - } - } - - } -} \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Chain/ComputeChainConstraintsBatch.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Chain/ComputeChainConstraintsBatch.cs.meta deleted file mode 100644 index e659564bd..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Chain/ComputeChainConstraintsBatch.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5d067c1d8b1e94c51bbb85f0f81754ad -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ColliderCollision.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ColliderCollision.meta deleted file mode 100644 index 2da8691e7..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ColliderCollision.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: ff5938de5299c42278caf6e3181426ed -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ColliderCollision/ComputeColliderCollisionConstraints.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ColliderCollision/ComputeColliderCollisionConstraints.cs deleted file mode 100644 index 9b0515e2a..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ColliderCollision/ComputeColliderCollisionConstraints.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using UnityEngine; - -namespace Obi -{ - public class ComputeColliderCollisionConstraints : ComputeConstraintsImpl - { - public ComputeShader constraintsShader; - public int clearKernel; - public int initializeKernel; - public int projectKernel; - public int applyKernel; - - public ComputeColliderCollisionConstraints(ComputeSolverImpl solver) : base(solver, Oni.ConstraintType.Collision) - { - constraintsShader = GameObject.Instantiate(Resources.Load("Compute/ColliderCollisionConstraints")); - clearKernel = constraintsShader.FindKernel("Clear"); - initializeKernel = constraintsShader.FindKernel("Initialize"); - projectKernel = constraintsShader.FindKernel("Project"); - applyKernel = constraintsShader.FindKernel("Apply"); - } - - public override IConstraintsBatchImpl CreateConstraintsBatch() - { - var dataBatch = new ComputeColliderCollisionConstraintsBatch(this); - batches.Add(dataBatch); - return dataBatch; - } - - public override void RemoveBatch(IConstraintsBatchImpl batch) - { - batches.Remove(batch as ComputeColliderCollisionConstraintsBatch); - batch.Destroy(); - } - } -} diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ColliderCollision/ComputeColliderCollisionConstraints.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ColliderCollision/ComputeColliderCollisionConstraints.cs.meta deleted file mode 100644 index 9aa02e508..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ColliderCollision/ComputeColliderCollisionConstraints.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1a86d11bb25f6409a95e22186e98474c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ColliderCollision/ComputeColliderCollisionConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ColliderCollision/ComputeColliderCollisionConstraintsBatch.cs deleted file mode 100644 index a0b598f82..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ColliderCollision/ComputeColliderCollisionConstraintsBatch.cs +++ /dev/null @@ -1,126 +0,0 @@ -using UnityEngine; - -namespace Obi -{ - public class ComputeColliderCollisionConstraintsBatch : ComputeConstraintsBatchImpl, IColliderCollisionConstraintsBatchImpl - { - - public ComputeColliderCollisionConstraintsBatch(ComputeColliderCollisionConstraints constraints) - { - m_Constraints = constraints; - m_ConstraintType = Oni.ConstraintType.Collision; - } - - public override void Initialize(float stepTime, float substepTime, int steps, float timeLeft) - { - if (solverAbstraction.simplexCounts.simplexCount > 0 && solverImplementation.colliderGrid.colliderCount > 0) - { - var shader = ((ComputeColliderCollisionConstraints)m_Constraints).constraintsShader; - int initializeKernel = ((ComputeColliderCollisionConstraints)m_Constraints).initializeKernel; - int clearKernel = ((ComputeColliderCollisionConstraints)m_Constraints).clearKernel; - - shader.SetInt("pointCount", solverAbstraction.simplexCounts.pointCount); - shader.SetInt("edgeCount", solverAbstraction.simplexCounts.edgeCount); - shader.SetInt("triangleCount", solverAbstraction.simplexCounts.triangleCount); - - shader.SetBuffer(clearKernel, "contacts", solverAbstraction.colliderContacts.computeBuffer); - shader.SetBuffer(clearKernel, "shapes", this.solverImplementation.colliderGrid.shapesBuffer); - shader.SetBuffer(clearKernel, "RW_rigidbodies", this.solverImplementation.colliderGrid.rigidbodiesBuffer); - shader.SetBuffer(clearKernel, "dispatchBuffer", this.solverImplementation.colliderGrid.dispatchBuffer); - - shader.SetBuffer(initializeKernel, "contacts", solverAbstraction.colliderContacts.computeBuffer); - shader.SetBuffer(initializeKernel, "effectiveMasses", solverAbstraction.contactEffectiveMasses.computeBuffer); - shader.SetBuffer(initializeKernel, "dispatchBuffer", this.solverImplementation.colliderGrid.dispatchBuffer); - shader.SetBuffer(initializeKernel, "collisionMaterials", this.solverImplementation.colliderGrid.materialsBuffer); - - shader.SetBuffer(initializeKernel, "simplices", this.solverImplementation.simplices); - shader.SetBuffer(initializeKernel, "transforms", this.solverImplementation.colliderGrid.transformsBuffer); - shader.SetBuffer(initializeKernel, "shapes", this.solverImplementation.colliderGrid.shapesBuffer); - shader.SetBuffer(initializeKernel, "RW_rigidbodies", this.solverImplementation.colliderGrid.rigidbodiesBuffer); - shader.SetBuffer(initializeKernel, "positions", solverImplementation.positionsBuffer); - shader.SetBuffer(initializeKernel, "orientations", solverImplementation.orientationsBuffer); - shader.SetBuffer(initializeKernel, "prevPositions", solverImplementation.prevPositionsBuffer); - shader.SetBuffer(initializeKernel, "prevOrientations", solverImplementation.prevOrientationsBuffer); - shader.SetBuffer(initializeKernel, "velocities", solverImplementation.velocitiesBuffer); - shader.SetBuffer(initializeKernel, "principalRadii", solverImplementation.principalRadiiBuffer); - shader.SetBuffer(initializeKernel, "collisionMaterialIndices", solverImplementation.collisionMaterialIndexBuffer); - shader.SetBuffer(initializeKernel, "positionConstraintCounts", solverImplementation.positionConstraintCountBuffer); - shader.SetBuffer(initializeKernel, "deltasAsInt", solverImplementation.positionDeltasIntBuffer); - shader.SetBuffer(initializeKernel, "invMasses", solverImplementation.invMassesBuffer); - shader.SetBuffer(initializeKernel, "invRotationalMasses", solverImplementation.invRotationalMassesBuffer); - - shader.SetBuffer(initializeKernel, "linearDeltasAsInt", solverImplementation.rigidbodyLinearDeltasIntBuffer); - shader.SetBuffer(initializeKernel, "angularDeltasAsInt", solverImplementation.rigidbodyAngularDeltasIntBuffer); - - shader.SetBuffer(initializeKernel, "inertialSolverFrame", solverImplementation.inertialFrameBuffer); - - shader.SetFloat("substepTime", substepTime); - - shader.DispatchIndirect(clearKernel, this.solverImplementation.colliderGrid.dispatchBuffer); - shader.DispatchIndirect(initializeKernel, this.solverImplementation.colliderGrid.dispatchBuffer); - } - } - - public override void Evaluate(float stepTime, float substepTime, int steps, float timeLeft) - { - if (solverAbstraction.simplexCounts.simplexCount > 0 && solverImplementation.colliderGrid.colliderCount > 0) - { - var shader = ((ComputeColliderCollisionConstraints)m_Constraints).constraintsShader; - int projectKernel = ((ComputeColliderCollisionConstraints)m_Constraints).projectKernel; - - shader.SetBuffer(projectKernel, "contacts", solverAbstraction.colliderContacts.computeBuffer); - shader.SetBuffer(projectKernel, "effectiveMasses", this.solverAbstraction.contactEffectiveMasses.computeBuffer); - shader.SetBuffer(projectKernel, "dispatchBuffer", this.solverImplementation.colliderGrid.dispatchBuffer); - shader.SetBuffer(projectKernel, "collisionMaterials", this.solverImplementation.colliderGrid.materialsBuffer); - - shader.SetBuffer(projectKernel, "simplices", this.solverImplementation.simplices); - shader.SetBuffer(projectKernel, "transforms", this.solverImplementation.colliderGrid.transformsBuffer); - shader.SetBuffer(projectKernel, "shapes", this.solverImplementation.colliderGrid.shapesBuffer); - shader.SetBuffer(projectKernel, "rigidbodies", this.solverImplementation.colliderGrid.rigidbodiesBuffer); - shader.SetBuffer(projectKernel, "positions", solverImplementation.positionsBuffer); - shader.SetBuffer(projectKernel, "prevPositions", solverImplementation.prevPositionsBuffer); - shader.SetBuffer(projectKernel, "orientations", solverImplementation.orientationsBuffer); - shader.SetBuffer(projectKernel, "prevOrientations", solverImplementation.prevOrientationsBuffer); - shader.SetBuffer(projectKernel, "principalRadii", solverImplementation.principalRadiiBuffer); - shader.SetBuffer(projectKernel, "collisionMaterialIndices", solverImplementation.collisionMaterialIndexBuffer); - shader.SetBuffer(projectKernel, "positionConstraintCounts", solverImplementation.positionConstraintCountBuffer); - shader.SetBuffer(projectKernel, "deltasAsInt", solverImplementation.positionDeltasIntBuffer); - shader.SetBuffer(projectKernel, "invMasses", solverImplementation.invMassesBuffer); - - shader.SetBuffer(projectKernel, "linearDeltasAsInt", solverImplementation.rigidbodyLinearDeltasIntBuffer); - shader.SetBuffer(projectKernel, "angularDeltasAsInt", solverImplementation.rigidbodyAngularDeltasIntBuffer); - - shader.SetBuffer(projectKernel, "inertialSolverFrame", solverImplementation.inertialFrameBuffer); - shader.SetFloat("substepTime", substepTime); - shader.SetFloat("stepTime", stepTime); - shader.SetInt("steps", steps); - shader.SetFloat("timeLeft", timeLeft); - shader.SetFloat("maxDepenetration", solverAbstraction.parameters.maxDepenetration); - - shader.DispatchIndirect(projectKernel, this.solverImplementation.colliderGrid.dispatchBuffer); - } - } - - public override void Apply(float substepTime) - { - var shader = ((ComputeColliderCollisionConstraints)m_Constraints).constraintsShader; - int applyKernel = ((ComputeColliderCollisionConstraints)m_Constraints).applyKernel; - - if (solverImplementation.activeParticleCount > 0) - { - var parameters = solverAbstraction.GetConstraintParameters(m_ConstraintType); - - shader.SetBuffer(applyKernel, "particleIndices", this.solverImplementation.activeParticlesBuffer); - shader.SetBuffer(applyKernel, "positions", solverImplementation.positionsBuffer); - shader.SetBuffer(applyKernel, "positionConstraintCounts", solverImplementation.positionConstraintCountBuffer); - shader.SetBuffer(applyKernel, "deltasAsInt", solverImplementation.positionDeltasIntBuffer); - - shader.SetInt("particleCount", this.solverAbstraction.activeParticleCount); - shader.SetFloat("sorFactor", parameters.SORFactor); - - int threadGroups = ComputeMath.ThreadGroupCount(this.solverAbstraction.activeParticleCount, 128); - shader.Dispatch(applyKernel, threadGroups, 1, 1); - } - } - } -} \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ColliderCollision/ComputeColliderCollisionConstraintsBatch.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ColliderCollision/ComputeColliderCollisionConstraintsBatch.cs.meta deleted file mode 100644 index aea17db9b..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ColliderCollision/ComputeColliderCollisionConstraintsBatch.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d33af332861d148229253e82497aa0df -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ColliderCollision/ComputeColliderFrictionConstraints.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ColliderCollision/ComputeColliderFrictionConstraints.cs deleted file mode 100644 index 1aeff4016..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ColliderCollision/ComputeColliderFrictionConstraints.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using UnityEngine; - -namespace Obi -{ - public class ComputeColliderFrictionConstraints : ComputeConstraintsImpl - { - public ComputeShader constraintsShader; - public int projectKernel; - public int applyKernel; - - public ComputeColliderFrictionConstraints(ComputeSolverImpl solver) : base(solver, Oni.ConstraintType.Friction) - { - constraintsShader = GameObject.Instantiate(Resources.Load("Compute/ColliderFrictionConstraints")); - projectKernel = constraintsShader.FindKernel("Project"); - applyKernel = constraintsShader.FindKernel("Apply"); - } - - public override IConstraintsBatchImpl CreateConstraintsBatch() - { - var dataBatch = new ComputeColliderFrictionConstraintsBatch(this); - batches.Add(dataBatch); - return dataBatch; - } - - public override void RemoveBatch(IConstraintsBatchImpl batch) - { - batches.Remove(batch as ComputeColliderFrictionConstraintsBatch); - batch.Destroy(); - } - } -} diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ColliderCollision/ComputeColliderFrictionConstraints.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ColliderCollision/ComputeColliderFrictionConstraints.cs.meta deleted file mode 100644 index 5bf1233ad..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ColliderCollision/ComputeColliderFrictionConstraints.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b15312c6313124df298754c7654b62bc -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ColliderCollision/ComputeColliderFrictionConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ColliderCollision/ComputeColliderFrictionConstraintsBatch.cs deleted file mode 100644 index a144d81e9..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ColliderCollision/ComputeColliderFrictionConstraintsBatch.cs +++ /dev/null @@ -1,86 +0,0 @@ -using UnityEngine; - -namespace Obi -{ - public class ComputeColliderFrictionConstraintsBatch : ComputeConstraintsBatchImpl, IColliderCollisionConstraintsBatchImpl - { - - public ComputeColliderFrictionConstraintsBatch(ComputeColliderFrictionConstraints constraints) - { - m_Constraints = constraints; - m_ConstraintType = Oni.ConstraintType.Friction; - } - - public override void Evaluate(float stepTime, float substepTime, int steps, float timeLeft) - { - if (solverAbstraction.simplexCounts.simplexCount > 0 && solverImplementation.colliderGrid.colliderCount > 0) - { - var shader = ((ComputeColliderFrictionConstraints)m_Constraints).constraintsShader; - int projectKernel = ((ComputeColliderFrictionConstraints)m_Constraints).projectKernel; - - shader.SetInt("pointCount", solverAbstraction.simplexCounts.pointCount); - shader.SetInt("edgeCount", solverAbstraction.simplexCounts.edgeCount); - shader.SetInt("triangleCount", solverAbstraction.simplexCounts.triangleCount); - - shader.SetBuffer(projectKernel, "contacts", solverAbstraction.colliderContacts.computeBuffer); - shader.SetBuffer(projectKernel, "effectiveMasses", solverAbstraction.contactEffectiveMasses.computeBuffer); - shader.SetBuffer(projectKernel, "dispatchBuffer", this.solverImplementation.colliderGrid.dispatchBuffer); - shader.SetBuffer(projectKernel, "collisionMaterials", this.solverImplementation.colliderGrid.materialsBuffer); - - shader.SetBuffer(projectKernel, "simplices", this.solverImplementation.simplices); - shader.SetBuffer(projectKernel, "transforms", this.solverImplementation.colliderGrid.transformsBuffer); - shader.SetBuffer(projectKernel, "shapes", this.solverImplementation.colliderGrid.shapesBuffer); - shader.SetBuffer(projectKernel, "rigidbodies", this.solverImplementation.colliderGrid.rigidbodiesBuffer); - shader.SetBuffer(projectKernel, "positions", solverImplementation.positionsBuffer); - shader.SetBuffer(projectKernel, "collisionMaterialIndices", solverImplementation.collisionMaterialIndexBuffer); - shader.SetBuffer(projectKernel, "orientations", solverImplementation.orientationsBuffer); - shader.SetBuffer(projectKernel, "prevPositions", solverImplementation.prevPositionsBuffer); - shader.SetBuffer(projectKernel, "prevOrientations", solverImplementation.prevOrientationsBuffer); - shader.SetBuffer(projectKernel, "principalRadii", solverImplementation.principalRadiiBuffer); - shader.SetBuffer(projectKernel, "invMasses", solverImplementation.invMassesBuffer); - shader.SetBuffer(projectKernel, "invRotationalMasses", solverImplementation.invRotationalMassesBuffer); - - shader.SetBuffer(projectKernel, "positionConstraintCounts", solverImplementation.positionConstraintCountBuffer); - shader.SetBuffer(projectKernel, "deltasAsInt", solverImplementation.positionDeltasIntBuffer); - shader.SetBuffer(projectKernel, "orientationConstraintCounts", solverImplementation.orientationConstraintCountBuffer); - shader.SetBuffer(projectKernel, "orientationDeltasAsInt", solverImplementation.orientationDeltasIntBuffer); - - shader.SetBuffer(projectKernel, "linearDeltasAsInt", solverImplementation.rigidbodyLinearDeltasIntBuffer); - shader.SetBuffer(projectKernel, "angularDeltasAsInt", solverImplementation.rigidbodyAngularDeltasIntBuffer); - - shader.SetBuffer(projectKernel, "solverToWorld", solverImplementation.solverToWorldBuffer); - shader.SetBuffer(projectKernel, "inertialSolverFrame", solverImplementation.inertialFrameBuffer); - shader.SetFloat("stepTime", stepTime); - shader.SetFloat("substepTime", substepTime); - - shader.DispatchIndirect(projectKernel, this.solverImplementation.colliderGrid.dispatchBuffer); - } - } - - public override void Apply(float substepTime) - { - var shader = ((ComputeColliderFrictionConstraints)m_Constraints).constraintsShader; - int applyKernel = ((ComputeColliderFrictionConstraints)m_Constraints).applyKernel; - - if (solverImplementation.activeParticleCount > 0) - { - var parameters = solverAbstraction.GetConstraintParameters(m_ConstraintType); - - shader.SetBuffer(applyKernel, "particleIndices", this.solverImplementation.activeParticlesBuffer); - shader.SetBuffer(applyKernel, "RW_positions", solverImplementation.positionsBuffer); - shader.SetBuffer(applyKernel, "RW_orientations", solverImplementation.orientationsBuffer); - shader.SetBuffer(applyKernel, "positionConstraintCounts", solverImplementation.positionConstraintCountBuffer); - shader.SetBuffer(applyKernel, "deltasAsInt", solverImplementation.positionDeltasIntBuffer); - shader.SetBuffer(applyKernel, "orientationConstraintCounts", solverImplementation.orientationConstraintCountBuffer); - shader.SetBuffer(applyKernel, "orientationDeltasAsInt", solverImplementation.orientationDeltasIntBuffer); - - shader.SetInt("particleCount", this.solverAbstraction.activeParticleCount); - shader.SetFloat("sorFactor", parameters.SORFactor); - - int threadGroups = ComputeMath.ThreadGroupCount(this.solverAbstraction.activeParticleCount, 128); - shader.Dispatch(applyKernel, threadGroups, 1, 1); - - } - } - } -} \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ColliderCollision/ComputeColliderFrictionConstraintsBatch.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ColliderCollision/ComputeColliderFrictionConstraintsBatch.cs.meta deleted file mode 100644 index 2950234a2..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ColliderCollision/ComputeColliderFrictionConstraintsBatch.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 24cfbad987ca74ec696ec132558f6103 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ComputeConstraintsBatchImpl.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ComputeConstraintsBatchImpl.cs deleted file mode 100644 index f2a168f03..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ComputeConstraintsBatchImpl.cs +++ /dev/null @@ -1,82 +0,0 @@ -using UnityEngine; - -namespace Obi -{ - public abstract class ComputeConstraintsBatchImpl : IConstraintsBatchImpl - { - protected IComputeConstraintsImpl m_Constraints; - protected Oni.ConstraintType m_ConstraintType; - - protected bool m_Enabled = true; - protected int m_ConstraintCount = 0; - - public Oni.ConstraintType constraintType - { - get { return m_ConstraintType; } - } - - public bool enabled - { - set - { - if (m_Enabled != value) - m_Enabled = value; - } - get { return m_Enabled; } - } - - public IConstraints constraints - { - get { return m_Constraints; } - } - - public ObiSolver solverAbstraction - { - get { return ((ComputeSolverImpl)m_Constraints.solver).abstraction; } - } - - public ComputeSolverImpl solverImplementation - { - get { return (ComputeSolverImpl)m_Constraints.solver; } - } - - protected GraphicsBuffer particleIndices; - protected GraphicsBuffer lambdas; - - protected ObiNativeFloatList lambdasList; - - public virtual void Initialize(float stepTime, float substepTime, int steps, float timeLeft) - { - if (lambdasList != null) - { - lambdasList.WipeToZero(); - lambdasList.Upload(); - } - } - - // implemented by concrete constraint subclasses. - public abstract void Evaluate(float stepTime, float substepTime, int steps, float timeLeft); - public abstract void Apply(float substepTime); - - public ComputeConstraintsBatchImpl() { } - - public virtual void Destroy() - { - // clean resources allocated by the batch, no need for a default implementation. - } - - public void SetDependency(IConstraintsBatchImpl batch) - { - // no need to implement. - } - - public void SetConstraintCount(int constraintCount) - { - m_ConstraintCount = constraintCount; - } - public int GetConstraintCount() - { - return m_ConstraintCount; - } - } -} \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ComputeConstraintsBatchImpl.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ComputeConstraintsBatchImpl.cs.meta deleted file mode 100644 index d6da30fdb..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ComputeConstraintsBatchImpl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 01e582f7ad8544beca43dac2f3af8b37 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ComputeConstraintsImpl.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ComputeConstraintsImpl.cs deleted file mode 100644 index e58340325..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ComputeConstraintsImpl.cs +++ /dev/null @@ -1,126 +0,0 @@ -using UnityEngine; -using Unity.Jobs; -using Unity.Collections; -using System.Collections; -using System.Collections.Generic; - -namespace Obi -{ - public interface IComputeConstraintsImpl : IConstraints - { - void Initialize(float stepTime, float substepTime, int steps, float timeLeft); - void Project(float stepTime, float substepTime, int substeps, float timeLeft); - void Dispose(); - - IConstraintsBatchImpl CreateConstraintsBatch(); - void RemoveBatch(IConstraintsBatchImpl batch); - } - - public abstract class ComputeConstraintsImpl : IComputeConstraintsImpl where T : ComputeConstraintsBatchImpl - { - protected ComputeSolverImpl m_Solver; - public List batches = new List(); - - protected Oni.ConstraintType m_ConstraintType; - - public Oni.ConstraintType constraintType - { - get { return m_ConstraintType; } - } - - public ISolverImpl solver - { - get { return m_Solver; } - } - - public ComputeConstraintsImpl(ComputeSolverImpl solver, Oni.ConstraintType constraintType) - { - this.m_ConstraintType = constraintType; - this.m_Solver = solver; - } - - public virtual void Dispose() - { - - } - - public abstract IConstraintsBatchImpl CreateConstraintsBatch(); - - public abstract void RemoveBatch(IConstraintsBatchImpl batch); - - public virtual int GetConstraintCount() - { - int count = 0; - if (batches == null) return count; - - foreach (T batch in batches) - if (batch != null) - count += batch.GetConstraintCount(); - - return count; - } - - public void Initialize(float stepTime, float substepTime, int steps, float timeLeft) - { - // initialize all batches in parallel: - if (batches.Count > 0) - { - for (int i = 0; i < batches.Count; ++i) - if (batches[i].enabled) batches[i].Initialize(stepTime, substepTime, steps, timeLeft); - } - - } - - public void Project(float stepTime, float substepTime, int substeps, float timeLeft) - { - UnityEngine.Profiling.Profiler.BeginSample("Project"); - - var parameters = m_Solver.abstraction.GetConstraintParameters(m_ConstraintType); - - switch(parameters.evaluationOrder) - { - case Oni.ConstraintParameters.EvaluationOrder.Sequential: - EvaluateSequential(stepTime, substepTime, substeps, timeLeft); - break; - - case Oni.ConstraintParameters.EvaluationOrder.Parallel: - EvaluateParallel(stepTime, substepTime, substeps, timeLeft); - break; - } - - UnityEngine.Profiling.Profiler.EndSample(); - - } - - protected virtual void EvaluateSequential(float stepTime, float substepTime, int substeps, float timeLeft) - { - // evaluate and apply all batches: - for (int i = 0; i < batches.Count; ++i) - { - if (batches[i].enabled) - { - batches[i].Evaluate(stepTime, substepTime, substeps, timeLeft); - batches[i].Apply(substepTime); - } - } - } - - protected virtual void EvaluateParallel(float stepTime, float substepTime, int substeps, float timeLeft) - { - // evaluate all batches: - for (int i = 0; i < batches.Count; ++i) - if (batches[i].enabled) - { - batches[i].Evaluate(stepTime, substepTime, substeps, timeLeft); - } - - // then apply them: - for (int i = 0; i < batches.Count; ++i) - if (batches[i].enabled) - { - batches[i].Apply(substepTime); - } - } - - } -} diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ComputeConstraintsImpl.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ComputeConstraintsImpl.cs.meta deleted file mode 100644 index f703dbebb..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ComputeConstraintsImpl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 36bc3e2333033489782d3f9f7781f967 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Density.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Density.meta deleted file mode 100644 index afcb33290..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Density.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: e6f9b81a4e3934d66a7268e686756750 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Density/ComputeDensityConstraints.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Density/ComputeDensityConstraints.cs deleted file mode 100644 index 5091b97f0..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Density/ComputeDensityConstraints.cs +++ /dev/null @@ -1,187 +0,0 @@ -using System; -using UnityEngine; - -namespace Obi -{ - public class ComputeDensityConstraints : ComputeConstraintsImpl - { - public ComputeShader sortParticlesShader; - public int sortDataKernel; - - public ComputeShader constraintsShader; - public int updateDensitiesKernel; - public int applyKernel; - public int applyPositionDeltaKernel; - public int calculateAtmosphereKernel; - public int applyAtmosphereKernel; - - public int accumSmoothPositionsKernel; - public int accumAnisotropyKernel; - public int averageAnisotropyKernel; - - public ComputeDensityConstraints(ComputeSolverImpl solver) : base(solver, Oni.ConstraintType.Density) - { - sortParticlesShader = GameObject.Instantiate(Resources.Load("Compute/SortParticleData")); - sortDataKernel = sortParticlesShader.FindKernel("SortData"); - - constraintsShader = GameObject.Instantiate(Resources.Load("Compute/DensityConstraints")); - updateDensitiesKernel = constraintsShader.FindKernel("UpdateDensities"); - applyKernel = constraintsShader.FindKernel("Apply"); - applyPositionDeltaKernel = constraintsShader.FindKernel("ApplyPositionDeltas"); - calculateAtmosphereKernel = constraintsShader.FindKernel("CalculateAtmosphere"); - applyAtmosphereKernel = constraintsShader.FindKernel("ApplyAtmosphere"); - - accumSmoothPositionsKernel = constraintsShader.FindKernel("AccumulateSmoothPositions"); - accumAnisotropyKernel = constraintsShader.FindKernel("AccumulateAnisotropy"); - averageAnisotropyKernel = constraintsShader.FindKernel("AverageAnisotropy"); - } - - public override IConstraintsBatchImpl CreateConstraintsBatch() - { - var dataBatch = new ComputeDensityConstraintsBatch(this); - batches.Add(dataBatch); - return dataBatch; - } - - public override void RemoveBatch(IConstraintsBatchImpl batch) - { - batches.Remove(batch as ComputeDensityConstraintsBatch); - batch.Destroy(); - } - - public void CopyDataInSortedOrder(bool renderable = false) - { - sortParticlesShader.SetBuffer(sortDataKernel, "sortedToOriginal", m_Solver.particleGrid.sortedFluidIndices); - - if (renderable) - { - sortParticlesShader.SetBuffer(sortDataKernel, "positions", m_Solver.renderablePositionsBuffer); - sortParticlesShader.SetBuffer(sortDataKernel, "principalRadii", m_Solver.renderableRadiiBuffer); - } - else - { - sortParticlesShader.SetBuffer(sortDataKernel, "positions", m_Solver.positionsBuffer); - sortParticlesShader.SetBuffer(sortDataKernel, "principalRadii", m_Solver.principalRadiiBuffer); - } - - sortParticlesShader.SetBuffer(sortDataKernel, "prevPositions", m_Solver.prevPositionsBuffer); - sortParticlesShader.SetBuffer(sortDataKernel, "userData", m_Solver.userDataBuffer); - - sortParticlesShader.SetBuffer(sortDataKernel, "sortedPositions", m_Solver.particleGrid.sortedPositions); - sortParticlesShader.SetBuffer(sortDataKernel, "sortedPrincipalRadii", m_Solver.particleGrid.sortedPrincipalRadii); - sortParticlesShader.SetBuffer(sortDataKernel, "sortedPrevPositions", m_Solver.particleGrid.sortedPrevPosOrientations); - sortParticlesShader.SetBuffer(sortDataKernel, "sortedUserData", m_Solver.particleGrid.sortedUserDataColor); - - sortParticlesShader.SetBuffer(sortDataKernel, "dispatchBuffer", m_Solver.fluidDispatchBuffer); - sortParticlesShader.DispatchIndirect(sortDataKernel, m_Solver.fluidDispatchBuffer); - } - - public void CalculateVelocityCorrections(float deltaTime) - { - if (m_Solver.particleGrid.sortedFluidIndices != null && m_Solver.cellCoordsBuffer != null) - { - constraintsShader.SetFloat("deltaTime", deltaTime); - - constraintsShader.SetBuffer(calculateAtmosphereKernel, "neighborCounts", m_Solver.particleGrid.neighborCounts); - constraintsShader.SetBuffer(calculateAtmosphereKernel, "neighbors", m_Solver.particleGrid.neighbors); - constraintsShader.SetBuffer(calculateAtmosphereKernel, "sortedToOriginal", m_Solver.particleGrid.sortedFluidIndices); - - constraintsShader.SetBuffer(calculateAtmosphereKernel, "invMasses", m_Solver.invMassesBuffer); - constraintsShader.SetBuffer(calculateAtmosphereKernel, "velocities_RO", m_Solver.velocitiesBuffer); - constraintsShader.SetBuffer(calculateAtmosphereKernel, "angularVelocities_RO", m_Solver.angularVelocitiesBuffer); - constraintsShader.SetBuffer(calculateAtmosphereKernel, "vorticity_RO", m_Solver.restOrientationsBuffer); // restOrientations are unused for fluid particles, so we reuse them here. - constraintsShader.SetBuffer(calculateAtmosphereKernel, "vorticityAccelerations", m_Solver.orientationDeltasIntBuffer); // restPositions are unused for fluid particles, so we reuse them here. - constraintsShader.SetBuffer(calculateAtmosphereKernel, "linearAccelerations", m_Solver.positionDeltasIntBuffer); - constraintsShader.SetBuffer(calculateAtmosphereKernel, "angularDiffusion", m_Solver.anisotropiesBuffer); - constraintsShader.SetBuffer(calculateAtmosphereKernel, "linearFromAngular", m_Solver.restPositionsBuffer); - constraintsShader.SetBuffer(calculateAtmosphereKernel, "normals", m_Solver.normalsBuffer); - constraintsShader.SetBuffer(calculateAtmosphereKernel, "userData", m_Solver.userDataBuffer); - constraintsShader.SetBuffer(calculateAtmosphereKernel, "sortedPositions", m_Solver.particleGrid.sortedPositions); - constraintsShader.SetBuffer(calculateAtmosphereKernel, "sortedFluidData_RO", m_Solver.particleGrid.sortedFluidData); - constraintsShader.SetBuffer(calculateAtmosphereKernel, "sortedPrincipalRadii", m_Solver.particleGrid.sortedPrincipalRadii); - constraintsShader.SetBuffer(calculateAtmosphereKernel, "sortedFluidMaterials", m_Solver.particleGrid.sortedFluidMaterials); - constraintsShader.SetBuffer(calculateAtmosphereKernel, "sortedFluidInterface", m_Solver.particleGrid.sortedFluidInterface); - constraintsShader.SetBuffer(calculateAtmosphereKernel, "sortedUserData", m_Solver.particleGrid.sortedUserDataColor); - constraintsShader.SetBuffer(calculateAtmosphereKernel, "fluidData", m_Solver.fluidDataBuffer); - constraintsShader.SetBuffer(calculateAtmosphereKernel, "dispatchBuffer", m_Solver.fluidDispatchBuffer); - - constraintsShader.DispatchIndirect(calculateAtmosphereKernel, m_Solver.fluidDispatchBuffer); - } - } - - public void ApplyVelocityCorrections(float deltaTime) - { - if (m_Solver.particleGrid.sortedFluidIndices != null && m_Solver.cellCoordsBuffer != null) - { - constraintsShader.SetFloat("deltaTime", deltaTime); - - constraintsShader.SetBuffer(applyAtmosphereKernel, "positions", m_Solver.positionsBuffer); - constraintsShader.SetBuffer(applyAtmosphereKernel, "prevPositions", m_Solver.prevPositionsBuffer); - constraintsShader.SetBuffer(applyAtmosphereKernel, "wind", m_Solver.windBuffer); - constraintsShader.SetBuffer(applyAtmosphereKernel, "normals_RO", m_Solver.normalsBuffer); - constraintsShader.SetBuffer(applyAtmosphereKernel, "fluidMaterials2", m_Solver.fluidMaterials2Buffer); - constraintsShader.SetBuffer(applyAtmosphereKernel, "sortedPrincipalRadii", m_Solver.particleGrid.sortedPrincipalRadii); - constraintsShader.SetBuffer(applyAtmosphereKernel, "sortedFluidInterface", m_Solver.particleGrid.sortedFluidInterface); - constraintsShader.SetBuffer(applyAtmosphereKernel, "fluidData_RO", m_Solver.fluidDataBuffer); - constraintsShader.SetBuffer(applyAtmosphereKernel, "linearAccelerations", m_Solver.positionDeltasIntBuffer); - constraintsShader.SetBuffer(applyAtmosphereKernel, "angularDiffusion", m_Solver.anisotropiesBuffer); - constraintsShader.SetBuffer(applyAtmosphereKernel, "vorticity", m_Solver.restOrientationsBuffer); - constraintsShader.SetBuffer(applyAtmosphereKernel, "vorticityAccelerations", m_Solver.orientationDeltasIntBuffer); - constraintsShader.SetBuffer(applyAtmosphereKernel, "linearFromAngular_RO", m_Solver.restPositionsBuffer); - constraintsShader.SetBuffer(applyAtmosphereKernel, "velocities", m_Solver.velocitiesBuffer); - constraintsShader.SetBuffer(applyAtmosphereKernel, "angularVelocities", m_Solver.angularVelocitiesBuffer); - constraintsShader.SetBuffer(applyAtmosphereKernel, "sortedToOriginal", m_Solver.particleGrid.sortedFluidIndices); - constraintsShader.SetBuffer(applyAtmosphereKernel, "dispatchBuffer", m_Solver.fluidDispatchBuffer); - - constraintsShader.DispatchIndirect(applyAtmosphereKernel, m_Solver.fluidDispatchBuffer); - } - } - - public void CalculateAnisotropyLaplacianSmoothing() - { - int pcount = ((ComputeSolverImpl)solver).particleCount; - if (pcount > 0 && m_Solver.particleGrid.sortedFluidIndices != null && m_Solver.cellCoordsBuffer != null) - { - if (m_Solver.abstraction.parameters.maxAnisotropy <= 1) - return; - - constraintsShader.SetFloat("maxAnisotropy", m_Solver.abstraction.parameters.maxAnisotropy); - constraintsShader.SetInt("simplexCount", m_Solver.simplexCounts.simplexCount); - - // copy render data (renderablePositions / radii) in sorted order: - CopyDataInSortedOrder(true); - - // accumulate smoothed positions: - constraintsShader.SetBuffer(accumSmoothPositionsKernel, "neighborCounts", m_Solver.particleGrid.neighborCounts); - constraintsShader.SetBuffer(accumSmoothPositionsKernel, "neighbors", m_Solver.particleGrid.neighbors); - constraintsShader.SetBuffer(accumSmoothPositionsKernel, "sortedFluidMaterials", m_Solver.particleGrid.sortedFluidMaterials); - constraintsShader.SetBuffer(accumSmoothPositionsKernel, "renderablePositions", m_Solver.particleGrid.sortedPositions); - constraintsShader.SetBuffer(accumSmoothPositionsKernel, "anisotropies", m_Solver.anisotropiesBuffer); - constraintsShader.SetBuffer(accumSmoothPositionsKernel, "dispatchBuffer", m_Solver.fluidDispatchBuffer); - constraintsShader.DispatchIndirect(accumSmoothPositionsKernel, m_Solver.fluidDispatchBuffer); - - // accumulate anisotropy: - constraintsShader.SetBuffer(accumAnisotropyKernel, "neighborCounts", m_Solver.particleGrid.neighborCounts); - constraintsShader.SetBuffer(accumAnisotropyKernel, "neighbors", m_Solver.particleGrid.neighbors); - constraintsShader.SetBuffer(accumAnisotropyKernel, "anisotropies", m_Solver.anisotropiesBuffer); - constraintsShader.SetBuffer(accumAnisotropyKernel, "renderablePositions", m_Solver.particleGrid.sortedPositions); - constraintsShader.SetBuffer(accumAnisotropyKernel, "sortedFluidMaterials", m_Solver.particleGrid.sortedFluidMaterials); - constraintsShader.SetBuffer(accumAnisotropyKernel, "dispatchBuffer", m_Solver.fluidDispatchBuffer); - constraintsShader.DispatchIndirect(accumAnisotropyKernel, m_Solver.fluidDispatchBuffer); - - // average anisotropies: - constraintsShader.SetBuffer(averageAnisotropyKernel, "sortedToOriginal", m_Solver.particleGrid.sortedFluidIndices); - constraintsShader.SetBuffer(averageAnisotropyKernel, "anisotropies", m_Solver.anisotropiesBuffer); - constraintsShader.SetBuffer(averageAnisotropyKernel, "renderablePositions", m_Solver.renderablePositionsBuffer); - constraintsShader.SetBuffer(averageAnisotropyKernel, "renderableOrientations", m_Solver.renderableOrientationsBuffer); - constraintsShader.SetBuffer(averageAnisotropyKernel, "renderableRadii", m_Solver.renderableRadiiBuffer); - constraintsShader.SetBuffer(averageAnisotropyKernel, "sortedPrincipalRadii", m_Solver.particleGrid.sortedPrincipalRadii); - constraintsShader.SetBuffer(averageAnisotropyKernel, "fluidData", m_Solver.fluidDataBuffer); - constraintsShader.SetBuffer(averageAnisotropyKernel, "dispatchBuffer", m_Solver.fluidDispatchBuffer); - constraintsShader.SetBuffer(averageAnisotropyKernel, "life", m_Solver.lifeBuffer); - constraintsShader.DispatchIndirect(averageAnisotropyKernel, m_Solver.fluidDispatchBuffer); - } - - } - } -} diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Density/ComputeDensityConstraints.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Density/ComputeDensityConstraints.cs.meta deleted file mode 100644 index 181e12e45..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Density/ComputeDensityConstraints.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8e1927f3839c94d8e806b2ba446e2797 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Density/ComputeDensityConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Density/ComputeDensityConstraintsBatch.cs deleted file mode 100644 index bd0ebab47..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Density/ComputeDensityConstraintsBatch.cs +++ /dev/null @@ -1,93 +0,0 @@ - -using UnityEngine; - -namespace Obi -{ - public class ComputeDensityConstraintsBatch : ComputeConstraintsBatchImpl, IDensityConstraintsBatchImpl - { - - public ComputeDensityConstraintsBatch(ComputeDensityConstraints constraints) - { - m_Constraints = constraints; - m_ConstraintType = Oni.ConstraintType.Density; - } - - public override void Evaluate(float stepTime, float substepTime, int steps, float timeLeft) - { - if (solverImplementation.particleGrid.sortedFluidIndices != null && solverImplementation.cellCoordsBuffer != null) - { - var shader = ((ComputeDensityConstraints)m_Constraints).constraintsShader; - int densitiesKernel = ((ComputeDensityConstraints)m_Constraints).updateDensitiesKernel; - - // Need to do this at least every simulation step, since fluid meshing reuses sorted arrays. - ((ComputeDensityConstraints)m_Constraints).CopyDataInSortedOrder(); - - shader.SetInt("maxNeighbors", solverImplementation.particleGrid.maxParticleNeighbors); - shader.SetInt("mode", (int)solverImplementation.abstraction.parameters.mode); - shader.SetFloat("deltaTime", substepTime); - shader.SetVector("diffusionMask", solverAbstraction.parameters.diffusionMask); - - // calculate densities: - shader.SetBuffer(densitiesKernel, "neighborCounts", this.solverImplementation.particleGrid.neighborCounts); - shader.SetBuffer(densitiesKernel, "neighbors", this.solverImplementation.particleGrid.neighbors); - - shader.SetBuffer(densitiesKernel, "invMasses", solverImplementation.invMassesBuffer); - shader.SetBuffer(densitiesKernel, "sortedFluidData", solverImplementation.particleGrid.sortedFluidData); - shader.SetBuffer(densitiesKernel, "sortedPositions", solverImplementation.particleGrid.sortedPositions); - shader.SetBuffer(densitiesKernel, "sortedPrevPositions", solverImplementation.particleGrid.sortedPrevPosOrientations); - shader.SetBuffer(densitiesKernel, "sortedFluidMaterials", solverImplementation.particleGrid.sortedFluidMaterials); - shader.SetBuffer(densitiesKernel, "sortedPrincipalRadii", solverImplementation.particleGrid.sortedPrincipalRadii); - shader.SetBuffer(densitiesKernel, "renderableOrientations", solverImplementation.orientationDeltasIntBuffer); - shader.SetBuffer(densitiesKernel, "prevPositions", solverImplementation.prevPositionsBuffer); - shader.SetBuffer(densitiesKernel, "massCenters", solverImplementation.normalsBuffer); - shader.SetBuffer(densitiesKernel, "prevMassCenters", solverImplementation.renderablePositionsBuffer); - shader.SetBuffer(densitiesKernel, "dispatchBuffer", solverImplementation.fluidDispatchBuffer); - - shader.DispatchIndirect(densitiesKernel, solverImplementation.fluidDispatchBuffer); - } - } - - public override void Apply(float substepTime) - { - if (solverImplementation.particleGrid.sortedFluidIndices != null && solverImplementation.cellCoordsBuffer != null) - { - var shader = ((ComputeDensityConstraints)m_Constraints).constraintsShader; - var applyPositionDeltaKernel = ((ComputeDensityConstraints)m_Constraints).applyPositionDeltaKernel; - var applyKernel = ((ComputeDensityConstraints)m_Constraints).applyKernel; - - // calculate deltas: - shader.SetBuffer(applyKernel, "neighborCounts", this.solverImplementation.particleGrid.neighborCounts); - shader.SetBuffer(applyKernel, "neighbors", this.solverImplementation.particleGrid.neighbors); - - shader.SetBuffer(applyKernel, "invMasses", solverImplementation.invMassesBuffer); - shader.SetBuffer(applyKernel, "sortedPositions", solverImplementation.particleGrid.sortedPositions); - shader.SetBuffer(applyKernel, "sortedPrevPositions", solverImplementation.particleGrid.sortedPrevPosOrientations); - shader.SetBuffer(applyKernel, "sortedFluidMaterials", solverImplementation.particleGrid.sortedFluidMaterials); - shader.SetBuffer(applyKernel, "sortedPrincipalRadii", solverImplementation.particleGrid.sortedPrincipalRadii); - shader.SetBuffer(applyKernel, "renderableOrientations", solverImplementation.orientationDeltasIntBuffer); - shader.SetBuffer(applyKernel, "prevPositions", solverImplementation.prevPositionsBuffer); - shader.SetBuffer(applyKernel, "massCenters", solverImplementation.normalsBuffer); - shader.SetBuffer(applyKernel, "prevMassCenters", solverImplementation.renderablePositionsBuffer); - shader.SetBuffer(applyKernel, "sortedFluidData", solverImplementation.particleGrid.sortedFluidData); - shader.SetBuffer(applyKernel, "deltasAsInt", solverImplementation.positionDeltasIntBuffer); - shader.SetBuffer(applyKernel, "positionConstraintCounts", solverImplementation.positionConstraintCountBuffer); - shader.SetBuffer(applyKernel, "sortedToOriginal", solverImplementation.particleGrid.sortedFluidIndices); - shader.SetBuffer(applyKernel, "dispatchBuffer", solverImplementation.fluidDispatchBuffer); - - shader.DispatchIndirect(applyKernel, solverImplementation.fluidDispatchBuffer); - - // apply position deltas - shader.SetBuffer(applyPositionDeltaKernel, "positions", solverImplementation.positionsBuffer); - shader.SetBuffer(applyPositionDeltaKernel, "fluidData", solverImplementation.fluidDataBuffer); - shader.SetBuffer(applyPositionDeltaKernel, "sortedFluidData", solverImplementation.particleGrid.sortedFluidData); - shader.SetBuffer(applyPositionDeltaKernel, "renderableOrientations", solverImplementation.orientationDeltasIntBuffer); - shader.SetBuffer(applyPositionDeltaKernel, "deltasAsInt", solverImplementation.positionDeltasIntBuffer); - shader.SetBuffer(applyPositionDeltaKernel, "positionConstraintCounts", solverImplementation.positionConstraintCountBuffer); - shader.SetBuffer(applyPositionDeltaKernel, "sortedToOriginal", solverImplementation.particleGrid.sortedFluidIndices); - shader.SetBuffer(applyPositionDeltaKernel, "dispatchBuffer", solverImplementation.fluidDispatchBuffer); - - shader.DispatchIndirect(applyPositionDeltaKernel, solverImplementation.fluidDispatchBuffer); - } - } - } -} \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Density/ComputeDensityConstraintsBatch.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Density/ComputeDensityConstraintsBatch.cs.meta deleted file mode 100644 index 144708642..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Density/ComputeDensityConstraintsBatch.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 277bb45dfcd314cdd8e9d917bcc05955 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Distance/ComputeDistanceConstraints.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Distance/ComputeDistanceConstraints.cs deleted file mode 100644 index 50c2ab4cc..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Distance/ComputeDistanceConstraints.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using UnityEngine; - -namespace Obi -{ - public class ComputeDistanceConstraints : ComputeConstraintsImpl - { - public ComputeShader constraintsShader; - public int projectKernel; - public int applyKernel; - - public ComputeDistanceConstraints(ComputeSolverImpl solver) : base(solver, Oni.ConstraintType.Distance) - { - constraintsShader = GameObject.Instantiate(Resources.Load("Compute/DistanceConstraints")); - projectKernel = constraintsShader.FindKernel("Project"); - applyKernel = constraintsShader.FindKernel("Apply"); - } - - public override IConstraintsBatchImpl CreateConstraintsBatch() - { - var dataBatch = new ComputeDistanceConstraintsBatch(this); - batches.Add(dataBatch); - return dataBatch; - } - - public override void RemoveBatch(IConstraintsBatchImpl batch) - { - batches.Remove(batch as ComputeDistanceConstraintsBatch); - batch.Destroy(); - } - - public void RequestDataReadback() - { - foreach (var batch in batches) - batch.RequestDataReadback(); - } - - public void WaitForReadback() - { - foreach (var batch in batches) - batch.WaitForReadback(); - } - } -} diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Distance/ComputeDistanceConstraints.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Distance/ComputeDistanceConstraints.cs.meta deleted file mode 100644 index 8a98a0c39..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Distance/ComputeDistanceConstraints.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c56c65d479be44432ba437d871d4892d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Distance/ComputeDistanceConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Distance/ComputeDistanceConstraintsBatch.cs deleted file mode 100644 index 0982c29bd..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Distance/ComputeDistanceConstraintsBatch.cs +++ /dev/null @@ -1,85 +0,0 @@ -using UnityEngine; - -namespace Obi -{ - public class ComputeDistanceConstraintsBatch : ComputeConstraintsBatchImpl, IDistanceConstraintsBatchImpl - { - - GraphicsBuffer restLengthsBuffer; - GraphicsBuffer stiffnessesBuffer; - - public ComputeDistanceConstraintsBatch(ComputeDistanceConstraints constraints) - { - m_Constraints = constraints; - m_ConstraintType = Oni.ConstraintType.Distance; - } - - public void SetDistanceConstraints(ObiNativeIntList particleIndices, ObiNativeFloatList restLengths, ObiNativeVector2List stiffnesses, ObiNativeFloatList lambdas, int count) - { - this.particleIndices = particleIndices.AsComputeBuffer(); - this.restLengthsBuffer = restLengths.AsComputeBuffer(); - this.stiffnessesBuffer = stiffnesses.AsComputeBuffer(); - this.lambdas = lambdas.AsComputeBuffer(); - this.lambdasList = lambdas; - - m_ConstraintCount = count; - } - - public override void Evaluate(float stepTime, float substepTime, int steps, float timeLeft) - { - if (m_ConstraintCount > 0) - { - var shader = ((ComputeDistanceConstraints)m_Constraints).constraintsShader; - int projectKernel = ((ComputeDistanceConstraints)m_Constraints).projectKernel; - - shader.SetBuffer(projectKernel, "particleIndices", particleIndices); - shader.SetBuffer(projectKernel, "restLengths", restLengthsBuffer); - shader.SetBuffer(projectKernel, "stiffnesses", stiffnessesBuffer); - shader.SetBuffer(projectKernel, "lambdas", lambdas); - - shader.SetBuffer(projectKernel, "positions", solverImplementation.positionsBuffer); - shader.SetBuffer(projectKernel, "invMasses", solverImplementation.invMassesBuffer); - shader.SetBuffer(projectKernel, "deltasAsInt", solverImplementation.positionDeltasIntBuffer); - shader.SetBuffer(projectKernel, "positionConstraintCounts", solverImplementation.positionConstraintCountBuffer); - - shader.SetInt("activeConstraintCount", m_ConstraintCount); - shader.SetFloat("deltaTime", substepTime); - - int threadGroups = ComputeMath.ThreadGroupCount(m_ConstraintCount, 128); - shader.Dispatch(projectKernel, threadGroups, 1, 1); - } - } - - public override void Apply(float deltaTime) - { - if (m_ConstraintCount > 0) - { - var parameters = solverAbstraction.GetConstraintParameters(m_ConstraintType); - - var shader = ((ComputeDistanceConstraints)m_Constraints).constraintsShader; - int applyKernel = ((ComputeDistanceConstraints)m_Constraints).applyKernel; - - shader.SetBuffer(applyKernel, "particleIndices", particleIndices); - shader.SetBuffer(applyKernel, "positions", solverImplementation.positionsBuffer); - shader.SetBuffer(applyKernel, "deltasAsInt", solverImplementation.positionDeltasIntBuffer); - shader.SetBuffer(applyKernel, "positionConstraintCounts", solverImplementation.positionConstraintCountBuffer); - - shader.SetInt("activeConstraintCount", m_ConstraintCount); - shader.SetFloat("sorFactor", parameters.SORFactor); - - int threadGroups = ComputeMath.ThreadGroupCount(m_ConstraintCount, 128); - shader.Dispatch(applyKernel, threadGroups, 1, 1); - } - } - - public void RequestDataReadback() - { - lambdasList.Readback(); - } - - public void WaitForReadback() - { - lambdasList.WaitForReadback(); - } - } -} \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Distance/ComputeDistanceConstraintsBatch.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Distance/ComputeDistanceConstraintsBatch.cs.meta deleted file mode 100644 index 19d57d427..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Distance/ComputeDistanceConstraintsBatch.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e197e97b0c8b94a84bce0a448e62e5fb -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ParticleCollision.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ParticleCollision.meta deleted file mode 100644 index 3ee25521b..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ParticleCollision.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: da310e9f3c6a84350b6e00bda41d8a90 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ParticleCollision/ComputeParticleCollisionConstraints.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ParticleCollision/ComputeParticleCollisionConstraints.cs deleted file mode 100644 index 9c3d62d6e..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ParticleCollision/ComputeParticleCollisionConstraints.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using UnityEngine; - -namespace Obi -{ - public class ComputeParticleCollisionConstraints : ComputeConstraintsImpl - { - public ComputeShader constraintsShader; - public int initializeKernel; - public int projectKernel; - public int applyKernel; - - public ComputeParticleCollisionConstraints(ComputeSolverImpl solver) : base(solver, Oni.ConstraintType.ParticleCollision) - { - constraintsShader = GameObject.Instantiate(Resources.Load("Compute/ParticleCollisionConstraints")); - initializeKernel = constraintsShader.FindKernel("Initialize"); - projectKernel = constraintsShader.FindKernel("Project"); - applyKernel = constraintsShader.FindKernel("Apply"); - } - - public override IConstraintsBatchImpl CreateConstraintsBatch() - { - var dataBatch = new ComputeParticleCollisionConstraintsBatch(this); - batches.Add(dataBatch); - return dataBatch; - } - - public override void RemoveBatch(IConstraintsBatchImpl batch) - { - batches.Remove(batch as ComputeParticleCollisionConstraintsBatch); - batch.Destroy(); - } - } -} diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ParticleCollision/ComputeParticleCollisionConstraints.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ParticleCollision/ComputeParticleCollisionConstraints.cs.meta deleted file mode 100644 index 3049cbd7b..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ParticleCollision/ComputeParticleCollisionConstraints.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 0039bc61ce4bc4aaa952b7bf1463c8b5 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ParticleCollision/ComputeParticleCollisionConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ParticleCollision/ComputeParticleCollisionConstraintsBatch.cs deleted file mode 100644 index 4af5838ed..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ParticleCollision/ComputeParticleCollisionConstraintsBatch.cs +++ /dev/null @@ -1,112 +0,0 @@ -using UnityEngine; - -namespace Obi -{ - public class ComputeParticleCollisionConstraintsBatch : ComputeConstraintsBatchImpl, IParticleCollisionConstraintsBatchImpl - { - - public ComputeParticleCollisionConstraintsBatch(ComputeParticleCollisionConstraints constraints) - { - m_Constraints = constraints; - m_ConstraintType = Oni.ConstraintType.ParticleCollision; - } - - public override void Initialize(float stepTime, float substepTime, int steps, float timeLeft) - { - var shader = ((ComputeParticleCollisionConstraints)m_Constraints).constraintsShader; - int initializeKernel = ((ComputeParticleCollisionConstraints)m_Constraints).initializeKernel; - - if (solverImplementation.simplexCounts.simplexCount > 0) - { - shader.SetInt("pointCount", solverAbstraction.simplexCounts.pointCount); - shader.SetInt("edgeCount", solverAbstraction.simplexCounts.edgeCount); - shader.SetInt("triangleCount", solverAbstraction.simplexCounts.triangleCount); - shader.SetFloat("shockPropagation", solverAbstraction.parameters.shockPropagation); - shader.SetVector("gravity", solverAbstraction.parameters.gravity); - - shader.SetBuffer(initializeKernel, "simplices", this.solverImplementation.simplices); - shader.SetBuffer(initializeKernel, "particleContacts", solverAbstraction.particleContacts.computeBuffer); - shader.SetBuffer(initializeKernel, "effectiveMasses", solverAbstraction.particleContactEffectiveMasses.computeBuffer); - shader.SetBuffer(initializeKernel, "dispatchBuffer", this.solverImplementation.particleGrid.dispatchBuffer); - shader.SetBuffer(initializeKernel, "collisionMaterials", this.solverImplementation.colliderGrid.materialsBuffer); - - shader.SetBuffer(initializeKernel, "positions", solverImplementation.positionsBuffer); - shader.SetBuffer(initializeKernel, "prevPositions", solverImplementation.prevPositionsBuffer); - shader.SetBuffer(initializeKernel, "orientations", solverImplementation.orientationsBuffer); - shader.SetBuffer(initializeKernel, "prevOrientations", solverImplementation.prevOrientationsBuffer); - shader.SetBuffer(initializeKernel, "principalRadii", solverImplementation.principalRadiiBuffer); - shader.SetBuffer(initializeKernel, "velocities", solverImplementation.velocitiesBuffer); - shader.SetBuffer(initializeKernel, "positionConstraintCounts", solverImplementation.positionConstraintCountBuffer); - shader.SetBuffer(initializeKernel, "collisionMaterialIndices", solverImplementation.collisionMaterialIndexBuffer); - shader.SetBuffer(initializeKernel, "deltasAsInt", solverImplementation.positionDeltasIntBuffer); - shader.SetBuffer(initializeKernel, "invMasses", solverImplementation.invMassesBuffer); - shader.SetBuffer(initializeKernel, "invRotationalMasses", solverImplementation.invMassesBuffer); - - shader.SetFloat("substepTime", substepTime); - - shader.DispatchIndirect(initializeKernel, this.solverImplementation.particleGrid.dispatchBuffer); - } - } - - public override void Evaluate(float stepTime, float substepTime, int steps, float timeLeft) - { - if (solverImplementation.simplexCounts.simplexCount > 0) - { - var shader = ((ComputeParticleCollisionConstraints)m_Constraints).constraintsShader; - int projectKernel = ((ComputeParticleCollisionConstraints)m_Constraints).projectKernel; - - shader.SetBuffer(projectKernel, "particleContacts", solverAbstraction.particleContacts.computeBuffer); - shader.SetBuffer(projectKernel, "effectiveMasses", solverAbstraction.particleContactEffectiveMasses.computeBuffer); - shader.SetBuffer(projectKernel, "dispatchBuffer", this.solverImplementation.particleGrid.dispatchBuffer); - shader.SetBuffer(projectKernel, "collisionMaterials", this.solverImplementation.colliderGrid.materialsBuffer); - - shader.SetBuffer(projectKernel, "simplices", this.solverImplementation.simplices); - shader.SetBuffer(projectKernel, "positions", solverImplementation.positionsBuffer); - shader.SetBuffer(projectKernel, "prevPositions", solverImplementation.prevPositionsBuffer); - shader.SetBuffer(projectKernel, "orientations", solverImplementation.orientationsBuffer); - shader.SetBuffer(projectKernel, "prevOrientations", solverImplementation.prevOrientationsBuffer); - shader.SetBuffer(projectKernel, "principalRadii", solverImplementation.principalRadiiBuffer); - shader.SetBuffer(projectKernel, "fluidInterface", solverImplementation.fluidInterfaceBuffer); - shader.SetBuffer(projectKernel, "userData", solverImplementation.userDataBuffer); - shader.SetBuffer(projectKernel, "positionConstraintCounts", solverImplementation.positionConstraintCountBuffer); - shader.SetBuffer(projectKernel, "orientationConstraintCounts", solverImplementation.orientationConstraintCountBuffer); - shader.SetBuffer(projectKernel, "collisionMaterialIndices", solverImplementation.collisionMaterialIndexBuffer); - shader.SetBuffer(projectKernel, "deltasAsInt", solverImplementation.positionDeltasIntBuffer); - shader.SetBuffer(projectKernel, "orientationDeltasAsInt", solverImplementation.orientationDeltasIntBuffer); - shader.SetBuffer(projectKernel, "invMasses", solverImplementation.invMassesBuffer); - - shader.SetFloat("maxDepenetration", solverAbstraction.parameters.maxDepenetration); - shader.SetFloat("collisionMargin", solverAbstraction.parameters.collisionMargin); - shader.SetVector("diffusionMask", solverAbstraction.parameters.diffusionMask); - shader.SetFloat("substepTime", substepTime); - - shader.DispatchIndirect(projectKernel, this.solverImplementation.particleGrid.dispatchBuffer); - } - } - - public override void Apply(float substepTime) - { - var shader = ((ComputeParticleCollisionConstraints)m_Constraints).constraintsShader; - int applyKernel = ((ComputeParticleCollisionConstraints)m_Constraints).applyKernel; - - if (solverImplementation.activeParticleCount > 0) - { - var parameters = solverAbstraction.GetConstraintParameters(m_ConstraintType); - - shader.SetBuffer(applyKernel, "particleIndices", this.solverImplementation.activeParticlesBuffer); - shader.SetBuffer(applyKernel, "positions", solverImplementation.positionsBuffer); - shader.SetBuffer(applyKernel, "userData", solverImplementation.userDataBuffer); - shader.SetBuffer(applyKernel, "positionConstraintCounts", solverImplementation.positionConstraintCountBuffer); - shader.SetBuffer(applyKernel, "deltasAsInt", solverImplementation.positionDeltasIntBuffer); - shader.SetBuffer(applyKernel, "orientationConstraintCounts", solverImplementation.orientationConstraintCountBuffer); - shader.SetBuffer(applyKernel, "orientationDeltasAsInt", solverImplementation.orientationDeltasIntBuffer); - - shader.SetInt("particleCount", this.solverAbstraction.activeParticleCount); - shader.SetFloat("sorFactor", parameters.SORFactor); - - int threadGroups = ComputeMath.ThreadGroupCount(this.solverAbstraction.activeParticleCount, 128); - shader.Dispatch(applyKernel, threadGroups, 1, 1); - } - } - } -} \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ParticleCollision/ComputeParticleCollisionConstraintsBatch.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ParticleCollision/ComputeParticleCollisionConstraintsBatch.cs.meta deleted file mode 100644 index 5075a5759..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ParticleCollision/ComputeParticleCollisionConstraintsBatch.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 425e2aa73a5f746039203ce1c0ac3a00 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ParticleCollision/ComputeParticleFrictionConstraints.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ParticleCollision/ComputeParticleFrictionConstraints.cs deleted file mode 100644 index aaec1e79f..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ParticleCollision/ComputeParticleFrictionConstraints.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using UnityEngine; - -namespace Obi -{ - public class ComputeParticleFrictionConstraints : ComputeConstraintsImpl - { - public ComputeShader constraintsShader; - public int projectKernel; - public int applyKernel; - - public ComputeParticleFrictionConstraints(ComputeSolverImpl solver) : base(solver, Oni.ConstraintType.ParticleFriction) - { - constraintsShader = GameObject.Instantiate(Resources.Load("Compute/ParticleFrictionConstraints")); - projectKernel = constraintsShader.FindKernel("Project"); - applyKernel = constraintsShader.FindKernel("Apply"); - } - - public override IConstraintsBatchImpl CreateConstraintsBatch() - { - var dataBatch = new ComputeParticleFrictionConstraintsBatch(this); - batches.Add(dataBatch); - return dataBatch; - } - - public override void RemoveBatch(IConstraintsBatchImpl batch) - { - batches.Remove(batch as ComputeParticleFrictionConstraintsBatch); - batch.Destroy(); - } - } -} diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ParticleCollision/ComputeParticleFrictionConstraints.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ParticleCollision/ComputeParticleFrictionConstraints.cs.meta deleted file mode 100644 index 7ca80b7a3..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ParticleCollision/ComputeParticleFrictionConstraints.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 41b95f7aa768148b38a09f35bee8efce -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ParticleCollision/ComputeParticleFrictionConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ParticleCollision/ComputeParticleFrictionConstraintsBatch.cs deleted file mode 100644 index 64743ef60..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ParticleCollision/ComputeParticleFrictionConstraintsBatch.cs +++ /dev/null @@ -1,79 +0,0 @@ -using UnityEngine; - -namespace Obi -{ - public class ComputeParticleFrictionConstraintsBatch : ComputeConstraintsBatchImpl, IParticleCollisionConstraintsBatchImpl - { - - public ComputeParticleFrictionConstraintsBatch(ComputeParticleFrictionConstraints constraints) - { - m_Constraints = constraints; - m_ConstraintType = Oni.ConstraintType.ParticleFriction; - } - - public override void Evaluate(float stepTime, float substepTime, int steps, float timeLeft) - { - //if (m_ConstraintCount > 0) - if (solverImplementation.simplexCounts.simplexCount > 0 && solverImplementation.activeParticleCount > 0) - { - var shader = ((ComputeParticleFrictionConstraints)m_Constraints).constraintsShader; - int projectKernel = ((ComputeParticleFrictionConstraints)m_Constraints).projectKernel; - - shader.SetInt("pointCount", solverAbstraction.simplexCounts.pointCount); - shader.SetInt("edgeCount", solverAbstraction.simplexCounts.edgeCount); - shader.SetInt("triangleCount", solverAbstraction.simplexCounts.triangleCount); - - shader.SetBuffer(projectKernel, "particleContacts", solverAbstraction.particleContacts.computeBuffer); - shader.SetBuffer(projectKernel, "effectiveMasses", solverAbstraction.particleContactEffectiveMasses.computeBuffer); - shader.SetBuffer(projectKernel, "dispatchBuffer", solverImplementation.particleGrid.dispatchBuffer); - shader.SetBuffer(projectKernel, "collisionMaterials", solverImplementation.colliderGrid.materialsBuffer); - - shader.SetBuffer(projectKernel, "simplices", solverImplementation.simplices); - shader.SetBuffer(projectKernel, "collisionMaterialIndices", solverImplementation.collisionMaterialIndexBuffer); - shader.SetBuffer(projectKernel, "positions", solverImplementation.positionsBuffer); - shader.SetBuffer(projectKernel, "orientations", solverImplementation.orientationsBuffer); - shader.SetBuffer(projectKernel, "prevPositions", solverImplementation.prevPositionsBuffer); - shader.SetBuffer(projectKernel, "prevOrientations", solverImplementation.prevOrientationsBuffer); - shader.SetBuffer(projectKernel, "principalRadii", solverImplementation.principalRadiiBuffer); - shader.SetBuffer(projectKernel, "invMasses", solverImplementation.invMassesBuffer); - shader.SetBuffer(projectKernel, "invRotationalMasses", solverImplementation.invRotationalMassesBuffer); - - shader.SetBuffer(projectKernel, "positionConstraintCounts", solverImplementation.positionConstraintCountBuffer); - shader.SetBuffer(projectKernel, "deltasAsInt", solverImplementation.positionDeltasIntBuffer); - shader.SetBuffer(projectKernel, "orientationConstraintCounts", solverImplementation.orientationConstraintCountBuffer); - shader.SetBuffer(projectKernel, "orientationDeltasAsInt", solverImplementation.orientationDeltasIntBuffer); - - shader.SetFloat("stepTime", stepTime); - shader.SetFloat("substepTime", substepTime); - - shader.DispatchIndirect(projectKernel, this.solverImplementation.particleGrid.dispatchBuffer); - } - - } - - public override void Apply(float substepTime) - { - var shader = ((ComputeParticleFrictionConstraints)m_Constraints).constraintsShader; - int applyKernel = ((ComputeParticleFrictionConstraints)m_Constraints).applyKernel; - - if (solverImplementation.activeParticleCount > 0) - { - var parameters = solverAbstraction.GetConstraintParameters(m_ConstraintType); - - shader.SetBuffer(applyKernel, "particleIndices", this.solverImplementation.activeParticlesBuffer); - shader.SetBuffer(applyKernel, "positions", solverImplementation.positionsBuffer); - shader.SetBuffer(applyKernel, "orientations", solverImplementation.orientationsBuffer); - shader.SetBuffer(applyKernel, "positionConstraintCounts", solverImplementation.positionConstraintCountBuffer); - shader.SetBuffer(applyKernel, "deltasAsInt", solverImplementation.positionDeltasIntBuffer); - shader.SetBuffer(applyKernel, "orientationConstraintCounts", solverImplementation.orientationConstraintCountBuffer); - shader.SetBuffer(applyKernel, "orientationDeltasAsInt", solverImplementation.orientationDeltasIntBuffer); - - shader.SetInt("particleCount", this.solverAbstraction.activeParticleCount); - shader.SetFloat("sorFactor", parameters.SORFactor); - - int threadGroups = ComputeMath.ThreadGroupCount(this.solverAbstraction.activeParticleCount, 128); - shader.Dispatch(applyKernel, threadGroups, 1, 1); - } - } - } -} \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ParticleCollision/ComputeParticleFrictionConstraintsBatch.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ParticleCollision/ComputeParticleFrictionConstraintsBatch.cs.meta deleted file mode 100644 index 214b031dc..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ParticleCollision/ComputeParticleFrictionConstraintsBatch.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 12275bbeff9604bb393a365d8442161a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Pin/ComputePinConstraints.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Pin/ComputePinConstraints.cs deleted file mode 100644 index 3ac729cc8..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Pin/ComputePinConstraints.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using UnityEngine; - -namespace Obi -{ - public class ComputePinConstraints : ComputeConstraintsImpl - { - public ComputeShader constraintsShader; - public int clearKernel; - public int initializeKernel; - public int projectKernel; - public int applyKernel; - public int projectRenderableKernel; - - public ComputePinConstraints(ComputeSolverImpl solver) : base(solver, Oni.ConstraintType.Pin) - { - constraintsShader = GameObject.Instantiate(Resources.Load("Compute/PinConstraints")); - clearKernel = constraintsShader.FindKernel("Clear"); - initializeKernel = constraintsShader.FindKernel("Initialize"); - projectKernel = constraintsShader.FindKernel("Project"); - applyKernel = constraintsShader.FindKernel("Apply"); - projectRenderableKernel = constraintsShader.FindKernel("ProjectRenderable"); - } - - public override IConstraintsBatchImpl CreateConstraintsBatch() - { - var dataBatch = new ComputePinConstraintsBatch(this); - batches.Add(dataBatch); - return dataBatch; - } - - public override void RemoveBatch(IConstraintsBatchImpl batch) - { - batches.Remove(batch as ComputePinConstraintsBatch); - batch.Destroy(); - } - - public void RequestDataReadback() - { - foreach (var batch in batches) - batch.RequestDataReadback(); - } - - public void WaitForReadback() - { - foreach (var batch in batches) - batch.WaitForReadback(); - } - - public void ProjectRenderablePositions() - { - for (int i = 0; i < batches.Count; ++i) - { - if (batches[i].enabled) - { - batches[i].ProjectRenderablePositions(); - } - } - } - } -} diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Pin/ComputePinConstraints.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Pin/ComputePinConstraints.cs.meta deleted file mode 100644 index 5f50419cf..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Pin/ComputePinConstraints.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 0fcd123efb9af486783fa2eca750d731 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Pin/ComputePinConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Pin/ComputePinConstraintsBatch.cs deleted file mode 100644 index f5e92220c..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Pin/ComputePinConstraintsBatch.cs +++ /dev/null @@ -1,167 +0,0 @@ -using UnityEngine; - -namespace Obi -{ - public class ComputePinConstraintsBatch : ComputeConstraintsBatchImpl, IPinConstraintsBatchImpl - { - GraphicsBuffer colliderIndices; - GraphicsBuffer offsets; - GraphicsBuffer restDarboux; - GraphicsBuffer stiffnesses; - - public ComputePinConstraintsBatch(ComputePinConstraints constraints) - { - m_Constraints = constraints; - m_ConstraintType = Oni.ConstraintType.Pin; - } - - public void SetPinConstraints(ObiNativeIntList particleIndices, ObiNativeIntList colliderIndices, ObiNativeVector4List offsets, ObiNativeQuaternionList restDarbouxVectors, ObiNativeFloatList stiffnesses, ObiNativeFloatList lambdas, int count) - { - this.particleIndices = particleIndices.AsComputeBuffer(); - this.colliderIndices = colliderIndices.AsComputeBuffer(); - this.offsets = offsets.AsComputeBuffer(); - this.restDarboux = restDarbouxVectors.AsComputeBuffer(); - this.stiffnesses = stiffnesses.AsComputeBuffer(); - this.lambdas = lambdas.AsComputeBuffer(); - this.lambdasList = lambdas; - - m_ConstraintCount = count; - } - - public override void Initialize(float stepTime, float substepTime, int steps, float timeLeft) - { - if (m_ConstraintCount > 0) - { - var shader = ((ComputePinConstraints)m_Constraints).constraintsShader; - int clearKernel = ((ComputePinConstraints)m_Constraints).clearKernel; - int initializeKernel = ((ComputePinConstraints)m_Constraints).initializeKernel; - - shader.SetBuffer(clearKernel, "colliderIndices", colliderIndices); - shader.SetBuffer(clearKernel, "shapes", this.solverImplementation.colliderGrid.shapesBuffer); - shader.SetBuffer(clearKernel, "RW_rigidbodies", this.solverImplementation.colliderGrid.rigidbodiesBuffer); - - shader.SetBuffer(initializeKernel, "colliderIndices", colliderIndices); - shader.SetBuffer(initializeKernel, "shapes", this.solverImplementation.colliderGrid.shapesBuffer); - shader.SetBuffer(initializeKernel, "RW_rigidbodies", this.solverImplementation.colliderGrid.rigidbodiesBuffer); - - shader.SetInt("activeConstraintCount", m_ConstraintCount); - - int threadGroups = ComputeMath.ThreadGroupCount(m_ConstraintCount, 128); - shader.Dispatch(clearKernel, threadGroups, 1, 1); - shader.Dispatch(initializeKernel, threadGroups, 1, 1); - } - - // clear lambdas: - base.Initialize(stepTime, substepTime, steps, timeLeft); - } - - public override void Evaluate(float stepTime, float substepTime, int steps, float timeLeft) - { - if (m_ConstraintCount > 0) - { - var shader = ((ComputePinConstraints)m_Constraints).constraintsShader; - int projectKernel = ((ComputePinConstraints)m_Constraints).projectKernel; - - shader.SetBuffer(projectKernel, "particleIndices", particleIndices); - shader.SetBuffer(projectKernel, "colliderIndices", colliderIndices); - shader.SetBuffer(projectKernel, "offsets", offsets); - shader.SetBuffer(projectKernel, "restDarboux", restDarboux); - shader.SetBuffer(projectKernel, "stiffnesses", stiffnesses); - shader.SetBuffer(projectKernel, "lambdas", lambdas); - - shader.SetBuffer(projectKernel, "transforms", this.solverImplementation.colliderGrid.transformsBuffer); - shader.SetBuffer(projectKernel, "shapes", this.solverImplementation.colliderGrid.shapesBuffer); - shader.SetBuffer(projectKernel, "rigidbodies", this.solverImplementation.colliderGrid.rigidbodiesBuffer); - - shader.SetBuffer(projectKernel, "positions", solverImplementation.positionsBuffer); - shader.SetBuffer(projectKernel, "prevPositions", solverImplementation.prevPositionsBuffer); - shader.SetBuffer(projectKernel, "orientations", solverImplementation.orientationsBuffer); - shader.SetBuffer(projectKernel, "invMasses", solverImplementation.invMassesBuffer); - shader.SetBuffer(projectKernel, "invRotationalMasses", solverImplementation.invRotationalMassesBuffer); - shader.SetBuffer(projectKernel, "deltasAsInt", solverImplementation.positionDeltasIntBuffer); - shader.SetBuffer(projectKernel, "positionConstraintCounts", solverImplementation.positionConstraintCountBuffer); - shader.SetBuffer(projectKernel, "orientationDeltasAsInt", solverImplementation.orientationDeltasIntBuffer); - shader.SetBuffer(projectKernel, "orientationConstraintCounts", solverImplementation.orientationConstraintCountBuffer); - - shader.SetBuffer(projectKernel, "linearDeltasAsInt", solverImplementation.rigidbodyLinearDeltasIntBuffer); - shader.SetBuffer(projectKernel, "angularDeltasAsInt", solverImplementation.rigidbodyAngularDeltasIntBuffer); - - shader.SetBuffer(projectKernel, "inertialSolverFrame", solverImplementation.inertialFrameBuffer); - - shader.SetInt("activeConstraintCount", m_ConstraintCount); - shader.SetFloat("stepTime", stepTime); - shader.SetFloat("substepTime", substepTime); - shader.SetInt("steps", steps); - shader.SetFloat("timeLeft", timeLeft); - - int threadGroups = ComputeMath.ThreadGroupCount(m_ConstraintCount, 128); - shader.Dispatch(projectKernel, threadGroups, 1, 1); - } - } - - public override void Apply(float substepTime) - { - if (m_ConstraintCount > 0) - { - var parameters = solverAbstraction.GetConstraintParameters(m_ConstraintType); - - var shader = ((ComputePinConstraints)m_Constraints).constraintsShader; - int applyKernel = ((ComputePinConstraints)m_Constraints).applyKernel; - - shader.SetBuffer(applyKernel, "particleIndices", particleIndices); - - shader.SetBuffer(applyKernel, "RW_positions", solverImplementation.positionsBuffer); - shader.SetBuffer(applyKernel, "deltasAsInt", solverImplementation.positionDeltasIntBuffer); - shader.SetBuffer(applyKernel, "positionConstraintCounts", solverImplementation.positionConstraintCountBuffer); - - shader.SetBuffer(applyKernel, "RW_orientations", solverImplementation.orientationsBuffer); - shader.SetBuffer(applyKernel, "orientationDeltasAsInt", solverImplementation.orientationDeltasIntBuffer); - shader.SetBuffer(applyKernel, "orientationConstraintCounts", solverImplementation.orientationConstraintCountBuffer); - - shader.SetInt("activeConstraintCount", m_ConstraintCount); - shader.SetFloat("sorFactor", parameters.SORFactor); - - int threadGroups = ComputeMath.ThreadGroupCount(m_ConstraintCount, 128); - shader.Dispatch(applyKernel, threadGroups, 1, 1); - } - } - - public void ProjectRenderablePositions() - { - if (m_ConstraintCount > 0) - { - var shader = ((ComputePinConstraints)m_Constraints).constraintsShader; - int projectRenderableKernel = ((ComputePinConstraints)m_Constraints).projectRenderableKernel; - - shader.SetBuffer(projectRenderableKernel, "particleIndices", particleIndices); - shader.SetBuffer(projectRenderableKernel, "colliderIndices", colliderIndices); - shader.SetBuffer(projectRenderableKernel, "offsets", offsets); - shader.SetBuffer(projectRenderableKernel, "restDarboux", restDarboux); - shader.SetBuffer(projectRenderableKernel, "stiffnesses", stiffnesses); - - shader.SetBuffer(projectRenderableKernel, "transforms", this.solverImplementation.colliderGrid.transformsBuffer); - - shader.SetBuffer(projectRenderableKernel, "RW_positions", solverImplementation.renderablePositionsBuffer); - shader.SetBuffer(projectRenderableKernel, "RW_orientations", solverImplementation.renderableOrientationsBuffer); - - shader.SetBuffer(projectRenderableKernel, "inertialSolverFrame", solverImplementation.inertialFrameBuffer); - - shader.SetInt("activeConstraintCount", m_ConstraintCount); - - int threadGroups = ComputeMath.ThreadGroupCount(m_ConstraintCount, 128); - shader.Dispatch(projectRenderableKernel, threadGroups, 1, 1); - } - } - - public void RequestDataReadback() - { - lambdasList.Readback(); - } - - public void WaitForReadback() - { - lambdasList.WaitForReadback(); - } - - } -} \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Pin/ComputePinConstraintsBatch.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Pin/ComputePinConstraintsBatch.cs.meta deleted file mode 100644 index 365b01ba0..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Pin/ComputePinConstraintsBatch.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: bf8b3fc4b0e8f4ab3ab1f4418e053a8f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Pinhole.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Pinhole.meta deleted file mode 100644 index f134edc5c..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Pinhole.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 67d3689a6a1a94c8b88ec9d27a88963f -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Pinhole/ComputePinholeConstraints.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Pinhole/ComputePinholeConstraints.cs deleted file mode 100644 index 141ad279a..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Pinhole/ComputePinholeConstraints.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using UnityEngine; - -namespace Obi -{ - public class ComputePinholeConstraints : ComputeConstraintsImpl - { - public ComputeShader constraintsShader; - public int clearKernel; - public int initializeKernel; - public int projectKernel; - public int applyKernel; - - public ComputePinholeConstraints(ComputeSolverImpl solver) : base(solver, Oni.ConstraintType.Pinhole) - { - constraintsShader = GameObject.Instantiate(Resources.Load("Compute/PinholeConstraints")); - clearKernel = constraintsShader.FindKernel("Clear"); - initializeKernel = constraintsShader.FindKernel("Initialize"); - projectKernel = constraintsShader.FindKernel("Project"); - applyKernel = constraintsShader.FindKernel("Apply"); - } - - public override IConstraintsBatchImpl CreateConstraintsBatch() - { - var dataBatch = new ComputePinholeConstraintsBatch(this); - batches.Add(dataBatch); - return dataBatch; - } - - public override void RemoveBatch(IConstraintsBatchImpl batch) - { - batches.Remove(batch as ComputePinholeConstraintsBatch); - batch.Destroy(); - } - - public void RequestDataReadback() - { - foreach (var batch in batches) - batch.RequestDataReadback(); - } - - public void WaitForReadback() - { - foreach (var batch in batches) - batch.WaitForReadback(); - } - } -} diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Pinhole/ComputePinholeConstraints.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Pinhole/ComputePinholeConstraints.cs.meta deleted file mode 100644 index cc3dae1ce..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Pinhole/ComputePinholeConstraints.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ac5087fe6e43f4ffc8b73089fd3f96b1 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Pinhole/ComputePinholeConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Pinhole/ComputePinholeConstraintsBatch.cs deleted file mode 100644 index 4930295f8..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Pinhole/ComputePinholeConstraintsBatch.cs +++ /dev/null @@ -1,165 +0,0 @@ -using UnityEngine; - -namespace Obi -{ - public class ComputePinholeConstraintsBatch : ComputeConstraintsBatchImpl, IPinholeConstraintsBatchImpl - { - GraphicsBuffer colliderIndices; - GraphicsBuffer offsets; - GraphicsBuffer edgeMus; - GraphicsBuffer edgeRanges; - GraphicsBuffer edgeRangeMus; - GraphicsBuffer relativeVelocities; - GraphicsBuffer parameters; - - public ComputePinholeConstraintsBatch(ComputePinholeConstraints constraints) - { - m_Constraints = constraints; - m_ConstraintType = Oni.ConstraintType.Pinhole; - } - - public void SetPinholeConstraints(ObiNativeIntList particleIndices, ObiNativeIntList colliderIndices, ObiNativeVector4List offsets, ObiNativeFloatList edgeMus, ObiNativeIntList edgeRanges, ObiNativeFloatList edgeRangeMus, ObiNativeFloatList parameters, ObiNativeFloatList relativeVelocities, ObiNativeFloatList lambdas, int count) - { - this.particleIndices = particleIndices.AsComputeBuffer(); - this.colliderIndices = colliderIndices.AsComputeBuffer(); - this.offsets = offsets.AsComputeBuffer(); - this.edgeMus = edgeMus.AsComputeBuffer(); - this.edgeRanges = edgeRanges.AsComputeBuffer(); - this.edgeRangeMus = edgeRangeMus.AsComputeBuffer(); - this.parameters = parameters.AsComputeBuffer(); - this.lambdas = lambdas.AsComputeBuffer(); - this.relativeVelocities = relativeVelocities.AsComputeBuffer(); - this.lambdasList = lambdas; - - m_ConstraintCount = count; - } - - public override void Initialize(float stepTime, float substepTime, int steps, float timeLeft) - { - if (m_ConstraintCount > 0) - { - var shader = ((ComputePinholeConstraints)m_Constraints).constraintsShader; - int clearKernel = ((ComputePinholeConstraints)m_Constraints).clearKernel; - int initializeKernel = ((ComputePinholeConstraints)m_Constraints).initializeKernel; - - shader.SetBuffer(clearKernel, "colliderIndices", colliderIndices); - shader.SetBuffer(clearKernel, "shapes", this.solverImplementation.colliderGrid.shapesBuffer); - shader.SetBuffer(clearKernel, "RW_rigidbodies", this.solverImplementation.colliderGrid.rigidbodiesBuffer); - - shader.SetBuffer(initializeKernel, "particleIndices", particleIndices); - shader.SetBuffer(initializeKernel, "colliderIndices", colliderIndices); - shader.SetBuffer(initializeKernel, "offsets", offsets); - shader.SetBuffer(initializeKernel, "edgeMus", edgeMus); - shader.SetBuffer(initializeKernel, "edgeRanges", edgeRanges); - shader.SetBuffer(initializeKernel, "edgeRangeMus", edgeRangeMus); - shader.SetBuffer(initializeKernel, "relativeVelocities", relativeVelocities); - shader.SetBuffer(initializeKernel, "parameters", parameters); - - shader.SetBuffer(initializeKernel, "deformableEdges", solverImplementation.deformableEdgesBuffer); - shader.SetBuffer(initializeKernel, "positions", solverImplementation.positionsBuffer); - shader.SetBuffer(initializeKernel, "prevPositions", solverImplementation.prevPositionsBuffer); - shader.SetBuffer(initializeKernel, "invMasses", solverImplementation.invMassesBuffer); - - shader.SetBuffer(initializeKernel, "colliderIndices", colliderIndices); - shader.SetBuffer(initializeKernel, "transforms", this.solverImplementation.colliderGrid.transformsBuffer); - shader.SetBuffer(initializeKernel, "shapes", this.solverImplementation.colliderGrid.shapesBuffer); - shader.SetBuffer(initializeKernel, "rigidbodies", this.solverImplementation.colliderGrid.rigidbodiesBuffer); - shader.SetBuffer(initializeKernel, "RW_rigidbodies", this.solverImplementation.colliderGrid.rigidbodiesBuffer); - - shader.SetBuffer(initializeKernel, "linearDeltasAsInt", solverImplementation.rigidbodyLinearDeltasIntBuffer); - shader.SetBuffer(initializeKernel, "angularDeltasAsInt", solverImplementation.rigidbodyAngularDeltasIntBuffer); - - shader.SetBuffer(initializeKernel, "inertialSolverFrame", solverImplementation.inertialFrameBuffer); - - shader.SetInt("activeConstraintCount", m_ConstraintCount); - shader.SetFloat("stepTime", stepTime); - shader.SetFloat("substepTime", substepTime); - shader.SetInt("steps", steps); - shader.SetFloat("timeLeft", timeLeft); - - int threadGroups = ComputeMath.ThreadGroupCount(m_ConstraintCount, 128); - shader.Dispatch(clearKernel, threadGroups, 1, 1); - shader.Dispatch(initializeKernel, threadGroups, 1, 1); - } - - // clear lambdas: - base.Initialize(stepTime, substepTime, steps, timeLeft); - } - - public override void Evaluate(float stepTime, float substepTime, int steps, float timeLeft) - { - if (m_ConstraintCount > 0) - { - var shader = ((ComputePinholeConstraints)m_Constraints).constraintsShader; - int projectKernel = ((ComputePinholeConstraints)m_Constraints).projectKernel; - - shader.SetBuffer(projectKernel, "particleIndices", particleIndices); - shader.SetBuffer(projectKernel, "colliderIndices", colliderIndices); - shader.SetBuffer(projectKernel, "offsets", offsets); - shader.SetBuffer(projectKernel, "edgeMus", edgeMus); - shader.SetBuffer(projectKernel, "parameters", parameters); - shader.SetBuffer(projectKernel, "lambdas", lambdas); - - shader.SetBuffer(projectKernel, "transforms", this.solverImplementation.colliderGrid.transformsBuffer); - shader.SetBuffer(projectKernel, "shapes", this.solverImplementation.colliderGrid.shapesBuffer); - shader.SetBuffer(projectKernel, "rigidbodies", this.solverImplementation.colliderGrid.rigidbodiesBuffer); - - shader.SetBuffer(projectKernel, "deformableEdges", solverImplementation.deformableEdgesBuffer); - shader.SetBuffer(projectKernel, "positions", solverImplementation.positionsBuffer); - shader.SetBuffer(projectKernel, "prevPositions", solverImplementation.prevPositionsBuffer); - shader.SetBuffer(projectKernel, "invMasses", solverImplementation.invMassesBuffer); - shader.SetBuffer(projectKernel, "deltasAsInt", solverImplementation.positionDeltasIntBuffer); - shader.SetBuffer(projectKernel, "positionConstraintCounts", solverImplementation.positionConstraintCountBuffer); - - shader.SetBuffer(projectKernel, "linearDeltasAsInt", solverImplementation.rigidbodyLinearDeltasIntBuffer); - shader.SetBuffer(projectKernel, "angularDeltasAsInt", solverImplementation.rigidbodyAngularDeltasIntBuffer); - - shader.SetBuffer(projectKernel, "inertialSolverFrame", solverImplementation.inertialFrameBuffer); - - shader.SetInt("activeConstraintCount", m_ConstraintCount); - shader.SetFloat("stepTime", stepTime); - shader.SetFloat("substepTime", substepTime); - shader.SetInt("steps", steps); - shader.SetFloat("timeLeft", timeLeft); - - int threadGroups = ComputeMath.ThreadGroupCount(m_ConstraintCount, 128); - shader.Dispatch(projectKernel, threadGroups, 1, 1); - } - } - - public override void Apply(float substepTime) - { - if (m_ConstraintCount > 0) - { - var param = solverAbstraction.GetConstraintParameters(m_ConstraintType); - - var shader = ((ComputePinholeConstraints)m_Constraints).constraintsShader; - int applyKernel = ((ComputePinholeConstraints)m_Constraints).applyKernel; - - shader.SetBuffer(applyKernel, "particleIndices", particleIndices); - shader.SetBuffer(applyKernel, "deformableEdges", solverImplementation.deformableEdgesBuffer); - - shader.SetBuffer(applyKernel, "RW_positions", solverImplementation.positionsBuffer); - shader.SetBuffer(applyKernel, "deltasAsInt", solverImplementation.positionDeltasIntBuffer); - shader.SetBuffer(applyKernel, "positionConstraintCounts", solverImplementation.positionConstraintCountBuffer); - - shader.SetInt("activeConstraintCount", m_ConstraintCount); - shader.SetFloat("sorFactor", param.SORFactor); - - int threadGroups = ComputeMath.ThreadGroupCount(m_ConstraintCount, 128); - shader.Dispatch(applyKernel, threadGroups, 1, 1); - } - } - - public void RequestDataReadback() - { - lambdasList.Readback(); - } - - public void WaitForReadback() - { - lambdasList.WaitForReadback(); - } - - } -} \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Pinhole/ComputePinholeConstraintsBatch.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Pinhole/ComputePinholeConstraintsBatch.cs.meta deleted file mode 100644 index 1bb2cbb73..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Pinhole/ComputePinholeConstraintsBatch.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 262e3b75b5b53406b92eaed391db8114 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ShapeMatching/ComputeShapeMatchingConstraints.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ShapeMatching/ComputeShapeMatchingConstraints.cs deleted file mode 100644 index 87856a1a2..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ShapeMatching/ComputeShapeMatchingConstraints.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using UnityEngine; - -namespace Obi -{ - public class ComputeShapeMatchingConstraints : ComputeConstraintsImpl - { - public ComputeShader constraintsShader; - public int projectKernel; - public int plasticityKernel; - public int restStateKernel; - public int applyKernel; - - public ComputeShapeMatchingConstraints(ComputeSolverImpl solver) : base(solver, Oni.ConstraintType.ShapeMatching) - { - constraintsShader = GameObject.Instantiate(Resources.Load("Compute/ShapeMatchingConstraints")); - projectKernel = constraintsShader.FindKernel("Project"); - plasticityKernel = constraintsShader.FindKernel("PlasticDeformation"); - restStateKernel = constraintsShader.FindKernel("CalculateRestShapeMatching"); - applyKernel = constraintsShader.FindKernel("Apply"); - } - - public override IConstraintsBatchImpl CreateConstraintsBatch() - { - var dataBatch = new ComputeShapeMatchingConstraintsBatch(this); - batches.Add(dataBatch); - return dataBatch; - } - - public override void RemoveBatch(IConstraintsBatchImpl batch) - { - batches.Remove(batch as ComputeShapeMatchingConstraintsBatch); - batch.Destroy(); - } - - public void RequestDataReadback() - { - foreach(var batch in batches) - batch.RequestDataReadback(); - } - - public void WaitForReadback() - { - foreach (var batch in batches) - batch.WaitForReadback(); - } - } -} diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ShapeMatching/ComputeShapeMatchingConstraints.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ShapeMatching/ComputeShapeMatchingConstraints.cs.meta deleted file mode 100644 index c6df3eebc..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ShapeMatching/ComputeShapeMatchingConstraints.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f2c02ccc8463d4650b854a7a374ac0d3 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ShapeMatching/ComputeShapeMatchingConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ShapeMatching/ComputeShapeMatchingConstraintsBatch.cs deleted file mode 100644 index ae5534206..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ShapeMatching/ComputeShapeMatchingConstraintsBatch.cs +++ /dev/null @@ -1,204 +0,0 @@ -using UnityEngine; - -namespace Obi -{ - public class ComputeShapeMatchingConstraintsBatch : ComputeConstraintsBatchImpl, IShapeMatchingConstraintsBatchImpl - { - private GraphicsBuffer firstIndexBuffer; - private GraphicsBuffer numIndicesBuffer; - private GraphicsBuffer explicitGroupBuffer; - private GraphicsBuffer shapeMaterialParametersBuffer; - private GraphicsBuffer restComsBuffer; - private GraphicsBuffer comsBuffer; - private GraphicsBuffer constraintOrientationsBuffer; - - private GraphicsBuffer AqqBuffer; - private GraphicsBuffer linearTransformsBuffer; - private GraphicsBuffer plasticDeformationsBuffer; - - private ObiNativeVector4List m_RestComs; - private ObiNativeVector4List m_Coms; - private ObiNativeQuaternionList m_ConstraintOrientations; - - private bool m_RecalculateRestShape = false; - public ComputeShapeMatchingConstraintsBatch(ComputeShapeMatchingConstraints constraints) - { - m_Constraints = constraints; - m_ConstraintType = Oni.ConstraintType.ShapeMatching; - } - - public void SetShapeMatchingConstraints(ObiNativeIntList particleIndices, - ObiNativeIntList firstIndex, - ObiNativeIntList numIndices, - ObiNativeIntList explicitGroup, - ObiNativeFloatList shapeMaterialParameters, - ObiNativeVector4List restComs, - ObiNativeVector4List coms, - ObiNativeQuaternionList constraintOrientations, - ObiNativeMatrix4x4List linearTransforms, - ObiNativeMatrix4x4List plasticDeformations, - ObiNativeFloatList lambdas, - int count) - { - this.particleIndices = particleIndices.AsComputeBuffer(); - this.firstIndexBuffer = firstIndex.AsComputeBuffer(); - this.numIndicesBuffer = numIndices.AsComputeBuffer(); - this.explicitGroupBuffer = explicitGroup.AsComputeBuffer(); - this.shapeMaterialParametersBuffer = shapeMaterialParameters.AsComputeBuffer(); - this.restComsBuffer = restComs.AsComputeBuffer(); - this.comsBuffer = coms.AsComputeBuffer(); - this.constraintOrientationsBuffer = constraintOrientations.AsComputeBuffer(); - this.linearTransformsBuffer = linearTransforms.AsComputeBuffer(); - this.plasticDeformationsBuffer = plasticDeformations.AsComputeBuffer(); - - if (AqqBuffer != null) - AqqBuffer.Dispose(); - - AqqBuffer = new GraphicsBuffer(GraphicsBuffer.Target.Structured, count, 64); // float4x4 - - m_RestComs = restComs; - m_Coms = coms; - m_ConstraintOrientations = constraintOrientations; - - m_ConstraintCount = count; - } - - public override void Destroy() - { - if (AqqBuffer != null) - AqqBuffer.Dispose(); - } - - public override void Evaluate(float stepTime, float substepTime, int steps, float timeLeft) - { - if (m_ConstraintCount > 0) - { - var shader = ((ComputeShapeMatchingConstraints)m_Constraints).constraintsShader; - int threadGroups = ComputeMath.ThreadGroupCount(m_ConstraintCount, 128); - - shader.SetInt("activeConstraintCount", m_ConstraintCount); - shader.SetFloat("deltaTime", substepTime); - - if (m_RecalculateRestShape) - { - m_RecalculateRestShape = false; - - int restKernel = ((ComputeShapeMatchingConstraints)m_Constraints).restStateKernel; - - shader.SetBuffer(restKernel, "particleIndices", particleIndices); - shader.SetBuffer(restKernel, "firstIndex", firstIndexBuffer); - shader.SetBuffer(restKernel, "numIndices", numIndicesBuffer); - shader.SetBuffer(restKernel, "RW_restComs", restComsBuffer); - - shader.SetBuffer(restKernel, "RW_Aqq", AqqBuffer); - shader.SetBuffer(restKernel, "RW_deformation", plasticDeformationsBuffer); - - shader.SetBuffer(restKernel, "restPositions", solverImplementation.restPositionsBuffer); - shader.SetBuffer(restKernel, "restOrientations", solverImplementation.restOrientationsBuffer); - shader.SetBuffer(restKernel, "invMasses", solverImplementation.invMassesBuffer); - shader.SetBuffer(restKernel, "invRotationalMasses", solverImplementation.invRotationalMassesBuffer); - shader.SetBuffer(restKernel, "principalRadii", solverImplementation.principalRadiiBuffer); - - shader.Dispatch(restKernel, threadGroups, 1, 1); - - m_RestComs.Readback(); - m_RestComs.WaitForReadback(); - } - - //var shader = ((ComputeShapeMatchingConstraints)m_Constraints).constraintsShader; - int projectKernel = ((ComputeShapeMatchingConstraints)m_Constraints).projectKernel; - int plasticityKernel = ((ComputeShapeMatchingConstraints)m_Constraints).plasticityKernel; - - shader.SetBuffer(projectKernel, "particleIndices", particleIndices); - shader.SetBuffer(projectKernel, "firstIndex", firstIndexBuffer); - shader.SetBuffer(projectKernel, "numIndices", numIndicesBuffer); - shader.SetBuffer(projectKernel, "explicitGroup", explicitGroupBuffer); - shader.SetBuffer(projectKernel, "shapeMaterialParameters", shapeMaterialParametersBuffer); - - shader.SetBuffer(projectKernel, "restComs", restComsBuffer); - shader.SetBuffer(projectKernel, "coms", comsBuffer); - shader.SetBuffer(projectKernel, "constraintOrientations", constraintOrientationsBuffer); - - shader.SetBuffer(projectKernel, "Aqq", AqqBuffer); - shader.SetBuffer(projectKernel, "RW_linearTransforms", linearTransformsBuffer); - shader.SetBuffer(projectKernel, "deformation", plasticDeformationsBuffer); - - shader.SetBuffer(projectKernel, "positions", solverImplementation.positionsBuffer); - shader.SetBuffer(projectKernel, "restPositions", solverImplementation.restPositionsBuffer); - shader.SetBuffer(projectKernel, "orientations", solverImplementation.orientationsBuffer); - shader.SetBuffer(projectKernel, "restOrientations", solverImplementation.restOrientationsBuffer); - shader.SetBuffer(projectKernel, "invMasses", solverImplementation.invMassesBuffer); - shader.SetBuffer(projectKernel, "invRotationalMasses", solverImplementation.invRotationalMassesBuffer); - shader.SetBuffer(projectKernel, "principalRadii", solverImplementation.principalRadiiBuffer); - shader.SetBuffer(projectKernel, "deltasAsInt", solverImplementation.positionDeltasIntBuffer); - shader.SetBuffer(projectKernel, "positionConstraintCounts", solverImplementation.positionConstraintCountBuffer); - - shader.Dispatch(projectKernel, threadGroups, 1, 1); - - shader.SetBuffer(plasticityKernel, "particleIndices", particleIndices); - shader.SetBuffer(plasticityKernel, "firstIndex", firstIndexBuffer); - shader.SetBuffer(plasticityKernel, "numIndices", numIndicesBuffer); - shader.SetBuffer(plasticityKernel, "shapeMaterialParameters", shapeMaterialParametersBuffer); - - shader.SetBuffer(plasticityKernel, "RW_restComs", restComsBuffer); - shader.SetBuffer(plasticityKernel, "constraintOrientations", constraintOrientationsBuffer); - - shader.SetBuffer(plasticityKernel, "RW_Aqq", AqqBuffer); - shader.SetBuffer(plasticityKernel, "linearTransforms", linearTransformsBuffer); - shader.SetBuffer(plasticityKernel, "RW_deformation", plasticDeformationsBuffer); - - shader.SetBuffer(plasticityKernel, "restPositions", solverImplementation.restPositionsBuffer); - shader.SetBuffer(plasticityKernel, "restOrientations", solverImplementation.restOrientationsBuffer); - shader.SetBuffer(plasticityKernel, "invMasses", solverImplementation.invMassesBuffer); - shader.SetBuffer(plasticityKernel, "invRotationalMasses", solverImplementation.invRotationalMassesBuffer); - shader.SetBuffer(plasticityKernel, "principalRadii", solverImplementation.principalRadiiBuffer); - - shader.Dispatch(plasticityKernel, threadGroups, 1, 1); - } - } - - public override void Apply(float substepTime) - { - if (m_ConstraintCount > 0) - { - var parameters = solverAbstraction.GetConstraintParameters(m_ConstraintType); - - var shader = ((ComputeShapeMatchingConstraints)m_Constraints).constraintsShader; - int applyKernel = ((ComputeShapeMatchingConstraints)m_Constraints).applyKernel; - - shader.SetBuffer(applyKernel, "particleIndices", particleIndices); - shader.SetBuffer(applyKernel, "firstIndex", firstIndexBuffer); - shader.SetBuffer(applyKernel, "numIndices", numIndicesBuffer); - shader.SetBuffer(applyKernel, "RW_positions", solverImplementation.positionsBuffer); - shader.SetBuffer(applyKernel, "positionConstraintCounts", solverImplementation.positionConstraintCountBuffer); - shader.SetBuffer(applyKernel, "deltasAsInt", solverImplementation.positionDeltasIntBuffer); - - shader.SetInt("activeConstraintCount", m_ConstraintCount); - shader.SetFloat("sorFactor", parameters.SORFactor); - - int threadGroups = ComputeMath.ThreadGroupCount(m_ConstraintCount, 128); - shader.Dispatch(applyKernel, threadGroups, 1, 1); - } - } - - public void CalculateRestShapeMatching() - { - // just set a flag and do the actual calculation at the start of Evaluate(). - // This ensures GPu data of both particles and constraints is up to date when calculating the rest shape. - m_RecalculateRestShape = true; - } - - public void RequestDataReadback() - { - m_Coms.Readback(); - m_ConstraintOrientations.Readback(); - } - - public void WaitForReadback() - { - m_Coms.WaitForReadback(); - m_ConstraintOrientations.WaitForReadback(); - } - - } -} \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ShapeMatching/ComputeShapeMatchingConstraintsBatch.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ShapeMatching/ComputeShapeMatchingConstraintsBatch.cs.meta deleted file mode 100644 index 82b0d2be8..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ShapeMatching/ComputeShapeMatchingConstraintsBatch.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: efcebc6a8ed1446fe8216d7656fe7462 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Skin/ComputeSkinConstraints.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Skin/ComputeSkinConstraints.cs deleted file mode 100644 index 7a41a9a26..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Skin/ComputeSkinConstraints.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using UnityEngine; - -namespace Obi -{ - public class ComputeSkinConstraints : ComputeConstraintsImpl - { - public ComputeShader constraintsShader; - public int projectKernel; - public int applyKernel; - - public ComputeSkinConstraints(ComputeSolverImpl solver) : base(solver, Oni.ConstraintType.Skin) - { - constraintsShader = GameObject.Instantiate(Resources.Load("Compute/SkinConstraints")); - projectKernel = constraintsShader.FindKernel("Project"); - applyKernel = constraintsShader.FindKernel("Apply"); - } - - public override IConstraintsBatchImpl CreateConstraintsBatch() - { - var dataBatch = new ComputeSkinConstraintsBatch(this); - batches.Add(dataBatch); - return dataBatch; - } - - public override void RemoveBatch(IConstraintsBatchImpl batch) - { - batches.Remove(batch as ComputeSkinConstraintsBatch); - batch.Destroy(); - } - } -} diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Skin/ComputeSkinConstraints.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Skin/ComputeSkinConstraints.cs.meta deleted file mode 100644 index ffce2d875..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Skin/ComputeSkinConstraints.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: df84869cc78e04bb895be2db5e398cc3 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Skin/ComputeSkinConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Skin/ComputeSkinConstraintsBatch.cs deleted file mode 100644 index 53cf5e820..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Skin/ComputeSkinConstraintsBatch.cs +++ /dev/null @@ -1,81 +0,0 @@ -using UnityEngine; - -namespace Obi -{ - public class ComputeSkinConstraintsBatch : ComputeConstraintsBatchImpl, ISkinConstraintsBatchImpl - { - GraphicsBuffer skinPoints; - GraphicsBuffer skinNormalsBuffer; - GraphicsBuffer skinRadiiBackstopBuffer; - GraphicsBuffer skinComplianceBuffer; - - public ComputeSkinConstraintsBatch(ComputeSkinConstraints constraints) - { - m_Constraints = constraints; - m_ConstraintType = Oni.ConstraintType.Skin; - } - - public void SetSkinConstraints(ObiNativeIntList particleIndices, ObiNativeVector4List skinPoints, ObiNativeVector4List skinNormals, ObiNativeFloatList skinRadiiBackstop, ObiNativeFloatList skinCompliance, ObiNativeFloatList lambdas, int count) - { - this.particleIndices = particleIndices.AsComputeBuffer(); - this.skinPoints = skinPoints.AsComputeBuffer(); - this.skinNormalsBuffer = skinNormals.AsComputeBuffer(); - this.skinRadiiBackstopBuffer = skinRadiiBackstop.AsComputeBuffer(); - this.skinComplianceBuffer = skinCompliance.AsComputeBuffer(); - this.lambdas = lambdas.AsComputeBuffer(); - this.lambdasList = lambdas; - - m_ConstraintCount = count; - } - - public override void Evaluate(float stepTime, float substepTime, int steps, float timeLeft) - { - if (m_ConstraintCount > 0) - { - var shader = ((ComputeSkinConstraints)m_Constraints).constraintsShader; - int projectKernel = ((ComputeSkinConstraints)m_Constraints).projectKernel; - - shader.SetBuffer(projectKernel, "particleIndices", particleIndices); - shader.SetBuffer(projectKernel, "skinPoints", skinPoints); - shader.SetBuffer(projectKernel, "skinNormals", skinNormalsBuffer); - shader.SetBuffer(projectKernel, "skinRadiiBackstop", skinRadiiBackstopBuffer); - shader.SetBuffer(projectKernel, "skinCompliance", skinComplianceBuffer); - shader.SetBuffer(projectKernel, "lambdas", lambdas); - - shader.SetBuffer(projectKernel, "positions", solverImplementation.positionsBuffer); - shader.SetBuffer(projectKernel, "invMasses", solverImplementation.invMassesBuffer); - shader.SetBuffer(projectKernel, "deltasAsInt", solverImplementation.positionDeltasIntBuffer); - shader.SetBuffer(projectKernel, "positionConstraintCounts", solverImplementation.positionConstraintCountBuffer); - - shader.SetInt("activeConstraintCount", m_ConstraintCount); - shader.SetFloat("deltaTime", substepTime); - - int threadGroups = ComputeMath.ThreadGroupCount(m_ConstraintCount, 128); - shader.Dispatch(projectKernel, threadGroups, 1, 1); - } - } - - public override void Apply(float substepTime) - { - if (m_ConstraintCount > 0) - { - var parameters = solverAbstraction.GetConstraintParameters(m_ConstraintType); - - var shader = ((ComputeSkinConstraints)m_Constraints).constraintsShader; - int applyKernel = ((ComputeSkinConstraints)m_Constraints).applyKernel; - - shader.SetBuffer(applyKernel, "particleIndices", particleIndices); - shader.SetBuffer(applyKernel, "positions", solverImplementation.positionsBuffer); - shader.SetBuffer(applyKernel, "deltasAsInt", solverImplementation.positionDeltasIntBuffer); - shader.SetBuffer(applyKernel, "positionConstraintCounts", solverImplementation.positionConstraintCountBuffer); - - shader.SetInt("activeConstraintCount", m_ConstraintCount); - shader.SetFloat("sorFactor", parameters.SORFactor); - - int threadGroups = ComputeMath.ThreadGroupCount(m_ConstraintCount, 128); - shader.Dispatch(applyKernel, threadGroups, 1, 1); - } - } - - } -} \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Skin/ComputeSkinConstraintsBatch.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Skin/ComputeSkinConstraintsBatch.cs.meta deleted file mode 100644 index 6a56a4f0d..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Skin/ComputeSkinConstraintsBatch.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 935a9038a35be4d21aa06057f83040a9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Stitch/ComputeStitchConstraints.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Stitch/ComputeStitchConstraints.cs deleted file mode 100644 index e5f48a8f2..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Stitch/ComputeStitchConstraints.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using UnityEngine; - -namespace Obi -{ - public class ComputeStitchConstraints : ComputeConstraintsImpl - { - public ComputeShader constraintsShader; - public int projectKernel; - public int applyKernel; - - public ComputeStitchConstraints(ComputeSolverImpl solver) : base(solver, Oni.ConstraintType.Stitch) - { - constraintsShader = GameObject.Instantiate(Resources.Load("Compute/StitchConstraints")); - projectKernel = constraintsShader.FindKernel("Project"); - applyKernel = constraintsShader.FindKernel("Apply"); - } - - public override IConstraintsBatchImpl CreateConstraintsBatch() - { - var dataBatch = new ComputeStitchConstraintsBatch(this); - batches.Add(dataBatch); - return dataBatch; - } - - public override void RemoveBatch(IConstraintsBatchImpl batch) - { - batches.Remove(batch as ComputeStitchConstraintsBatch); - batch.Destroy(); - } - } -} diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Stitch/ComputeStitchConstraints.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Stitch/ComputeStitchConstraints.cs.meta deleted file mode 100644 index 296677c85..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Stitch/ComputeStitchConstraints.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 35350420ce5c24323abc6770d4de9655 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Stitch/ComputeStitchConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Stitch/ComputeStitchConstraintsBatch.cs deleted file mode 100644 index ba09e5113..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Stitch/ComputeStitchConstraintsBatch.cs +++ /dev/null @@ -1,71 +0,0 @@ -using UnityEngine; - -namespace Obi -{ - public class ComputeStitchConstraintsBatch : ComputeConstraintsBatchImpl, IStitchConstraintsBatchImpl - { - GraphicsBuffer stiffnesses; - - public ComputeStitchConstraintsBatch(ComputeStitchConstraints constraints) - { - m_Constraints = constraints; - m_ConstraintType = Oni.ConstraintType.Stitch; - } - - public void SetStitchConstraints(ObiNativeIntList particleIndices, ObiNativeFloatList stiffnesses, ObiNativeFloatList lambdas, int count) - { - this.particleIndices = particleIndices.AsComputeBuffer(); - this.stiffnesses = stiffnesses.AsComputeBuffer(); - this.lambdas = lambdas.AsComputeBuffer(); - - m_ConstraintCount = count; - } - - public override void Evaluate(float stepTime, float substepTime, int steps, float timeLeft) - { - if (m_ConstraintCount > 0) - { - var shader = ((ComputeStitchConstraints)m_Constraints).constraintsShader; - int projectKernel = ((ComputeStitchConstraints)m_Constraints).projectKernel; - - shader.SetBuffer(projectKernel, "particleIndices", particleIndices); - shader.SetBuffer(projectKernel, "stiffnesses", stiffnesses); - shader.SetBuffer(projectKernel, "lambdas", lambdas); - - shader.SetBuffer(projectKernel, "positions", solverImplementation.positionsBuffer); - shader.SetBuffer(projectKernel, "invMasses", solverImplementation.invMassesBuffer); - shader.SetBuffer(projectKernel, "deltasAsInt", solverImplementation.positionDeltasIntBuffer); - shader.SetBuffer(projectKernel, "positionConstraintCounts", solverImplementation.positionConstraintCountBuffer); - - shader.SetInt("activeConstraintCount", m_ConstraintCount); - shader.SetFloat("deltaTime", substepTime); - - int threadGroups = ComputeMath.ThreadGroupCount(m_ConstraintCount, 128); - shader.Dispatch(projectKernel, threadGroups, 1, 1); - } - } - - public override void Apply(float substepTime) - { - if (m_ConstraintCount > 0) - { - var parameters = solverAbstraction.GetConstraintParameters(m_ConstraintType); - - var shader = ((ComputeStitchConstraints)m_Constraints).constraintsShader; - int applyKernel = ((ComputeStitchConstraints)m_Constraints).applyKernel; - - shader.SetBuffer(applyKernel, "particleIndices", particleIndices); - shader.SetBuffer(applyKernel, "positions", solverImplementation.positionsBuffer); - shader.SetBuffer(applyKernel, "deltasAsInt", solverImplementation.positionDeltasIntBuffer); - shader.SetBuffer(applyKernel, "positionConstraintCounts", solverImplementation.positionConstraintCountBuffer); - - shader.SetInt("activeConstraintCount", m_ConstraintCount); - shader.SetFloat("sorFactor", parameters.SORFactor); - - int threadGroups = ComputeMath.ThreadGroupCount(m_ConstraintCount, 128); - shader.Dispatch(applyKernel, threadGroups, 1, 1); - } - } - - } -} \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Stitch/ComputeStitchConstraintsBatch.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Stitch/ComputeStitchConstraintsBatch.cs.meta deleted file mode 100644 index 03b6837ef..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Stitch/ComputeStitchConstraintsBatch.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d82f622203a3d402dbbd5f47dd78fed3 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/StretchShear/StretchShearConstraints.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/StretchShear/StretchShearConstraints.cs deleted file mode 100644 index d5116e659..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/StretchShear/StretchShearConstraints.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using UnityEngine; - -namespace Obi -{ - public class ComputeStretchShearConstraints : ComputeConstraintsImpl - { - public ComputeShader constraintsShader; - public int projectKernel; - public int applyKernel; - - public ComputeStretchShearConstraints(ComputeSolverImpl solver) : base(solver, Oni.ConstraintType.StretchShear) - { - constraintsShader = GameObject.Instantiate(Resources.Load("Compute/StretchShearConstraints")); - projectKernel = constraintsShader.FindKernel("Project"); - applyKernel = constraintsShader.FindKernel("Apply"); - } - - public override IConstraintsBatchImpl CreateConstraintsBatch() - { - var dataBatch = new ComputeStretchShearConstraintsBatch(this); - batches.Add(dataBatch); - return dataBatch; - } - - public override void RemoveBatch(IConstraintsBatchImpl batch) - { - batches.Remove(batch as ComputeStretchShearConstraintsBatch); - batch.Destroy(); - } - } -} diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/StretchShear/StretchShearConstraints.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/StretchShear/StretchShearConstraints.cs.meta deleted file mode 100644 index e91936fa3..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/StretchShear/StretchShearConstraints.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d7b820e9c187947bf8c31d04d72c402d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/StretchShear/StretchShearConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/StretchShear/StretchShearConstraintsBatch.cs deleted file mode 100644 index 991733151..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/StretchShear/StretchShearConstraintsBatch.cs +++ /dev/null @@ -1,91 +0,0 @@ -using UnityEngine; - -namespace Obi -{ - public class ComputeStretchShearConstraintsBatch : ComputeConstraintsBatchImpl, IStretchShearConstraintsBatchImpl - { - GraphicsBuffer orientationIndices; - GraphicsBuffer restLengths; - GraphicsBuffer restOrientations; - GraphicsBuffer stiffnesses; - - public ComputeStretchShearConstraintsBatch(ComputeStretchShearConstraints constraints) - { - m_Constraints = constraints; - m_ConstraintType = Oni.ConstraintType.StretchShear; - } - - public void SetStretchShearConstraints(ObiNativeIntList particleIndices, ObiNativeIntList orientationIndices, ObiNativeFloatList restLengths, ObiNativeQuaternionList restOrientations, ObiNativeVector3List stiffnesses, ObiNativeFloatList lambdas, int count) - { - this.particleIndices = particleIndices.AsComputeBuffer(); - this.orientationIndices = orientationIndices.AsComputeBuffer(); - this.restLengths = restLengths.AsComputeBuffer(); - this.restOrientations = restOrientations.AsComputeBuffer(); - this.stiffnesses = stiffnesses.AsComputeBuffer(); - this.lambdas = lambdas.AsComputeBuffer(); - this.lambdasList = lambdas; - - m_ConstraintCount = count; - } - - public override void Evaluate(float stepTime, float substepTime, int steps, float timeLeft) - { - if (m_ConstraintCount > 0) - { - var shader = ((ComputeStretchShearConstraints)m_Constraints).constraintsShader; - int projectKernel = ((ComputeStretchShearConstraints)m_Constraints).projectKernel; - - shader.SetBuffer(projectKernel, "particleIndices", particleIndices); - shader.SetBuffer(projectKernel, "orientationIndices", orientationIndices); - shader.SetBuffer(projectKernel, "restLengths", restLengths); - shader.SetBuffer(projectKernel, "restOrientations", restOrientations); - shader.SetBuffer(projectKernel, "stiffnesses", stiffnesses); - shader.SetBuffer(projectKernel, "lambdas", lambdas); - - shader.SetBuffer(projectKernel, "positions", solverImplementation.positionsBuffer); - shader.SetBuffer(projectKernel, "orientations", solverImplementation.orientationsBuffer); - shader.SetBuffer(projectKernel, "invMasses", solverImplementation.invMassesBuffer); - shader.SetBuffer(projectKernel, "invRotationalMasses", solverImplementation.invRotationalMassesBuffer); - - shader.SetBuffer(projectKernel, "deltasAsInt", solverImplementation.positionDeltasIntBuffer); - shader.SetBuffer(projectKernel, "orientationDeltasAsInt", solverImplementation.orientationDeltasIntBuffer); - shader.SetBuffer(projectKernel, "positionConstraintCounts", solverImplementation.positionConstraintCountBuffer); - shader.SetBuffer(projectKernel, "orientationConstraintCounts", solverImplementation.orientationConstraintCountBuffer); - - shader.SetInt("activeConstraintCount", m_ConstraintCount); - shader.SetFloat("deltaTime", substepTime); - - int threadGroups = ComputeMath.ThreadGroupCount(m_ConstraintCount, 128); - shader.Dispatch(projectKernel, threadGroups, 1, 1); - } - } - - public override void Apply(float substepTime) - { - if (m_ConstraintCount > 0) - { - var parameters = solverAbstraction.GetConstraintParameters(m_ConstraintType); - - var shader = ((ComputeStretchShearConstraints)m_Constraints).constraintsShader; - int applyKernel = ((ComputeStretchShearConstraints)m_Constraints).applyKernel; - - shader.SetBuffer(applyKernel, "particleIndices", particleIndices); - shader.SetBuffer(applyKernel, "orientationIndices", orientationIndices); - shader.SetBuffer(applyKernel, "positions", solverImplementation.positionsBuffer); - shader.SetBuffer(applyKernel, "orientations", solverImplementation.orientationsBuffer); - - shader.SetBuffer(applyKernel, "deltasAsInt", solverImplementation.positionDeltasIntBuffer); - shader.SetBuffer(applyKernel, "orientationDeltasAsInt", solverImplementation.orientationDeltasIntBuffer); - shader.SetBuffer(applyKernel, "positionConstraintCounts", solverImplementation.positionConstraintCountBuffer); - shader.SetBuffer(applyKernel, "orientationConstraintCounts", solverImplementation.orientationConstraintCountBuffer); - - shader.SetInt("activeConstraintCount", m_ConstraintCount); - shader.SetFloat("sorFactor", parameters.SORFactor); - - int threadGroups = ComputeMath.ThreadGroupCount(m_ConstraintCount, 128); - shader.Dispatch(applyKernel, threadGroups, 1, 1); - } - } - - } -} \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/StretchShear/StretchShearConstraintsBatch.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/StretchShear/StretchShearConstraintsBatch.cs.meta deleted file mode 100644 index 062a0cfcc..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/StretchShear/StretchShearConstraintsBatch.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f2d0b5dfba06143f5b0a9939a3a2364b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Tether/ComputeTetherConstraints.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Tether/ComputeTetherConstraints.cs deleted file mode 100644 index a1ddceefe..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Tether/ComputeTetherConstraints.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using UnityEngine; - -namespace Obi -{ - public class ComputeTetherConstraints : ComputeConstraintsImpl - { - public ComputeShader constraintsShader; - public int projectKernel; - public int applyKernel; - - public ComputeTetherConstraints(ComputeSolverImpl solver) : base(solver, Oni.ConstraintType.Tether) - { - constraintsShader = GameObject.Instantiate(Resources.Load("Compute/TetherConstraints")); - projectKernel = constraintsShader.FindKernel("Project"); - applyKernel = constraintsShader.FindKernel("Apply"); - } - - public override IConstraintsBatchImpl CreateConstraintsBatch() - { - var dataBatch = new ComputeTetherConstraintsBatch(this); - batches.Add(dataBatch); - return dataBatch; - } - - public override void RemoveBatch(IConstraintsBatchImpl batch) - { - batches.Remove(batch as ComputeTetherConstraintsBatch); - batch.Destroy(); - } - } -} diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Tether/ComputeTetherConstraints.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Tether/ComputeTetherConstraints.cs.meta deleted file mode 100644 index f663b0e3e..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Tether/ComputeTetherConstraints.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 56470001140924abea4d2589db0863ec -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Tether/ComputeTetherConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Tether/ComputeTetherConstraintsBatch.cs deleted file mode 100644 index d482a917c..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Tether/ComputeTetherConstraintsBatch.cs +++ /dev/null @@ -1,75 +0,0 @@ -using UnityEngine; - -namespace Obi -{ - public class ComputeTetherConstraintsBatch : ComputeConstraintsBatchImpl, ITetherConstraintsBatchImpl - { - GraphicsBuffer maxLengthScale; - GraphicsBuffer stiffnesses; - - public ComputeTetherConstraintsBatch(ComputeTetherConstraints constraints) - { - m_Constraints = constraints; - m_ConstraintType = Oni.ConstraintType.Tether; - } - - public void SetTetherConstraints(ObiNativeIntList particleIndices, ObiNativeVector2List maxLengthScale, ObiNativeFloatList stiffnesses, ObiNativeFloatList lambdas, int count) - { - this.particleIndices = particleIndices.AsComputeBuffer(); - this.maxLengthScale = maxLengthScale.AsComputeBuffer(); - this.stiffnesses = stiffnesses.AsComputeBuffer(); - this.lambdas = lambdas.AsComputeBuffer(); - this.lambdasList = lambdas; - - m_ConstraintCount = count; - } - - public override void Evaluate(float stepTime, float substepTime, int steps, float timeLeft) - { - if (m_ConstraintCount > 0) - { - var shader = ((ComputeTetherConstraints)m_Constraints).constraintsShader; - int projectKernel = ((ComputeTetherConstraints)m_Constraints).projectKernel; - - shader.SetBuffer(projectKernel, "particleIndices", particleIndices); - shader.SetBuffer(projectKernel, "maxLengthScale", maxLengthScale); - shader.SetBuffer(projectKernel, "stiffnesses", stiffnesses); - shader.SetBuffer(projectKernel, "lambdas", lambdas); - - shader.SetBuffer(projectKernel, "positions", solverImplementation.positionsBuffer); - shader.SetBuffer(projectKernel, "invMasses", solverImplementation.invMassesBuffer); - shader.SetBuffer(projectKernel, "deltasAsInt", solverImplementation.positionDeltasIntBuffer); - shader.SetBuffer(projectKernel, "positionConstraintCounts", solverImplementation.positionConstraintCountBuffer); - - shader.SetInt("activeConstraintCount", m_ConstraintCount); - shader.SetFloat("deltaTime", substepTime); - - int threadGroups = ComputeMath.ThreadGroupCount(m_ConstraintCount, 128); - shader.Dispatch(projectKernel, threadGroups, 1, 1); - } - } - - public override void Apply(float substepTime) - { - if (m_ConstraintCount > 0) - { - var parameters = solverAbstraction.GetConstraintParameters(m_ConstraintType); - - var shader = ((ComputeTetherConstraints)m_Constraints).constraintsShader; - int applyKernel = ((ComputeTetherConstraints)m_Constraints).applyKernel; - - shader.SetBuffer(applyKernel, "particleIndices", particleIndices); - shader.SetBuffer(applyKernel, "positions", solverImplementation.positionsBuffer); - shader.SetBuffer(applyKernel, "deltasAsInt", solverImplementation.positionDeltasIntBuffer); - shader.SetBuffer(applyKernel, "positionConstraintCounts", solverImplementation.positionConstraintCountBuffer); - - shader.SetInt("activeConstraintCount", m_ConstraintCount); - shader.SetFloat("sorFactor", parameters.SORFactor); - - int threadGroups = ComputeMath.ThreadGroupCount(m_ConstraintCount, 128); - shader.Dispatch(applyKernel, threadGroups, 1, 1); - } - } - - } -} \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Tether/ComputeTetherConstraintsBatch.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Tether/ComputeTetherConstraintsBatch.cs.meta deleted file mode 100644 index 93feeaa45..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Tether/ComputeTetherConstraintsBatch.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b68d976ed2b5c48d191ee9d067a164de -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Volume/ComputeVolumeConstraints.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Volume/ComputeVolumeConstraints.cs deleted file mode 100644 index e673c5ed3..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Volume/ComputeVolumeConstraints.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using UnityEngine; - -namespace Obi -{ - public class ComputeVolumeConstraints : ComputeConstraintsImpl - { - public ComputeShader constraintsShader; - public int gradientsKernel; - public int volumeKernel; - public int denominatorsKernel; - public int constraintKernel; - public int deltasKernel; - public int applyKernel; - - public ComputeVolumeConstraints(ComputeSolverImpl solver) : base(solver, Oni.ConstraintType.Volume) - { - constraintsShader = GameObject.Instantiate(Resources.Load("Compute/VolumeConstraints")); - gradientsKernel = constraintsShader.FindKernel("Gradients"); - volumeKernel = constraintsShader.FindKernel("CalculateVolume"); - denominatorsKernel = constraintsShader.FindKernel("Denominators"); - constraintKernel = constraintsShader.FindKernel("Constraint"); - deltasKernel = constraintsShader.FindKernel("AccumulateDeltas"); - applyKernel = constraintsShader.FindKernel("Apply"); - } - - public override IConstraintsBatchImpl CreateConstraintsBatch() - { - var dataBatch = new ComputeVolumeConstraintsBatch(this); - batches.Add(dataBatch); - return dataBatch; - } - - public override void RemoveBatch(IConstraintsBatchImpl batch) - { - batches.Remove(batch as ComputeVolumeConstraintsBatch); - batch.Destroy(); - } - } -} diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Volume/ComputeVolumeConstraints.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Volume/ComputeVolumeConstraints.cs.meta deleted file mode 100644 index e01c6e26e..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Volume/ComputeVolumeConstraints.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f2266fb2819d84335874a8110cdacb76 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Volume/ComputeVolumeConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Volume/ComputeVolumeConstraintsBatch.cs deleted file mode 100644 index 8f7e9b5eb..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Volume/ComputeVolumeConstraintsBatch.cs +++ /dev/null @@ -1,223 +0,0 @@ -using UnityEngine; -using System.Collections.Generic; - -namespace Obi -{ - public class ComputeVolumeConstraintsBatch : ComputeConstraintsBatchImpl, IVolumeConstraintsBatchImpl - { - GraphicsBuffer firstTriangle; - GraphicsBuffer numTriangles; - GraphicsBuffer restVolumes; - GraphicsBuffer pressureStiffness; - - GraphicsBuffer volumes; - GraphicsBuffer denominators; - GraphicsBuffer triangleConstraintIndex; // for each triangle, its constraint index. - GraphicsBuffer particles; // indices of particles involved in each constraint. - GraphicsBuffer particleConstraintIndex; // for each particle, its constraint index. - - public ComputeVolumeConstraintsBatch(ComputeVolumeConstraints constraints) - { - m_Constraints = constraints; - m_ConstraintType = Oni.ConstraintType.Volume; - } - - public void SetVolumeConstraints(ObiNativeIntList triangles, - ObiNativeIntList firstTriangle, - ObiNativeIntList numTriangles, - ObiNativeFloatList restVolumes, - ObiNativeVector2List pressureStiffness, - ObiNativeFloatList lambdas, - int count) - { - // store volume and denominator per constraint: - volumes = new GraphicsBuffer(GraphicsBuffer.Target.Structured, count, 4); - denominators = new GraphicsBuffer(GraphicsBuffer.Target.Structured, count, 4); - - - // get particles involved in each constraint: - List partic = new List(); - List partConstIndex = new List(); - List triConstIndex = new List(); - for (int i = 0; i < numTriangles.count; ++i) - { - List parts = new List(); - for (int j = 0; j < numTriangles[i]; ++j) - { - int tri = firstTriangle[i] + j; - - parts.Add(triangles[tri * 3]); - parts.Add(triangles[tri * 3+1]); - parts.Add(triangles[tri * 3+2]); - - partConstIndex.Add(i); - partConstIndex.Add(i); - partConstIndex.Add(i); - - triConstIndex.Add(i); - } - - // make them unique: - parts.Sort(); - int resultIndex = parts.Unique((int x, int y) => { return x == y; }); - - // remove excess at the end of the list: - if (resultIndex < parts.Count) - { - int removeCount = parts.Count - resultIndex; - - parts.RemoveRange(resultIndex, removeCount); - partConstIndex.RemoveRange(partConstIndex.Count - removeCount, removeCount); - } - - partic.AddRange(parts); - } - - particles = new GraphicsBuffer(GraphicsBuffer.Target.Structured, partic.Count, 4); - particleConstraintIndex = new GraphicsBuffer(GraphicsBuffer.Target.Structured, partConstIndex.Count, 4); - triangleConstraintIndex = new GraphicsBuffer(GraphicsBuffer.Target.Structured, triConstIndex.Count, 4); - - particles.SetData(partic); - particleConstraintIndex.SetData(partConstIndex); - triangleConstraintIndex.SetData(triConstIndex); - - this.particleIndices = triangles.AsComputeBuffer(); - this.firstTriangle = firstTriangle.AsComputeBuffer(); - this.numTriangles = numTriangles.AsComputeBuffer(); - this.restVolumes = restVolumes.AsComputeBuffer(); - this.pressureStiffness = pressureStiffness.AsComputeBuffer(); - this.lambdas = lambdas.AsComputeBuffer(); - - m_ConstraintCount = count; - } - - public override void Destroy() - { - volumes.Dispose(); - denominators.Dispose(); - particles.Dispose(); - particleConstraintIndex.Dispose(); - triangleConstraintIndex.Dispose(); - } - - public override void Evaluate(float stepTime, float substepTime, int steps, float timeLeft) - { - // 1: parallel over all triangles, atomic accumulate gradient on orientationDeltasInt - // 2: reduction over triangles, sum volume. - // 3: reduction over particles, sum denominator. - // 4: parallel over constraints: lambda - // 5: parallel over triangles, atomic accumulate delta. - - if (m_ConstraintCount > 0) - { - var shader = ((ComputeVolumeConstraints)m_Constraints).constraintsShader; - int gradientsKernel = ((ComputeVolumeConstraints)m_Constraints).gradientsKernel; - int volumeKernel = ((ComputeVolumeConstraints)m_Constraints).volumeKernel; - int denominatorsKernel = ((ComputeVolumeConstraints)m_Constraints).denominatorsKernel; - int constraintKernel = ((ComputeVolumeConstraints)m_Constraints).constraintKernel; - int deltasKernel = ((ComputeVolumeConstraints)m_Constraints).deltasKernel; - - /*shader.SetBuffer(projectKernel, "triangles", particleIndices); - shader.SetBuffer(projectKernel, "firstTriangle", firstTriangle); - shader.SetBuffer(projectKernel, "numTriangles", numTriangles); - shader.SetBuffer(projectKernel, "restVolumes", restVolumes); - shader.SetBuffer(projectKernel, "pressureStiffness", pressureStiffness); - shader.SetBuffer(projectKernel, "lambdas", lambdas); - - shader.SetBuffer(projectKernel, "denominators", denominators); - shader.SetBuffer(projectKernel, "volumes", volumes); - shader.SetBuffer(projectKernel, "gradients", solverImplementation.fluidDataBuffer); - - shader.SetBuffer(projectKernel, "particles", particles); - shader.SetBuffer(projectKernel, "particleConstraintIndex", particleConstraintIndex); - shader.SetBuffer(projectKernel, "triangleConstraintIndex", triangleConstraintIndex); - - shader.SetBuffer(projectKernel, "positions", solverImplementation.positionsBuffer); - shader.SetBuffer(projectKernel, "invMasses", solverImplementation.invMassesBuffer); - shader.SetBuffer(projectKernel, "deltasAsInt", solverImplementation.positionDeltasIntBuffer); - shader.SetBuffer(projectKernel, "positionConstraintCounts", solverImplementation.positionConstraintCountBuffer);*/ - - int trianglesCount = particleIndices.count / 3; - shader.SetInt("activeConstraintCount", m_ConstraintCount); - shader.SetInt("trianglesCount", trianglesCount); - shader.SetInt("particlesCount", particles.count); - shader.SetFloat("deltaTime", substepTime); - - // Gradients: - shader.SetBuffer(gradientsKernel, "triangles", particleIndices); - shader.SetBuffer(gradientsKernel, "gradients", solverImplementation.fluidDataBuffer); - shader.SetBuffer(gradientsKernel, "positions", solverImplementation.positionsBuffer); - - int threadGroups = ComputeMath.ThreadGroupCount(trianglesCount, 128); - shader.Dispatch(gradientsKernel, threadGroups, 1, 1); - - // Volume: - shader.SetBuffer(volumeKernel, "triangles", particleIndices); - shader.SetBuffer(volumeKernel, "gradients", solverImplementation.fluidDataBuffer); - shader.SetBuffer(volumeKernel, "volumes", volumes); - shader.SetBuffer(volumeKernel, "positions", solverImplementation.positionsBuffer); - shader.SetBuffer(volumeKernel, "triangleConstraintIndex", triangleConstraintIndex); - - shader.Dispatch(volumeKernel, threadGroups, 1, 1); - - // Denominators: - shader.SetBuffer(denominatorsKernel, "particles", particles); - shader.SetBuffer(denominatorsKernel, "particleConstraintIndex", particleConstraintIndex); - shader.SetBuffer(denominatorsKernel, "invMasses", solverImplementation.invMassesBuffer); - shader.SetBuffer(denominatorsKernel, "gradients", solverImplementation.fluidDataBuffer); - shader.SetBuffer(denominatorsKernel, "denominators", denominators); - - threadGroups = ComputeMath.ThreadGroupCount(particles.count, 128); - shader.Dispatch(denominatorsKernel, threadGroups, 1, 1); - - // Constraint: - shader.SetBuffer(constraintKernel, "denominators", denominators); - shader.SetBuffer(constraintKernel, "volumes", volumes); - shader.SetBuffer(constraintKernel, "restVolumes", restVolumes); - shader.SetBuffer(constraintKernel, "pressureStiffness", pressureStiffness); - shader.SetBuffer(constraintKernel, "lambdas", lambdas); - - threadGroups = ComputeMath.ThreadGroupCount(m_ConstraintCount, 128); - shader.Dispatch(constraintKernel, threadGroups, 1, 1); - - // Deltas: - shader.SetBuffer(deltasKernel, "particles", particles); - shader.SetBuffer(deltasKernel, "particleConstraintIndex", particleConstraintIndex); - shader.SetBuffer(deltasKernel, "lambdas", lambdas); - shader.SetBuffer(deltasKernel, "invMasses", solverImplementation.invMassesBuffer); - shader.SetBuffer(deltasKernel, "gradients", solverImplementation.fluidDataBuffer); - shader.SetBuffer(deltasKernel, "deltasAsInt", solverImplementation.positionDeltasIntBuffer); - shader.SetBuffer(deltasKernel, "positionConstraintCounts", solverImplementation.positionConstraintCountBuffer); - - threadGroups = ComputeMath.ThreadGroupCount(particles.count, 128); - shader.Dispatch(deltasKernel, threadGroups, 1, 1); - } - } - - public override void Apply(float substepTime) - { - if (m_ConstraintCount > 0) - { - var parameters = solverAbstraction.GetConstraintParameters(m_ConstraintType); - - var shader = ((ComputeVolumeConstraints)m_Constraints).constraintsShader; - int applyKernel = ((ComputeVolumeConstraints)m_Constraints).applyKernel; - - shader.SetBuffer(applyKernel, "triangles", particleIndices); - shader.SetBuffer(applyKernel, "firstTriangle", firstTriangle); - shader.SetBuffer(applyKernel, "numTriangles", numTriangles); - - shader.SetBuffer(applyKernel, "positions", solverImplementation.positionsBuffer); - shader.SetBuffer(applyKernel, "deltasAsInt", solverImplementation.positionDeltasIntBuffer); - shader.SetBuffer(applyKernel, "positionConstraintCounts", solverImplementation.positionConstraintCountBuffer); - - shader.SetInt("activeConstraintCount", m_ConstraintCount); - shader.SetFloat("sorFactor", parameters.SORFactor); - - int threadGroups = ComputeMath.ThreadGroupCount(m_ConstraintCount, 128); - shader.Dispatch(applyKernel, threadGroups, 1, 1); - } - } - - } -} \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Volume/ComputeVolumeConstraintsBatch.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Volume/ComputeVolumeConstraintsBatch.cs.meta deleted file mode 100644 index d661247b3..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Volume/ComputeVolumeConstraintsBatch.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: bf26bec1336ef46c6a92b8d8b0e0cc5e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/DataStructures.meta b/Assets/Obi/Scripts/Common/Backends/Compute/DataStructures.meta deleted file mode 100644 index e93da584f..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/DataStructures.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: e1787c55de187458bb78941ba68adf09 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/DataStructures/ComputeParticleGrid.cs b/Assets/Obi/Scripts/Common/Backends/Compute/DataStructures/ComputeParticleGrid.cs deleted file mode 100644 index 6ebd4976a..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/DataStructures/ComputeParticleGrid.cs +++ /dev/null @@ -1,424 +0,0 @@ -using UnityEngine; -using System; - -namespace Obi -{ - public class ComputeParticleGrid : IDisposable - { - public ComputeShader gridShader; - public int clearKernel; - public int insertSimplicesKernel; - public int gridPopulationKernel; - public int sortSimplicesKernel; - public int buildFluidDispatchKernel; - public int buildMortonKernel; - public int mortonSortKernel; - public int sortFluidSimplicesKernel; - - public int sameLevelNeighborsKernel; - public int upperLevelsNeighborsKernel; - public int buildFluidIndexBufferKernel; - public int contactsKernel; - - public ComputePrefixSum cellsPrefixSum; - private ComputePrefixSum fluidPrefixSum; - - public GraphicsBuffer cellCounts; // for each cell, how many simplices in it. - public GraphicsBuffer cellOffsets; // index of the first simplex in the cell (on gridToMorton buffer). - public GraphicsBuffer offsetInCell; // for each simplex, offset within its cell. - public GraphicsBuffer levelPopulation; // buffer storing amount of entries in each grid level - - public GraphicsBuffer neighbors; // neighbor indices for all particles. (maxNeighbors * simplexCount in size) - public GraphicsBuffer neighborCounts; // amount of neighbors for each particle. (simplexCount in size) - - public GraphicsBuffer contactPairs; // list of particle pairs. - public GraphicsBuffer dispatchBuffer; // dispatch info for iterating trough contacts. - - public GraphicsBuffer cellHashToMortonIndex; - public GraphicsBuffer mortonSortedCellHashes; // contains all cell hashes sorted according to their morton index. - public GraphicsBuffer sortedSimplexIndices; // maps from grid index to simplex index. - - public GraphicsBuffer sortedFluidIndices; // contains compacted sorted indices of fluid simplices *only*. Eg, entry 0 contains the index of the first fluid simplex along the morton curve. - public GraphicsBuffer sortedSimplexToFluid; // maps from sorted simplex index to sorted fluid index, or -1 if the simplex is not fluid. - - public GraphicsBuffer sortedPrincipalRadii; // Used by Density constraints: needs to be sorted once per step (not changed by constraints) - public GraphicsBuffer sortedFluidMaterials; // Used by Density constraints: needs to be sorted once per step (not changed by constraints) - public GraphicsBuffer sortedFluidInterface; // Used by Density constraints: needs to be sorted once per step (not changed by constraints) - public GraphicsBuffer sortedFluidData; // Used by Density constraints: no need to be sorted (constraints output). - - public GraphicsBuffer sortedLinearVel; // Not used by density constraints: used for foam advection and mesher. - public GraphicsBuffer sortedAngularVel; // Not used by density constraints: used for foam advection. - - public GraphicsBuffer sortedPositions; // Used by Density constraints: needs to be sorted once per iteration. - public GraphicsBuffer sortedPrevPosOrientations; // Used by Density constraints: needs to be sorted once per iteration. Reuse for orientations (foam advection and mesher). - public GraphicsBuffer sortedUserDataColor; // Used by Density constraints: needs to be sorted once per iteration. Reuse for colors (mesher). - - private const int maxGridLevels = 24; - private uint[] clearDispatch = { 0, 1, 1, 0 }; - - public int maxParticleNeighbors { get; private set; } = 128; - public int maxParticleContacts { get; private set; } = 4; - - public int maxCells{ - get { return cellCounts != null ? cellCounts.count : 0; } - } - - public ComputeParticleGrid() - { - gridShader = GameObject.Instantiate(Resources.Load("Compute/ParticleGrid")); - clearKernel = gridShader.FindKernel("Clear"); - insertSimplicesKernel = gridShader.FindKernel("InsertSimplices"); - gridPopulationKernel = gridShader.FindKernel("FindPopulatedLevels"); - sortSimplicesKernel = gridShader.FindKernel("SortSimplices"); - buildFluidDispatchKernel = gridShader.FindKernel("BuildFluidDispatch"); - buildMortonKernel = gridShader.FindKernel("BuildMortonIndices"); - mortonSortKernel = gridShader.FindKernel("MortonSort"); - sortFluidSimplicesKernel = gridShader.FindKernel("SortFluidSimplices"); - sameLevelNeighborsKernel = gridShader.FindKernel("FindFluidNeighborsInSameLevel"); - upperLevelsNeighborsKernel = gridShader.FindKernel("FindFluidNeighborsInUpperLevels"); - buildFluidIndexBufferKernel = gridShader.FindKernel("BuildFluidParticleIndexBuffer"); - contactsKernel = gridShader.FindKernel("BuildContactList"); - - levelPopulation = new GraphicsBuffer(GraphicsBuffer.Target.Structured, maxGridLevels + 1, 4); - dispatchBuffer = new GraphicsBuffer(GraphicsBuffer.Target.IndirectArguments, 4, sizeof(uint)); - } - - private void Clear() - { - cellsPrefixSum?.Dispose(); - fluidPrefixSum?.Dispose(); - - if (cellCounts != null) - cellCounts.Dispose(); - if (cellOffsets != null) - cellOffsets.Dispose(); - if (offsetInCell != null) - offsetInCell.Dispose(); - - if (contactPairs != null) - contactPairs.Dispose(); - - if (neighbors != null) - neighbors.Dispose(); - if (neighborCounts != null) - neighborCounts.Dispose(); - - if (cellHashToMortonIndex != null) - cellHashToMortonIndex.Dispose(); - if (mortonSortedCellHashes != null) - mortonSortedCellHashes.Dispose(); - if (sortedSimplexIndices != null) - sortedSimplexIndices.Dispose(); - if (sortedFluidIndices != null) - sortedFluidIndices.Dispose(); - if (sortedSimplexToFluid != null) - sortedSimplexToFluid.Dispose(); - - if (sortedPositions != null) - sortedPositions.Dispose(); - if (sortedPrevPosOrientations != null) - sortedPrevPosOrientations.Dispose(); - if (sortedPrincipalRadii != null) - sortedPrincipalRadii.Dispose(); - if (sortedFluidMaterials != null) - sortedFluidMaterials.Dispose(); - if (sortedFluidInterface != null) - sortedFluidInterface.Dispose(); - if (sortedUserDataColor != null) - sortedUserDataColor.Dispose(); - if (sortedFluidData != null) - sortedFluidData.Dispose(); - - if (sortedLinearVel != null) - sortedLinearVel.Dispose(); - if (sortedAngularVel != null) - sortedAngularVel.Dispose(); - - cellsPrefixSum = null; - fluidPrefixSum = null; - cellCounts = null; - cellOffsets = null; - offsetInCell = null; - contactPairs = null; - neighbors = null; - neighborCounts = null; - sortedSimplexIndices = null; - cellHashToMortonIndex = null; - sortedFluidIndices = null; - sortedSimplexToFluid = null; - sortedPositions = null; - sortedPrevPosOrientations = null; - sortedPrincipalRadii = null; - sortedFluidMaterials = null; - sortedFluidInterface = null; - sortedUserDataColor = null; - sortedFluidData = null; - sortedLinearVel = null; - sortedAngularVel = null; - } - - public void Dispose() - { - if (levelPopulation != null) - levelPopulation.Dispose(); - - if (dispatchBuffer != null) - dispatchBuffer.Dispose(); - - levelPopulation = null; - dispatchBuffer = null; - - Clear(); - } - - // Sets the maximum amount of items that can be stored in the grid. - public bool SetCapacity(int capacity, uint maxParticleContacts, uint maxParticleNeighbors) - { - if (offsetInCell == null || capacity > offsetInCell.count || - maxParticleNeighbors != this.maxParticleNeighbors || - maxParticleContacts != this.maxParticleContacts) - { - Clear(); - - this.maxParticleNeighbors = (int)maxParticleNeighbors; - this.maxParticleContacts = (int)maxParticleContacts; - - capacity *= 2; - int hashtableSize = (int)(capacity * 1.5f); - - // hashtable data: - cellCounts = new GraphicsBuffer(GraphicsBuffer.Target.Structured, hashtableSize, 4); - cellOffsets = new GraphicsBuffer(GraphicsBuffer.Target.Structured, hashtableSize, 4); - mortonSortedCellHashes = new GraphicsBuffer(GraphicsBuffer.Target.Structured, hashtableSize, 4); - cellHashToMortonIndex = new GraphicsBuffer(GraphicsBuffer.Target.Structured, hashtableSize, 4); - cellsPrefixSum = new ComputePrefixSum(hashtableSize); - - // per simplex data: - offsetInCell = new GraphicsBuffer(GraphicsBuffer.Target.Structured, capacity, 4); - sortedSimplexIndices = new GraphicsBuffer(GraphicsBuffer.Target.Structured, capacity, 4); - sortedFluidIndices = new GraphicsBuffer(GraphicsBuffer.Target.Structured, capacity, 4); - sortedSimplexToFluid = new GraphicsBuffer(GraphicsBuffer.Target.Structured, capacity, 4); - - // contact pairs and neighbor lists: - contactPairs = new GraphicsBuffer(GraphicsBuffer.Target.Structured, capacity * (int)maxParticleContacts, 8); - neighbors = new GraphicsBuffer(GraphicsBuffer.Target.Structured, capacity * (int)maxParticleNeighbors, 4); - neighborCounts = new GraphicsBuffer(GraphicsBuffer.Target.Structured, capacity, 4); - - // sorted fluid simplex data: - fluidPrefixSum = new ComputePrefixSum(capacity); - sortedPrincipalRadii = new GraphicsBuffer(GraphicsBuffer.Target.Structured, capacity, 16); - sortedFluidMaterials = new GraphicsBuffer(GraphicsBuffer.Target.Structured, capacity, 16); - sortedFluidInterface = new GraphicsBuffer(GraphicsBuffer.Target.Structured, capacity, 16); - sortedPositions = new GraphicsBuffer(GraphicsBuffer.Target.Structured, capacity, 16); - sortedPrevPosOrientations = new GraphicsBuffer(GraphicsBuffer.Target.Structured, capacity, 16); - sortedUserDataColor = new GraphicsBuffer(GraphicsBuffer.Target.Structured, capacity, 16); - sortedFluidData = new GraphicsBuffer(GraphicsBuffer.Target.Structured, capacity, 16); - sortedLinearVel = new GraphicsBuffer(GraphicsBuffer.Target.Structured, capacity, 16); - sortedAngularVel = new GraphicsBuffer(GraphicsBuffer.Target.Structured, capacity, 16); - - return true; - } - return false; - } - - public void BuildGrid(ComputeSolverImpl solver, float deltaTime) - { - dispatchBuffer.SetData(clearDispatch); - solver.fluidDispatchBuffer.SetData(clearDispatch); - - if (solver.simplexCounts.simplexCount > 0) - { - gridShader.SetInt("pointCount", solver.simplexCounts.pointCount); - gridShader.SetInt("edgeCount", solver.simplexCounts.edgeCount); - gridShader.SetInt("triangleCount", solver.simplexCounts.triangleCount); - gridShader.SetInt("maxContacts", contactPairs.count); - gridShader.SetInt("maxCells", cellCounts.count); - gridShader.SetInt("maxNeighbors", maxParticleNeighbors); - gridShader.SetFloat("deltaTime", deltaTime); - gridShader.SetFloat("collisionMargin", solver.abstraction.parameters.collisionMargin); - gridShader.SetFloat("particleCCD", solver.abstraction.parameters.particleCCD); - int cellThreadGroups = ComputeMath.ThreadGroupCount(cellCounts.count, 128); - - solver.abstraction.particleContacts.computeBuffer.SetCounterValue(0); - - int simplexThreadGroups = ComputeMath.ThreadGroupCount(solver.simplexCounts.simplexCount, 128); - - // clear grid: - gridShader.SetBuffer(clearKernel, "cellCounts", cellCounts); - gridShader.SetBuffer(clearKernel, "cellOffsets", cellOffsets); - gridShader.SetBuffer(clearKernel, "levelPopulation", levelPopulation); - gridShader.SetBuffer(clearKernel, "mortonSortedCellHashes", mortonSortedCellHashes); - gridShader.Dispatch(clearKernel, cellThreadGroups, 1, 1); - - // insert simplices in grid and flag fluid simplices: - gridShader.SetBuffer(insertSimplicesKernel, "solverBounds", solver.reducedBounds); - gridShader.SetBuffer(insertSimplicesKernel, "simplexBounds", solver.simplexBounds); - gridShader.SetBuffer(insertSimplicesKernel, "simplices", solver.simplices); - gridShader.SetBuffer(insertSimplicesKernel, "phases", solver.phasesBuffer); - gridShader.SetBuffer(insertSimplicesKernel, "neighborCounts", neighborCounts); - gridShader.SetBuffer(insertSimplicesKernel, "levelPopulation", levelPopulation); - gridShader.SetBuffer(insertSimplicesKernel, "cellCoords", solver.cellCoordsBuffer); - gridShader.SetBuffer(insertSimplicesKernel, "cellCounts", cellCounts); - gridShader.SetBuffer(insertSimplicesKernel, "offsetInCell", offsetInCell); - gridShader.SetBuffer(insertSimplicesKernel, "cellOffsets", cellOffsets); - gridShader.Dispatch(insertSimplicesKernel, simplexThreadGroups, 1, 1); - - // find populated grid levels: - gridShader.SetBuffer(gridPopulationKernel, "levelPopulation", levelPopulation); - gridShader.Dispatch(gridPopulationKernel, 1, 1, 1); - - // sort cells along morton curve: - gridShader.SetBuffer(mortonSortKernel, "mortonSortedCellHashes", mortonSortedCellHashes); - gridShader.SetBuffer(mortonSortKernel, "cellOffsets", cellOffsets); - gridShader.SetBuffer(mortonSortKernel, "cellCounts", cellCounts); - - int numPairs = ObiUtils.CeilToPowerOfTwo(maxCells) / 2; - int numStages = (int)Mathf.Log(numPairs * 2, 2); - int groups = ComputeMath.ThreadGroupCount(numPairs, 128); - - for (int stageIndex = 0; stageIndex < numStages; stageIndex++) - { - for (int stepIndex = 0; stepIndex < stageIndex + 1; stepIndex++) - { - int groupWidth = 1 << (stageIndex - stepIndex); - int groupHeight = 2 * groupWidth - 1; - gridShader.SetInt("groupWidth", groupWidth); - gridShader.SetInt("groupHeight", groupHeight); - gridShader.SetInt("stepIndex", stepIndex); - gridShader.Dispatch(mortonSortKernel, groups, 1, 1); - } - } - - // build morton indices: - gridShader.SetBuffer(buildMortonKernel, "mortonSortedCellHashes", mortonSortedCellHashes); - gridShader.SetBuffer(buildMortonKernel, "cellHashToMortonIndex", cellHashToMortonIndex); - gridShader.Dispatch(buildMortonKernel, cellThreadGroups, 1, 1); - - // prefix sum to build cell start array: - cellsPrefixSum.Sum(cellCounts, cellOffsets); - - // sort simplex indices and compact fluid simplex indices: - gridShader.SetBuffer(sortSimplicesKernel, "phases", solver.phasesBuffer); - gridShader.SetBuffer(sortSimplicesKernel, "cellHashToMortonIndex", cellHashToMortonIndex); - gridShader.SetBuffer(sortSimplicesKernel, "sortedSimplexIndices", sortedSimplexIndices); - gridShader.SetBuffer(sortSimplicesKernel, "sortedFluidIndices", sortedFluidIndices); - gridShader.SetBuffer(sortSimplicesKernel, "R_offsetInCell", offsetInCell); - gridShader.SetBuffer(sortSimplicesKernel, "R_cellOffsets", cellOffsets); - gridShader.SetBuffer(sortSimplicesKernel, "R_cellCoords", solver.cellCoordsBuffer); - gridShader.SetBuffer(sortSimplicesKernel, "simplices", solver.simplices); - gridShader.Dispatch(sortSimplicesKernel, simplexThreadGroups, 1, 1); - - // prefix sum of fluid flags: - fluidPrefixSum.Sum(sortedFluidIndices, sortedSimplexToFluid); - - // build fluid dispatch buffer: - gridShader.SetBuffer(buildFluidDispatchKernel, "fluidDispatchBuffer", solver.fluidDispatchBuffer); - gridShader.SetBuffer(buildFluidDispatchKernel, "sortedFluidIndices", sortedFluidIndices); - gridShader.SetBuffer(buildFluidDispatchKernel, "sortedSimplexToFluid", sortedSimplexToFluid); - gridShader.Dispatch(buildFluidDispatchKernel, 1, 1, 1); - - // sort fluid data: - gridShader.SetBuffer(sortFluidSimplicesKernel, "sortedFluidIndices", sortedFluidIndices); - gridShader.SetBuffer(sortFluidSimplicesKernel, "cellHashToMortonIndex", cellHashToMortonIndex); - gridShader.SetBuffer(sortFluidSimplicesKernel, "positions", solver.positionsBuffer); - gridShader.SetBuffer(sortFluidSimplicesKernel, "fluidInterface", solver.fluidInterfaceBuffer); - gridShader.SetBuffer(sortFluidSimplicesKernel, "principalRadii", solver.principalRadiiBuffer); - gridShader.SetBuffer(sortFluidSimplicesKernel, "phases", solver.phasesBuffer); - gridShader.SetBuffer(sortFluidSimplicesKernel, "sortedPositions", sortedPositions); - gridShader.SetBuffer(sortFluidSimplicesKernel, "sortedFluidMaterials", sortedFluidMaterials); - gridShader.SetBuffer(sortFluidSimplicesKernel, "sortedFluidInterface", sortedFluidInterface); - gridShader.SetBuffer(sortFluidSimplicesKernel, "sortedPrincipalRadii", sortedPrincipalRadii); - gridShader.SetBuffer(sortFluidSimplicesKernel, "fluidMaterials", solver.fluidMaterialsBuffer); - gridShader.SetBuffer(sortFluidSimplicesKernel, "R_offsetInCell", offsetInCell); - gridShader.SetBuffer(sortFluidSimplicesKernel, "R_cellOffsets", cellOffsets); - gridShader.SetBuffer(sortFluidSimplicesKernel, "R_cellCoords", solver.cellCoordsBuffer); - gridShader.SetBuffer(sortFluidSimplicesKernel, "sortedSimplexToFluid", sortedSimplexToFluid); - gridShader.SetBuffer(sortFluidSimplicesKernel, "simplices", solver.simplices); - gridShader.SetBuffer(sortFluidSimplicesKernel, "fluidDispatchBuffer", solver.fluidDispatchBuffer); - gridShader.Dispatch(sortFluidSimplicesKernel, simplexThreadGroups, 1, 1); - } - } - - public void GenerateContacts(ComputeSolverImpl solver) - { - if (solver.simplexCounts.simplexCount > 0) - { - int simplexThreadGroups = ComputeMath.ThreadGroupCount(solver.simplexCounts.simplexCount, 128); - - // generate contacts list: - gridShader.SetBuffer(contactsKernel, "simplices", solver.simplices); - gridShader.SetBuffer(contactsKernel, "sortedSimplexIndices", sortedSimplexIndices); - gridShader.SetBuffer(contactsKernel, "sortedPositions", sortedPositions); - gridShader.SetBuffer(contactsKernel, "sortedFluidMaterials", sortedFluidMaterials); - gridShader.SetBuffer(contactsKernel, "positions", solver.positionsBuffer); - - gridShader.SetBuffer(contactsKernel, "cellHashToMortonIndex", cellHashToMortonIndex); - gridShader.SetBuffer(contactsKernel, "restPositions", solver.restPositionsBuffer); - gridShader.SetBuffer(contactsKernel, "orientations", solver.orientationsBuffer); - gridShader.SetBuffer(contactsKernel, "restOrientations", solver.restOrientationsBuffer); - gridShader.SetBuffer(contactsKernel, "velocities", solver.velocitiesBuffer); - gridShader.SetBuffer(contactsKernel, "invMasses", solver.invMassesBuffer); - gridShader.SetBuffer(contactsKernel, "phases", solver.phasesBuffer); - gridShader.SetBuffer(contactsKernel, "filters", solver.filtersBuffer); - gridShader.SetBuffer(contactsKernel, "principalRadii", solver.principalRadiiBuffer); - gridShader.SetBuffer(contactsKernel, "normals", solver.normalsBuffer); - gridShader.SetBuffer(contactsKernel, "R_cellCoords", solver.cellCoordsBuffer); - gridShader.SetBuffer(contactsKernel, "R_cellOffsets", cellOffsets); - gridShader.SetBuffer(contactsKernel, "R_cellCounts", cellCounts); - gridShader.SetBuffer(contactsKernel, "R_offsetInCell", offsetInCell); - gridShader.SetBuffer(contactsKernel, "R_levelPopulation", levelPopulation); - gridShader.SetBuffer(contactsKernel, "particleContacts", solver.abstraction.particleContacts.computeBuffer); - gridShader.SetBuffer(contactsKernel, "contactPairs", contactPairs); - gridShader.SetBuffer(contactsKernel, "dispatchBuffer", dispatchBuffer); - gridShader.Dispatch(contactsKernel, simplexThreadGroups, 1, 1); - } - } - - public void GenerateFluidNeighborhoods(ComputeSolverImpl solver) - { - if (solver.simplexCounts.simplexCount > 0) - { - // generate fluid neighbors list: - gridShader.SetBuffer(sameLevelNeighborsKernel, "solverBounds", solver.reducedBounds); - gridShader.SetBuffer(sameLevelNeighborsKernel, "cellHashToMortonIndex", cellHashToMortonIndex); - gridShader.SetBuffer(sameLevelNeighborsKernel, "sortedFluidIndices", sortedFluidIndices); - gridShader.SetBuffer(sameLevelNeighborsKernel, "sortedPositions", sortedPositions); - gridShader.SetBuffer(sameLevelNeighborsKernel, "sortedFluidMaterials", sortedFluidMaterials); - gridShader.SetBuffer(sameLevelNeighborsKernel, "R_cellCoords", solver.cellCoordsBuffer); - gridShader.SetBuffer(sameLevelNeighborsKernel, "R_cellOffsets", cellOffsets); - gridShader.SetBuffer(sameLevelNeighborsKernel, "R_cellCounts", cellCounts); - gridShader.SetBuffer(sameLevelNeighborsKernel, "R_offsetInCell", offsetInCell); - gridShader.SetBuffer(sameLevelNeighborsKernel, "R_levelPopulation", levelPopulation); - gridShader.SetBuffer(sameLevelNeighborsKernel, "sortedSimplexToFluid", sortedSimplexToFluid); - gridShader.SetBuffer(sameLevelNeighborsKernel, "simplices", solver.simplices); - gridShader.SetBuffer(sameLevelNeighborsKernel, "neighbors", neighbors); - gridShader.SetBuffer(sameLevelNeighborsKernel, "neighborCounts", neighborCounts); - gridShader.SetBuffer(sameLevelNeighborsKernel, "dispatchBuffer", solver.fluidDispatchBuffer); - gridShader.DispatchIndirect(sameLevelNeighborsKernel, solver.fluidDispatchBuffer); - - gridShader.SetBuffer(upperLevelsNeighborsKernel, "solverBounds", solver.reducedBounds); - gridShader.SetBuffer(upperLevelsNeighborsKernel, "cellHashToMortonIndex", cellHashToMortonIndex); - gridShader.SetBuffer(upperLevelsNeighborsKernel, "sortedPositions", sortedPositions); - gridShader.SetBuffer(upperLevelsNeighborsKernel, "sortedFluidIndices", sortedFluidIndices); - gridShader.SetBuffer(upperLevelsNeighborsKernel, "mortonSortedSimplexIndices", mortonSortedCellHashes); - gridShader.SetBuffer(upperLevelsNeighborsKernel, "sortedFluidMaterials", sortedFluidMaterials); - gridShader.SetBuffer(upperLevelsNeighborsKernel, "R_cellCoords", solver.cellCoordsBuffer); - gridShader.SetBuffer(upperLevelsNeighborsKernel, "R_cellOffsets", cellOffsets); - gridShader.SetBuffer(upperLevelsNeighborsKernel, "R_cellCounts", cellCounts); - gridShader.SetBuffer(upperLevelsNeighborsKernel, "R_offsetInCell", offsetInCell); - gridShader.SetBuffer(upperLevelsNeighborsKernel, "R_levelPopulation", levelPopulation); - gridShader.SetBuffer(upperLevelsNeighborsKernel, "sortedSimplexToFluid", sortedSimplexToFluid); - gridShader.SetBuffer(upperLevelsNeighborsKernel, "simplices", solver.simplices); - gridShader.SetBuffer(upperLevelsNeighborsKernel, "neighbors", neighbors); - gridShader.SetBuffer(upperLevelsNeighborsKernel, "neighborCounts", neighborCounts); - gridShader.SetBuffer(upperLevelsNeighborsKernel, "dispatchBuffer", solver.fluidDispatchBuffer); - gridShader.DispatchIndirect(upperLevelsNeighborsKernel, solver.fluidDispatchBuffer); - - gridShader.SetBuffer(buildFluidIndexBufferKernel, "sortedFluidIndices", sortedFluidIndices); - gridShader.SetBuffer(buildFluidIndexBufferKernel, "simplices", solver.simplices); - gridShader.SetBuffer(buildFluidIndexBufferKernel, "dispatchBuffer", solver.fluidDispatchBuffer); - gridShader.DispatchIndirect(buildFluidIndexBufferKernel, solver.fluidDispatchBuffer); - } - } - } -} diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/DataStructures/ComputeParticleGrid.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/DataStructures/ComputeParticleGrid.cs.meta deleted file mode 100644 index 3316aef4d..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/DataStructures/ComputeParticleGrid.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4965240eebe4141968c02c8af6c340ef -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/DataStructures/ComputePrefixSum.cs b/Assets/Obi/Scripts/Common/Backends/Compute/DataStructures/ComputePrefixSum.cs deleted file mode 100644 index 4f29ab9f3..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/DataStructures/ComputePrefixSum.cs +++ /dev/null @@ -1,82 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using Obi; -using UnityEngine; - -namespace Obi -{ - public class ComputePrefixSum - { - private ComputeShader scanShader; - private int scanInBucketKernel; - private int scanAddBucketResult; - - private List blockSums = new List(); - private List prefixBlockSums = new List(); - private int inputSize; - private const int threadsPerGroup = 512; - - public ComputePrefixSum(int inputSize) - { - scanShader = Resources.Load("Compute/Scan"); - scanInBucketKernel = scanShader.FindKernel("ScanInBucketExclusive"); - scanAddBucketResult = scanShader.FindKernel("ScanAddBucketResult"); - - this.inputSize = inputSize; - - // intermediate auxiliary buffers to store prefix sum of partial block sums: - int c = inputSize; - while (c > 1) - { - c = (c + threadsPerGroup - 1) / threadsPerGroup; - blockSums.Add(new GraphicsBuffer(GraphicsBuffer.Target.Structured, c, 4)); - prefixBlockSums.Add(new GraphicsBuffer(GraphicsBuffer.Target.Structured, c, 4)); - } - } - - public void Dispose() - { - foreach (var sums in blockSums) - if (sums != null && sums.IsValid()) - sums.Dispose(); - blockSums.Clear(); - - foreach (var sums in prefixBlockSums) - if (sums != null && sums.IsValid()) - sums.Dispose(); - prefixBlockSums.Clear(); - } - - public void Sum(GraphicsBuffer input, GraphicsBuffer result) - { - if (input.count != inputSize) - return; - Sum(input, result, input.count, 0); - } - - private void Sum(GraphicsBuffer input, GraphicsBuffer result, int count, int level) - { - int groups = (count + threadsPerGroup - 1) / threadsPerGroup; - - // calculate partial prefix sums, one per block: - scanShader.SetInt("count", count); - scanShader.SetBuffer(scanInBucketKernel, "_Input", input); - scanShader.SetBuffer(scanInBucketKernel, "_Result", result); - scanShader.SetBuffer(scanInBucketKernel, "_BlockSum", blockSums[level]); - scanShader.Dispatch(scanInBucketKernel, groups, 1, 1); - - if (groups <= 1) - return; - - // recursively calculate prefix sum of the partial block sums: - Sum(blockSums[level], prefixBlockSums[level], groups, level + 1); - - // add the scanned partial block sums to the result: - // (it's important to set the count again, as we just returned from a recursive call). - scanShader.SetInt("count", count); - scanShader.SetBuffer(scanAddBucketResult, "_Input", prefixBlockSums[level]); - scanShader.SetBuffer(scanAddBucketResult, "_Result", result); - scanShader.Dispatch(scanAddBucketResult, groups, 1, 1); - } - } -} \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/DataStructures/ComputePrefixSum.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/DataStructures/ComputePrefixSum.cs.meta deleted file mode 100644 index 09aece2e8..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/DataStructures/ComputePrefixSum.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7909b2c7733204ec39181859400b780e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/DataStructures/ComputeSort.cs b/Assets/Obi/Scripts/Common/Backends/Compute/DataStructures/ComputeSort.cs deleted file mode 100644 index 26c6af2bf..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/DataStructures/ComputeSort.cs +++ /dev/null @@ -1,46 +0,0 @@ -using UnityEngine; - -namespace Obi -{ - public class ComputeSort - { - private ComputeShader sortShader; - private int sortKernel; - - public ComputeSort() - { - sortShader = Resources.Load("Compute/BitonicSort"); - sortKernel = sortShader.FindKernel("BitonicSort"); - } - - public void Sort(GraphicsBuffer keys, GraphicsBuffer values) - { - if (keys.count != values.count) - return; - - sortShader.SetInt("numEntries", keys.count); - sortShader.SetBuffer(sortKernel, "Keys", keys); - sortShader.SetBuffer(sortKernel, "Values", values); - - // Launch each step of the sorting algorithm (once the previous step is complete) - // Number of steps = [log2(n) * (log2(n) + 1)] / 2 - // where n = nearest power of 2 that is greater or equal to the number of inputs - int numPairs = ObiUtils.CeilToPowerOfTwo(keys.count) / 2; - int numStages = (int)Mathf.Log(numPairs * 2, 2); - int groups = ComputeMath.ThreadGroupCount(numPairs, 128); - - for (int stageIndex = 0; stageIndex < numStages; stageIndex++) - { - for (int stepIndex = 0; stepIndex < stageIndex + 1; stepIndex++) - { - int groupWidth = 1 << (stageIndex - stepIndex); - int groupHeight = 2 * groupWidth - 1; - sortShader.SetInt("groupWidth", groupWidth); - sortShader.SetInt("groupHeight", groupHeight); - sortShader.SetInt("stepIndex", stepIndex); - sortShader.Dispatch(sortKernel, groups,1,1); - } - } - } - } -} \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/DataStructures/ComputeSort.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/DataStructures/ComputeSort.cs.meta deleted file mode 100644 index 4705d4209..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/DataStructures/ComputeSort.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: bda407cc694ed4b438cfea3d847ee85f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Queries/ComputeBoxQuery.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Queries/ComputeBoxQuery.cs deleted file mode 100644 index 9e40726a3..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Queries/ComputeBoxQuery.cs +++ /dev/null @@ -1,42 +0,0 @@ -using UnityEngine; - -namespace Obi -{ - public class ComputeBoxQuery - { - private ComputeShader shader; - private int kernel; - - public ComputeBoxQuery() - { - shader = GameObject.Instantiate(Resources.Load("Compute/BoxShapeQuery")); - kernel = shader.FindKernel("GenerateResults"); - } - - public void GetResults(ComputeSolverImpl solver, SpatialQueries world, GraphicsBuffer transforms, GraphicsBuffer shapes, GraphicsBuffer results) - { - shader.SetInt("maxContacts", ComputeColliderWorld.maxContacts); - shader.SetInt("pointCount", solver.simplexCounts.pointCount); - shader.SetInt("edgeCount", solver.simplexCounts.edgeCount); - shader.SetInt("triangleCount", solver.simplexCounts.triangleCount); - shader.SetInt("surfaceCollisionIterations", solver.abstraction.parameters.surfaceCollisionIterations); - shader.SetFloat("surfaceCollisionTolerance", solver.abstraction.parameters.surfaceCollisionTolerance); - shader.SetFloat("collisionMargin", solver.abstraction.parameters.collisionMargin); - - shader.SetBuffer(kernel, "worldToSolver", solver.worldToSolverBuffer); - shader.SetBuffer(kernel, "simplices", solver.simplices); - shader.SetBuffer(kernel, "positions", solver.positionsBuffer); - shader.SetBuffer(kernel, "orientations", solver.orientationsBuffer); - shader.SetBuffer(kernel, "velocities", solver.velocitiesBuffer); - shader.SetBuffer(kernel, "principalRadii", solver.principalRadiiBuffer); - shader.SetBuffer(kernel, "transforms", transforms); - shader.SetBuffer(kernel, "shapes", shapes); - shader.SetBuffer(kernel, "contactPairs", world.contactPairs); - shader.SetBuffer(kernel, "contactOffsetsPerType", world.contactOffsetsPerType); - shader.SetBuffer(kernel, "results", results); - shader.SetBuffer(kernel, "dispatchBuffer", world.dispatchBuffer); - shader.DispatchIndirect(kernel, world.dispatchBuffer, 32 + 16 * (int)QueryShape.QueryType.Box); - } - - } -} diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Queries/ComputeBoxQuery.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Queries/ComputeBoxQuery.cs.meta deleted file mode 100644 index 1236be060..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Queries/ComputeBoxQuery.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8956fcafa2f984a80a9448fb71a11c7d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Queries/ComputeRayQuery.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Queries/ComputeRayQuery.cs deleted file mode 100644 index 4fe96fd1d..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Queries/ComputeRayQuery.cs +++ /dev/null @@ -1,42 +0,0 @@ -using UnityEngine; - -namespace Obi -{ - public class ComputeRayQuery - { - private ComputeShader shader; - private int kernel; - - public ComputeRayQuery() - { - shader = GameObject.Instantiate(Resources.Load("Compute/RayShapeQuery")); - kernel = shader.FindKernel("GenerateResults"); - } - - public void GetResults(ComputeSolverImpl solver, SpatialQueries world, GraphicsBuffer transforms, GraphicsBuffer shapes, GraphicsBuffer results) - { - shader.SetInt("maxContacts", ComputeColliderWorld.maxContacts); - shader.SetInt("pointCount", solver.simplexCounts.pointCount); - shader.SetInt("edgeCount", solver.simplexCounts.edgeCount); - shader.SetInt("triangleCount", solver.simplexCounts.triangleCount); - shader.SetInt("surfaceCollisionIterations", solver.abstraction.parameters.surfaceCollisionIterations); - shader.SetFloat("surfaceCollisionTolerance", solver.abstraction.parameters.surfaceCollisionTolerance); - shader.SetFloat("collisionMargin", solver.abstraction.parameters.collisionMargin); - - shader.SetBuffer(kernel, "worldToSolver", solver.worldToSolverBuffer); - shader.SetBuffer(kernel, "simplices", solver.simplices); - shader.SetBuffer(kernel, "positions", solver.positionsBuffer); - shader.SetBuffer(kernel, "orientations", solver.orientationsBuffer); - shader.SetBuffer(kernel, "velocities", solver.velocitiesBuffer); - shader.SetBuffer(kernel, "principalRadii", solver.principalRadiiBuffer); - shader.SetBuffer(kernel, "transforms", transforms); - shader.SetBuffer(kernel, "shapes", shapes); - shader.SetBuffer(kernel, "contactPairs", world.contactPairs); - shader.SetBuffer(kernel, "contactOffsetsPerType", world.contactOffsetsPerType); - shader.SetBuffer(kernel, "results", results); - shader.SetBuffer(kernel, "dispatchBuffer", world.dispatchBuffer); - shader.DispatchIndirect(kernel, world.dispatchBuffer, 32 + 16 * (int)QueryShape.QueryType.Ray); - } - - } -} diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Queries/ComputeRayQuery.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Queries/ComputeRayQuery.cs.meta deleted file mode 100644 index a075d168c..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Queries/ComputeRayQuery.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: df812762d482f4e8c86a698f8062b99a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Queries/ComputeSphereQuery.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Queries/ComputeSphereQuery.cs deleted file mode 100644 index 3c53dfb59..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Queries/ComputeSphereQuery.cs +++ /dev/null @@ -1,42 +0,0 @@ -using UnityEngine; - -namespace Obi -{ - public class ComputeSphereQuery - { - private ComputeShader shader; - private int kernel; - - public ComputeSphereQuery() - { - shader = GameObject.Instantiate(Resources.Load("Compute/SphereShapeQuery")); - kernel = shader.FindKernel("GenerateResults"); - } - - public void GetResults(ComputeSolverImpl solver, SpatialQueries world, GraphicsBuffer transforms, GraphicsBuffer shapes, GraphicsBuffer results) - { - shader.SetInt("maxContacts", ComputeColliderWorld.maxContacts); - shader.SetInt("pointCount", solver.simplexCounts.pointCount); - shader.SetInt("edgeCount", solver.simplexCounts.edgeCount); - shader.SetInt("triangleCount", solver.simplexCounts.triangleCount); - shader.SetInt("surfaceCollisionIterations", solver.abstraction.parameters.surfaceCollisionIterations); - shader.SetFloat("surfaceCollisionTolerance", solver.abstraction.parameters.surfaceCollisionTolerance); - shader.SetFloat("collisionMargin", solver.abstraction.parameters.collisionMargin); - - shader.SetBuffer(kernel, "worldToSolver", solver.worldToSolverBuffer); - shader.SetBuffer(kernel, "simplices", solver.simplices); - shader.SetBuffer(kernel, "positions", solver.positionsBuffer); - shader.SetBuffer(kernel, "orientations", solver.orientationsBuffer); - shader.SetBuffer(kernel, "velocities", solver.velocitiesBuffer); - shader.SetBuffer(kernel, "principalRadii", solver.principalRadiiBuffer); - shader.SetBuffer(kernel, "transforms", transforms); - shader.SetBuffer(kernel, "shapes", shapes); - shader.SetBuffer(kernel, "contactPairs", world.contactPairs); - shader.SetBuffer(kernel, "contactOffsetsPerType", world.contactOffsetsPerType); - shader.SetBuffer(kernel, "results", results); - shader.SetBuffer(kernel, "dispatchBuffer", world.dispatchBuffer); - shader.DispatchIndirect(kernel, world.dispatchBuffer, 32 + 16 * (int)QueryShape.QueryType.Sphere); - } - - } -} diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Queries/ComputeSphereQuery.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Queries/ComputeSphereQuery.cs.meta deleted file mode 100644 index 5eb442cca..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Queries/ComputeSphereQuery.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c65e1510ca8a54514b0a6a06c37a48fc -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/Common.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/Common.meta deleted file mode 100644 index 3fc9d9a39..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/Common.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 17503ab71a29b454ab068ea80d5f203c -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/Common/ComputeFoamRenderSystem.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/Common/ComputeFoamRenderSystem.cs deleted file mode 100644 index dea63a81c..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/Common/ComputeFoamRenderSystem.cs +++ /dev/null @@ -1,155 +0,0 @@ -using UnityEngine; -using UnityEngine.Rendering; -#if (SRP_UNIVERSAL) -using UnityEngine.Rendering.Universal; -#endif - -namespace Obi -{ - - public class ComputeFoamRenderSystem : ObiFoamRenderSystem - { - - private ComputeShader foamShader; - private int sortKernel; - private int clearMeshKernel; - private int buildMeshKernel; - - protected Material thickness_Material; - protected Material color_Material; - protected LocalKeyword shader2DFeature; - - public ComputeFoamRenderSystem(ObiSolver solver) : base (solver) - { - foamShader = GameObject.Instantiate(Resources.Load("Compute/FluidFoam")); - sortKernel = foamShader.FindKernel("Sort"); - clearMeshKernel = foamShader.FindKernel("ClearMesh"); - buildMeshKernel = foamShader.FindKernel("BuildMesh"); - -#if (SRP_UNIVERSAL) - if (GraphicsSettings.currentRenderPipeline is UniversalRenderPipelineAsset) - renderBatch = new ProceduralRenderBatch(0, Resources.Load("ObiMaterials/URP/Fluid/FoamParticlesURP"), new RenderBatchParams(true)); - else -#endif - renderBatch = new ProceduralRenderBatch(0, Resources.Load("ObiMaterials/Fluid/FoamParticles"), new RenderBatchParams(true)); - - renderBatch.vertexCount = (int)m_Solver.maxFoamParticles * 4; - renderBatch.triangleCount = (int)m_Solver.maxFoamParticles * 2; - renderBatch.Initialize(layout, true); - } - - private void ReallocateParticleBuffers() - { - // in case the amount of particles allocated does not match - // the amount requested by the solver, reallocate - if (m_Solver.foamPositions.count * 4 != renderBatch.vertexCount) - { - renderBatch.Dispose(); - renderBatch.vertexCount = m_Solver.foamPositions.count * 4; - renderBatch.triangleCount = m_Solver.foamPositions.count * 2; - renderBatch.Initialize(layout, true); - } - } - - public override void Setup() - { - using (m_SetupRenderMarker.Auto()) - { - for (int i = 0; i < renderers.Count; ++i) - { - renderers[i].actor.solverIndices.AsComputeBuffer(); - } - } - } - - public override void Step() - { - // update solver indices, since particles may have died while updating the emitter. - for (int i = 0; i < renderers.Count; ++i) - { - renderers[i].actor.solverIndices.Upload(); - } - } - - public override void Render() - { - var solver = m_Solver.implementation as ComputeSolverImpl; - - if (!Application.isPlaying) - return; - - ReallocateParticleBuffers(); - - if (solver.activeParticlesBuffer == null || solver.abstraction.foamPositions.computeBuffer == null) - return; - - foreach (Camera camera in cameras) - { - if (camera == null) - continue; - - // sort by distance to camera: - foamShader.SetVector("sortAxis", solver.abstraction.transform.InverseTransformDirection(camera.transform.forward)); - foamShader.SetBuffer(sortKernel, "outputPositions", solver.abstraction.foamPositions.computeBuffer); - foamShader.SetBuffer(sortKernel, "outputVelocities", solver.abstraction.foamVelocities.computeBuffer); - foamShader.SetBuffer(sortKernel, "outputColors", solver.abstraction.foamColors.computeBuffer); - foamShader.SetBuffer(sortKernel, "outputAttributes", solver.abstraction.foamAttributes.computeBuffer); - foamShader.SetBuffer(sortKernel, "dispatch", solver.abstraction.foamCount.computeBuffer); - - int numPairs = ObiUtils.CeilToPowerOfTwo(m_Solver.foamPositions.count) / 2; - int numStages = (int)Mathf.Log(numPairs * 2, 2); - int groups = ComputeMath.ThreadGroupCount(numPairs, 128); - - for (int stageIndex = 0; stageIndex < numStages; stageIndex++) - { - for (int stepIndex = 0; stepIndex < stageIndex + 1; stepIndex++) - { - int groupWidth = 1 << (stageIndex - stepIndex); - int groupHeight = 2 * groupWidth - 1; - foamShader.SetInt("groupWidth", groupWidth); - foamShader.SetInt("groupHeight", groupHeight); - foamShader.SetInt("stepIndex", stepIndex); - foamShader.Dispatch(sortKernel, groups, 1, 1); - } - } - - // build mesh: - int threadGroups = ComputeMath.ThreadGroupCount(m_Solver.foamPositions.count, 128); - foamShader.SetInt("maxFoamParticles", m_Solver.foamPositions.count); - foamShader.SetBuffer(clearMeshKernel, "indices", renderBatch.gpuIndexBuffer); - foamShader.Dispatch(clearMeshKernel, threadGroups, 1, 1); - - foamShader.SetBuffer(buildMeshKernel, "inputPositions", solver.abstraction.foamPositions.computeBuffer); - foamShader.SetBuffer(buildMeshKernel, "inputVelocities", solver.abstraction.foamVelocities.computeBuffer); - foamShader.SetBuffer(buildMeshKernel, "inputColors", solver.abstraction.foamColors.computeBuffer); - foamShader.SetBuffer(buildMeshKernel, "inputAttributes", solver.abstraction.foamAttributes.computeBuffer); - - foamShader.SetBuffer(buildMeshKernel, "vertices", renderBatch.gpuVertexBuffer); - foamShader.SetBuffer(buildMeshKernel, "indices", renderBatch.gpuIndexBuffer); - foamShader.SetBuffer(buildMeshKernel, "dispatch", solver.abstraction.foamCount.computeBuffer); - - foamShader.DispatchIndirect(buildMeshKernel, solver.abstraction.foamCount.computeBuffer); - - matProps.SetFloat("_FadeDepth", 0); - matProps.SetFloat("_VelocityStretching", m_Solver.maxFoamVelocityStretch); - matProps.SetFloat("_RadiusScale", m_Solver.foamRadiusScale); - matProps.SetFloat("_FadeIn", m_Solver.foamFade.x); - matProps.SetFloat("_FadeOut", m_Solver.foamFade.y); - matProps.SetFloat("_ScatterDensity", m_Solver.foamVolumeDensity); - matProps.SetFloat("_AmbientDensity", m_Solver.foamAmbientDensity); - matProps.SetColor("_ScatterColor", m_Solver.foamScatterColor); - matProps.SetColor("_AmbientColor", m_Solver.foamAmbientColor); - - var rp = renderBatch.renderParams; - rp.worldBounds = m_Solver.bounds; - rp.camera = camera; - rp.matProps = matProps; - rp.shadowCastingMode = ShadowCastingMode.Off; - - Graphics.RenderMesh(rp, renderBatch.mesh, 0, m_Solver.transform.localToWorldMatrix, m_Solver.transform.localToWorldMatrix); - } - } - - } -} - diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/Common/ComputeFoamRenderSystem.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/Common/ComputeFoamRenderSystem.cs.meta deleted file mode 100644 index 07ab5673a..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/Common/ComputeFoamRenderSystem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 79b1bf3bc315944669288e5529915a5f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/Common/ComputeInstancedParticleRenderSystem.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/Common/ComputeInstancedParticleRenderSystem.cs deleted file mode 100644 index 08e235cb7..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/Common/ComputeInstancedParticleRenderSystem.cs +++ /dev/null @@ -1,104 +0,0 @@ -using UnityEngine; -using UnityEngine.Rendering; - -using Unity.Profiling; -using System.Collections.Generic; -using Unity.Collections; - -namespace Obi -{ - public class ComputeInstancedParticleRenderSystem : ObiInstancedParticleRenderSystem - { - - private ComputeShader instanceShader; - private int updateKernel; - private uint[] args = new uint[5] { 0, 0, 0, 0, 0 }; - - public ComputeInstancedParticleRenderSystem(ObiSolver solver) : base(solver) - { - instanceShader = GameObject.Instantiate(Resources.Load("Compute/InstancedParticleRendering")); - updateKernel = instanceShader.FindKernel("UpdateParticleInstances"); - } - - protected override void CloseBatches() - { - // Initialize each batch: - for (int i = 0; i < batchList.Count; ++i) - batchList[i].Initialize(true); - } - - public override void Setup() - { - base.Setup(); - - activeParticles.AsComputeBuffer(); - rendererData.AsComputeBuffer(); - rendererIndex.AsComputeBuffer(); - - instanceTransforms.AsComputeBuffer(); - invInstanceTransforms.AsComputeBuffer(); - instanceColors.AsComputeBuffer(); - } - - public override void Render() - { - using (m_RenderMarker.Auto()) - { - - var computeSolver = m_Solver.implementation as ComputeSolverImpl; - - if (computeSolver.renderablePositionsBuffer != null && computeSolver.renderablePositionsBuffer.count > 0 && activeParticles.count > 0) - { - instanceShader.SetBuffer(updateKernel, "activeParticles", activeParticles.computeBuffer); - instanceShader.SetBuffer(updateKernel, "rendererData", rendererData.computeBuffer); - instanceShader.SetBuffer(updateKernel, "rendererIndex", rendererIndex.computeBuffer); - - instanceShader.SetBuffer(updateKernel, "renderablePositions", computeSolver.renderablePositionsBuffer); - instanceShader.SetBuffer(updateKernel, "renderableOrientations", computeSolver.renderableOrientationsBuffer); - instanceShader.SetBuffer(updateKernel, "renderableRadii", computeSolver.renderableRadiiBuffer); - instanceShader.SetBuffer(updateKernel, "colors", computeSolver.colorsBuffer); - - instanceShader.SetBuffer(updateKernel, "instanceTransforms", instanceTransforms.computeBuffer); - instanceShader.SetBuffer(updateKernel, "invInstanceTransforms", invInstanceTransforms.computeBuffer); - instanceShader.SetBuffer(updateKernel, "instanceColors", instanceColors.computeBuffer); - - instanceShader.SetMatrix("solverToWorld", m_Solver.transform.localToWorldMatrix); - - instanceShader.SetInt("particleCount", activeParticles.count); - int threadGroups = ComputeMath.ThreadGroupCount(activeParticles.count, 128); - - instanceShader.Dispatch(updateKernel, threadGroups, 1, 1); - - MaterialPropertyBlock mpb = new MaterialPropertyBlock(); - mpb.SetBuffer("_InstanceTransforms", instanceTransforms.computeBuffer); - mpb.SetBuffer("_InvInstanceTransforms", invInstanceTransforms.computeBuffer); - mpb.SetBuffer("_Colors", instanceColors.computeBuffer); - - for (int i = 0; i < batchList.Count; ++i) - { - var batch = batchList[i]; - - if (batch.mesh == null) - continue; - - args[0] = (uint)batch.mesh.GetIndexCount(0); - args[1] = (uint)batch.instanceCount; - args[2] = (uint)batch.mesh.GetIndexStart(0); - args[3] = (uint)batch.mesh.GetBaseVertex(0); - args[4] = (uint)batch.firstInstance; - batch.argsBuffer.SetData(args); - - var rp = batch.renderParams; - rp.material = batch.material; - rp.worldBounds = m_Solver.bounds; - rp.matProps = mpb; - - Graphics.RenderMeshIndirect(rp, batch.mesh, batch.argsBuffer); - } - } - } - } - - } -} - diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/Common/ComputeInstancedParticleRenderSystem.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/Common/ComputeInstancedParticleRenderSystem.cs.meta deleted file mode 100644 index 39147cf50..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/Common/ComputeInstancedParticleRenderSystem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f8b509404001c45aba2b5d70bed9ad1f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/Common/ComputeParticleRenderSystem.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/Common/ComputeParticleRenderSystem.cs deleted file mode 100644 index 1508f19cd..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/Common/ComputeParticleRenderSystem.cs +++ /dev/null @@ -1,71 +0,0 @@ -using UnityEngine; - -namespace Obi -{ - - public class ComputeParticleRenderSystem : ObiParticleRenderSystem - { - public ComputeShader meshComputeShader; - private int buildMeshKernel; - - public ComputeParticleRenderSystem(ObiSolver solver) : base(solver) - { - meshComputeShader = GameObject.Instantiate(Resources.Load("Compute/ParticleMeshBuilding")); - buildMeshKernel = meshComputeShader.FindKernel("BuildMesh"); - } - - protected override void CloseBatches() - { - // Initialize each batch: - for (int i = 0; i < batchList.Count; ++i) - batchList[i].Initialize(layout, true); - - activeParticles.AsComputeBuffer(); - rendererIndex.AsComputeBuffer(); - rendererData.AsComputeBuffer(); - } - - public override void Render() - { - using (m_RenderMarker.Auto()) - { - var solver = m_Solver.implementation as ComputeSolverImpl; - - if (solver.renderablePositionsBuffer != null && - activeParticles.computeBuffer != null && - solver.renderablePositionsBuffer.count > 0) - { - meshComputeShader.SetBuffer(buildMeshKernel, "particleIndices", activeParticles.computeBuffer); - - meshComputeShader.SetBuffer(buildMeshKernel, "positions", solver.renderablePositionsBuffer); - meshComputeShader.SetBuffer(buildMeshKernel, "orientations", solver.renderableOrientationsBuffer); - meshComputeShader.SetBuffer(buildMeshKernel, "radii", solver.renderableRadiiBuffer); - meshComputeShader.SetBuffer(buildMeshKernel, "colors", solver.colorsBuffer); - - meshComputeShader.SetBuffer(buildMeshKernel, "rendererIndices", rendererIndex.computeBuffer); - meshComputeShader.SetBuffer(buildMeshKernel, "rendererData", rendererData.computeBuffer); - - for (int i = 0; i < batchList.Count; ++i) - { - var batch = batchList[i]; - int threadGroups = ComputeMath.ThreadGroupCount(batch.vertexCount / 4, 128); - - meshComputeShader.SetInt("firstParticle", batch.firstParticle); - meshComputeShader.SetInt("particleCount", batch.vertexCount / 4); - - meshComputeShader.SetBuffer(buildMeshKernel, "vertices", batch.gpuVertexBuffer); - meshComputeShader.SetBuffer(buildMeshKernel, "indices", batch.gpuIndexBuffer); - - meshComputeShader.Dispatch(buildMeshKernel, threadGroups, 1, 1); - - var rp = batch.renderParams; - rp.worldBounds = m_Solver.bounds; - - Graphics.RenderMesh(rp, batch.mesh, 0, m_Solver.transform.localToWorldMatrix, m_Solver.transform.localToWorldMatrix); - } - } - } - } - } -} - diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/Common/ComputeParticleRenderSystem.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/Common/ComputeParticleRenderSystem.cs.meta deleted file mode 100644 index ac29d03b4..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/Common/ComputeParticleRenderSystem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a636d056cf9924c4b9d569058fa42d31 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/RopeAndRod.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/RopeAndRod.meta deleted file mode 100644 index 3242dc7fa..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/RopeAndRod.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 9c226d9f8a58648e789dbd116881847d -labels: -- ObiRope -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/RopeAndRod/ComputeChainRopeRenderSystem.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/RopeAndRod/ComputeChainRopeRenderSystem.cs deleted file mode 100644 index 3c73db958..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/RopeAndRod/ComputeChainRopeRenderSystem.cs +++ /dev/null @@ -1,107 +0,0 @@ -using UnityEngine; -using UnityEngine.Rendering; - -using Unity.Profiling; -using System.Collections.Generic; -using Unity.Collections; - -namespace Obi -{ - public class ComputeChainRopeRenderSystem : ObiChainRopeRenderSystem - { - - private ComputeShader ropeShader; - private int updateKernel; - private uint[] args = new uint[5] { 0, 0, 0, 0, 0 }; - - public ComputeChainRopeRenderSystem(ObiSolver solver) : base(solver) - { - ropeShader = GameObject.Instantiate(Resources.Load("Compute/RopeChainRendering")); - updateKernel = ropeShader.FindKernel("UpdateChainMesh"); - } - - protected override void CloseBatches() - { - // Initialize each batch: - for (int i = 0; i < batchList.Count; ++i) - batchList[i].Initialize(true); - } - - public override void Setup() - { - base.Setup(); - - rendererData.AsComputeBuffer(); - chunkData.AsComputeBuffer(); - modifiers.SafeAsComputeBuffer(); - elements.AsComputeBuffer(); - - instanceTransforms.AsComputeBuffer(); - invInstanceTransforms.AsComputeBuffer(); - instanceColors.AsComputeBuffer(); - - } - - public override void Render() - { - using (m_RenderMarker.Auto()) - { - - var computeSolver = m_Solver.implementation as ComputeSolverImpl; - - if (computeSolver.renderablePositionsBuffer != null && computeSolver.renderablePositionsBuffer.count > 0 && elements.count > 0) - { - ropeShader.SetBuffer(updateKernel, "rendererData", rendererData.computeBuffer); - ropeShader.SetBuffer(updateKernel, "chunksData", chunkData.computeBuffer); - ropeShader.SetBuffer(updateKernel, "modifiers", modifiers.computeBuffer); - ropeShader.SetBuffer(updateKernel, "elements", elements.computeBuffer); - - ropeShader.SetBuffer(updateKernel, "renderablePositions", computeSolver.renderablePositionsBuffer); - ropeShader.SetBuffer(updateKernel, "renderableOrientations", computeSolver.renderableOrientationsBuffer); - ropeShader.SetBuffer(updateKernel, "principalRadii", computeSolver.renderableRadiiBuffer); - ropeShader.SetBuffer(updateKernel, "colors", computeSolver.colorsBuffer); - - ropeShader.SetBuffer(updateKernel, "instanceTransforms", instanceTransforms.computeBuffer); - ropeShader.SetBuffer(updateKernel, "invInstanceTransforms", invInstanceTransforms.computeBuffer); - ropeShader.SetBuffer(updateKernel, "instanceColors", instanceColors.computeBuffer); - - ropeShader.SetMatrix("solverToWorld", m_Solver.transform.localToWorldMatrix); - - ropeShader.SetInt("chunkCount", chunkData.count); - int threadGroups = ComputeMath.ThreadGroupCount(chunkData.count, 32); - - ropeShader.Dispatch(updateKernel, threadGroups, 1, 1); - - MaterialPropertyBlock mpb = new MaterialPropertyBlock(); - mpb.SetBuffer("_InstanceTransforms", instanceTransforms.computeBuffer); - mpb.SetBuffer("_InvInstanceTransforms", invInstanceTransforms.computeBuffer); - mpb.SetBuffer("_Colors", instanceColors.computeBuffer); - - for (int i = 0; i < batchList.Count; ++i) - { - var batch = batchList[i]; - - if (batch.mesh == null) - continue; - - args[0] = (uint)batch.mesh.GetIndexCount(0); - args[1] = (uint)batch.instanceCount; - args[2] = (uint)batch.mesh.GetIndexStart(0); - args[3] = (uint)batch.mesh.GetBaseVertex(0); - args[4] = (uint)batch.firstInstance; - batch.argsBuffer.SetData(args); - - var rp = batch.renderParams; - rp.material = batch.material; - rp.worldBounds = m_Solver.bounds; - rp.matProps = mpb; - - Graphics.RenderMeshIndirect(rp, batch.mesh, batch.argsBuffer); - } - } - } - } - - } -} - diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/RopeAndRod/ComputeChainRopeRenderSystem.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/RopeAndRod/ComputeChainRopeRenderSystem.cs.meta deleted file mode 100644 index 40dadbaf6..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/RopeAndRod/ComputeChainRopeRenderSystem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: fe4c45599ea584be2a1b122fbe7d0ec6 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/RopeAndRod/ComputeExtrudedRopeRenderSystem.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/RopeAndRod/ComputeExtrudedRopeRenderSystem.cs deleted file mode 100644 index 423db6459..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/RopeAndRod/ComputeExtrudedRopeRenderSystem.cs +++ /dev/null @@ -1,101 +0,0 @@ -using UnityEngine; -using UnityEngine.Rendering; - -namespace Obi -{ - public class ComputeExtrudedRopeRenderSystem : ObiExtrudedRopeRenderSystem - { - - private ComputeShader ropeShader; - private int updateKernel; - - public ComputeExtrudedRopeRenderSystem(ObiSolver solver) : base(solver) - { - ropeShader = GameObject.Instantiate(Resources.Load("Compute/RopeExtrudedRendering")); - updateKernel = ropeShader.FindKernel("UpdateRopeMesh"); - } - - - public override void Setup() - { - base.Setup(); - - // Initialize each batch: - for (int i = 0; i < batchList.Count; ++i) - batchList[i].Initialize(layout, true); - - sectionData.AsComputeBuffer(); - sectionOffsets.AsComputeBuffer(); - sectionIndices.AsComputeBuffer(); - - vertexOffsets.AsComputeBuffer(); - triangleOffsets.AsComputeBuffer(); - triangleCounts.AsComputeBuffer(); - - pathSmootherIndices.AsComputeBuffer(); - rendererData.AsComputeBuffer(); - - pathSmootherSystem.chunkOffsets.AsComputeBuffer(); - } - - public override void Render() - { - using (m_RenderMarker.Auto()) - { - if (pathSmootherSystem == null) - return; - - // Single array: Cannot merge into a single vertices array, otherwise we would need to bring back to CPU for passing indices to each mesh. - // Individual meshes: Cannot do each renderer independently (like we do with cloth) since each rope is done sequentially, would not parallelize at all. - // Batches: 1 mesh per batch: best approach, but 1) bounds must be calculated per or solver, so we can only cull entire solver. Culling happens on the CPU, cannot bring back bounds from the CPU. - // Cloth and Softbodies are rendered manually, particles are too. So Ropes could too. - - // In Burst, we need merge all cloth mesh data into array for parallel processing, without using one schedule() per mesh. - // So instead of writing slices of mesh data back to their original meshes, let's create one mesh per batch and draw it ourselves. - // Basically the same as with ropes. - - if (pathSmootherSystem.chunkOffsets != null && pathSmootherSystem.chunkOffsets.count > 0) - { - ropeShader.SetBuffer(updateKernel, "pathSmootherIndices", pathSmootherIndices.computeBuffer); - ropeShader.SetBuffer(updateKernel, "chunkOffsets", pathSmootherSystem.chunkOffsets.computeBuffer); - - ropeShader.SetBuffer(updateKernel, "frames", pathSmootherSystem.smoothFrames.computeBuffer); - ropeShader.SetBuffer(updateKernel, "frameOffsets", pathSmootherSystem.smoothFrameOffsets.computeBuffer); - ropeShader.SetBuffer(updateKernel, "frameCounts", pathSmootherSystem.smoothFrameCounts.computeBuffer); - - ropeShader.SetBuffer(updateKernel, "sectionData", sectionData.computeBuffer); - ropeShader.SetBuffer(updateKernel, "sectionOffsets", sectionOffsets.computeBuffer); - ropeShader.SetBuffer(updateKernel, "sectionIndices", sectionIndices.computeBuffer); - - ropeShader.SetBuffer(updateKernel, "vertexOffsets", vertexOffsets.computeBuffer); - ropeShader.SetBuffer(updateKernel, "triangleOffsets", triangleOffsets.computeBuffer); - ropeShader.SetBuffer(updateKernel, "triangleCounts", triangleCounts.computeBuffer); - - ropeShader.SetBuffer(updateKernel, "extrudedData", rendererData.computeBuffer); - ropeShader.SetBuffer(updateKernel, "pathData", pathSmootherSystem.pathData.computeBuffer); - - for (int i = 0; i < batchList.Count; ++i) - { - var batch = batchList[i]; - int threadGroups = ComputeMath.ThreadGroupCount(batch.rendererCount, 128); - - ropeShader.SetInt("firstRenderer", batch.firstRenderer); - ropeShader.SetInt("rendererCount", batch.rendererCount); - - ropeShader.SetBuffer(updateKernel, "vertices", batch.gpuVertexBuffer); - ropeShader.SetBuffer(updateKernel, "tris", batch.gpuIndexBuffer); - - ropeShader.Dispatch(updateKernel, threadGroups, 1, 1); - - var rp = batch.renderParams; - rp.worldBounds = m_Solver.bounds; - - Graphics.RenderMesh(rp, batch.mesh, 0, m_Solver.transform.localToWorldMatrix, m_Solver.transform.localToWorldMatrix); - } - } - } - } - - } -} - diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/RopeAndRod/ComputeExtrudedRopeRenderSystem.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/RopeAndRod/ComputeExtrudedRopeRenderSystem.cs.meta deleted file mode 100644 index d02481a39..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/RopeAndRod/ComputeExtrudedRopeRenderSystem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f8977537c032b46c680d6b11b587e949 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/RopeAndRod/ComputeLineRopeRenderSystem.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/RopeAndRod/ComputeLineRopeRenderSystem.cs deleted file mode 100644 index 4e1606715..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/RopeAndRod/ComputeLineRopeRenderSystem.cs +++ /dev/null @@ -1,103 +0,0 @@ -using UnityEngine; -using UnityEngine.Rendering; - -using Unity.Profiling; -using System.Collections.Generic; -using Unity.Collections; - -namespace Obi -{ - public class ComputeLineRopeRenderSystem : ObiLineRopeRenderSystem - { - - private ComputeShader ropeShader; - private int updateKernel; - - public ComputeLineRopeRenderSystem(ObiSolver solver) : base(solver) - { - ropeShader = GameObject.Instantiate(Resources.Load("Compute/RopeLineRendering")); - updateKernel = ropeShader.FindKernel("UpdateLineMesh"); - } - - - public override void Setup() - { - base.Setup(); - - // Initialize each batch: - for (int i = 0; i < batchList.Count; ++i) - batchList[i].Initialize(layout, true); - - vertexOffsets.AsComputeBuffer(); - triangleOffsets.AsComputeBuffer(); - triangleCounts.AsComputeBuffer(); - - pathSmootherIndices.AsComputeBuffer(); - rendererData.AsComputeBuffer(); - - pathSmootherSystem.chunkOffsets.AsComputeBuffer(); - - } - - public override void Render() { } - - public override void RenderFromCamera(Camera camera) - { - using (m_RenderMarker.Auto()) - { - if (pathSmootherSystem == null) - return; - - // Single array: Cannot merge into a single vertices array, otherwise we would need to bring back to CPU for passing indices to each mesh. - // Individual meshes: Cannot do each renderer independently (like we do with cloth) since each rope is done sequentially, would not parallelize at all. - // Batches: 1 mesh per batch: best approach, but 1) bounds must be calculated per or solver, so we can only cull entire solver. Culling happens on the CPU, cannot bring back bounds from the CPU. - // Cloth and Softbodies are rendered manually, particles are too. So Ropes could too. - - // In Burst, we need merge all cloth mesh data into array for parallel processing, without using one schedule() per mesh. - // So instead of writing slices of mesh data back to their original meshes, let's create one mesh per batch and draw it ourselves. - // Basically the same as with ropes. - - if (pathSmootherSystem.chunkOffsets != null && pathSmootherSystem.chunkOffsets.count > 0) - { - ropeShader.SetBuffer(updateKernel, "pathSmootherIndices", pathSmootherIndices.computeBuffer); - ropeShader.SetBuffer(updateKernel, "chunkOffsets", pathSmootherSystem.chunkOffsets.computeBuffer); - - ropeShader.SetBuffer(updateKernel, "frames", pathSmootherSystem.smoothFrames.computeBuffer); - ropeShader.SetBuffer(updateKernel, "frameOffsets", pathSmootherSystem.smoothFrameOffsets.computeBuffer); - ropeShader.SetBuffer(updateKernel, "frameCounts", pathSmootherSystem.smoothFrameCounts.computeBuffer); - - ropeShader.SetBuffer(updateKernel, "vertexOffsets", vertexOffsets.computeBuffer); - ropeShader.SetBuffer(updateKernel, "triangleOffsets", triangleOffsets.computeBuffer); - ropeShader.SetBuffer(updateKernel, "triangleCounts", triangleCounts.computeBuffer); - - ropeShader.SetBuffer(updateKernel, "rendererData", rendererData.computeBuffer); - ropeShader.SetBuffer(updateKernel, "pathData", pathSmootherSystem.pathData.computeBuffer); - - ropeShader.SetVector("localSpaceCamera", m_Solver.transform.InverseTransformPoint(camera.transform.position)); - - for (int i = 0; i < batchList.Count; ++i) - { - var batch = batchList[i]; - int threadGroups = ComputeMath.ThreadGroupCount(batch.rendererCount, 128); - - ropeShader.SetInt("firstRenderer", batch.firstRenderer); - ropeShader.SetInt("rendererCount", batch.rendererCount); - - ropeShader.SetBuffer(updateKernel, "vertices", batch.gpuVertexBuffer); - ropeShader.SetBuffer(updateKernel, "tris", batch.gpuIndexBuffer); - - ropeShader.Dispatch(updateKernel, threadGroups, 1, 1); - - var rp = batch.renderParams; - rp.worldBounds = m_Solver.bounds; - rp.camera = camera; - - Graphics.RenderMesh(rp, batch.mesh, 0, m_Solver.transform.localToWorldMatrix, m_Solver.transform.localToWorldMatrix); - } - } - } - } - - } -} - diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/RopeAndRod/ComputeLineRopeRenderSystem.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/RopeAndRod/ComputeLineRopeRenderSystem.cs.meta deleted file mode 100644 index b737e7d32..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/RopeAndRod/ComputeLineRopeRenderSystem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1de4576d2ba2b4966af730ac7a09e224 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/RopeAndRod/ComputeMeshRopeRenderSystem.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/RopeAndRod/ComputeMeshRopeRenderSystem.cs deleted file mode 100644 index 2abb1191d..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/RopeAndRod/ComputeMeshRopeRenderSystem.cs +++ /dev/null @@ -1,108 +0,0 @@ -using UnityEngine; -using UnityEngine.Rendering; - -namespace Obi -{ - - public class ComputeMeshRopeRenderSystem : ObiMeshRopeRenderSystem - { - private ComputeShader ropeShader; - private int updateKernel; - - public ComputeMeshRopeRenderSystem(ObiSolver solver) : base(solver) - { - ropeShader = GameObject.Instantiate(Resources.Load("Compute/RopeMeshRendering")); - updateKernel = ropeShader.FindKernel("UpdateRopeMesh"); - } - - protected override void CloseBatches() - { - // Initialize each batch: - for (int i = 0; i < batchList.Count; ++i) - batchList[i].Initialize(sortedRenderers, meshData, meshIndices, layout, true); - - meshData.PrepareForCompute(); - meshIndices.AsComputeBuffer(); - - sortedIndices.AsComputeBuffer(); - sortedOffsets.AsComputeBuffer(); - - vertexOffsets.AsComputeBuffer(); - - pathSmootherIndices.AsComputeBuffer(); - rendererData.AsComputeBuffer(); - - pathSmootherSystem.chunkOffsets.AsComputeBuffer(); - - base.CloseBatches(); - } - - public override void Render() - { - using (m_RenderMarker.Auto()) - { - if (pathSmootherSystem == null) - return; - - // Single array: Cannot merge into a single vertices array, otherwise we would need to bring back to CPU for passing indices to each mesh. - // Individual meshes: Cannot do each renderer independently (like we do with cloth) since each rope is done sequentially, would not parallelize at all. - // Batches: 1 mesh per batch: best approach, but 1) bounds must be calculated per or solver, so we can only cull entire solver. Culling happens on the CPU, cannot bring back bounds from the CPU. - // Cloth and Softbodies are rendered manually, particles are too. So Ropes could too. - - // In Burst, we need merge all cloth mesh data into array for parallel processing, without using one schedule() per mesh. - // So instead of writing slices of mesh data back to their original meshes, let's create one mesh per batch and draw it ourselves. - // Basically the same as with ropes. - - if (pathSmootherSystem.chunkOffsets != null && pathSmootherSystem.chunkOffsets.count > 0) - { - ropeShader.SetBuffer(updateKernel, "chunkOffsets", pathSmootherSystem.chunkOffsets.computeBuffer); - ropeShader.SetBuffer(updateKernel, "pathSmootherIndices", pathSmootherIndices.computeBuffer); - - ropeShader.SetBuffer(updateKernel, "frames", pathSmootherSystem.smoothFrames.computeBuffer); - ropeShader.SetBuffer(updateKernel, "frameOffsets", pathSmootherSystem.smoothFrameOffsets.computeBuffer); - ropeShader.SetBuffer(updateKernel, "frameCounts", pathSmootherSystem.smoothFrameCounts.computeBuffer); - - ropeShader.SetBuffer(updateKernel, "vertexOffsets", vertexOffsets.computeBuffer); - - ropeShader.SetBuffer(updateKernel, "meshIndices", meshIndices.computeBuffer); - ropeShader.SetBuffer(updateKernel, "meshData", meshData.meshData.computeBuffer); - - ropeShader.SetBuffer(updateKernel, "rendererData", rendererData.computeBuffer); - ropeShader.SetBuffer(updateKernel, "pathData", pathSmootherSystem.pathData.computeBuffer); - - ropeShader.SetBuffer(updateKernel, "sortedIndices", sortedIndices.computeBuffer); - ropeShader.SetBuffer(updateKernel, "sortedOffsets", sortedOffsets.computeBuffer); - - ropeShader.SetBuffer(updateKernel, "positions", meshData.restPositions.computeBuffer); - ropeShader.SetBuffer(updateKernel, "normals", meshData.restNormals.computeBuffer); - ropeShader.SetBuffer(updateKernel, "tangents", meshData.restTangents.computeBuffer); - ropeShader.SetBuffer(updateKernel, "colors", meshData.restColors.computeBuffer); - - for (int i = 0; i < batchList.Count; ++i) - { - var batch = batchList[i]; - int threadGroups = ComputeMath.ThreadGroupCount(batch.rendererCount, 16); - - ropeShader.SetInt("firstRenderer", batch.firstRenderer); - ropeShader.SetInt("rendererCount", batch.rendererCount); - - ropeShader.SetBuffer(updateKernel, "vertices", batch.gpuVertexBuffer); - - ropeShader.Dispatch(updateKernel, threadGroups, 1, 1); - - var rp = batch.renderParams; - rp.worldBounds = m_Solver.bounds; - - for (int m = 0; m < batch.materials.Length; ++m) - { - rp.material = batch.materials[m]; - Graphics.RenderMesh(rp, batch.mesh, m, m_Solver.transform.localToWorldMatrix, m_Solver.transform.localToWorldMatrix); - } - } - } - } - } - - } -} - diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/RopeAndRod/ComputeMeshRopeRenderSystem.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/RopeAndRod/ComputeMeshRopeRenderSystem.cs.meta deleted file mode 100644 index eb2668678..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/RopeAndRod/ComputeMeshRopeRenderSystem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f880620ed267d4cb4a701183bcadfe15 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/RopeAndRod/ComputePathSmootherRenderSystem.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/RopeAndRod/ComputePathSmootherRenderSystem.cs deleted file mode 100644 index 9f363f237..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/RopeAndRod/ComputePathSmootherRenderSystem.cs +++ /dev/null @@ -1,94 +0,0 @@ -using UnityEngine; - -namespace Obi -{ - - public class ComputePathSmootherRenderSystem : ObiPathSmootherRenderSystem - { - - private ComputeShader pathShader; - private int parallelTransportKernel; - private int decimateKernel; - private int smoothKernel; - - public ComputePathSmootherRenderSystem(ObiSolver solver) : base(solver) - { - pathShader = GameObject.Instantiate(Resources.Load("Compute/PathSmoothing")); - parallelTransportKernel = pathShader.FindKernel("ParallelTransport"); - decimateKernel = pathShader.FindKernel("Decimate"); - smoothKernel = pathShader.FindKernel("ChaikinSmooth"); - } - - public override void Setup() - { - base.Setup(); - - particleIndices.AsComputeBuffer(); - rawFrameOffsets.AsComputeBuffer(); - pathData.AsComputeBuffer(); - rawFrames.AsComputeBuffer(); - decimatedFrameCounts.AsComputeBuffer(); - - smoothFrames.AsComputeBuffer(); - smoothFrameOffsets.AsComputeBuffer(); - smoothFrameCounts.AsComputeBuffer(); - } - - public override void Render() - { - using (m_RenderMarker.Auto()) - { - //base.Render(); - - var computeSolver = m_Solver.implementation as ComputeSolverImpl; - - if (computeSolver.renderablePositionsBuffer != null && computeSolver.renderablePositionsBuffer.count > 0) - { - // wait for gpu data to be transferred: - pathData.WaitForReadback(); - smoothFrames.WaitForReadback(); - - // update rest lenghts and upload to gpu: - base.Render(); - pathData.Upload(); - - int threadGroups = ComputeMath.ThreadGroupCount(rawFrameOffsets.count, 128); - pathShader.SetInt("chunkCount", rawFrameOffsets.count); - - pathShader.SetBuffer(parallelTransportKernel, "frameOffsets", rawFrameOffsets.computeBuffer); - pathShader.SetBuffer(parallelTransportKernel, "particleIndices", particleIndices.computeBuffer); - pathShader.SetBuffer(parallelTransportKernel, "renderablePositions", computeSolver.renderablePositionsBuffer); - pathShader.SetBuffer(parallelTransportKernel, "renderableOrientations", computeSolver.renderableOrientationsBuffer); - pathShader.SetBuffer(parallelTransportKernel, "principalRadii", computeSolver.principalRadiiBuffer); - pathShader.SetBuffer(parallelTransportKernel, "colors", computeSolver.colorsBuffer); - pathShader.SetBuffer(parallelTransportKernel, "pathData", pathData.computeBuffer); - pathShader.SetBuffer(parallelTransportKernel, "pathFrames", rawFrames.computeBuffer); - - pathShader.Dispatch(parallelTransportKernel, threadGroups, 1, 1); - - pathShader.SetBuffer(decimateKernel, "pathFrames", rawFrames.computeBuffer); - pathShader.SetBuffer(decimateKernel, "frameOffsets", rawFrameOffsets.computeBuffer); - pathShader.SetBuffer(decimateKernel, "decimatedFrameCounts", decimatedFrameCounts.computeBuffer); - pathShader.SetBuffer(decimateKernel, "pathData", pathData.computeBuffer); - - pathShader.Dispatch(decimateKernel, threadGroups, 1, 1); - - pathShader.SetBuffer(smoothKernel, "pathFrames", rawFrames.computeBuffer); - pathShader.SetBuffer(smoothKernel, "frameOffsets", rawFrameOffsets.computeBuffer); - pathShader.SetBuffer(smoothKernel, "decimatedFrameCounts", decimatedFrameCounts.computeBuffer); - pathShader.SetBuffer(smoothKernel, "smoothFrames", smoothFrames.computeBuffer); - pathShader.SetBuffer(smoothKernel, "smoothFrameOffsets", smoothFrameOffsets.computeBuffer); - pathShader.SetBuffer(smoothKernel, "smoothFrameCounts", smoothFrameCounts.computeBuffer); - pathShader.SetBuffer(smoothKernel, "pathData", pathData.computeBuffer); - - pathShader.Dispatch(smoothKernel, threadGroups, 1, 1); - - pathData.Readback(); - smoothFrames.Readback(); - } - } - } - - } -} - diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/RopeAndRod/ComputePathSmootherRenderSystem.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/RopeAndRod/ComputePathSmootherRenderSystem.cs.meta deleted file mode 100644 index acdff97c5..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Rendering/RopeAndRod/ComputePathSmootherRenderSystem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7ed459657fb054e7b8e0c806e8e5016e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Solver/ComputeSolverImpl.cs b/Assets/Obi/Scripts/Common/Backends/Compute/Solver/ComputeSolverImpl.cs deleted file mode 100644 index ad4cf37f3..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Solver/ComputeSolverImpl.cs +++ /dev/null @@ -1,1438 +0,0 @@ -using UnityEngine; -using UnityEngine.Rendering; - -namespace Obi -{ - public class ComputeSolverImpl : ISolverImpl - { - ObiSolver m_Solver; - - public ObiSolver abstraction - { - get { return m_Solver; } - } - - public int particleCount - { - get { return m_Solver.positions.count; } - } - - public int activeParticleCount - { - get { return m_Solver.activeParticles.count; } - } - - public int deformableTriangleCount - { - get { return m_Solver.deformableTriangles.count / 3; } - } - - public int deformableEdgeCount - { - get { return m_Solver.deformableEdges.count / 2; } - } - - public InertialFrame inertialFrame - { - get { return m_InertialFrame; } - } - - public uint activeFoamParticleCount { private set; get; } - - // Per-type constraints array: - IComputeConstraintsImpl[] constraints; - - // Per-type iteration padding array: - private int[] padding = new int[Oni.ConstraintTypeCount]; - - // job handle: - private ComputeJobHandle jobHandle; - - // particle contact generation: - public ComputeParticleGrid particleGrid; - - // collider contact generation: - public ComputeColliderWorld colliderGrid; - - // spatial queries: - public SpatialQueries spatialQueries; - - // misc data: - private InertialFrame m_InertialFrame; - - // cached particle data arrays (just wrappers over raw unmanaged data held by the abstract solver) - public GraphicsBuffer deadIndicesBuffer; - public GraphicsBuffer positionsBuffer; - public GraphicsBuffer orientationsBuffer; - public GraphicsBuffer startPositionsBuffer; - public GraphicsBuffer endPositionsBuffer; - public GraphicsBuffer startOrientationsBuffer; - public GraphicsBuffer endOrientationsBuffer; - public GraphicsBuffer restPositionsBuffer; - public GraphicsBuffer prevPositionsBuffer; - public GraphicsBuffer restOrientationsBuffer; - public GraphicsBuffer prevOrientationsBuffer; - public GraphicsBuffer renderablePositionsBuffer; - public GraphicsBuffer renderableOrientationsBuffer; - public GraphicsBuffer renderableRadiiBuffer; - public GraphicsBuffer colorsBuffer; - public GraphicsBuffer collisionMaterialIndexBuffer; - - public GraphicsBuffer principalRadiiBuffer; - public GraphicsBuffer velocitiesBuffer; - public GraphicsBuffer invMassesBuffer; - public GraphicsBuffer phasesBuffer; - public GraphicsBuffer filtersBuffer; - - public GraphicsBuffer angularVelocitiesBuffer; - public GraphicsBuffer invRotationalMassesBuffer; - public GraphicsBuffer externalForcesBuffer; - public GraphicsBuffer externalTorquesBuffer; - public GraphicsBuffer windBuffer; - - public GraphicsBuffer lifeBuffer; - public GraphicsBuffer fluidDataBuffer; - public GraphicsBuffer userDataBuffer; - public GraphicsBuffer fluidMaterialsBuffer; - public GraphicsBuffer fluidMaterials2Buffer; - public GraphicsBuffer fluidInterfaceBuffer; - public GraphicsBuffer anisotropiesBuffer; - - public GraphicsBuffer auxPositions; - public GraphicsBuffer auxVelocities; - public GraphicsBuffer auxColors; - public GraphicsBuffer auxAttributes; - public GraphicsBuffer auxOffsetInCell; - public GraphicsBuffer auxSortedToOriginal; - - public GraphicsBuffer normalsBuffer; - public GraphicsBuffer cellCoordsBuffer; - - public GraphicsBuffer positionDeltasIntBuffer; - public GraphicsBuffer orientationDeltasIntBuffer; - - public GraphicsBuffer positionConstraintCountBuffer; - public GraphicsBuffer orientationConstraintCountBuffer; - - public GraphicsBuffer activeParticlesBuffer; - public GraphicsBuffer fluidDispatchBuffer; - - public GraphicsBuffer tangentsIntBuffer; - - public GraphicsBuffer deformableEdgesBuffer; - public GraphicsBuffer deformableTrianglesBuffer; - - public GraphicsBuffer solverToWorldBuffer; - public GraphicsBuffer worldToSolverBuffer; - public GraphicsBuffer inertialFrameBuffer; - private AffineTransform[] solverToWorldArray; - private AffineTransform[] worldToSolverArray; - private InertialFrame[] inertialFrameArray; - - public GraphicsBuffer rigidbodyLinearDeltasBuffer; - public GraphicsBuffer rigidbodyAngularDeltasBuffer; - - public GraphicsBuffer rigidbodyLinearDeltasIntBuffer; - public GraphicsBuffer rigidbodyAngularDeltasIntBuffer; - - public GraphicsBuffer reducedBounds; - - // simplices: - public SimplexCounts simplexCounts; - public GraphicsBuffer simplices; - public GraphicsBuffer simplexBounds; - - public Aabb solverBounds; - private AsyncGPUReadbackRequest boundsRequest; - - private ComputeShader solverShader; - private int applyInertialForcesKernel; - private int applyRigidbodyDeltasKernel; - private int predictPositionsKernel; - private int updateVelocitiesKernel; - private int updatePositionsKernel; - private int updateLifetimesKernel; - private int enforceLimitsKernel; - private int interpolateKernel; - - private ComputeShader boundsShader; - private int simplexBoundsKernel; - private int editSimplexBoundsKernel; - private int boundsReductionKernel; - - private ComputeShader deformableTrisShader; - private int resetNormalsKernel; - private int updateNormalsKernel; - private int updateEdgeNormalsKernel; - private int orientationFromNormalsKernel; - - private ComputeShader foamShader; - private int sortDataKernel; - private int emitShapeFoamKernel; - private int emitFoamKernel; - private int copyAliveKernel; - private int updateFoamKernel; - private int integrateFoamKernel; - private int copyKernel; - - private ComputeShader foamDensityShader; - private int clearGridKernel; - private int insertGridKernel; - private int sortByGridKernel; - private int computeDensityKernel; - private int applyDensityKernel; - - private ComputeShader foamCollisionShader; - private int solveDiffuseContactsKernel; - - public ComputeSolverImpl(ObiSolver solver) - { - this.m_Solver = solver; - - jobHandle = new ComputeJobHandle(); - solverBounds = new Aabb(solver.transform.position - Vector3.one, solver.transform.position + Vector3.one); - - solver.queryResults.ResizeUninitialized((int)abstraction.maxQueryResults); - solver.queryResults.SafeAsComputeBuffer(GraphicsBuffer.Target.Counter); - - solver.foamCount.AsComputeBuffer(GraphicsBuffer.Target.IndirectArguments); - solver.foamPositions.AsComputeBuffer(); - solver.foamVelocities.AsComputeBuffer(); - solver.foamColors.AsComputeBuffer(); - solver.foamAttributes.AsComputeBuffer(); - - solverShader = GameObject.Instantiate(Resources.Load("Compute/Solver")); - applyInertialForcesKernel = solverShader.FindKernel("ApplyInertialForces"); - applyRigidbodyDeltasKernel = solverShader.FindKernel("ApplyRigidbodyDeltas"); - updateLifetimesKernel = solverShader.FindKernel("UpdateLifetimes"); - predictPositionsKernel = solverShader.FindKernel("PredictPositions"); - updateVelocitiesKernel = solverShader.FindKernel("UpdateVelocities"); - updatePositionsKernel = solverShader.FindKernel("UpdatePositions"); - enforceLimitsKernel = solverShader.FindKernel("EnforceLimits"); - interpolateKernel = solverShader.FindKernel("Interpolate"); - - boundsShader = GameObject.Instantiate(Resources.Load("Compute/BoundsReduction")); - simplexBoundsKernel = boundsShader.FindKernel("RuntimeSimplexBounds"); - editSimplexBoundsKernel = boundsShader.FindKernel("EditSimplexBounds"); - boundsReductionKernel = boundsShader.FindKernel("Reduce"); - - deformableTrisShader = GameObject.Instantiate(Resources.Load("Compute/DeformableTriangles")); - resetNormalsKernel = deformableTrisShader.FindKernel("ResetNormals"); - updateNormalsKernel = deformableTrisShader.FindKernel("UpdateNormals"); - updateEdgeNormalsKernel = deformableTrisShader.FindKernel("UpdateEdgeNormals"); - orientationFromNormalsKernel = deformableTrisShader.FindKernel("OrientationFromNormals"); - - foamShader = GameObject.Instantiate(Resources.Load("Compute/FluidFoam")); - sortDataKernel = foamShader.FindKernel("SortFluidData"); - emitShapeFoamKernel = foamShader.FindKernel("EmitShape"); - emitFoamKernel = foamShader.FindKernel("Emit"); - copyAliveKernel = foamShader.FindKernel("CopyAliveCount"); - updateFoamKernel = foamShader.FindKernel("Update"); - copyKernel = foamShader.FindKernel("Copy"); - integrateFoamKernel = foamShader.FindKernel("Integrate"); - - foamDensityShader = GameObject.Instantiate(Resources.Load("Compute/FluidFoamDensity")); - clearGridKernel = foamDensityShader.FindKernel("Clear"); - insertGridKernel = foamDensityShader.FindKernel("InsertInGrid"); - sortByGridKernel = foamDensityShader.FindKernel("SortByGrid"); - computeDensityKernel = foamDensityShader.FindKernel("ComputeDensity"); - applyDensityKernel = foamDensityShader.FindKernel("ApplyDensity"); - - foamCollisionShader = GameObject.Instantiate(Resources.Load("Compute/FluidFoamCollisions")); - solveDiffuseContactsKernel = foamCollisionShader.FindKernel("SolveDiffuseContacts"); - - solverToWorldBuffer = new GraphicsBuffer(GraphicsBuffer.Target.Structured, 1, 48); - solverToWorldArray = new AffineTransform[1]; - worldToSolverBuffer = new GraphicsBuffer(GraphicsBuffer.Target.Structured, 1, 48); - worldToSolverArray = new AffineTransform[1]; - inertialFrameBuffer = new GraphicsBuffer(GraphicsBuffer.Target.Structured, 1, 160); - inertialFrameArray = new InertialFrame[1]; - - fluidDispatchBuffer = new GraphicsBuffer(GraphicsBuffer.Target.IndirectArguments, 4, sizeof(uint)); - - // Initialize collision world: - GetOrCreateColliderWorld(); - colliderGrid.IncreaseReferenceCount(); - - // Initialize contact generation acceleration structure: - particleGrid = new ComputeParticleGrid(); - - // Initialize spatial query system. - spatialQueries = new SpatialQueries(solver.maxQueryResults); - - // Initialize constraint arrays: - constraints = new IComputeConstraintsImpl[Oni.ConstraintTypeCount]; - constraints[(int)Oni.ConstraintType.Tether] = new ComputeTetherConstraints(this); - constraints[(int)Oni.ConstraintType.Volume] = new ComputeVolumeConstraints(this); - constraints[(int)Oni.ConstraintType.Chain] = new ComputeChainConstraints(this); - constraints[(int)Oni.ConstraintType.Bending] = new ComputeBendConstraints(this); - constraints[(int)Oni.ConstraintType.Distance] = new ComputeDistanceConstraints(this); - constraints[(int)Oni.ConstraintType.ShapeMatching] = new ComputeShapeMatchingConstraints(this); - constraints[(int)Oni.ConstraintType.BendTwist] = new ComputeBendTwistConstraints(this); - constraints[(int)Oni.ConstraintType.StretchShear] = new ComputeStretchShearConstraints(this); - constraints[(int)Oni.ConstraintType.Pin] = new ComputePinConstraints(this); - constraints[(int)Oni.ConstraintType.Pinhole] = new ComputePinholeConstraints(this); - constraints[(int)Oni.ConstraintType.Skin] = new ComputeSkinConstraints(this); - constraints[(int)Oni.ConstraintType.Aerodynamics] = new ComputeAerodynamicConstraints(this); - constraints[(int)Oni.ConstraintType.Stitch] = new ComputeStitchConstraints(this); - - constraints[(int)Oni.ConstraintType.ParticleCollision] = new ComputeParticleCollisionConstraints(this); - constraints[(int)Oni.ConstraintType.ParticleCollision].CreateConstraintsBatch(); - - constraints[(int)Oni.ConstraintType.Collision] = new ComputeColliderCollisionConstraints(this); - constraints[(int)Oni.ConstraintType.Collision].CreateConstraintsBatch(); - - constraints[(int)Oni.ConstraintType.ParticleFriction] = new ComputeParticleFrictionConstraints(this); - constraints[(int)Oni.ConstraintType.ParticleFriction].CreateConstraintsBatch(); - - constraints[(int)Oni.ConstraintType.Friction] = new ComputeColliderFrictionConstraints(this); - constraints[(int)Oni.ConstraintType.Friction].CreateConstraintsBatch(); - - constraints[(int)Oni.ConstraintType.Density] = new ComputeDensityConstraints(this); - constraints[(int)Oni.ConstraintType.Density].CreateConstraintsBatch(); - } - - public void Destroy() - { - - reducedBounds?.Dispose(); - solverToWorldBuffer?.Dispose(); - worldToSolverBuffer?.Dispose(); - inertialFrameBuffer?.Dispose(); - fluidDispatchBuffer?.Dispose(); - - for (int i = 0; i < constraints.Length; ++i) - if (constraints[i] != null) - constraints[i].Dispose(); - - // Get rid of particle and collider grids/queries: - particleGrid?.Dispose(); - - // cannot use null-coalescing because this is a GameObject, and Unity overrides != - if (colliderGrid != null) - colliderGrid.DecreaseReferenceCount(); - - spatialQueries?.Dispose(); - - positionDeltasIntBuffer?.Dispose(); - orientationDeltasIntBuffer?.Dispose(); - - rigidbodyLinearDeltasIntBuffer?.Dispose(); - rigidbodyAngularDeltasIntBuffer?.Dispose(); - - tangentsIntBuffer?.Dispose(); - - simplexBounds?.Dispose(); - - auxPositions?.Dispose(); - auxVelocities?.Dispose(); - auxColors?.Dispose(); - auxAttributes?.Dispose(); - auxOffsetInCell?.Dispose(); - auxSortedToOriginal?.Dispose(); - } - - private void GetOrCreateColliderWorld() - { - colliderGrid = GameObject.FindObjectOfType(); - if (colliderGrid == null) - { - var world = new GameObject("ComputeCollisionWorld", typeof(ComputeColliderWorld)); - colliderGrid = world.GetComponent(); - } - } - - public void PushData() - { - // Send data to the GPU: - abstraction.positions.Upload(); - abstraction.orientations.Upload(); - abstraction.velocities.Upload(); - abstraction.angularVelocities.Upload(); - abstraction.colors.Upload(); - - abstraction.startPositions.Upload(); - abstraction.startOrientations.Upload(); - abstraction.endPositions.Upload(); - abstraction.endOrientations.Upload(); - - abstraction.restPositions.Upload(); - abstraction.restOrientations.Upload(); - abstraction.normals.Upload(); - abstraction.principalRadii.Upload(); - abstraction.invMasses.Upload(); - abstraction.invRotationalMasses.Upload(); - abstraction.phases.Upload(); - abstraction.filters.Upload(); - abstraction.externalForces.Upload(); - abstraction.externalTorques.Upload(); - abstraction.wind.Upload(); - - abstraction.life.Upload(); - abstraction.fluidData.Upload(); - abstraction.userData.Upload(); - abstraction.fluidInterface.Upload(); - abstraction.fluidMaterials.Upload(); - abstraction.fluidMaterials2.Upload(); - - rigidbodyLinearDeltasIntBuffer.SetData(abstraction.rigidbodyLinearDeltas.AsNativeArray()); - rigidbodyAngularDeltasIntBuffer.SetData(abstraction.rigidbodyAngularDeltas.AsNativeArray()); - } - - public void RequestReadback() - { - // Copy rigidbody deltas (int) to output buffers (float), then request readback: - solverShader.SetBuffer(applyRigidbodyDeltasKernel, "linearDeltasAsInt", rigidbodyLinearDeltasIntBuffer); - solverShader.SetBuffer(applyRigidbodyDeltasKernel, "angularDeltasAsInt", rigidbodyAngularDeltasIntBuffer); - solverShader.SetBuffer(applyRigidbodyDeltasKernel, "linearDeltas", rigidbodyLinearDeltasBuffer); - solverShader.SetBuffer(applyRigidbodyDeltasKernel, "angularDeltas", rigidbodyAngularDeltasBuffer); - - solverShader.SetInt("particleCount", abstraction.rigidbodyLinearDeltas.count); - - int threadGroups = ComputeMath.ThreadGroupCount(abstraction.rigidbodyLinearDeltas.count, 128); - solverShader.Dispatch(applyRigidbodyDeltasKernel, threadGroups, 1, 1); - - abstraction.rigidbodyLinearDeltas.Readback(); - abstraction.rigidbodyAngularDeltas.Readback(); - - // begin particle data async GPU -> CPU transfer. - // by default, only positions and velocities are read back. - // ObiActors can request whatever data they need in RequestReadback, - // then wait for it in SimulationEnd. - abstraction.positions.Readback(); - abstraction.velocities.Readback(); - - // begin constraint data async GPU -> CPU transfer. - var sm = constraints[(int)Oni.ConstraintType.ShapeMatching] as ComputeShapeMatchingConstraints; - if (sm != null) - sm.RequestDataReadback(); - - // needed for tearing. - var dm = constraints[(int)Oni.ConstraintType.Distance] as ComputeDistanceConstraints; - if (dm != null) - dm.RequestDataReadback(); - - var pm = constraints[(int)Oni.ConstraintType.Pin] as ComputePinConstraints; - if (pm != null) - pm.RequestDataReadback(); - - var phm = constraints[(int)Oni.ConstraintType.Pinhole] as ComputePinholeConstraints; - if (phm != null) - phm.RequestDataReadback(); - } - - public void InitializeFrame(Vector4 translation, Vector4 scale, Quaternion rotation) - { - m_InertialFrame = new InertialFrame(translation, scale, rotation); - } - - public void UpdateFrame(Vector4 translation, Vector4 scale, Quaternion rotation, float deltaTime) - { - m_InertialFrame.Update(translation, scale, rotation, deltaTime); - - solverToWorldArray[0] = m_InertialFrame.frame; - solverToWorldBuffer.SetData(solverToWorldArray); - - worldToSolverArray[0] = m_InertialFrame.frame.Inverse(); - worldToSolverBuffer.SetData(worldToSolverArray); - - inertialFrameArray[0] = m_InertialFrame; - inertialFrameBuffer.SetData(inertialFrameArray); - } - - public IObiJobHandle ApplyFrame(float worldLinearInertiaScale, float worldAngularInertiaScale, float deltaTime) - { - if (activeParticleCount > 0) - { - // inverse linear part: - Matrix4x4 linear = Matrix4x4.TRS(Vector3.zero, inertialFrame.frame.rotation, new Vector3(1 / inertialFrame.frame.scale.x, 1 / inertialFrame.frame.scale.y, 1 / inertialFrame.frame.scale.z)); - Matrix4x4 linearInv = Matrix4x4.Transpose(linear); - - // non-inertial frame accelerations: - Vector4 angularVel = (linearInv * Matrix4x4.Scale(inertialFrame.angularVelocity) * linear).Diagonal(); - Vector4 eulerAccel = (linearInv * Matrix4x4.Scale(inertialFrame.angularAcceleration) * linear).Diagonal(); - Vector4 inertialAccel = linearInv * inertialFrame.acceleration; - - int threadGroups = ComputeMath.ThreadGroupCount(activeParticleCount, 128); - solverShader.SetInt("particleCount", activeParticleCount); - - solverShader.SetFloat("deltaTime", deltaTime); - solverShader.SetFloat("worldLinearInertiaScale", abstraction.worldLinearInertiaScale); - solverShader.SetFloat("worldAngularInertiaScale", abstraction.worldAngularInertiaScale); - solverShader.SetVector("angularVel", angularVel); - solverShader.SetVector("eulerAccel", eulerAccel); - solverShader.SetVector("inertialAccel", inertialAccel); - solverShader.SetVector("ambientWind", abstraction.parameters.ambientWind); - solverShader.SetBool("inertialWind", abstraction.windSpace == Space.World); - - solverShader.SetBuffer(applyInertialForcesKernel, "activeParticles", activeParticlesBuffer); - solverShader.SetBuffer(applyInertialForcesKernel, "positions", positionsBuffer); - solverShader.SetBuffer(applyInertialForcesKernel, "velocities", velocitiesBuffer); - solverShader.SetBuffer(applyInertialForcesKernel, "invMasses", invMassesBuffer); - solverShader.SetBuffer(applyInertialForcesKernel, "wind", windBuffer); - solverShader.SetBuffer(applyInertialForcesKernel, "inertialSolverFrame", inertialFrameBuffer); - - solverShader.Dispatch(applyInertialForcesKernel, threadGroups, 1, 1); - } - - return jobHandle; - } - - public void SetDeformableTriangles(ObiNativeIntList indices, ObiNativeVector2List uvs) - { - if (indices.count > 0) - { - deformableTrianglesBuffer = indices.AsComputeBuffer(); - var deformableUVsBuffer = uvs.AsComputeBuffer(); - - deformableTrisShader.SetBuffer(updateNormalsKernel, "deformableTriangles", deformableTrianglesBuffer); - deformableTrisShader.SetBuffer(updateNormalsKernel, "deformableTriangleUVs", deformableUVsBuffer); - deformableTrisShader.SetInt("triangleCount", deformableTriangleCount); - } - } - - public void SetDeformableEdges(ObiNativeIntList indices) - { - if (indices.count > 0) - { - deformableEdgesBuffer = indices.AsComputeBuffer(); - - deformableTrisShader.SetBuffer(updateEdgeNormalsKernel, "deformableEdges", deformableEdgesBuffer); - deformableTrisShader.SetInt("edgeCount", deformableEdgeCount); - } - } - - public void SetSimplices(ObiNativeIntList simplices, SimplexCounts counts) - { - this.simplexCounts = counts; - - if (simplices.count > 0) - { - boundsShader.SetInt("pointCount", simplexCounts.pointCount); - boundsShader.SetInt("edgeCount", simplexCounts.edgeCount); - boundsShader.SetInt("triangleCount", simplexCounts.triangleCount); - - this.simplices = simplices.AsComputeBuffer(); - cellCoordsBuffer = abstraction.cellCoords.AsComputeBuffer(); - - if (simplexBounds == null || counts.simplexCount > simplexBounds.count) - { - simplexBounds?.Dispose(); - simplexBounds = new GraphicsBuffer(GraphicsBuffer.Target.Structured, counts.simplexCount * 2, 32); - - reducedBounds?.Dispose(); - reducedBounds = new GraphicsBuffer(GraphicsBuffer.Target.Structured, ComputeMath.NextMultiple(counts.simplexCount * 2, 256), 32); - } - - // Even though we usually store simplices for collision detection, the grid is reused for fluid meshing - // so the capacity we set should be at least the total amount of particles in the solver. - if (particleGrid != null) - { - if (particleGrid.SetCapacity(Mathf.Max(counts.simplexCount, particleCount), - (uint)Mathf.Max(1, abstraction.maxParticleContacts), - (uint)Mathf.Max(1, abstraction.maxParticleNeighbors))) - { - // resize to maximum number of contacts: - abstraction.colliderContacts.ResizeUninitialized(particleGrid.contactPairs.count); - abstraction.colliderContacts.SafeAsComputeBuffer(GraphicsBuffer.Target.Counter); - - abstraction.particleContacts.ResizeUninitialized(particleGrid.contactPairs.count); - abstraction.particleContacts.SafeAsComputeBuffer(GraphicsBuffer.Target.Counter); - - abstraction.contactEffectiveMasses.ResizeUninitialized(particleGrid.contactPairs.count); - abstraction.contactEffectiveMasses.SafeAsComputeBuffer(); - - abstraction.particleContactEffectiveMasses.ResizeUninitialized(particleGrid.contactPairs.count); - abstraction.particleContactEffectiveMasses.SafeAsComputeBuffer(); - } - } - } - else - this.simplices = null; - } - - public void SetActiveParticles(ObiNativeIntList indices) - { - // TODO: indices.computebuffer has been deleted when adding an item. We now need to - // update the compute buffer if needed. - if (indices.computeBuffer == null || indices.computeBuffer.count != indices.capacity) - { - //Debug.Log("create"); - activeParticlesBuffer = indices.AsComputeBuffer(indices.capacity); - } - else - { - //Debug.Log("update"); - indices.UploadFullCapacity(); //unmaps the entire memory buffer up to capacity. - } - - if (activeParticlesBuffer != null) - { - solverShader.SetBuffer(predictPositionsKernel, "activeParticles", activeParticlesBuffer); - solverShader.SetBuffer(updateVelocitiesKernel, "activeParticles", activeParticlesBuffer); - solverShader.SetBuffer(updatePositionsKernel, "activeParticles", activeParticlesBuffer); - solverShader.SetBuffer(enforceLimitsKernel, "activeParticles", activeParticlesBuffer); - } - } - - public IObiJobHandle UpdateBounds(IObiJobHandle inputDeps, float stepTime) - { - if (activeParticleCount > 0 && reducedBounds != null) - { - boundsShader.SetFloat("deltaTime", stepTime); - boundsShader.SetFloat("collisionMargin", abstraction.parameters.collisionMargin); - boundsShader.SetFloat("particleCCD", abstraction.parameters.particleCCD); - - int boundsCount = simplexCounts.simplexCount; - int threadGroups = ComputeMath.ThreadGroupCount(boundsCount, 256); - - // at edit time, the collision materials buffer will be null since - // the collider world is not updated. - if (colliderGrid.materialsBuffer != null) - { - boundsShader.SetBuffer(simplexBoundsKernel, "simplexBounds", simplexBounds); - boundsShader.SetBuffer(simplexBoundsKernel, "simplices", simplices); - boundsShader.SetBuffer(simplexBoundsKernel, "reducedBounds", reducedBounds); - boundsShader.SetBuffer(simplexBoundsKernel, "activeParticles", activeParticlesBuffer); - boundsShader.SetBuffer(simplexBoundsKernel, "positions", positionsBuffer); - boundsShader.SetBuffer(simplexBoundsKernel, "velocities", velocitiesBuffer); - boundsShader.SetBuffer(simplexBoundsKernel, "principalRadii", principalRadiiBuffer); - boundsShader.SetBuffer(simplexBoundsKernel, "fluidMaterials", fluidMaterialsBuffer); - boundsShader.SetBuffer(simplexBoundsKernel, "collisionMaterials", colliderGrid.materialsBuffer); - boundsShader.SetBuffer(simplexBoundsKernel, "collisionMaterialIndices", collisionMaterialIndexBuffer); - boundsShader.Dispatch(simplexBoundsKernel, threadGroups, 1, 1); - } - else - { - boundsShader.SetBuffer(editSimplexBoundsKernel, "simplexBounds", simplexBounds); - boundsShader.SetBuffer(editSimplexBoundsKernel, "simplices", simplices); - boundsShader.SetBuffer(editSimplexBoundsKernel, "reducedBounds", reducedBounds); - boundsShader.SetBuffer(editSimplexBoundsKernel, "activeParticles", activeParticlesBuffer); - boundsShader.SetBuffer(editSimplexBoundsKernel, "positions", positionsBuffer); - boundsShader.SetBuffer(editSimplexBoundsKernel, "velocities", velocitiesBuffer); - boundsShader.SetBuffer(editSimplexBoundsKernel, "principalRadii", principalRadiiBuffer); - boundsShader.SetBuffer(editSimplexBoundsKernel, "fluidMaterials", fluidMaterialsBuffer); - boundsShader.Dispatch(editSimplexBoundsKernel, threadGroups, 1, 1); - } - - boundsShader.SetBuffer(boundsReductionKernel, "reducedBounds", reducedBounds); - do - { - boundsShader.Dispatch(boundsReductionKernel, threadGroups, 1, 1); - threadGroups = ComputeMath.ThreadGroupCount(boundsCount, 256); - boundsCount /= 256; - } - while (threadGroups > 1); - - boundsRequest = AsyncGPUReadback.Request(reducedBounds, 32, 0); - - // update lifetimes: - solverShader.SetFloat("deltaTime",stepTime); - solverShader.SetBuffer(updateLifetimesKernel, "activeParticles", activeParticlesBuffer); - solverShader.SetBuffer(updateLifetimesKernel, "life", lifeBuffer); - solverShader.SetBuffer(updateLifetimesKernel, "deadParticles", deadIndicesBuffer); - solverShader.Dispatch(updateLifetimesKernel, ComputeMath.ThreadGroupCount(activeParticleCount, 128), 1, 1); - } - - return inputDeps; - } - - public void GetBounds(ref Vector3 min, ref Vector3 max) - { - // wait for last pending bounds async request: - boundsRequest.WaitForCompletion(); - if (boundsRequest.done && !boundsRequest.hasError) - solverBounds = boundsRequest.GetData(0)[0]; - - min = solverBounds.min; - max = solverBounds.max; - } - - public int GetConstraintCount(Oni.ConstraintType type) - { - /*if ((int)type > 0 && (int)type < constraints.Length) - { - int count = 0; - for (int i = 0; i < constraints[(int)type].Count; ++i) - { - count += constraints[(int)type][i].GetConstraintCount(); - } - return count; - } - return 0;*/ - return 0; - } - - public void SetParameters(Oni.SolverParameters parameters) - { - // These should be better passed using a constant buffer, but constant buffers do not work in 2021 :( - //https://issuetracker.unity3d.com/issues/compute-shader-is-not-using-defined-constants-when-setting-data-with-setconstantbuffer - - solverShader.SetInt("mode", (int)parameters.mode); - solverShader.SetInt("interpolation", (int)parameters.interpolation); - solverShader.SetVector("gravity", parameters.gravity); - solverShader.SetFloat("damping", parameters.damping); - solverShader.SetFloat("sleepThreshold", parameters.sleepThreshold); - solverShader.SetFloat("collisionMargin", parameters.collisionMargin); - solverShader.SetFloat("maxVelocity", parameters.maxVelocity); - solverShader.SetFloat("maxAngularVelocity", parameters.maxAngularVelocity); - } - - public void SetConstraintGroupParameters(Oni.ConstraintType type, ref Oni.ConstraintParameters parameters) - { - // No need to implement. This backend grabs parameters from the abstraction when it needs them. - } - - public void ParticleCountChanged(ObiSolver solver) - { - deadIndicesBuffer = abstraction.deadParticles.AsComputeBuffer(abstraction.deadParticles.capacity, GraphicsBuffer.Target.Counter); - colorsBuffer = abstraction.colors.AsComputeBuffer(); - positionsBuffer = abstraction.positions.AsComputeBuffer(); - orientationsBuffer = abstraction.orientations.AsComputeBuffer(); - startPositionsBuffer = abstraction.startPositions.AsComputeBuffer(); - endPositionsBuffer = abstraction.endPositions.AsComputeBuffer(); - startOrientationsBuffer = abstraction.startOrientations.AsComputeBuffer(); - endOrientationsBuffer = abstraction.endOrientations.AsComputeBuffer(); - restPositionsBuffer = abstraction.restPositions.AsComputeBuffer(); - restOrientationsBuffer = abstraction.restOrientations.AsComputeBuffer(); - prevPositionsBuffer = abstraction.prevPositions.AsComputeBuffer(); - prevOrientationsBuffer = abstraction.prevOrientations.AsComputeBuffer(); - renderablePositionsBuffer = abstraction.renderablePositions.AsComputeBuffer(); - renderableOrientationsBuffer = abstraction.renderableOrientations.AsComputeBuffer(); - renderableRadiiBuffer = abstraction.renderableRadii.AsComputeBuffer(); - collisionMaterialIndexBuffer = abstraction.collisionMaterials.AsComputeBuffer(); - - angularVelocitiesBuffer = abstraction.angularVelocities.AsComputeBuffer(); - invRotationalMassesBuffer = abstraction.invRotationalMasses.AsComputeBuffer(); - externalForcesBuffer = abstraction.externalForces.AsComputeBuffer(); - externalTorquesBuffer = abstraction.externalTorques.AsComputeBuffer(); - windBuffer = abstraction.wind.AsComputeBuffer(); - - velocitiesBuffer = abstraction.velocities.AsComputeBuffer(); - principalRadiiBuffer = abstraction.principalRadii.AsComputeBuffer(); - invMassesBuffer = abstraction.invMasses.AsComputeBuffer(); - phasesBuffer = abstraction.phases.AsComputeBuffer(); - filtersBuffer = abstraction.filters.AsComputeBuffer(); - - lifeBuffer = abstraction.life.AsComputeBuffer(); - fluidDataBuffer = abstraction.fluidData.AsComputeBuffer(); - userDataBuffer = abstraction.userData.AsComputeBuffer(); - fluidInterfaceBuffer = abstraction.fluidInterface.AsComputeBuffer(); - fluidMaterialsBuffer = abstraction.fluidMaterials.AsComputeBuffer(); - fluidMaterials2Buffer = abstraction.fluidMaterials2.AsComputeBuffer(); - anisotropiesBuffer = abstraction.anisotropies.AsComputeBuffer(); - - normalsBuffer = abstraction.normals.AsComputeBuffer(); - positionConstraintCountBuffer = abstraction.positionConstraintCounts.AsComputeBuffer(); - orientationConstraintCountBuffer = abstraction.orientationConstraintCounts.AsComputeBuffer(); - - if (positionDeltasIntBuffer != null) - { - positionDeltasIntBuffer.Dispose(); - positionDeltasIntBuffer = null; - } - - if (abstraction.positionDeltas.count > 0) - { - positionDeltasIntBuffer = new GraphicsBuffer(GraphicsBuffer.Target.Structured, abstraction.positionDeltas.count, abstraction.positionDeltas.stride); - positionDeltasIntBuffer.SetData(new Vector4[abstraction.positionDeltas.count]); - } - - if (orientationDeltasIntBuffer != null) - { - orientationDeltasIntBuffer.Dispose(); - orientationDeltasIntBuffer = null; - } - - if (abstraction.orientationDeltas.count > 0) - { - orientationDeltasIntBuffer = new GraphicsBuffer(GraphicsBuffer.Target.Structured, abstraction.orientationDeltas.count, abstraction.orientationDeltas.stride); - orientationDeltasIntBuffer.SetData(new Vector4[abstraction.orientationDeltas.count]); - } - - if (tangentsIntBuffer != null) - { - tangentsIntBuffer.Dispose(); - tangentsIntBuffer = null; - } - - if (abstraction.normals.count > 0) - { - tangentsIntBuffer = new GraphicsBuffer(GraphicsBuffer.Target.Structured, abstraction.normals.count, abstraction.normals.stride); - tangentsIntBuffer.SetData(new VInt4[abstraction.normals.count]); - } - - if (positionsBuffer != null) solverShader.SetBuffer(predictPositionsKernel, "positions", positionsBuffer); - if (prevPositionsBuffer != null) solverShader.SetBuffer(predictPositionsKernel, "prevPositions", prevPositionsBuffer); - if (orientationsBuffer != null) solverShader.SetBuffer(predictPositionsKernel, "orientations", orientationsBuffer); - if (prevOrientationsBuffer != null) solverShader.SetBuffer(predictPositionsKernel, "prevOrientations", prevOrientationsBuffer); - if (velocitiesBuffer != null) solverShader.SetBuffer(predictPositionsKernel, "velocities", velocitiesBuffer); - if (invMassesBuffer != null) solverShader.SetBuffer(predictPositionsKernel, "invMasses", invMassesBuffer); - if (angularVelocitiesBuffer != null) solverShader.SetBuffer(predictPositionsKernel, "angularVelocities", angularVelocitiesBuffer); - if (invRotationalMassesBuffer != null) solverShader.SetBuffer(predictPositionsKernel, "invRotationalMasses", invRotationalMassesBuffer); - if (externalForcesBuffer != null) solverShader.SetBuffer(predictPositionsKernel, "externalForces", externalForcesBuffer); - if (externalTorquesBuffer != null) solverShader.SetBuffer(predictPositionsKernel, "externalTorques", externalTorquesBuffer); - if (phasesBuffer != null) solverShader.SetBuffer(predictPositionsKernel, "phases", phasesBuffer); - if (fluidInterfaceBuffer != null) solverShader.SetBuffer(predictPositionsKernel, "buoyancies", fluidInterfaceBuffer); - - if (positionsBuffer != null) solverShader.SetBuffer(updateVelocitiesKernel, "positions", positionsBuffer); - if (prevPositionsBuffer != null) solverShader.SetBuffer(updateVelocitiesKernel, "prevPositions", prevPositionsBuffer); - if (orientationsBuffer != null) solverShader.SetBuffer(updateVelocitiesKernel, "orientations", orientationsBuffer); - if (prevOrientationsBuffer != null) solverShader.SetBuffer(updateVelocitiesKernel, "prevOrientations", prevOrientationsBuffer); - if (velocitiesBuffer != null) solverShader.SetBuffer(updateVelocitiesKernel, "velocities", velocitiesBuffer); - if (angularVelocitiesBuffer != null) solverShader.SetBuffer(updateVelocitiesKernel, "angularVelocities", angularVelocitiesBuffer); - if (invMassesBuffer != null) solverShader.SetBuffer(updateVelocitiesKernel, "invMasses", invMassesBuffer); - if (invRotationalMassesBuffer != null) solverShader.SetBuffer(updateVelocitiesKernel, "invRotationalMasses", invRotationalMassesBuffer); - - if (positionsBuffer != null) solverShader.SetBuffer(updatePositionsKernel, "positions", positionsBuffer); - if (prevPositionsBuffer != null) solverShader.SetBuffer(updatePositionsKernel, "prevPositions", prevPositionsBuffer); - if (orientationsBuffer != null) solverShader.SetBuffer(updatePositionsKernel, "orientations", orientationsBuffer); - if (prevOrientationsBuffer != null) solverShader.SetBuffer(updatePositionsKernel, "prevOrientations", prevOrientationsBuffer); - if (velocitiesBuffer != null) solverShader.SetBuffer(updatePositionsKernel, "velocities", velocitiesBuffer); - if (angularVelocitiesBuffer != null) solverShader.SetBuffer(updatePositionsKernel, "angularVelocities", angularVelocitiesBuffer); - - if (positionsBuffer != null) solverShader.SetBuffer(enforceLimitsKernel, "positions", positionsBuffer); - if (prevPositionsBuffer != null) solverShader.SetBuffer(enforceLimitsKernel, "prevPositions", prevPositionsBuffer); - if (lifeBuffer != null) solverShader.SetBuffer(enforceLimitsKernel, "life", lifeBuffer); - if (phasesBuffer != null) solverShader.SetBuffer(enforceLimitsKernel, "phases", phasesBuffer); - - if (positionsBuffer != null) solverShader.SetBuffer(interpolateKernel, "positions", positionsBuffer); - if (startPositionsBuffer != null) solverShader.SetBuffer(interpolateKernel, "startPositions", startPositionsBuffer); - if (endPositionsBuffer != null) solverShader.SetBuffer(interpolateKernel, "endPositions", endPositionsBuffer); - if (renderablePositionsBuffer != null) solverShader.SetBuffer(interpolateKernel, "renderablePositions", renderablePositionsBuffer); - if (orientationsBuffer != null) solverShader.SetBuffer(interpolateKernel, "orientations", orientationsBuffer); - if (startOrientationsBuffer != null) solverShader.SetBuffer(interpolateKernel, "startOrientations", startOrientationsBuffer); - if (endOrientationsBuffer != null) solverShader.SetBuffer(interpolateKernel, "endOrientations", endOrientationsBuffer); - if (renderableOrientationsBuffer != null) solverShader.SetBuffer(interpolateKernel, "renderableOrientations", renderableOrientationsBuffer); - if (principalRadiiBuffer != null) solverShader.SetBuffer(interpolateKernel, "principalRadii", principalRadiiBuffer); - if (renderableRadiiBuffer != null) solverShader.SetBuffer(interpolateKernel, "renderableRadii", renderableRadiiBuffer); - } - - public void MaxFoamParticleCountChanged(ObiSolver solver) - { - auxPositions?.Dispose(); - auxVelocities?.Dispose(); - auxColors?.Dispose(); - auxAttributes?.Dispose(); - auxOffsetInCell?.Dispose(); - auxSortedToOriginal?.Dispose(); - - if (m_Solver.maxFoamParticles > 0) - { - solver.foamPositions.AsComputeBuffer(); - solver.foamVelocities.AsComputeBuffer(); - solver.foamColors.AsComputeBuffer(); - solver.foamAttributes.AsComputeBuffer(); - - auxPositions = new GraphicsBuffer(GraphicsBuffer.Target.Structured, (int)m_Solver.maxFoamParticles, 16); - auxVelocities = new GraphicsBuffer(GraphicsBuffer.Target.Structured, (int)m_Solver.maxFoamParticles, 16); - auxColors = new GraphicsBuffer(GraphicsBuffer.Target.Structured, (int)m_Solver.maxFoamParticles, 16); - auxAttributes = new GraphicsBuffer(GraphicsBuffer.Target.Structured, (int)m_Solver.maxFoamParticles, 16); - auxOffsetInCell = new GraphicsBuffer(GraphicsBuffer.Target.Structured, (int)m_Solver.maxFoamParticles, 4); - auxSortedToOriginal = new GraphicsBuffer(GraphicsBuffer.Target.Structured, (int)m_Solver.maxFoamParticles, 4); - } - } - - public void SetRigidbodyArrays(ObiSolver solver) - { - rigidbodyLinearDeltasBuffer = solver.rigidbodyLinearDeltas.SafeAsComputeBuffer(); - rigidbodyAngularDeltasBuffer = solver.rigidbodyAngularDeltas.SafeAsComputeBuffer(); - - if (rigidbodyLinearDeltasIntBuffer != null) - { - rigidbodyLinearDeltasIntBuffer.Dispose(); - rigidbodyLinearDeltasIntBuffer = null; - } - - if (rigidbodyAngularDeltasIntBuffer != null) - { - rigidbodyAngularDeltasIntBuffer.Dispose(); - rigidbodyAngularDeltasIntBuffer = null; - } - - rigidbodyLinearDeltasIntBuffer = new GraphicsBuffer(GraphicsBuffer.Target.Structured, rigidbodyLinearDeltasBuffer.count, solver.rigidbodyLinearDeltas.stride); - rigidbodyLinearDeltasIntBuffer.SetData(new Vector4[rigidbodyLinearDeltasBuffer.count]); - - rigidbodyAngularDeltasIntBuffer = new GraphicsBuffer(GraphicsBuffer.Target.Structured, rigidbodyAngularDeltasBuffer.count, solver.rigidbodyAngularDeltas.stride); - rigidbodyAngularDeltasIntBuffer.SetData(new Vector4[rigidbodyAngularDeltasBuffer.count]); - } - - public IConstraintsBatchImpl CreateConstraintsBatch(Oni.ConstraintType type) - { - if (constraints[(int)type] != null) - return constraints[(int)type].CreateConstraintsBatch(); - return null; - } - - public void DestroyConstraintsBatch(IConstraintsBatchImpl batch) - { - if (batch != null && constraints[(int)batch.constraintType] != null) - constraints[(int)batch.constraintType].RemoveBatch(batch); - } - - public void FinishSimulation() - { - // Make sure GPU->CPU readbacks have finished. - // by default, only positions and velocities are read back. - // ObiActors can request whatever data they need in RequestData, - // then wait for it in SimulationEnd. - abstraction.positions.WaitForReadback(); - abstraction.velocities.WaitForReadback(); - - abstraction.rigidbodyLinearDeltas.WaitForReadback(); - abstraction.rigidbodyAngularDeltas.WaitForReadback(); - - var sm = constraints[(int)Oni.ConstraintType.ShapeMatching] as ComputeShapeMatchingConstraints; - if (sm != null) - sm.WaitForReadback(); - - var dm = constraints[(int)Oni.ConstraintType.Distance] as ComputeDistanceConstraints; - if (dm != null) - dm.WaitForReadback(); - - var pm = constraints[(int)Oni.ConstraintType.Pin] as ComputePinConstraints; - if (pm != null) - pm.WaitForReadback(); - - var phm = constraints[(int)Oni.ConstraintType.Pinhole] as ComputePinholeConstraints; - if (phm != null) - phm.WaitForReadback(); - - abstraction.externalForces.WipeToZero(); - abstraction.externalTorques.WipeToZero(); - abstraction.externalForces.Upload(); - abstraction.externalTorques.Upload(); - - // copy end to start positions. - abstraction.startPositions.CopyFrom(abstraction.endPositions); abstraction.startOrientations.CopyFrom(abstraction.endOrientations); - - // now that we got position / orientation data in the CPU set them as this step's end positions / orientations. - abstraction.endPositions.CopyFrom(abstraction.positions); abstraction.endOrientations.CopyFrom(abstraction.orientations); - - abstraction.startPositions.Upload(true); - abstraction.startOrientations.Upload(true); - abstraction.endPositions.Upload(true); - abstraction.endOrientations.Upload(true); - } - - public IObiJobHandle CollisionDetection(IObiJobHandle inputDeps, float stepTime) - { - var collisionParameters = abstraction.GetConstraintParameters(Oni.ConstraintType.Collision); var particleCollisionParameters = abstraction.GetConstraintParameters(Oni.ConstraintType.ParticleCollision); var densityParameters = abstraction.GetConstraintParameters(Oni.ConstraintType.Density); - - if (particleCollisionParameters.enabled || - densityParameters.enabled) { - UpdateDiffuseDensity(stepTime); - - UnityEngine.Profiling.Profiler.BeginSample("Build Simplex Grid"); - particleGrid.BuildGrid(this, stepTime); - UnityEngine.Profiling.Profiler.EndSample(); - - if (densityParameters.enabled) { - UnityEngine.Profiling.Profiler.BeginSample("Generate Fluid Neighborhoods"); - particleGrid.GenerateFluidNeighborhoods(this); - UnityEngine.Profiling.Profiler.EndSample(); - } - - if (particleCollisionParameters.enabled) { - UnityEngine.Profiling.Profiler.BeginSample("Generate Particle Contacts"); - particleGrid.GenerateContacts(this); - UnityEngine.Profiling.Profiler.EndSample(); - } - } - - if (collisionParameters.enabled) - { - UnityEngine.Profiling.Profiler.BeginSample("Generate Collider Contacts"); - colliderGrid.GenerateContacts(this, stepTime); - UnityEngine.Profiling.Profiler.EndSample(); - - UnityEngine.Profiling.Profiler.BeginSample("Apply Force Zones"); - colliderGrid.ApplyForceZones(this, stepTime); - UnityEngine.Profiling.Profiler.EndSample(); - } - - return inputDeps; - } - - public IObiJobHandle Substep(IObiJobHandle handle, float stepTime, float substepTime, int steps, float timeLeft) - { - int threadGroups = ComputeMath.ThreadGroupCount(activeParticleCount, 128); - solverShader.SetInt("particleCount", activeParticleCount); - - // if there's no active particles yet, don't do anything: - if (activeParticleCount > 0) - { - solverShader.SetFloat("deltaTime", substepTime); - solverShader.SetFloat("velocityScale", Mathf.Pow(1 - Mathf.Clamp(m_Solver.parameters.damping, 0, 1), substepTime)); - - // Predict positions: - solverShader.Dispatch(predictPositionsKernel, threadGroups, 1, 1); - - ApplyConstraints(stepTime, substepTime, steps, timeLeft); - - EnforceLimits(threadGroups); - - // Update velocities: - solverShader.Dispatch(updateVelocitiesKernel, threadGroups, 1, 1); - - // Calculate velocity adjustments (forces, etc): - CalculateVelocityCorrections(stepTime, substepTime, steps, timeLeft); - } - - // Update diffuse particles: (need to have calculated velocity corrections first, to measure vorticity/velocity) - int substepsLeft = Mathf.RoundToInt(timeLeft / substepTime); - int foamPadding = Mathf.CeilToInt(abstraction.substeps / (float)abstraction.foamSubsteps); - - if (substepsLeft % foamPadding == 0) - { - UpdateDiffuseParticles(substepTime * foamPadding); - UpdateDiffuseCollisions(substepTime * foamPadding); - IntegrateDiffuseParticles(substepTime * foamPadding); - } - - // Update particle positions: - if (activeParticleCount > 0) - { - UpdatePositions(substepTime, threadGroups); - } - - return handle; - } - - private void CalculateVelocityCorrections(float stepTime, float substepTime, int steps, float timeLeft) - { - // Apply aerodynamic constraints: - constraints[(int)Oni.ConstraintType.Aerodynamics].Project(stepTime, substepTime, steps, timeLeft); - - var densityParameters = m_Solver.GetConstraintParameters(Oni.ConstraintType.Density); - - if (densityParameters.enabled) - { - var d = constraints[(int)Oni.ConstraintType.Density] as ComputeDensityConstraints; - if (d != null) - d.CalculateVelocityCorrections(substepTime); - } - } - - private void UpdatePositions(float deltaTime, int threadGroups) - { - var densityParameters = m_Solver.GetConstraintParameters(Oni.ConstraintType.Density); - - if (densityParameters.enabled) - { - var d = constraints[(int)Oni.ConstraintType.Density] as ComputeDensityConstraints; - if (d != null) - d.ApplyVelocityCorrections(deltaTime); - } - - // Update positions: - solverShader.Dispatch(updatePositionsKernel, threadGroups, 1, 1); - } - - private void ApplyConstraints(float stepTime, float substepTime, int steps, float timeLeft) - { - // calculate max amount of iterations required, and initialize constraints.. - int maxIterations = 0; for (int i = 0; i < Oni.ConstraintTypeCount; ++i) { var parameters = m_Solver.GetConstraintParameters((Oni.ConstraintType)i); if (parameters.enabled) { maxIterations = Mathf.Max(maxIterations, parameters.iterations); constraints[i].Initialize(stepTime, substepTime, steps, timeLeft); } } - - // calculate iteration paddings: - for (int i = 0; i < Oni.ConstraintTypeCount; ++i) { var parameters = m_Solver.GetConstraintParameters((Oni.ConstraintType)i); if (parameters.enabled && parameters.iterations > 0) padding[i] = Mathf.CeilToInt(maxIterations / (float)parameters.iterations); else padding[i] = maxIterations; } - - // perform projection iterations: - for (int i = 1; i < maxIterations; ++i) { for (int j = 0; j < Oni.ConstraintTypeCount; ++j) { if (j != (int)Oni.ConstraintType.Aerodynamics) { var parameters = m_Solver.GetConstraintParameters((Oni.ConstraintType)j); if (parameters.enabled && i % padding[j] == 0) constraints[j].Project(stepTime, substepTime, steps, timeLeft); } } } - - // final iteration, all groups together: - for (int i = 0; i < Oni.ConstraintTypeCount; ++i) { if (i != (int)Oni.ConstraintType.Aerodynamics) { var parameters = m_Solver.GetConstraintParameters((Oni.ConstraintType)i); if (parameters.enabled && parameters.iterations > 0) constraints[i].Project(stepTime, substepTime, steps, timeLeft); } } - - // Despite friction constraints being applied after collision (since coulomb friction depends on normal impulse) - // we perform a collision iteration right at the end to ensure the final state meets the Signorini-Fichera conditions. - var param = m_Solver.GetConstraintParameters(Oni.ConstraintType.ParticleCollision); if (param.enabled && param.iterations > 0) constraints[(int)Oni.ConstraintType.ParticleCollision].Project(stepTime, substepTime, steps, timeLeft); param = m_Solver.GetConstraintParameters(Oni.ConstraintType.Collision); if (param.enabled && param.iterations > 0) constraints[(int)Oni.ConstraintType.Collision].Project(stepTime, substepTime, steps, timeLeft); - } - - private void EnforceLimits(int threadGroups) - { - if (abstraction.useLimits) - { - // keep particles within bounds: - solverShader.SetBool("killOffLimits", abstraction.killOffLimitsParticles); - solverShader.SetVector("boundaryLimitsMin", abstraction.boundaryLimits.min); - solverShader.SetVector("boundaryLimitsMax", abstraction.boundaryLimits.max); - solverShader.Dispatch(enforceLimitsKernel, threadGroups, 1, 1); - } - } - - public IObiJobHandle ApplyInterpolation(IObiJobHandle inputDeps, ObiNativeVector4List startPositions, ObiNativeQuaternionList startOrientations, float stepTime, float unsimulatedTime) - { - if (particleCount <= 0) - return inputDeps; - - int threadGroups = ComputeMath.ThreadGroupCount(particleCount, 128); - solverShader.SetInt("particleCount", particleCount); - - solverShader.SetFloat("deltaTime", stepTime); - solverShader.SetFloat("blendFactor", stepTime > 0 ? unsimulatedTime / stepTime : 0); - solverShader.SetInt("interpolate", (int)m_Solver.parameters.interpolation); - - // Interpolate particle state: - solverShader.Dispatch(interpolateKernel, threadGroups, 1, 1); - - // Reset normals: - if ((deformableTriangleCount > 0 || deformableEdgeCount > 0) && normalsBuffer != null) - { - threadGroups = ComputeMath.ThreadGroupCount(normalsBuffer.count, 128); - deformableTrisShader.SetInt("normalsCount", normalsBuffer.count); - deformableTrisShader.SetBuffer(resetNormalsKernel, "phases", phasesBuffer); - deformableTrisShader.SetBuffer(resetNormalsKernel, "normals", normalsBuffer); - deformableTrisShader.SetBuffer(resetNormalsKernel, "tangentsInt", tangentsIntBuffer); - - deformableTrisShader.Dispatch(resetNormalsKernel, threadGroups, 1, 1); - - // Update deformable triangle normals - if (deformableTriangleCount > 0) - { - threadGroups = ComputeMath.ThreadGroupCount(deformableTriangleCount, 128); - deformableTrisShader.SetBuffer(updateNormalsKernel, "renderablePositions", renderablePositionsBuffer); - deformableTrisShader.SetBuffer(updateNormalsKernel, "normalsInt", normalsBuffer); - deformableTrisShader.SetBuffer(updateNormalsKernel, "tangentsInt", tangentsIntBuffer); - - deformableTrisShader.Dispatch(updateNormalsKernel, threadGroups, 1, 1); - } - - // Update deformable edge normals - if (deformableEdgeCount > 0) - { - threadGroups = ComputeMath.ThreadGroupCount(deformableEdgeCount, 128); - deformableTrisShader.SetBuffer(updateEdgeNormalsKernel, "renderablePositions", renderablePositionsBuffer); - deformableTrisShader.SetBuffer(updateEdgeNormalsKernel, "velocities", velocitiesBuffer); - deformableTrisShader.SetBuffer(updateEdgeNormalsKernel, "wind", windBuffer); - deformableTrisShader.SetBuffer(updateEdgeNormalsKernel, "normalsInt", normalsBuffer); - - deformableTrisShader.Dispatch(updateEdgeNormalsKernel, threadGroups, 1, 1); - } - - // Update particle orientations - threadGroups = ComputeMath.ThreadGroupCount(normalsBuffer.count, 128); - deformableTrisShader.SetBuffer(orientationFromNormalsKernel, "phases", phasesBuffer); - deformableTrisShader.SetBuffer(orientationFromNormalsKernel, "renderableOrientations", renderableOrientationsBuffer); - deformableTrisShader.SetBuffer(orientationFromNormalsKernel, "normals", normalsBuffer); - deformableTrisShader.SetBuffer(orientationFromNormalsKernel, "tangentsInt", tangentsIntBuffer); - - deformableTrisShader.Dispatch(orientationFromNormalsKernel, threadGroups, 1, 1); - } - - // project renderable position/orientation of pinned particles: - var pinparam = abstraction.GetConstraintParameters(Oni.ConstraintType.Pin); if (pinparam.enabled && pinparam.iterations > 0) - { - var d = constraints[(int)Oni.ConstraintType.Pin] as ComputePinConstraints; - if (Application.isPlaying && d != null) - d.ProjectRenderablePositions(); } - - //make sure density constraints are enabled, otherwise particles have no neighbors and neighbor lists will be uninitialized. - var param = m_Solver.GetConstraintParameters(Oni.ConstraintType.Density); if (param.enabled && param.iterations > 0) - { - // Fluid laplacian/anisotropy (only if we're in play mode, in-editor we have no particlegrid/sorted data). - var d = constraints[(int)Oni.ConstraintType.Density] as ComputeDensityConstraints; - if (Application.isPlaying && d != null) - d.CalculateAnisotropyLaplacianSmoothing(); - } - - return inputDeps; - } - - private void UpdateDiffuseDensity(float deltaTime) - { - var system = abstraction.GetRenderSystem() as ComputeFoamRenderSystem; - if (system != null && m_Solver.maxFoamParticles > 0 && particleGrid.cellCounts != null) - { - for (int i = 0; i < system.renderers.Count; ++i) - { - // solver indices compute buffer may be null - if (system.renderers[i].pressure > 0 && - system.renderers[i].actor.solverIndices?.computeBuffer != null) - { - float scale = 0.01f + Mathf.Clamp01(1 - system.renderers[i].density); - float radius = system.renderers[i].size * scale; - - int cellThreadGroups = ComputeMath.ThreadGroupCount(particleGrid.cellCounts.count, 128); - foamDensityShader.SetFloat("deltaTime", deltaTime); - foamDensityShader.SetInt("maxCells", particleGrid.cellCounts.count); - foamDensityShader.SetInt("maxFoamParticles", abstraction.foamPositions.computeBuffer.count); - foamDensityShader.SetInt("mode", (int)abstraction.parameters.mode); - foamDensityShader.SetFloat("pressure", system.renderers[i].pressure); - foamDensityShader.SetFloat("particleRadius", radius); - foamDensityShader.SetFloat("smoothingRadius", radius * 2 * system.renderers[i].smoothingRadius); - foamDensityShader.SetFloat("surfaceTension", system.renderers[i].surfaceTension); - foamDensityShader.SetFloat("viscosity", system.renderers[i].viscosity); - foamDensityShader.SetVector("volumeLightDirection", system.renderers[i].volumeLight != null ? abstraction.transform.InverseTransformDirection(system.renderers[i].volumeLight.transform.forward) : Vector3.down); - - foamDensityShader.SetBuffer(clearGridKernel, "cellStart", particleGrid.cellOffsets); - foamDensityShader.SetBuffer(clearGridKernel, "cellCounts", particleGrid.cellCounts); - foamDensityShader.Dispatch(clearGridKernel, cellThreadGroups, 1, 1); - - foamDensityShader.SetBuffer(insertGridKernel, "inputPositions", abstraction.foamPositions.computeBuffer); - foamDensityShader.SetBuffer(insertGridKernel, "offsetInCell", auxOffsetInCell); - foamDensityShader.SetBuffer(insertGridKernel, "cellCounts", particleGrid.cellCounts); - foamDensityShader.SetBuffer(insertGridKernel, "dispatch", abstraction.foamCount.computeBuffer); - foamDensityShader.DispatchIndirect(insertGridKernel, abstraction.foamCount.computeBuffer); - - // prefix sum - particleGrid.cellsPrefixSum.Sum(particleGrid.cellCounts, particleGrid.cellOffsets); - - foamDensityShader.SetBuffer(sortByGridKernel, "inputPositions", abstraction.foamPositions.computeBuffer); - foamDensityShader.SetBuffer(sortByGridKernel, "inputVelocities", abstraction.foamVelocities.computeBuffer); - foamDensityShader.SetBuffer(sortByGridKernel, "sortedPositions", auxPositions); - foamDensityShader.SetBuffer(sortByGridKernel, "sortedVelocities", auxVelocities); - foamDensityShader.SetBuffer(sortByGridKernel, "sortedToOriginal", auxSortedToOriginal); - foamDensityShader.SetBuffer(sortByGridKernel, "offsetInCell", auxOffsetInCell); - foamDensityShader.SetBuffer(sortByGridKernel, "cellStart", particleGrid.cellOffsets); - foamDensityShader.SetBuffer(sortByGridKernel, "cellCounts", particleGrid.cellCounts); - foamDensityShader.SetBuffer(sortByGridKernel, "dispatch", abstraction.foamCount.computeBuffer); - foamDensityShader.DispatchIndirect(sortByGridKernel, abstraction.foamCount.computeBuffer); - - foamDensityShader.SetBuffer(computeDensityKernel, "inputPositions", abstraction.foamPositions.computeBuffer); - foamDensityShader.SetBuffer(computeDensityKernel, "sortedPositions", auxPositions); - foamDensityShader.SetBuffer(computeDensityKernel, "fluidData", auxColors); - foamDensityShader.SetBuffer(computeDensityKernel, "cellStart", particleGrid.cellOffsets); - foamDensityShader.SetBuffer(computeDensityKernel, "cellCounts", particleGrid.cellCounts); - foamDensityShader.SetBuffer(computeDensityKernel, "dispatch", abstraction.foamCount.computeBuffer); - foamDensityShader.DispatchIndirect(computeDensityKernel, abstraction.foamCount.computeBuffer); - - foamDensityShader.SetBuffer(applyDensityKernel, "inputPositions", abstraction.foamPositions.computeBuffer); - foamDensityShader.SetBuffer(applyDensityKernel, "inputVelocities", abstraction.foamVelocities.computeBuffer); - foamDensityShader.SetBuffer(applyDensityKernel, "sortedPositions", auxPositions); - foamDensityShader.SetBuffer(applyDensityKernel, "sortedVelocities", auxVelocities); - foamDensityShader.SetBuffer(applyDensityKernel, "sortedToOriginal", auxSortedToOriginal); - foamDensityShader.SetBuffer(applyDensityKernel, "fluidData", auxColors); - foamDensityShader.SetBuffer(applyDensityKernel, "cellStart", particleGrid.cellOffsets); - foamDensityShader.SetBuffer(applyDensityKernel, "cellCounts", particleGrid.cellCounts); - foamDensityShader.SetBuffer(applyDensityKernel, "dispatch", abstraction.foamCount.computeBuffer); - foamDensityShader.DispatchIndirect(applyDensityKernel, abstraction.foamCount.computeBuffer); - } - } - } - else - activeFoamParticleCount = 0; - } - - private void UpdateDiffuseCollisions(float deltaTime) - { - if (!abstraction.foamCollisions) return; - - foamCollisionShader.SetFloat("radiusScale", 0.3f); - foamCollisionShader.SetFloat("colliderCount", colliderGrid.colliderCount); - foamCollisionShader.SetInt("maxCells", ComputeColliderWorld.maxCells); - foamCollisionShader.SetInt("cellsPerCollider", ComputeColliderWorld.cellsPerCollider); - foamCollisionShader.SetInt("shapeTypeCount", Oni.ColliderShapeTypeCount); - foamCollisionShader.SetFloat("deltaTime", deltaTime); - - foamCollisionShader.SetBuffer(solveDiffuseContactsKernel, "inputPositions", abstraction.foamPositions.computeBuffer); - foamCollisionShader.SetBuffer(solveDiffuseContactsKernel, "inputVelocities", abstraction.foamVelocities.computeBuffer); - foamCollisionShader.SetBuffer(solveDiffuseContactsKernel, "inputAttributes", abstraction.foamAttributes.computeBuffer); - foamCollisionShader.SetBuffer(solveDiffuseContactsKernel, "aabbs", colliderGrid.aabbsBuffer); - foamCollisionShader.SetBuffer(solveDiffuseContactsKernel, "transforms", colliderGrid.transformsBuffer); - foamCollisionShader.SetBuffer(solveDiffuseContactsKernel, "shapes", colliderGrid.shapesBuffer); - foamCollisionShader.SetBuffer(solveDiffuseContactsKernel, "rigidbodies", colliderGrid.rigidbodiesBuffer); - foamCollisionShader.SetBuffer(solveDiffuseContactsKernel, "sortedColliderIndices", colliderGrid.sortedColliderIndicesBuffer); - foamCollisionShader.SetBuffer(solveDiffuseContactsKernel, "levelPopulation", colliderGrid.levelPopulation); - foamCollisionShader.SetBuffer(solveDiffuseContactsKernel, "cellOffsets", colliderGrid.cellOffsetsBuffer); - foamCollisionShader.SetBuffer(solveDiffuseContactsKernel, "cellCounts", colliderGrid.cellCountsBuffer); - - foamCollisionShader.SetBuffer(solveDiffuseContactsKernel, "triangleMeshHeaders", colliderGrid.triangleMeshHeaders); - foamCollisionShader.SetBuffer(solveDiffuseContactsKernel, "bihNodes", colliderGrid.bihNodes); - foamCollisionShader.SetBuffer(solveDiffuseContactsKernel, "triangles", colliderGrid.triangles); - foamCollisionShader.SetBuffer(solveDiffuseContactsKernel, "vertices", colliderGrid.vertices); - - foamCollisionShader.SetBuffer(solveDiffuseContactsKernel, "edgeMeshHeaders", colliderGrid.edgeMeshHeaders); - foamCollisionShader.SetBuffer(solveDiffuseContactsKernel, "edgeBihNodes", colliderGrid.edgeBihNodes); - foamCollisionShader.SetBuffer(solveDiffuseContactsKernel, "edges", colliderGrid.edges); - foamCollisionShader.SetBuffer(solveDiffuseContactsKernel, "edgeVertices", colliderGrid.edgeVertices); - - foamCollisionShader.SetBuffer(solveDiffuseContactsKernel, "distanceFieldHeaders", colliderGrid.distanceFieldHeaders); - foamCollisionShader.SetBuffer(solveDiffuseContactsKernel, "dfNodes", colliderGrid.dfNodes); - - foamCollisionShader.SetBuffer(solveDiffuseContactsKernel, "heightFieldHeaders", colliderGrid.heightFieldHeaders); - foamCollisionShader.SetBuffer(solveDiffuseContactsKernel, "heightFieldSamples", colliderGrid.heightFieldSamples); - - foamCollisionShader.SetBuffer(solveDiffuseContactsKernel, "worldToSolver", worldToSolverBuffer); - foamCollisionShader.SetBuffer(solveDiffuseContactsKernel, "solverToWorld", solverToWorldBuffer); - - foamCollisionShader.SetBuffer(solveDiffuseContactsKernel, "dispatch", abstraction.foamCount.computeBuffer); - foamCollisionShader.DispatchIndirect(solveDiffuseContactsKernel, abstraction.foamCount.computeBuffer); - } - - private void UpdateDiffuseParticles(float deltaTime) - { - var system = abstraction.GetRenderSystem() as ComputeFoamRenderSystem; - if (system != null && m_Solver.maxFoamParticles > 0 && particleGrid.sortedLinearVel != null) - { - foamShader.SetFloat("deltaTime", deltaTime); - foamShader.SetFloat("randomSeed", Time.frameCount % 16535 + Random.value); - foamShader.SetVector("gravity", m_Solver.parameters.gravity * m_Solver.parameters.foamGravityScale); - foamShader.SetVector("agingOverPopulation", new Vector3(m_Solver.foamAccelAgingRange.x, m_Solver.foamAccelAgingRange.y, m_Solver.foamAccelAging)); - foamShader.SetInt("maxFoamParticles", abstraction.foamPositions.computeBuffer.count); - foamShader.SetInt("minFluidNeighbors", abstraction.foamMinNeighbors); - foamShader.SetInt("maxCells", particleGrid.maxCells); - - foamShader.SetInt("pointCount", simplexCounts.pointCount); - foamShader.SetInt("edgeCount", simplexCounts.edgeCount); - foamShader.SetInt("triangleCount", simplexCounts.triangleCount); - - foamShader.SetBuffer(sortDataKernel, "positions", positionsBuffer); - foamShader.SetBuffer(sortDataKernel, "velocities", velocitiesBuffer); - foamShader.SetBuffer(sortDataKernel, "angularVelocities", angularVelocitiesBuffer); - foamShader.SetBuffer(sortDataKernel, "orientations", renderableOrientationsBuffer); - foamShader.SetBuffer(sortDataKernel, "principalRadii", renderableRadiiBuffer); - foamShader.SetBuffer(sortDataKernel, "sortedPositions", particleGrid.sortedPositions); - foamShader.SetBuffer(sortDataKernel, "sortedVelocities", particleGrid.sortedLinearVel); - foamShader.SetBuffer(sortDataKernel, "sortedAngularVelocities", particleGrid.sortedAngularVel); - foamShader.SetBuffer(sortDataKernel, "sortedOrientations", particleGrid.sortedPrevPosOrientations); - foamShader.SetBuffer(sortDataKernel, "sortedRadii", particleGrid.sortedPrincipalRadii); - foamShader.SetBuffer(sortDataKernel, "sortedToOriginal", particleGrid.sortedFluidIndices); - foamShader.SetBuffer(sortDataKernel, "dispatch", fluidDispatchBuffer); - foamShader.DispatchIndirect(sortDataKernel, fluidDispatchBuffer); - - int threadGroups; - foamShader.SetBuffer(emitFoamKernel, "positions", positionsBuffer); - foamShader.SetBuffer(emitFoamKernel, "velocities", velocitiesBuffer); - foamShader.SetBuffer(emitFoamKernel, "angularVelocities", angularVelocitiesBuffer); - foamShader.SetBuffer(emitFoamKernel, "fluidData", fluidDataBuffer); - foamShader.SetBuffer(emitFoamKernel, "principalRadii", principalRadiiBuffer); - foamShader.SetBuffer(emitFoamKernel, "outputPositions", abstraction.foamPositions.computeBuffer); - foamShader.SetBuffer(emitFoamKernel, "outputVelocities", abstraction.foamVelocities.computeBuffer); - foamShader.SetBuffer(emitFoamKernel, "outputColors", abstraction.foamColors.computeBuffer); - foamShader.SetBuffer(emitFoamKernel, "outputAttributes", abstraction.foamAttributes.computeBuffer); - foamShader.SetBuffer(emitFoamKernel, "dispatch", abstraction.foamCount.computeBuffer); - - foamShader.SetBuffer(emitShapeFoamKernel, "outputPositions", abstraction.foamPositions.computeBuffer); - foamShader.SetBuffer(emitShapeFoamKernel, "outputVelocities", abstraction.foamVelocities.computeBuffer); - foamShader.SetBuffer(emitShapeFoamKernel, "outputColors", abstraction.foamColors.computeBuffer); - foamShader.SetBuffer(emitShapeFoamKernel, "outputAttributes", abstraction.foamAttributes.computeBuffer); - foamShader.SetBuffer(emitShapeFoamKernel, "dispatch", abstraction.foamCount.computeBuffer); - for (int i = 0; i < system.renderers.Count; ++i) - { - // solver indices compute buffer may be null - if (system.renderers[i].actor.solverIndices?.computeBuffer != null) - { - threadGroups = ComputeMath.ThreadGroupCount(system.renderers[i].actor.activeParticleCount, 128); - foamShader.SetInt("activeParticleCount", system.renderers[i].actor.activeParticleCount); - foamShader.SetVector("vorticityRange", system.renderers[i].vorticityRange); - foamShader.SetVector("velocityRange", system.renderers[i].velocityRange); - foamShader.SetFloat("foamGenerationRate", system.renderers[i].foamGenerationRate); - foamShader.SetFloat("potentialIncrease", system.renderers[i].foamPotential); - foamShader.SetFloat("potentialDiffusion", Mathf.Pow(1 - Mathf.Clamp01(system.renderers[i].foamPotentialDiffusion), deltaTime)); - foamShader.SetFloat("buoyancy", system.renderers[i].buoyancy); - foamShader.SetFloat("drag", system.renderers[i].drag); - foamShader.SetFloat("airDrag", Mathf.Pow(1 - Mathf.Clamp01(system.renderers[i].atmosphericDrag), deltaTime)); - foamShader.SetFloat("airAging", system.renderers[i].airAging); - foamShader.SetFloat("isosurface", system.renderers[i].isosurface); - - foamShader.SetFloat("particleSize", system.renderers[i].size); - foamShader.SetFloat("sizeRandom", system.renderers[i].sizeRandom); - foamShader.SetFloat("lifetime", system.renderers[i].lifetime); - foamShader.SetFloat("lifetimeRandom", system.renderers[i].lifetimeRandom); - foamShader.SetVector("foamColor", system.renderers[i].color); - - if (system.renderers[i] is ObiFoamEmitter) - { - var emitter = system.renderers[i] as ObiFoamEmitter; - int particlesToEmit = emitter.GetParticleNumberToEmit(deltaTime); - threadGroups = ComputeMath.ThreadGroupCount(particlesToEmit, 128); - foamShader.SetInt("particlesToEmit", particlesToEmit); - foamShader.SetInt("emitterShape", (int)emitter.shape); - foamShader.SetVector("emitterPosition", emitter.shapeTransform != null? abstraction.transform.InverseTransformPoint(emitter.shapeTransform.position) : Vector3.zero); - foamShader.SetVector("emitterRotation", (emitter.shapeTransform != null ? emitter.shapeTransform.rotation * Quaternion.Inverse(abstraction.transform.rotation): Quaternion.identity).AsVector4()); - foamShader.SetVector("emitterSize", emitter.shapeSize); - foamShader.Dispatch(emitShapeFoamKernel, threadGroups, 1, 1); - } - else // generator - { - foamShader.SetBuffer(emitFoamKernel, "activeParticles", system.renderers[i].actor.solverIndices.computeBuffer); - foamShader.Dispatch(emitFoamKernel, threadGroups, 1, 1); - } - } - } - - foamShader.SetBuffer(copyAliveKernel, "dispatch", abstraction.foamCount.computeBuffer); - foamShader.Dispatch(copyAliveKernel, 1, 1, 1); - - foamShader.SetBuffer(updateFoamKernel, "cellOffsets", particleGrid.cellOffsets); - foamShader.SetBuffer(updateFoamKernel, "cellCounts", particleGrid.cellCounts); - foamShader.SetBuffer(updateFoamKernel, "gridHashToSortedIndex", particleGrid.cellHashToMortonIndex); - foamShader.SetBuffer(updateFoamKernel, "levelPopulation", particleGrid.levelPopulation); - foamShader.SetBuffer(updateFoamKernel, "solverBounds", reducedBounds); - - foamShader.SetBuffer(updateFoamKernel, "positions", particleGrid.sortedPositions); - foamShader.SetBuffer(updateFoamKernel, "orientations", particleGrid.sortedPrevPosOrientations); - foamShader.SetBuffer(updateFoamKernel, "principalRadii", particleGrid.sortedPrincipalRadii); - foamShader.SetBuffer(updateFoamKernel, "velocities", particleGrid.sortedLinearVel); - foamShader.SetBuffer(updateFoamKernel, "angularVelocities", particleGrid.sortedAngularVel); - foamShader.SetBuffer(updateFoamKernel, "fluidMaterial", particleGrid.sortedFluidMaterials); - foamShader.SetBuffer(updateFoamKernel, "fluidData", particleGrid.sortedFluidData); - foamShader.SetBuffer(updateFoamKernel, "fluidSimplices", particleGrid.sortedSimplexToFluid); - foamShader.SetBuffer(updateFoamKernel, "sortedToOriginal", particleGrid.sortedFluidIndices); - foamShader.SetBuffer(updateFoamKernel, "inputPositions", abstraction.foamPositions.computeBuffer); - foamShader.SetBuffer(updateFoamKernel, "inputVelocities", abstraction.foamVelocities.computeBuffer); - foamShader.SetBuffer(updateFoamKernel, "inputColors", abstraction.foamColors.computeBuffer); - foamShader.SetBuffer(updateFoamKernel, "inputAttributes", abstraction.foamAttributes.computeBuffer); - foamShader.SetBuffer(updateFoamKernel, "outputPositions", auxPositions); - foamShader.SetBuffer(updateFoamKernel, "outputVelocities", auxVelocities); - foamShader.SetBuffer(updateFoamKernel, "outputColors", auxColors); - foamShader.SetBuffer(updateFoamKernel, "outputAttributes", auxAttributes); - foamShader.SetBuffer(updateFoamKernel, "dispatch", abstraction.foamCount.computeBuffer); - foamShader.DispatchIndirect(updateFoamKernel, abstraction.foamCount.computeBuffer); - - // copy aux buffers to solver buffers: - foamShader.SetBuffer(copyKernel, "inputPositions", auxPositions); - foamShader.SetBuffer(copyKernel, "inputVelocities", auxVelocities); - foamShader.SetBuffer(copyKernel, "inputColors", auxColors); - foamShader.SetBuffer(copyKernel, "inputAttributes", auxAttributes); - foamShader.SetBuffer(copyKernel, "outputPositions", abstraction.foamPositions.computeBuffer); - foamShader.SetBuffer(copyKernel, "outputVelocities", abstraction.foamVelocities.computeBuffer); - foamShader.SetBuffer(copyKernel, "outputColors", abstraction.foamColors.computeBuffer); - foamShader.SetBuffer(copyKernel, "outputAttributes", abstraction.foamAttributes.computeBuffer); - foamShader.SetBuffer(copyKernel, "dispatch", abstraction.foamCount.computeBuffer); - foamShader.DispatchIndirect(copyKernel, abstraction.foamCount.computeBuffer, 16); - - AsyncGPUReadback.Request(abstraction.foamCount.computeBuffer, 4, 12, (AsyncGPUReadbackRequest obj) => - { - if (obj.done && !obj.hasError) - this.activeFoamParticleCount = obj.GetData()[0]; - }); - } - else - activeFoamParticleCount = 0; - } - - private void IntegrateDiffuseParticles(float deltaTime) - { - foamShader.SetFloat("deltaTime", deltaTime); - - foamShader.SetBuffer(integrateFoamKernel, "outputPositions", abstraction.foamPositions.computeBuffer); - foamShader.SetBuffer(integrateFoamKernel, "outputVelocities", abstraction.foamVelocities.computeBuffer); - - foamShader.SetBuffer(integrateFoamKernel, "dispatch", abstraction.foamCount.computeBuffer); - foamShader.DispatchIndirect(integrateFoamKernel, abstraction.foamCount.computeBuffer); - } - - public void SpatialQuery(ObiNativeQueryShapeList shapes, ObiNativeAffineTransformList transforms, ObiNativeQueryResultList results) { - if (abstraction.queryResults.count != abstraction.maxQueryResults) - { - abstraction.queryResults.ResizeUninitialized((int)abstraction.maxQueryResults); - abstraction.queryResults.SafeAsComputeBuffer(GraphicsBuffer.Target.Counter); - } - - spatialQueries.SpatialQuery(this, shapes.SafeAsComputeBuffer(), - transforms.SafeAsComputeBuffer(), - results.computeBuffer); - } - - public int GetParticleGridSize() - { - //return particleGrid.grid.usedCells.Length; - return 0; - } - public void GetParticleGrid(ObiNativeAabbList cells) - { - //particleGrid.GetCells(cells); - } - } -} diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Solver/ComputeSolverImpl.cs.meta b/Assets/Obi/Scripts/Common/Backends/Compute/Solver/ComputeSolverImpl.cs.meta deleted file mode 100644 index 53995cd7a..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Solver/ComputeSolverImpl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9bd37b35dc8b04d69bd0c88ac12b2c5d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Interface/Collisions/IColliderWorldImpl.cs b/Assets/Obi/Scripts/Common/Backends/Interface/Collisions/IColliderWorldImpl.cs index 56a124c12..cce5b3afd 100644 --- a/Assets/Obi/Scripts/Common/Backends/Interface/Collisions/IColliderWorldImpl.cs +++ b/Assets/Obi/Scripts/Common/Backends/Interface/Collisions/IColliderWorldImpl.cs @@ -10,8 +10,7 @@ namespace Obi void UpdateWorld(float deltaTime); - void SetColliders(ObiNativeColliderShapeList shapes, ObiNativeAabbList bounds, ObiNativeAffineTransformList transforms); - void SetForceZones(ObiNativeForceZoneList forceZones); + void SetColliders(ObiNativeColliderShapeList shapes, ObiNativeAabbList bounds, ObiNativeAffineTransformList transforms, int count); void SetRigidbodies(ObiNativeRigidbodyList rigidbody); void SetCollisionMaterials(ObiNativeCollisionMaterialList materials); diff --git a/Assets/Obi/Scripts/Common/Backends/Interface/Constraints/IPinholeConstraintsBatchImpl.cs b/Assets/Obi/Scripts/Common/Backends/Interface/Constraints/IPinholeConstraintsBatchImpl.cs deleted file mode 100644 index 24652e5f8..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Interface/Constraints/IPinholeConstraintsBatchImpl.cs +++ /dev/null @@ -1,8 +0,0 @@ - -namespace Obi -{ - public interface IPinholeConstraintsBatchImpl : IConstraintsBatchImpl - { - void SetPinholeConstraints(ObiNativeIntList particleIndices, ObiNativeIntList colliderIndices, ObiNativeVector4List offsets, ObiNativeFloatList edgeMus, ObiNativeIntList edgeRanges, ObiNativeFloatList edgeRangeMus, ObiNativeFloatList parameters, ObiNativeFloatList relativeVelocities, ObiNativeFloatList lambdas, int count); - } -} diff --git a/Assets/Obi/Scripts/Common/Backends/Interface/Constraints/IPinholeConstraintsBatchImpl.cs.meta b/Assets/Obi/Scripts/Common/Backends/Interface/Constraints/IPinholeConstraintsBatchImpl.cs.meta deleted file mode 100644 index 0cc8e50df..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Interface/Constraints/IPinholeConstraintsBatchImpl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 22a8bac3a0d2747b8ba78f201d67476a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Interface/Rendering.meta b/Assets/Obi/Scripts/Common/Backends/Interface/Rendering.meta deleted file mode 100644 index a168ded5e..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Interface/Rendering.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: e9bb708333a524266935df041ba30a42 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Interface/Rendering/IRenderSystem.cs b/Assets/Obi/Scripts/Common/Backends/Interface/Rendering/IRenderSystem.cs deleted file mode 100644 index 16aff0175..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Interface/Rendering/IRenderSystem.cs +++ /dev/null @@ -1,99 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace Obi -{ - public interface IRenderSystem - { - void Setup(); // build meshes, prepare render state, etc. - void Step(); // update constraints (currently only used by skinned cloth) - void Render(); // do the actual rendering. - - void Dispose(); - - uint tier { get { return 1; } } - Oni.RenderingSystemType typeEnum { get; } - - bool isEmpty { get; } - Type GetRendererType(); - } - - public class RendererSet where T : ObiRenderer - { - private List list = new List(); - - public T this[int i] - { - get { return list[i]; } - set { list[i] = value; } - } - - public int Count - { - get { return list.Count; } - } - - public bool AddRenderer(T renderer) - { - // Even though using a HashSet would keep us from checking for - // duplicates in O(n), the only way to iterate trough a set - // causes GC. Since we iterate trough renderers every frame, - // but we only add new renderers once in a blue moon, - // it's preferable to use a list instead. - - if (!list.Contains(renderer)) - { - list.Add(renderer); - return true; - } - return false; - } - - public bool RemoveRenderer(T renderer) - { - return list.Remove(renderer); - } - - public void RemoveAt(int i) - { - if (i >= 0 && i < list.Count) - list.RemoveAt(i); - } - - public int IndexOf(T renderer) - { - return list.IndexOf(renderer); - } - - public IReadOnlyList AsReadOnly() - { - return list.AsReadOnly(); - } - - public void Clear() - { - list.Clear(); - } - } - - public interface RenderSystem : IRenderSystem where T : ObiRenderer - { - RendererSet renderers { get; } - - Type IRenderSystem.GetRendererType() { return typeof(T); } - - bool IRenderSystem.isEmpty - { - get { return renderers.Count == 0; } - } - - public virtual bool AddRenderer(T renderer) - { - return renderers.AddRenderer(renderer); - } - public virtual bool RemoveRenderer(T renderer) - { - return renderers.RemoveRenderer(renderer); - } - } -} diff --git a/Assets/Obi/Scripts/Common/Backends/Interface/Rendering/IRenderSystem.cs.meta b/Assets/Obi/Scripts/Common/Backends/Interface/Rendering/IRenderSystem.cs.meta deleted file mode 100644 index 2828c5355..000000000 --- a/Assets/Obi/Scripts/Common/Backends/Interface/Rendering/IRenderSystem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: cd2ee05999916460aa9ee269dc8136e4 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Interface/Solver/ISolverImpl.cs b/Assets/Obi/Scripts/Common/Backends/Interface/Solver/ISolverImpl.cs index fb40d70f8..d99359509 100644 --- a/Assets/Obi/Scripts/Common/Backends/Interface/Solver/ISolverImpl.cs +++ b/Assets/Obi/Scripts/Common/Backends/Interface/Solver/ISolverImpl.cs @@ -1,4 +1,4 @@ -using UnityEngine; +using UnityEngine; namespace Obi { @@ -11,14 +11,13 @@ namespace Obi #region Inertial Frame void InitializeFrame(Vector4 translation, Vector4 scale, Quaternion rotation); void UpdateFrame(Vector4 translation, Vector4 scale, Quaternion rotation, float deltaTime); - IObiJobHandle ApplyFrame(float worldLinearInertiaScale, float worldAngularInertiaScale, float deltaTime); + void ApplyFrame(float worldLinearInertiaScale, float worldAngularInertiaScale, float deltaTime); #endregion #region Particles void ParticleCountChanged(ObiSolver solver); - void MaxFoamParticleCountChanged(ObiSolver solver); void SetActiveParticles(ObiNativeIntList indices); - uint activeFoamParticleCount { get; } + void InterpolateDiffuseProperties(ObiNativeVector4List properties, ObiNativeVector4List diffusePositions, ObiNativeVector4List diffuseProperties, ObiNativeIntList neighbourCount, int diffuseCount); #endregion #region Rigidbodies @@ -29,36 +28,33 @@ namespace Obi IConstraintsBatchImpl CreateConstraintsBatch(Oni.ConstraintType type); void DestroyConstraintsBatch(IConstraintsBatchImpl batch); int GetConstraintCount(Oni.ConstraintType type); + void GetCollisionContacts(Oni.Contact[] contacts, int count); + void GetParticleCollisionContacts(Oni.Contact[] contacts, int count); void SetConstraintGroupParameters(Oni.ConstraintType type, ref Oni.ConstraintParameters parameters); #endregion #region Update - IObiJobHandle UpdateBounds(IObiJobHandle inputDeps, float stepTime); - IObiJobHandle CollisionDetection(IObiJobHandle inputDeps, float stepTime); - IObiJobHandle Substep(IObiJobHandle inputDeps, float stepTime, float substepTime, int steps, float timeLeft); - IObiJobHandle ApplyInterpolation(IObiJobHandle inputDeps, ObiNativeVector4List startPositions, ObiNativeQuaternionList startOrientations, float stepTime, float unsimulatedTime); - - void FinishSimulation(); - void PushData(); - void RequestReadback(); - #endregion - - #region Deformable shapes - void SetDeformableTriangles(ObiNativeIntList indices, ObiNativeVector2List uvs); - void SetDeformableEdges(ObiNativeIntList indices); + IObiJobHandle CollisionDetection(float stepTime); + IObiJobHandle Substep(float stepTime, float substepTime, int substeps); + void ApplyInterpolation(ObiNativeVector4List startPositions, ObiNativeQuaternionList startOrientations, float stepTime, float unsimulatedTime); #endregion #region Simplices + int GetDeformableTriangleCount(); + void SetDeformableTriangles(int[] indices, int num, int destOffset); + int RemoveDeformableTriangles(int num, int sourceOffset); + void SetSimplices(ObiNativeIntList simplices, SimplexCounts counts); #endregion #region Utils void SetParameters(Oni.SolverParameters parameters); void GetBounds(ref Vector3 min, ref Vector3 max); + void ResetForces(); int GetParticleGridSize(); void GetParticleGrid(ObiNativeAabbList cells); void SpatialQuery(ObiNativeQueryShapeList shapes, ObiNativeAffineTransformList transforms, ObiNativeQueryResultList results); + void ReleaseJobHandles(); #endregion - } } diff --git a/Assets/Obi/Scripts/Common/Backends/Null/NullBackend.cs b/Assets/Obi/Scripts/Common/Backends/Null/NullBackend.cs index 10cc2d691..0badd2fee 100644 --- a/Assets/Obi/Scripts/Common/Backends/Null/NullBackend.cs +++ b/Assets/Obi/Scripts/Common/Backends/Null/NullBackend.cs @@ -11,5 +11,6 @@ { } #endregion + } } diff --git a/Assets/Obi/Scripts/Common/Backends/Null/NullSolverImpl.cs b/Assets/Obi/Scripts/Common/Backends/Null/NullSolverImpl.cs index 9e21824d9..37dfe52e1 100644 --- a/Assets/Obi/Scripts/Common/Backends/Null/NullSolverImpl.cs +++ b/Assets/Obi/Scripts/Common/Backends/Null/NullSolverImpl.cs @@ -1,23 +1,15 @@ -using UnityEngine; +using UnityEngine; using System; namespace Obi { public class NullSolverImpl : ISolverImpl { - public uint activeFoamParticleCount { private set; get; } public void Destroy() { } - public void PushData() - { - } - public void RequestReadback() - { - } - public void InitializeFrame(Vector4 translation, Vector4 scale, Quaternion rotation) { } @@ -26,24 +18,21 @@ namespace Obi { } - public IObiJobHandle ApplyFrame(float worldLinearInertiaScale, float worldAngularInertiaScale, float deltaTime) + public void ApplyFrame(float worldLinearInertiaScale, float worldAngularInertiaScale, float deltaTime) { - return null; } - public IObiJobHandle ApplyForceZones(ObiNativeForceZoneList zones, ObiNativeAffineTransformList transforms) + public int GetDeformableTriangleCount() { - return null; + return 0; } - - public void SetDeformableTriangles(ObiNativeIntList indices, ObiNativeVector2List uvs) + public void SetDeformableTriangles(int[] indices, int num, int destOffset) { } - - public void SetDeformableEdges(ObiNativeIntList indices) + public int RemoveDeformableTriangles(int num, int sourceOffset) { - + return 0; } public void SetSimplices(ObiNativeIntList simplices, SimplexCounts counts) @@ -54,11 +43,6 @@ namespace Obi { } - public void MaxFoamParticleCountChanged(ObiSolver solver) - { - - } - public void SetRigidbodyArrays(ObiSolver solver) { } @@ -67,6 +51,10 @@ namespace Obi { } + public void ResetForces() + { + } + public void GetBounds(ref Vector3 min, ref Vector3 max) { } @@ -80,6 +68,14 @@ namespace Obi return 0; } + public void GetCollisionContacts(Oni.Contact[] contacts, int count) + { + } + + public void GetParticleCollisionContacts(Oni.Contact[] contacts, int count) + { + } + public void SetConstraintGroupParameters(Oni.ConstraintType type, ref Oni.ConstraintParameters parameters) { } @@ -93,29 +89,22 @@ namespace Obi { } - public void FinishSimulation() - { - - } - - public IObiJobHandle UpdateBounds(IObiJobHandle inputDeps, float stepTime) + public IObiJobHandle CollisionDetection(float stepTime) { return null; } - public IObiJobHandle CollisionDetection(IObiJobHandle inputDeps, float stepTime) + public IObiJobHandle Substep(float stepTime, float substepTime, int index) { return null; } - public IObiJobHandle Substep(IObiJobHandle inputDeps, float stepTime, float substepTime, int index, float timeLeft) + public void ApplyInterpolation(ObiNativeVector4List startPositions, ObiNativeQuaternionList startOrientations, float stepTime, float unsimulatedTime) { - return null; } - public IObiJobHandle ApplyInterpolation(IObiJobHandle inputDeps, ObiNativeVector4List startPositions, ObiNativeQuaternionList startOrientations, float stepTime, float unsimulatedTime) + public void InterpolateDiffuseProperties(ObiNativeVector4List properties, ObiNativeVector4List diffusePositions, ObiNativeVector4List diffuseProperties, ObiNativeIntList neighbourCount, int diffuseCount) { - return null; } public int GetParticleGridSize() @@ -130,5 +119,10 @@ namespace Obi public void SpatialQuery(ObiNativeQueryShapeList shapes, ObiNativeAffineTransformList transforms, ObiNativeQueryResultList results) { } + + public void ReleaseJobHandles() + { + + } } } diff --git a/Assets/Obi/Scripts/Common/Backends/Oni.meta b/Assets/Obi/Scripts/Common/Backends/Oni.meta new file mode 100644 index 000000000..bcd65f30c --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 681a7c364e05c483f85cad1eb07018fd +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints.meta b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints.meta similarity index 77% rename from Assets/Obi/Scripts/Common/Backends/Compute/Constraints.meta rename to Assets/Obi/Scripts/Common/Backends/Oni/Constraints.meta index d57b2cf13..6443434bf 100644 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints.meta +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 0040fe7f7368047d29f179b7d7bf4d1a +guid: 97b02df45f4844e32a90f2f5d93de422 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Aerodynamics.meta b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Aerodynamics.meta similarity index 77% rename from Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Aerodynamics.meta rename to Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Aerodynamics.meta index 783357514..f3e2fd42e 100644 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Aerodynamics.meta +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Aerodynamics.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 5b92b6684fbd249cd9732bf9b3303e03 +guid: ac58d86bbc15740a98fd45e796e43034 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Aerodynamics/OniAerodynamicConstraintsBatchImpl.cs b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Aerodynamics/OniAerodynamicConstraintsBatchImpl.cs new file mode 100644 index 000000000..068dafad6 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Aerodynamics/OniAerodynamicConstraintsBatchImpl.cs @@ -0,0 +1,20 @@ +#if (OBI_ONI_SUPPORTED) +using System; +using System.Collections; +using System.Runtime.InteropServices; + +namespace Obi +{ + public class OniAerodynamicConstraintsBatchImpl : OniConstraintsBatchImpl, IAerodynamicConstraintsBatchImpl + { + public OniAerodynamicConstraintsBatchImpl(OniAerodynamicConstraintsImpl constraints) : base(constraints, Oni.ConstraintType.Aerodynamics) + { + } + + public void SetAerodynamicConstraints(ObiNativeIntList particleIndices, ObiNativeFloatList aerodynamicCoeffs, int count) + { + Oni.SetAerodynamicConstraints(oniBatch, particleIndices.GetIntPtr(), aerodynamicCoeffs.GetIntPtr(), count); + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Aerodynamics/OniAerodynamicConstraintsBatchImpl.cs.meta b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Aerodynamics/OniAerodynamicConstraintsBatchImpl.cs.meta new file mode 100644 index 000000000..093d4d364 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Aerodynamics/OniAerodynamicConstraintsBatchImpl.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2eaf9121855a4484d8f5765d4ad9d974 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Aerodynamics/OniAerodynamicConstraintsImpl.cs b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Aerodynamics/OniAerodynamicConstraintsImpl.cs new file mode 100644 index 000000000..f50bf5650 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Aerodynamics/OniAerodynamicConstraintsImpl.cs @@ -0,0 +1,28 @@ +#if (OBI_ONI_SUPPORTED) +using System; +using System.Collections; +using System.Runtime.InteropServices; + +namespace Obi +{ + public class OniAerodynamicConstraintsImpl : OniConstraintsImpl + { + + public OniAerodynamicConstraintsImpl(OniSolverImpl solver) : base(solver, Oni.ConstraintType.Aerodynamics) + { + } + + public override IConstraintsBatchImpl CreateConstraintsBatch() + { + var batch = new OniAerodynamicConstraintsBatchImpl(this); + Oni.AddBatch(((OniSolverImpl)solver).oniSolver, ((OniConstraintsBatchImpl)batch).oniBatch); + return batch; + } + + public override void RemoveBatch(IConstraintsBatchImpl batch) + { + Oni.RemoveBatch(((OniSolverImpl)solver).oniSolver, ((OniConstraintsBatchImpl)batch).oniBatch); + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Aerodynamics/OniAerodynamicConstraintsImpl.cs.meta b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Aerodynamics/OniAerodynamicConstraintsImpl.cs.meta new file mode 100644 index 000000000..a5a5b519f --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Aerodynamics/OniAerodynamicConstraintsImpl.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 990162413cc804203a6ca5d7d90e1ae3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Bend.meta b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Bend.meta similarity index 77% rename from Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Bend.meta rename to Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Bend.meta index d595c99fa..be125343c 100644 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Bend.meta +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Bend.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: d16c953a082614e88bd02d0f99035c3a +guid: 64ac30003117243aba84fc4298f84eb7 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Bend/OniBendConstraintsBatchImpl.cs b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Bend/OniBendConstraintsBatchImpl.cs new file mode 100644 index 000000000..05fd5d83c --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Bend/OniBendConstraintsBatchImpl.cs @@ -0,0 +1,20 @@ +#if (OBI_ONI_SUPPORTED) +using System; +using System.Collections; +using System.Runtime.InteropServices; + +namespace Obi +{ + public class OniBendConstraintsBatchImpl : OniConstraintsBatchImpl, IBendConstraintsBatchImpl + { + public OniBendConstraintsBatchImpl(OniBendConstraintsImpl constraints) : base(constraints, Oni.ConstraintType.Bending) + { + } + + public void SetBendConstraints(ObiNativeIntList particleIndices, ObiNativeFloatList restBends, ObiNativeVector2List bendingStiffnesses, ObiNativeVector2List plasticity, ObiNativeFloatList lambdas, int count) + { + Oni.SetBendingConstraints(oniBatch, particleIndices.GetIntPtr(), restBends.GetIntPtr(), bendingStiffnesses.GetIntPtr(), plasticity.GetIntPtr(), lambdas.GetIntPtr(), count); + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Bend/OniBendConstraintsBatchImpl.cs.meta b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Bend/OniBendConstraintsBatchImpl.cs.meta new file mode 100644 index 000000000..a3260da5b --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Bend/OniBendConstraintsBatchImpl.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e465799aa3593428ebabdef6d97f2b4a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Bend/OniBendConstraintsImpl.cs b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Bend/OniBendConstraintsImpl.cs new file mode 100644 index 000000000..6c33c9fe3 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Bend/OniBendConstraintsImpl.cs @@ -0,0 +1,28 @@ +#if (OBI_ONI_SUPPORTED) +using System; +using System.Collections; +using System.Runtime.InteropServices; + +namespace Obi +{ + public class OniBendConstraintsImpl : OniConstraintsImpl + { + + public OniBendConstraintsImpl(OniSolverImpl solver) : base(solver, Oni.ConstraintType.Bending) + { + } + + public override IConstraintsBatchImpl CreateConstraintsBatch() + { + var batch = new OniBendConstraintsBatchImpl(this); + Oni.AddBatch(((OniSolverImpl)solver).oniSolver, ((OniConstraintsBatchImpl)batch).oniBatch); + return batch; + } + + public override void RemoveBatch(IConstraintsBatchImpl batch) + { + Oni.RemoveBatch(((OniSolverImpl)solver).oniSolver, ((OniConstraintsBatchImpl)batch).oniBatch); + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Bend/OniBendConstraintsImpl.cs.meta b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Bend/OniBendConstraintsImpl.cs.meta new file mode 100644 index 000000000..7175df868 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Bend/OniBendConstraintsImpl.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: abf82a5f5548d41feaaa9fa141461c4c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/BendTwist.meta b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/BendTwist.meta similarity index 77% rename from Assets/Obi/Scripts/Common/Backends/Compute/Constraints/BendTwist.meta rename to Assets/Obi/Scripts/Common/Backends/Oni/Constraints/BendTwist.meta index 230c84ffb..761171833 100644 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/BendTwist.meta +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/BendTwist.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 253f34729aa7d4bbabe8eca30fdb88af +guid: cdbe2ed97af924bb9ba78bac0fc122c7 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/BendTwist/OniBendTwistConstraintsBatchImpl.cs b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/BendTwist/OniBendTwistConstraintsBatchImpl.cs new file mode 100644 index 000000000..11ff42861 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/BendTwist/OniBendTwistConstraintsBatchImpl.cs @@ -0,0 +1,20 @@ +#if (OBI_ONI_SUPPORTED) +using System; +using System.Collections; +using System.Runtime.InteropServices; + +namespace Obi +{ + public class OniBendTwistConstraintsBatchImpl : OniConstraintsBatchImpl, IBendTwistConstraintsBatchImpl + { + public OniBendTwistConstraintsBatchImpl(OniBendTwistConstraintsImpl constraints) : base(constraints, Oni.ConstraintType.BendTwist) + { + } + + public void SetBendTwistConstraints(ObiNativeIntList orientationIndices, ObiNativeQuaternionList restOrientations, ObiNativeVector3List stiffnesses, ObiNativeVector2List plasticity, ObiNativeFloatList lambdas, int count) + { + Oni.SetBendTwistConstraints(oniBatch, orientationIndices.GetIntPtr(), restOrientations.GetIntPtr(), stiffnesses.GetIntPtr(), plasticity.GetIntPtr(), lambdas.GetIntPtr(), count); + } + } +} +#endif diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/BendTwist/OniBendTwistConstraintsBatchImpl.cs.meta b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/BendTwist/OniBendTwistConstraintsBatchImpl.cs.meta new file mode 100644 index 000000000..5e06b79bd --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/BendTwist/OniBendTwistConstraintsBatchImpl.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ba36c80996a534178a1db381ccbc8949 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/BendTwist/OniBendTwistConstraintsImpl.cs b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/BendTwist/OniBendTwistConstraintsImpl.cs new file mode 100644 index 000000000..d84eb3989 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/BendTwist/OniBendTwistConstraintsImpl.cs @@ -0,0 +1,28 @@ +#if (OBI_ONI_SUPPORTED) +using System; +using System.Collections; +using System.Runtime.InteropServices; + +namespace Obi +{ + public class OniBendTwistConstraintsImpl : OniConstraintsImpl + { + + public OniBendTwistConstraintsImpl(OniSolverImpl solver) : base(solver, Oni.ConstraintType.BendTwist) + { + } + + public override IConstraintsBatchImpl CreateConstraintsBatch() + { + var batch = new OniBendTwistConstraintsBatchImpl(this); + Oni.AddBatch(((OniSolverImpl)solver).oniSolver, ((OniConstraintsBatchImpl)batch).oniBatch); + return batch; + } + + public override void RemoveBatch(IConstraintsBatchImpl batch) + { + Oni.RemoveBatch(((OniSolverImpl)solver).oniSolver, ((OniConstraintsBatchImpl)batch).oniBatch); + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/BendTwist/OniBendTwistConstraintsImpl.cs.meta b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/BendTwist/OniBendTwistConstraintsImpl.cs.meta new file mode 100644 index 000000000..0bd43da19 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/BendTwist/OniBendTwistConstraintsImpl.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c6be6b2551afe45508d996dd67d1b710 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Chain.meta b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Chain.meta similarity index 77% rename from Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Chain.meta rename to Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Chain.meta index e9b29a821..976f69717 100644 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Chain.meta +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Chain.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 06d157d45e7fd46f08b501d67d3d632b +guid: 1a6c548d46acc4e88a31b3bf6b0a9ea8 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Chain/OniChainConstraintsBatchImpl.cs b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Chain/OniChainConstraintsBatchImpl.cs new file mode 100644 index 000000000..df76bc01d --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Chain/OniChainConstraintsBatchImpl.cs @@ -0,0 +1,20 @@ +#if (OBI_ONI_SUPPORTED) +using System; +using System.Collections; +using System.Runtime.InteropServices; + +namespace Obi +{ + public class OniChainConstraintsBatchImpl : OniConstraintsBatchImpl, IChainConstraintsBatchImpl + { + public OniChainConstraintsBatchImpl(OniChainConstraintsImpl constraints) : base(constraints, Oni.ConstraintType.Chain) + { + } + + public void SetChainConstraints(ObiNativeIntList particleIndices, ObiNativeVector2List restLengths, ObiNativeIntList firstIndex, ObiNativeIntList numIndices, int count) + { + Oni.SetChainConstraints(oniBatch, particleIndices.GetIntPtr(), restLengths.GetIntPtr(), firstIndex.GetIntPtr(), numIndices.GetIntPtr(), count); + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Chain/OniChainConstraintsBatchImpl.cs.meta b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Chain/OniChainConstraintsBatchImpl.cs.meta new file mode 100644 index 000000000..26a1a272a --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Chain/OniChainConstraintsBatchImpl.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 315f0420a391e43b3a3e255fce157f2a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Chain/OniChainConstraintsImpl.cs b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Chain/OniChainConstraintsImpl.cs new file mode 100644 index 000000000..0ce503c32 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Chain/OniChainConstraintsImpl.cs @@ -0,0 +1,28 @@ +#if (OBI_ONI_SUPPORTED) +using System; +using System.Collections; +using System.Runtime.InteropServices; + +namespace Obi +{ + public class OniChainConstraintsImpl : OniConstraintsImpl + { + + public OniChainConstraintsImpl(OniSolverImpl solver) : base(solver, Oni.ConstraintType.Chain) + { + } + + public override IConstraintsBatchImpl CreateConstraintsBatch() + { + var batch = new OniChainConstraintsBatchImpl(this); + Oni.AddBatch(((OniSolverImpl)solver).oniSolver, ((OniConstraintsBatchImpl)batch).oniBatch); + return batch; + } + + public override void RemoveBatch(IConstraintsBatchImpl batch) + { + Oni.RemoveBatch(((OniSolverImpl)solver).oniSolver, ((OniConstraintsBatchImpl)batch).oniBatch); + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Chain/OniChainConstraintsImpl.cs.meta b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Chain/OniChainConstraintsImpl.cs.meta new file mode 100644 index 000000000..78596a21d --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Chain/OniChainConstraintsImpl.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5730de157a60b46e9b258ac099ff1980 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Distance.meta b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Distance.meta similarity index 77% rename from Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Distance.meta rename to Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Distance.meta index 6db3da332..9cf2006c0 100644 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Distance.meta +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Distance.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: beca9bcaa99b64d8188c2ac127314259 +guid: ffe3dc0008b2b461d80dab10f72f50ee folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Distance/OniDistanceConstraintsBatchImpl.cs b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Distance/OniDistanceConstraintsBatchImpl.cs new file mode 100644 index 000000000..3c12fdc83 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Distance/OniDistanceConstraintsBatchImpl.cs @@ -0,0 +1,20 @@ +#if (OBI_ONI_SUPPORTED) +using System; +using System.Collections; +using System.Runtime.InteropServices; + +namespace Obi +{ + public class OniDistanceConstraintsBatchImpl : OniConstraintsBatchImpl, IDistanceConstraintsBatchImpl + { + public OniDistanceConstraintsBatchImpl(OniDistanceConstraintsImpl constraints) : base(constraints, Oni.ConstraintType.Distance) + { + } + + public void SetDistanceConstraints(ObiNativeIntList particleIndices, ObiNativeFloatList restLengths, ObiNativeVector2List stiffnesses, ObiNativeFloatList lambdas, int count) + { + Oni.SetDistanceConstraints(oniBatch, particleIndices.GetIntPtr(), restLengths.GetIntPtr(), stiffnesses.GetIntPtr(), lambdas.GetIntPtr(), count); + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Distance/OniDistanceConstraintsBatchImpl.cs.meta b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Distance/OniDistanceConstraintsBatchImpl.cs.meta new file mode 100644 index 000000000..01b5bdd79 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Distance/OniDistanceConstraintsBatchImpl.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e2e6ffc02968643a7a530f931b92f948 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Distance/OniDistanceConstraintsImpl.cs b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Distance/OniDistanceConstraintsImpl.cs new file mode 100644 index 000000000..1ceae3345 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Distance/OniDistanceConstraintsImpl.cs @@ -0,0 +1,28 @@ +#if (OBI_ONI_SUPPORTED) +using System; +using System.Collections; +using System.Runtime.InteropServices; + +namespace Obi +{ + public class OniDistanceConstraintsImpl : OniConstraintsImpl + { + + public OniDistanceConstraintsImpl(OniSolverImpl solver) : base(solver, Oni.ConstraintType.Distance) + { + } + + public override IConstraintsBatchImpl CreateConstraintsBatch() + { + var batch = new OniDistanceConstraintsBatchImpl(this); + Oni.AddBatch(((OniSolverImpl)solver).oniSolver, ((OniConstraintsBatchImpl)batch).oniBatch); + return batch; + } + + public override void RemoveBatch(IConstraintsBatchImpl batch) + { + Oni.RemoveBatch(((OniSolverImpl)solver).oniSolver, ((OniConstraintsBatchImpl)batch).oniBatch); + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Distance/OniDistanceConstraintsImpl.cs.meta b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Distance/OniDistanceConstraintsImpl.cs.meta new file mode 100644 index 000000000..e622b8d43 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Distance/OniDistanceConstraintsImpl.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1317284f320be48c7be4a294d253fc95 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/OniConstraintsBatchImpl.cs b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/OniConstraintsBatchImpl.cs new file mode 100644 index 000000000..39e0a53b6 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/OniConstraintsBatchImpl.cs @@ -0,0 +1,73 @@ +#if (OBI_ONI_SUPPORTED) +using System; +using System.Collections; +using System.Runtime.InteropServices; + +namespace Obi +{ + public class OniConstraintsBatchImpl : IConstraintsBatchImpl + { + protected IConstraints m_Constraints; + protected Oni.ConstraintType m_ConstraintType; + protected IntPtr m_OniBatch; + protected bool m_Enabled; + + public IntPtr oniBatch + { + get { return m_OniBatch; } + } + + public Oni.ConstraintType constraintType + { + get { return m_ConstraintType; } + } + + public IConstraints constraints + { + get { return m_Constraints; } + } + + public bool enabled + { + set + { + if (m_Enabled != value) + { + m_Enabled = value; + Oni.EnableBatch(m_OniBatch, m_Enabled); + } + } + get { return m_Enabled; } + } + + public OniConstraintsBatchImpl(IConstraints constraints, Oni.ConstraintType type) + { + this.m_Constraints = constraints; + this.m_ConstraintType = type; + + m_OniBatch = Oni.CreateBatch((int)type); + } + + public void Destroy() + { + //Oni.DestroyBatch(m_OniBatch); + + // remove the constraint batch from the solver + // (no need to destroy it as its destruction is managed by the solver) + // just reset the reference. + m_OniBatch = IntPtr.Zero; + } + + public void SetConstraintCount(int constraintCount) + { + Oni.SetBatchConstraintCount(m_OniBatch, constraintCount); + } + + public int GetConstraintCount() + { + return Oni.GetBatchConstraintCount(m_OniBatch); + } + + } +} +#endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/OniConstraintsBatchImpl.cs.meta b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/OniConstraintsBatchImpl.cs.meta new file mode 100644 index 000000000..bc3d8d946 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/OniConstraintsBatchImpl.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1f2c339d89f1144ea82e9763963f897d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/OniConstraintsImpl.cs b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/OniConstraintsImpl.cs new file mode 100644 index 000000000..61a86b1e5 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/OniConstraintsImpl.cs @@ -0,0 +1,45 @@ +#if (OBI_ONI_SUPPORTED) +using System; +using System.Collections; +using System.Runtime.InteropServices; + +namespace Obi +{ + public interface IOniConstraintsImpl : IConstraints + { + IConstraintsBatchImpl CreateConstraintsBatch(); + void RemoveBatch(IConstraintsBatchImpl batch); + } + + public abstract class OniConstraintsImpl : IOniConstraintsImpl + { + protected OniSolverImpl m_Solver; + protected Oni.ConstraintType m_ConstraintType; + + public ISolverImpl solver + { + get { return m_Solver; } + } + + public Oni.ConstraintType constraintType + { + get { return m_ConstraintType; } + } + + public OniConstraintsImpl(OniSolverImpl solver, Oni.ConstraintType constraintType) + { + m_ConstraintType = constraintType; + m_Solver = solver; + } + + public abstract IConstraintsBatchImpl CreateConstraintsBatch(); + + public abstract void RemoveBatch(IConstraintsBatchImpl batch); + + public int GetConstraintCount() + { + return Oni.GetConstraintCount(m_Solver.oniSolver, (int)m_ConstraintType); + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/OniConstraintsImpl.cs.meta b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/OniConstraintsImpl.cs.meta new file mode 100644 index 000000000..7d45f51b0 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/OniConstraintsImpl.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7855ae746662942f2b61f01cda77cd71 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Pin.meta b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Pin.meta similarity index 77% rename from Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Pin.meta rename to Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Pin.meta index c21a5f4f4..0f363d04e 100644 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Pin.meta +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Pin.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: b03d5abd353fb4064bf5677d949196a1 +guid: 303dd45caa88c4cd2bb03c65bbb0309c folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Pin/OniPinConstraintsBatchImpl.cs b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Pin/OniPinConstraintsBatchImpl.cs new file mode 100644 index 000000000..c6db3b8d7 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Pin/OniPinConstraintsBatchImpl.cs @@ -0,0 +1,21 @@ +#if (OBI_ONI_SUPPORTED) +using System; +using System.Collections; +using System.Collections.Generic; +using System.Runtime.InteropServices; + +namespace Obi +{ + public class OniPinConstraintsBatchImpl : OniConstraintsBatchImpl, IPinConstraintsBatchImpl + { + public OniPinConstraintsBatchImpl(OniPinConstraintsImpl constraints) : base(constraints, Oni.ConstraintType.Pin) + { + } + + public void SetPinConstraints(ObiNativeIntList particleIndices, ObiNativeIntList colliderIndices, ObiNativeVector4List offsets, ObiNativeQuaternionList restDarbouxVectors, ObiNativeFloatList stiffnesses, ObiNativeFloatList lambdas, int count) + { + Oni.SetPinConstraints(oniBatch, particleIndices.GetIntPtr() ,offsets.GetIntPtr(), restDarbouxVectors.GetIntPtr(), colliderIndices.GetIntPtr(), stiffnesses.GetIntPtr(), lambdas.GetIntPtr(), count); + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Pin/OniPinConstraintsBatchImpl.cs.meta b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Pin/OniPinConstraintsBatchImpl.cs.meta new file mode 100644 index 000000000..01264c16e --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Pin/OniPinConstraintsBatchImpl.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7027ecb8259ee445bb7280c585d5b401 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Pin/OniPinConstraintsImpl.cs b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Pin/OniPinConstraintsImpl.cs new file mode 100644 index 000000000..95ee95bf5 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Pin/OniPinConstraintsImpl.cs @@ -0,0 +1,28 @@ +#if (OBI_ONI_SUPPORTED) +using System; +using System.Collections; +using System.Runtime.InteropServices; + +namespace Obi +{ + public class OniPinConstraintsImpl : OniConstraintsImpl + { + + public OniPinConstraintsImpl(OniSolverImpl solver) : base(solver, Oni.ConstraintType.Pin) + { + } + + public override IConstraintsBatchImpl CreateConstraintsBatch() + { + var batch = new OniPinConstraintsBatchImpl(this); + Oni.AddBatch(((OniSolverImpl)solver).oniSolver, ((OniConstraintsBatchImpl)batch).oniBatch); + return batch; + } + + public override void RemoveBatch(IConstraintsBatchImpl batch) + { + Oni.RemoveBatch(((OniSolverImpl)solver).oniSolver, ((OniConstraintsBatchImpl)batch).oniBatch); + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Pin/OniPinConstraintsImpl.cs.meta b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Pin/OniPinConstraintsImpl.cs.meta new file mode 100644 index 000000000..a71ebc301 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Pin/OniPinConstraintsImpl.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 80f6683022e124b7ab5f002abb8df42a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ShapeMatching.meta b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/ShapeMatching.meta similarity index 77% rename from Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ShapeMatching.meta rename to Assets/Obi/Scripts/Common/Backends/Oni/Constraints/ShapeMatching.meta index ac46a10b7..0e27557d0 100644 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/ShapeMatching.meta +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/ShapeMatching.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 21c4f0318a4dd4112aeb7065a1251e2a +guid: 76aa6338faa6b4855a36b8ad4c1985bf folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/ShapeMatching/OniShapeMatchingConstraintsBatchImpl.cs b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/ShapeMatching/OniShapeMatchingConstraintsBatchImpl.cs new file mode 100644 index 000000000..b20dd1ff3 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/ShapeMatching/OniShapeMatchingConstraintsBatchImpl.cs @@ -0,0 +1,39 @@ +#if (OBI_ONI_SUPPORTED) +using System; +using System.Collections; +using System.Runtime.InteropServices; + +namespace Obi +{ + public class OniShapeMatchingConstraintsBatchImpl : OniConstraintsBatchImpl, IShapeMatchingConstraintsBatchImpl + { + public OniShapeMatchingConstraintsBatchImpl(OniShapeMatchingConstraintsImpl constraints) : base(constraints, Oni.ConstraintType.ShapeMatching) + { + } + + public void SetShapeMatchingConstraints(ObiNativeIntList particleIndices, + ObiNativeIntList firstIndex, + ObiNativeIntList numIndices, + ObiNativeIntList explicitGroup, + ObiNativeFloatList shapeMaterialParameters, + ObiNativeVector4List restComs, + ObiNativeVector4List coms, + ObiNativeQuaternionList orientations, + ObiNativeMatrix4x4List linearTransforms, + ObiNativeMatrix4x4List plasticDeformations, + ObiNativeFloatList lambdas, + int count) + { + Oni.SetShapeMatchingConstraints(oniBatch, particleIndices.GetIntPtr(), firstIndex.GetIntPtr(), numIndices.GetIntPtr(), explicitGroup.GetIntPtr(), + shapeMaterialParameters.GetIntPtr(),restComs.GetIntPtr(), coms.GetIntPtr(), orientations.GetIntPtr(), linearTransforms.GetIntPtr(), + plasticDeformations.GetIntPtr(), count); + } + + public void CalculateRestShapeMatching() + { + Oni.RecalculateInertiaTensors(((OniSolverImpl)this.constraints.solver).oniSolver); + Oni.CalculateRestShapeMatching(((OniSolverImpl)this.constraints.solver).oniSolver, oniBatch); + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/ShapeMatching/OniShapeMatchingConstraintsBatchImpl.cs.meta b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/ShapeMatching/OniShapeMatchingConstraintsBatchImpl.cs.meta new file mode 100644 index 000000000..3fb2c1bf0 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/ShapeMatching/OniShapeMatchingConstraintsBatchImpl.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2d8b27a2b5372453881109f4d30710aa +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/ShapeMatching/OniShapeMatchingConstraintsImpl.cs b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/ShapeMatching/OniShapeMatchingConstraintsImpl.cs new file mode 100644 index 000000000..846ab6899 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/ShapeMatching/OniShapeMatchingConstraintsImpl.cs @@ -0,0 +1,28 @@ +#if (OBI_ONI_SUPPORTED) +using System; +using System.Collections; +using System.Runtime.InteropServices; + +namespace Obi +{ + public class OniShapeMatchingConstraintsImpl : OniConstraintsImpl + { + + public OniShapeMatchingConstraintsImpl(OniSolverImpl solver) : base(solver, Oni.ConstraintType.ShapeMatching) + { + } + + public override IConstraintsBatchImpl CreateConstraintsBatch() + { + var batch = new OniShapeMatchingConstraintsBatchImpl(this); + Oni.AddBatch(((OniSolverImpl)solver).oniSolver, ((OniConstraintsBatchImpl)batch).oniBatch); + return batch; + } + + public override void RemoveBatch(IConstraintsBatchImpl batch) + { + Oni.RemoveBatch(((OniSolverImpl)solver).oniSolver, ((OniConstraintsBatchImpl)batch).oniBatch); + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/ShapeMatching/OniShapeMatchingConstraintsImpl.cs.meta b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/ShapeMatching/OniShapeMatchingConstraintsImpl.cs.meta new file mode 100644 index 000000000..46b7bd743 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/ShapeMatching/OniShapeMatchingConstraintsImpl.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3179c27ebcc34455aa7967691f6987f3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Skin.meta b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Skin.meta similarity index 77% rename from Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Skin.meta rename to Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Skin.meta index afbbedb2d..a65025811 100644 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Skin.meta +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Skin.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: e3f96b782e06d47d699bad2fbd4712e1 +guid: e9fde13a2a0dc426892c122badd434c7 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Skin/OniSkinConstraintsBatchImpl.cs b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Skin/OniSkinConstraintsBatchImpl.cs new file mode 100644 index 000000000..622e6cdb7 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Skin/OniSkinConstraintsBatchImpl.cs @@ -0,0 +1,20 @@ +#if (OBI_ONI_SUPPORTED) +using System; +using System.Collections; +using System.Runtime.InteropServices; + +namespace Obi +{ + public class OniSkinConstraintsBatchImpl : OniConstraintsBatchImpl, ISkinConstraintsBatchImpl + { + public OniSkinConstraintsBatchImpl(OniSkinConstraintsImpl constraints) : base(constraints, Oni.ConstraintType.Skin) + { + } + + public void SetSkinConstraints(ObiNativeIntList particleIndices, ObiNativeVector4List skinPoints, ObiNativeVector4List skinNormals, ObiNativeFloatList skinRadiiBackstop, ObiNativeFloatList skinCompliance, ObiNativeFloatList lambdas, int count) + { + Oni.SetSkinConstraints(oniBatch, particleIndices.GetIntPtr(), skinPoints.GetIntPtr(), skinNormals.GetIntPtr(), skinRadiiBackstop.GetIntPtr(), skinCompliance.GetIntPtr(), lambdas.GetIntPtr(), count); + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Skin/OniSkinConstraintsBatchImpl.cs.meta b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Skin/OniSkinConstraintsBatchImpl.cs.meta new file mode 100644 index 000000000..93af2c035 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Skin/OniSkinConstraintsBatchImpl.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 52429ca8e52974c47811bb3da9a6d0d6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Skin/OniSkinConstraintsImpl.cs b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Skin/OniSkinConstraintsImpl.cs new file mode 100644 index 000000000..fbf0e5b93 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Skin/OniSkinConstraintsImpl.cs @@ -0,0 +1,28 @@ +#if (OBI_ONI_SUPPORTED) +using System; +using System.Collections; +using System.Runtime.InteropServices; + +namespace Obi +{ + public class OniSkinConstraintsImpl : OniConstraintsImpl + { + + public OniSkinConstraintsImpl(OniSolverImpl solver) : base(solver, Oni.ConstraintType.Skin) + { + } + + public override IConstraintsBatchImpl CreateConstraintsBatch() + { + var batch = new OniSkinConstraintsBatchImpl(this); + Oni.AddBatch(((OniSolverImpl)solver).oniSolver, ((OniConstraintsBatchImpl)batch).oniBatch); + return batch; + } + + public override void RemoveBatch(IConstraintsBatchImpl batch) + { + Oni.RemoveBatch(((OniSolverImpl)solver).oniSolver, ((OniConstraintsBatchImpl)batch).oniBatch); + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Skin/OniSkinConstraintsImpl.cs.meta b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Skin/OniSkinConstraintsImpl.cs.meta new file mode 100644 index 000000000..6db8a1710 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Skin/OniSkinConstraintsImpl.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4125254438ad247e39a54527a1efb809 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Stitch.meta b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Stitch.meta similarity index 77% rename from Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Stitch.meta rename to Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Stitch.meta index 72b5b7083..3d17e2188 100644 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Stitch.meta +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Stitch.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 8fd1b55deaf68449f9fc2f037f032b4c +guid: 091666a5c10624749b5604db5c75a83d folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Stitch/OniStitchConstraintsBatchImpl.cs b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Stitch/OniStitchConstraintsBatchImpl.cs new file mode 100644 index 000000000..ae0f953bd --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Stitch/OniStitchConstraintsBatchImpl.cs @@ -0,0 +1,20 @@ +#if (OBI_ONI_SUPPORTED) +using System; +using System.Collections; +using System.Runtime.InteropServices; + +namespace Obi +{ + public class OniStitchConstraintsBatchImpl : OniConstraintsBatchImpl, IStitchConstraintsBatchImpl + { + public OniStitchConstraintsBatchImpl(OniStitchConstraintsImpl constraints) : base(constraints, Oni.ConstraintType.Stitch) + { + } + + public void SetStitchConstraints(ObiNativeIntList particleIndices, ObiNativeFloatList stiffnesses, ObiNativeFloatList lambdas, int count) + { + Oni.SetStitchConstraints(oniBatch, particleIndices.GetIntPtr(), stiffnesses.GetIntPtr(), lambdas.GetIntPtr(), count); + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Stitch/OniStitchConstraintsBatchImpl.cs.meta b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Stitch/OniStitchConstraintsBatchImpl.cs.meta new file mode 100644 index 000000000..799abfaef --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Stitch/OniStitchConstraintsBatchImpl.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4b6e4637dbd2c4bffbcc8924a90ab7f1 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Stitch/OniStitchConstraintsImpl.cs b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Stitch/OniStitchConstraintsImpl.cs new file mode 100644 index 000000000..0209eda55 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Stitch/OniStitchConstraintsImpl.cs @@ -0,0 +1,28 @@ +#if (OBI_ONI_SUPPORTED) +using System; +using System.Collections; +using System.Runtime.InteropServices; + +namespace Obi +{ + public class OniStitchConstraintsImpl : OniConstraintsImpl + { + + public OniStitchConstraintsImpl(OniSolverImpl solver) : base(solver, Oni.ConstraintType.Stitch) + { + } + + public override IConstraintsBatchImpl CreateConstraintsBatch() + { + var batch = new OniStitchConstraintsBatchImpl(this); + Oni.AddBatch(((OniSolverImpl)solver).oniSolver, ((OniConstraintsBatchImpl)batch).oniBatch); + return batch; + } + + public override void RemoveBatch(IConstraintsBatchImpl batch) + { + Oni.RemoveBatch(((OniSolverImpl)solver).oniSolver, ((OniConstraintsBatchImpl)batch).oniBatch); + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Stitch/OniStitchConstraintsImpl.cs.meta b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Stitch/OniStitchConstraintsImpl.cs.meta new file mode 100644 index 000000000..dc799f6c6 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Stitch/OniStitchConstraintsImpl.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8666f111d21594650832fc663f618da9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/StretchShear.meta b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/StretchShear.meta similarity index 77% rename from Assets/Obi/Scripts/Common/Backends/Compute/Constraints/StretchShear.meta rename to Assets/Obi/Scripts/Common/Backends/Oni/Constraints/StretchShear.meta index d29894d3a..00ef8484f 100644 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/StretchShear.meta +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/StretchShear.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 8cc7d1795a6bd4f75927ef02b05e44e7 +guid: 10bea9144cdb54c7ca268e71727ba816 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/StretchShear/OniStretchShearConstraintsBatchImpl.cs b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/StretchShear/OniStretchShearConstraintsBatchImpl.cs new file mode 100644 index 000000000..995732e6e --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/StretchShear/OniStretchShearConstraintsBatchImpl.cs @@ -0,0 +1,20 @@ +#if (OBI_ONI_SUPPORTED) +using System; +using System.Collections; +using System.Runtime.InteropServices; + +namespace Obi +{ + public class OniStretchShearConstraintsBatchImpl : OniConstraintsBatchImpl, IStretchShearConstraintsBatchImpl + { + public OniStretchShearConstraintsBatchImpl(OniStretchShearConstraintsImpl constraints) : base(constraints, Oni.ConstraintType.StretchShear) + { + } + + public void SetStretchShearConstraints(ObiNativeIntList particleIndices, ObiNativeIntList orientationIndices, ObiNativeFloatList restLengths, ObiNativeQuaternionList restOrientations, ObiNativeVector3List stiffnesses, ObiNativeFloatList lambdas, int count) + { + Oni.SetStretchShearConstraints(oniBatch, particleIndices.GetIntPtr(), orientationIndices.GetIntPtr(), restLengths.GetIntPtr(), restOrientations.GetIntPtr(), stiffnesses.GetIntPtr(), lambdas.GetIntPtr(), count); + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/StretchShear/OniStretchShearConstraintsBatchImpl.cs.meta b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/StretchShear/OniStretchShearConstraintsBatchImpl.cs.meta new file mode 100644 index 000000000..e5f998b85 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/StretchShear/OniStretchShearConstraintsBatchImpl.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8239fa7b75a3a4f9087095a893f26ecc +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/StretchShear/OniStretchShearConstraintsImpl.cs b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/StretchShear/OniStretchShearConstraintsImpl.cs new file mode 100644 index 000000000..23f870904 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/StretchShear/OniStretchShearConstraintsImpl.cs @@ -0,0 +1,28 @@ +#if (OBI_ONI_SUPPORTED) +using System; +using System.Collections; +using System.Runtime.InteropServices; + +namespace Obi +{ + public class OniStretchShearConstraintsImpl : OniConstraintsImpl + { + + public OniStretchShearConstraintsImpl(OniSolverImpl solver) : base(solver, Oni.ConstraintType.StretchShear) + { + } + + public override IConstraintsBatchImpl CreateConstraintsBatch() + { + var batch = new OniStretchShearConstraintsBatchImpl(this); + Oni.AddBatch(((OniSolverImpl)solver).oniSolver, ((OniConstraintsBatchImpl)batch).oniBatch); + return batch; + } + + public override void RemoveBatch(IConstraintsBatchImpl batch) + { + Oni.RemoveBatch(((OniSolverImpl)solver).oniSolver, ((OniConstraintsBatchImpl)batch).oniBatch); + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/StretchShear/OniStretchShearConstraintsImpl.cs.meta b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/StretchShear/OniStretchShearConstraintsImpl.cs.meta new file mode 100644 index 000000000..ed0457b87 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/StretchShear/OniStretchShearConstraintsImpl.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2e074bd8c876f4a26b870b1bb6338857 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Tether.meta b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Tether.meta similarity index 77% rename from Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Tether.meta rename to Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Tether.meta index 4c0427c6e..57c58c094 100644 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Tether.meta +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Tether.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 4ee9753d7b4f7422b9057618aa73476b +guid: f170479298b9f47a39047b37d4d124f0 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Tether/OniTetherConstraintsBatchImpl.cs b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Tether/OniTetherConstraintsBatchImpl.cs new file mode 100644 index 000000000..47e6500a4 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Tether/OniTetherConstraintsBatchImpl.cs @@ -0,0 +1,20 @@ +#if (OBI_ONI_SUPPORTED) +using System; +using System.Collections; +using System.Runtime.InteropServices; + +namespace Obi +{ + public class OniTetherConstraintsBatchImpl : OniConstraintsBatchImpl, ITetherConstraintsBatchImpl + { + public OniTetherConstraintsBatchImpl(OniTetherConstraintsImpl constraints) : base(constraints, Oni.ConstraintType.Tether) + { + } + + public void SetTetherConstraints(ObiNativeIntList particleIndices, ObiNativeVector2List maxLengthScale, ObiNativeFloatList stiffnesses, ObiNativeFloatList lambdas, int count) + { + Oni.SetTetherConstraints(oniBatch, particleIndices.GetIntPtr(), maxLengthScale.GetIntPtr(), stiffnesses.GetIntPtr(), lambdas.GetIntPtr(), count); + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Tether/OniTetherConstraintsBatchImpl.cs.meta b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Tether/OniTetherConstraintsBatchImpl.cs.meta new file mode 100644 index 000000000..f723e8829 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Tether/OniTetherConstraintsBatchImpl.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8d972dca9090340739b46bfce8769234 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Tether/OniTetherConstraintsImpl.cs b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Tether/OniTetherConstraintsImpl.cs new file mode 100644 index 000000000..5299af2e6 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Tether/OniTetherConstraintsImpl.cs @@ -0,0 +1,28 @@ +#if (OBI_ONI_SUPPORTED) +using System; +using System.Collections; +using System.Runtime.InteropServices; + +namespace Obi +{ + public class OniTetherConstraintsImpl : OniConstraintsImpl + { + + public OniTetherConstraintsImpl(OniSolverImpl solver) : base(solver, Oni.ConstraintType.Tether) + { + } + + public override IConstraintsBatchImpl CreateConstraintsBatch() + { + var batch = new OniTetherConstraintsBatchImpl(this); + Oni.AddBatch(((OniSolverImpl)solver).oniSolver, ((OniConstraintsBatchImpl)batch).oniBatch); + return batch; + } + + public override void RemoveBatch(IConstraintsBatchImpl batch) + { + Oni.RemoveBatch(((OniSolverImpl)solver).oniSolver, ((OniConstraintsBatchImpl)batch).oniBatch); + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Tether/OniTetherConstraintsImpl.cs.meta b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Tether/OniTetherConstraintsImpl.cs.meta new file mode 100644 index 000000000..3fb2ce97a --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Tether/OniTetherConstraintsImpl.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6922281fd02e54bc2907d3327e602daf +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Volume.meta b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Volume.meta similarity index 77% rename from Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Volume.meta rename to Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Volume.meta index ef341e7a8..2775f8143 100644 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Constraints/Volume.meta +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Volume.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: b0eea52c14b4b4e7698c65a183951102 +guid: 15ac90acb12cf47928ff5732c87d2f08 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Volume/OniVolumeConstraintsBatchImpl.cs b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Volume/OniVolumeConstraintsBatchImpl.cs new file mode 100644 index 000000000..8b808fbc7 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Volume/OniVolumeConstraintsBatchImpl.cs @@ -0,0 +1,26 @@ +#if (OBI_ONI_SUPPORTED) +using System; +using System.Collections; +using System.Runtime.InteropServices; + +namespace Obi +{ + public class OniVolumeConstraintsBatchImpl : OniConstraintsBatchImpl, IVolumeConstraintsBatchImpl + { + public OniVolumeConstraintsBatchImpl(OniVolumeConstraintsImpl constraints) : base(constraints, Oni.ConstraintType.Volume) + { + } + + public void SetVolumeConstraints(ObiNativeIntList triangles, + ObiNativeIntList firstTriangle, + ObiNativeIntList numTriangles, + ObiNativeFloatList restVolumes, + ObiNativeVector2List pressureStiffness, + ObiNativeFloatList lambdas, + int count) + { + Oni.SetVolumeConstraints(oniBatch, triangles.GetIntPtr(), firstTriangle.GetIntPtr(), numTriangles.GetIntPtr(), restVolumes.GetIntPtr(), pressureStiffness.GetIntPtr(), lambdas.GetIntPtr(), count); + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Volume/OniVolumeConstraintsBatchImpl.cs.meta b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Volume/OniVolumeConstraintsBatchImpl.cs.meta new file mode 100644 index 000000000..002cbeb9f --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Volume/OniVolumeConstraintsBatchImpl.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1af520b0f02a347c4b1d36842ee90910 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Volume/OniVolumeConstraintsImpl.cs b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Volume/OniVolumeConstraintsImpl.cs new file mode 100644 index 000000000..7693a3df9 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Volume/OniVolumeConstraintsImpl.cs @@ -0,0 +1,28 @@ +#if (OBI_ONI_SUPPORTED) +using System; +using System.Collections; +using System.Runtime.InteropServices; + +namespace Obi +{ + public class OniVolumeConstraintsImpl : OniConstraintsImpl + { + + public OniVolumeConstraintsImpl(OniSolverImpl solver) : base(solver, Oni.ConstraintType.Volume) + { + } + + public override IConstraintsBatchImpl CreateConstraintsBatch() + { + var batch = new OniVolumeConstraintsBatchImpl(this); + Oni.AddBatch(((OniSolverImpl)solver).oniSolver, ((OniConstraintsBatchImpl)batch).oniBatch); + return batch; + } + + public override void RemoveBatch(IConstraintsBatchImpl batch) + { + Oni.RemoveBatch(((OniSolverImpl)solver).oniSolver, ((OniConstraintsBatchImpl)batch).oniBatch); + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Volume/OniVolumeConstraintsImpl.cs.meta b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Volume/OniVolumeConstraintsImpl.cs.meta new file mode 100644 index 000000000..739d47b6a --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Constraints/Volume/OniVolumeConstraintsImpl.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: db1478edc2f6b48928e2ba97aafd9bad +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/OniBackend.cs b/Assets/Obi/Scripts/Common/Backends/Oni/OniBackend.cs new file mode 100644 index 000000000..1c9a0ec27 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/OniBackend.cs @@ -0,0 +1,43 @@ +#if (OBI_ONI_SUPPORTED) +using UnityEngine; +using System; +using System.Collections; + +namespace Obi +{ + public class OniBackend : IObiBackend + { + private OniColliderWorld colliderGrid; + + #region Solver + public ISolverImpl CreateSolver(ObiSolver solver, int capacity) + { + GetOrCreateColliderWorld(); + colliderGrid.IncreaseReferenceCount(); + return new OniSolverImpl(Oni.CreateSolver(capacity)); + } + public void DestroySolver(ISolverImpl solver) + { + if (solver != null) + { + if (colliderGrid != null) + colliderGrid.DecreaseReferenceCount(); + solver.Destroy(); + } + } + + // Single type of collision world. Each solver implementation should manage the data as it can. + private void GetOrCreateColliderWorld() + { + colliderGrid = GameObject.FindObjectOfType(); + if (colliderGrid == null) + { + var world = new GameObject("OniCollisionWorld", typeof(OniColliderWorld)); + colliderGrid = world.GetComponent(); + } + } + #endregion + + } +} +#endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/OniBackend.cs.meta b/Assets/Obi/Scripts/Common/Backends/Oni/OniBackend.cs.meta new file mode 100644 index 000000000..11d4d33b8 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/OniBackend.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b205c5ca9755442b186b1d93df7d7dc6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/OniColliderWorld.cs b/Assets/Obi/Scripts/Common/Backends/Oni/OniColliderWorld.cs new file mode 100644 index 000000000..e1af2010b --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/OniColliderWorld.cs @@ -0,0 +1,75 @@ +#if (OBI_ONI_SUPPORTED) +using System; +using UnityEngine; + +namespace Obi +{ + public class OniColliderWorld : MonoBehaviour, IColliderWorldImpl + { + private int refCount = 0; + + public int referenceCount { get { return refCount; } } + + public void Awake() + { + ObiColliderWorld.GetInstance().RegisterImplementation(this); + } + + public void OnDestroy() + { + ObiColliderWorld.GetInstance().UnregisterImplementation(this); + } + + public void IncreaseReferenceCount() + { + refCount++; + } + public void DecreaseReferenceCount() + { + if (--refCount <= 0 && gameObject != null) + DestroyImmediate(gameObject); + } + + public void UpdateWorld(float deltaTime) + { + Oni.UpdateColliderGrid(deltaTime); + } + + public void SetColliders(ObiNativeColliderShapeList shapes, ObiNativeAabbList bounds, ObiNativeAffineTransformList transforms, int count) + { + Oni.SetColliders(shapes.GetIntPtr(), bounds.GetIntPtr(), transforms.GetIntPtr(), count); + } + + public void SetRigidbodies(ObiNativeRigidbodyList rigidbody) + { + Oni.SetRigidbodies(rigidbody.GetIntPtr()); + } + + public void SetCollisionMaterials(ObiNativeCollisionMaterialList materials) + { + Oni.SetCollisionMaterials(materials.GetIntPtr()); + } + + public void SetTriangleMeshData(ObiNativeTriangleMeshHeaderList headers, ObiNativeBIHNodeList nodes, ObiNativeTriangleList triangles, ObiNativeVector3List vertices) + { + Oni.SetTriangleMeshData(headers.GetIntPtr(), nodes.GetIntPtr(), triangles.GetIntPtr(), vertices.GetIntPtr()); + } + + public void SetEdgeMeshData(ObiNativeEdgeMeshHeaderList headers, ObiNativeBIHNodeList nodes, ObiNativeEdgeList edges, ObiNativeVector2List vertices) + { + Oni.SetEdgeMeshData(headers.GetIntPtr(), nodes.GetIntPtr(), edges.GetIntPtr(), vertices.GetIntPtr()); + } + + public void SetDistanceFieldData(ObiNativeDistanceFieldHeaderList headers, ObiNativeDFNodeList nodes) + { + Oni.SetDistanceFieldData(headers.GetIntPtr(), nodes.GetIntPtr()); + } + + public void SetHeightFieldData(ObiNativeHeightFieldHeaderList headers, ObiNativeFloatList samples) + { + Oni.SetHeightFieldData(headers.GetIntPtr(), samples.GetIntPtr()); + } + } + +} +#endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/OniColliderWorld.cs.meta b/Assets/Obi/Scripts/Common/Backends/Oni/OniColliderWorld.cs.meta new file mode 100644 index 000000000..2961feff3 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/OniColliderWorld.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d02d25c24c8574316883c920912e4fdb +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/OniJobHandle.cs b/Assets/Obi/Scripts/Common/Backends/Oni/OniJobHandle.cs new file mode 100644 index 000000000..5acf0bb62 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/OniJobHandle.cs @@ -0,0 +1,27 @@ +#if (OBI_ONI_SUPPORTED) +using System; + +namespace Obi +{ + public class OniJobHandle : IObiJobHandle + { + private IntPtr pointer = IntPtr.Zero; + + public OniJobHandle SetPointer(IntPtr newPtr) + { + pointer = newPtr; + return this; + } + + public void Complete() + { + Oni.Complete(pointer); + } + + public void Release() + { + pointer = IntPtr.Zero; + } + } +} +#endif diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/OniJobHandle.cs.meta b/Assets/Obi/Scripts/Common/Backends/Oni/OniJobHandle.cs.meta new file mode 100644 index 000000000..3030ce29b --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/OniJobHandle.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 502f41bdafa70468985a879d9ffc67d9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Solver.meta b/Assets/Obi/Scripts/Common/Backends/Oni/Solver.meta similarity index 77% rename from Assets/Obi/Scripts/Common/Backends/Compute/Solver.meta rename to Assets/Obi/Scripts/Common/Backends/Oni/Solver.meta index 3c8e3c2f1..aa7f2cd0d 100644 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Solver.meta +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Solver.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: e6a74baa6b875488ea6366478aece6a3 +guid: e2f8381840ff54c2f9122f2329cf9366 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Solver/OniSolverImpl.cs b/Assets/Obi/Scripts/Common/Backends/Oni/Solver/OniSolverImpl.cs new file mode 100644 index 000000000..e6b7f8948 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Solver/OniSolverImpl.cs @@ -0,0 +1,226 @@ +#if (OBI_ONI_SUPPORTED) +using UnityEngine; +using System; +using System.Collections; +using System.Runtime.InteropServices; + +namespace Obi +{ + public class OniSolverImpl : ISolverImpl + { + private IntPtr m_OniSolver; + + // Per-type constraints array: + private IOniConstraintsImpl[] constraints; + + // Pool job handles to avoid runtime alloc: + private JobHandlePool jobHandlePool; + + public IntPtr oniSolver + { + get { return m_OniSolver; } + } + + public OniSolverImpl(IntPtr solver) + { + m_OniSolver = solver; + + jobHandlePool = new JobHandlePool(4); + + constraints = new IOniConstraintsImpl[Oni.ConstraintTypeCount]; + constraints[(int)Oni.ConstraintType.Tether] = new OniTetherConstraintsImpl(this); + constraints[(int)Oni.ConstraintType.Volume] = new OniVolumeConstraintsImpl(this); + constraints[(int)Oni.ConstraintType.Chain] = new OniChainConstraintsImpl(this); + constraints[(int)Oni.ConstraintType.Bending] = new OniBendConstraintsImpl(this); + constraints[(int)Oni.ConstraintType.Distance] = new OniDistanceConstraintsImpl(this); + constraints[(int)Oni.ConstraintType.ShapeMatching] = new OniShapeMatchingConstraintsImpl(this); + constraints[(int)Oni.ConstraintType.BendTwist] = new OniBendTwistConstraintsImpl(this); + constraints[(int)Oni.ConstraintType.StretchShear] = new OniStretchShearConstraintsImpl(this); + constraints[(int)Oni.ConstraintType.Pin] = new OniPinConstraintsImpl(this); + constraints[(int)Oni.ConstraintType.Skin] = new OniSkinConstraintsImpl(this); + constraints[(int)Oni.ConstraintType.Aerodynamics] = new OniAerodynamicConstraintsImpl(this); + constraints[(int)Oni.ConstraintType.Stitch] = new OniStitchConstraintsImpl(this); + } + + public void Destroy() + { + Oni.DestroySolver(m_OniSolver); + m_OniSolver = IntPtr.Zero; + } + + public void InitializeFrame(Vector4 translation, Vector4 scale, Quaternion rotation) + { + Oni.InitializeFrame(oniSolver, ref translation, ref scale, ref rotation); + } + + public void UpdateFrame(Vector4 translation, Vector4 scale, Quaternion rotation, float deltaTime) + { + Oni.UpdateFrame(oniSolver, ref translation, ref scale, ref rotation, deltaTime); + } + + public void ApplyFrame(float worldLinearInertiaScale, float worldAngularInertiaScale, float deltaTime) + { + Oni.ApplyFrame(oniSolver, 0, 0, worldLinearInertiaScale, worldAngularInertiaScale, deltaTime); + } + + public int GetDeformableTriangleCount() + { + return Oni.GetDeformableTriangleCount(m_OniSolver); + } + public void SetDeformableTriangles(int[] indices, int num, int destOffset) + { + Oni.SetDeformableTriangles(m_OniSolver, indices, num, destOffset); + } + public int RemoveDeformableTriangles(int num, int sourceOffset) + { + return Oni.RemoveDeformableTriangles(m_OniSolver, num, sourceOffset); + } + + public void SetSimplices(ObiNativeIntList simplices, SimplexCounts counts) + { + Oni.SetSimplices(m_OniSolver, simplices.AsNativeArray().ToArray(), counts.pointCount, counts.edgeCount, counts.triangleCount); + } + + public void ParticleCountChanged(ObiSolver solver) + { + Oni.SetParticlePositions(m_OniSolver, solver.positions.GetIntPtr()); + Oni.SetParticlePreviousPositions(m_OniSolver, solver.prevPositions.GetIntPtr()); + Oni.SetRestPositions(m_OniSolver, solver.restPositions.GetIntPtr()); + Oni.SetParticleOrientations(m_OniSolver, solver.orientations.GetIntPtr()); + Oni.SetParticlePreviousOrientations(m_OniSolver, solver.prevOrientations.GetIntPtr()); + Oni.SetRestOrientations(m_OniSolver, solver.restOrientations.GetIntPtr()); + Oni.SetParticleVelocities(m_OniSolver, solver.velocities.GetIntPtr()); + Oni.SetParticleAngularVelocities(m_OniSolver, solver.angularVelocities.GetIntPtr()); + Oni.SetParticleInverseMasses(m_OniSolver, solver.invMasses.GetIntPtr()); + Oni.SetParticleInverseRotationalMasses(m_OniSolver, solver.invRotationalMasses.GetIntPtr()); + Oni.SetParticlePrincipalRadii(m_OniSolver, solver.principalRadii.GetIntPtr()); + Oni.SetParticleCollisionMaterials(m_OniSolver, solver.collisionMaterials.GetIntPtr()); + Oni.SetParticlePhases(m_OniSolver, solver.phases.GetIntPtr()); + Oni.SetParticleFilters(m_OniSolver, solver.filters.GetIntPtr()); + Oni.SetRenderableParticlePositions(m_OniSolver, solver.renderablePositions.GetIntPtr()); + Oni.SetRenderableParticleOrientations(m_OniSolver, solver.renderableOrientations.GetIntPtr()); + Oni.SetParticleAnisotropies(m_OniSolver, solver.anisotropies.GetIntPtr()); + Oni.SetParticleSmoothingRadii(m_OniSolver, solver.smoothingRadii.GetIntPtr()); + Oni.SetParticleBuoyancy(m_OniSolver, solver.buoyancies.GetIntPtr()); + Oni.SetParticleRestDensities(m_OniSolver, solver.restDensities.GetIntPtr()); + Oni.SetParticleViscosities(m_OniSolver, solver.viscosities.GetIntPtr()); + Oni.SetParticleSurfaceTension(m_OniSolver, solver.surfaceTension.GetIntPtr()); + Oni.SetParticleVorticityConfinement(m_OniSolver, solver.vortConfinement.GetIntPtr()); + Oni.SetParticleAtmosphericDragPressure(m_OniSolver, solver.atmosphericDrag.GetIntPtr(), solver.atmosphericPressure.GetIntPtr()); + Oni.SetParticleDiffusion(m_OniSolver, solver.diffusion.GetIntPtr()); + Oni.SetParticleVorticities(m_OniSolver, solver.vorticities.GetIntPtr()); + Oni.SetParticleFluidData(m_OniSolver, solver.fluidData.GetIntPtr()); + Oni.SetParticleUserData(m_OniSolver, solver.userData.GetIntPtr()); + Oni.SetParticleExternalForces(m_OniSolver, solver.externalForces.GetIntPtr()); + Oni.SetParticleExternalTorques(m_OniSolver, solver.externalTorques.GetIntPtr()); + Oni.SetParticleWinds(m_OniSolver, solver.wind.GetIntPtr()); + Oni.SetParticlePositionDeltas(m_OniSolver, solver.positionDeltas.GetIntPtr()); + Oni.SetParticleOrientationDeltas(m_OniSolver, solver.orientationDeltas.GetIntPtr()); + Oni.SetParticlePositionConstraintCounts(m_OniSolver, solver.positionConstraintCounts.GetIntPtr()); + Oni.SetParticleOrientationConstraintCounts(m_OniSolver, solver.orientationConstraintCounts.GetIntPtr()); + Oni.SetParticleNormals(m_OniSolver, solver.normals.GetIntPtr()); + Oni.SetParticleInverseInertiaTensors(m_OniSolver, solver.invInertiaTensors.GetIntPtr()); + + Oni.SetCapacity(m_OniSolver, solver.positions.capacity); + } + + public void SetRigidbodyArrays(ObiSolver solver) + { + Oni.SetRigidbodyLinearDeltas(m_OniSolver, solver.rigidbodyLinearDeltas.GetIntPtr()); + Oni.SetRigidbodyAngularDeltas(m_OniSolver, solver.rigidbodyAngularDeltas.GetIntPtr()); + } + + public void SetActiveParticles(ObiNativeIntList indices) + { + Oni.SetActiveParticles(oniSolver, indices.AsNativeArray().ToArray(), indices.count); + } + + public void ResetForces() + { + Oni.ResetForces(oniSolver); + } + + public void GetBounds(ref Vector3 min, ref Vector3 max) + { + Oni.GetBounds(oniSolver, ref min, ref max); + } + + public void SetParameters(Oni.SolverParameters parameters) + { + Oni.SetSolverParameters(m_OniSolver, ref parameters); + } + + public int GetConstraintCount(Oni.ConstraintType type) + { + return Oni.GetConstraintCount(m_OniSolver, (int)type); + } + + public void GetCollisionContacts(Oni.Contact[] contacts, int count) + { + Oni.GetCollisionContacts(m_OniSolver, contacts, count); + } + + public void GetParticleCollisionContacts(Oni.Contact[] contacts, int count) + { + Oni.GetParticleCollisionContacts(m_OniSolver, contacts, count); + } + + public void SetConstraintGroupParameters(Oni.ConstraintType type, ref Oni.ConstraintParameters parameters) + { + Oni.SetConstraintGroupParameters(m_OniSolver, (int)type, ref parameters); + } + + public IConstraintsBatchImpl CreateConstraintsBatch(Oni.ConstraintType constraintType) + { + return constraints[(int)constraintType].CreateConstraintsBatch(); + } + + public void DestroyConstraintsBatch(IConstraintsBatchImpl batch) + { + if (batch != null) + constraints[(int)batch.constraintType].RemoveBatch(batch); + } + + public IObiJobHandle CollisionDetection(float stepTime) + { + Oni.RecalculateInertiaTensors(oniSolver); + return jobHandlePool.Borrow().SetPointer(Oni.CollisionDetection(oniSolver, stepTime)); + } + + public IObiJobHandle Substep(float stepTime, float substepTime, int substeps) + { + return jobHandlePool.Borrow().SetPointer(Oni.Step(oniSolver, stepTime, substepTime, substeps)); + } + + public void ApplyInterpolation(ObiNativeVector4List startPositions, ObiNativeQuaternionList startOrientations, float stepTime, float unsimulatedTime) + { + Oni.ApplyPositionInterpolation(oniSolver, startPositions.GetIntPtr(), startOrientations.GetIntPtr(), stepTime, unsimulatedTime); + } + + public void InterpolateDiffuseProperties(ObiNativeVector4List properties, ObiNativeVector4List diffusePositions, ObiNativeVector4List diffuseProperties, ObiNativeIntList neighbourCount, int diffuseCount) + { + Oni.InterpolateDiffuseParticles(oniSolver, properties.GetIntPtr(), diffusePositions.GetIntPtr(), diffuseProperties.GetIntPtr(), neighbourCount.GetIntPtr(), diffuseCount); + } + + public int GetParticleGridSize() + { + return Oni.GetParticleGridSize(oniSolver); + } + public void GetParticleGrid(ObiNativeAabbList cells) + { + //Oni.GetParticleGrid(oniSolver, cells.GetIntPtr()); + } + public void SpatialQuery(ObiNativeQueryShapeList shapes, ObiNativeAffineTransformList transforms, ObiNativeQueryResultList results) + { + int count = Oni.SpatialQuery(oniSolver, shapes.GetIntPtr(), transforms.GetIntPtr(), shapes.count); + + results.ResizeUninitialized(count); + Oni.GetQueryResults(oniSolver, results.GetIntPtr(), count); + } + public void ReleaseJobHandles() + { + jobHandlePool.ReleaseAll(); + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Backends/Oni/Solver/OniSolverImpl.cs.meta b/Assets/Obi/Scripts/Common/Backends/Oni/Solver/OniSolverImpl.cs.meta new file mode 100644 index 000000000..c71ef9fd9 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Backends/Oni/Solver/OniSolverImpl.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3240362f8b8e047d7b9250344aaa0d6d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiAerodynamicConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiAerodynamicConstraintsBatch.cs index 6e7c6c3be..e2a4df6c4 100644 --- a/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiAerodynamicConstraintsBatch.cs +++ b/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiAerodynamicConstraintsBatch.cs @@ -76,8 +76,8 @@ namespace Obi { particleIndices[m_ActiveConstraintCount + i] = actor.solverIndices[batch.particleIndices[i]]; aerodynamicCoeffs[(m_ActiveConstraintCount + i) * 3] = batch.aerodynamicCoeffs[i*3]; - aerodynamicCoeffs[(m_ActiveConstraintCount + i) * 3 + 1] = user.GetDrag(batch, i); - aerodynamicCoeffs[(m_ActiveConstraintCount + i) * 3 + 2] = user.GetLift(batch, i); + aerodynamicCoeffs[(m_ActiveConstraintCount + i) * 3 + 1] = user.drag; + aerodynamicCoeffs[(m_ActiveConstraintCount + i) * 3 + 2] = user.lift; } base.Merge(actor, other); @@ -96,10 +96,6 @@ namespace Obi public override void RemoveFromSolver(ObiSolver solver) { - base.RemoveFromSolver(solver); - - aerodynamicCoeffs.Dispose(); - //Remove batch: solver.implementation.DestroyConstraintsBatch(m_BatchImpl as IConstraintsBatchImpl); } diff --git a/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiBendConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiBendConstraintsBatch.cs index a1cf35289..8e46dadd8 100644 --- a/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiBendConstraintsBatch.cs +++ b/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiBendConstraintsBatch.cs @@ -115,12 +115,6 @@ namespace Obi public override void RemoveFromSolver(ObiSolver solver) { - base.RemoveFromSolver(solver); - - restBends.Dispose(); - bendingStiffnesses.Dispose(); - plasticity.Dispose(); - //Remove batch: solver.implementation.DestroyConstraintsBatch(m_BatchImpl as IConstraintsBatchImpl); } diff --git a/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiBendTwistConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiBendTwistConstraintsBatch.cs index 522dd1930..e8c6b2fb3 100644 --- a/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiBendTwistConstraintsBatch.cs +++ b/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiBendTwistConstraintsBatch.cs @@ -116,12 +116,6 @@ namespace Obi public override void RemoveFromSolver(ObiSolver solver) { - base.RemoveFromSolver(solver); - - restDarbouxVectors.Dispose(); - plasticity.Dispose(); - stiffnesses.Dispose(); - //Remove batch: solver.implementation.DestroyConstraintsBatch(m_BatchImpl as IConstraintsBatchImpl); } diff --git a/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiChainConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiChainConstraintsBatch.cs index 1104490b7..859c86517 100644 --- a/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiChainConstraintsBatch.cs +++ b/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiChainConstraintsBatch.cs @@ -120,12 +120,6 @@ namespace Obi public override void RemoveFromSolver(ObiSolver solver) { - base.RemoveFromSolver(solver); - - firstParticle.Dispose(); - numParticles.Dispose(); - lengths.Dispose(); - //Remove batch: solver.implementation.DestroyConstraintsBatch(m_BatchImpl as IConstraintsBatchImpl); } diff --git a/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiConstraintsBatch.cs index 53c42dff5..11917cef4 100644 --- a/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiConstraintsBatch.cs +++ b/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiConstraintsBatch.cs @@ -42,7 +42,6 @@ namespace Obi bool DeactivateConstraint(int constraintIndex); bool ActivateConstraint(int constraintIndex); void DeactivateAllConstraints(); - void ActivateAllConstraints(); void Clear(); @@ -101,12 +100,8 @@ namespace Obi protected abstract void SwapConstraints(int sourceIndex, int destIndex); public abstract void GetParticlesInvolved(int index, List particles); - - public virtual void AddToSolver(ObiSolver solver) { } - public virtual void RemoveFromSolver(ObiSolver solver) { - particleIndices.Dispose(); - lambdas.Dispose(); - } + public abstract void AddToSolver(ObiSolver solver); + public abstract void RemoveFromSolver(ObiSolver solver); protected virtual void CopyConstraint(ObiConstraintsBatch batch, int constraintIndex) { } @@ -181,11 +176,6 @@ namespace Obi m_ActiveConstraintCount = 0; } - public void ActivateAllConstraints() - { - m_ActiveConstraintCount = m_ConstraintCount; - } - // Swaps the constraint with the last one and reduces the amount of constraints by one. public void RemoveConstraint(int constraintIndex) { diff --git a/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiDistanceConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiDistanceConstraintsBatch.cs index 92673df9a..d412a6e81 100644 --- a/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiDistanceConstraintsBatch.cs +++ b/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiDistanceConstraintsBatch.cs @@ -30,7 +30,7 @@ namespace Obi get { return m_BatchImpl; } } - public ObiDistanceConstraintsBatch(ObiDistanceConstraintsData constraints = null) : base() + public ObiDistanceConstraintsBatch(int a = 0) { } @@ -135,11 +135,6 @@ namespace Obi public override void RemoveFromSolver(ObiSolver solver) { - base.RemoveFromSolver(solver); - - restLengths.Dispose(); - stiffnesses.Dispose(); - //Remove batch: solver.implementation.DestroyConstraintsBatch(m_BatchImpl as IConstraintsBatchImpl); } diff --git a/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiPinConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiPinConstraintsBatch.cs index 08270d5c5..b49dbe5d8 100644 --- a/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiPinConstraintsBatch.cs +++ b/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiPinConstraintsBatch.cs @@ -8,12 +8,12 @@ namespace Obi [Serializable] public class ObiPinConstraintsBatch : ObiConstraintsBatch { - protected IPinConstraintsBatchImpl m_BatchImpl; + protected IPinConstraintsBatchImpl m_BatchImpl; /// /// for each constraint, handle of the pinned collider. /// - [HideInInspector] public List pinBodies = new List(); + [HideInInspector] public List pinBodies = new List(); /// /// index of the pinned collider in the collider world. @@ -23,17 +23,22 @@ namespace Obi /// /// Pin position expressed in the attachment's local space. /// - [HideInInspector] public ObiNativeVector4List offsets = new ObiNativeVector4List(); + [HideInInspector] public ObiNativeVector4List offsets = new ObiNativeVector4List(); /// /// Rest Darboux vector for each constraint. /// - [HideInInspector] public ObiNativeQuaternionList restDarbouxVectors = new ObiNativeQuaternionList(); + [HideInInspector] public ObiNativeQuaternionList restDarbouxVectors = new ObiNativeQuaternionList(); /// /// Compliances of pin constraits. 2 float per constraint (positional and rotational compliance). /// - [HideInInspector] public ObiNativeFloatList stiffnesses = new ObiNativeFloatList(); + [HideInInspector] public ObiNativeFloatList stiffnesses = new ObiNativeFloatList(); + + /// + /// One float per constraint: break threshold. + /// + [HideInInspector] public ObiNativeFloatList breakThresholds = new ObiNativeFloatList(); public override Oni.ConstraintType constraintType { @@ -49,17 +54,18 @@ namespace Obi { } - public void AddConstraint(int solverIndex, ObiColliderBase body, Vector3 offset, Quaternion restDarboux, float linearCompliance, float rotationalCompliance, bool projectRenderable = false) + public void AddConstraint(int solverIndex, ObiColliderBase body, Vector3 offset, Quaternion restDarboux, float linearCompliance, float rotationalCompliance, float breakThreshold) { RegisterConstraint(); particleIndices.Add(solverIndex); pinBodies.Add(body != null ? body.Handle : new ObiColliderHandle()); colliderIndices.Add(body != null ? body.Handle.index : -1); - offsets.Add(new Vector4(offset.x, offset.y, offset.z, projectRenderable ? 1:0)); + offsets.Add(offset); restDarbouxVectors.Add(restDarboux); stiffnesses.Add(linearCompliance); stiffnesses.Add(rotationalCompliance); + breakThresholds.Add(breakThreshold); } public override void Clear() @@ -102,11 +108,13 @@ namespace Obi offsets.ResizeUninitialized(m_ActiveConstraintCount + batch.activeConstraintCount); restDarbouxVectors.ResizeUninitialized(m_ActiveConstraintCount + batch.activeConstraintCount); stiffnesses.ResizeUninitialized((m_ActiveConstraintCount + batch.activeConstraintCount) * 2); + breakThresholds.ResizeUninitialized(m_ActiveConstraintCount + batch.activeConstraintCount); lambdas.ResizeInitialized((m_ActiveConstraintCount + batch.activeConstraintCount) * 4); offsets.CopyFrom(batch.offsets, 0, m_ActiveConstraintCount, batch.activeConstraintCount); restDarbouxVectors.CopyFrom(batch.restDarbouxVectors, 0, m_ActiveConstraintCount, batch.activeConstraintCount); stiffnesses.CopyFrom(batch.stiffnesses, 0, m_ActiveConstraintCount * 2, batch.activeConstraintCount * 2); + breakThresholds.CopyFrom(batch.breakThresholds, 0, m_ActiveConstraintCount, batch.activeConstraintCount); for (int i = 0; i < batch.activeConstraintCount; ++i) { @@ -131,13 +139,6 @@ namespace Obi public override void RemoveFromSolver(ObiSolver solver) { - base.RemoveFromSolver(solver); - - restDarbouxVectors.Dispose(); - colliderIndices.Dispose(); - offsets.Dispose(); - stiffnesses.Dispose(); - if (solver != null && solver.implementation != null) solver.implementation.DestroyConstraintsBatch(m_BatchImpl as IConstraintsBatchImpl); } diff --git a/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiPinholeConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiPinholeConstraintsBatch.cs deleted file mode 100644 index 3ae11a2ca..000000000 --- a/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiPinholeConstraintsBatch.cs +++ /dev/null @@ -1,220 +0,0 @@ -using UnityEngine; -using System; -using System.Collections.Generic; - -namespace Obi -{ - [Serializable] - public class ObiPinholeConstraintsBatch : ObiConstraintsBatch - { - [Serializable] - public struct PinholeEdge - { - public int edgeIndex; - public float coordinate; - - public PinholeEdge(int edgeIndex, float coordinate) - { - this.edgeIndex = edgeIndex; - this.coordinate = coordinate; - } - - public float GetRopeCoordinate(ObiActor actor) - { - int edgeCount = actor.GetDeformableEdgeCount(); - return edgeCount > 0 ? Mathf.Clamp01((edgeIndex + coordinate) / edgeCount) : 0; - } - } - - protected IPinholeConstraintsBatchImpl m_BatchImpl; - - /// - /// for each constraint, handle of the pinned collider. - /// - [HideInInspector] public List pinBodies = new List(); - - /// - /// for each constraint, reference to the actor pinned. - /// - [HideInInspector] public List pinActors = new List(); - - /// - /// index of the pinned collider in the collider world. - /// - [HideInInspector] public ObiNativeIntList colliderIndices = new ObiNativeIntList(); - - /// - /// Pinhole position expressed in the attachment's local space. - /// - [HideInInspector] public ObiNativeVector4List offsets = new ObiNativeVector4List(); - - /// - // Normalized coordinate along current edge. - /// - [HideInInspector] public ObiNativeFloatList edgeMus = new ObiNativeFloatList(); - - /// - /// Edge range as 2 ints (first edge, last edge) for each constraint. - /// - [HideInInspector] public ObiNativeIntList edgeRanges = new ObiNativeIntList(); - - /// - /// Min/max cooridnate in each of the first and last edges as 2 floats for each constraint. - /// - [HideInInspector] public ObiNativeFloatList edgeRangeMus = new ObiNativeFloatList(); - - /// - /// Parameters of pinhole constraints. 5 floats per constraint (compliance, friction, motor speed, motor force and normalized coordinate along edge). - /// - [HideInInspector] public ObiNativeFloatList parameters = new ObiNativeFloatList(); - - /// - /// Relative velocities between rope and pinhole. - /// - [HideInInspector] public ObiNativeFloatList relativeVelocities = new ObiNativeFloatList(); - - - public override Oni.ConstraintType constraintType - { - get { return Oni.ConstraintType.Pinhole; } - } - - public override IConstraintsBatchImpl implementation - { - get { return m_BatchImpl; } - } - - public ObiPinholeConstraintsBatch(ObiPinholeConstraintsData constraints = null) : base() - { - } - - public void AddConstraint(PinholeEdge edge, PinholeEdge firstEdge, PinholeEdge lastEdge, ObiActor actor, ObiColliderBase body, Vector3 offset, float compliance, float friction, float motorSpeed, float motorForce, bool clampAtEnds) - { - RegisterConstraint(); - - particleIndices.Add(edge.edgeIndex); - edgeMus.Add(edge.coordinate); - edgeRanges.Add(firstEdge.edgeIndex); - edgeRanges.Add(lastEdge.edgeIndex); - edgeRangeMus.Add(firstEdge.coordinate); - edgeRangeMus.Add(lastEdge.coordinate); - - pinBodies.Add(body != null ? body.Handle : new ObiColliderHandle()); - pinActors.Add(actor); - colliderIndices.Add(body != null ? body.Handle.index : -1); - offsets.Add(offset); - parameters.Add(compliance); - parameters.Add(friction); - parameters.Add(motorSpeed); - parameters.Add(motorForce); - parameters.Add(clampAtEnds ? 1 : 0); - relativeVelocities.Add(0); - } - - public override void Clear() - { - base.Clear(); - particleIndices.Clear(); - pinBodies.Clear(); - colliderIndices.Clear(); - offsets.Clear(); - edgeMus.Clear(); - edgeRanges.Clear(); - edgeRangeMus.Clear(); - parameters.Clear(); - relativeVelocities.Clear(); - } - - public override void GetParticlesInvolved(int index, List particles) - { - particles.Add(particleIndices[index]); - } - - protected override void SwapConstraints(int sourceIndex, int destIndex) - { - particleIndices.Swap(sourceIndex, destIndex); - pinBodies.Swap(sourceIndex, destIndex); - colliderIndices.Swap(sourceIndex, destIndex); - offsets.Swap(sourceIndex, destIndex); - edgeMus.Swap(sourceIndex, destIndex); - edgeRanges.Swap(sourceIndex * 2, destIndex * 2); - edgeRanges.Swap(sourceIndex * 2 + 1, destIndex * 2 + 1); - edgeRangeMus.Swap(sourceIndex * 2, destIndex * 2); - edgeRangeMus.Swap(sourceIndex * 2 + 1, destIndex * 2 + 1); - - for (int i = 0; i < 5; ++i) - parameters.Swap(sourceIndex * 5 + i, destIndex * 5 + i); - - relativeVelocities.Swap(sourceIndex, destIndex); - } - - public override void Merge(ObiActor actor, IObiConstraintsBatch other) - { - var batch = other as ObiPinholeConstraintsBatch; - - if (batch != null) - { - - particleIndices.ResizeUninitialized(m_ActiveConstraintCount + batch.activeConstraintCount); - - colliderIndices.ResizeUninitialized(m_ActiveConstraintCount + batch.activeConstraintCount); - offsets.ResizeUninitialized(m_ActiveConstraintCount + batch.activeConstraintCount); - edgeRanges.ResizeUninitialized((m_ActiveConstraintCount + batch.activeConstraintCount) * 2); - edgeRangeMus.ResizeUninitialized((m_ActiveConstraintCount + batch.activeConstraintCount) * 2); - edgeMus.ResizeUninitialized(m_ActiveConstraintCount + batch.activeConstraintCount); - parameters.ResizeUninitialized((m_ActiveConstraintCount + batch.activeConstraintCount) * 5); - relativeVelocities.ResizeInitialized(m_ActiveConstraintCount + batch.activeConstraintCount); - lambdas.ResizeInitialized(m_ActiveConstraintCount + batch.activeConstraintCount); - - edgeMus.CopyFrom(batch.edgeMus, 0, m_ActiveConstraintCount, batch.activeConstraintCount); - edgeRangeMus.CopyFrom(batch.edgeRangeMus, 0, m_ActiveConstraintCount * 2, batch.activeConstraintCount * 2); - offsets.CopyFrom(batch.offsets, 0, m_ActiveConstraintCount, batch.activeConstraintCount); - relativeVelocities.CopyFrom(batch.relativeVelocities, 0, m_ActiveConstraintCount, batch.activeConstraintCount); - parameters.CopyFrom(batch.parameters, 0, m_ActiveConstraintCount * 5, batch.activeConstraintCount * 5); - - for (int i = 0; i < batch.activeConstraintCount; ++i) - { - int currentEdge = -1, firstEdge = -1, lastEdge = -1; - if (batch.pinActors[i] != null) - { - currentEdge = batch.pinActors[i].deformableEdgesOffset + batch.particleIndices[i]; - firstEdge = batch.pinActors[i].deformableEdgesOffset + batch.edgeRanges[i * 2]; - lastEdge = batch.pinActors[i].deformableEdgesOffset + batch.edgeRanges[i * 2 + 1]; - } - - edgeRanges[(m_ActiveConstraintCount + i) * 2] = firstEdge; - edgeRanges[(m_ActiveConstraintCount + i) * 2 + 1] = lastEdge; - particleIndices[m_ActiveConstraintCount + i] = Mathf.Clamp(currentEdge, firstEdge, lastEdge); - colliderIndices[m_ActiveConstraintCount + i] = batch.pinBodies[i] != null ? batch.pinBodies[i].index : -1; - } - - base.Merge(actor, other); - } - } - - public override void AddToSolver(ObiSolver solver) - { - if (solver != null && solver.implementation != null) - { - m_BatchImpl = solver.implementation.CreateConstraintsBatch(constraintType) as IPinholeConstraintsBatchImpl; - - if (m_BatchImpl != null) - m_BatchImpl.SetPinholeConstraints(particleIndices, colliderIndices, offsets, edgeMus, edgeRanges, edgeRangeMus, parameters, relativeVelocities, lambdas, m_ActiveConstraintCount); - } - } - - public override void RemoveFromSolver(ObiSolver solver) - { - base.RemoveFromSolver(solver); - - edgeRanges.Dispose(); - colliderIndices.Dispose(); - offsets.Dispose(); - parameters.Dispose(); - - if (solver != null && solver.implementation != null) - solver.implementation.DestroyConstraintsBatch(m_BatchImpl as IConstraintsBatchImpl); - } - - } -} diff --git a/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiPinholeConstraintsBatch.cs.meta b/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiPinholeConstraintsBatch.cs.meta deleted file mode 100644 index a225abd0c..000000000 --- a/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiPinholeConstraintsBatch.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d642dbf4a869c4761b38ce3f65e22f05 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiShapeMatchingConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiShapeMatchingConstraintsBatch.cs index 4c87bc322..9558a10e4 100644 --- a/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiShapeMatchingConstraintsBatch.cs +++ b/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiShapeMatchingConstraintsBatch.cs @@ -8,38 +8,38 @@ namespace Obi [Serializable] public class ObiShapeMatchingConstraintsBatch : ObiConstraintsBatch { - protected IShapeMatchingConstraintsBatchImpl m_BatchImpl; + protected IShapeMatchingConstraintsBatchImpl m_BatchImpl; /// /// index of the first particle in each constraint. /// - public ObiNativeIntList firstIndex = new ObiNativeIntList(); + public ObiNativeIntList firstIndex = new ObiNativeIntList(); /// /// amount of particles in each constraint. /// - public ObiNativeIntList numIndices = new ObiNativeIntList(); + public ObiNativeIntList numIndices = new ObiNativeIntList(); /// /// whether the constraint is implicit (0) or explicit (>0). /// - public ObiNativeIntList explicitGroup = new ObiNativeIntList(); + public ObiNativeIntList explicitGroup = new ObiNativeIntList(); /// /// 5 floats per constraint: stiffness, plastic yield, creep, recovery and max deformation. /// - public ObiNativeFloatList materialParameters = new ObiNativeFloatList(); + public ObiNativeFloatList materialParameters = new ObiNativeFloatList(); /// /// rest center of mass for each constraint. /// - public ObiNativeVector4List restComs = new ObiNativeVector4List(); + public ObiNativeVector4List restComs = new ObiNativeVector4List(); /// /// current center of mass for each constraint. /// - public ObiNativeVector4List coms = new ObiNativeVector4List(); + public ObiNativeVector4List coms = new ObiNativeVector4List(); /// /// current best-match orientation for each constraint. @@ -96,7 +96,7 @@ namespace Obi { int first = firstIndex[index]; int num = numIndices[index]; - for (int i = first; i < first + num; ++i) + for (int i = first; i < first + num; ++i) particles.Add(particleIndices[i]); } @@ -154,7 +154,7 @@ namespace Obi // shape matching constraint particle indices are not reordered when deactivating constraints, // so instead of using batch.activeConstraintCount, batch.constraintCount. We need all of them. int numActiveIndices = 0; - for (int i = 0; i < batch.constraintCount; ++i) + for (int i = 0; i < batch.constraintCount; ++i) numActiveIndices += batch.numIndices[i]; particleIndices.ResizeUninitialized(initialIndexCount + numActiveIndices); @@ -209,19 +209,6 @@ namespace Obi public override void RemoveFromSolver(ObiSolver solver) { - base.RemoveFromSolver(solver); - - firstIndex.Dispose(); - numIndices.Dispose(); - explicitGroup.Dispose(); - materialParameters.Dispose(); - - restComs.Dispose(); - coms.Dispose(); - orientations.Dispose(); - linearTransforms.Dispose(); - plasticDeformations.Dispose(); - //Remove batch: solver.implementation.DestroyConstraintsBatch(m_BatchImpl as IConstraintsBatchImpl); } diff --git a/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiSkinConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiSkinConstraintsBatch.cs index f7b738cf1..0edb2ac0f 100644 --- a/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiSkinConstraintsBatch.cs +++ b/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiSkinConstraintsBatch.cs @@ -131,13 +131,6 @@ namespace Obi public override void RemoveFromSolver(ObiSolver solver) { - base.RemoveFromSolver(solver); - - skinPoints.Dispose(); - skinNormals.Dispose(); - skinRadiiBackstop.Dispose(); - skinCompliance.Dispose(); - //Remove batch: solver.implementation.DestroyConstraintsBatch(m_BatchImpl as IConstraintsBatchImpl); } diff --git a/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiStretchShearConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiStretchShearConstraintsBatch.cs index cce356d4b..225074fdc 100644 --- a/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiStretchShearConstraintsBatch.cs +++ b/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiStretchShearConstraintsBatch.cs @@ -141,13 +141,6 @@ namespace Obi public override void RemoveFromSolver(ObiSolver solver) { - base.RemoveFromSolver(solver); - - orientationIndices.Dispose(); - restLengths.Dispose(); - restOrientations.Dispose(); - stiffnesses.Dispose(); - //Remove batch: solver.implementation.DestroyConstraintsBatch(m_BatchImpl as IConstraintsBatchImpl); } diff --git a/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiTetherConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiTetherConstraintsBatch.cs index 313e6ecaa..bfecd67a7 100644 --- a/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiTetherConstraintsBatch.cs +++ b/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiTetherConstraintsBatch.cs @@ -104,11 +104,6 @@ namespace Obi public override void RemoveFromSolver(ObiSolver solver) { - base.RemoveFromSolver(solver); - - maxLengthsScales.Dispose(); - stiffnesses.Dispose(); - //Remove batch: solver.implementation.DestroyConstraintsBatch(m_BatchImpl as IConstraintsBatchImpl); } diff --git a/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiVolumeConstraintsBatch.cs b/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiVolumeConstraintsBatch.cs index 882f1a77d..a4859dc86 100644 --- a/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiVolumeConstraintsBatch.cs +++ b/Assets/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiVolumeConstraintsBatch.cs @@ -126,13 +126,6 @@ namespace Obi public override void RemoveFromSolver(ObiSolver solver) { - base.RemoveFromSolver(solver); - - firstTriangle.Dispose(); - numTriangles.Dispose(); - restVolumes.Dispose(); - pressureStiffness.Dispose(); - //Remove batch: solver.implementation.DestroyConstraintsBatch(m_BatchImpl as IConstraintsBatchImpl); } diff --git a/Assets/Obi/Scripts/Common/Blueprints/Constraints/Groups/ObiAerodynamicConstraintsData.cs b/Assets/Obi/Scripts/Common/Blueprints/Constraints/Groups/ObiAerodynamicConstraintsData.cs index 96657c004..d2e05fb12 100644 --- a/Assets/Obi/Scripts/Common/Blueprints/Constraints/Groups/ObiAerodynamicConstraintsData.cs +++ b/Assets/Obi/Scripts/Common/Blueprints/Constraints/Groups/ObiAerodynamicConstraintsData.cs @@ -13,8 +13,18 @@ namespace Obi set; } - float GetDrag(ObiAerodynamicConstraintsBatch batch, int constraintIndex); - float GetLift(ObiAerodynamicConstraintsBatch batch, int constraintIndex); + float drag + { + get; + set; + } + + float lift + { + get; + set; + } + } [Serializable] diff --git a/Assets/Obi/Scripts/Common/Blueprints/Constraints/Groups/ObiPinholeConstraintsData.cs b/Assets/Obi/Scripts/Common/Blueprints/Constraints/Groups/ObiPinholeConstraintsData.cs deleted file mode 100644 index 522ff740f..000000000 --- a/Assets/Obi/Scripts/Common/Blueprints/Constraints/Groups/ObiPinholeConstraintsData.cs +++ /dev/null @@ -1,16 +0,0 @@ -using UnityEngine; -using System.Collections; -using System; - -namespace Obi -{ - [Serializable] - public class ObiPinholeConstraintsData : ObiConstraints - { - - public override ObiPinholeConstraintsBatch CreateBatch(ObiPinholeConstraintsBatch source = null) - { - return new ObiPinholeConstraintsBatch(); - } - } -} diff --git a/Assets/Obi/Scripts/Common/Blueprints/Constraints/Groups/ObiPinholeConstraintsData.cs.meta b/Assets/Obi/Scripts/Common/Blueprints/Constraints/Groups/ObiPinholeConstraintsData.cs.meta deleted file mode 100644 index 8df74c63a..000000000 --- a/Assets/Obi/Scripts/Common/Blueprints/Constraints/Groups/ObiPinholeConstraintsData.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: caeaf013c17424e0884d22017414ee1c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Blueprints/Constraints/ObiConstraints.cs b/Assets/Obi/Scripts/Common/Blueprints/Constraints/ObiConstraints.cs index b8810adc6..d4ccd6990 100644 --- a/Assets/Obi/Scripts/Common/Blueprints/Constraints/ObiConstraints.cs +++ b/Assets/Obi/Scripts/Common/Blueprints/Constraints/ObiConstraints.cs @@ -8,8 +8,8 @@ namespace Obi { Oni.ConstraintType? GetConstraintType(); - IObiConstraintsBatch GetBatch(int i); - int batchCount { get; } + IObiConstraintsBatch GetBatch(int i); + int GetBatchCount(); void Clear(); bool AddToSolver(ObiSolver solver); @@ -17,7 +17,6 @@ namespace Obi int GetConstraintCount(); int GetActiveConstraintCount(); - void ActivateAllConstraints(); void DeactivateAllConstraints(); void Merge(ObiActor actor, IObiConstraints other); @@ -29,8 +28,6 @@ namespace Obi [NonSerialized] protected ObiSolver m_Solver; [HideInInspector] public List batches = new List(); - public int batchCount { get => batches == null ? 0 : batches.Count; } - // merges constraints from a given actor with this one. public void Merge(ObiActor actor, IObiConstraints other) { @@ -45,11 +42,11 @@ namespace Obi actor.solverBatchOffsets[constraintType].Clear(); // create new empty batches if needed: - int newBatches = Mathf.Max(0, others.batchCount - batchCount); + int newBatches = Mathf.Max(0, others.GetBatchCount() - GetBatchCount()); for (int i = 0; i < newBatches; ++i) AddBatch(CreateBatch()); - for (int i = 0; i < other.batchCount; ++i) + for (int i = 0; i < other.GetBatchCount(); ++i) { // store this batch's offset: actor.solverBatchOffsets[constraintType].Add(batches[i].activeConstraintCount); @@ -67,6 +64,11 @@ namespace Obi return null; } + public int GetBatchCount() + { + return batches == null ? 0 : batches.Count; + } + public int GetConstraintCount() { int count = 0; @@ -99,14 +101,6 @@ namespace Obi batch.DeactivateAllConstraints(); } - public void ActivateAllConstraints() - { - if (batches != null) - foreach (T batch in batches) - if (batch != null) - batch.ActivateAllConstraints(); - } - public T GetFirstBatch() { return (batches != null && batches.Count > 0) ? batches[0] : null; diff --git a/Assets/Obi/Scripts/Common/Blueprints/GraphColoring.cs b/Assets/Obi/Scripts/Common/Blueprints/GraphColoring.cs index 3101bf7be..fc4223716 100644 --- a/Assets/Obi/Scripts/Common/Blueprints/GraphColoring.cs +++ b/Assets/Obi/Scripts/Common/Blueprints/GraphColoring.cs @@ -1 +1,106 @@ -using System; using System.Collections; using System.Collections.Generic; using UnityEngine; namespace Obi { /** * General greedy graph coloring algorithm for constraints. Input: * - List of particle indices used by all constraints. * - List of per-constraint offsets of the first constrained particle in the previous array, with the total amount of particle indices in the last position. * * The output is a color for each constraint. Constraints of the same color are guaranteed to not share any partices. */ public class GraphColoring { private List m_ParticleIndices; private List m_ConstraintIndices; private List> m_ConstraintsPerParticle; public IReadOnlyList particleIndices => m_ParticleIndices.AsReadOnly(); public IReadOnlyList constraintIndices => m_ConstraintIndices.AsReadOnly(); public GraphColoring(int particleCount = 0) { m_ParticleIndices = new List(); m_ConstraintIndices = new List(); m_ConstraintsPerParticle = new List>(particleCount); for (int i = 0; i < particleCount; ++i) m_ConstraintsPerParticle.Add(new List()); } public void Clear() { m_ParticleIndices.Clear(); m_ConstraintIndices.Clear(); for (int i = 0; i < m_ConstraintsPerParticle.Count; ++i) m_ConstraintsPerParticle[i].Clear(); } public void AddConstraint(int[] particles) { for (int i = 0; i < particles.Length; ++i) { while (particles[i] >= m_ConstraintsPerParticle.Count) m_ConstraintsPerParticle.Add(new List()); m_ConstraintsPerParticle[particles[i]].Add(m_ConstraintIndices.Count); } m_ConstraintIndices.Add(m_ParticleIndices.Count); m_ParticleIndices.AddRange(particles); } public IEnumerator Colorize(string progressDescription, List colors) { m_ConstraintIndices.Add(m_ParticleIndices.Count); int constraintCount = Mathf.Max(0, m_ConstraintIndices.Count - 1); colors.Clear(); if (constraintCount == 0) yield break; colors.Capacity = constraintCount; bool[] availability = new bool[constraintCount]; for (int i = 0; i < constraintCount; ++i) { colors.Add(-1); availability[i] = true; } // For each constraint: for (int i = 0; i < constraintCount; ++i) { // iterate over its particles: for (int j = m_ConstraintIndices[i]; j < m_ConstraintIndices[i + 1]; ++j) { // for each particle, get constraints affecting it: foreach (int k in m_ConstraintsPerParticle[m_ParticleIndices[j]]) { // skip ourselves: if (i == k) continue; // both constraints share a particle so mark the neighbour color as unavailable: if (colors[k] >= 0) availability[colors[k]] = false; } } // Assign the first available color: for (colors[i] = 0; colors[i] < constraintCount; ++colors[i]) if (availability[colors[i]]) break; // Reset availability flags: for (int j = 0; j < constraintCount; ++j) availability[j] = true; if (i % 250 == 0) yield return new CoroutineJob.ProgressInfo(progressDescription, i / (float)constraintCount); } } } } \ No newline at end of file +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +namespace Obi +{ + /** + * General greedy graph coloring algorithm for constraints. Input: + * - List of particle indices used by all constraints. + * - List of per-constraint offsets of the first constrained particle in the previous array, with the total amount of particle indices in the last position. + * + * The output is a color for each constraint. Constraints of the same color are guaranteed to not share any partices. + */ + public class GraphColoring + { + private List m_ParticleIndices; + private List m_ConstraintIndices; + private List> m_ConstraintsPerParticle; + + public IReadOnlyList particleIndices => m_ParticleIndices.AsReadOnly(); + public IReadOnlyList constraintIndices => m_ConstraintIndices.AsReadOnly(); + + public GraphColoring(int particleCount = 0) + { + m_ParticleIndices = new List(); + m_ConstraintIndices = new List(); + m_ConstraintsPerParticle = new List>(particleCount); + for (int i = 0; i < particleCount; ++i) + m_ConstraintsPerParticle.Add(new List()); + } + + public void Clear() + { + m_ParticleIndices.Clear(); + m_ConstraintIndices.Clear(); + for (int i = 0; i < m_ConstraintsPerParticle.Count; ++i) + m_ConstraintsPerParticle[i].Clear(); + } + + public void AddConstraint(int[] particles) + { + for (int i = 0; i < particles.Length; ++i) + { + while (particles[i] >= m_ConstraintsPerParticle.Count) + m_ConstraintsPerParticle.Add(new List()); + m_ConstraintsPerParticle[particles[i]].Add(m_ConstraintIndices.Count); + } + + m_ConstraintIndices.Add(m_ParticleIndices.Count); + m_ParticleIndices.AddRange(particles); + } + + public IEnumerator Colorize(string progressDescription, List colors) + { + m_ConstraintIndices.Add(m_ParticleIndices.Count); + + int constraintCount = Mathf.Max(0, m_ConstraintIndices.Count - 1); + colors.Clear(); + + if (constraintCount == 0) + yield break; + + colors.Capacity = constraintCount; + bool[] availability = new bool[constraintCount]; + + for (int i = 0; i < constraintCount; ++i) + { + colors.Add(-1); + availability[i] = true; + } + + // For each constraint: + for (int i = 0; i < constraintCount; ++i) + { + // iterate over its particles: + for (int j = m_ConstraintIndices[i]; j < m_ConstraintIndices[i + 1]; ++j) + { + // for each particle, get constraints affecting it: + foreach (int k in m_ConstraintsPerParticle[m_ParticleIndices[j]]) + { + // skip ourselves: + if (i == k) continue; + + // both constraints share a particle so mark the neighbour color as unavailable: + if (colors[k] >= 0) + availability[colors[k]] = false; + } + } + + // Assign the first available color: + for (colors[i] = 0; colors[i] < constraintCount; ++colors[i]) + if (availability[colors[i]]) + break; + + // Reset availability flags: + for (int j = 0; j < constraintCount; ++j) + availability[j] = true; + + yield return new CoroutineJob.ProgressInfo(progressDescription, i / (float)constraintCount); + } + } + + + } +} diff --git a/Assets/Obi/Scripts/Common/Blueprints/ObiActorBlueprint.cs b/Assets/Obi/Scripts/Common/Blueprints/ObiActorBlueprint.cs index a4ba94fdb..894a445b1 100644 --- a/Assets/Obi/Scripts/Common/Blueprints/ObiActorBlueprint.cs +++ b/Assets/Obi/Scripts/Common/Blueprints/ObiActorBlueprint.cs @@ -3,7 +3,6 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Serialization; -using System.IO; #if UNITY_EDITOR using UnityEditor; @@ -17,9 +16,7 @@ namespace Obi public delegate void BlueprintCallback(ObiActorBlueprint blueprint); public event BlueprintCallback OnBlueprintGenerate; - [HideInInspector] [SerializeField] protected uint m_Checksum; [HideInInspector] [SerializeField] protected bool m_Empty = true; - [HideInInspector] [SerializeField] protected bool m_Edited = false; /**< Whether there's been any modifications to blueprint data since generating it. This is used to tell whether it can be re-generated without data loss.*/ [HideInInspector] [SerializeField] protected int m_ActiveParticleCount = 0; [HideInInspector] [SerializeField] protected int m_InitialActiveParticleCount = 0; [HideInInspector] [SerializeField] protected Bounds _bounds = new Bounds(); @@ -27,7 +24,6 @@ namespace Obi /**Particle components*/ [HideInInspector] public Vector3[] positions = null; /**< Particle positions.*/ [HideInInspector] public Vector4[] restPositions = null; /**< Particle rest positions, used to filter collisions.*/ - [HideInInspector] public Vector4[] restNormals = null; /**< Particle local-space normal in xyz, SDF in w. Used for softbody collisions.*/ [HideInInspector] public Quaternion[] orientations = null; /**< Particle orientations.*/ [HideInInspector] public Quaternion[] restOrientations = null; /**< Particle rest orientations.*/ @@ -39,7 +35,7 @@ namespace Obi [HideInInspector] public float[] invRotationalMasses = null; [FormerlySerializedAs("phases")] - [HideInInspector] public int[] filters = null; /**< Particle filters*/ + [HideInInspector] public int[] filters = null; /**< Particle filters*/ [HideInInspector] public Vector3[] principalRadii = null; /**< Particle ellipsoid principal radii. These are the ellipsoid radius in each axis.*/ [HideInInspector] public Color[] colors = null; /**< Particle colors (not used by all actors, can be null)*/ @@ -63,14 +59,6 @@ namespace Obi /** Particle groups.*/ [HideInInspector] public List groups = new List(); - /** - * Checksum value generated from particle positions and orientations. - */ - public uint checksum - { - get { return m_Checksum; } - } - /** * Returns the amount of particles used by this blueprint. */ @@ -84,16 +72,6 @@ namespace Obi get { return m_ActiveParticleCount; } } - public Oni.SimplexType simplexTypes - { - get - { - return Oni.SimplexType.Point | // points (single particles) are always available. - (edges != null ? Oni.SimplexType.Edge : 0) | - (triangles != null ? Oni.SimplexType.Triangle : 0); - } - } - /** * Returns whether this group uses oriented particles. */ @@ -102,11 +80,12 @@ namespace Obi get { return invRotationalMasses != null && invRotationalMasses.Length > 0 && - orientations != null && orientations.Length > 0; + orientations != null && orientations.Length > 0 && + restOrientations != null && restOrientations.Length > 0; } } - public virtual bool usesTethers + public virtual bool usesTethers { get { return false; } } @@ -120,7 +99,6 @@ namespace Obi { positions.Swap(index, m_ActiveParticleCount); restPositions.Swap(index, m_ActiveParticleCount); - restNormals.Swap(index, m_ActiveParticleCount); orientations.Swap(index, m_ActiveParticleCount); restOrientations.Swap(index, m_ActiveParticleCount); velocities.Swap(index, m_ActiveParticleCount); @@ -130,14 +108,6 @@ namespace Obi filters.Swap(index, m_ActiveParticleCount); principalRadii.Swap(index, m_ActiveParticleCount); colors.Swap(index, m_ActiveParticleCount); - - m_Edited = true; - } - - public bool edited - { - get { return m_Edited; } - set { m_Edited = value; } } /** @@ -178,7 +148,7 @@ namespace Obi { if (positions.Length > 0) { - _bounds = new Bounds(positions[0], Vector3.zero); + _bounds = new Bounds(positions[0],Vector3.zero); for (int i = 1; i < positions.Length; ++i) _bounds.Encapsulate(positions[i]); } @@ -191,42 +161,27 @@ namespace Obi get { return _bounds; } } - protected void GenerateChecksum() - { - using (MemoryStream ms = new MemoryStream()) - { - if (positions != null) - foreach (var p in positions) ms.Concatenate(p); - - if (orientations != null) - foreach (var o in orientations) ms.Concatenate(o); - - ms.Flush(); - m_Checksum = ObiUtils.Adler32(ms.ToArray()); - } - } - public IEnumerable GetConstraints() { - if (distanceConstraintsData != null && distanceConstraintsData.batchCount > 0) + if (distanceConstraintsData != null && distanceConstraintsData.GetBatchCount() > 0) yield return distanceConstraintsData; - if (bendConstraintsData != null && bendConstraintsData.batchCount > 0) + if (bendConstraintsData != null && bendConstraintsData.GetBatchCount() > 0) yield return bendConstraintsData; - if (skinConstraintsData != null && skinConstraintsData.batchCount > 0) + if (skinConstraintsData != null && skinConstraintsData.GetBatchCount() > 0) yield return skinConstraintsData; - if (tetherConstraintsData != null && tetherConstraintsData.batchCount > 0) + if (tetherConstraintsData != null && tetherConstraintsData.GetBatchCount() > 0) yield return tetherConstraintsData; - if (stretchShearConstraintsData != null && stretchShearConstraintsData.batchCount > 0) + if (stretchShearConstraintsData != null && stretchShearConstraintsData.GetBatchCount() > 0) yield return stretchShearConstraintsData; - if (bendTwistConstraintsData != null && bendTwistConstraintsData.batchCount > 0) + if (bendTwistConstraintsData != null && bendTwistConstraintsData.GetBatchCount() > 0) yield return bendTwistConstraintsData; - if (shapeMatchingConstraintsData != null && shapeMatchingConstraintsData.batchCount > 0) + if (shapeMatchingConstraintsData != null && shapeMatchingConstraintsData.GetBatchCount() > 0) yield return shapeMatchingConstraintsData; - if (aerodynamicConstraintsData != null && aerodynamicConstraintsData.batchCount > 0) + if (aerodynamicConstraintsData != null && aerodynamicConstraintsData.GetBatchCount() > 0) yield return aerodynamicConstraintsData; - if (chainConstraintsData != null && chainConstraintsData.batchCount > 0) + if (chainConstraintsData != null && chainConstraintsData.GetBatchCount() > 0) yield return chainConstraintsData; - if (volumeConstraintsData != null && volumeConstraintsData.batchCount > 0) + if (volumeConstraintsData != null && volumeConstraintsData.GetBatchCount() > 0) yield return volumeConstraintsData; } @@ -271,24 +226,6 @@ namespace Obi return Quaternion.identity; } - public Vector3 GetParticleRestPosition(int index) - { - if (restPositions != null && index < restPositions.Length) - { - return restPositions[index]; - } - return Vector3.zero; - } - - public Quaternion GetParticleRestOrientation(int index) - { - if (restOrientations != null && index < restOrientations.Length) - { - return restOrientations[index]; - } - return Quaternion.identity; - } - public void GetParticleAnisotropy(int index, ref Vector4 b1, ref Vector4 b2, ref Vector4 b3) { if (orientations != null && index < orientations.Length) @@ -333,7 +270,7 @@ namespace Obi public void GenerateImmediate() { var g = Generate(); - while (g.MoveNext()) { } + while (g.MoveNext()){} } public IEnumerator Generate() @@ -351,37 +288,24 @@ namespace Obi m_InitialActiveParticleCount = m_ActiveParticleCount; foreach (IObiConstraints constraints in GetConstraints()) - for (int i = 0; i < constraints.batchCount; ++i) + for (int i = 0; i < constraints.GetBatchCount(); ++i) constraints.GetBatch(i).initialActiveConstraintCount = constraints.GetBatch(i).activeConstraintCount; - CommitBlueprintChanges(); - #if UNITY_EDITOR - if (!Application.isPlaying) - { - EditorUtility.SetDirty(this); - } + EditorUtility.SetDirty(this); #endif - OnBlueprintGenerate?.Invoke(this); - } - - // Called at the end of blueprint generation. Also automatically called when exiting blueprint editor. - // This generates a checksum for the blueprint, and in some case extra data (such as default skinmaps for cloth and softbodies). - public virtual void CommitBlueprintChanges() - { - GenerateChecksum(); + if (OnBlueprintGenerate != null) + OnBlueprintGenerate(this); } public void Clear() { m_Empty = true; - edited = false; m_ActiveParticleCount = 0; positions = null; restPositions = null; - restNormals = null; orientations = null; restOrientations = null; velocities = null; @@ -389,6 +313,7 @@ namespace Obi invMasses = null; invRotationalMasses = null; filters = null; + //phases = null; principalRadii = null; colors = null; @@ -430,7 +355,7 @@ namespace Obi { EditorUtility.SetDirty(this); if (saveImmediately) - AssetDatabase.SaveAssetIfDirty(this); + AssetDatabase.SaveAssets(); } } else @@ -439,8 +364,6 @@ namespace Obi groups.Insert(index, group); } - edited = true; - return group; } return null; @@ -470,7 +393,7 @@ namespace Obi { EditorUtility.SetDirty(this); if (saveImmediately) - AssetDatabase.SaveAssetIfDirty(this); + AssetDatabase.SaveAssets(); } } else @@ -483,8 +406,6 @@ namespace Obi DestroyImmediate(group, true); } - edited = true; - return true; } return false; @@ -504,7 +425,7 @@ namespace Obi { EditorUtility.SetDirty(this); if (saveImmediately) - AssetDatabase.SaveAssetIfDirty(this); + AssetDatabase.SaveAssets(); } } else @@ -513,39 +434,26 @@ namespace Obi groups[index].name = name; } - edited = true; - return true; } return false; } - public void ClearParticleGroups(bool registerUndo = true, bool saveImmediately = true) + public void ClearParticleGroups(bool saveImmediately = true) { - if (groups.Count == 0) return; - #if UNITY_EDITOR if (!Application.isPlaying) { - if (registerUndo) - { - Undo.RecordObject(this, "Clear particle groups"); - for (int i = 0; i < groups.Count; ++i) - if (groups[i] != null) - Undo.DestroyObjectImmediate(groups[i]); - } - else - { - for (int i = 0; i < groups.Count; ++i) - if (groups[i] != null) - DestroyImmediate(groups[i], true); - } + Undo.RecordObject(this, "Clear particle groups"); + for (int i = 0; i < groups.Count; ++i) + if (groups[i] != null) + Undo.DestroyObjectImmediate(groups[i]); if (EditorUtility.IsPersistent(this)) { EditorUtility.SetDirty(this); if (saveImmediately) - AssetDatabase.SaveAssetIfDirty(this); + AssetDatabase.SaveAssets(); } } else @@ -580,7 +488,7 @@ namespace Obi private bool DoesParticleShareConstraints(IObiConstraints constraints, int index, List particles, bool[] selected) { bool shared = false; - for (int i = 0; i < constraints.batchCount; ++i) + for (int i = 0; i < constraints.GetBatchCount(); ++i) { var batch = constraints.GetBatch(i); for (int j = 0; j < batch.activeConstraintCount; ++j) @@ -600,7 +508,7 @@ namespace Obi private void DeactivateConstraintsWithInactiveParticles(IObiConstraints constraints, List particles) { - for (int j = 0; j < constraints.batchCount; ++j) + for (int j = 0; j < constraints.GetBatchCount(); ++j) { var batch = constraints.GetBatch(j); @@ -618,8 +526,6 @@ namespace Obi } } } - - edited = true; } private void ParticlesSwappedInGroups(int index, int newIndex) @@ -635,11 +541,9 @@ namespace Obi group.particleIndices[i] = newIndex; } } - - edited = true; } - public virtual void RemoveSelectedParticles(ref bool[] selected, bool optimize = true) + public void RemoveSelectedParticles(ref bool[] selected, bool optimize = true) { List particles = new List(); @@ -667,7 +571,7 @@ namespace Obi // Update constraints: foreach (IObiConstraints constraints in GetConstraints()) - for (int j = 0; j < constraints.batchCount; ++j) + for (int j = 0; j < constraints.GetBatchCount(); ++j) constraints.GetBatch(j).ParticlesSwapped(i, m_ActiveParticleCount); // Update groups: @@ -681,9 +585,6 @@ namespace Obi foreach (IObiConstraints constraints in GetConstraints()) DeactivateConstraintsWithInactiveParticles(constraints, particles); - CommitBlueprintChanges(); - - edited = true; } public void RestoreRemovedParticles() @@ -691,10 +592,9 @@ namespace Obi m_ActiveParticleCount = m_InitialActiveParticleCount; foreach (IObiConstraints constraints in GetConstraints()) - for (int j = 0; j < constraints.batchCount; ++j) + for (int j = 0; j < constraints.GetBatchCount(); ++j) constraints.GetBatch(j).activeConstraintCount = constraints.GetBatch(j).initialActiveConstraintCount; - - CommitBlueprintChanges(); + } public virtual void GenerateTethers(bool[] selected) { } diff --git a/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers2D/ObiBoxShapeTracker2D.cs b/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers2D/ObiBoxShapeTracker2D.cs index 23fc16994..dab43bce4 100644 --- a/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers2D/ObiBoxShapeTracker2D.cs +++ b/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers2D/ObiBoxShapeTracker2D.cs @@ -10,7 +10,7 @@ namespace Obi{ this.collider = collider; } - public override void UpdateIfNeeded (){ + public override bool UpdateIfNeeded (){ BoxCollider2D box = collider as BoxCollider2D; @@ -19,14 +19,12 @@ namespace Obi{ // update collider: var shape = world.colliderShapes[index]; - shape.is2D = true; + shape.is2D = 1; shape.type = ColliderShape.ShapeType.Box; shape.filter = source.Filter; - shape.SetSign(source.Inverted); - shape.isTrigger = box.isTrigger; - shape.rigidbodyIndex = source.Rigidbody != null ? source.Rigidbody.Handle.index : -1; + shape.flags = box.isTrigger ? 1 : 0; + shape.rigidbodyIndex = source.Rigidbody != null ? source.Rigidbody.handle.index : -1; shape.materialIndex = source.CollisionMaterial != null ? source.CollisionMaterial.handle.index : -1; - shape.forceZoneIndex = source.ForceZone != null ? source.ForceZone.Handle.index : -1; shape.contactOffset = source.Thickness + box.edgeRadius; shape.center = box.offset; shape.size = box.size; @@ -39,8 +37,9 @@ namespace Obi{ // update transform: var trfm = world.colliderTransforms[index]; - trfm.FromTransform2D(box.transform, source.Rigidbody as ObiRigidbody2D); + trfm.FromTransform(box.transform, true); world.colliderTransforms[index] = trfm; + return false; } } diff --git a/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers2D/ObiCapsuleShapeTracker2D.cs b/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers2D/ObiCapsuleShapeTracker2D.cs index 96c23dd86..277be12f7 100644 --- a/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers2D/ObiCapsuleShapeTracker2D.cs +++ b/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers2D/ObiCapsuleShapeTracker2D.cs @@ -11,7 +11,7 @@ namespace Obi{ this.collider = collider; } - public override void UpdateIfNeeded () + public override bool UpdateIfNeeded () { CapsuleCollider2D capsule = collider as CapsuleCollider2D; @@ -21,14 +21,12 @@ namespace Obi{ // update collider: var shape = world.colliderShapes[index]; - shape.is2D = true; + shape.is2D = 1; shape.type = ColliderShape.ShapeType.Capsule; shape.filter = source.Filter; - shape.SetSign(source.Inverted); - shape.isTrigger = capsule.isTrigger; - shape.rigidbodyIndex = source.Rigidbody != null ? source.Rigidbody.Handle.index : -1; + shape.flags = capsule.isTrigger ? 1 : 0; + shape.rigidbodyIndex = source.Rigidbody != null ? source.Rigidbody.handle.index : -1; shape.materialIndex = source.CollisionMaterial != null ? source.CollisionMaterial.handle.index : -1; - shape.forceZoneIndex = source.ForceZone != null ? source.ForceZone.Handle.index : -1; shape.contactOffset = source.Thickness; shape.center = capsule.offset; Vector2 size = capsule.size; @@ -44,8 +42,10 @@ namespace Obi{ // update transform: var trfm = world.colliderTransforms[index]; - trfm.FromTransform2D(capsule.transform, source.Rigidbody as ObiRigidbody2D); + trfm.FromTransform(capsule.transform,true); world.colliderTransforms[index] = trfm; + + return false; } } diff --git a/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers2D/ObiCircleShapeTracker2D.cs b/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers2D/ObiCircleShapeTracker2D.cs index c2e702c7d..c75ffd90e 100644 --- a/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers2D/ObiCircleShapeTracker2D.cs +++ b/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers2D/ObiCircleShapeTracker2D.cs @@ -12,7 +12,7 @@ namespace Obi{ this.collider = collider; } - public override void UpdateIfNeeded () + public override bool UpdateIfNeeded () { CircleCollider2D sphere = collider as CircleCollider2D; @@ -23,14 +23,12 @@ namespace Obi{ // update collider: var shape = world.colliderShapes[index]; - shape.is2D = true; + shape.is2D = 1; shape.type = ColliderShape.ShapeType.Sphere; shape.filter = source.Filter; - shape.SetSign(source.Inverted); - shape.isTrigger = sphere.isTrigger; - shape.rigidbodyIndex = source.Rigidbody != null ? source.Rigidbody.Handle.index : -1; + shape.flags = sphere.isTrigger ? 1 : 0; + shape.rigidbodyIndex = source.Rigidbody != null ? source.Rigidbody.handle.index : -1; shape.materialIndex = source.CollisionMaterial != null ? source.CollisionMaterial.handle.index : -1; - shape.forceZoneIndex = source.ForceZone != null ? source.ForceZone.Handle.index : -1; shape.contactOffset = source.Thickness; shape.center = sphere.offset; shape.size = Vector3.one * sphere.radius; @@ -43,8 +41,10 @@ namespace Obi{ // update transform: var trfm = world.colliderTransforms[index]; - trfm.FromTransform2D(sphere.transform, source.Rigidbody as ObiRigidbody2D); + trfm.FromTransform(sphere.transform,true); world.colliderTransforms[index] = trfm; + + return true; } } diff --git a/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers2D/ObiEdgeShapeTracker2D.cs b/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers2D/ObiEdgeShapeTracker2D.cs index e303037db..dfdb9988f 100644 --- a/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers2D/ObiEdgeShapeTracker2D.cs +++ b/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers2D/ObiEdgeShapeTracker2D.cs @@ -19,7 +19,7 @@ namespace Obi{ ObiColliderWorld.GetInstance().DestroyEdgeMesh(handle); } - public override void UpdateIfNeeded (){ + public override bool UpdateIfNeeded (){ EdgeCollider2D edgeCollider = collider as EdgeCollider2D; @@ -36,14 +36,12 @@ namespace Obi{ // update collider: var shape = world.colliderShapes[index]; - shape.is2D = true; + shape.is2D = 1; shape.type = ColliderShape.ShapeType.EdgeMesh; shape.filter = source.Filter; - shape.SetSign(source.Inverted); - shape.isTrigger = edgeCollider.isTrigger; - shape.rigidbodyIndex = source.Rigidbody != null ? source.Rigidbody.Handle.index : -1; + shape.flags = edgeCollider.isTrigger ? 1 : 0; + shape.rigidbodyIndex = source.Rigidbody != null ? source.Rigidbody.handle.index : -1; shape.materialIndex = source.CollisionMaterial != null ? source.CollisionMaterial.handle.index : -1; - shape.forceZoneIndex = source.ForceZone != null ? source.ForceZone.Handle.index : -1; shape.center = edgeCollider.offset; shape.contactOffset = source.Thickness + edgeCollider.edgeRadius; shape.dataIndex = handle.index; @@ -56,8 +54,10 @@ namespace Obi{ // update transform: var trfm = world.colliderTransforms[index]; - trfm.FromTransform2D(edgeCollider.transform, source.Rigidbody as ObiRigidbody2D); + trfm.FromTransform(edgeCollider.transform, true); world.colliderTransforms[index] = trfm; + + return true; } public override void Destroy() diff --git a/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers3D/ObiBoxShapeTracker.cs b/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers3D/ObiBoxShapeTracker.cs index db6c08ae4..afe993057 100644 --- a/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers3D/ObiBoxShapeTracker.cs +++ b/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers3D/ObiBoxShapeTracker.cs @@ -12,10 +12,18 @@ namespace Obi{ this.collider = collider; } - public override void UpdateIfNeeded (){ + public override bool UpdateIfNeeded (){ BoxCollider box = collider as BoxCollider; + /*if (box != null && (box.size != size || box.center != center)){ + size = box.size; + center = box.center; + adaptor.Set(center, size); + Oni.UpdateShape(oniShape,ref adaptor); + return true; + }*/ + // retrieve collision world and index: var world = ObiColliderWorld.GetInstance(); int index = source.Handle.index; @@ -24,11 +32,9 @@ namespace Obi{ var shape = world.colliderShapes[index]; shape.type = ColliderShape.ShapeType.Box; shape.filter = source.Filter; - shape.SetSign(source.Inverted); - shape.isTrigger = box.isTrigger; - shape.rigidbodyIndex = source.Rigidbody != null ? source.Rigidbody.Handle.index : -1; + shape.flags = box.isTrigger ? 1 : 0; + shape.rigidbodyIndex = source.Rigidbody != null ? source.Rigidbody.handle.index : -1; shape.materialIndex = source.CollisionMaterial != null ? source.CollisionMaterial.handle.index : -1; - shape.forceZoneIndex = source.ForceZone != null ? source.ForceZone.Handle.index : -1; shape.contactOffset = source.Thickness; shape.center = box.center; shape.size = box.size; @@ -41,9 +47,10 @@ namespace Obi{ // update transform: var trfm = world.colliderTransforms[index]; - trfm.FromTransform3D(box.transform, source.Rigidbody as ObiRigidbody); + trfm.FromTransform(box.transform); world.colliderTransforms[index] = trfm; + return true; } } diff --git a/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers3D/ObiCapsuleShapeTracker.cs b/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers3D/ObiCapsuleShapeTracker.cs index 252e13694..e55f43b0d 100644 --- a/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers3D/ObiCapsuleShapeTracker.cs +++ b/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers3D/ObiCapsuleShapeTracker.cs @@ -11,7 +11,7 @@ namespace Obi{ this.source = source; } - public override void UpdateIfNeeded (){ + public override bool UpdateIfNeeded (){ CapsuleCollider capsule = collider as CapsuleCollider; @@ -23,11 +23,9 @@ namespace Obi{ var shape = world.colliderShapes[index]; shape.type = ColliderShape.ShapeType.Capsule; shape.filter = source.Filter; - shape.SetSign(source.Inverted); - shape.isTrigger = capsule.isTrigger; - shape.rigidbodyIndex = source.Rigidbody != null ? source.Rigidbody.Handle.index : -1; + shape.flags = capsule.isTrigger ? 1 : 0; + shape.rigidbodyIndex = source.Rigidbody != null ? source.Rigidbody.handle.index : -1; shape.materialIndex = source.CollisionMaterial != null ? source.CollisionMaterial.handle.index : -1; - shape.forceZoneIndex = source.ForceZone != null ? source.ForceZone.Handle.index : -1; shape.contactOffset = source.Thickness; shape.center = capsule.center; shape.size = new Vector4(capsule.radius, capsule.height, capsule.direction, 0); @@ -40,8 +38,10 @@ namespace Obi{ // update transform: var trfm = world.colliderTransforms[index]; - trfm.FromTransform3D(capsule.transform, source.Rigidbody as ObiRigidbody); + trfm.FromTransform(capsule.transform); world.colliderTransforms[index] = trfm; + + return true; } } diff --git a/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers3D/ObiCharacterControllerShapeTracker.cs b/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers3D/ObiCharacterControllerShapeTracker.cs index d53e98095..d50fcd280 100644 --- a/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers3D/ObiCharacterControllerShapeTracker.cs +++ b/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers3D/ObiCharacterControllerShapeTracker.cs @@ -13,7 +13,7 @@ namespace Obi this.source = source; } - public override void UpdateIfNeeded() + public override bool UpdateIfNeeded() { CharacterController character = collider as CharacterController; @@ -26,11 +26,9 @@ namespace Obi var shape = world.colliderShapes[index]; shape.type = ColliderShape.ShapeType.Capsule; shape.filter = source.Filter; - shape.SetSign(source.Inverted); - shape.isTrigger = character.isTrigger; - shape.rigidbodyIndex = source.Rigidbody != null ? source.Rigidbody.Handle.index : -1; + shape.flags = character.isTrigger ? 1 : 0; + shape.rigidbodyIndex = source.Rigidbody != null ? source.Rigidbody.handle.index : -1; shape.materialIndex = source.CollisionMaterial != null ? source.CollisionMaterial.handle.index : -1; - shape.forceZoneIndex = source.ForceZone != null ? source.ForceZone.Handle.index : -1; shape.contactOffset = source.Thickness; shape.center = character.center; shape.size = new Vector4(character.radius, character.height, 1, 0); @@ -43,8 +41,10 @@ namespace Obi // update transform: var trfm = world.colliderTransforms[index]; - trfm.FromTransform3D(character.transform, source.Rigidbody as ObiRigidbody); + trfm.FromTransform(character.transform); world.colliderTransforms[index] = trfm; + + return true; } } diff --git a/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers3D/ObiDistanceFieldShapeTracker.cs b/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers3D/ObiDistanceFieldShapeTracker.cs index 4f36a755b..c25d6b9e2 100644 --- a/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers3D/ObiDistanceFieldShapeTracker.cs +++ b/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers3D/ObiDistanceFieldShapeTracker.cs @@ -26,7 +26,7 @@ namespace Obi{ ObiColliderWorld.GetInstance().DestroyDistanceField(handle); } - public override void UpdateIfNeeded () + public override bool UpdateIfNeeded () { bool trigger = false; @@ -55,11 +55,9 @@ namespace Obi{ var shape = world.colliderShapes[index]; shape.type = ColliderShape.ShapeType.SignedDistanceField; shape.filter = source.Filter; - shape.SetSign(source.Inverted); - shape.isTrigger = trigger; - shape.rigidbodyIndex = source.Rigidbody != null ? source.Rigidbody.Handle.index : -1; + shape.flags = trigger ? 1 : 0; + shape.rigidbodyIndex = source.Rigidbody != null ? source.Rigidbody.handle.index : -1; shape.materialIndex = source.CollisionMaterial != null ? source.CollisionMaterial.handle.index : -1; - shape.forceZoneIndex = source.ForceZone != null ? source.ForceZone.Handle.index : -1; shape.contactOffset = source.Thickness; shape.dataIndex = handle.index; world.colliderShapes[index] = shape; @@ -71,8 +69,10 @@ namespace Obi{ // update transform: var trfm = world.colliderTransforms[index]; - trfm.FromTransform3D(source.transform, source.Rigidbody as ObiRigidbody); + trfm.FromTransform(source.transform); world.colliderTransforms[index] = trfm; + + return true; } public override void Destroy() diff --git a/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers3D/ObiMeshShapeTracker.cs b/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers3D/ObiMeshShapeTracker.cs index d9bb7dfc1..e3831d9d4 100644 --- a/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers3D/ObiMeshShapeTracker.cs +++ b/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers3D/ObiMeshShapeTracker.cs @@ -9,14 +9,6 @@ namespace Obi{ { ObiTriangleMeshHandle handle; - public Mesh targetMesh - { - get { - var mc = collider as MeshCollider; - return mc?.sharedMesh; - } - } - public ObiMeshShapeTracker(ObiCollider source, MeshCollider collider){ this.source = source; @@ -31,7 +23,7 @@ namespace Obi{ ObiColliderWorld.GetInstance().DestroyTriangleMesh(handle); } - public override void UpdateIfNeeded () + public override bool UpdateIfNeeded () { MeshCollider meshCollider = collider as MeshCollider; @@ -59,11 +51,9 @@ namespace Obi{ var shape = world.colliderShapes[index]; shape.type = ColliderShape.ShapeType.TriangleMesh; shape.filter = source.Filter; - shape.SetSign(source.Inverted); - shape.isTrigger = meshCollider.isTrigger; - shape.rigidbodyIndex = source.Rigidbody != null ? source.Rigidbody.Handle.index : -1; + shape.flags = meshCollider.isTrigger ? 1 : 0; + shape.rigidbodyIndex = source.Rigidbody != null ? source.Rigidbody.handle.index : -1; shape.materialIndex = source.CollisionMaterial != null ? source.CollisionMaterial.handle.index : -1; - shape.forceZoneIndex = source.ForceZone != null ? source.ForceZone.Handle.index : -1; shape.contactOffset = source.Thickness; shape.dataIndex = handle.index; world.colliderShapes[index] = shape; @@ -75,8 +65,10 @@ namespace Obi{ // update transform: var trfm = world.colliderTransforms[index]; - trfm.FromTransform3D(meshCollider.transform, source.Rigidbody as ObiRigidbody); + trfm.FromTransform(meshCollider.transform); world.colliderTransforms[index] = trfm; + + return true; } public override void Destroy() diff --git a/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers3D/ObiShapeTracker.cs b/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers3D/ObiShapeTracker.cs index 69bd4ba41..c3992da14 100644 --- a/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers3D/ObiShapeTracker.cs +++ b/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers3D/ObiShapeTracker.cs @@ -11,7 +11,7 @@ namespace Obi{ public virtual void Destroy(){ } - public abstract void UpdateIfNeeded (); + public abstract bool UpdateIfNeeded (); } diff --git a/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers3D/ObiSphereShapeTracker.cs b/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers3D/ObiSphereShapeTracker.cs index 3c1f59df1..ab4368c2f 100644 --- a/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers3D/ObiSphereShapeTracker.cs +++ b/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers3D/ObiSphereShapeTracker.cs @@ -12,37 +12,59 @@ namespace Obi{ this.collider = collider; } - public override void UpdateIfNeeded() + public override bool UpdateIfNeeded() { + SphereCollider sphere = collider as SphereCollider; - // retrieve collision world and index: - var world = ObiColliderWorld.GetInstance(); - int index = source.Handle.index; + // TODO: testing for changes here is not needed? all we do is set variables... + //if (sphere != null && (sphere.radius != radius || sphere.center != center)) + { + //radius = sphere.radius; + //center = sphere.center; - // update collider: - var shape = world.colliderShapes[index]; - shape.type = ColliderShape.ShapeType.Sphere; - shape.filter = source.Filter; - shape.SetSign(source.Inverted); - shape.isTrigger = sphere.isTrigger; - shape.rigidbodyIndex = source.Rigidbody != null ? source.Rigidbody.Handle.index : -1; - shape.materialIndex = source.CollisionMaterial != null ? source.CollisionMaterial.handle.index : -1; - shape.forceZoneIndex = source.ForceZone != null ? source.ForceZone.Handle.index : -1; - shape.contactOffset = source.Thickness; - shape.center = sphere.center; - shape.size = Vector3.one * sphere.radius; - world.colliderShapes[index] = shape; + // retrieve collision world and index: + var world = ObiColliderWorld.GetInstance(); + int index = source.Handle.index; - // update bounds: - var aabb = world.colliderAabbs[index]; - aabb.FromBounds(sphere.bounds, shape.contactOffset); - world.colliderAabbs[index] = aabb; + // update collider: + var shape = world.colliderShapes[index]; + shape.type = ColliderShape.ShapeType.Sphere; + shape.filter = source.Filter; + shape.flags = sphere.isTrigger ? 1 : 0; + shape.rigidbodyIndex = source.Rigidbody != null ? source.Rigidbody.handle.index : -1; + shape.materialIndex = source.CollisionMaterial != null ? source.CollisionMaterial.handle.index : -1; + shape.contactOffset = source.Thickness; + shape.center = sphere.center; + shape.size = Vector3.one * sphere.radius; + world.colliderShapes[index] = shape; - // update transform: - var trfm = world.colliderTransforms[index]; - trfm.FromTransform3D(sphere.transform, source.Rigidbody as ObiRigidbody); - world.colliderTransforms[index] = trfm; + // update bounds: + var aabb = world.colliderAabbs[index]; + aabb.FromBounds(sphere.bounds, shape.contactOffset); + world.colliderAabbs[index] = aabb; + + // update transform: + var trfm = world.colliderTransforms[index]; + trfm.FromTransform(sphere.transform); + world.colliderTransforms[index] = trfm; + + + /*var shape = source.colliderWorld.colliderShapes[source.shapeHandle.index]; + + // update the transform + shape.Set(collider as Collider, source.Phase, source.Thickness); + + // update the shape: + shape.SetSphere(sphere.center, sphere.radius); + + source.colliderWorld.colliderShapes[source.shapeHandle.index] = shape;*/ + + //adaptor.Set(center, radius); + //Oni.UpdateShape(oniShape,ref adaptor); + return true; + } + //return false; } } diff --git a/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers3D/ObiTerrainShapeTracker.cs b/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers3D/ObiTerrainShapeTracker.cs index 69619683f..ed3faed03 100644 --- a/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers3D/ObiTerrainShapeTracker.cs +++ b/Assets/Obi/Scripts/Common/Collisions/ColliderTrackers/Trackers3D/ObiTerrainShapeTracker.cs @@ -6,6 +6,7 @@ namespace Obi{ public class ObiTerrainShapeTracker : ObiShapeTracker { + private bool heightmapDataHasChanged = false; ObiHeightFieldHandle handle; public ObiTerrainShapeTracker(ObiCollider source, TerrainCollider collider){ @@ -19,7 +20,7 @@ namespace Obi{ ObiColliderWorld.GetInstance().DestroyHeightField(handle); } - public override void UpdateIfNeeded () + public override bool UpdateIfNeeded () { TerrainCollider terrain = collider as TerrainCollider; @@ -41,11 +42,9 @@ namespace Obi{ var shape = world.colliderShapes[index]; shape.type = ColliderShape.ShapeType.Heightmap; shape.filter = source.Filter; - shape.SetSign(source.Inverted); - shape.isTrigger = terrain.isTrigger; - shape.rigidbodyIndex = source.Rigidbody != null ? source.Rigidbody.Handle.index : -1; + shape.flags = terrain.isTrigger ? 1 : 0; + shape.rigidbodyIndex = source.Rigidbody != null ? source.Rigidbody.handle.index : -1; shape.materialIndex = source.CollisionMaterial != null ? source.CollisionMaterial.handle.index : -1; - shape.forceZoneIndex = source.ForceZone != null ? source.ForceZone.Handle.index : -1; shape.contactOffset = source.Thickness; shape.dataIndex = handle.index; shape.size = terrain.terrainData.size; @@ -59,8 +58,10 @@ namespace Obi{ // update transform: var trfm = world.colliderTransforms[index]; - trfm.FromTransform3D(terrain.transform, source.Rigidbody as ObiRigidbody); + trfm.FromTransform(terrain.transform); world.colliderTransforms[index] = trfm; + + return true; } public override void Destroy() diff --git a/Assets/Obi/Scripts/Common/Collisions/ObiCollider.cs b/Assets/Obi/Scripts/Common/Collisions/ObiCollider.cs index 71ad68ae9..13ead10b3 100644 --- a/Assets/Obi/Scripts/Common/Collisions/ObiCollider.cs +++ b/Assets/Obi/Scripts/Common/Collisions/ObiCollider.cs @@ -30,8 +30,9 @@ namespace Obi return; } - RemoveCollider(); m_SourceCollider = value; + + RemoveCollider(); AddCollider(); } diff --git a/Assets/Obi/Scripts/Common/Collisions/ObiColliderBase.cs b/Assets/Obi/Scripts/Common/Collisions/ObiColliderBase.cs index 76471cf39..7700c7bd8 100644 --- a/Assets/Obi/Scripts/Common/Collisions/ObiColliderBase.cs +++ b/Assets/Obi/Scripts/Common/Collisions/ObiColliderBase.cs @@ -13,9 +13,6 @@ namespace Obi [SerializeProperty("Thickness")] [SerializeField] private float thickness = 0; - [SerializeProperty("Inverted")] - [SerializeField] private bool inverted = false; - [SerializeProperty("CollisionMaterial")] [SerializeField] private ObiCollisionMaterial material; @@ -25,11 +22,7 @@ namespace Obi { set { - if (material != value) - { - material = value; - ForceUpdate(); - } + material = value; } get { return material; } } @@ -41,7 +34,7 @@ namespace Obi if (filter != value) { filter = value; - ForceUpdate(); + dirty = true; } } get { return filter; } @@ -54,25 +47,12 @@ namespace Obi if (!Mathf.Approximately(thickness, value)) { thickness = value; - ForceUpdate(); + dirty = true; } } get { return thickness; } } - public bool Inverted - { - set - { - if (inverted != value) - { - inverted = value; - ForceUpdate(); - } - } - get { return inverted; } - } - public ObiShapeTracker Tracker { get { return tracker; } @@ -88,9 +68,15 @@ namespace Obi } } - public ObiForceZone ForceZone + public IntPtr OniCollider { - get; set; + get + { + if (oniCollider == IntPtr.Zero) + FindSourceCollider(); + + return oniCollider; + } } public ObiRigidbodyBase Rigidbody @@ -99,8 +85,11 @@ namespace Obi } protected ObiColliderHandle shapeHandle; + + protected IntPtr oniCollider; protected ObiRigidbodyBase obiRigidbody; protected bool wasUnityColliderEnabled = true; + protected bool dirty = false; protected ObiShapeTracker tracker; /**< tracker object used to determine when to update the collider's shape*/ @@ -151,6 +140,7 @@ namespace Obi protected void AddCollider() { + Component unityCollider = GetUnityCollider(ref wasUnityColliderEnabled); if (unityCollider != null && (shapeHandle == null || !shapeHandle.isValid)) @@ -164,6 +154,7 @@ namespace Obi // Create rigidbody if necessary, and link ourselves to it: CreateRigidbody(); } + } protected void RemoveCollider() @@ -178,15 +169,6 @@ namespace Obi } } - /** - * Flags the collider as needing to be updated from now on. If the object it's on has any editor static flag enabled, - * the collider will be again flagged as *not* needing to be updated after its next update. - */ - public void ForceUpdate() - { - ObiColliderWorld.GetInstance().MarkColliderAsNeedingUpdate(shapeHandle); - } - /** * Check if the collider transform or its shape have changed any relevant property, and update their Oni counterparts. */ @@ -194,18 +176,14 @@ namespace Obi { bool unityColliderEnabled = false; Component unityCollider = GetUnityCollider(ref unityColliderEnabled); + var colliderWorld = ObiColliderWorld.GetInstance(); if (unityCollider != null) { - // Only if this object is not static: - if (tracker != null) //&& needsUpdate) - { + // no need to test for changes, all we are doing is setting some variables here. + if (tracker != null) tracker.UpdateIfNeeded(); - } - // check isStatic, *after* updating the tracker at least once. - if (unityCollider.gameObject.isStatic) - ObiColliderWorld.GetInstance().MarkColliderAsNotNeedingUpdate(shapeHandle); } // If the unity collider is null but its handle is valid, the unity collider has been destroyed. else if (shapeHandle != null && shapeHandle.isValid) diff --git a/Assets/Obi/Scripts/Common/Collisions/ObiColliderWorld.cs b/Assets/Obi/Scripts/Common/Collisions/ObiColliderWorld.cs index 0adbb9551..233c5818e 100644 --- a/Assets/Obi/Scripts/Common/Collisions/ObiColliderWorld.cs +++ b/Assets/Obi/Scripts/Common/Collisions/ObiColliderWorld.cs @@ -44,10 +44,6 @@ namespace Obi { public ObiColliderHandle(int index = -1) : base(index) { } } - public class ObiForceZoneHandle : ObiResourceHandle - { - public ObiForceZoneHandle(int index = -1) : base(index) { } - } public class ObiCollisionMaterialHandle : ObiResourceHandle { public ObiCollisionMaterialHandle(int index = -1) : base(index) { } @@ -57,6 +53,7 @@ namespace Obi public ObiRigidbodyHandle(int index = -1) : base(index) { } } + [ExecuteInEditMode] public class ObiColliderWorld { [NonSerialized] public List implementations; @@ -66,10 +63,7 @@ namespace Obi [NonSerialized] public ObiNativeAabbList colliderAabbs; // list of collider bounds. [NonSerialized] public ObiNativeAffineTransformList colliderTransforms; // list of collider transforms. - [NonSerialized] public List forceZoneHandles; // list of collider handles, used by ObiForceZone components to retrieve them. - [NonSerialized] public ObiNativeForceZoneList forceZones; // list of collider force zones. - - [NonSerialized] public List materialHandles; // list of material handles, used by ObiCollisionMaterial components to retrieve them. + [NonSerialized] public List materialHandles; [NonSerialized] public ObiNativeCollisionMaterialList collisionMaterials; // list of collision materials. [NonSerialized] public List rigidbodyHandles; // list of rigidbody handles, used by ObiRigidbody components to retrieve them. @@ -80,19 +74,6 @@ namespace Obi [NonSerialized] public ObiDistanceFieldContainer distanceFieldContainer; [NonSerialized] public ObiHeightFieldContainer heightFieldContainer; - private List collidersToCreate; - private List collidersToDestroy; - - private List forceZonesToCreate; - private List forceZonesToDestroy; - - private List rigidbodiesToCreate; - private List rigidbodiesToDestroy; - - public int collidersToUpdateCount { private set; get; } = 0; // amount of colliders that need to be updated. These are always grouped at the start of the collider arrays (handles, shapes, etc). - - private bool dirty = false; - private static ObiColliderWorld instance; public static ObiColliderWorld GetInstance() @@ -120,11 +101,6 @@ namespace Obi if (colliderTransforms == null) colliderTransforms = new ObiNativeAffineTransformList(); - if (forceZoneHandles == null) - forceZoneHandles = new List(); - if (forceZones == null) - forceZones = new ObiNativeForceZoneList(); - if (materialHandles == null) materialHandles = new List(); if (collisionMaterials == null) @@ -143,29 +119,13 @@ namespace Obi distanceFieldContainer = new ObiDistanceFieldContainer(); if (heightFieldContainer == null) heightFieldContainer = new ObiHeightFieldContainer(); - - if (collidersToCreate == null) - collidersToCreate = new List(); - if (collidersToDestroy == null) - collidersToDestroy = new List(); - - if (forceZonesToCreate == null) - forceZonesToCreate = new List(); - if (forceZonesToDestroy == null) - forceZonesToDestroy = new List(); - - if (rigidbodiesToCreate == null) - rigidbodiesToCreate = new List(); - if (rigidbodiesToDestroy == null) - rigidbodiesToDestroy = new List(); } private void Destroy() { - dirty = false; for (int i = 0; i < implementations.Count; ++i) { - implementations[i].SetColliders(colliderShapes, colliderAabbs, colliderTransforms); + implementations[i].SetColliders(colliderShapes, colliderAabbs, colliderTransforms, 0); implementations[i].UpdateWorld(0); } @@ -182,48 +142,41 @@ namespace Obi foreach (var handle in materialHandles) handle.Invalidate(); - if (forceZoneHandles != null) - foreach (var handle in forceZoneHandles) - handle.Invalidate(); - // Dispose of all lists: implementations = null; colliderHandles = null; rigidbodyHandles = null; materialHandles = null; - forceZoneHandles = null; - collidersToCreate = null; - collidersToDestroy = null; - forceZonesToCreate = null; - forceZonesToDestroy = null; - rigidbodiesToCreate = null; - rigidbodiesToDestroy = null; + if (colliderShapes != null) + colliderShapes.Dispose(); + if (colliderAabbs != null) + colliderAabbs.Dispose(); + if (colliderTransforms != null) + colliderTransforms.Dispose(); - colliderShapes?.Dispose(); - colliderAabbs?.Dispose(); - colliderTransforms?.Dispose(); - forceZones?.Dispose(); - collisionMaterials?.Dispose(); - rigidbodies?.Dispose(); + if (collisionMaterials != null) + collisionMaterials.Dispose(); - triangleMeshContainer?.Dispose(); - edgeMeshContainer?.Dispose(); - distanceFieldContainer?.Dispose(); - heightFieldContainer?.Dispose(); + if (rigidbodies != null) + rigidbodies.Dispose(); + + if (triangleMeshContainer != null) + triangleMeshContainer.Dispose(); + if (edgeMeshContainer != null) + edgeMeshContainer.Dispose(); + if (distanceFieldContainer != null) + distanceFieldContainer.Dispose(); + if (heightFieldContainer != null) + heightFieldContainer.Dispose(); instance = null; } private void DestroyIfUnused() { - // when there is no data and no implementations, the world gets destroyed. - // don't check materialHandles.Count == 0, as these are scriptable objects and may outlive the world. - if (colliderHandles.Count == 0 && - rigidbodyHandles.Count == 0 && - forceZoneHandles.Count == 0 && - implementations.Count == 0) - + // when there are no implementations and no colliders, the world gets destroyed. + if (colliderHandles.Count == 0 && rigidbodyHandles.Count == 0 && materialHandles.Count == 0 && implementations.Count == 0) Destroy(); } @@ -241,39 +194,22 @@ namespace Obi public ObiColliderHandle CreateCollider() { - var handle = new ObiColliderHandle(); + var handle = new ObiColliderHandle(colliderHandles.Count); + colliderHandles.Add(handle); - // in-editor, we create data right away since the simulation is not running. - if (!Application.isPlaying) - CreateColliderData(handle); - else - collidersToCreate.Add(handle); - - return handle; - } - - public ObiForceZoneHandle CreateForceZone() - { - var handle = new ObiForceZoneHandle(); - - // in-editor, we create data right away since the simulation is not running. - if (!Application.isPlaying) - CreateForceZoneData(handle); - else - forceZonesToCreate.Add(handle); + colliderShapes.Add(new ColliderShape() { materialIndex = -1, rigidbodyIndex = -1}); + colliderAabbs.Add(new Aabb()); + colliderTransforms.Add(new AffineTransform()); return handle; } public ObiRigidbodyHandle CreateRigidbody() { - var handle = new ObiRigidbodyHandle(); + var handle = new ObiRigidbodyHandle(rigidbodyHandles.Count); + rigidbodyHandles.Add(handle); - // in-editor, we create data right away since the simulation is not running. - if (!Application.isPlaying) - CreateRigidbodyData(handle); - else - rigidbodiesToCreate.Add(handle); + rigidbodies.Add(new ColliderRigidbody()); return handle; } @@ -330,41 +266,64 @@ namespace Obi public void DestroyCollider(ObiColliderHandle handle) { - // Destroy data right away if no simulation is running. - if (!Application.isPlaying || implementations.Count == 0) - DestroyColliderData(handle); - else + if (colliderShapes != null && handle != null && handle.isValid && handle.index < colliderHandles.Count) { - // In case the handle is in the creation queue, just remove it. - if (!collidersToCreate.Remove(handle)) - collidersToDestroy.Add(handle); - } - } + int index = handle.index; + int lastIndex = colliderHandles.Count - 1; - public void DestroyForceZone(ObiForceZoneHandle handle) - { - // Destroy data right away if no simulation is running. - if (!Application.isPlaying || implementations.Count == 0) - DestroyForceZoneData(handle); - else - { - // In case the handle is in the creation queue, just remove it. - if (!forceZonesToCreate.Remove(handle)) - forceZonesToDestroy.Add(handle); + // swap all collider info: + colliderHandles.Swap(index, lastIndex); + colliderShapes.Swap(index, lastIndex); + colliderAabbs.Swap(index, lastIndex); + colliderTransforms.Swap(index, lastIndex); + + // update the index of the handle we swapped with: + colliderHandles[index].index = index; + + // invalidate our handle: + // (after updating the swapped one! + // in case there's just one handle in the array, + // we need to write -1 after 0) + handle.Invalidate(); + + // remove last index: + colliderHandles.RemoveAt(lastIndex); + colliderShapes.count--; + colliderAabbs.count--; + colliderTransforms.count--; + + DestroyIfUnused(); } + } public void DestroyRigidbody(ObiRigidbodyHandle handle) { - // Destroy data right away if no simulation is running. - if (!Application.isPlaying || implementations.Count == 0) - DestroyRigidbodyData(handle); - else + if (rigidbodies != null && handle != null && handle.isValid && handle.index < rigidbodyHandles.Count) { - // In case the handle is in the creation queue, just remove it. - if (!rigidbodiesToCreate.Remove(handle)) - rigidbodiesToDestroy.Add(handle); + int index = handle.index; + int lastIndex = rigidbodyHandles.Count - 1; + + // swap all collider info: + rigidbodyHandles.Swap(index, lastIndex); + rigidbodies.Swap(index, lastIndex); + + // update the index of the handle we swapped with: + rigidbodyHandles[index].index = index; + + // invalidate our handle: + // (after updating the swapped one! + // in case there's just one handle in the array, + // we need to write -1 after 0) + handle.Invalidate(); + + // remove last index: + rigidbodyHandles.RemoveAt(lastIndex); + rigidbodies.count--; + + DestroyIfUnused(); } + } public void DestroyCollisionMaterial(ObiCollisionMaterialHandle handle) @@ -395,309 +354,80 @@ namespace Obi } } - private void DestroyColliderData (ObiColliderHandle handle) + public void UpdateColliders() { - if (colliderShapes != null && handle != null && handle.isValid && handle.index < colliderHandles.Count) - { - int index = handle.index; - int lastIndex = colliderHandles.Count - 1; - - // swap all collider info: - colliderHandles.Swap(index, lastIndex); - colliderShapes.Swap(index, lastIndex); - colliderAabbs.Swap(index, lastIndex); - colliderTransforms.Swap(index, lastIndex); - - // update the index of the handle we swapped with: - colliderHandles[index].index = index; - - // invalidate our handle: - // (after updating the swapped one! - // in case there's just one handle in the array, - // we need to write -1 after 0) - handle.Invalidate(); - - // remove last index: - colliderHandles.RemoveAt(lastIndex); - colliderShapes.count--; - colliderAabbs.count--; - colliderTransforms.count--; - - // force all colliders to update next frame, as the index of the data they reference - // (eg the mesh in a MeshCollider) may have changed as a result of deleting this collider's data. - collidersToUpdateCount = colliderHandles.Count; - - DestroyIfUnused(); - } - } - - private void DestroyForceZoneData(ObiForceZoneHandle handle) - { - if (forceZones != null && handle != null && handle.isValid && handle.index < forceZoneHandles.Count) - { - int index = handle.index; - int lastIndex = forceZoneHandles.Count - 1; - - // swap all force zone info: - forceZoneHandles.Swap(index, lastIndex); - forceZones.Swap(index, lastIndex); - - // update the index of the handle we swapped with: - forceZoneHandles[index].index = index; - - // invalidate our handle: - // (after updating the swapped one! - // in case there's just one handle in the array, - // we need to write -1 after 0) - handle.Invalidate(); - - // remove last index: - forceZoneHandles.RemoveAt(lastIndex); - forceZones.count--; - - DestroyIfUnused(); - } - } - - private void DestroyRigidbodyData(ObiRigidbodyHandle handle) - { - if (rigidbodies != null && handle != null && handle.isValid && handle.index < rigidbodyHandles.Count) - { - int index = handle.index; - int lastIndex = rigidbodyHandles.Count - 1; - - // swap all collider info: - rigidbodyHandles.Swap(index, lastIndex); - rigidbodies.Swap(index, lastIndex); - - // update the index of the handle we swapped with: - rigidbodyHandles[index].index = index; - - // invalidate our handle: - // (after updating the swapped one! - // in case there's just one handle in the array, - // we need to write -1 after 0) - handle.Invalidate(); - - // remove last index: - rigidbodyHandles.RemoveAt(lastIndex); - rigidbodies.count--; - - DestroyIfUnused(); - } - - } - - private void CreateColliderData(ObiColliderHandle handle) - { - handle.index = colliderHandles.Count; - colliderHandles.Add(handle); - colliderShapes.Add(new ColliderShape { materialIndex = -1, rigidbodyIndex = -1, dataIndex = -1 }); - colliderAabbs.Add(new Aabb()); - colliderTransforms.Add(new AffineTransform()); - - MarkColliderAsNeedingUpdate(handle); - } - - private void CreateForceZoneData(ObiForceZoneHandle handle) - { - handle.index = forceZoneHandles.Count; - forceZoneHandles.Add(handle); - forceZones.Add(new ForceZone()); - } - - private void CreateRigidbodyData(ObiRigidbodyHandle handle) - { - handle.index = rigidbodyHandles.Count; - rigidbodyHandles.Add(handle); - rigidbodies.Add(new ColliderRigidbody()); - } - - public bool DoesColliderRequireToBeUpdated(ObiColliderHandle handle) - { - if (handle != null && handle.isValid && - handle.index < colliderHandles.Count && handle.index < collidersToUpdateCount) - return true; - return false; - } - - public void MarkColliderAsNeedingUpdate(ObiColliderHandle handle) - { - if (colliderShapes != null && handle != null && handle.isValid && - handle.index < colliderHandles.Count && handle.index >= collidersToUpdateCount && - collidersToUpdateCount < colliderHandles.Count) - { - int index = handle.index; - int lastIndex = collidersToUpdateCount; - - // swap all collider info: - colliderHandles.Swap(index, lastIndex); - colliderShapes.Swap(index, lastIndex); - colliderAabbs.Swap(index, lastIndex); - colliderTransforms.Swap(index, lastIndex); - - // update handles: - colliderHandles[lastIndex].index = lastIndex; - colliderHandles[index].index = index; - - collidersToUpdateCount++; - } - } - - public void MarkColliderAsNotNeedingUpdate(ObiColliderHandle handle) - { - if (colliderShapes != null && handle != null && handle.isValid && - handle.index < colliderHandles.Count && handle.index < collidersToUpdateCount) - { - int index = handle.index; - int lastIndex = collidersToUpdateCount-1; - - // swap all collider info: - colliderHandles.Swap(index, lastIndex); - colliderShapes.Swap(index, lastIndex); - colliderAabbs.Swap(index, lastIndex); - colliderTransforms.Swap(index, lastIndex); - - // update handles: - colliderHandles[lastIndex].index = lastIndex; - colliderHandles[index].index = index; - - collidersToUpdateCount--; - } - } - - public void FlushHandleBuffers() - { - // First process destruction, then process creation. - // In case we create a handle and then destroy it, - // we should enqueue it for destruction only if it's not in the creation queue. - // If it is, just remove if from the creation queue. - - if (collidersToDestroy != null) - { - foreach (var handle in collidersToDestroy) - DestroyColliderData(handle); - collidersToDestroy?.Clear(); - } - - if (forceZonesToDestroy != null) - { - foreach (var handle in forceZonesToDestroy) - DestroyForceZoneData(handle); - forceZonesToDestroy?.Clear(); - } - - if (rigidbodiesToDestroy != null) - { - foreach (var handle in rigidbodiesToDestroy) - DestroyRigidbodyData(handle); - rigidbodiesToDestroy?.Clear(); - } - - if (collidersToCreate != null) - { - foreach (var handle in collidersToCreate) - CreateColliderData(handle); - collidersToCreate?.Clear(); - } - - if (forceZonesToCreate != null) - { - foreach (var handle in forceZonesToCreate) - CreateForceZoneData(handle); - forceZonesToCreate?.Clear(); - } - - if (rigidbodiesToCreate != null) - { - foreach (var handle in rigidbodiesToCreate) - CreateRigidbodyData(handle); - rigidbodiesToCreate?.Clear(); - } - - } - - public void UpdateWorld(float deltaTime, bool updateDynamics = true) - { - if (!dirty) - return; - - dirty = false; - - // ensure all objects have valid handles. - // May destroy the world if it's empty, - // so we next check that handle/implementations are not null. - FlushHandleBuffers(); - // update all colliders: - if (colliderHandles != null) - for (int i = 0; i < collidersToUpdateCount; ++i) - colliderHandles[i].owner.UpdateIfNeeded(); - - // update all force zones: - if (forceZoneHandles != null) - for (int i = 0; i < forceZoneHandles.Count; ++i) - forceZoneHandles[i].owner.UpdateIfNeeded(); - - // update rigidbodies: - if (rigidbodyHandles != null && updateDynamics) - for (int i = 0; i < rigidbodyHandles.Count; ++i) - rigidbodyHandles[i].owner.UpdateIfNeeded(deltaTime); - - // update implementations: - if (implementations != null) - for (int i = 0; i < implementations.Count; ++i) - { - if (implementations[i].referenceCount > 0) - { - // set arrays: - implementations[i].SetColliders(colliderShapes, colliderAabbs, colliderTransforms); - implementations[i].SetForceZones(forceZones); - implementations[i].SetRigidbodies(rigidbodies); - implementations[i].SetCollisionMaterials(collisionMaterials); - implementations[i].SetTriangleMeshData(triangleMeshContainer.headers, triangleMeshContainer.bihNodes, triangleMeshContainer.triangles, triangleMeshContainer.vertices); - implementations[i].SetEdgeMeshData(edgeMeshContainer.headers, edgeMeshContainer.bihNodes, edgeMeshContainer.edges, edgeMeshContainer.vertices); - implementations[i].SetDistanceFieldData(distanceFieldContainer.headers, distanceFieldContainer.dfNodes); - implementations[i].SetHeightFieldData(heightFieldContainer.headers, heightFieldContainer.samples); - - // update world implementation: - if (updateDynamics) - implementations[i].UpdateWorld(deltaTime); - } - } + for (int i = 0; i < colliderHandles.Count; ++i) + colliderHandles[i].owner.UpdateIfNeeded(); } - public void SetDirty() + public void UpdateRigidbodies(List solvers, float stepTime) { - dirty = true; - } - - public void UpdateCollisionMaterials() - { - if (implementations != null) - for (int i = 0; i < implementations.Count; ++i) - { - if (implementations[i].referenceCount > 0) - { - implementations[i].SetCollisionMaterials(collisionMaterials); - } - } - } - - public void UpdateRigidbodyVelocities(ObiSolver solver) - { - if (solver != null && solver.initialized) + // reset all solver's delta buffers to zero: + foreach (ObiSolver solver in solvers) { - int count = Mathf.Min(rigidbodyHandles.Count, solver.rigidbodyLinearDeltas.count); - - for (int i = 0; i < count; ++i) - rigidbodyHandles[i].owner.UpdateVelocities(solver.rigidbodyLinearDeltas[i], solver.rigidbodyAngularDeltas[i]); + if (solver != null && solver.initialized) + { + solver.EnsureRigidbodyArraysCapacity(rigidbodyHandles.Count); + solver.rigidbodyLinearDeltas.WipeToZero(); + solver.rigidbodyAngularDeltas.WipeToZero(); + } } - solver.rigidbodyLinearDeltas.WipeToZero(); - solver.rigidbodyAngularDeltas.WipeToZero(); - solver.rigidbodyLinearDeltas.Upload(); - solver.rigidbodyAngularDeltas.Upload(); + for (int i = 0; i < rigidbodyHandles.Count; ++i) + rigidbodyHandles[i].owner.UpdateIfNeeded(stepTime); + } + + public void UpdateWorld(float deltaTime) + { + for (int i = 0; i < implementations.Count; ++i) + { + if (implementations[i].referenceCount > 0) + { + // set arrays: + implementations[i].SetColliders(colliderShapes, colliderAabbs, colliderTransforms, colliderShapes.count); + implementations[i].SetRigidbodies(rigidbodies); + implementations[i].SetCollisionMaterials(collisionMaterials); + implementations[i].SetTriangleMeshData(triangleMeshContainer.headers, triangleMeshContainer.bihNodes, triangleMeshContainer.triangles, triangleMeshContainer.vertices); + implementations[i].SetEdgeMeshData(edgeMeshContainer.headers, edgeMeshContainer.bihNodes, edgeMeshContainer.edges, edgeMeshContainer.vertices); + implementations[i].SetDistanceFieldData(distanceFieldContainer.headers, distanceFieldContainer.dfNodes); + implementations[i].SetHeightFieldData(heightFieldContainer.headers, heightFieldContainer.samples); + + // update world implementation: + implementations[i].UpdateWorld(deltaTime); + } + } + } + + public void UpdateRigidbodyVelocities(List solvers) + { + int count = 0; + foreach (ObiSolver solver in solvers) + if (solver != null && solver.initialized) count++; + + if (count > 0) + { + // we want to average the deltas applied by all solvers, so calculate 1/solverCount. + float rcpCount = 1.0f / count; + + for (int i = 0; i < rigidbodyHandles.Count; ++i) + { + Vector4 linearDelta = Vector4.zero; + Vector4 angularDelta = Vector4.zero; + + foreach (ObiSolver solver in solvers) + { + if (solver != null && solver.initialized) + { + linearDelta += solver.rigidbodyLinearDeltas[i] * rcpCount; + angularDelta += solver.rigidbodyAngularDeltas[i] * rcpCount; + } + } + + // update rigidbody velocities + rigidbodyHandles[i].owner.UpdateVelocities(linearDelta, angularDelta); + } + } } } diff --git a/Assets/Obi/Scripts/Common/Collisions/ObiCollisionMaterial.cs b/Assets/Obi/Scripts/Common/Collisions/ObiCollisionMaterial.cs index 97940be21..b20a92eb4 100644 --- a/Assets/Obi/Scripts/Common/Collisions/ObiCollisionMaterial.cs +++ b/Assets/Obi/Scripts/Common/Collisions/ObiCollisionMaterial.cs @@ -36,17 +36,17 @@ namespace Obi{ } } - private void OnEnable() + public void OnEnable() { UpdateMaterial(); } - private void OnDisable() + public void OnDisable() { ObiColliderWorld.GetInstance().DestroyCollisionMaterial(materialHandle); } - private void OnValidate() + public void OnValidate() { // we can't create GameObjects in OnValidate(), so make sure the colliderworld already exists. UpdateMaterial(); diff --git a/Assets/Obi/Scripts/Common/Collisions/ObiRigidbody.cs b/Assets/Obi/Scripts/Common/Collisions/ObiRigidbody.cs index 468af6d74..0896b6524 100644 --- a/Assets/Obi/Scripts/Common/Collisions/ObiRigidbody.cs +++ b/Assets/Obi/Scripts/Common/Collisions/ObiRigidbody.cs @@ -2,16 +2,17 @@ using System; using System.Collections; -namespace Obi{ +namespace Obi +{ - /** + /** * Small helper class that lets you specify Obi-only properties for rigidbodies. */ - [ExecuteInEditMode] - [RequireComponent(typeof(Rigidbody))] - public class ObiRigidbody : ObiRigidbodyBase - { + [ExecuteInEditMode] + [RequireComponent(typeof(Rigidbody))] + public class ObiRigidbody : ObiRigidbodyBase + { public Rigidbody unityRigidbody { get; private set; } public Vector3 position => unityRigidbody.position; @@ -23,26 +24,22 @@ namespace Obi{ private Quaternion prevRotation; private Vector3 prevPosition; - protected override void OnEnable() - { - unityRigidbody = GetComponent(); - ResetPosition(); - base.OnEnable(); - } - - public void ResetPosition() + public override void OnEnable() { + unityRigidbody = GetComponent(); prevPosition = unityRigidbody.position; prevRotation = unityRigidbody.rotation; + linearVelocity = unityRigidbody.linearVelocity; angularVelocity = unityRigidbody.angularVelocity; + base.OnEnable(); } - private void CacheVelocities(float stepTime) + private void UpdateVelocities(float stepTime) { // differentiate positions/orientations to get our own velocites for kinematic objects. - // also useful for animations. - if (unityRigidbody.isKinematic && stepTime > 0) + // when calling Physics.Simulate, MovePosition/Rotation do not work correctly. Also useful for animations. + if (unityRigidbody.isKinematic) { // differentiate positions to obtain linear velocity: linearVelocity = (unityRigidbody.position - prevPosition) / stepTime; @@ -62,31 +59,21 @@ namespace Obi{ prevRotation = unityRigidbody.rotation; } - public override void UpdateIfNeeded(float stepTime) + public override void UpdateIfNeeded(float stepTime) { - // Rigidbody might not exist, as rigidbody deletion is buffered. - // This means the unity rigidbody might be deleted before the rigidbody handle is invalidated. - // Conversely, rigidbodyHandle might be non-null but invalid. - if (unityRigidbody == null || !Handle.isValid) return; - - - CacheVelocities(stepTime); + UpdateVelocities(stepTime); var world = ObiColliderWorld.GetInstance(); - var rb = world.rigidbodies[Handle.index]; + var rb = world.rigidbodies[handle.index]; rb.FromRigidbody(this); - world.rigidbodies[Handle.index] = rb; + world.rigidbodies[handle.index] = rb; } - /** + /** * Reads velocities back from the solver. */ - public override void UpdateVelocities(Vector3 linearDelta, Vector3 angularDelta) + public override void UpdateVelocities(Vector3 linearDelta, Vector3 angularDelta) { - // Rigidbody might not exist, as rigidbody deletion is buffered. - // This means the unity rigidbody might be deleted before the rigidbody handle is invalidated. - if (unityRigidbody == null) return; - // kinematic rigidbodies are passed to Obi with zero velocity, so we must ignore the new velocities calculated by the solver: if (Application.isPlaying && !(unityRigidbody.isKinematic || kinematicForParticles)) { @@ -97,6 +84,6 @@ namespace Obi{ } } } - } + } } diff --git a/Assets/Obi/Scripts/Common/Collisions/ObiRigidbody2D.cs b/Assets/Obi/Scripts/Common/Collisions/ObiRigidbody2D.cs index 5f453fb06..6e831e839 100644 --- a/Assets/Obi/Scripts/Common/Collisions/ObiRigidbody2D.cs +++ b/Assets/Obi/Scripts/Common/Collisions/ObiRigidbody2D.cs @@ -2,16 +2,17 @@ using System; using System.Collections; -namespace Obi{ +namespace Obi +{ - /** + /** * Small helper class that lets you specify Obi-only properties for rigidbodies. */ - [ExecuteInEditMode] - [RequireComponent(typeof(Rigidbody2D))] - public class ObiRigidbody2D : ObiRigidbodyBase - { + [ExecuteInEditMode] + [RequireComponent(typeof(Rigidbody2D))] + public class ObiRigidbody2D : ObiRigidbodyBase + { public Rigidbody2D unityRigidbody { get; private set; } public Vector2 position => unityRigidbody.position; @@ -23,26 +24,22 @@ namespace Obi{ private Quaternion prevRotation; private Vector3 prevPosition; - protected override void OnEnable() + public override void OnEnable() { unityRigidbody = GetComponent(); - ResetPosition(); + prevPosition = transform.position; + prevRotation = transform.rotation; + + linearVelocity = unityRigidbody.linearVelocity; + angularVelocity = unityRigidbody.angularVelocity; base.OnEnable(); } - public void ResetPosition() - { - prevPosition = unityRigidbody.position; - prevRotation = Quaternion.AngleAxis(unityRigidbody.rotation, Vector3.forward); - linearVelocity = unityRigidbody.linearVelocity; - angularVelocity = unityRigidbody.angularVelocity; - } - - private void CacheVelocities(float stepTime) + private void UpdateKinematicVelocities(float stepTime) { // differentiate positions/orientations to get our own velocites for kinematic objects. // when calling Physics.Simulate, MovePosition/Rotation do not work correctly. Also useful for animations. - if (unityRigidbody.isKinematic && stepTime > 0) + if (unityRigidbody.isKinematic) { // differentiate positions to obtain linear velocity: linearVelocity = (transform.position - prevPosition) / stepTime; @@ -64,35 +61,27 @@ namespace Obi{ public override void UpdateIfNeeded(float stepTime) { - // Rigidbody might not exist, as rigidbody deletion is buffered. - // This means the unity rigidbody might be deleted before the rigidbody handle is invalidated. - if (unityRigidbody == null) return; - - CacheVelocities(stepTime); + UpdateKinematicVelocities(stepTime); var world = ObiColliderWorld.GetInstance(); - var rb = world.rigidbodies[Handle.index]; + var rb = world.rigidbodies[handle.index]; rb.FromRigidbody(this); - world.rigidbodies[Handle.index] = rb; + world.rigidbodies[handle.index] = rb; } - /** + /** * Reads velocities back from the solver. */ - public override void UpdateVelocities(Vector3 linearDelta, Vector3 angularDelta) + public override void UpdateVelocities(Vector3 linearDelta, Vector3 angularDelta) { - // Rigidbody might not exist, as rigidbody deletion is buffered. - // This means the unity rigidbody might be deleted before the rigidbody handle is invalidated. - if (unityRigidbody == null) return; - // kinematic rigidbodies are passed to Obi with zero velocity, so we must ignore the new velocities calculated by the solver: if (Application.isPlaying && !(unityRigidbody.isKinematic || kinematicForParticles)) { - unityRigidbody.linearVelocity += new Vector2(linearDelta.x, linearDelta.y); - unityRigidbody.angularVelocity += angularDelta[2] * Mathf.Rad2Deg; - } + unityRigidbody.linearVelocity += new Vector2(linearDelta.x, linearDelta.y); + unityRigidbody.angularVelocity += angularDelta[2] * Mathf.Rad2Deg; + } - } - } + } + } } diff --git a/Assets/Obi/Scripts/Common/Collisions/ObiRigidbodyBase.cs b/Assets/Obi/Scripts/Common/Collisions/ObiRigidbodyBase.cs index c08d54b5f..69cbef4f5 100644 --- a/Assets/Obi/Scripts/Common/Collisions/ObiRigidbodyBase.cs +++ b/Assets/Obi/Scripts/Common/Collisions/ObiRigidbodyBase.cs @@ -5,45 +5,28 @@ using System.Collections; namespace Obi{ - /** + /** * Small helper class that lets you specify Obi-only properties for rigidbodies. */ - [ExecuteInEditMode] - public abstract class ObiRigidbodyBase : MonoBehaviour - { + [ExecuteInEditMode] + public abstract class ObiRigidbodyBase : MonoBehaviour + { public bool kinematicForParticles = false; - protected ObiRigidbodyHandle rigidbodyHandle; - public ObiRigidbodyHandle Handle - { - get - { - // don't check rigidbodyHandle.isValid: - // CreateRigidbody may defer creation, so we get a non-null, but invalid handle. - // If calling handle again right away before it becomes valid, it will call CreateRigidbody() again and create a second handle to the same body. - if (rigidbodyHandle == null) - { - var world = ObiColliderWorld.GetInstance(); + public ObiRigidbodyHandle handle; - // create the material: - rigidbodyHandle = world.CreateRigidbody(); - rigidbodyHandle.owner = this; - } - return rigidbodyHandle; - } - } - - protected virtual void OnEnable() + public virtual void OnEnable() { - rigidbodyHandle = ObiColliderWorld.GetInstance().CreateRigidbody(); - rigidbodyHandle.owner = this; + handle = ObiColliderWorld.GetInstance().CreateRigidbody(); + handle.owner = this; + UpdateIfNeeded(1); } public void OnDisable() { - ObiColliderWorld.GetInstance().DestroyRigidbody(rigidbodyHandle); + ObiColliderWorld.GetInstance().DestroyRigidbody(handle); } public abstract void UpdateIfNeeded(float stepTime); diff --git a/Assets/Obi/Scripts/Common/Collisions/ObiTriangleMeshContainer.cs b/Assets/Obi/Scripts/Common/Collisions/ObiTriangleMeshContainer.cs index 3858bc697..1fa9f41d0 100644 --- a/Assets/Obi/Scripts/Common/Collisions/ObiTriangleMeshContainer.cs +++ b/Assets/Obi/Scripts/Common/Collisions/ObiTriangleMeshContainer.cs @@ -76,38 +76,30 @@ namespace Obi ObiTriangleMeshHandle handle = new ObiTriangleMeshHandle(null); if (source != null && !handles.TryGetValue(source, out handle)) - { - if (source.isReadable) + { + var sourceTris = source.triangles; + var sourceVertices = source.vertices; + + // Build a bounding interval hierarchy from the triangles: + IBounded[] t = new IBounded[sourceTris.Length/3]; + for (int i = 0; i < t.Length; ++i) { - var sourceTris = source.triangles; - var sourceVertices = source.vertices; - - // Build a bounding interval hierarchy from the triangles: - IBounded[] t = new IBounded[sourceTris.Length / 3]; - for (int i = 0; i < t.Length; ++i) - { - int t1 = sourceTris[i * 3]; - int t2 = sourceTris[i * 3 + 1]; - int t3 = sourceTris[i * 3 + 2]; - t[i] = new Triangle(t1, t2, t3, sourceVertices[t1], sourceVertices[t2], sourceVertices[t3]); - } - var sourceBih = BIH.Build(ref t); - - Triangle[] tris = Array.ConvertAll(t, x => (Triangle)x); - - handle = new ObiTriangleMeshHandle(source, headers.count); - handles.Add(source, handle); - - headers.Add(new TriangleMeshHeader(bihNodes.count, sourceBih.Length, triangles.count, tris.Length, vertices.count, sourceVertices.Length)); - bihNodes.AddRange(sourceBih); - triangles.AddRange(tris); - vertices.AddRange(sourceVertices); - } - else - { - handle = new ObiTriangleMeshHandle(source); - handles.Add(source, handle); + int t1 = sourceTris[i * 3]; + int t2 = sourceTris[i * 3 + 1]; + int t3 = sourceTris[i * 3 + 2]; + t[i] = new Triangle(t1,t2,t3, sourceVertices[t1], sourceVertices[t2], sourceVertices[t3]); } + var sourceBih = BIH.Build(ref t); + + Triangle[] tris = Array.ConvertAll(t, x => (Triangle)x); + + handle = new ObiTriangleMeshHandle(source, headers.count); + handles.Add(source, handle); + headers.Add(new TriangleMeshHeader(bihNodes.count, sourceBih.Length, triangles.count, tris.Length, vertices.count, sourceVertices.Length)); + + bihNodes.AddRange(sourceBih); + triangles.AddRange(tris); + vertices.AddRange(sourceVertices); } return handle; diff --git a/Assets/Obi/Scripts/Common/DataStructures/ASDF/DFNode.cs b/Assets/Obi/Scripts/Common/DataStructures/ASDF/DFNode.cs index 31892a9e4..0121d6fc0 100644 --- a/Assets/Obi/Scripts/Common/DataStructures/ASDF/DFNode.cs +++ b/Assets/Obi/Scripts/Common/DataStructures/ASDF/DFNode.cs @@ -1,4 +1,5 @@ using System; +using System.Runtime.InteropServices; using UnityEngine; namespace Obi @@ -12,11 +13,9 @@ namespace Obi public int firstChild; // add 12 bytes of padding to ensure correct memory alignment: -#pragma warning disable 0414 private int pad0; private int pad1; private int pad2; -#pragma warning restore 0414 public DFNode(Vector4 center) { diff --git a/Assets/Obi/Scripts/Common/DataStructures/AffineTransform.cs b/Assets/Obi/Scripts/Common/DataStructures/AffineTransform.cs index e129482e5..6c8fa5f6e 100644 --- a/Assets/Obi/Scripts/Common/DataStructures/AffineTransform.cs +++ b/Assets/Obi/Scripts/Common/DataStructures/AffineTransform.cs @@ -1,5 +1,4 @@ -using System; -using UnityEngine; +using UnityEngine; namespace Obi { @@ -20,46 +19,16 @@ namespace Obi this.scale = scale; } - public void FromTransform3D(Transform source, ObiRigidbody rb) + public void FromTransform(Transform source, bool is2D = false) { - if (rb != null && rb.unityRigidbody != null) - { - translation = source.position - rb.unityRigidbody.transform.position + rb.position; - rotation = (source.rotation * Quaternion.Inverse(rb.unityRigidbody.transform.rotation)) * rb.rotation; - } - else - { - translation = source.position; - rotation = source.rotation; - } - + translation = source.position; + rotation = source.rotation; scale = source.lossyScale; - } - public void FromTransform2D(Transform source, ObiRigidbody2D rb) - { - if (rb != null && rb.unityRigidbody != null) + if (is2D) { - translation = source.position - rb.unityRigidbody.transform.position + (Vector3)rb.position; - rotation = (source.rotation * Quaternion.Inverse(rb.unityRigidbody.transform.rotation)) * Quaternion.AngleAxis(rb.rotation, Vector3.forward); + translation[2] = 0; } - else - { - translation = source.position; - rotation = source.rotation; - } - - scale = source.lossyScale; - translation[2] = 0; - } - - public AffineTransform Inverse() - { - var conj = Quaternion.Inverse(rotation); - var invScale = new Vector3(1 / scale.x, 1 / scale.y, 1 / scale.z); - return new AffineTransform(conj * Vector3.Scale(translation , -invScale), - conj, - invScale); } } } diff --git a/Assets/Obi/Scripts/Common/DataStructures/ColliderRigidbody.cs b/Assets/Obi/Scripts/Common/DataStructures/ColliderRigidbody.cs index e51423f4a..10126adc9 100644 --- a/Assets/Obi/Scripts/Common/DataStructures/ColliderRigidbody.cs +++ b/Assets/Obi/Scripts/Common/DataStructures/ColliderRigidbody.cs @@ -10,8 +10,8 @@ namespace Obi public Vector4 angularVelocity; public Vector4 com; public float inverseMass; - - public int constraintCount; + + private int pad0; private int pad1; private int pad2; @@ -20,7 +20,7 @@ namespace Obi bool kinematic = !Application.isPlaying || rb.unityRigidbody.isKinematic || rb.kinematicForParticles; //rotation = source.rotation; - velocity = rb.kinematicForParticles ? Vector3.zero : rb.linearVelocity + (rb.unityRigidbody.useGravity ? Physics.gravity * Time.fixedDeltaTime : Vector3.zero); + velocity = rb.kinematicForParticles ? Vector3.zero : rb.linearVelocity; angularVelocity = rb.kinematicForParticles ? Vector3.zero : rb.angularVelocity; // center of mass in unity is affected by local rotation and position, but not scale. We need it expressed in world space: diff --git a/Assets/Obi/Scripts/Common/DataStructures/ColliderShape.cs b/Assets/Obi/Scripts/Common/DataStructures/ColliderShape.cs index f71030e2d..70ab4cdc9 100644 --- a/Assets/Obi/Scripts/Common/DataStructures/ColliderShape.cs +++ b/Assets/Obi/Scripts/Common/DataStructures/ColliderShape.cs @@ -22,34 +22,13 @@ namespace Obi heightmap: width (x axis), height (y axis) and depth (z axis) in world units.*/ public ShapeType type; public float contactOffset; + public int dataIndex; public int rigidbodyIndex; // index of the associated rigidbody in the collision world. public int materialIndex; // index of the associated material in the collision world. - public int forceZoneIndex; // index of the associated force zone in the collision world. + public int filter; // bitwise category/mask. - public int flags; // first bit whether the collider is 2D (1) or 3D (0), second bit whether it's a trigger (1) or regular collider (0), - // third bit (sign) determines whether shape is inverted or not. - - public bool is2D - { - get => (flags & 1) != 0; - set => flags |= value ? 1 : 0; - } - public bool isTrigger - { - get => ((flags & 1 << 1) != 0) || forceZoneIndex >= 0; - set => flags |= value ? 1 << 1 : 0; - } - public float sign - { - get => (flags & 1 << 2) != 0 ? -1 : 1; - } - - public void SetSign(bool inverted) - { - if (inverted) flags |= 1 << 2; - else flags &= ~(1 << 2); - } - + public int flags; // for now, only used for trigger (1) or regular collider (0). + public int is2D; // whether the collider is 2D (1) or 3D (0). } } diff --git a/Assets/Obi/Scripts/Common/DataStructures/CollisionMaterial.cs b/Assets/Obi/Scripts/Common/DataStructures/CollisionMaterial.cs index f0c815d5b..082f99c67 100644 --- a/Assets/Obi/Scripts/Common/DataStructures/CollisionMaterial.cs +++ b/Assets/Obi/Scripts/Common/DataStructures/CollisionMaterial.cs @@ -1,10 +1,9 @@ using UnityEngine; using System.Collections; -using System.Runtime.InteropServices; namespace Obi { - [StructLayout(LayoutKind.Sequential)] + public struct CollisionMaterial { public float dynamicFriction; diff --git a/Assets/Obi/Scripts/Common/DataStructures/ContactEffectiveMasses.cs b/Assets/Obi/Scripts/Common/DataStructures/ContactEffectiveMasses.cs deleted file mode 100644 index 1f3a8d208..000000000 --- a/Assets/Obi/Scripts/Common/DataStructures/ContactEffectiveMasses.cs +++ /dev/null @@ -1,93 +0,0 @@ -#if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) -using Unity.Mathematics; -#endif - -namespace Obi -{ - public struct ContactEffectiveMasses - { - public float normalInvMassA; - public float tangentInvMassA; - public float bitangentInvMassA; - - public float normalInvMassB; - public float tangentInvMassB; - public float bitangentInvMassB; - - public float TotalNormalInvMass => normalInvMassA + normalInvMassB; - public float TotalTangentInvMass => tangentInvMassA + tangentInvMassB; - public float TotalBitangentInvMass => bitangentInvMassA + bitangentInvMassB; - - public void ClearContactMassesA() - { - normalInvMassA = tangentInvMassA = bitangentInvMassA = 0; - } - - public void ClearContactMassesB() - { - normalInvMassB = tangentInvMassB = bitangentInvMassB = 0; - } - - #if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) - public void CalculateContactMassesA(float invMass, - float4 inverseInertiaTensor, - float4 position, - quaternion orientation, - float4 contactPoint, - float4 normal, - float4 tangent, - float4 bitangent, - bool rollingContacts) - { - // initialize inverse linear masses: - normalInvMassA = tangentInvMassA = bitangentInvMassA = invMass; - - if (rollingContacts) - { - float4 rA = contactPoint - position; - float4x4 solverInertiaA = BurstMath.TransformInertiaTensor(inverseInertiaTensor, orientation); - - normalInvMassA += BurstMath.RotationalInvMass(solverInertiaA, rA, normal); - tangentInvMassA += BurstMath.RotationalInvMass(solverInertiaA, rA, tangent); - bitangentInvMassA += BurstMath.RotationalInvMass(solverInertiaA, rA, bitangent); - } - } - - public void CalculateContactMassesB(float invMass, - float4 inverseInertiaTensor, - float4 position, - quaternion orientation, - float4 contactPoint, - float4 normal, - float4 tangent, - float4 bitangent, - bool rollingContacts) - { - // initialize inverse linear masses: - normalInvMassB = tangentInvMassB = bitangentInvMassB = invMass; - - if (rollingContacts) - { - float4 rB = contactPoint - position; - float4x4 solverInertiaB = BurstMath.TransformInertiaTensor(inverseInertiaTensor, orientation); - - normalInvMassB += BurstMath.RotationalInvMass(solverInertiaB, rB, normal); - tangentInvMassB += BurstMath.RotationalInvMass(solverInertiaB, rB, tangent); - bitangentInvMassB += BurstMath.RotationalInvMass(solverInertiaB, rB, bitangent); - } - } - - - public void CalculateContactMassesB(in BurstRigidbody rigidbody, in BurstAffineTransform solver2World, float4 pointB, float4 normal, float4 tangent, float4 bitangent) - { - float4 rB = solver2World.TransformPoint(pointB) - rigidbody.com; - - // initialize inverse linear masses: - normalInvMassB = tangentInvMassB = bitangentInvMassB = rigidbody.inverseMass; - normalInvMassB += BurstMath.RotationalInvMass(rigidbody.inverseInertiaTensor, rB, normal); - tangentInvMassB += BurstMath.RotationalInvMass(rigidbody.inverseInertiaTensor, rB, tangent); - bitangentInvMassB += BurstMath.RotationalInvMass(rigidbody.inverseInertiaTensor, rB, bitangent); - } - #endif - } -} diff --git a/Assets/Obi/Scripts/Common/DataStructures/ContactEffectiveMasses.cs.meta b/Assets/Obi/Scripts/Common/DataStructures/ContactEffectiveMasses.cs.meta deleted file mode 100644 index bf8ca76fc..000000000 --- a/Assets/Obi/Scripts/Common/DataStructures/ContactEffectiveMasses.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7b11c7db3414246668eb72ef55dd737f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/DataStructures/EmitPoint.cs b/Assets/Obi/Scripts/Common/DataStructures/EmitPoint.cs deleted file mode 100644 index dfa50f31a..000000000 --- a/Assets/Obi/Scripts/Common/DataStructures/EmitPoint.cs +++ /dev/null @@ -1,40 +0,0 @@ -using UnityEngine; -using System; - -namespace Obi -{ - [Serializable] - public struct EmitPoint - { - public Vector4 position; - public Vector4 direction; - public Vector4 velocity; - public Color color; - - public EmitPoint(Vector3 position, Vector3 direction) - { - this.position = position; - this.direction = direction; - this.velocity = Vector4.zero; - this.color = Color.white; - } - - public EmitPoint(Vector3 position, Vector3 direction, Color color) - { - this.position = position; - this.direction = direction; - this.velocity = Vector4.zero; - this.color = color; - } - - public EmitPoint GetTransformed(Matrix4x4 transform, Matrix4x4 prevTransform, Color multiplyColor, float deltaTime) - { - var ep = new EmitPoint(transform.MultiplyPoint3x4(position), - transform.MultiplyVector(direction), - color * multiplyColor); - - ep.velocity = deltaTime > 0 ? ((Vector3)ep.position - prevTransform.MultiplyPoint3x4(position)) / deltaTime : Vector3.zero; - return ep; - } - } -} \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/DataStructures/EmitPoint.cs.meta b/Assets/Obi/Scripts/Common/DataStructures/EmitPoint.cs.meta deleted file mode 100644 index cc9dd0484..000000000 --- a/Assets/Obi/Scripts/Common/DataStructures/EmitPoint.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d0c9d9016e8744477adde7f1afe28798 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/DataStructures/EmittedParticleData.cs b/Assets/Obi/Scripts/Common/DataStructures/EmittedParticleData.cs deleted file mode 100644 index 9cf3c3e32..000000000 --- a/Assets/Obi/Scripts/Common/DataStructures/EmittedParticleData.cs +++ /dev/null @@ -1,16 +0,0 @@ -using UnityEngine; - -namespace Obi -{ - public struct EmittedParticleData - { - public Vector4 fluidMaterial; - public Vector4 fluidMaterial2; - public Vector4 fluidInterface; - public Vector4 userData; - public int phase; - public float invMass; - public float radius; - public float volume; - } -} \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/DataStructures/EmittedParticleData.cs.meta b/Assets/Obi/Scripts/Common/DataStructures/EmittedParticleData.cs.meta deleted file mode 100644 index d57c77842..000000000 --- a/Assets/Obi/Scripts/Common/DataStructures/EmittedParticleData.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 032673eb10713468fb72d04ad5cc6b26 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/DataStructures/ForceZone.cs b/Assets/Obi/Scripts/Common/DataStructures/ForceZone.cs deleted file mode 100644 index f2bcd63cf..000000000 --- a/Assets/Obi/Scripts/Common/DataStructures/ForceZone.cs +++ /dev/null @@ -1,41 +0,0 @@ -using UnityEngine; -using System; - -namespace Obi -{ - [Serializable] - public struct ForceZone - { - public enum ForceMode - { - Force, - Acceleration, - Wind, - } - - public enum ZoneType - { - Directional, - Radial, - Vortex, - Void - } - - public enum DampingDirection - { - All, // damps motion in all directions - ForceDirection, // damps motion in the direction of force. - SurfaceDirection // damps motion toward/away from the surface of the zone. - } - - public Color color; - public ZoneType type; - public ForceMode mode; - public DampingDirection dampingDir; - public float intensity; - public float minDistance; - public float maxDistance; - public float falloffPower; - public float damping; - } -} diff --git a/Assets/Obi/Scripts/Common/DataStructures/ForceZone.cs.meta b/Assets/Obi/Scripts/Common/DataStructures/ForceZone.cs.meta deleted file mode 100644 index f39f401cb..000000000 --- a/Assets/Obi/Scripts/Common/DataStructures/ForceZone.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5c189f8dc8ade4e14a960f3b6eb11f14 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/DataStructures/InertialFrame.cs b/Assets/Obi/Scripts/Common/DataStructures/InertialFrame.cs deleted file mode 100644 index 4f2561f92..000000000 --- a/Assets/Obi/Scripts/Common/DataStructures/InertialFrame.cs +++ /dev/null @@ -1,56 +0,0 @@ -using UnityEngine; - -namespace Obi -{ - public struct InertialFrame - { - public AffineTransform frame; - public AffineTransform prevFrame; - - public Vector4 velocity; - public Vector4 angularVelocity; - - public Vector4 acceleration; - public Vector4 angularAcceleration; - - public InertialFrame(Vector4 position, Vector4 scale, Quaternion rotation) - { - this.frame = new AffineTransform(position, rotation, scale); - this.prevFrame = frame; - - velocity = Vector4.zero; - angularVelocity = Vector4.zero; - acceleration = Vector4.zero; - angularAcceleration = Vector4.zero; - } - - public InertialFrame(AffineTransform frame) - { - this.frame = frame; - this.prevFrame = frame; - - velocity = Vector4.zero; - angularVelocity = Vector4.zero; - acceleration = Vector4.zero; - angularAcceleration = Vector4.zero; - } - - public void Update(Vector4 position, Vector4 scale, Quaternion rotation, float dt) - { - prevFrame = frame; - Vector4 prevVelocity = velocity; - Vector4 prevAngularVelocity = angularVelocity; - - frame.translation = position; - frame.rotation = rotation; - frame.scale = scale; - - velocity = ObiIntegration.DifferentiateLinear(frame.translation, prevFrame.translation, dt); - angularVelocity = ObiIntegration.DifferentiateAngular(frame.rotation, prevFrame.rotation, dt); - - acceleration = ObiIntegration.DifferentiateLinear(velocity, prevVelocity, dt); - angularAcceleration = ObiIntegration.DifferentiateLinear(angularVelocity, prevAngularVelocity, dt); - } - - } -} \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/DataStructures/InertialFrame.cs.meta b/Assets/Obi/Scripts/Common/DataStructures/InertialFrame.cs.meta deleted file mode 100644 index 56b8e9239..000000000 --- a/Assets/Obi/Scripts/Common/DataStructures/InertialFrame.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7420f38eb63f04112a965d884f75d176 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeColorList.cs b/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeColorList.cs index 94e9cef26..c6a61babf 100644 --- a/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeColorList.cs +++ b/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeColorList.cs @@ -12,6 +12,11 @@ namespace Obi for (int i = 0; i < capacity; ++i) this[i] = Color.white; } + public ObiNativeColorList(int capacity, int alignment, Color defaultValue) : base(capacity, alignment) + { + for (int i = 0; i < capacity; ++i) + this[i] = defaultValue; + } } } diff --git a/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeColorList.cs.meta b/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeColorList.cs.meta index eb41d0f72..23dc2862c 100644 --- a/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeColorList.cs.meta +++ b/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeColorList.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: f377d76dadb3945b39cfac818a54d1be +guid: 391ffe5ba25364d2393afabc3083daa1 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeContactList.cs b/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeContactList.cs deleted file mode 100644 index 339b196dd..000000000 --- a/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeContactList.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using UnityEngine; - -namespace Obi -{ - [Serializable] - public class ObiNativeContactList : ObiNativeList - { - public ObiNativeContactList() { } - public ObiNativeContactList(int capacity = 8, int alignment = 16) : base(capacity, alignment) - { - for (int i = 0; i < capacity; ++i) - this[i] = new Oni.Contact(); - } - } -} - diff --git a/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeContactList.cs.meta b/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeContactList.cs.meta deleted file mode 100644 index 74a33c11c..000000000 --- a/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeContactList.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: aa58238d45b934704aede27415ce4242 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeContactShapeList.cs b/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeContactShapeList.cs new file mode 100644 index 000000000..d5ff11583 --- /dev/null +++ b/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeContactShapeList.cs @@ -0,0 +1,17 @@ +using System; +using UnityEngine; + +namespace Obi +{ + [Serializable] + public class ObiNativeContactShapeList : ObiNativeList + { + public ObiNativeContactShapeList() { } + public ObiNativeContactShapeList(int capacity = 8, int alignment = 16) : base(capacity, alignment) + { + for (int i = 0; i < capacity; ++i) + this[i] = new Oni.Contact(); + } + } +} + diff --git a/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeContactShapeList.cs.meta b/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeContactShapeList.cs.meta new file mode 100644 index 000000000..ab5d80836 --- /dev/null +++ b/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeContactShapeList.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5ac88e1dd7e0249b5b361d60655d8d88 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeEffectiveMassesList.cs b/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeEffectiveMassesList.cs deleted file mode 100644 index 974f9f32a..000000000 --- a/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeEffectiveMassesList.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using UnityEngine; - -namespace Obi -{ - [Serializable] - public class ObiNativeEffectiveMassesList : ObiNativeList - { - public ObiNativeEffectiveMassesList() { } - public ObiNativeEffectiveMassesList(int capacity = 8, int alignment = 16) : base(capacity, alignment) - { - for (int i = 0; i < capacity; ++i) - this[i] = new ContactEffectiveMasses(); - } - } -} - diff --git a/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeEffectiveMassesList.cs.meta b/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeEffectiveMassesList.cs.meta deleted file mode 100644 index 813424cbf..000000000 --- a/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeEffectiveMassesList.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: fc8b00cd716564eff82fc19de0c458a8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeEmitPointList.cs b/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeEmitPointList.cs deleted file mode 100644 index 39abfa12b..000000000 --- a/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeEmitPointList.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; - -namespace Obi -{ - [Serializable] - public class ObiNativeEmitPointList : ObiNativeList - { - public ObiNativeEmitPointList() { } - public ObiNativeEmitPointList(int capacity = 8, int alignment = 16) : base(capacity, alignment) - { - for (int i = 0; i < capacity; ++i) - this[i] = new EmitPoint(); - } - - } -} - diff --git a/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeEmitPointList.cs.meta b/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeEmitPointList.cs.meta deleted file mode 100644 index 13c552e66..000000000 --- a/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeEmitPointList.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3cbd83091221b46c9a724f3275281d2e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeForceZoneList.cs b/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeForceZoneList.cs deleted file mode 100644 index 442146f1d..000000000 --- a/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeForceZoneList.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using UnityEngine; - -namespace Obi -{ - [Serializable] - public class ObiNativeForceZoneList : ObiNativeList - { - public ObiNativeForceZoneList() { } - public ObiNativeForceZoneList(int capacity = 8, int alignment = 16) : base(capacity, alignment) - { - for (int i = 0; i < capacity; ++i) - this[i] = new ForceZone(); - } - - } -} - diff --git a/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeForceZoneList.cs.meta b/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeForceZoneList.cs.meta deleted file mode 100644 index 65b36912d..000000000 --- a/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeForceZoneList.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2815feee105f648149e0f5b1b22954bf -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeInt4List.cs b/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeInt4List.cs index 81d9d0692..c18c1821f 100644 --- a/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeInt4List.cs +++ b/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeInt4List.cs @@ -1,4 +1,5 @@ using System; +using UnityEngine; namespace Obi { diff --git a/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeIntList.cs b/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeIntList.cs index 63bf45700..9b2704cbc 100644 --- a/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeIntList.cs +++ b/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeIntList.cs @@ -1,4 +1,5 @@ using System; +using UnityEngine; namespace Obi { diff --git a/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeList.cs b/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeList.cs index 24b4ce45e..4d27307a7 100644 --- a/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeList.cs +++ b/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeList.cs @@ -5,12 +5,10 @@ using UnityEngine; using Unity.Collections; using Unity.Collections.LowLevel.Unsafe; using System.Collections; -using UnityEngine.Rendering; -using System.Linq; namespace Obi { - public unsafe class ObiNativeList : IEnumerable, IDisposable, ISerializationCallbackReceiver where T : struct + public unsafe abstract class ObiNativeList : IEnumerable, IDisposable, ISerializationCallbackReceiver where T : struct { public T[] serializedContents; protected void* m_AlignedPtr = null; @@ -23,13 +21,7 @@ namespace Obi #if ENABLE_UNITY_COLLECTIONS_CHECKS protected AtomicSafetyHandle m_SafetyHandle; #endif - - protected GraphicsBuffer.Target m_ComputeBufferType; - protected GraphicsBuffer m_ComputeBuffer; - protected GraphicsBuffer m_CountBuffer; // used to hold the counter value in case m_ComputeBufferType is Counter. - protected bool computeBufferDirty = false; - protected AsyncGPUReadbackRequest m_AsyncRequest; - protected AsyncGPUReadbackRequest m_CounterAsyncRequest; + protected ComputeBuffer m_ComputeBuffer; public int count { @@ -41,9 +33,6 @@ namespace Obi // we first ensure we can hold the previous count, and then set the new one. EnsureCapacity(m_Count); m_Count = Mathf.Min(m_Capacity, value); - - if (m_ComputeBuffer != null && m_ComputeBuffer.IsValid() && m_ComputeBufferType == GraphicsBuffer.Target.Counter) - m_ComputeBuffer.SetCounterValue((uint)m_Count); } } get { return m_Count; } @@ -51,61 +40,37 @@ namespace Obi public int capacity { + set + { + if (value != m_Capacity) + ChangeCapacity(value); + } get { return m_Capacity; } } - public int stride - { - get { return m_Stride; } - } - public bool isCreated { get { return m_AlignedPtr != null; } } - public bool noReadbackInFlight - { - get { return m_AsyncRequest.done && (m_ComputeBufferType != GraphicsBuffer.Target.Counter || m_CounterAsyncRequest.done); } - } - - // Returns the current compute buffer representation of this list. Will return null if AsComputeBuffer() hasn't been called yet, - // or if the list has been disposed of. - public GraphicsBuffer computeBuffer - { - get { return m_ComputeBuffer; } - } - public T this[int index] { get { -#if ENABLE_UNITY_COLLECTIONS_CHECKS - if (index < 0 || index >= m_Capacity) - { - throw new IndexOutOfRangeException($"Reading from index {index} is out of range of '{m_Capacity}' Capacity."); - } -#endif return UnsafeUtility.ReadArrayElementWithStride(m_AlignedPtr, index, m_Stride); } set { -#if ENABLE_UNITY_COLLECTIONS_CHECKS - if (index < 0 || index >= m_Capacity) - { - throw new IndexOutOfRangeException($"Writing to index {index} is out of range of '{m_Capacity}' Capacity."); - } -#endif UnsafeUtility.WriteArrayElementWithStride(m_AlignedPtr, index, m_Stride, value); - computeBufferDirty = true; + + if (m_ComputeBuffer != null) + m_ComputeBuffer.SetData(AsNativeArray(), index, index, 1); } } // Declare parameterless constructor, called by Unity upon deserialization. protected ObiNativeList() { - m_Stride = UnsafeUtility.SizeOf(); - #if ENABLE_UNITY_COLLECTIONS_CHECKS m_SafetyHandle = AtomicSafetyHandle.Create(); #endif @@ -113,8 +78,6 @@ namespace Obi public ObiNativeList(int capacity = 8, int alignment = 16) { - m_Stride = UnsafeUtility.SizeOf(); - #if ENABLE_UNITY_COLLECTIONS_CHECKS m_SafetyHandle = AtomicSafetyHandle.Create(); #endif @@ -129,21 +92,24 @@ namespace Obi protected void Dispose(bool disposing) { - DisposeOfComputeBuffer(); - if (isCreated) { + + // dispose of compuse buffer representation: + if (m_ComputeBuffer != null) + { + m_ComputeBuffer.Dispose(); + } + // free unmanaged memory buffer: UnsafeUtility.Free(m_AlignedPtr, Allocator.Persistent); m_AlignedPtr = null; - m_Count = m_Capacity = 0; - -#if ENABLE_UNITY_COLLECTIONS_CHECKS - // dispose of atomic safety handle: - AtomicSafetyHandle.CheckDeallocateAndThrow(m_SafetyHandle); - AtomicSafetyHandle.Release(m_SafetyHandle); -#endif } +#if ENABLE_UNITY_COLLECTIONS_CHECKS + // dispose of atomic safety handle: + AtomicSafetyHandle.CheckDeallocateAndThrow(m_SafetyHandle); + AtomicSafetyHandle.Release(m_SafetyHandle); +#endif } public void Dispose() @@ -151,26 +117,6 @@ namespace Obi Dispose(true); } - public void DisposeOfComputeBuffer() - { - // dispose of compute buffer representation: - if (m_ComputeBuffer != null) - { - // if there's any pending async readback, finalize it. - // otherwise we pull the rug from under the readbacks' feet and that's no good. - WaitForReadback(); - - m_ComputeBuffer.Dispose(); - m_ComputeBuffer = null; - } - - if (m_CountBuffer != null) - { - m_CountBuffer.Dispose(); - m_CountBuffer = null; - } - } - public void OnBeforeSerialize() { if (isCreated) @@ -215,144 +161,38 @@ namespace Obi return AsNativeArray(m_Count); } - public NativeArray AsNativeArray() - { - return AsNativeArray(m_Count); - } - - // Reinterprets the data in the list as a native array of the given length, up to the list's capacity. + // Reinterprets the data in the list as a native array. public NativeArray AsNativeArray(int arrayLength) where U : struct { unsafe { - NativeArray array = NativeArrayUnsafeUtility.ConvertExistingDataToNativeArray(m_AlignedPtr, Mathf.Min(arrayLength, m_Capacity), Allocator.None); + NativeArray array = NativeArrayUnsafeUtility.ConvertExistingDataToNativeArray(m_AlignedPtr, arrayLength, Allocator.None); #if ENABLE_UNITY_COLLECTIONS_CHECKS NativeArrayUnsafeUtility.SetAtomicSafetyHandle(ref array, m_SafetyHandle); #endif - // assume the NativeArray will write new data, so we'll need to update the computeBuffer upon Upload(). - computeBufferDirty = true; return array; } } - // Reinterprets the data in the list as a compute buffer, in case of an empty list it returns a buffer of size 1 with uninitialized content. - public GraphicsBuffer SafeAsComputeBuffer(GraphicsBuffer.Target bufferType = GraphicsBuffer.Target.Structured) where U : struct + // Reinterprets the data in the list as a compute buffer. Note: This also calls AsNativeArray() internally, to be able to pass the raw pointer to the compute buffer + public ComputeBuffer AsComputeBuffer() where U : struct { - return AsComputeBuffer(Mathf.Max(1,m_Count), bufferType); - } - - // Reinterprets the data in the list as a compute buffer. - public GraphicsBuffer AsComputeBuffer(GraphicsBuffer.Target bufferType = GraphicsBuffer.Target.Structured) where U : struct - { - return AsComputeBuffer(m_Count, bufferType); - } - - // Reinterprets the data in the list as a compute buffer of the given length. Returns null if the list is empty. - public GraphicsBuffer AsComputeBuffer(int arrayLength, GraphicsBuffer.Target bufferType = GraphicsBuffer.Target.Structured) where U : struct - { - DisposeOfComputeBuffer(); - - if (arrayLength > 0) - { - m_ComputeBufferType = bufferType; - m_ComputeBuffer = new GraphicsBuffer(bufferType, arrayLength, UnsafeUtility.SizeOf()); - m_ComputeBuffer.SetData(AsNativeArray(arrayLength)); - - if (bufferType == GraphicsBuffer.Target.Counter) - { - // initialize count to zero, since counter buffers always start empty: - m_Count = 0; - m_ComputeBuffer.SetCounterValue((uint)m_Count); - m_CountBuffer = new GraphicsBuffer(GraphicsBuffer.Target.IndirectArguments, 1, 4); - GraphicsBuffer.CopyCount(m_ComputeBuffer, m_CountBuffer, 0); - } - - return m_ComputeBuffer; - } - return null; - } - - // Kicks a GPU readback request, to bring compute buffer data to this list. - public void Readback(int readcount, bool async) where U : struct - { - if (m_ComputeBuffer != null && m_ComputeBuffer.IsValid() && noReadbackInFlight) - { - var nativeArray = AsNativeArray(readcount); - - // When using SafeAsComputeBuffer, we'll get a compute buffer of size 1 even if the list (and the NativeArray) is empty. - // Guard against trying to readback into a smaller NativeArray. Also guard against requesting zero items. - if (nativeArray.Length >= readcount && readcount > 0) - m_AsyncRequest = AsyncGPUReadback.RequestIntoNativeArray(ref nativeArray, m_ComputeBuffer, readcount * UnsafeUtility.SizeOf(), 0); - - // For counter buffers, request the counter value too: - if (m_ComputeBufferType == GraphicsBuffer.Target.Counter) - { - GraphicsBuffer.CopyCount(m_ComputeBuffer, m_CountBuffer, 0); - m_CounterAsyncRequest = AsyncGPUReadback.Request(m_CountBuffer, m_CountBuffer.stride, 0, (AsyncGPUReadbackRequest request)=> - { - if (!request.hasError) - m_Count = Mathf.Min(m_Capacity, request.GetData()[0]); - }); - } - - if (!async) - WaitForReadback(); - } - } - - public void Readback(bool async = true) - { - // On counter buffers, we shouldn't read data up to m_Count and then update m_Count with the compute buffer's counter value *afterwards*. - // This would lead to reading back less data than we should, so we need to request the entire compute buffer. if (m_ComputeBuffer != null) - Readback(m_ComputeBuffer.count, async); - } - - public void Readback(int readcount ,bool async = true) - { - Readback(readcount, async); - } - - // Makes sure any pending changes by the CPU are sent to the GPU. - // If the list data has been changed on the CPU since the last time Unmap() was called and there's a compute buffer associated to it, - // will write the current contents of the list to the compute buffer. - public void Upload(int length, bool force = false) where U : struct - { - if ((computeBufferDirty || force) && m_ComputeBuffer != null && m_ComputeBuffer.IsValid()) - m_ComputeBuffer.SetData(AsNativeArray(length)); - - computeBufferDirty = false; - } - - public void Upload(bool force = false) - { - Upload(m_Count,force); - } - - public void UploadFullCapacity() - { - Upload(m_Capacity, true); - } - - // Waits for the last readback request to be complete, this brings back data from the GPU to the CPU: - public void WaitForReadback() - { - if (isCreated) { - m_AsyncRequest.WaitForCompletion(); - m_CounterAsyncRequest.WaitForCompletion(); + m_ComputeBuffer.Dispose(); } + + m_ComputeBuffer = new ComputeBuffer(m_Count, m_Stride); + m_ComputeBuffer.SetData(AsNativeArray()); + return m_ComputeBuffer; } protected void ChangeCapacity(int newCapacity) { - // invalidate compute buffer: - DisposeOfComputeBuffer(); - // allocate a new buffer: m_Stride = UnsafeUtility.SizeOf(); - var newAlignedPtr = UnsafeUtility.Malloc(newCapacity * m_Stride, m_AlignBytes, Allocator.Persistent); + var newAlignedPtr = UnsafeUtility.Malloc(newCapacity * m_Stride, 16, Allocator.Persistent); // if there was a previous allocation: if (isCreated) @@ -409,45 +249,7 @@ namespace Obi void* sourceAddress = source.AddressOfElement(sourceIndex); void* destAddress = AddressOfElement(destIndex); UnsafeUtility.MemCpy(destAddress, sourceAddress, length * m_Stride); - } - public void CopyFrom(NativeArray source, int sourceIndex, int destIndex, int length) where U : struct - { - if (!isCreated || !source.IsCreated || UnsafeUtility.SizeOf() != m_Stride) - throw new ArgumentNullException(); - - if (length <= 0 || source.Length == 0) - return; - - if (sourceIndex >= source.Length || sourceIndex < 0 || destIndex >= m_Count || destIndex < 0 || - sourceIndex + length > source.Length || destIndex + length > m_Count) - throw new ArgumentOutOfRangeException(); - - void* sourceAddress = (byte*)source.GetUnsafePtr() + sourceIndex * m_Stride; - void* destAddress = AddressOfElement(destIndex); - UnsafeUtility.MemCpy(destAddress, sourceAddress, length * m_Stride); - } - - public void CopyFrom(T[] source, int sourceIndex, int destIndex, int length) - { - if (source == null || !isCreated) - throw new ArgumentNullException(); - - if (length <= 0 || source.Length == 0) - return; - - if (sourceIndex < 0 || destIndex < 0 || - sourceIndex + length > source.Length || destIndex + length > m_Count) - throw new ArgumentOutOfRangeException(); - - // pin the managed array and get its address: - ulong sourceHandle; - void* sourceAddress = UnsafeUtility.PinGCArrayAndGetDataAddress(source, out sourceHandle); - void* destAddress = UnsafeUtility.AddressOf(ref UnsafeUtility.ArrayElementAsRef(m_AlignedPtr, destIndex)); - UnsafeUtility.MemCpy(destAddress, sourceAddress, length * m_Stride); - - // unpin the managed array: - UnsafeUtility.ReleaseGCObject(sourceHandle); } public void CopyReplicate(T value, int destIndex, int length) @@ -491,53 +293,9 @@ namespace Obi public void Add(T item) { EnsureCapacity(m_Count + 1); - computeBufferDirty = true; this[m_Count++] = item; } - public void AddReplicate(T value, int times) - { - int appendAt = m_Count; - ResizeUninitialized(m_Count + times); - CopyReplicate(value, appendAt, times); - } - - public void AddRange(T[] array) - { - AddRange(array, array.Length); - } - - public void AddRange(T[] array, int length) - { - AddRange(array, 0, length); - } - - public void AddRange(T[] array, int start, int length) - { - int appendAt = m_Count; - ResizeUninitialized(m_Count + length); - CopyFrom(array, start, appendAt, length); - } - - public void AddRange(ObiNativeList array, int length) - { - int appendAt = m_Count; - ResizeUninitialized(m_Count + length); - CopyFrom(array, 0, appendAt, length); - } - - public void AddRange(ObiNativeList array, int start, int length) - { - int appendAt = m_Count; - ResizeUninitialized(m_Count + length); - CopyFrom(array, start, appendAt, length); - } - - public void AddRange(ObiNativeList array) - { - AddRange(array, array.count); - } - public void AddRange(IEnumerable enumerable) { ICollection collection = enumerable as ICollection; @@ -585,9 +343,7 @@ namespace Obi { newCount = Mathf.Max(0, newCount); bool realloc = EnsureCapacity(newCount); - m_Count = newCount; - return realloc; } @@ -625,25 +381,7 @@ namespace Obi unsafe { if (isCreated) - { UnsafeUtility.MemClear(m_AlignedPtr, count * m_Stride); - - computeBufferDirty = true; - } - } - } - - public void WipeToValue(T value) - { - unsafe - { - if (isCreated) - { - void* sourceAddress = UnsafeUtility.AddressOf(ref value); - UnsafeUtility.MemCpyReplicate(m_AlignedPtr, sourceAddress, m_Stride, count); - - computeBufferDirty = true; - } } } @@ -665,14 +403,10 @@ namespace Obi public void* AddressOfElement(int index) { + // UnsafeUtility.AddressOf(ref UnsafeUtilityEx.ArrayElementAsRef(m_AlignedPtr, m_Count)); return (void*) ((byte*)m_AlignedPtr + m_Stride * index); } - public NativeReference GetCountReference(Allocator alloc) - { - return new NativeReference(m_Count, alloc); - } - public IntPtr GetIntPtr() { if (isCreated) diff --git a/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeMatrix4x4List.cs b/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeMatrix4x4List.cs index 64cffb4d9..32d189542 100644 --- a/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeMatrix4x4List.cs +++ b/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeMatrix4x4List.cs @@ -6,18 +6,11 @@ namespace Obi [Serializable] public class ObiNativeMatrix4x4List : ObiNativeList { - public ObiNativeMatrix4x4List() { } // TODO: WTF???? why does this prevent a crash? public ObiNativeMatrix4x4List(int capacity = 8, int alignment = 16) : base(capacity, alignment) { for (int i = 0; i < capacity; ++i) this[i] = Matrix4x4.identity; } - - public ObiNativeMatrix4x4List(int capacity, int alignment, Matrix4x4 defaultValue) : base(capacity, alignment) - { - for (int i = 0; i < capacity; ++i) - this[i] = defaultValue; - } } } diff --git a/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeMatrix4x4List.cs.meta b/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeMatrix4x4List.cs.meta index c90054257..8e6aebecc 100644 --- a/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeMatrix4x4List.cs.meta +++ b/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeMatrix4x4List.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 57e079b439b8f4d71966919ca4fa4838 +guid: f6b7295a6ebb4475fb050c4c5b3770cc MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeUIntList.cs b/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeUIntList.cs deleted file mode 100644 index 542f40f3a..000000000 --- a/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeUIntList.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using UnityEngine; - -namespace Obi -{ - [Serializable] - public class ObiNativeUIntList : ObiNativeList - { - - public ObiNativeUIntList(int capacity = 8, int alignment = 16) : base(capacity, alignment) - { - for (int i = 0; i < capacity; ++i) - this[i] = 0; - } - - } -} - diff --git a/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeUIntList.cs.meta b/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeUIntList.cs.meta deleted file mode 100644 index b6f26ce34..000000000 --- a/Assets/Obi/Scripts/Common/DataStructures/NativeList/ObiNativeUIntList.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: cee276900c5ce412aafe4e23112537eb -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/DataStructures/ObiList.cs b/Assets/Obi/Scripts/Common/DataStructures/ObiList.cs index 6c7b86aa2..0a44ef0d7 100644 --- a/Assets/Obi/Scripts/Common/DataStructures/ObiList.cs +++ b/Assets/Obi/Scripts/Common/DataStructures/ObiList.cs @@ -110,7 +110,7 @@ namespace Obi EnsureCapacity(++count); - for (int i = count-1; i > index; --i) + for (int i = count-1; i > index; ++i) { data[i] = data[i-1]; } diff --git a/Assets/Obi/Scripts/Common/DataStructures/Queries/QueryResult.cs b/Assets/Obi/Scripts/Common/DataStructures/Queries/QueryResult.cs index 72245ed7e..d165b565c 100644 --- a/Assets/Obi/Scripts/Common/DataStructures/Queries/QueryResult.cs +++ b/Assets/Obi/Scripts/Common/DataStructures/Queries/QueryResult.cs @@ -6,12 +6,11 @@ namespace Obi [StructLayout(LayoutKind.Sequential, Size = 64)] public struct QueryResult { - public Vector4 simplexBary; /**< Barycentric coords of nearest point in simplex */ - public Vector4 queryPoint; /**< Nearest point in query shape*/ - public Vector4 normal; /**< Closest direction between simplex and query shape. */ - public float distance; /**< Distance between simplex and query shape.*/ - public float distanceAlongRay; /**< For ray queries, distance along the ray.*/ - public int simplexIndex; /**< Index of the simplex in the solver.*/ - public int queryIndex; /**< Index of the query that spawned this result.*/ + public Vector4 simplexBary; /**< Barycentric coords of nearest point in simplex */ + public Vector4 queryPoint; /**< Nearest point in query shape*/ + public Vector4 normal; /**< Closest direction between simplex and query shape. */ + public float distance; /**< Distance between simplex and query shape.*/ + public int simplexIndex; /**< Index of the simplex in the solver.*/ + public int queryIndex; /**< Index of the query that spawned this result.*/ } } diff --git a/Assets/Obi/Scripts/Common/DataStructures/RegularGrid.meta b/Assets/Obi/Scripts/Common/DataStructures/RegularGrid.meta deleted file mode 100644 index c9ad98ff6..000000000 --- a/Assets/Obi/Scripts/Common/DataStructures/RegularGrid.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 2c4a05fed09dd4e9e9d346fa3f1ccd55 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/DataStructures/RegularGrid/RegularGrid.cs b/Assets/Obi/Scripts/Common/DataStructures/RegularGrid/RegularGrid.cs deleted file mode 100644 index 5b92932f2..000000000 --- a/Assets/Obi/Scripts/Common/DataStructures/RegularGrid/RegularGrid.cs +++ /dev/null @@ -1,106 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine; - -namespace Obi -{ - public class RegularGrid - { - private Dictionary> gridMap = new Dictionary>(); - private float cellSize; - private Func getPosition; - - public RegularGrid(float cellSize, Func getPosition) - { - this.cellSize = cellSize; - - if (getPosition != null) - this.getPosition = getPosition; - else - getPosition = (x) => { return Vector3.zero; }; - } - - public Vector3Int GetCellCoords(Vector3 pos) - { - return new Vector3Int(Mathf.FloorToInt(pos.x / cellSize), - Mathf.FloorToInt(pos.y / cellSize), - Mathf.FloorToInt(pos.z / cellSize)); - } - - public void AddElement(T elm) - { - var coords = GetCellCoords(getPosition(elm)); - if (gridMap.TryGetValue(coords, out List cell)) - cell.Add(elm); - else - gridMap[coords] = new List { elm }; - } - - public bool RemoveElement(T elm) - { - var coords = GetCellCoords(getPosition(elm)); - if (gridMap.TryGetValue(coords, out List cell)) - { - return cell.Remove(elm); - } - return false; - } - - public IEnumerable GetNeighborsEnumerator(T elm) - { - // if cells are infinitesimaly small, - // elements should have no neighbors. - if (cellSize < ObiUtils.epsilon) - yield break; - - var position = getPosition(elm); - var coords = GetCellCoords(position); - List cell; - - for (int x = -1; x <= 1; ++x) - for (int y = -1; y <= 1; ++y) - for (int z = -1; z <= 1; ++z) - { - if (gridMap.TryGetValue(coords + new Vector3Int(x,y,z), out cell)) - { - foreach(T n in cell) - { - if (n.Equals(elm)) - continue; - - float dist = Vector3.Distance(position, getPosition(n)); - if (dist <= cellSize) - yield return n; - } - } - } - } - - // TODO: single call passing position and element to ignore. - public IEnumerable GetNeighborsEnumerator(Vector3 position) - { - // if cells are infinitesimaly small, - // elements should have no neighbors. - if (cellSize < ObiUtils.epsilon) - yield break; - - var coords = GetCellCoords(position); - List cell; - - for (int x = -1; x <= 1; ++x) - for (int y = -1; y <= 1; ++y) - for (int z = -1; z <= 1; ++z) - { - if (gridMap.TryGetValue(coords + new Vector3Int(x, y, z), out cell)) - { - foreach (T n in cell) - { - float dist = Vector3.Distance(position, getPosition(n)); - if (dist <= cellSize) - yield return n; - } - } - } - } - } -} diff --git a/Assets/Obi/Scripts/Common/DataStructures/RegularGrid/RegularGrid.cs.meta b/Assets/Obi/Scripts/Common/DataStructures/RegularGrid/RegularGrid.cs.meta deleted file mode 100644 index 96fcea3bc..000000000 --- a/Assets/Obi/Scripts/Common/DataStructures/RegularGrid/RegularGrid.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9506e58093a7c491f944e8e74529bf74 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/DataStructures/SimplexCounts.cs b/Assets/Obi/Scripts/Common/DataStructures/SimplexCounts.cs index f2adcf1e4..c9b8e2be0 100644 --- a/Assets/Obi/Scripts/Common/DataStructures/SimplexCounts.cs +++ b/Assets/Obi/Scripts/Common/DataStructures/SimplexCounts.cs @@ -24,20 +24,21 @@ namespace Obi public int GetSimplexStartAndSize(int index, out int size) { - if (index < triangleCount) + if (index < pointCount) { - size = 3; - return index * 3; + size = 1; + return index; } - else if (index < triangleCount + edgeCount) + else if (index < pointCount + edgeCount) { size = 2; - return triangleCount * 3 + (index - triangleCount) * 2; + return pointCount + (index - pointCount) * 2; } else if (index < simplexCount) { - size = 1; - return triangleCount * 3 + edgeCount * 2 + (index - triangleCount - edgeCount); + size = 3; + int triStart = pointCount + edgeCount * 2; + return triStart + (index - pointCount - edgeCount) * 3; } size = 0; return 0; diff --git a/Assets/Obi/Scripts/Common/DataStructures/VInt4.cs b/Assets/Obi/Scripts/Common/DataStructures/VInt4.cs index c0f3bc17e..49a11bdf7 100644 --- a/Assets/Obi/Scripts/Common/DataStructures/VInt4.cs +++ b/Assets/Obi/Scripts/Common/DataStructures/VInt4.cs @@ -1,11 +1,8 @@ -using System; +using UnityEngine; +using System; +using System.Collections; using System.Runtime.InteropServices; -#if (OBI_MATHEMATICS) -using Unity.Mathematics; -#endif - - namespace Obi { [Serializable] @@ -32,10 +29,5 @@ namespace Obi this.z = x; this.w = x; } - -#if (OBI_MATHEMATICS) - public static implicit operator VInt4(int4 i) => new VInt4(i.x, i.y, i.z, i.w); - public static implicit operator int4(VInt4 i) => new int4(i.x, i.y, i.z, i.w); -#endif } } diff --git a/Assets/Obi/Scripts/Common/DataStructures/Voxelization/MeshVoxelizer.cs b/Assets/Obi/Scripts/Common/DataStructures/Voxelization/MeshVoxelizer.cs index 5caa44552..c8224bfe9 100644 --- a/Assets/Obi/Scripts/Common/DataStructures/Voxelization/MeshVoxelizer.cs +++ b/Assets/Obi/Scripts/Common/DataStructures/Voxelization/MeshVoxelizer.cs @@ -80,7 +80,7 @@ namespace Obi }; public readonly static Vector3Int[] faceNeighborhood = - { +{ new Vector3Int(-1,0,0), new Vector3Int(1,0,0), new Vector3Int(0,-1,0), @@ -226,15 +226,15 @@ namespace Obi } - public IEnumerator Voxelize(Matrix4x4 transform, Vector3Int axisMask, bool generateTriangleIndices = false) + public IEnumerator Voxelize(Matrix4x4 transform, bool generateTriangleIndices = false) { voxelSize = Mathf.Max(0.0001f, voxelSize); var xfBounds = input.bounds.Transform(transform); // Calculate min and max voxels, adding a 1-voxel margin. - origin = GetPointVoxel(Vector3.Scale(xfBounds.min, axisMask)) - axisMask; - Vector3Int max = GetPointVoxel(Vector3.Scale(xfBounds.max, axisMask)) + axisMask; + origin = GetPointVoxel(xfBounds.min) - new Vector3Int(1, 1, 1); + Vector3Int max = GetPointVoxel(xfBounds.max) + new Vector3Int(1, 1, 1); resolution = new Vector3Int(max.x - origin.x + 1, max.y - origin.y + 1, max.z - origin.z + 1); @@ -263,9 +263,9 @@ namespace Obi // Generate surface voxels: for (int i = 0; i < triIndices.Length; i += 3) { - Vector3 v1 = Vector3.Scale(transform.MultiplyPoint3x4(vertices[triIndices[i]]), axisMask); - Vector3 v2 = Vector3.Scale(transform.MultiplyPoint3x4(vertices[triIndices[i + 1]]), axisMask); - Vector3 v3 = Vector3.Scale(transform.MultiplyPoint3x4(vertices[triIndices[i + 2]]), axisMask); + Vector3 v1 = transform.MultiplyPoint3x4(vertices[triIndices[i]]); + Vector3 v2 = transform.MultiplyPoint3x4(vertices[triIndices[i + 1]]); + Vector3 v3 = transform.MultiplyPoint3x4(vertices[triIndices[i + 2]]); Bounds triBounds = GetTriangleBounds(v1, v2, v3); @@ -281,7 +281,6 @@ namespace Obi yield return fillCoroutine.Current; } - // Ensures boundary is only one voxel thick. public void BoundaryThinning() { for (int x = 0; x < resolution.x; ++x) @@ -309,212 +308,6 @@ namespace Obi } } - // Ensures boundary voxels are 2D. - public void MakeBoundary2D() - { - for (int x = 0; x < resolution.x; ++x) - for (int y = 0; y < resolution.y; ++y) - for (int z = 0; z < resolution.z; ++z) - if (this[x, y, z] == Voxel.Boundary) - this[x, y, z] = Voxel.Inside; - - for (int x = 0; x < resolution.x; ++x) - for (int y = 0; y < resolution.y; ++y) - for (int z = 0; z < resolution.z; ++z) - { - int sum = 0; - for (int j = 0; j < faceNeighborhood.Length; ++j) - { - var index = faceNeighborhood[j]; - if (VoxelExists(index.x + x, index.y + y, index.z + z) && this[index.x + x, index.y + y, index.z + z] != Voxel.Outside) - { - sum++; - } - } - - if (sum <= 3 && this[x, y, z] == Voxel.Inside) - this[x, y, z] = Voxel.Boundary; - } - } - - public void CreateMesh(ref Mesh mesh, int smoothingIterations) - { - if (mesh == null) - mesh = new Mesh(); - - mesh.indexFormat = UnityEngine.Rendering.IndexFormat.UInt32; - mesh.Clear(); - List vertices = new List(); - List vertices2 = new List(); - List tris = new List(); - vertices.Clear(); - vertices2.Clear(); - tris.Clear(); - - int[] vtxIndex = new int[voxelCount]; - for (int i = 0; i < vtxIndex.Length; ++i) - vtxIndex[i] = -1; - - // create vertices: - for (int x = 0; x < resolution.x; ++x) - for (int y = 0; y < resolution.y; ++y) - for (int z = 0; z < resolution.z; ++z) - if (this[x, y, z] == Voxel.Boundary) - { - vtxIndex[GetVoxelIndex(x, y, z)] = vertices.Count; - var vtx = new Vector3(Origin.x + x + 0.5f, Origin.y + y + 0.5f, Origin.z + z + 0.5f) * voxelSize; - vertices.Add(vtx); - vertices2.Add(vtx); - } - - List inputVertices = vertices; - List outputVertices = vertices2; - for (int i = 0; i < smoothingIterations; ++i) - { - for (int x = 0; x < resolution.x; ++x) - for (int y = 0; y < resolution.y; ++y) - for (int z = 0; z < resolution.z; ++z) - if (this[x, y, z] == Voxel.Boundary) - { - Vector3 avg = Vector3.zero; - - int count = 0; - for (int j = 0; j < faceNeighborhood.Length; ++j) - { - var index = faceNeighborhood[j]; - if (VoxelExists(index.x + x, index.y + y, index.z + z) && this[index.x + x, index.y + y, index.z + z] == Voxel.Boundary) - { - avg += inputVertices[vtxIndex[GetVoxelIndex(index.x + x, index.y + y, index.z + z)]]; - count++; - } - } - - if (count > 0) - outputVertices[vtxIndex[GetVoxelIndex(x, y, z)]] = avg / count; - } - - var aux = inputVertices; - inputVertices = outputVertices; - outputVertices = aux; - } - - // triangulate - for (int x = 0; x < resolution.x; ++x) - for (int y = 0; y < resolution.y; ++y) - for (int z = 0; z < resolution.z; ++z) - if (this[x, y, z] == Voxel.Boundary) - { - int x0y0z0 = GetVoxelIndex(x, y, z); - - int x1y0z0 = VoxelExists(x + 1, y, z) ? GetVoxelIndex(x+1, y, z) : -1; - int x1y1z0 = VoxelExists(x + 1, y + 1, z) ? GetVoxelIndex(x+1, y+1, z) : -1; - int x0y1z0 = VoxelExists(x, y + 1, z) ? GetVoxelIndex(x, y+1, z) : -1; - - int x0y0z1 = VoxelExists(x, y, z + 1) ? GetVoxelIndex(x, y , z + 1) : -1; - int x0y1z1 = VoxelExists(x, y + 1, z + 1) ? GetVoxelIndex(x, y + 1, z + 1) : -1; - int x1y0z1 = VoxelExists(x + 1, y, z + 1) ? GetVoxelIndex(x+1, y, z + 1) : -1; - - int x1y1z1 = VoxelExists(x + 1, y + 1, z + 1) ? GetVoxelIndex(x + 1, y + 1, z + 1) : -1; - - // XY plane - if (x1y0z0 >= 0 && x1y1z0 >= 0 && x0y1z0 >= 0 && - voxels[x1y0z0] == Voxel.Boundary && - voxels[x1y1z0] == Voxel.Boundary && - voxels[x0y1z0] == Voxel.Boundary) - { - if (x0y1z1 < 0 || voxels[x0y1z1] == Voxel.Outside || - x0y0z1 < 0 || voxels[x0y0z1] == Voxel.Outside || - x1y0z1 < 0 || voxels[x1y0z1] == Voxel.Outside || - x1y1z1 < 0 || voxels[x1y1z1] == Voxel.Outside) - { - tris.Add(vtxIndex[x0y0z0]); - tris.Add(vtxIndex[x1y0z0]); - tris.Add(vtxIndex[x0y1z0]); - - tris.Add(vtxIndex[x0y1z0]); - tris.Add(vtxIndex[x1y0z0]); - tris.Add(vtxIndex[x1y1z0]); - } - else - { - tris.Add(vtxIndex[x1y0z0]); - tris.Add(vtxIndex[x0y0z0]); - tris.Add(vtxIndex[x0y1z0]); - - tris.Add(vtxIndex[x1y0z0]); - tris.Add(vtxIndex[x0y1z0]); - tris.Add(vtxIndex[x1y1z0]); - } - } - - // XZ plane - if (x1y0z0 >= 0 && x1y0z1 >= 0 && x0y0z1 >= 0 && - voxels[x1y0z0] == Voxel.Boundary && - voxels[x1y0z1] == Voxel.Boundary && - voxels[x0y0z1] == Voxel.Boundary) - { - if (x0y1z0 < 0 || voxels[x0y1z0] == Voxel.Outside || - x0y1z1 < 0 || voxels[x0y1z1] == Voxel.Outside || - x1y1z0 < 0 || voxels[x1y1z0] == Voxel.Outside || - x1y1z1 < 0 || voxels[x1y1z1] == Voxel.Outside) - { - tris.Add(vtxIndex[x1y0z0]); - tris.Add(vtxIndex[x0y0z0]); - tris.Add(vtxIndex[x0y0z1]); - - tris.Add(vtxIndex[x1y0z0]); - tris.Add(vtxIndex[x0y0z1]); - tris.Add(vtxIndex[x1y0z1]); - } - else - { - tris.Add(vtxIndex[x0y0z0]); - tris.Add(vtxIndex[x1y0z0]); - tris.Add(vtxIndex[x0y0z1]); - - tris.Add(vtxIndex[x0y0z1]); - tris.Add(vtxIndex[x1y0z0]); - tris.Add(vtxIndex[x1y0z1]); - } - } - - // XY plane - if (x0y0z1 >= 0 && x0y1z1 >= 0 && x0y1z0 >= 0 && - voxels[x0y0z1] == Voxel.Boundary && - voxels[x0y1z1] == Voxel.Boundary && - voxels[x0y1z0] == Voxel.Boundary) - { - if (x1y0z0 < 0 || voxels[x1y0z0] == Voxel.Outside || - x1y0z1 < 0 || voxels[x1y0z1] == Voxel.Outside || - x1y1z0 < 0 || voxels[x1y1z0] == Voxel.Outside || - x1y1z1 < 0 || voxels[x1y1z1] == Voxel.Outside) - { - tris.Add(vtxIndex[x0y0z1]); - tris.Add(vtxIndex[x0y0z0]); - tris.Add(vtxIndex[x0y1z0]); - - tris.Add(vtxIndex[x0y0z1]); - tris.Add(vtxIndex[x0y1z0]); - tris.Add(vtxIndex[x0y1z1]); - } - else - { - tris.Add(vtxIndex[x0y0z0]); - tris.Add(vtxIndex[x0y0z1]); - tris.Add(vtxIndex[x0y1z0]); - - tris.Add(vtxIndex[x0y1z0]); - tris.Add(vtxIndex[x0y0z1]); - tris.Add(vtxIndex[x0y1z1]); - } - } - } - - mesh.SetVertices(outputVertices); - mesh.SetIndices(tris, MeshTopology.Triangles, 0); - mesh.RecalculateNormals(); - } - private IEnumerator FloodFill() { Queue queue = new Queue(); @@ -631,5 +424,6 @@ namespace Obi return !(Mathf.Max(-maxP, minP) > r); } + } -} +} \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/DataStructures/Voxelization/VoxelDistanceField.cs b/Assets/Obi/Scripts/Common/DataStructures/Voxelization/VoxelDistanceField.cs index dd727dc36..8484fbfd8 100644 --- a/Assets/Obi/Scripts/Common/DataStructures/Voxelization/VoxelDistanceField.cs +++ b/Assets/Obi/Scripts/Common/DataStructures/Voxelization/VoxelDistanceField.cs @@ -1,5 +1,4 @@ -using System.Collections.Generic; -using System.Collections; +using System.Collections; using UnityEngine; namespace Obi @@ -10,7 +9,7 @@ namespace Obi */ public class VoxelDistanceField { - public Vector3[,,] distanceField; // for each coordinate, stores coordinates of closest surface voxel. + public Vector3Int[,,] distanceField; // for each coordinate, stores coordinates of closest surface voxel. private MeshVoxelizer voxelizer; @@ -19,159 +18,115 @@ namespace Obi this.voxelizer = voxelizer; } - public Vector4 SampleUnfiltered(int x, int y, int z) + public float SampleUnfiltered(int x, int y, int z) { - x = Mathf.Clamp(x, 0, voxelizer.resolution.x - 1); - y = Mathf.Clamp(y, 0, voxelizer.resolution.y - 1); - z = Mathf.Clamp(z, 0, voxelizer.resolution.z - 1); + if (!voxelizer.VoxelExists(x, y, z)) return float.PositiveInfinity; - var grad = distanceField[x, y, z]; - float dist = grad.magnitude; - grad.Normalize(); + float dist = Vector3.Distance(voxelizer.GetVoxelCenter(distanceField[x, y, z]), + voxelizer.GetVoxelCenter(new Vector3Int(x, y, z))); - return new Vector4(grad.x, grad.y, grad.z, -dist); + if (voxelizer[x, y, z] == MeshVoxelizer.Voxel.Inside) + return -dist; + return dist; } - public Vector4 SampleFiltered(float x, float y, float z, Vector3Int axisMask) + public Vector4 SampleFiltered(float x, float y, float z) { var pos = new Vector3(x, y, z); // clamp position inside the distance field: - var min = voxelizer.GetVoxelCenter(new Vector3Int(0, 0, 0)); + var min = voxelizer.GetVoxelCenter(new Vector3Int(0, 0, 0)); var max = voxelizer.GetVoxelCenter(new Vector3Int(voxelizer.resolution.x - 1, voxelizer.resolution.y - 1, voxelizer.resolution.z - 1)); - pos.x = Mathf.Clamp(pos.x, min.x, max.x); - pos.y = Mathf.Clamp(pos.y, min.y, max.y); - pos.z = Mathf.Clamp(pos.z, min.z, max.z); + pos.x = Mathf.Clamp(pos.x, min.x, max.x - voxelizer.voxelSize * 0.05f); + pos.y = Mathf.Clamp(pos.y, min.y, max.y - voxelizer.voxelSize * 0.05f); + pos.z = Mathf.Clamp(pos.z, min.z, max.z - voxelizer.voxelSize * 0.05f); + + var voxel = voxelizer.GetPointVoxel(pos - Vector3.one * voxelizer.voxelSize * 0.5f) - voxelizer.Origin; - var voxel = voxelizer.GetPointVoxel(pos - (Vector3)axisMask * voxelizer.voxelSize * 0.5f) - voxelizer.Origin; var voxelCenter = voxelizer.GetVoxelCenter(voxel); - var norm = Vector3.Scale((pos - voxelCenter) / voxelizer.voxelSize, axisMask); + var norm = (pos - voxelCenter) / voxelizer.voxelSize; - var xz00 = SampleUnfiltered(voxel.x, voxel.y, voxel.z); - var xz01 = SampleUnfiltered(voxel.x, voxel.y, voxel.z + 1); - var xz10 = SampleUnfiltered(voxel.x + 1, voxel.y, voxel.z); - var xz11 = SampleUnfiltered(voxel.x + 1, voxel.y, voxel.z + 1); + float xz00 = SampleUnfiltered(voxel.x, voxel.y, voxel.z); + float xz01 = SampleUnfiltered(voxel.x, voxel.y, voxel.z + 1); + float xz10 = SampleUnfiltered(voxel.x + 1, voxel.y, voxel.z); + float xz11 = SampleUnfiltered(voxel.x + 1, voxel.y, voxel.z + 1); - var yz00 = SampleUnfiltered(voxel.x, voxel.y + 1, voxel.z); - var yz01 = SampleUnfiltered(voxel.x, voxel.y + 1, voxel.z + 1); - var yz10 = SampleUnfiltered(voxel.x + 1, voxel.y + 1, voxel.z); - var yz11 = SampleUnfiltered(voxel.x + 1, voxel.y + 1, voxel.z + 1); + float yz00 = SampleUnfiltered(voxel.x, voxel.y + 1, voxel.z); + float yz01 = SampleUnfiltered(voxel.x, voxel.y + 1, voxel.z + 1); + float yz10 = SampleUnfiltered(voxel.x + 1, voxel.y + 1, voxel.z); + float yz11 = SampleUnfiltered(voxel.x + 1, voxel.y + 1, voxel.z + 1); - var X1 = Vector4.Lerp(xz00, xz10, norm.x); - var X2 = Vector4.Lerp(xz01, xz11, norm.x); - var X3 = Vector4.Lerp(yz00, yz10, norm.x); - var X4 = Vector4.Lerp(yz01, yz11, norm.x); + float X1 = Mathf.Lerp(xz00, xz10, norm.x); + float X2 = Mathf.Lerp(xz01, xz11, norm.x); + float X3 = Mathf.Lerp(yz00, yz10, norm.x); + float X4 = Mathf.Lerp(yz01, yz11, norm.x); - var Y1 = Vector4.Lerp(X1, X2, norm.z); - var Y2 = Vector4.Lerp(X3, X4, norm.z); + float Y1 = Mathf.Lerp(X1, X2, norm.z); + float Y2 = Mathf.Lerp(X3, X4, norm.z); - return Vector4.Lerp(Y1, Y2, norm.y); - } + float R = Mathf.Lerp(Mathf.Lerp(xz10, xz11, norm.z), Mathf.Lerp(yz10, yz11, norm.z), norm.y); + float L = Mathf.Lerp(Mathf.Lerp(xz00, xz01, norm.z), Mathf.Lerp(yz00, yz01, norm.z), norm.y); - public void Smooth() - { - // create output buffer for ping-pong. - Vector3[,,] smoothed = new Vector3[voxelizer.resolution.x, - voxelizer.resolution.y, - voxelizer.resolution.z]; + float F = Mathf.Lerp(X2, X4, norm.y); + float B = Mathf.Lerp(X1, X3, norm.y); - for (int x = 0; x < distanceField.GetLength(0); ++x) - for (int y = 0; y < distanceField.GetLength(1); ++y) - for (int z = 0; z < distanceField.GetLength(2); ++z) - { - if (voxelizer[x, y, z] != MeshVoxelizer.Voxel.Outside) - { - var p = new Vector3Int(x, y, z); - Vector3 df = distanceField[x, y, z]; - int count = 1; - foreach (var o in MeshVoxelizer.faceNeighborhood) - { - // offset voxel to get neighbor: - var n = p + o; - if (voxelizer.VoxelExists(n.x, n.y, n.z) && voxelizer[n.x, n.y, n.z] != MeshVoxelizer.Voxel.Outside) - { - df += distanceField[n.x, n.y, n.z]; - count++; - } - } - df /= count; - smoothed[x, y, z] = df; - } - } - - distanceField = smoothed; - } - - private void CalculateGradientsAndDistances(Vector3Int[,,] buffer1) - { - distanceField = new Vector3[voxelizer.resolution.x, - voxelizer.resolution.y, - voxelizer.resolution.z]; - - for (int x = 0; x < buffer1.GetLength(0); ++x) - for (int y = 0; y < buffer1.GetLength(1); ++y) - for (int z = 0; z < buffer1.GetLength(2); ++z) - { - if (voxelizer[x, y, z] != MeshVoxelizer.Voxel.Outside) - { - distanceField[x, y, z] = voxelizer.GetVoxelCenter(buffer1[x, y, z]) - - voxelizer.GetVoxelCenter(new Vector3Int(x, y, z)); - } - else - distanceField[x, y, z] = Vector3.zero; - } + return new Vector4((R - L) / voxelizer.voxelSize, + (Y2 - Y1) / voxelizer.voxelSize, + (F - B) / voxelizer.voxelSize, + Mathf.Lerp(Y1, Y2, norm.y)); } public IEnumerator JumpFlood() { - // create two buffers for ping-ponging: - Vector3Int[,,] buffer1 = new Vector3Int[voxelizer.resolution.x, - voxelizer.resolution.y, - voxelizer.resolution.z]; - Vector3Int[,,] buffer2 = new Vector3Int[voxelizer.resolution.x, + // create and initialize distance field: + distanceField = new Vector3Int[voxelizer.resolution.x, + voxelizer.resolution.y, + voxelizer.resolution.z]; + + // create auxiliar buffer for ping-pong. + Vector3Int[,,] auxBuffer = new Vector3Int[voxelizer.resolution.x, voxelizer.resolution.y, voxelizer.resolution.z]; // initialize distance field: - for (int x = 0; x < buffer1.GetLength(0); ++x) - for (int y = 0; y < buffer1.GetLength(1); ++y) - for (int z = 0; z < buffer1.GetLength(2); ++z) + for (int x = 0; x < distanceField.GetLength(0); ++x) + for (int y = 0; y < distanceField.GetLength(1); ++y) + for (int z = 0; z < distanceField.GetLength(2); ++z) { - if (voxelizer[x, y, z] == MeshVoxelizer.Voxel.Outside) - buffer1[x, y, z] = new Vector3Int(x, y, z); + if (voxelizer[x, y, z] == MeshVoxelizer.Voxel.Boundary) + distanceField[x, y, z] = new Vector3Int(x, y, z); else - buffer1[x, y, z] = new Vector3Int(-1, -1, -1); + distanceField[x, y, z] = new Vector3Int(-1, -1, -1); } // calculate the maximum size of the buffer: - int size = Mathf.Max(buffer1.GetLength(0), - buffer1.GetLength(1), - buffer1.GetLength(2)); + int size = Mathf.Max(distanceField.GetLength(0), + distanceField.GetLength(1), + distanceField.GetLength(2)); int step = (int)(size / 2.0f); - yield return new CoroutineJob.ProgressInfo("Generating voxel distance field...", 0); + yield return new CoroutineJob.ProgressInfo("Generating voxel distance field...",0); - float numPasses = (int)Mathf.Log(size, 2); + float numPasses = (int) Mathf.Log(size, 2); int i = 0; // jump flood passes: while (step >= 1) { - JumpFloodPass(step, buffer1, buffer2); + JumpFloodPass(step, distanceField, auxBuffer); // halve step: step /= 2; // swap buffers: - Vector3Int[,,] temp = buffer1; - buffer1 = buffer2; - buffer2 = temp; + Vector3Int[,,] temp = distanceField; + distanceField = auxBuffer; + auxBuffer = temp; yield return new CoroutineJob.ProgressInfo("Generating voxel distance field...", ++i / numPasses); } - CalculateGradientsAndDistances(buffer1); } private void JumpFloodPass(int stride, Vector3Int[,,] input, Vector3Int[,,] output) @@ -200,30 +155,34 @@ namespace Obi dist = (s - p).sqrMagnitude; // for each neighbor voxel: - foreach (var o in MeshVoxelizer.fullNeighborhood) - { - // offset voxel to get neighbor: - var n = p + o * stride; - - if (voxelizer.VoxelExists(n.x, n.y, n.z)) - { - // neighbors' closest seed. - Vector3Int nc = input[n.x, n.y, n.z]; - - if (nc.x >= 0) + for (int nx = -1; nx <= 1; ++nx) + for (int ny = -1; ny <= 1; ++ny) + for (int nz = -1; nz <= 1; ++nz) { - // distance to neighbor's closest seed: - float newDist = (nc - p).sqrMagnitude; + // neighbor's position: + int px = x + nx * stride; + int py = y + ny * stride; + int pz = z + nz * stride; - // if the distance to the neighbor's closest seed is smaller than the distance to ours: - if (newDist < dist) + if (voxelizer.VoxelExists(px,py,pz)) { - output[x, y, z] = nc; - dist = newDist; + // neighbors' closest seed. + Vector3Int n = input[px,py,pz]; + + if (n.x >= 0) + { + // distance to neighbor's closest seed: + float newDist = (n - p).sqrMagnitude; + + // if the distance to the neighbor's closest seed is smaller than the distance to ours: + if (newDist < dist) + { + output[x, y, z] = n; + dist = newDist; + } + } } } - } - } } } diff --git a/Assets/Obi/Scripts/Common/Rendering/DataBatches.meta b/Assets/Obi/Scripts/Common/Rendering/DataBatches.meta deleted file mode 100644 index 3fd71cf29..000000000 --- a/Assets/Obi/Scripts/Common/Rendering/DataBatches.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 13ef5aa25fc194dda8d453b36a50e5d0 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Rendering/DataBatches/MeshDataBatch.cs b/Assets/Obi/Scripts/Common/Rendering/DataBatches/MeshDataBatch.cs deleted file mode 100644 index 7f8362043..000000000 --- a/Assets/Obi/Scripts/Common/Rendering/DataBatches/MeshDataBatch.cs +++ /dev/null @@ -1,316 +0,0 @@ -using UnityEngine; -using Unity.Collections; -using System.Collections.Generic; -using System.Linq; - -namespace Obi -{ - public interface IMeshDataProvider - { - Mesh sourceMesh { get; } - uint meshInstances { get; } - - int vertexCount { get; } - int triangleCount { get; } - - void GetVertices(List vertices); - void GetNormals(List normals); - void GetTangents(List tangents); - void GetColors(List colors); - void GetUVs(int channel, List uvs); - - void GetTriangles(List triangles); - } - - public class MeshDataBatch - { - public struct MeshData - { - public int firstVertex; - public int vertexCount; - - public int firstTriangle; - public int triangleCount; - } - - private Dictionary meshToIndex; - - // per mesh data: - public ObiNativeList meshData; - - public ObiNativeList restPositions; - public ObiNativeList restNormals; - public ObiNativeList restTangents; - public ObiNativeList restColors; - public ObiNativeList uv; - public ObiNativeList uv2; - public ObiNativeList uv3; - public ObiNativeList uv4; - public ObiNativeList triangles; - - private List tempVertices; - private List tempNormals; - private List tempTangents; - private List tempColors; - private List tempUV; - private List tempUV2; - private List tempUV3; - private List tempUV4; - private List tempTriangles; - - public int Count { get { return meshData.count; } } - - public MeshDataBatch() - { - meshToIndex = new Dictionary(); - meshData = new ObiNativeList(); - - InitializeTempData(); - InitializeDynamicData(); - InitializeStaticData(); - } - - public void InitializeTempData() - { - tempVertices = new List(); - tempNormals = new List(); - tempTangents = new List(); - tempColors = new List(); - - tempUV = new List(); - tempUV2 = new List(); - tempUV3 = new List(); - tempUV4 = new List(); - tempTriangles = new List(); - } - - public void InitializeDynamicData() - { - if (restPositions == null) - restPositions = new ObiNativeList(); - - if (restNormals == null) - restNormals = new ObiNativeList(); - - if (restTangents == null) - restTangents = new ObiNativeList(); - - if (restColors == null) - restColors = new ObiNativeList(); - } - - public void InitializeStaticData() - { - if (uv == null) - uv = new ObiNativeList(); - - if (uv2 == null) - uv2 = new ObiNativeList(); - - if (uv3 == null) - uv3 = new ObiNativeList(); - - if (uv4 == null) - uv4 = new ObiNativeList(); - - if (triangles == null) - triangles = new ObiNativeList(); - } - - public void Dispose() - { - if (meshData != null) meshData.Dispose(); - DisposeOfTempData(); - DisposeOfDynamicData(); - DisposeOfStaticData(); - } - - public void DisposeOfTempData() - { - tempVertices = null; - tempNormals = null; - tempTangents = null; - tempColors = null; - - tempUV = null; - tempUV2 = null; - tempUV3 = null; - tempUV4 = null; - tempTriangles = null; - } - - public void DisposeOfDynamicData() - { - if (restPositions != null) restPositions.Dispose(); restPositions = null; - if (restNormals != null) restNormals.Dispose(); restNormals = null; - if (restTangents != null) restTangents.Dispose(); restTangents = null; - if (restColors != null) restColors.Dispose(); restColors = null; - } - - public void DisposeOfStaticData() - { - if (uv != null) uv.Dispose(); uv = null; - if (uv2 != null) uv2.Dispose(); uv2 = null; - if (uv3 != null) uv3.Dispose(); uv3 = null; - if (uv4 != null) uv4.Dispose(); uv4 = null; - if (triangles != null) triangles.Dispose(); triangles = null; - } - - public void Clear() - { - if (meshToIndex != null) meshToIndex.Clear(); - if (meshData != null) meshData.Clear(); - - if (restPositions != null) restPositions.Clear(); - if (restNormals != null) restNormals.Clear(); - if (restTangents != null) restTangents.Clear(); - if (restColors != null) restColors.Clear(); - if (uv != null) uv.Clear(); - if (uv2 != null) uv2.Clear(); - if (uv3 != null) uv3.Clear(); - if (uv4 != null) uv4.Clear(); - if (triangles != null) triangles.Clear(); - } - - public int AddMesh(IMeshDataProvider meshProvider) - { - if (!meshToIndex.TryGetValue(meshProvider.sourceMesh, out int index)) - { - index = meshData.count; - meshToIndex[meshProvider.sourceMesh] = index; - - meshProvider.GetVertices(tempVertices); - meshProvider.GetNormals(tempNormals); - meshProvider.GetTangents(tempTangents); - meshProvider.GetColors(tempColors); - - meshProvider.GetUVs(0, tempUV); - meshProvider.GetUVs(1, tempUV2); - meshProvider.GetUVs(2, tempUV3); - meshProvider.GetUVs(3, tempUV4); - - meshProvider.GetTriangles(tempTriangles); - - if (tempTangents.Count == 0) - tempTangents.AddRange(Enumerable.Repeat(Vector4.zero, tempVertices.Count)); - - if (tempColors.Count == 0) - tempColors.AddRange(Enumerable.Repeat(Color.white, tempVertices.Count)); - - if (tempUV.Count == 0) - tempUV.AddRange(Enumerable.Repeat(Vector2.zero, tempVertices.Count)); - - if (tempUV2.Count == 0) - tempUV2.AddRange(Enumerable.Repeat(Vector2.zero, tempVertices.Count)); - - if (tempUV3.Count == 0) - tempUV3.AddRange(Enumerable.Repeat(Vector2.zero, tempVertices.Count)); - - if (tempUV4.Count == 0) - tempUV4.AddRange(Enumerable.Repeat(Vector2.zero, tempVertices.Count)); - - meshData.Add(new MeshData - { - firstVertex = restPositions.count, - vertexCount = tempVertices.Count, - - firstTriangle = triangles.count, - triangleCount = tempTriangles.Count - }); - - restPositions.AddRange(tempVertices); - restNormals.AddRange(tempNormals); - restTangents.AddRange(tempTangents); - restColors.AddRange(tempColors); - uv.AddRange(tempUV); - uv2.AddRange(tempUV2); - uv3.AddRange(tempUV3); - uv4.AddRange(tempUV4); - triangles.AddRange(tempTriangles); - } - return index; - } - - public void PrepareForCompute() - { - meshData.AsComputeBuffer(); - restPositions.AsComputeBuffer(); - restNormals.AsComputeBuffer(); - restTangents.AsComputeBuffer(); - restColors.AsComputeBuffer(); - } - - public int GetVertexCount(int meshIndex) - { - return meshData[meshIndex].vertexCount; - } - - public int GetTriangleCount(int meshIndex) - { - return meshData[meshIndex].triangleCount; - } - - public NativeSlice GetVertices(int meshIndex) - { - int start = meshData[meshIndex].firstVertex; - int count = meshData[meshIndex].vertexCount; - return restPositions.AsNativeArray().Slice(start,count); - } - - public NativeSlice GetNormals(int meshIndex) - { - int start = meshData[meshIndex].firstVertex; - int count = meshData[meshIndex].vertexCount; - return restNormals.AsNativeArray().Slice(start, count); - } - - public NativeSlice GetTangents(int meshIndex) - { - int start = meshData[meshIndex].firstVertex; - int count = meshData[meshIndex].vertexCount; - return restTangents.AsNativeArray().Slice(start, count); - } - - public NativeSlice GetColors(int meshIndex) - { - int start = meshData[meshIndex].firstVertex; - int count = meshData[meshIndex].vertexCount; - return restColors.AsNativeArray().Slice(start, count); - } - - public NativeSlice GetUV(int meshIndex) - { - int start = meshData[meshIndex].firstVertex; - int count = meshData[meshIndex].vertexCount; - return uv.AsNativeArray().Slice(start, count); - } - - public NativeSlice GetUV2(int meshIndex) - { - int start = meshData[meshIndex].firstVertex; - int count = meshData[meshIndex].vertexCount; - return uv2.AsNativeArray().Slice(start, count); - } - - public NativeSlice GetUV3(int meshIndex) - { - int start = meshData[meshIndex].firstVertex; - int count = meshData[meshIndex].vertexCount; - return uv3.AsNativeArray().Slice(start, count); - } - - public NativeSlice GetUV4(int meshIndex) - { - int start = meshData[meshIndex].firstVertex; - int count = meshData[meshIndex].vertexCount; - return uv4.AsNativeArray().Slice(start, count); - } - - public NativeSlice GetTriangles(int meshIndex) - { - int start = meshData[meshIndex].firstTriangle; - int count = meshData[meshIndex].triangleCount; - return triangles.AsNativeArray().Slice(start, count); - } - } -} \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Rendering/DataBatches/SkeletonDataBatch.cs b/Assets/Obi/Scripts/Common/Rendering/DataBatches/SkeletonDataBatch.cs deleted file mode 100644 index a2c0337aa..000000000 --- a/Assets/Obi/Scripts/Common/Rendering/DataBatches/SkeletonDataBatch.cs +++ /dev/null @@ -1,117 +0,0 @@ - -using UnityEngine; - -namespace Obi -{ - public class SkeletonDataBatch - { - public struct SkeletonData - { - public int firstBone; - public int boneCount; - } - - // per skinMap data: - public ObiNativeList skeletonData; - public ObiNativeList world2Solver; - - // bone data: - public ObiNativeList bonePositions; - public ObiNativeList boneRotations; - public ObiNativeList boneScales; - - public int Count { get { return skeletonData.count; } } - - public SkeletonDataBatch() - { - skeletonData = new ObiNativeList(); - world2Solver = new ObiNativeList(); - - bonePositions = new ObiNativeList(); - boneRotations = new ObiNativeList(); - boneScales = new ObiNativeList(); - } - - public void Dispose() - { - skeletonData.Dispose(); - world2Solver.Dispose(); - - bonePositions.Dispose(); - boneRotations.Dispose(); - boneScales.Dispose(); - } - - public void Clear() - { - skeletonData.Clear(); - world2Solver.Clear(); - - bonePositions.Clear(); - boneRotations.Clear(); - boneScales.Clear(); - } - - public int AddSkeleton(Transform[] bones, Matrix4x4 worldToSolver) - { - var data = new SkeletonData - { - firstBone = bonePositions.count, - }; - - foreach (var bone in bones) - { - if (bone != null) - { - bonePositions.Add(bone.position); - boneRotations.Add(bone.rotation); - boneScales.Add(bone.localScale); - } - } - - data.boneCount = bonePositions.count; - - skeletonData.Add(data); - world2Solver.Add(worldToSolver); - - return skeletonData.count - 1; - } - - public void PrepareForCompute() - { - skeletonData.SafeAsComputeBuffer(); - world2Solver.SafeAsComputeBuffer(); - bonePositions.SafeAsComputeBuffer(); - boneRotations.SafeAsComputeBuffer(); - boneScales.SafeAsComputeBuffer(); - } - - public void SetBoneTransform(int index, int boneIndex, Transform transform) - { - if (transform != null) - { - var i = skeletonData[index].firstBone + boneIndex; - bonePositions[i] = transform.position; - boneScales[i] = transform.lossyScale; - boneRotations[i] = transform.rotation; - } - } - - public void UpdateBoneTransformsCompute() - { - bonePositions.Upload(); - boneScales.Upload(); - boneRotations.Upload(); - } - - public Matrix4x4 GetWorldToSolverTransform(int index) - { - return world2Solver[index]; - } - - public void SetWorldToSolverTransform(int index, Matrix4x4 trfm) - { - world2Solver[index] = trfm; - } - } -} diff --git a/Assets/Obi/Scripts/Common/Rendering/DataBatches/SkeletonDataBatch.cs.meta b/Assets/Obi/Scripts/Common/Rendering/DataBatches/SkeletonDataBatch.cs.meta deleted file mode 100644 index cad0d32ba..000000000 --- a/Assets/Obi/Scripts/Common/Rendering/DataBatches/SkeletonDataBatch.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6b609b47dfb88424c9ae3e32c64bfaeb -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Rendering/ISurfaceChunkUser.cs b/Assets/Obi/Scripts/Common/Rendering/ISurfaceChunkUser.cs deleted file mode 100644 index 91f76b019..000000000 --- a/Assets/Obi/Scripts/Common/Rendering/ISurfaceChunkUser.cs +++ /dev/null @@ -1,10 +0,0 @@ -using UnityEngine; -using UnityEngine.Rendering; - -namespace Obi -{ - public interface ISurfaceChunkUser - { - uint usedChunkCount { get; } - } -} \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Rendering/ISurfaceChunkUser.cs.meta b/Assets/Obi/Scripts/Common/Rendering/ISurfaceChunkUser.cs.meta deleted file mode 100644 index ffcc1476e..000000000 --- a/Assets/Obi/Scripts/Common/Rendering/ISurfaceChunkUser.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5e544f8db79af4a6a91df85c5df0dee7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Rendering/ObiActorRenderer.cs b/Assets/Obi/Scripts/Common/Rendering/ObiActorRenderer.cs deleted file mode 100644 index 3fc670692..000000000 --- a/Assets/Obi/Scripts/Common/Rendering/ObiActorRenderer.cs +++ /dev/null @@ -1,48 +0,0 @@ - -namespace Obi -{ - public interface IActorRenderer - { - public ObiActor actor - { - get; - } - } - - public interface ObiActorRenderer : IActorRenderer, ObiRenderer where T : ObiActorRenderer - { - public void EnableRenderer() - { - actor.OnBlueprintLoaded += ObiActorRenderer_OnBlueprintLoaded; - actor.OnBlueprintUnloaded += ObiActorRenderer_OnBlueprintUnloaded; - - if (actor.isLoaded) - RegisterRenderer(actor.solver); - } - - public void DisableRenderer() - { - if (actor.isLoaded) - UnregisterRenderer(actor.solver); - - actor.OnBlueprintLoaded -= ObiActorRenderer_OnBlueprintLoaded; - actor.OnBlueprintUnloaded -= ObiActorRenderer_OnBlueprintUnloaded; - } - - public void SetRendererDirty(Oni.RenderingSystemType type) - { - if (actor != null) - actor.SetRenderingDirty(type); - } - - private void ObiActorRenderer_OnBlueprintLoaded(ObiActor act, ObiActorBlueprint blueprint) - { - RegisterRenderer(act.solver); - } - - protected void ObiActorRenderer_OnBlueprintUnloaded(ObiActor act, ObiActorBlueprint blueprint) - { - UnregisterRenderer(act.solver); - } - } -} diff --git a/Assets/Obi/Scripts/Common/Rendering/ObiActorRenderer.cs.meta b/Assets/Obi/Scripts/Common/Rendering/ObiActorRenderer.cs.meta deleted file mode 100644 index 8dd784516..000000000 --- a/Assets/Obi/Scripts/Common/Rendering/ObiActorRenderer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8f86d1462578d497182bb58c20b89d42 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Rendering/ObiDistanceFieldRenderer.cs b/Assets/Obi/Scripts/Common/Rendering/ObiDistanceFieldRenderer.cs index 2f0344d66..8f39af505 100644 --- a/Assets/Obi/Scripts/Common/Rendering/ObiDistanceFieldRenderer.cs +++ b/Assets/Obi/Scripts/Common/Rendering/ObiDistanceFieldRenderer.cs @@ -37,7 +37,7 @@ namespace Obi public void OnEnable() { - material = GameObject.Instantiate(Resources.Load("ObiMaterials/DistanceFields/DistanceFieldRendering")); + material = GameObject.Instantiate(Resources.Load("ObiMaterials/DistanceFieldRendering")); material.hideFlags = HideFlags.HideAndDontSave; } diff --git a/Assets/Obi/Scripts/Common/Rendering/ObiFoamRenderSystem.cs b/Assets/Obi/Scripts/Common/Rendering/ObiFoamRenderSystem.cs deleted file mode 100644 index 93b906200..000000000 --- a/Assets/Obi/Scripts/Common/Rendering/ObiFoamRenderSystem.cs +++ /dev/null @@ -1,96 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using Unity.Profiling; -using UnityEngine; -using UnityEngine.Rendering; - -namespace Obi -{ - [StructLayout(LayoutKind.Sequential)] - public struct DiffuseParticleVertex - { - public Vector4 pos; - public Vector3 offset; - public Vector4 color; - public Vector4 velocity; - public Vector4 attributes; - } - - public class ObiFoamRenderSystem : RenderSystem - { - public Oni.RenderingSystemType typeEnum { get => Oni.RenderingSystemType.FoamParticles; } - - public RendererSet renderers { get; } = new RendererSet(); - public bool isSetup => true; - - protected VertexAttributeDescriptor[] layout = - { - new VertexAttributeDescriptor(VertexAttribute.Position, VertexAttributeFormat.Float32, 4), - new VertexAttributeDescriptor(VertexAttribute.Normal, VertexAttributeFormat.Float32, 3), - new VertexAttributeDescriptor(VertexAttribute.Color, VertexAttributeFormat.Float32, 4), - new VertexAttributeDescriptor(VertexAttribute.TexCoord0, VertexAttributeFormat.Float32, 4), // velocity - new VertexAttributeDescriptor(VertexAttribute.TexCoord1, VertexAttributeFormat.Float32, 4), // attributes - }; - - static protected ProfilerMarker m_SetupRenderMarker = new ProfilerMarker("SetupSurfaceMeshing"); - static protected ProfilerMarker m_RenderMarker = new ProfilerMarker("SurfaceMeshing"); - - protected HashSet cameras = new HashSet(); - protected MaterialPropertyBlock matProps; - - protected ObiSolver m_Solver; - public ProceduralRenderBatch renderBatch; - -#if (UNITY_2019_1_OR_NEWER) - System.Action renderCallback; -#endif - - // must be done before fluid meshing. - public uint tier - { - get { return 0; } - } - - public ObiFoamRenderSystem(ObiSolver solver) - { - m_Solver = solver; - matProps = new MaterialPropertyBlock(); - -#if (UNITY_2019_1_OR_NEWER) - renderCallback = new System.Action((cntxt, cam) => { RenderFromCamera(cam); }); - RenderPipelineManager.beginCameraRendering += renderCallback; -#endif - Camera.onPreCull += RenderFromCamera; - } - - public virtual void Dispose() - { - -#if (UNITY_2019_1_OR_NEWER) - RenderPipelineManager.beginCameraRendering -= renderCallback; -#endif - Camera.onPreCull -= RenderFromCamera; - - renderBatch.Dispose(); - cameras.Clear(); - } - - public void RenderFromCamera(Camera camera) - { - cameras.Add(camera); - } - - public virtual void Setup() - { - } - - public virtual void Step() - { - } - - public virtual void Render() - { - } - } -} \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Rendering/ObiFoamRenderSystem.cs.meta b/Assets/Obi/Scripts/Common/Rendering/ObiFoamRenderSystem.cs.meta deleted file mode 100644 index 7536fe664..000000000 --- a/Assets/Obi/Scripts/Common/Rendering/ObiFoamRenderSystem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 96d883432ef854a8598e264c73232bdc -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Rendering/ObiInstancedParticleRenderSystem.cs b/Assets/Obi/Scripts/Common/Rendering/ObiInstancedParticleRenderSystem.cs deleted file mode 100644 index 1977c446f..000000000 --- a/Assets/Obi/Scripts/Common/Rendering/ObiInstancedParticleRenderSystem.cs +++ /dev/null @@ -1,151 +0,0 @@ -using UnityEngine; -using System.Collections.Generic; -using UnityEngine.Rendering; -using Unity.Collections; -using Unity.Profiling; -using System.Runtime.InteropServices; - -namespace Obi -{ - - public abstract class ObiInstancedParticleRenderSystem : RenderSystem - { - public Oni.RenderingSystemType typeEnum { get => Oni.RenderingSystemType.InstancedParticles; } - - public RendererSet renderers { get; } = new RendererSet(); - public bool isSetup => activeParticles != null; - - - static protected ProfilerMarker m_SetupRenderMarker = new ProfilerMarker("SetupParticleRendering"); - static protected ProfilerMarker m_RenderMarker = new ProfilerMarker("ParticleRendering"); - - protected ObiSolver m_Solver; - - protected List batchList = new List(); - - protected ObiNativeList activeParticles; - protected ObiNativeList rendererIndex; - protected ObiNativeList rendererData; - - protected ObiNativeList instanceTransforms; - protected ObiNativeList invInstanceTransforms; - protected ObiNativeList instanceColors; - - public ObiInstancedParticleRenderSystem(ObiSolver solver) - { - m_Solver = solver; - - activeParticles = new ObiNativeList(); - rendererIndex = new ObiNativeList(); - rendererData = new ObiNativeList(); - instanceTransforms = new ObiNativeList(); - invInstanceTransforms = new ObiNativeList(); - instanceColors = new ObiNativeList(); - } - - public virtual void Dispose() - { - for (int i = 0; i < batchList.Count; ++i) - batchList[i].Dispose(); - batchList.Clear(); - - if (activeParticles != null) - activeParticles.Dispose(); - if (rendererData != null) - rendererData.Dispose(); - if (rendererIndex != null) - rendererIndex.Dispose(); - if (instanceTransforms != null) - instanceTransforms.Dispose(); - if (invInstanceTransforms != null) - invInstanceTransforms.Dispose(); - if (instanceColors != null) - instanceColors.Dispose(); - } - - protected virtual void Clear() - { - for (int i = 0; i < batchList.Count; ++i) - batchList[i].Dispose(); - batchList.Clear(); - - activeParticles.Clear(); - rendererData.Clear(); - rendererIndex.Clear(); - instanceTransforms.Clear(); - invInstanceTransforms.Clear(); - instanceColors.Clear(); - } - - protected virtual void CreateBatches() - { - // generate batches: - for (int i = 0; i < renderers.Count; ++i) - { - renderers[i].renderParameters.layer = renderers[i].gameObject.layer; - - // Create multiple batches of at most maxInstancesPerBatch particles each: - int instanceCount = 0; - while (instanceCount < renderers[i].actor.particleCount) - { - var batch = new InstancedRenderBatch(i, renderers[i].mesh, renderers[i].material, renderers[i].renderParameters); - batch.firstInstance = instanceCount; - batch.instanceCount = Mathf.Min(renderers[i].actor.particleCount - instanceCount, Constants.maxInstancesPerBatch); - instanceCount += batch.instanceCount; - batchList.Add(batch); - } - } - - // sort batches: - batchList.Sort(); - - for (int i = 0; i < batchList.Count; ++i) - { - var batch = batchList[i]; - var renderer = renderers[batch.firstRenderer]; - int particlesSoFar = activeParticles.count; - - // add active particles here, respecting batch order: - activeParticles.AddRange(renderer.actor.solverIndices, batch.firstInstance, batch.instanceCount); - rendererIndex.AddReplicate(i, batch.instanceCount); - rendererData.Add(new ParticleRendererData(renderer.instanceColor, renderer.instanceScale)); - - batch.firstInstance = particlesSoFar; - } - - instanceTransforms.ResizeUninitialized(activeParticles.count); - invInstanceTransforms.ResizeUninitialized(activeParticles.count); - instanceColors.ResizeUninitialized(activeParticles.count); - } - - protected virtual void CloseBatches() - { - // Initialize each batch: - for (int i = 0; i < batchList.Count; ++i) - batchList[i].Initialize(); - } - - public virtual void Setup() - { - using (m_SetupRenderMarker.Auto()) - { - Clear(); - - CreateBatches(); - - ObiUtils.MergeBatches(batchList); - - CloseBatches(); - } - } - - public virtual void Step() - { - } - - public virtual void Render() - { - } - } -} - diff --git a/Assets/Obi/Scripts/Common/Rendering/ObiInstancedParticleRenderSystem.cs.meta b/Assets/Obi/Scripts/Common/Rendering/ObiInstancedParticleRenderSystem.cs.meta deleted file mode 100644 index d62f80c8d..000000000 --- a/Assets/Obi/Scripts/Common/Rendering/ObiInstancedParticleRenderSystem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: fd33018010abc46be9ac6cc091142ccf -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Rendering/ObiInstancedParticleRenderer.cs b/Assets/Obi/Scripts/Common/Rendering/ObiInstancedParticleRenderer.cs index e76814594..90be3a496 100644 --- a/Assets/Obi/Scripts/Common/Rendering/ObiInstancedParticleRenderer.cs +++ b/Assets/Obi/Scripts/Common/Rendering/ObiInstancedParticleRenderer.cs @@ -11,51 +11,80 @@ namespace Obi [AddComponentMenu("Physics/Obi/Obi Instanced Particle Renderer", 1001)] [ExecuteInEditMode] [RequireComponent(typeof(ObiActor))] - public class ObiInstancedParticleRenderer : MonoBehaviour, ObiActorRenderer + public class ObiInstancedParticleRenderer : MonoBehaviour { + static ProfilerMarker m_DrawParticlesPerfMarker = new ProfilerMarker("DrawParticles"); + + public bool render = true; public Mesh mesh; public Material material; - public RenderBatchParams renderParameters = new RenderBatchParams(true); - public Color instanceColor = Color.white; - public float instanceScale = 1; + public Vector3 instanceScale = Vector3.one; - public ObiActor actor { get; private set; } + private List matrices = new List(); + private List colors = new List(); + private MaterialPropertyBlock mpb; - void Awake() - { - actor = GetComponent(); - } + int meshesPerBatch = 0; + int batchCount; public void OnEnable() { - ((ObiActorRenderer)this).EnableRenderer(); + GetComponent().OnInterpolate += DrawParticles; } public void OnDisable() { - ((ObiActorRenderer)this).DisableRenderer(); + GetComponent().OnInterpolate -= DrawParticles; } - public void OnValidate() + void DrawParticles(ObiActor actor) { - ((ObiActorRenderer)this).SetRendererDirty(Oni.RenderingSystemType.InstancedParticles); - } - - RenderSystem ObiRenderer.CreateRenderSystem(ObiSolver solver) - { - switch (solver.backendType) + using (m_DrawParticlesPerfMarker.Auto()) { -#if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) - case ObiSolver.BackendType.Burst: return new BurstInstancedParticleRenderSystem(solver); -#endif - case ObiSolver.BackendType.Compute: - default: + if (mesh == null || material == null || !render || !isActiveAndEnabled || !actor.isActiveAndEnabled || actor.solver == null) + { + return; + } - if (SystemInfo.supportsComputeShaders) - return new ComputeInstancedParticleRenderSystem(solver); - return null; + ObiSolver solver = actor.solver; + + // figure out the size of our instance batches: + meshesPerBatch = Constants.maxInstancesPerBatch; + batchCount = actor.particleCount / meshesPerBatch + 1; + meshesPerBatch = Mathf.Min(meshesPerBatch, actor.particleCount); + + Vector4 basis1 = new Vector4(1, 0, 0, 0); + Vector4 basis2 = new Vector4(0, 1, 0, 0); + Vector4 basis3 = new Vector4(0, 0, 1, 0); + + //Convert particle data to mesh instances: + for (int i = 0; i < batchCount; i++) + { + + matrices.Clear(); + colors.Clear(); + mpb = new MaterialPropertyBlock(); + int limit = Mathf.Min((i + 1) * meshesPerBatch, actor.activeParticleCount); + + for (int j = i * meshesPerBatch; j < limit; ++j) + { + int solverIndex = actor.solverIndices[j]; + actor.GetParticleAnisotropy(solverIndex, ref basis1, ref basis2, ref basis3); + matrices.Add(Matrix4x4.TRS(actor.GetParticlePosition(solverIndex), + actor.GetParticleOrientation(solverIndex), + Vector3.Scale(new Vector3(basis1[3], basis2[3], basis3[3]), instanceScale))); + colors.Add(actor.GetParticleColor(solverIndex)); + } + + if (colors.Count > 0) + mpb.SetVectorArray("_Color", colors); + + // Send the meshes to be drawn: + Graphics.DrawMeshInstanced(mesh, 0, material, matrices, mpb); + } } + } } diff --git a/Assets/Obi/Scripts/Common/Rendering/ObiParticleRenderSystem.cs b/Assets/Obi/Scripts/Common/Rendering/ObiParticleRenderSystem.cs deleted file mode 100644 index b84ed1b37..000000000 --- a/Assets/Obi/Scripts/Common/Rendering/ObiParticleRenderSystem.cs +++ /dev/null @@ -1,145 +0,0 @@ -using UnityEngine; -using System.Collections.Generic; -using UnityEngine.Rendering; -using Unity.Profiling; -using System.Runtime.InteropServices; - -namespace Obi -{ - [StructLayout(LayoutKind.Sequential)] - public struct ParticleVertex - { - public Vector4 pos; - public Vector3 offset; - public Vector4 color; - public Vector4 b1; - public Vector4 b2; - public Vector4 b3; - } - - public abstract class ObiParticleRenderSystem : RenderSystem - { - public Oni.RenderingSystemType typeEnum { get => Oni.RenderingSystemType.Particles; } - - public RendererSet renderers { get; } = new RendererSet(); - public bool isSetup => activeParticles != null; - - protected VertexAttributeDescriptor[] layout = - { - new VertexAttributeDescriptor(VertexAttribute.Position, VertexAttributeFormat.Float32, 4), - new VertexAttributeDescriptor(VertexAttribute.Normal, VertexAttributeFormat.Float32, 3), - new VertexAttributeDescriptor(VertexAttribute.Color, VertexAttributeFormat.Float32, 4), - new VertexAttributeDescriptor(VertexAttribute.TexCoord0, VertexAttributeFormat.Float32, 4), - new VertexAttributeDescriptor(VertexAttribute.TexCoord1, VertexAttributeFormat.Float32, 4), - new VertexAttributeDescriptor(VertexAttribute.TexCoord2, VertexAttributeFormat.Float32, 4) - }; - - static protected ProfilerMarker m_SetupRenderMarker = new ProfilerMarker("SetupParticleRendering"); - static protected ProfilerMarker m_RenderMarker = new ProfilerMarker("ParticleRendering"); - - protected ObiSolver m_Solver; - - protected List> batchList = new List>(); - - protected ObiNativeList activeParticles; - protected ObiNativeList rendererIndex; - protected ObiNativeList rendererData; - - public ObiParticleRenderSystem(ObiSolver solver) - { - m_Solver = solver; - - activeParticles = new ObiNativeList(); - rendererIndex = new ObiNativeList(); - rendererData = new ObiNativeList(); - } - - public virtual void Dispose() - { - for (int i = 0; i < batchList.Count; ++i) - batchList[i].Dispose(); - batchList.Clear(); - - if (activeParticles != null) - activeParticles.Dispose(); - if (rendererData != null) - rendererData.Dispose(); - if (rendererIndex != null) - rendererIndex.Dispose(); - } - - protected virtual void Clear() - { - for (int i = 0; i < batchList.Count; ++i) - batchList[i].Dispose(); - batchList.Clear(); - - activeParticles.Clear(); - rendererData.Clear(); - rendererIndex.Clear(); - } - - protected virtual void CreateBatches() - { - // generate batches: - for (int i = 0; i < renderers.Count; ++i) - { - renderers[i].renderParameters.layer = renderers[i].gameObject.layer; - batchList.Add(new ProceduralRenderBatch(i, renderers[i].material, renderers[i].renderParameters)); - } - - // sort batches: - batchList.Sort(); - - int particleCount = 0; - for (int i = 0; i < batchList.Count; ++i) - { - var batch = batchList[i]; - var renderer = renderers[batch.firstRenderer]; - int actorParticleCount = renderer.actor.particleCount; - - batch.vertexCount += actorParticleCount * 4; - batch.triangleCount += actorParticleCount * 2; - - batch.firstParticle = particleCount; - particleCount += actorParticleCount; - - // add particles here, respecting batch order: - activeParticles.AddRange(renderer.actor.solverIndices, actorParticleCount); - rendererData.Add(new ParticleRendererData(renderer.particleColor, renderer.radiusScale)); - rendererIndex.AddReplicate(i, actorParticleCount); - } - } - - protected virtual void CloseBatches() - { - // Initialize each batch: - for (int i = 0; i < batchList.Count; ++i) - batchList[i].Initialize(layout); - } - - public virtual void Setup() - { - using (m_SetupRenderMarker.Auto()) - { - Clear(); - - CreateBatches(); - - ObiUtils.MergeBatches(batchList); - - CloseBatches(); - - } - } - - public virtual void Step() - { - } - - public virtual void Render() - { - } - } -} - diff --git a/Assets/Obi/Scripts/Common/Rendering/ObiParticleRenderSystem.cs.meta b/Assets/Obi/Scripts/Common/Rendering/ObiParticleRenderSystem.cs.meta deleted file mode 100644 index e2307d239..000000000 --- a/Assets/Obi/Scripts/Common/Rendering/ObiParticleRenderSystem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5e36441d408a548d29fbc80dfa4fffc1 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Rendering/ObiParticleRenderer.cs b/Assets/Obi/Scripts/Common/Rendering/ObiParticleRenderer.cs index ab677004d..e85ed0f87 100644 --- a/Assets/Obi/Scripts/Common/Rendering/ObiParticleRenderer.cs +++ b/Assets/Obi/Scripts/Common/Rendering/ObiParticleRenderer.cs @@ -1,78 +1,110 @@ using UnityEngine; +using Unity.Profiling; +using System; +using System.Threading; +using System.Collections; +using System.Collections.Generic; namespace Obi { - public interface IParticleRenderer - { - public ObiActor actor { get; } - public Color particleColor { get; } - public float radiusScale { get; } - } - - public struct ParticleRendererData - { - public Color color; - public float radiusScale; - - public ParticleRendererData(Color color, float radiusScale) - { - this.color = color; - this.radiusScale = radiusScale; - } - } - [AddComponentMenu("Physics/Obi/Obi Particle Renderer", 1000)] [ExecuteInEditMode] [RequireComponent(typeof(ObiActor))] - public class ObiParticleRenderer : MonoBehaviour, IParticleRenderer, ObiActorRenderer + public class ObiParticleRenderer : MonoBehaviour { - public Material material; - public RenderBatchParams renderParameters = new RenderBatchParams(true); + static ProfilerMarker m_DrawParticlesPerfMarker = new ProfilerMarker("DrawParticles"); - [field: SerializeField] - public Color particleColor { get; set; } = Color.white; + public bool render = true; + public Shader shader; + public Color particleColor = Color.white; + public float radiusScale = 1; + private ParticleImpostorRendering m_Impostors; - [field: SerializeField] - public float radiusScale { get; set; } = 1; - - public ObiActor actor { get; private set; } - - public void Awake() + public IEnumerable ParticleMeshes { - actor = GetComponent(); + get { return impostors.Meshes; } } + public ParticleImpostorRendering impostors + { + get { + if (m_Impostors == null) + m_Impostors = new ParticleImpostorRendering(); + return m_Impostors; + } + } + + public Material ParticleMaterial { get; private set; } + public void OnEnable() { - ((ObiActorRenderer)this).EnableRenderer(); + GetComponent().OnInterpolate += DrawParticles; } public void OnDisable() { - ((ObiActorRenderer)this).DisableRenderer(); + GetComponent().OnInterpolate -= DrawParticles; + + if (m_Impostors != null) + m_Impostors.ClearMeshes(); + + DestroyImmediate(ParticleMaterial); } - public void OnValidate() + void CreateMaterialIfNeeded() { - ((ObiActorRenderer)this).SetRendererDirty(Oni.RenderingSystemType.Particles); - } - RenderSystem ObiRenderer.CreateRenderSystem(ObiSolver solver) - { - switch (solver.backendType) + if (shader != null) { + if (!shader.isSupported) + Debug.LogWarning("Particle rendering shader not suported."); -#if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) - case ObiSolver.BackendType.Burst: return new BurstParticleRenderSystem(solver); -#endif - case ObiSolver.BackendType.Compute: - default: - - if (SystemInfo.supportsComputeShaders) - return new ComputeParticleRenderSystem(solver); - return null; + if (ParticleMaterial == null || ParticleMaterial.shader != shader) + { + DestroyImmediate(ParticleMaterial); + ParticleMaterial = new Material(shader); + ParticleMaterial.hideFlags = HideFlags.HideAndDontSave; + } } } + + void DrawParticles(ObiActor actor) + { + using (m_DrawParticlesPerfMarker.Auto()) + { + if (!isActiveAndEnabled || !actor.isActiveAndEnabled || actor.solver == null) + { + impostors.ClearMeshes(); + return; + } + + CreateMaterialIfNeeded(); + + impostors.UpdateMeshes(actor); + + DrawParticles(); + } + } + + private void DrawParticles() + { + if (ParticleMaterial != null) + { + + ParticleMaterial.SetFloat("_RadiusScale", radiusScale); + ParticleMaterial.SetColor("_Color", particleColor); + + // Send the meshes to be drawn: + if (render) + { + var meshes = ParticleMeshes; + foreach (Mesh mesh in meshes) + Graphics.DrawMesh(mesh, Matrix4x4.identity, ParticleMaterial, gameObject.layer); + } + } + + } + } } diff --git a/Assets/Obi/Scripts/Common/Rendering/ObiParticleRenderer.cs.meta b/Assets/Obi/Scripts/Common/Rendering/ObiParticleRenderer.cs.meta index 58bfe07b6..3d6569971 100644 --- a/Assets/Obi/Scripts/Common/Rendering/ObiParticleRenderer.cs.meta +++ b/Assets/Obi/Scripts/Common/Rendering/ObiParticleRenderer.cs.meta @@ -1,10 +1,11 @@ fileFormatVersion: 2 guid: c8b45ebbf86be4df6b0e6cd933812af2 +timeCreated: 1521054123 +licenseType: Store MonoImporter: - externalObjects: {} serializedVersion: 2 defaultReferences: - - material: {fileID: 2100000, guid: fb88690dea2394644849cde5abd037f9, type: 2} + - shader: {fileID: 4800000, guid: 801733041f66b49e1b3c2101471db877, type: 3} executionOrder: 0 icon: {fileID: 2800000, guid: f424a87c9f03240c2870a664731ac9aa, type: 3} userData: diff --git a/Assets/Obi/Scripts/Common/Rendering/ObiRenderer.cs b/Assets/Obi/Scripts/Common/Rendering/ObiRenderer.cs deleted file mode 100644 index 8d8622deb..000000000 --- a/Assets/Obi/Scripts/Common/Rendering/ObiRenderer.cs +++ /dev/null @@ -1,65 +0,0 @@ -using UnityEngine; - -namespace Obi -{ - public interface ObiRenderer where T : ObiRenderer - { - protected RenderSystem CreateRenderSystem(ObiSolver solver); - - public bool ValidateRenderer() { return true; } - public void CleanupRenderer() { } - - protected bool UnregisterRenderer(ObiSolver solver) - { - CleanupRenderer(); - - // try to get a render system from the solver: - var system = solver.GetRenderSystem(); - - // if there's an existing render system for this kind of renderer, - // unregister from it. - if (system != null && system.RemoveRenderer((T)this)) - { - // if the render system is empty, destroy it: - if (system.isEmpty) - { - solver.UnregisterRenderSystem(system); - system.Dispose(); - } - - solver.dirtyRendering |= (int)system.typeEnum; - return true; - } - - return false; - } - - protected bool RegisterRenderer(ObiSolver solver) - { - if (ValidateRenderer()) - { - // try to get a render system from the solver: - var system = solver.GetRenderSystem(); - - // if no appropiate system has been created yet, create it: - if (system == null) - { - system = CreateRenderSystem(solver) as RenderSystem; - solver.RegisterRenderSystem(system); - } - - // register in the renderer: - if (system != null) - { - if (system.AddRenderer((T)this)) - { - solver.dirtyRendering |= (int)system.typeEnum; - return true; - } - } - } - - return false; - } - } -} diff --git a/Assets/Obi/Scripts/Common/Rendering/ObiRenderer.cs.meta b/Assets/Obi/Scripts/Common/Rendering/ObiRenderer.cs.meta deleted file mode 100644 index ae92becb7..000000000 --- a/Assets/Obi/Scripts/Common/Rendering/ObiRenderer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7d4f237ec9acf4df0a30d5a0139e0f36 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Rendering/RenderBatches.meta b/Assets/Obi/Scripts/Common/Rendering/RenderBatches.meta deleted file mode 100644 index 66adb0b7a..000000000 --- a/Assets/Obi/Scripts/Common/Rendering/RenderBatches.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7f9c5efc94e964016b39c7778b3af164 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Rendering/RenderBatches/DynamicRenderBatch.cs b/Assets/Obi/Scripts/Common/Rendering/RenderBatches/DynamicRenderBatch.cs deleted file mode 100644 index ba2f0949b..000000000 --- a/Assets/Obi/Scripts/Common/Rendering/RenderBatches/DynamicRenderBatch.cs +++ /dev/null @@ -1,368 +0,0 @@ -using System; -using UnityEngine; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using UnityEngine.Rendering; - -namespace Obi -{ - [StructLayout(LayoutKind.Sequential)] - public struct DynamicBatchVertex - { - public Vector3 pos; - public Vector3 normal; - public Vector4 tangent; - public Vector4 color; - } - - [StructLayout(LayoutKind.Sequential)] - public struct StaticBatchVertex - { - public Vector2 uv; - public Vector2 uv2; - public Vector2 uv3; - public Vector2 uv4; - } - - public class DynamicRenderBatch : IRenderBatch where T : IMeshDataProvider, IActorRenderer - { - private VertexAttributeDescriptor[] vertexLayout; - - private RenderBatchParams renderBatchParams; - public RenderParams renderParams { get; private set; } - - public Material[] materials; - public Mesh mesh; - - public int firstRenderer; - public int rendererCount; - - public ObiNativeList vertexToRenderer; // for each vertex in the batch, index of its renderer - public ObiNativeList particleToRenderer; // for each particle in the batch, index of its renderer - - public ObiNativeList particleIndices; // solver indices for all renderers in the batch - - public ObiNativeList dynamicVertexData; - public ObiNativeList staticVertexData; - public ObiNativeList triangles; - - public GraphicsBuffer gpuVertexBuffer; - - public int vertexCount; - public int triangleCount => triangles.count / 3; - public int particleCount => particleIndices.count; - - public DynamicRenderBatch(int rendererIndex, int vertexCount, Material[] materials, RenderBatchParams param) - { - this.renderBatchParams = param; - this.materials = materials; - this.vertexCount = vertexCount; - - this.firstRenderer = rendererIndex; - this.rendererCount = 1; - } - - public void Initialize(List renderers, - MeshDataBatch meshData, - ObiNativeList meshIndices, - VertexAttributeDescriptor[] layout, - bool gpu = false) - { - renderParams = renderBatchParams.ToRenderParams(); - vertexLayout = layout; - - mesh = new Mesh(); - - vertexToRenderer = new ObiNativeList(); - particleToRenderer = new ObiNativeList(); - particleIndices = new ObiNativeList(); - - dynamicVertexData = new ObiNativeList(); - staticVertexData = new ObiNativeList(); - triangles = new ObiNativeList(); - - // there will be exactly one submesh per material in the output batch. - // so we iterate trough materials, and for each one, build a submesh by merging the - // renderer's submeshes. If a renderer has less submeshes than materials, reuse the last one. - - SubMeshDescriptor[] descriptors = new SubMeshDescriptor[materials.Length]; - - for (int m = 0; m < materials.Length; ++m) - { - int vertexOffset = 0; - var desc = new SubMeshDescriptor(); - desc.indexStart = triangles.count; - - for (int i = firstRenderer; i < firstRenderer + rendererCount; ++i) - { - var renderer = renderers[i]; - int meshIndex = meshIndices[i]; - int submeshIndex = Mathf.Min(m, renderer.sourceMesh.subMeshCount - 1); - var submeshInfo = renderer.sourceMesh.GetSubMesh(submeshIndex); - - var meshTriangles = meshData.GetTriangles(meshIndex); - for (int k = 0; k < renderer.meshInstances; ++k) - { - // append submesh triangles: - for (int t = submeshInfo.indexStart; t < submeshInfo.indexStart + submeshInfo.indexCount; ++t) - triangles.Add(vertexOffset + meshTriangles[t]); - - vertexOffset += meshData.GetVertexCount(meshIndex); - } - } - - desc.indexCount = triangles.count - desc.indexStart; - descriptors[m] = desc; - } - - // vertices: - for (int i = firstRenderer; i < firstRenderer + rendererCount; ++i) - { - var renderer = renderers[i]; - int meshIndex = meshIndices[i]; - - int vCount = meshData.GetVertexCount(meshIndex); - - for (int k = 0; k < renderer.meshInstances; ++k) - { - vertexToRenderer.AddReplicate(i, vCount); - particleToRenderer.AddReplicate(i, renderer.actor.solverIndices.count); - particleIndices.AddRange(renderer.actor.solverIndices); - - var verts = meshData.GetVertices(meshIndex); - var norms = meshData.GetNormals(meshIndex); - var tan = meshData.GetTangents(meshIndex); - var col = meshData.GetColors(meshIndex); - - var uv = meshData.GetUV(meshIndex); - var uv2 = meshData.GetUV2(meshIndex); - var uv3 = meshData.GetUV3(meshIndex); - var uv4 = meshData.GetUV4(meshIndex); - - for (int j = 0; j < vCount; ++j) - { - dynamicVertexData.Add(new DynamicBatchVertex - { - pos = verts[j], - normal = norms[j], - tangent = tan[j], - color = j < col.Length ? (Vector4)col[j] : Vector4.one - }); - - staticVertexData.Add(new StaticBatchVertex - { - uv = j < uv.Length ? uv[j] : Vector2.zero, - uv2 = j < uv2.Length ? uv2[j] : Vector2.zero, - uv3 = j < uv3.Length ? uv3[j] : Vector2.zero, - uv4 = j < uv4.Length ? uv4[j] : Vector2.zero, - }); - } - } - } - - // setup combined mesh: - mesh.SetVertexBufferParams(vertexCount, layout); - mesh.SetIndexBufferParams(triangles.count, IndexFormat.UInt32); - - mesh.SetVertexBufferData(dynamicVertexData.AsNativeArray(), 0, 0, dynamicVertexData.count, 0, MeshUpdateFlags.DontRecalculateBounds | MeshUpdateFlags.DontValidateIndices); - mesh.SetVertexBufferData(staticVertexData.AsNativeArray(), 0, 0, staticVertexData.count, 1, MeshUpdateFlags.DontRecalculateBounds | MeshUpdateFlags.DontValidateIndices); - - mesh.SetIndexBufferData(triangles.AsNativeArray(), 0, 0, triangles.count, MeshUpdateFlags.DontRecalculateBounds | MeshUpdateFlags.DontValidateIndices); - - // set submeshes: - mesh.subMeshCount = materials.Length; - for (int m = 0; m < materials.Length; ++m) - mesh.SetSubMesh(m, descriptors[m], MeshUpdateFlags.DontRecalculateBounds | MeshUpdateFlags.DontValidateIndices); - - if (gpu) - { - dynamicVertexData.Dispose(); - - mesh.vertexBufferTarget |= GraphicsBuffer.Target.Raw; - - // meshes with no vertices will have no vertex buffer, and Unity will throw an exception. - try - { - if (mesh.vertexCount > 0) - { - gpuVertexBuffer ??= mesh.GetVertexBuffer(0); - } - } - catch (Exception e) - { - Debug.LogException(e); - } - - particleIndices.AsComputeBuffer(); - vertexToRenderer.AsComputeBuffer(); - particleToRenderer.AsComputeBuffer(); - } - } - - public void Dispose() - { - if (vertexToRenderer != null) - vertexToRenderer.Dispose(); - if (particleToRenderer != null) - particleToRenderer.Dispose(); - - if (particleIndices != null) - particleIndices.Dispose(); - - if (dynamicVertexData != null) - dynamicVertexData.Dispose(); - if (staticVertexData != null) - staticVertexData.Dispose(); - if (triangles != null) - triangles.Dispose(); - - gpuVertexBuffer?.Dispose(); - gpuVertexBuffer = null; - - GameObject.DestroyImmediate(mesh); - } - - public bool TryMergeWith(IRenderBatch other) - { - var pbatch = other as DynamicRenderBatch; - if (pbatch != null) - { - if (CompareTo(pbatch) == 0 && - vertexCount + pbatch.vertexCount < Constants.maxVertsPerMesh) - { - rendererCount += pbatch.rendererCount; - vertexCount += pbatch.vertexCount; - return true; - } - } - return false; - } - - private static int CompareMaterialLists(Material[] a, Material[] b) - { - int l = Mathf.Min(a.Length, b.Length); - for (int i = 0; i < l; ++i) - { - if (a[i] == null && b[i] == null) - return 0; - - if (a[i] == null) return -1; - if (b[i] == null) return 1; - - int compare = a[i].GetInstanceID().CompareTo(b[i].GetInstanceID()); - if (compare != 0) - return compare; - } - return a.Length.CompareTo(b.Length); - } - - public int CompareTo(IRenderBatch other) - { - var pbatch = other as DynamicRenderBatch; - int result = CompareMaterialLists(materials, pbatch.materials); - if (result == 0) - return renderBatchParams.CompareTo(pbatch.renderBatchParams); - return result; - } - - public void BakeMesh(List renderers, - T renderer, - ref Mesh bakedMesh, bool transformToActorLocalSpace = false) - { - // if the dynamic data is not available (such as when the batch is intended for GPU use), read it back: - bool gpu = !dynamicVertexData.isCreated || dynamicVertexData == null; - if (gpu) - { - dynamicVertexData = new ObiNativeList(); - dynamicVertexData.ResizeUninitialized(this.vertexCount); - var nativeArray = dynamicVertexData.AsNativeArray(); - AsyncGPUReadback.RequestIntoNativeArray(ref nativeArray, gpuVertexBuffer, this.vertexCount * dynamicVertexData.stride, 0).WaitForCompletion(); - } - - bakedMesh.Clear(); - - int vOffset = 0; - int tOffset = 0; - - for (int i = firstRenderer; i < firstRenderer + rendererCount; ++i) - { - // Count vertices of all instances: - int vCount = 0; - for (int k = 0; k < renderers[i].meshInstances; ++k) - vCount += renderers[i].sourceMesh.vertexCount; - - // Count triangles of all submeshes/instances: - int tCount = 0; - for (int m = 0; m < materials.Length; ++m) - { - int submeshIndex = Mathf.Min(m, renderers[i].sourceMesh.subMeshCount - 1); - var submeshInfo = renderers[i].sourceMesh.GetSubMesh(submeshIndex); - tCount += submeshInfo.indexCount * (int)renderers[i].meshInstances; - } - - // if this is the renderer we're interested in, populate the mesh: - if (renderers[i].Equals(renderer)) - { - bakedMesh.SetVertexBufferParams(vCount, vertexLayout); - bakedMesh.SetVertexBufferData(dynamicVertexData.AsNativeArray(), vOffset, 0, vCount, 0, MeshUpdateFlags.DontRecalculateBounds | MeshUpdateFlags.DontValidateIndices); - bakedMesh.SetVertexBufferData(staticVertexData.AsNativeArray(), vOffset, 0, vCount, 1, MeshUpdateFlags.DontRecalculateBounds | MeshUpdateFlags.DontValidateIndices); - - // transform vertices from solver space to actor space: - if (transformToActorLocalSpace) - { - var solver2Actor = renderer.actor.actorSolverToLocalMatrix; - var verts = bakedMesh.vertices; - for (int v = 0; v < verts.Length; ++v) - verts[v] = solver2Actor.MultiplyPoint3x4(verts[v]); - bakedMesh.vertices = verts; - } - - ObiNativeList indices = new ObiNativeList(tCount); - - // calculate submeshes (one submesh per material): - SubMeshDescriptor[] descriptors = new SubMeshDescriptor[materials.Length]; - for (int m = 0; m < materials.Length; ++m) - { - int vertexOffset = 0; - var desc = new SubMeshDescriptor(); - desc.indexStart = indices.count; - - int submeshIndex = Mathf.Min(m, renderer.sourceMesh.subMeshCount - 1); - var submeshInfo = renderer.sourceMesh.GetSubMesh(submeshIndex); - - for (int k = 0; k < renderer.meshInstances; ++k) - { - // append submesh triangles: - var meshTriangles = renderer.sourceMesh.triangles; - for (int t = submeshInfo.indexStart; t < submeshInfo.indexStart + submeshInfo.indexCount; ++t) - indices.Add(vertexOffset + meshTriangles[t]); - - vertexOffset += renderer.sourceMesh.vertexCount; - } - - desc.indexCount = indices.count - desc.indexStart; - descriptors[m] = desc; - } - - bakedMesh.SetIndexBufferParams(tCount, IndexFormat.UInt32); - bakedMesh.SetIndexBufferData(indices.AsNativeArray(), 0, 0, tCount, MeshUpdateFlags.DontRecalculateBounds | MeshUpdateFlags.DontValidateIndices); - - bakedMesh.subMeshCount = materials.Length; - for (int m = 0; m < materials.Length; ++m) - bakedMesh.SetSubMesh(m, descriptors[m], MeshUpdateFlags.DontValidateIndices); - - bakedMesh.RecalculateBounds(); - return; - } - - vOffset += vCount; - tOffset += tCount; - } - - if (gpu) - { - dynamicVertexData.Dispose(); - } - } - } -} diff --git a/Assets/Obi/Scripts/Common/Rendering/RenderBatches/DynamicRenderBatch.cs.meta b/Assets/Obi/Scripts/Common/Rendering/RenderBatches/DynamicRenderBatch.cs.meta deleted file mode 100644 index 4d34bf848..000000000 --- a/Assets/Obi/Scripts/Common/Rendering/RenderBatches/DynamicRenderBatch.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5bee4cda10f5944149b6f8c90a947c49 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Rendering/RenderBatches/IRenderBatch.cs b/Assets/Obi/Scripts/Common/Rendering/RenderBatches/IRenderBatch.cs deleted file mode 100644 index ef526a53c..000000000 --- a/Assets/Obi/Scripts/Common/Rendering/RenderBatches/IRenderBatch.cs +++ /dev/null @@ -1,77 +0,0 @@ -using System; -using System.Collections.Generic; - -using UnityEngine; -using UnityEngine.Rendering; - -namespace Obi -{ - public interface IRenderBatch : IComparable - { - bool TryMergeWith(IRenderBatch other); - } - - [Serializable] - public struct RenderBatchParams - { - [HideInInspector] public int layer; - public LightProbeUsage lightProbeUsage; - public ReflectionProbeUsage reflectionProbeUsage; - public ShadowCastingMode shadowCastingMode; - public bool receiveShadows; - public MotionVectorGenerationMode motionVectors; - public uint renderingLayerMask; - - public RenderBatchParams(bool receiveShadow) - { - layer = 0; - lightProbeUsage = LightProbeUsage.BlendProbes; - reflectionProbeUsage = ReflectionProbeUsage.BlendProbes; - shadowCastingMode = ShadowCastingMode.On; - receiveShadows = receiveShadow; - motionVectors = MotionVectorGenerationMode.Camera; - renderingLayerMask = 0xffffffff; - } - - public RenderBatchParams(Renderer renderer) - { - this.layer = renderer.gameObject.layer; - this.lightProbeUsage = renderer.lightProbeUsage; - this.reflectionProbeUsage = renderer.reflectionProbeUsage; - this.shadowCastingMode = renderer.shadowCastingMode; - this.receiveShadows = renderer.receiveShadows; - this.motionVectors = renderer.motionVectorGenerationMode; - this.renderingLayerMask = renderer.renderingLayerMask; - } - - public int CompareTo(RenderBatchParams param) - { - int cmp = layer.CompareTo(param.layer); - if (cmp == 0) cmp = renderingLayerMask.CompareTo(param.renderingLayerMask); - if (cmp == 0) cmp = lightProbeUsage.CompareTo(param.lightProbeUsage); - if (cmp == 0) cmp = reflectionProbeUsage.CompareTo(param.reflectionProbeUsage); - if (cmp == 0) cmp = shadowCastingMode.CompareTo(param.shadowCastingMode); - if (cmp == 0) cmp = receiveShadows.CompareTo(param.receiveShadows); - if (cmp == 0) cmp = motionVectors.CompareTo(param.motionVectors); - - return cmp; - } - - public RenderParams ToRenderParams() - { - var renderParams = new RenderParams(); - - // URP and HDRP don't work without this line. - renderParams.renderingLayerMask = GraphicsSettings.defaultRenderingLayerMask; - - renderParams.lightProbeUsage = lightProbeUsage; - renderParams.reflectionProbeUsage = reflectionProbeUsage; - renderParams.shadowCastingMode = shadowCastingMode; - renderParams.receiveShadows = receiveShadows; - renderParams.motionVectorMode = motionVectors; - renderParams.renderingLayerMask = renderingLayerMask; - renderParams.layer = layer; - return renderParams; - } - } -} \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Rendering/RenderBatches/IRenderBatch.cs.meta b/Assets/Obi/Scripts/Common/Rendering/RenderBatches/IRenderBatch.cs.meta deleted file mode 100644 index ae666aba2..000000000 --- a/Assets/Obi/Scripts/Common/Rendering/RenderBatches/IRenderBatch.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4a827293101844d32bed440c32d08c83 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Rendering/RenderBatches/InstanceRenderBatch.cs b/Assets/Obi/Scripts/Common/Rendering/RenderBatches/InstanceRenderBatch.cs deleted file mode 100644 index 7883fba49..000000000 --- a/Assets/Obi/Scripts/Common/Rendering/RenderBatches/InstanceRenderBatch.cs +++ /dev/null @@ -1,141 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using UnityEngine; - -namespace Obi -{ - - [StructLayout(LayoutKind.Sequential)] - public struct ChunkData - { - public int rendererIndex; - public int offset; // index of the first element for each chunk. - - public ChunkData(int rendererIndex, int offset) - { - this.rendererIndex = rendererIndex; - this.offset = offset; - } - } - - public class InstancedRenderBatch : IRenderBatch - { - private RenderBatchParams renderBatchParams; - public RenderParams renderParams { get; private set; } - - public Mesh mesh; - public Material material; - - public int firstRenderer; - public int rendererCount; - - public int firstInstance; - public int instanceCount; - - public GraphicsBuffer argsBuffer; - - public InstancedRenderBatch(int rendererIndex, Mesh mesh, Material material, RenderBatchParams renderBatchParams) - { - this.renderBatchParams = renderBatchParams; - this.firstRenderer = rendererIndex; - this.rendererCount = 1; - this.mesh = mesh; - this.material = material; - this.firstInstance = 0; - this.instanceCount = 0; - } - - public void Initialize(bool gpu = false) - { - renderParams = renderBatchParams.ToRenderParams(); - - if (gpu) - argsBuffer = new GraphicsBuffer(GraphicsBuffer.Target.IndirectArguments, 1, 5 * sizeof(uint)); - } - - public void Dispose() - { - argsBuffer?.Dispose(); - argsBuffer = null; - } - - public bool TryMergeWith(IRenderBatch other) - { - var ibatch = other as InstancedRenderBatch; - if (ibatch != null) - { - if (CompareTo(ibatch) == 0 && - instanceCount + ibatch.instanceCount < Constants.maxInstancesPerBatch) - { - rendererCount += ibatch.rendererCount; - instanceCount += ibatch.instanceCount; - return true; - } - } - return false; - } - - public int CompareTo(IRenderBatch other) - { - var ibatch = other as InstancedRenderBatch; - - int idA = material != null ? material.GetInstanceID() : 0; int idB = (ibatch != null && ibatch.material != null) ? ibatch.material.GetInstanceID() : 0; - - int compareMat = idA.CompareTo(idB); - if (compareMat == 0) - { - idA = mesh != null ? mesh.GetInstanceID() : 0; - idB = (ibatch != null && ibatch.mesh != null) ? ibatch.mesh.GetInstanceID() : 0; - compareMat = idA.CompareTo(idB); - - if (compareMat == 0) - return renderBatchParams.CompareTo(ibatch.renderBatchParams); - } - - return compareMat; - } - - public void BakeMesh(RendererSet renderers, T renderer, ObiNativeList chunkData, - ObiNativeList instanceTransforms, - Matrix4x4 transform, - ref Mesh bakedMesh, bool transformVertices = false) where T:ObiRenderer - { - - // if the data is not available in the CPU (such as when the batch is intended for GPU use), read it back: - bool gpu = argsBuffer != null && argsBuffer.IsValid(); - if (gpu) - { - instanceTransforms.Readback(false); - } - - List combineInstances = new List(); - - bakedMesh.Clear(); - - for (int i = 0; i < chunkData.count; ++i) - { - // if this chunk's renderer is the renderer we are interested in, - // append its instances to the mesh. - if (renderers[chunkData[i].rendererIndex].Equals(renderer)) - { - int firstIndex = i > 0 ? chunkData[i - 1].offset : 0; - int elementCount = chunkData[i].offset - firstIndex; - - for (int m = 0; m < elementCount; ++m) - { - combineInstances.Add(new CombineInstance - { - mesh = mesh, - transform = transformVertices ? transform * instanceTransforms[firstIndex + m] : instanceTransforms[firstIndex + m] - }); - } - } - } - - bakedMesh.CombineMeshes(combineInstances.ToArray(), true, true, false); - bakedMesh.RecalculateBounds(); - - } - } -} diff --git a/Assets/Obi/Scripts/Common/Rendering/RenderBatches/InstanceRenderBatch.cs.meta b/Assets/Obi/Scripts/Common/Rendering/RenderBatches/InstanceRenderBatch.cs.meta deleted file mode 100644 index 9c35abb11..000000000 --- a/Assets/Obi/Scripts/Common/Rendering/RenderBatches/InstanceRenderBatch.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 74d879a363c7040229e215fe6c48a581 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Rendering/RenderBatches/ProceduralRenderBatch.cs b/Assets/Obi/Scripts/Common/Rendering/RenderBatches/ProceduralRenderBatch.cs deleted file mode 100644 index f43e853d4..000000000 --- a/Assets/Obi/Scripts/Common/Rendering/RenderBatches/ProceduralRenderBatch.cs +++ /dev/null @@ -1,186 +0,0 @@ - -using UnityEngine; -using UnityEngine.Rendering; -using Unity.Collections; -using System.Collections.Generic; -using Unity.Collections.LowLevel.Unsafe; - -namespace Obi -{ - - public class ProceduralRenderBatch : IRenderBatch where T : struct - { - private RenderBatchParams renderBatchParams; - public RenderParams renderParams { get; private set; } - - public Material material; - public Mesh mesh; - - public int firstRenderer; - public int rendererCount; - - public int firstParticle; - - public NativeArray vertices; - public NativeArray triangles; - - public GraphicsBuffer gpuVertexBuffer; - public GraphicsBuffer gpuIndexBuffer; - - public int vertexCount; - public int triangleCount; - - public ProceduralRenderBatch(int rendererIndex, Material material, RenderBatchParams param) - { - this.renderBatchParams = param; - - this.material = material; - this.firstRenderer = rendererIndex; - this.firstParticle = 0; - this.rendererCount = 1; - this.vertexCount = 0; - this.triangleCount = 0; - } - - public void Initialize(VertexAttributeDescriptor[] layout, bool gpu = false) - { - var rp = renderBatchParams.ToRenderParams(); - rp.material = material; - renderParams = rp; - - mesh = new Mesh(); - - mesh.SetVertexBufferParams(vertexCount, layout); - mesh.SetIndexBufferParams(triangleCount * 3, IndexFormat.UInt32); - - vertices = new NativeArray(vertexCount, Allocator.Persistent); - mesh.SetVertexBufferData(vertices, 0, 0, vertices.Length, 0, MeshUpdateFlags.DontRecalculateBounds | MeshUpdateFlags.DontValidateIndices); - - triangles = new NativeArray(triangleCount * 3, Allocator.Persistent); - mesh.SetIndexBufferData(triangles, 0, 0, triangles.Length, MeshUpdateFlags.DontRecalculateBounds | MeshUpdateFlags.DontValidateIndices); - - mesh.subMeshCount = 1; - SubMeshDescriptor subMeshDescriptor = new SubMeshDescriptor(); - subMeshDescriptor.indexCount = triangleCount * 3; - mesh.SetSubMesh(0, subMeshDescriptor, MeshUpdateFlags.DontRecalculateBounds | MeshUpdateFlags.DontValidateIndices); - - if (gpu) - { - vertices.Dispose(); - triangles.Dispose(); - - mesh.vertexBufferTarget |= GraphicsBuffer.Target.Raw; - mesh.indexBufferTarget |= GraphicsBuffer.Target.Raw; - - // particles with no vertices will have no vertex buffer, and Unity will throw an exception. - if (mesh.vertexCount > 0) - { - gpuVertexBuffer ??= mesh.GetVertexBuffer(0); - gpuIndexBuffer ??= mesh.GetIndexBuffer(); - } - } - } - - public void Dispose() - { - gpuVertexBuffer?.Dispose(); - gpuIndexBuffer?.Dispose(); - - gpuVertexBuffer = null; - gpuIndexBuffer = null; - - if (vertices.IsCreated) - vertices.Dispose(); - if (triangles.IsCreated) - triangles.Dispose(); - - GameObject.DestroyImmediate(mesh); - } - - public bool TryMergeWith(IRenderBatch other) - { - var pbatch = other as ProceduralRenderBatch; - if (pbatch != null) - { - if (CompareTo(pbatch) == 0 && - vertexCount + pbatch.vertexCount < Constants.maxVertsPerMesh) - { - rendererCount += pbatch.rendererCount; - triangleCount += pbatch.triangleCount; - vertexCount += pbatch.vertexCount; - return true; - } - } - return false; - } - - public int CompareTo(IRenderBatch other) - { - var pbatch = other as ProceduralRenderBatch; int idA = material != null ? material.GetInstanceID() : 0; int idB = (pbatch != null && pbatch.material != null) ? pbatch.material.GetInstanceID() : 0; int result = idA.CompareTo(idB); if (result == 0) return renderBatchParams.CompareTo(pbatch.renderBatchParams); return result; - } - - public void BakeMesh(int vertexOffset, int vertexCount, int triangleOffset, int triangleCount, - Matrix4x4 transform, - ref Mesh bakedMesh, bool transformVertices = false) - { - - // if the data is not available in the CPU (such as when the batch is intended for GPU use), read it back: - bool gpu = !vertices.IsCreated; - if (gpu) - { - vertices = new NativeArray(this.vertexCount, Allocator.Persistent); - triangles = new NativeArray(this.triangleCount * 3, Allocator.Persistent); - AsyncGPUReadback.RequestIntoNativeArray(ref vertices, gpuVertexBuffer, this.vertexCount * UnsafeUtility.SizeOf(), 0).WaitForCompletion(); - AsyncGPUReadback.RequestIntoNativeArray(ref triangles, gpuIndexBuffer, this.triangleCount * 3 * 4, 0).WaitForCompletion(); - } - - bakedMesh.Clear(); - - bakedMesh.SetVertexBufferParams(vertexCount, mesh.GetVertexAttributes()); - bakedMesh.SetVertexBufferData(vertices, vertexOffset, 0, vertexCount, 0, MeshUpdateFlags.DontRecalculateBounds | MeshUpdateFlags.DontValidateIndices); - - // transform vertices from solver space to actor space: - if (transformVertices) - { - var solver2Actor = transform; - var verts = bakedMesh.vertices; - for (int v = 0; v < verts.Length; ++v) - verts[v] = solver2Actor.MultiplyPoint3x4(verts[v]); - bakedMesh.vertices = verts; - } - - ObiNativeList indices = new ObiNativeList(triangleCount * 3); - - // offset indices: - for (int i = 0; i < triangleCount * 3; ++i) - { - int index = triangles[triangleOffset * 3 + i] - vertexOffset; - - // clamp indices to zero, since decimated ropes have unused triangles - // that reference vertex 0. Subtracting the vertex offset from these results in a negative index. - indices.Add(Mathf.Max(0,index)); - } - - bakedMesh.SetIndexBufferParams(triangleCount * 3, IndexFormat.UInt32); - bakedMesh.SetIndexBufferData(indices.AsNativeArray(), 0, 0, triangleCount * 3, MeshUpdateFlags.DontRecalculateBounds | MeshUpdateFlags.DontValidateIndices); - - bakedMesh.subMeshCount = 1; - SubMeshDescriptor subMeshDescriptor = new SubMeshDescriptor(); - subMeshDescriptor.indexCount = triangleCount * 3; // mesh triangle count. - bakedMesh.SetSubMesh(0, subMeshDescriptor, MeshUpdateFlags.DontValidateIndices); - - if (gpu) - { - if (vertices.IsCreated) - vertices.Dispose(); - if (triangles.IsCreated) - triangles.Dispose(); - } - - bakedMesh.RecalculateBounds(); - return; - - } - } - -} \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Rendering/RenderBatches/ProceduralRenderBatch.cs.meta b/Assets/Obi/Scripts/Common/Rendering/RenderBatches/ProceduralRenderBatch.cs.meta deleted file mode 100644 index 326186ae2..000000000 --- a/Assets/Obi/Scripts/Common/Rendering/RenderBatches/ProceduralRenderBatch.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ded06625ac9f94b1fa77fd845bb28ec9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Rendering/ShadowmapExposer.cs b/Assets/Obi/Scripts/Common/Rendering/ShadowmapExposer.cs new file mode 100644 index 000000000..096b0dcc1 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Rendering/ShadowmapExposer.cs @@ -0,0 +1,70 @@ +using System; +using UnityEngine; +using UnityEngine.Rendering; + +namespace Obi{ +public class ShadowmapExposer : MonoBehaviour +{ + Light unityLight; + CommandBuffer afterShadow = null; + public ObiParticleRenderer[] particleRenderers; + + public void Awake(){ + unityLight = GetComponent(); + } + + public void OnEnable(){ + Cleanup(); + + afterShadow = new CommandBuffer(); + afterShadow.name = "FluidShadows"; + unityLight.AddCommandBuffer (LightEvent.AfterShadowMapPass, afterShadow); + } + + public void OnDisable(){ + Cleanup(); + } + + private void Cleanup(){ + + if (afterShadow != null){ + unityLight.RemoveCommandBuffer (LightEvent.AfterShadowMapPass,afterShadow); + afterShadow = null; + } + } + + + public void SetupFluidShadowsCommandBuffer() + { + afterShadow.Clear(); + + if (particleRenderers == null) + return; + + foreach(ObiParticleRenderer renderer in particleRenderers){ + if (renderer != null){ + foreach(Mesh mesh in renderer.ParticleMeshes) + afterShadow.DrawMesh(mesh,Matrix4x4.identity,renderer.ParticleMaterial,0,1); + } + } + + afterShadow.SetGlobalTexture ("_MyShadowMap", new RenderTargetIdentifier(BuiltinRenderTextureType.CurrentActive)); + } + + // Use this for initialization + void Update() + { + bool act = gameObject.activeInHierarchy && enabled; + if (!act || particleRenderers == null || particleRenderers.Length == 0) + { + Cleanup(); + return; + } + + if (afterShadow != null) + { + SetupFluidShadowsCommandBuffer(); + } + } +} +} diff --git a/Assets/Obi/Scripts/Common/Rendering/ShadowmapExposer.cs.meta b/Assets/Obi/Scripts/Common/Rendering/ShadowmapExposer.cs.meta new file mode 100644 index 000000000..229f80dcb --- /dev/null +++ b/Assets/Obi/Scripts/Common/Rendering/ShadowmapExposer.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: dbf7247281ef14860853fa0ee2cb4829 +timeCreated: 1463174681 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Solver/ObiActorEditorSelectionHandler.cs b/Assets/Obi/Scripts/Common/Solver/ObiActorEditorSelectionHandler.cs deleted file mode 100644 index 5f2ecf8d9..000000000 --- a/Assets/Obi/Scripts/Common/Solver/ObiActorEditorSelectionHandler.cs +++ /dev/null @@ -1,225 +0,0 @@ -using System.Collections.Generic; -using System.Linq; - -#if UNITY_EDITOR -using UnityEditor; -using UnityEditor.SceneManagement; -#endif -using UnityEngine; - -namespace Obi -{ - [ExecuteAlways] - public class ObiActorEditorSelectionHandler - { - private static HashSet solvers = new HashSet(); - private static ObiSolver clickedSolver; - private static int particleIndex; - - #if UNITY_EDITOR - internal static void SolverInitialized(ObiSolver solver) - { - if (solver != null) - { - if (solvers.Count == 0) - Init(); - - if (solver != null) - solvers.Add(solver); - } - - } - - internal static void SolverTeardown(ObiSolver solver) - { - if (solver != null) - { - solvers.Remove(solver); - - if (solvers.Count == 0) - Dispose(); - } - } - - internal static void Init() - { - SceneView.duringSceneGui += SceneGui; - } - - internal static void Dispose() - { - SceneView.duringSceneGui -= SceneGui; - } - - private static bool RaycastAgainstSolver(ObiSolver solver, Ray ray, float thickness, out int pIndex, out float distance) - { - float closestDistanceToRay = float.MaxValue; - pIndex = -1; - distance = float.MaxValue; - - Matrix4x4 solver2World = solver.transform.localToWorldMatrix; - - // Find the closest particle hit by the ray: - for (int i = 0; i < solver.activeParticleCount; ++i) - { - int p = solver.activeParticles[i]; - - Vector3 worldPos = solver2World.MultiplyPoint3x4(solver.positions[p]); - Vector3 projected = ObiUtils.ProjectPointLine(ray.origin, ray.origin + ray.direction, worldPos, out float mu, false); - - // Disregard particles behind the camera: - if (mu < 0) - continue; - - float radius = solver.principalRadii[p][0] + thickness; - float distanceToRay = Vector3.SqrMagnitude(worldPos - projected); - - if (distanceToRay <= radius * radius && - distanceToRay < closestDistanceToRay && - mu < closestDistanceToRay) - { - distance = mu; - closestDistanceToRay = distanceToRay; - pIndex = p; - } - } - - return pIndex >= 0; - } - - private static ObiSolver RaycastAllSolvers(Ray ray, out int pIndex, out float distance) - { - distance = float.MaxValue; - pIndex = -1; - - ObiSolver hitSolver = null; - - foreach (ObiSolver s in solvers) - { - if (s == null || !s.bounds.IntersectRay(ray)) - continue; - - if (RaycastAgainstSolver(s, ray, 0, out int p, out float d)) - { - if (d < distance) - { - distance = d; - hitSolver = s; - pIndex = p; - } - } - } - return hitSolver; - } - - private static void SceneGui(SceneView sceneView) - { - if (EditorApplication.isPaused || !ObiEditorSettings.GetOrCreateSettings().sceneViewParticlePicking) - return; - - // only do this in the main stage or prefab stage, if we're in any other stage don't raycast against particles. - // This will prevent selecting stuff when in the blueprint editor, avatar editor, or other stages. - var stage = StageUtility.GetCurrentStage(); - if (!(stage is MainStage) && !(stage is PrefabStage)) - return; - - var evt = Event.current; - - if (evt.alt) - return; - - float ppp = EditorGUIUtility.pixelsPerPoint; - int mouseScreenX = (int)(evt.mousePosition.x * ppp); - int mouseScreenY = (int)(evt.mousePosition.y * ppp); - - if (mouseScreenX < 0 || mouseScreenX >= sceneView.camera.pixelWidth || - mouseScreenY < 0 || mouseScreenY >= sceneView.camera.pixelHeight) - return; - - int controlID = GUIUtility.GetControlID(FocusType.Passive); - - switch (evt.type) - { - case EventType.Layout: - case EventType.MouseMove: - - if (!Tools.viewToolActive) - { - // Raycast against all solvers: - Ray ray = HandleUtility.GUIPointToWorldRay(Event.current.mousePosition); - clickedSolver = RaycastAllSolvers(ray, out particleIndex, out float closest); - - // check whether we hit a collider before the closest particle in the solver: - RaycastHit hit; - ray = HandleUtility.GUIPointToWorldRay(evt.mousePosition); - if (Physics.Raycast(ray, out hit, closest) && hit.collider != null) - clickedSolver = null; - - // If we hit something, register our control ID and the distance to the particle: - if (clickedSolver != null && Camera.current != null) - { - var worldPos = clickedSolver.transform.TransformPoint(clickedSolver.positions[particleIndex]); - var screenCenter = HandleUtility.WorldToGUIPoint(worldPos); - - var distance = (Event.current.mousePosition - screenCenter).magnitude; - - HandleUtility.AddControl(controlID, distance); - - // AddDefaultControl means that if no other control is selected, this will be chosen as the fallback. - // This allows things like the translate handle and buttons to function. - HandleUtility.AddDefaultControl(controlID); - } - } - - break; - - case EventType.MouseDown: - - if (evt.button == 0 && HandleUtility.nearestControl == controlID && clickedSolver != null) - { - // Setting the hotControl tells the Scene View that this mouse down/up event cannot be considered - // a picking action because the event is in use. - GUIUtility.hotControl = controlID; - evt.Use(); - } - break; - - case EventType.MouseUp: - - if (!Tools.viewToolActive && GUIUtility.hotControl == controlID) - { - // In case we hit some actor, select the actor it belongs to: - if (clickedSolver != null) - { - var clickedActor = clickedSolver.particleToActor[particleIndex].actor; - if (clickedActor != null) - { - var selection = Selection.objects.ToList(); - - if (evt.shift || evt.control) - { - if (selection.Contains(clickedActor.gameObject)) - selection.Remove(clickedActor.gameObject); - else - selection.Add(clickedActor.gameObject); - } - else - { - selection.Clear(); - selection.Add(clickedActor.gameObject); - } - - Selection.objects = selection.ToArray(); - } - - GUIUtility.hotControl = 0; - evt.Use(); - } - } - - break; - } - } -#endif - } -} diff --git a/Assets/Obi/Scripts/Common/Solver/ObiActorEditorSelectionHandler.cs.meta b/Assets/Obi/Scripts/Common/Solver/ObiActorEditorSelectionHandler.cs.meta deleted file mode 100644 index 453641656..000000000 --- a/Assets/Obi/Scripts/Common/Solver/ObiActorEditorSelectionHandler.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: baf220f68f79740d3a4ee9fb6fa4d6f4 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Solver/ObiRenderSystemStack.cs b/Assets/Obi/Scripts/Common/Solver/ObiRenderSystemStack.cs deleted file mode 100644 index d88159ff8..000000000 --- a/Assets/Obi/Scripts/Common/Solver/ObiRenderSystemStack.cs +++ /dev/null @@ -1,92 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace Obi -{ - /** - * Render Systems are organized into a fixed number of tiers. Tiers are update sequentially from lower to highest, so systems on - * a higher tier may depend on the output of lower tier systems. - * All systems in the same tier might be updated in parallel. - */ - public class ObiRenderSystemStack - { - private List[] stack; - - public ObiRenderSystemStack(int tiers) - { - stack = new List[tiers]; - for (int i = 0; i < tiers; ++i) - stack[i] = new List(); - } - - public void Setup(int dirtyFlags) - { - foreach (var tier in stack) - foreach (var system in tier) - if ((dirtyFlags & (int)system.typeEnum) != 0) - system.Setup(); - } - - public void Step() - { - foreach (var tier in stack) - foreach (var system in tier) - system.Step(); - } - - public void Render() - { - foreach (var tier in stack) - foreach (var system in tier) - system.Render(); - } - - public bool RegisterRenderSystem(IRenderSystem renderSystem) - { - if (renderSystem != null) - { - // Here we don't check whether the render system already exists: - // We assume this is done before calling AddRenderSystem - // (by calling GetRenderSystem first). - // Otherwise, no guarantees a render system cannot be registered twice. - if (renderSystem.tier >= 0 && renderSystem.tier < stack.Length) - { - stack[renderSystem.tier].Add(renderSystem); - return true; - } - } - return false; - } - - public bool UnregisterRenderSystem(IRenderSystem renderSystem) - { - if (renderSystem != null) - { - if (renderSystem.tier >= 0 && renderSystem.tier < stack.Length) - { - stack[renderSystem.tier].Remove(renderSystem); - return true; - } - } - return false; - } - - public RenderSystem GetRenderSystem() where T : ObiRenderer - { - foreach (var tier in stack) - foreach (var system in tier) - if (system.GetRendererType() == typeof(T)) - return system as RenderSystem; - return null; - } - - public IRenderSystem GetRenderSystem(Oni.RenderingSystemType systemType) - { - foreach (var tier in stack) - foreach (var system in tier) - if (system.typeEnum == systemType) - return system as IRenderSystem; - return null; - } - } -} diff --git a/Assets/Obi/Scripts/Common/Solver/ObiRenderSystemStack.cs.meta b/Assets/Obi/Scripts/Common/Solver/ObiRenderSystemStack.cs.meta deleted file mode 100644 index 69b7e4540..000000000 --- a/Assets/Obi/Scripts/Common/Solver/ObiRenderSystemStack.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 789afc50914b2412e87a032744b17fd3 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Solver/ObiSolver.cs b/Assets/Obi/Scripts/Common/Solver/ObiSolver.cs index 3e785f61d..e1a5ff765 100644 --- a/Assets/Obi/Scripts/Common/Solver/ObiSolver.cs +++ b/Assets/Obi/Scripts/Common/Solver/ObiSolver.cs @@ -23,7 +23,6 @@ using Unity.Profiling; using System; using System.Collections.Generic; using System.Linq; -using System.Collections; namespace Obi { @@ -34,7 +33,6 @@ namespace Obi [AddComponentMenu("Physics/Obi/Obi Solver", 800)] [ExecuteInEditMode] [DisallowMultipleComponent] - [HelpURL("https://obi.virtualmethodstudio.com/manual/7.0/obisolver.html")] public sealed class ObiSolver : MonoBehaviour { static ProfilerMarker m_StateInterpolationPerfMarker = new ProfilerMarker("ApplyStateInterpolation"); @@ -42,25 +40,16 @@ namespace Obi static ProfilerMarker m_GetSolverBoundsPerfMarker = new ProfilerMarker("GetSolverBounds"); static ProfilerMarker m_TestBoundsPerfMarker = new ProfilerMarker("TestBoundsAgainstCameras"); static ProfilerMarker m_GetAllCamerasPerfMarker = new ProfilerMarker("GetAllCameras"); - static ProfilerMarker m_PushActiveParticles = new ProfilerMarker("PushActiveParticles"); - static ProfilerMarker m_UpdateColliderWorld = new ProfilerMarker("UpdateColliderWorld"); - static ProfilerMarker m_PushSimplices = new ProfilerMarker("PushSimplices"); - static ProfilerMarker m_PushDeformableEdges = new ProfilerMarker("PushDeformableEdges"); - static ProfilerMarker m_PushDeformableTriangles = new ProfilerMarker("PushDeformableTriangles"); public enum BackendType { - [InspectorName("Compute (GPU)")] - Compute, - [InspectorName("Burst (CPU)")] + Oni, Burst } - public enum Synchronization + public class ObiCollisionEventArgs : System.EventArgs { - Asynchronous, - Synchronous, - SynchronousFixed + public ObiList contacts = new ObiList(); /**< collision contacts.*/ } [Serializable] @@ -71,8 +60,8 @@ namespace Obi public ParticleInActor() { - actor = null; - indexInActor = -1; + this.actor = null; + this.indexInActor = -1; } public ParticleInActor(ObiActor actor, int indexInActor) @@ -82,217 +71,84 @@ namespace Obi } } - public class SpatialQuery - { - public ObiNativeQueryShapeList shapes; - public ObiNativeAffineTransformList transforms; - public ObiNativeQueryResultList results; - public Action callback; - public bool synchronous = false; - - public bool isValid => shapes != null && transforms != null && results != null && shapes.count > 0 && transforms.count > 0; - public bool done => results.noReadbackInFlight; - - public SpatialQuery(ObiNativeQueryShapeList shapes, ObiNativeAffineTransformList transforms, ObiNativeQueryResultList results, Action callback = null, bool synchronous = false) - { - this.shapes = shapes; - this.transforms = transforms; - this.results = results; - this.callback = callback; - this.synchronous = synchronous; - } - - public void WaitForCompletion() - { - results.WaitForReadback(); - } - } - public delegate void SolverCallback(ObiSolver solver); - public delegate void SolverStepCallback(ObiSolver solver, float timeToSimulate, float substepTime); - public delegate void CollisionCallback(ObiSolver solver, ObiNativeContactList contacts); - public delegate void SpatialQueryCallback(ObiSolver solver, ObiNativeQueryResultList results); + public delegate void SolverStepCallback(ObiSolver solver, float stepTime); + public delegate void CollisionCallback(ObiSolver solver, ObiCollisionEventArgs contacts); public event CollisionCallback OnCollision; public event CollisionCallback OnParticleCollision; - public event SpatialQueryCallback OnSpatialQueryResults; - public event SolverCallback OnAdvection; - - public event SolverCallback OnInitialize; - public event SolverCallback OnTeardown; public event SolverCallback OnUpdateParameters; - public event SolverCallback OnParticleCountChanged; - public event SolverStepCallback OnSimulationStart; /**< Called right before scheduling a simulation step, before updating active particles, constraints, etc.*/ - public event SolverStepCallback OnCollisionDetectionStart; /**< Called right after CPU->GPU data transfer, before scheduling collision detection and spatial queries.*/ - public event SolverStepCallback OnSubstepsStart; /**< Called right after scheduling collision detection and spatial queries, before scheduling substeps.*/ - public event SolverCallback OnRequestReadback; /**< Called right after scheduling all substeps (before completing simulation).*/ - public event SolverStepCallback OnSimulationEnd; /**< Called when a simulation step has been completed.*/ - public event SolverStepCallback OnInterpolate; /**< Called every frame after interpolation, right before updating rendering.*/ + public event SolverCallback OnPrepareFrame; + public event SolverStepCallback OnPrepareStep; + public event SolverStepCallback OnBeginStep; + public event SolverStepCallback OnSubstep; + public event SolverCallback OnEndStep; + public event SolverCallback OnInterpolate; [Tooltip("If enabled, will force the solver to keep simulating even when not visible from any camera.")] - public bool simulateWhenInvisible = true; + public bool simulateWhenInvisible = true; /**< Whether to keep simulating the cloth when its not visible by any camera.*/ + + private ISolverImpl m_SolverImpl; private IObiBackend m_SimulationBackend = #if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) new BurstBackend(); +#elif (OBI_ONI_SUPPORTED) + new OniBackend(); #else new NullBackend(); #endif [SerializeField] private BackendType m_Backend = BackendType.Burst; - private ObiRenderSystemStack m_RenderSystems = new ObiRenderSystemStack(3); - - [Min(1)] - public int substeps = 4; - - [Min(0)] - public int maxStepsPerFrame = 1; - - public Synchronization synchronization = Synchronization.Asynchronous; public Oni.SolverParameters parameters = new Oni.SolverParameters(Oni.SolverParameters.Interpolation.None, new Vector4(0, -9.81f, 0, 0)); - [Min(32)] - [SerializeField] - private uint m_MaxSurfaceChunks = 32768; - public uint maxSurfaceChunks - { - set - { - // make sure anytime active particles need to be updated, simplices will be updated too: - m_MaxSurfaceChunks = value; - dirtyRendering |= (int)Oni.RenderingSystemType.Fluid; - } - get { return m_MaxSurfaceChunks; } - } - - public uint usedSurfaceChunks - { - get { - var system = GetRenderSystem(Oni.RenderingSystemType.Fluid) as ISurfaceChunkUser; - if (system == null) - return 0; - return system.usedChunkCount; - } - } - - public uint maxQueryResults = 8192; - public uint maxFoamParticles = 8192; - public uint maxParticleNeighbors = 128; - public uint maxParticleContacts = 6; - - public bool useLimits = false; - public bool killOffLimitsParticles = false; - public Bounds boundaryLimits = new Bounds(Vector3.zero, new Vector3(10, 10, 10)); - public Vector3 gravity = new Vector3(0, -9.81f, 0); public Space gravitySpace = Space.Self; - public Vector3 ambientWind = new Vector3(0, 0, 0); - public Space windSpace = Space.Self; - - [Min(1)] - public int foamSubsteps = 1; - - [Tooltip("Minimum amount of fluid particles around a foam particle necessary for the foam to be advected, instead of following a ballistic trajectory.")] - [Min(0)] - public int foamMinNeighbors = 3; - - [Tooltip("When enabled, each individual foam particle will be tested for collisions against ObiColliders.")] - public bool foamCollisions = false; - - [Tooltip("Foam particles can stretch along the direction of their velocity. This parameter controls the maximum amount of stretch.")] - [Range(0, 3)] - public float maxFoamVelocityStretch = 0.3f; - - [Tooltip("Scales the size of foam particles.")] - [Min(0)] - public float foamRadiusScale = 1; - - [Tooltip("Determines how foam particles fade in/out during its lifetime.")] - [MinMax(0, 1)] - public Vector2 foamFade = new Vector2(0.05f, 0.8f); - - [Tooltip("Determines the utilization % range in which particles age faster.")] - [MinMax(0, 1)] - public Vector2 foamAccelAgingRange = new Vector2(0.5f, 0.8f); - - [Tooltip("Determines the utilization % range in which particles age faster.")] - [Min(1)] - public float foamAccelAging = 4; - - [Tooltip("Color of the light scattered by foam.")] - [Min(0)] - public float foamVolumeDensity = 0.1f; - - [Tooltip("Color of the light scattered by foam.")] - [Min(0)] - public float foamAmbientDensity = 0.02f; - - [Tooltip("Color of the light scattered by foam.")] - public Color foamScatterColor = new Color(0.8f,0.75f,0.7f,1); - - [Tooltip("Color used for foam ambient lighting.")] - public Color foamAmbientColor = new Color(0.4f, 0.5f, 0.6f, 1); - - [Tooltip("How much does world-space linear inertia affect particles in the solver.")] [Range(0, 1)] - public float worldLinearInertiaScale = 0; /**< how much does world-space linear inertia affect particles in the solver*/ + public float worldLinearInertiaScale = 0; /**< how much does world-space linear inertia affect the actor. This only applies when the solver has "simulateInLocalSpace" enabled.*/ - [Tooltip("How much does world-space angular inertia affect particles in the solver.")] [Range(0, 1)] - public float worldAngularInertiaScale = 0; /**< how much does world-space angular inertia affect particles in the solver.*/ + public float worldAngularInertiaScale = 0; /**< how much does world-space angular inertia affect the actor. This only applies when the solver has "simulateInLocalSpace" enabled.*/ [HideInInspector] [NonSerialized] public List actors = new List(); - [HideInInspector] [NonSerialized] private ParticleInActor[] m_ParticleToActor; - - [HideInInspector] [NonSerialized] private Queue addBuffer = new Queue(); /**< actors pending insertion into the solver.*/ + [HideInInspector] [NonSerialized] public ParticleInActor[] m_ParticleToActor; private ObiNativeIntList freeList; - private Stack freeGroupIDs = new Stack(); - [NonSerialized] public ObiNativeIntList deformableTriangles; - [NonSerialized] public ObiNativeIntList deformableEdges; - [NonSerialized] public ObiNativeVector2List deformableUVs; + private List points = new List(); /**< 0-simplices*/ + private List edges = new List(); /**< 1-simplices*/ + private List triangles = new List(); /**< 2-simplices*/ + private SimplexCounts m_SimplexCounts; - [NonSerialized] private ObiNativeIntList m_Points; /**< 0-simplices*/ - [NonSerialized] private ObiNativeIntList m_Edges; /**< 1-simplices*/ - [NonSerialized] private ObiNativeIntList m_Triangles; /**< 2-simplices*/ - [NonSerialized] public SimplexCounts m_SimplexCounts; - - [NonSerialized] private IObiJobHandle simulationHandle; - [NonSerialized] private Synchronization bufferedSynchronization; - [NonSerialized] private int steps = 0; - [NonSerialized] private float substepTime = 0; - [NonSerialized] private float simulatedTime = 0; - [NonSerialized] private float accumulatedTime = 0; - - public float timeSinceSimulationStart { get; private set; } = 0; - - [HideInInspector] [NonSerialized] public bool dirtyDeformableTriangles = true; - [HideInInspector] [NonSerialized] public bool dirtyDeformableEdges = true; - [HideInInspector] [NonSerialized] public Oni.SimplexType dirtySimplices = Oni.SimplexType.All; - [HideInInspector] [NonSerialized] public int dirtyRendering = 0; - [HideInInspector] [NonSerialized] public int dirtyConstraints = 0; - - public bool synchronousSpatialQueries = false; + [HideInInspector][NonSerialized] public bool dirtySimplices = true; + [HideInInspector][NonSerialized] public int dirtyConstraints = 0; private bool m_dirtyActiveParticles = true; public bool dirtyActiveParticles { set { + // make sure anytime active particles need to be updated, simplices will be updated too: m_dirtyActiveParticles = value; + dirtySimplices |= m_dirtyActiveParticles; } get { return m_dirtyActiveParticles; } } - private Bounds m_Bounds = new Bounds(); - private Bounds m_BoundsWS = new Bounds(); + private ObiCollisionEventArgs collisionArgs = new ObiCollisionEventArgs(); + private ObiCollisionEventArgs particleCollisionArgs = new ObiCollisionEventArgs(); + + private int m_contactCount; + private int m_particleContactCount; + private float m_MaxScale = 1; + private UnityEngine.Bounds bounds = new UnityEngine.Bounds(); private Plane[] planes = new Plane[6]; private Camera[] sceneCameras = new Camera[1]; + private bool isVisible = true; // constraints: [NonSerialized] private IObiConstraints[] m_Constraints = new IObiConstraints[Oni.ConstraintTypeCount]; @@ -309,60 +165,55 @@ namespace Obi public Oni.ConstraintParameters shapeMatchingConstraintParameters = new Oni.ConstraintParameters(true, Oni.ConstraintParameters.EvaluationOrder.Parallel, 1); public Oni.ConstraintParameters tetherConstraintParameters = new Oni.ConstraintParameters(true, Oni.ConstraintParameters.EvaluationOrder.Parallel, 1); public Oni.ConstraintParameters pinConstraintParameters = new Oni.ConstraintParameters(true, Oni.ConstraintParameters.EvaluationOrder.Parallel, 1); - public Oni.ConstraintParameters pinholeConstraintParameters = new Oni.ConstraintParameters(true, Oni.ConstraintParameters.EvaluationOrder.Parallel, 1); public Oni.ConstraintParameters stitchConstraintParameters = new Oni.ConstraintParameters(true, Oni.ConstraintParameters.EvaluationOrder.Parallel, 1); public Oni.ConstraintParameters densityConstraintParameters = new Oni.ConstraintParameters(true, Oni.ConstraintParameters.EvaluationOrder.Parallel, 1); public Oni.ConstraintParameters stretchShearConstraintParameters = new Oni.ConstraintParameters(true, Oni.ConstraintParameters.EvaluationOrder.Sequential, 1); public Oni.ConstraintParameters bendTwistConstraintParameters = new Oni.ConstraintParameters(true, Oni.ConstraintParameters.EvaluationOrder.Sequential, 1); public Oni.ConstraintParameters chainConstraintParameters = new Oni.ConstraintParameters(false, Oni.ConstraintParameters.EvaluationOrder.Sequential, 1); - // rigidbodies: + // rigidbodies ObiNativeVector4List m_RigidbodyLinearVelocities; ObiNativeVector4List m_RigidbodyAngularVelocities; - // colors: + // colors [NonSerialized] private ObiNativeColorList m_Colors; - // cell indices: + // cell indices [NonSerialized] private ObiNativeInt4List m_CellCoords; // status: [NonSerialized] private ObiNativeIntList m_ActiveParticles; [NonSerialized] private ObiNativeIntList m_Simplices; - [NonSerialized] private ObiNativeIntList m_DeadParticles; - // positions: + // positions [NonSerialized] private ObiNativeVector4List m_Positions; - [NonSerialized] private ObiNativeVector4List m_PrevPositions; [NonSerialized] private ObiNativeVector4List m_RestPositions; - + [NonSerialized] private ObiNativeVector4List m_PrevPositions; [NonSerialized] private ObiNativeVector4List m_StartPositions; - [NonSerialized] private ObiNativeVector4List m_EndPositions; [NonSerialized] private ObiNativeVector4List m_RenderablePositions; - // orientations: + // orientations [NonSerialized] private ObiNativeQuaternionList m_Orientations; - [NonSerialized] private ObiNativeQuaternionList m_PrevOrientations; [NonSerialized] private ObiNativeQuaternionList m_RestOrientations; - + [NonSerialized] private ObiNativeQuaternionList m_PrevOrientations; [NonSerialized] private ObiNativeQuaternionList m_StartOrientations; - [NonSerialized] private ObiNativeQuaternionList m_EndOrientations; - [NonSerialized] private ObiNativeQuaternionList m_RenderableOrientations; + [NonSerialized] private ObiNativeQuaternionList m_RenderableOrientations; /**< renderable particle orientations.*/ - // velocities: + // velocities [NonSerialized] private ObiNativeVector4List m_Velocities; [NonSerialized] private ObiNativeVector4List m_AngularVelocities; - // masses tensors: + // masses/inertia tensors [NonSerialized] private ObiNativeFloatList m_InvMasses; [NonSerialized] private ObiNativeFloatList m_InvRotationalMasses; + [NonSerialized] private ObiNativeVector4List m_InvInertiaTensors; - // external forces: + // external forces [NonSerialized] private ObiNativeVector4List m_ExternalForces; [NonSerialized] private ObiNativeVector4List m_ExternalTorques; [NonSerialized] private ObiNativeVector4List m_Wind; - // deltas: + // deltas [NonSerialized] private ObiNativeVector4List m_PositionDeltas; [NonSerialized] private ObiNativeQuaternionList m_OrientationDeltas; [NonSerialized] private ObiNativeIntList m_PositionConstraintCounts; @@ -374,44 +225,32 @@ namespace Obi [NonSerialized] private ObiNativeIntList m_Filters; // particle shape: + [NonSerialized] private ObiNativeVector4List m_Anisotropies; [NonSerialized] private ObiNativeVector4List m_PrincipalRadii; - [NonSerialized] private ObiNativeVector4List m_RenderableRadii; [NonSerialized] private ObiNativeVector4List m_Normals; - // fluids: - [NonSerialized] private ObiNativeFloatList m_Life; + // fluids + [NonSerialized] private ObiNativeVector4List m_Vorticities; [NonSerialized] private ObiNativeVector4List m_FluidData; - [NonSerialized] private ObiNativeVector4List m_FluidMaterials; /**< fluidRadius / surfTension / viscosity / pressure */ - [NonSerialized] private ObiNativeVector4List m_FluidMaterials2; /**< vorticity / vorticity diffusion / baroclinity / baroclinity diffusion */ - [NonSerialized] private ObiNativeVector4List m_FluidInterface; /**< drag / ambient pressure / buoyancy / miscibility */ [NonSerialized] private ObiNativeVector4List m_UserData; - [NonSerialized] private ObiNativeMatrix4x4List m_Anisotropy; + [NonSerialized] private ObiNativeFloatList m_SmoothingRadii; + [NonSerialized] private ObiNativeFloatList m_Buoyancies; + [NonSerialized] private ObiNativeFloatList m_RestDensities; + [NonSerialized] private ObiNativeFloatList m_Viscosities; + [NonSerialized] private ObiNativeFloatList m_SurfaceTension; + [NonSerialized] private ObiNativeFloatList m_VortConfinement; + [NonSerialized] private ObiNativeFloatList m_AtmosphericDrag; + [NonSerialized] private ObiNativeFloatList m_AtmosphericPressure; + [NonSerialized] private ObiNativeFloatList m_Diffusion; - // foam particles: - [NonSerialized] private ObiNativeVector4List m_FoamPositions; /**< xyz = position, w = amount of neighbors*/ - [NonSerialized] private ObiNativeVector4List m_FoamVelocities; /**< xyz = velocity, w = buoyancy*/ - [NonSerialized] private ObiNativeVector4List m_FoamColors; - [NonSerialized] private ObiNativeVector4List m_FoamAttributes; /**< life, aging rate, size, drag*/ - [NonSerialized] private ObiNativeIntList m_FoamCount; - - // contacts: - [NonSerialized] private ObiNativeContactList m_ColliderContacts; - [NonSerialized] private ObiNativeContactList m_ParticleContacts; - [NonSerialized] private ObiNativeEffectiveMassesList m_ContactEffectiveMasses; - [NonSerialized] private ObiNativeEffectiveMassesList m_ParticleContactEffectiveMasses; - - // queries: - [NonSerialized] private ObiNativeQueryShapeList m_BufferedQueryShapes; - [NonSerialized] private ObiNativeAffineTransformList m_BufferedQueryTransforms; - [NonSerialized] private ObiNativeQueryShapeList m_QueryShapes; - [NonSerialized] private ObiNativeAffineTransformList m_QueryTransforms; - [NonSerialized] private ObiNativeQueryResultList m_QueryResults; - - public ISolverImpl implementation { get; private set; } + public ISolverImpl implementation + { + get { return m_SolverImpl; } + } public bool initialized { - get { return implementation != null; } + get { return m_SolverImpl != null; } } public IObiBackend simulationBackend @@ -437,45 +276,34 @@ namespace Obi get { return m_SimplexCounts; } } - /// - /// Solver bounds expressed in world space. - /// - public UnityEngine.Bounds bounds + public UnityEngine.Bounds Bounds { - get { return m_BoundsWS; } + get { return bounds; } } - /// - /// Solver bounds expressed in the solver's local space. - /// - public UnityEngine.Bounds localBounds + public bool IsVisible { - get { return m_Bounds; } + get { return isVisible; } } - public bool isVisible { get; private set; } = true; - - public float maxScale { get; private set; } = 1; - - public bool simulationInFlight { get; private set; } = false; - - public int pendingQueryCount => bufferedQueryShapes.count; + public float maxScale + { + get { return m_MaxScale; } + } public int allocParticleCount { get { return particleToActor.Count(s => s != null && s.actor != null); } } - public int activeParticleCount => activeParticles.count; - public int contactCount { - get { return (backendType == BackendType.Burst || OnCollision != null) ? colliderContacts.count : 0; } + get { return m_contactCount; } } public int particleContactCount { - get { return (backendType == BackendType.Burst || OnParticleCollision != null) ? particleContacts.count : 0; } + get { return m_particleContactCount; } } public ParticleInActor[] particleToActor @@ -500,18 +328,6 @@ namespace Obi } } - public ObiNativeIntList deadParticles - { - get - { - if (m_DeadParticles == null) - m_DeadParticles = new ObiNativeIntList(); - - return m_DeadParticles; - } - } - - #region Simplices public ObiNativeIntList simplices { get @@ -523,42 +339,6 @@ namespace Obi } } - public ObiNativeIntList points - { - get - { - if (m_Points == null) - m_Points = new ObiNativeIntList(8); - - return m_Points; - } - } - - public ObiNativeIntList edges - { - get - { - if (m_Edges == null) - m_Edges = new ObiNativeIntList(8); - - return m_Edges; - } - } - - public ObiNativeIntList triangles - { - get - { - if (m_Triangles == null) - m_Triangles = new ObiNativeIntList(8); - - return m_Triangles; - } - } - - #endregion - - #region Rigidbodies public ObiNativeVector4List rigidbodyLinearDeltas { get @@ -582,7 +362,6 @@ namespace Obi return m_RigidbodyAngularVelocities; } } - #endregion public ObiNativeColorList colors { @@ -620,6 +399,15 @@ namespace Obi } } + public ObiNativeVector4List restPositions + { + get + { + if (m_RestPositions == null) + m_RestPositions = new ObiNativeVector4List(); + return m_RestPositions; + } + } public ObiNativeVector4List prevPositions { @@ -631,16 +419,6 @@ namespace Obi } } - public ObiNativeVector4List restPositions - { - get - { - if (m_RestPositions == null) - m_RestPositions = new ObiNativeVector4List(); - return m_RestPositions; - } - } - public ObiNativeVector4List startPositions { get @@ -651,16 +429,6 @@ namespace Obi } } - public ObiNativeVector4List endPositions - { - get - { - if (m_EndPositions == null) - m_EndPositions = new ObiNativeVector4List(); - return m_EndPositions; - } - } - public ObiNativeVector4List renderablePositions { get @@ -685,16 +453,6 @@ namespace Obi } } - public ObiNativeQuaternionList prevOrientations - { - get - { - if (m_PrevOrientations == null) - m_PrevOrientations = new ObiNativeQuaternionList(); - return m_PrevOrientations; - } - } - public ObiNativeQuaternionList restOrientations { get @@ -705,6 +463,15 @@ namespace Obi } } + public ObiNativeQuaternionList prevOrientations + { + get + { + if (m_PrevOrientations == null) + m_PrevOrientations = new ObiNativeQuaternionList(); + return m_PrevOrientations; + } + } public ObiNativeQuaternionList startOrientations { @@ -716,17 +483,6 @@ namespace Obi } } - public ObiNativeQuaternionList endOrientations - { - get - { - if (m_EndOrientations == null) - m_EndOrientations = new ObiNativeQuaternionList(); - return m_EndOrientations; - } - } - - public ObiNativeQuaternionList renderableOrientations { get @@ -785,6 +541,16 @@ namespace Obi } } + public ObiNativeVector4List invInertiaTensors + { + get + { + if (m_InvInertiaTensors == null) + m_InvInertiaTensors = new ObiNativeVector4List(); + return m_InvInertiaTensors; + } + } + #endregion #region External forces @@ -897,13 +663,13 @@ namespace Obi } } - public ObiNativeVector4List renderableRadii + public ObiNativeVector4List anisotropies { get { - if (m_RenderableRadii == null) - m_RenderableRadii = new ObiNativeVector4List(); - return m_RenderableRadii; + if (m_Anisotropies == null) + m_Anisotropies = new ObiNativeVector4List(); + return m_Anisotropies; } } @@ -931,13 +697,13 @@ namespace Obi #region Fluid properties - public ObiNativeFloatList life + public ObiNativeVector4List vorticities { get { - if (m_Life == null) - m_Life = new ObiNativeFloatList(); - return m_Life; + if (m_Vorticities == null) + m_Vorticities = new ObiNativeVector4List(); + return m_Vorticities; } } @@ -961,290 +727,103 @@ namespace Obi } } - public ObiNativeVector4List fluidInterface + public ObiNativeFloatList smoothingRadii { get { - if (m_FluidInterface == null) - m_FluidInterface = new ObiNativeVector4List(); - return m_FluidInterface; + if (m_SmoothingRadii == null) + m_SmoothingRadii = new ObiNativeFloatList(); + return m_SmoothingRadii; } } - public ObiNativeVector4List fluidMaterials + public ObiNativeFloatList buoyancies { get { - if (m_FluidMaterials == null) - m_FluidMaterials = new ObiNativeVector4List(); - return m_FluidMaterials; + if (m_Buoyancies == null) + m_Buoyancies = new ObiNativeFloatList(); + return m_Buoyancies; } } - public ObiNativeVector4List fluidMaterials2 + public ObiNativeFloatList restDensities { get { - if (m_FluidMaterials2 == null) - m_FluidMaterials2 = new ObiNativeVector4List(); - return m_FluidMaterials2; + if (m_RestDensities == null) + m_RestDensities = new ObiNativeFloatList(); + return m_RestDensities; } } - public ObiNativeMatrix4x4List anisotropies + public ObiNativeFloatList viscosities { get { - if (m_Anisotropy == null) - m_Anisotropy = new ObiNativeMatrix4x4List(); - return m_Anisotropy; + if (m_Viscosities == null) + m_Viscosities = new ObiNativeFloatList(); + return m_Viscosities; } } - public ObiNativeVector4List foamPositions + public ObiNativeFloatList surfaceTension { get { - if (m_FoamPositions == null) - m_FoamPositions = new ObiNativeVector4List(); - return m_FoamPositions; + if (m_SurfaceTension == null) + m_SurfaceTension = new ObiNativeFloatList(); + return m_SurfaceTension; } } - public ObiNativeVector4List foamVelocities + public ObiNativeFloatList vortConfinement { get { - if (m_FoamVelocities == null) - m_FoamVelocities = new ObiNativeVector4List(); - return m_FoamVelocities; + if (m_VortConfinement == null) + m_VortConfinement = new ObiNativeFloatList(); + return m_VortConfinement; } } - public ObiNativeVector4List foamColors + public ObiNativeFloatList atmosphericDrag { get { - if (m_FoamColors == null) - m_FoamColors = new ObiNativeVector4List(); - return m_FoamColors; + if (m_AtmosphericDrag == null) + m_AtmosphericDrag = new ObiNativeFloatList(); + return m_AtmosphericDrag; } } - public ObiNativeVector4List foamAttributes + public ObiNativeFloatList atmosphericPressure { get { - if (m_FoamAttributes == null) - m_FoamAttributes = new ObiNativeVector4List(); - return m_FoamAttributes; + if (m_AtmosphericPressure == null) + m_AtmosphericPressure = new ObiNativeFloatList(); + return m_AtmosphericPressure; } } - public ObiNativeIntList foamCount + public ObiNativeFloatList diffusion { get { - if (m_FoamCount == null) - { - m_FoamCount = new ObiNativeIntList(); - m_FoamCount.ResizeUninitialized(9); - - // post-emission particle dispatch (4 floats), post-update particle dispatch (4 floats), - // plus 1 extra float for storing currently alive particles while updating/killing. - m_FoamCount.CopyFrom(new int[] { 0, 1, 1, 0, 0, 1, 1, 0, 0 }, 0, 0, 9); - } - return m_FoamCount; + if (m_Diffusion == null) + m_Diffusion = new ObiNativeFloatList(); + return m_Diffusion; } } #endregion - #region Contacts - public ObiNativeContactList colliderContacts - { - get - { - if (m_ColliderContacts == null) - m_ColliderContacts = new ObiNativeContactList(); - return m_ColliderContacts; - } - } - - public ObiNativeContactList particleContacts - { - get - { - if (m_ParticleContacts == null) - m_ParticleContacts = new ObiNativeContactList(); - return m_ParticleContacts; - } - } - - public ObiNativeEffectiveMassesList contactEffectiveMasses - { - get - { - if (m_ContactEffectiveMasses == null) - m_ContactEffectiveMasses = new ObiNativeEffectiveMassesList(); - return m_ContactEffectiveMasses; - } - } - - public ObiNativeEffectiveMassesList particleContactEffectiveMasses - { - get - { - if (m_ParticleContactEffectiveMasses == null) - m_ParticleContactEffectiveMasses = new ObiNativeEffectiveMassesList(); - return m_ParticleContactEffectiveMasses; - } - } - - #endregion - - #region Queries - - private ObiNativeQueryShapeList bufferedQueryShapes - { - get - { - if (m_BufferedQueryShapes == null) - m_BufferedQueryShapes = new ObiNativeQueryShapeList(); - return m_BufferedQueryShapes; - } - } - - private ObiNativeAffineTransformList bufferedQueryTransforms - { - get - { - if (m_BufferedQueryTransforms == null) - m_BufferedQueryTransforms = new ObiNativeAffineTransformList(8); - return m_BufferedQueryTransforms; - } - } - - private ObiNativeQueryShapeList queryShapes - { - get - { - if (m_QueryShapes == null) - m_QueryShapes = new ObiNativeQueryShapeList(); - return m_QueryShapes; - } - } - - private ObiNativeAffineTransformList queryTransforms - { - get - { - if (m_QueryTransforms == null) - m_QueryTransforms = new ObiNativeAffineTransformList(8); - return m_QueryTransforms; - } - } - - public ObiNativeQueryResultList queryResults - { - get - { - if (m_QueryResults == null) - m_QueryResults = new ObiNativeQueryResultList(); - return m_QueryResults; - } - } - - #endregion - - public void OnEnable() - { - bufferedSynchronization = synchronization; - accumulatedTime = 0; - } - - private void FixedUpdate() - { - // first fixed update this frame: - if (steps++ == 0) - { - // Wait for the previous frame's simulation to end and GPU data to be available. - if (bufferedSynchronization == Synchronization.Asynchronous) - CompleteSimulation(); - } - - if (bufferedSynchronization == Synchronization.SynchronousFixed) - { - // Update collider world: - ObiColliderWorld.GetInstance().SetDirty(); - ObiColliderWorld.GetInstance().UpdateWorld(Time.fixedDeltaTime); - - // kick off this step's simulation, and immediately wait for it to complete: - StartSimulation(Time.fixedDeltaTime, 1); - CompleteSimulation(); - } - - } - - private void Update() - { - ObiColliderWorld.GetInstance().SetDirty(); - } - - private void LateUpdate() + void Update() { var scale = transform.lossyScale; - maxScale = Mathf.Max(Mathf.Max(scale.x, scale.y), scale.z); - - // Accumulate amount of time to simulate (duration of the frame - time already simulated) - if (Application.isPlaying) - { - // Make sure ObiColliderWorld updates after all solvers have called CompleteSimulation() on their FixedUpdate. - // This way we can be sure no physics updates are in flight. - // Only update acceleration structures and rigidbodies if a physics step will take place. - ObiColliderWorld.GetInstance().UpdateWorld(Time.fixedDeltaTime * steps, steps > 0 && bufferedSynchronization != Synchronization.SynchronousFixed); - - // Accumulate time and clamp it to a single timestep, in case the simulation is lagging behind rendering (dropping time). - accumulatedTime += Time.deltaTime - Time.fixedDeltaTime * steps; - accumulatedTime = Mathf.Clamp(accumulatedTime, 0, Time.fixedDeltaTime); - } - else - { - // if in editor, we don't accumulate any simulation time - // and just update solver bounds before rendering/simulation. - accumulatedTime = 0; - UpdateBounds(); - } - - if (bufferedSynchronization == Synchronization.Asynchronous || - bufferedSynchronization == Synchronization.SynchronousFixed) - Render(accumulatedTime); - - // if in play mode, kick off this frame's simulation. - if (Application.isPlaying && bufferedSynchronization != Synchronization.SynchronousFixed) - StartSimulation(Time.fixedDeltaTime, steps); - - if (bufferedSynchronization == Synchronization.Synchronous) - { - // if the simulation has been stepped this frame, - // sychronously wait for completion before rendering. - if (steps > 0) - CompleteSimulation(); - - Render(accumulatedTime); - } - - // Reset step counter to zero, now that - // simulation tasks for this frame have been dispatched. - steps = 0; - } - - private void OnApplicationQuit() - { - // Make sure solvers finish their simulation before Unity automatically destroys collider world - // when closing app or exiting play mode. - OnDestroy(); + m_MaxScale = Mathf.Max(Mathf.Max(scale.x, scale.y), scale.z); } private void OnDestroy() @@ -1262,23 +841,16 @@ namespace Obi #if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) case BackendType.Burst: m_SimulationBackend = new BurstBackend(); break; #endif - case BackendType.Compute: - - if (SystemInfo.supportsComputeShaders) - m_SimulationBackend = new ComputeBackend(); - else - goto default; - break; +#if (OBI_ONI_SUPPORTED) + case BackendType.Oni: m_SimulationBackend = new OniBackend(); break; +#endif default: - Debug.LogWarning("The Burst backend depends on the following packages: Mathematics, Collections, Jobs and Burst. Please install the required dependencies. Simulation will fall back to the compute backend, if possible."); - if (SystemInfo.supportsComputeShaders) - m_SimulationBackend = new ComputeBackend(); - else - { - Debug.LogError("This platform doesn't support compute shaders. Please switch to the Burst backend."); - m_SimulationBackend = new NullBackend(); - } +#if (OBI_ONI_SUPPORTED) + m_SimulationBackend = new OniBackend(); +#else + m_SimulationBackend = new NullBackend(); +#endif break; } } @@ -1289,17 +861,11 @@ namespace Obi { CreateBackend(); - substepTime = Time.fixedDeltaTime / substeps; - // Set up local actor and particle buffers: actors = new List(); freeList = new ObiNativeIntList(); m_ParticleToActor = new ParticleInActor[0]; - deformableUVs = new ObiNativeVector2List(); - deformableTriangles = new ObiNativeIntList(); - deformableEdges = new ObiNativeIntList(); - // Create constraints: m_Constraints[(int)Oni.ConstraintType.Distance] = new ObiDistanceConstraintsData(); m_Constraints[(int)Oni.ConstraintType.Bending] = new ObiBendConstraintsData(); @@ -1312,32 +878,19 @@ namespace Obi m_Constraints[(int)Oni.ConstraintType.Tether] = new ObiTetherConstraintsData(); m_Constraints[(int)Oni.ConstraintType.Skin] = new ObiSkinConstraintsData(); m_Constraints[(int)Oni.ConstraintType.Pin] = new ObiPinConstraintsData(); - m_Constraints[(int)Oni.ConstraintType.Pinhole] = new ObiPinholeConstraintsData(); // Create the solver: - implementation = m_SimulationBackend.CreateSolver(this, 0); + m_SolverImpl = m_SimulationBackend.CreateSolver(this, 0); // Set data arrays: - implementation.ParticleCountChanged(this); - implementation.SetRigidbodyArrays(this); - OnParticleCountChanged?.Invoke(this); + m_SolverImpl.ParticleCountChanged(this); + m_SolverImpl.SetRigidbodyArrays(this); // Initialize moving transform: InitializeTransformFrame(); - // Force initial collider world update: - ObiColliderWorld.GetInstance().SetDirty(); - ObiColliderWorld.GetInstance().UpdateWorld(0); - ObiColliderWorld.GetInstance().SetDirty(); - - OnInitialize?.Invoke(this); - // Set initial parameter values: PushSolverParameters(); - -#if UNITY_EDITOR - ObiActorEditorSelectionHandler.SolverInitialized(this); -#endif } } @@ -1345,29 +898,18 @@ namespace Obi { if (initialized) { - CompleteSimulation(); - // Clear all constraints: PushConstraints(); - // Destroy the solver: - m_SimulationBackend.DestroySolver(implementation); - implementation = null; + // Destroy the Oni solver: + m_SimulationBackend.DestroySolver(m_SolverImpl); + m_SolverImpl = null; // Free particle / rigidbody memory: FreeParticleArrays(); FreeRigidbodyArrays(); freeList.Dispose(); - - // Reset bounds: - m_Bounds = new Bounds(); - - OnTeardown?.Invoke(this); - -#if UNITY_EDITOR - ObiActorEditorSelectionHandler.SolverTeardown(this); -#endif } } @@ -1379,7 +921,6 @@ namespace Obi actor.RemoveFromSolver(); // re-add all actors. - // Solver will be re-initialized on adding the first one. foreach (ObiActor actor in temp) actor.AddToSolver(); } @@ -1395,30 +936,23 @@ namespace Obi public void EnsureRigidbodyArraysCapacity(int count) { - if (initialized && (count > rigidbodyLinearDeltas.count || !rigidbodyLinearDeltas.isCreated)) + if (initialized && count >= rigidbodyLinearDeltas.count) { rigidbodyLinearDeltas.ResizeInitialized(count); rigidbodyAngularDeltas.ResizeInitialized(count); - implementation.SetRigidbodyArrays(this); + m_SolverImpl.SetRigidbodyArrays(this); } } private void FreeParticleArrays() { activeParticles.Dispose(); - deadParticles.Dispose(); simplices.Dispose(); - points.Dispose(); - edges.Dispose(); - triangles.Dispose(); - colors.Dispose(); cellCoords.Dispose(); startPositions.Dispose(); - endPositions.Dispose(); startOrientations.Dispose(); - endOrientations.Dispose(); positions.Dispose(); prevPositions.Dispose(); restPositions.Dispose(); @@ -1435,17 +969,17 @@ namespace Obi filters.Dispose(); renderablePositions.Dispose(); renderableOrientations.Dispose(); - renderableRadii.Dispose(); - fluidInterface.Dispose(); - fluidMaterials.Dispose(); - fluidMaterials2.Dispose(); - foamPositions.Dispose(); - foamVelocities.Dispose(); - foamColors.Dispose(); - foamAttributes.Dispose(); - foamCount.Dispose(); anisotropies.Dispose(); - life.Dispose(); + smoothingRadii.Dispose(); + buoyancies.Dispose(); + restDensities.Dispose(); + viscosities.Dispose(); + surfaceTension.Dispose(); + vortConfinement.Dispose(); + atmosphericDrag.Dispose(); + atmosphericPressure.Dispose(); + diffusion.Dispose(); + vorticities.Dispose(); fluidData.Dispose(); userData.Dispose(); externalForces.Dispose(); @@ -1456,46 +990,27 @@ namespace Obi positionConstraintCounts.Dispose(); orientationConstraintCounts.Dispose(); normals.Dispose(); - colliderContacts.Dispose(); - particleContacts.Dispose(); - contactEffectiveMasses.Dispose(); - particleContactEffectiveMasses.Dispose(); - - bufferedQueryShapes.Dispose(); - bufferedQueryTransforms.Dispose(); - queryShapes.Dispose(); - queryTransforms.Dispose(); - queryResults.Dispose(); - - deformableUVs.Dispose(); - deformableTriangles.Dispose(); - deformableEdges.Dispose(); + invInertiaTensors.Dispose(); m_ActiveParticles = null; - m_DeadParticles = null; m_Simplices = null; - m_Points = null; - m_Edges = null; - m_Triangles = null; - m_Colors = null; m_CellCoords = null; m_Positions = null; m_RestPositions = null; m_PrevPositions = null; m_StartPositions = null; - m_EndPositions = null; m_RenderablePositions = null; m_Orientations = null; m_RestOrientations = null; m_PrevOrientations = null; m_StartOrientations = null; - m_EndOrientations = null; m_RenderableOrientations = null; m_Velocities = null; m_AngularVelocities = null; m_InvMasses = null; m_InvRotationalMasses = null; + m_InvInertiaTensors = null; m_ExternalForces = null; m_ExternalTorques = null; m_Wind = null; @@ -1506,35 +1021,21 @@ namespace Obi m_CollisionMaterials = null; m_Phases = null; m_Filters = null; - m_RenderableRadii = null; + m_Anisotropies = null; m_PrincipalRadii = null; m_Normals = null; - m_Life = null; + m_Vorticities = null; m_FluidData = null; m_UserData = null; - m_FluidInterface = null; - m_FluidMaterials = null; - m_FluidMaterials2 = null; - m_FoamPositions = null; - m_FoamVelocities = null; - m_FoamColors = null; - m_FoamAttributes = null; - m_FoamCount = null; - m_Anisotropy = null; - m_ColliderContacts = null; - m_ParticleContacts = null; - m_ContactEffectiveMasses = null; - m_ParticleContactEffectiveMasses = null; - - m_BufferedQueryShapes = null; - m_BufferedQueryTransforms = null; - m_QueryShapes = null; - m_QueryTransforms = null; - m_QueryResults = null; - - deformableUVs = null; - deformableTriangles = null; - deformableEdges = null; + m_SmoothingRadii = null; + m_Buoyancies = null; + m_RestDensities = null; + m_Viscosities = null; + m_SurfaceTension = null; + m_VortConfinement = null; + m_AtmosphericDrag = null; + m_AtmosphericPressure = null; + m_Diffusion = null; } private void EnsureParticleArraysCapacity(int count) @@ -1542,15 +1043,12 @@ namespace Obi // only resize if the count is larger than the current amount of particles: if (count >= positions.count) { - colors.ResizeInitialized(count, Color.white); - deadParticles.ResizeInitialized(count); + colors.ResizeInitialized(count); startPositions.ResizeInitialized(count); - endPositions.ResizeInitialized(count); positions.ResizeInitialized(count); prevPositions.ResizeInitialized(count); restPositions.ResizeInitialized(count); startOrientations.ResizeInitialized(count, Quaternion.identity); - endOrientations.ResizeInitialized(count, Quaternion.identity); orientations.ResizeInitialized(count, Quaternion.identity); prevOrientations.ResizeInitialized(count, Quaternion.identity); restOrientations.ResizeInitialized(count, Quaternion.identity); @@ -1564,12 +1062,17 @@ namespace Obi collisionMaterials.ResizeInitialized(count); phases.ResizeInitialized(count); filters.ResizeInitialized(count); - renderableRadii.ResizeInitialized(count); - fluidInterface.ResizeInitialized(count); - fluidMaterials.ResizeInitialized(count); - fluidMaterials2.ResizeInitialized(count); - anisotropies.ResizeInitialized(count); - life.ResizeInitialized(count, float.PositiveInfinity); + anisotropies.ResizeInitialized(count * 3); + smoothingRadii.ResizeInitialized(count); + buoyancies.ResizeInitialized(count); + restDensities.ResizeInitialized(count); + viscosities.ResizeInitialized(count); + surfaceTension.ResizeInitialized(count); + vortConfinement.ResizeInitialized(count); + atmosphericDrag.ResizeInitialized(count); + atmosphericPressure.ResizeInitialized(count); + diffusion.ResizeInitialized(count); + vorticities.ResizeInitialized(count); fluidData.ResizeInitialized(count); userData.ResizeInitialized(count); externalForces.ResizeInitialized(count); @@ -1580,9 +1083,9 @@ namespace Obi positionConstraintCounts.ResizeInitialized(count); orientationConstraintCounts.ResizeInitialized(count); normals.ResizeInitialized(count); + invInertiaTensors.ResizeInitialized(count); - // reset dead particles counter to zero. - deadParticles.count = 0; + m_SolverImpl.ParticleCountChanged(this); } if (count >= m_ParticleToActor.Length) @@ -1591,366 +1094,38 @@ namespace Obi } } - private void UpdateFoamParticleCapacity() - { - if (maxFoamParticles != foamPositions.count) - { - foamPositions.ResizeUninitialized((int)maxFoamParticles); - foamVelocities.ResizeUninitialized((int)maxFoamParticles); - foamColors.ResizeUninitialized((int)maxFoamParticles); - foamAttributes.ResizeUninitialized((int)maxFoamParticles); - foamCount[3] = Mathf.Min(foamCount[3], (int)maxFoamParticles); - - implementation.MaxFoamParticleCountChanged(this); - } - } - - private void AllocateParticles(ObiNativeIntList particleIndices) + private void AllocateParticles(int[] particleIndices) { // If attempting to allocate more particles than we have: - if (particleIndices.count > freeList.count) + if (particleIndices.Length > freeList.count) { - int grow = particleIndices.count - freeList.count; + int grow = particleIndices.Length - freeList.count; // append new free indices: for (int i = 0; i < grow; ++i) freeList.Add(positions.count + i); // grow particle arrays: - EnsureParticleArraysCapacity(positions.count + particleIndices.count); + EnsureParticleArraysCapacity(positions.count + particleIndices.Length); } // determine first particle in the free list to use: - int first = freeList.count - particleIndices.count; + int first = freeList.count - particleIndices.Length; // copy free indices to the input array: - particleIndices.CopyFrom(freeList, first, 0, particleIndices.count); + freeList.CopyTo(particleIndices, first, particleIndices.Length); // shorten the free list: freeList.ResizeUninitialized(first); } - private void FreeParticles(ObiNativeIntList particleIndices) + private void FreeParticles(int[] particleIndices) { freeList.AddRange(particleIndices); } - private void CollisionCallbacks() - { - if (OnCollision != null) - { - colliderContacts.WaitForReadback(); - OnCollision.Invoke(this, colliderContacts); - } - if (OnParticleCollision != null) - { - particleContacts.WaitForReadback(); - OnParticleCollision.Invoke(this, particleContacts); - } - if (OnAdvection != null) - { - foamPositions.WaitForReadback(); - foamVelocities.WaitForReadback(); - foamAttributes.WaitForReadback(); - foamColors.WaitForReadback(); - foamCount.WaitForReadback(); - - OnAdvection.Invoke(this); - - - foamPositions.Upload(); - foamVelocities.Upload(); - foamAttributes.Upload(); - foamColors.Upload(); - foamCount.Upload(); - } - } - - private void NotifyDeceasedParticles() - { - deadParticles.WaitForReadback(); - - int dead = deadParticles.count; - for (int i = 0; i < dead; ++i) - { - int index = deadParticles[i]; - var pa = particleToActor[index]; - if (pa != null) - pa.actor.DeactivateParticle(pa.indexInActor); - } - - deadParticles.count = 0; - } - - public void StartSimulation(float stepDelta, int simulationSteps) - { - if (simulationSteps > 0) - { - // Complete previous simulation call, if any: - CompleteSimulation(); - - simulatedTime = stepDelta * simulationSteps; // physics time that has been simulated by Unity this frame. Might be more than the time we actually simulate, due to maxStepsPerFrame. - substepTime = stepDelta / substeps; // duration of a substep. - - // only update buffered synchronization before starting a new step. - bufferedSynchronization = synchronization; - - // notify actors of dead particles, so they can deactivate them. Do this before inserting new actors, - // as actor insertion might trigger a resizing of the deadParticles buffer. - NotifyDeceasedParticles(); - - // AddActor() calls are buffered, new actors should be inserted as this particular point in time: - while (addBuffer.TryDequeue(out ObiActor actor)) - InsertBufferedActor(actor); - - if (initialized && maxStepsPerFrame > 0) - { - simulationInFlight = true; - - int frameSubsteps = Mathf.Min(maxStepsPerFrame, simulationSteps) * substeps; // amount of substeps *actually* simulated this frame. - float timeToSimulate = frameSubsteps * substepTime; // amount of time we need to simulate, might be less than simulatedTime. - - UpdateFoamParticleCapacity(); - - // Update collision materials/rigidbodies after adding new actors to make sure collision materials are up to date. - // Also call it before SimulationStart, so that constraints referencing rigidbodies (such as Pin constraints in attachments) - // use handle data that's up to date. - using (m_UpdateColliderWorld.Auto()) - { - ObiColliderWorld.GetInstance().UpdateCollisionMaterials(); - EnsureRigidbodyArraysCapacity(ObiColliderWorld.GetInstance().rigidbodyHandles.Count); - } - - // We need SimulationStart to be called before PushConstraints for updating pin constraints. - OnSimulationStart?.Invoke(this, timeToSimulate, substepTime); - foreach (ObiActor actor in actors) - actor.SimulationStart(timeToSimulate, substepTime); - - // Update the active particles array: - PushActiveParticles(); - - // Update the simplices array: - PushSimplices(); - - // Update deformable triangles/edges arrays: - PushDeformableTriangles(); - PushDeformableEdges(); - - // Update constraint batches: - PushConstraints(); - - // Update parameters: - parameters.gravity = gravitySpace == Space.World ? transform.InverseTransformVector(gravity) : gravity; - parameters.ambientWind = windSpace == Space.World ? transform.InverseTransformVector(ambientWind) : ambientWind; - implementation.SetParameters(parameters); - - // Notify render systems that a step has started: - m_RenderSystems.Step(); - - // CPU -> GPU data transfer - implementation.PushData(); - - OnCollisionDetectionStart?.Invoke(this, timeToSimulate, substepTime); - foreach (ObiActor actor in actors) - actor.CollisionDetectionStart(timeToSimulate, substepTime); - - // Update inertial reference frame: - simulationHandle = UpdateTransformFrame(simulatedTime); - - // Calculate bounds and update particle lifetimes. - simulationHandle = implementation.UpdateBounds(simulationHandle, simulatedTime); - - // Perform collision detection: - if (simulateWhenInvisible || isVisible) - { - simulationHandle = implementation.CollisionDetection(simulationHandle, simulatedTime); - simulationHandle?.Complete(); // complete here, since several jobs need fluidParticles.Length. TODO: use deferred jobs. - } - - // Perform queued queries. This ensures queries "see" the same state as collision callbacks, and ensures no - // data races (queries performed while the simulation is running). - FlushSpatialQueries(); - - OnSubstepsStart?.Invoke(this, timeToSimulate, substepTime); - foreach (ObiActor actor in actors) - actor.SubstepsStart(timeToSimulate, substepTime); - - // Divide each step into multiple substeps: - float timeLeft = simulatedTime; - for (int i = 0; i < frameSubsteps; ++i) - { - // Only update the solver if it is visible, or if we must simulate even when invisible. - if ((simulateWhenInvisible || isVisible) && initialized) - { - simulationHandle = implementation.Substep(simulationHandle, stepDelta, substepTime, simulationSteps, timeLeft); - } - timeLeft -= substepTime; - } - - timeSinceSimulationStart += timeToSimulate; - - // Request GPU data to be brought back to the CPU. - RequestReadback(); - } - } - } - - private void FlushSpatialQueries() - { - while (bufferedQueryShapes.count > 0) - { - // copy buffered queries to the lists used for performing the queries: - queryShapes.ResizeUninitialized(bufferedQueryShapes.count); - queryTransforms.ResizeUninitialized(bufferedQueryTransforms.count); - - queryShapes.CopyFrom(bufferedQueryShapes); - queryTransforms.CopyFrom(bufferedQueryTransforms); - - bufferedQueryShapes.Clear(); - bufferedQueryTransforms.Clear(); - - implementation.SpatialQuery(queryShapes, queryTransforms, queryResults); - queryResults.Readback(); - - if (synchronousSpatialQueries) - { - // Wait for query results right now and trigger query results event: - queryResults.WaitForReadback(); - OnSpatialQueryResults?.Invoke(this, queryResults); - } - } - } - - public void CompleteSimulation() - { - // if the solver is not yet initialized or there's no previous call to SimulationStart, return. - if (!initialized || !simulationInFlight) - return; - - // Make sure previous simulation call has completed. - simulationHandle?.Complete(); - - // Update physics state for rendering, and wait for GPU readbacks to finish. - implementation.FinishSimulation(); - - // Trigger simulation end callback, after GPU readbacks are completed but before query/collision callbacks. - OnSimulationEnd?.Invoke(this, simulatedTime, substepTime); - foreach (ObiActor actor in actors) - actor.SimulationEnd(simulatedTime, substepTime); - - // Update rigidbody velocities with the simulation results: - ObiColliderWorld.GetInstance().UpdateRigidbodyVelocities(this); - - // Trigger spatial query results: - if (!synchronousSpatialQueries) - { - queryResults.WaitForReadback(); - OnSpatialQueryResults?.Invoke(this, queryResults); - } - - // Trigger collision callbacks now that GPU data (including rigidbody velocity deltas) is available. - CollisionCallbacks(); - - simulationInFlight = false; - } - - /// - /// Performs physics state interpolation and updates rendering. - /// - /// Remaining time that could not be simulated during this frame (in seconds). This is used to interpolate physics state. - public void Render(float unsimulatedTime) - { - if (!initialized) - return; - - // Only perform interpolation if the solver is visible, or if we must simulate even when invisible. - if (simulateWhenInvisible || isVisible) - { - using (m_StateInterpolationPerfMarker.Auto()) - { - // interpolate physics state: - simulationHandle = implementation.ApplyInterpolation(simulationHandle, startPositions, startOrientations, Time.fixedDeltaTime, unsimulatedTime); - } - } - - simulationHandle?.Complete(); - - // test bounds against all cameras to update visibility. - UpdateVisibility(); - - OnInterpolate?.Invoke(this, simulatedTime, substepTime); - - foreach (ObiActor actor in actors) - actor.Interpolate(simulatedTime, substepTime); - - if (!Application.isPlaying) - { - // in-editor, actors update their positions/orientations in Interpolate when transformed, - // so we must copy them to the GPU: - positions.Upload(); - orientations.Upload(); - renderablePositions.Upload(); - renderableOrientations.Upload(); - } - - // Update render systems if dirty: - if (dirtyRendering != 0) - { - m_RenderSystems.Setup(dirtyRendering); - dirtyRendering = 0; - } - - // Only render if visible: - if (simulateWhenInvisible || isVisible) - m_RenderSystems.Render(); - } - - private void UpdateBounds() - { - // While in-editor, update active particles and simplices so that - // solver bounds are correct. - if (initialized) - { - PushActiveParticles(); - PushSimplices(); - - simulationHandle = UpdateTransformFrame(0); - simulationHandle = implementation.UpdateBounds(simulationHandle, 0); - simulationHandle?.Complete(); - } - } - - private void RequestReadback() - { - if (!initialized) - return; - - OnRequestReadback?.Invoke(this); - foreach (ObiActor actor in actors) - actor.RequestReadback(); - - implementation.RequestReadback(); - - // We must read the entire contacts buffer instead of the amount of contacts the CPU - // has from last frame, since we need to get both the counter value and the contacts data on the same - // frame. Alternative would be to read back amount of contacts from last frame, but that - // means we could find invalid/uninitialized contacts if the amount of contacts decreases from one frame to the next. - if (OnCollision != null) - colliderContacts.Readback(); - if (OnParticleCollision != null) - particleContacts.Readback(); - - if (OnAdvection != null) - { - foamPositions.Readback(); - foamVelocities.Readback(); - foamAttributes.Readback(); - foamColors.Readback(); - foamCount.Readback(); - } - } /// /// Adds an actor to the solver. @@ -1964,17 +1139,28 @@ namespace Obi /// public bool AddActor(ObiActor actor) { - if (actor == null || actors == null || actor.sourceBlueprint == null || actor.sourceBlueprint.empty || actors.Contains(actor) || addBuffer.Contains(actor)) + if (actor == null) return false; - // in-editor, we insert actors right away since the simulation is not running, - // yet we need to perform rendering. + if ((actors == null || !actors.Contains(actor)) && actor.sourceBlueprint != null) + { + // If the solver is not initialized yet, do so: + Initialize(); + + actor.solverIndices = new int[actor.sourceBlueprint.particleCount]; + + AllocateParticles(actor.solverIndices); + + for (int i = 0; i < actor.solverIndices.Length; ++i) + particleToActor[actor.solverIndices[i]] = new ObiSolver.ParticleInActor(actor, i); + + actors.Add(actor); + + actor.LoadBlueprint(this); + } - if (!Application.isPlaying) - InsertBufferedActor(actor); - else - addBuffer.Enqueue(actor); return true; + } /// @@ -1989,34 +1175,27 @@ namespace Obi /// public bool RemoveActor(ObiActor actor) { + if (actor == null) return false; - // remove from add buffer: TODO: use list instead of queue. - addBuffer = new Queue(addBuffer.Where(s => s != actor)); - // Find actor index in our actors array: int index = actors.IndexOf(actor); // If we are in charge of this actor indeed, perform all steps necessary to release it. if (index >= 0) { - actor.UnloadBlueprint(); + actor.UnloadBlueprint(this); - for (int i = 0; i < actor.solverIndices.count; ++i) + for (int i = 0; i < actor.solverIndices.Length; ++i) particleToActor[actor.solverIndices[i]] = null; FreeParticles(actor.solverIndices); - freeGroupIDs.Push(actor.groupID); actors.RemoveAt(index); - actor.solverIndices.Dispose(); actor.solverIndices = null; - for (int i = 0; i < actor.solverBatchOffsets.Length; ++i) - actor.solverBatchOffsets[i].Clear(); - // If this was the last actor in the solver, tear it down: if (actors.Count == 0) Teardown(); @@ -2027,35 +1206,6 @@ namespace Obi return false; } - private void InsertBufferedActor(ObiActor actor) - { - if (actor == null) - return; - - // If the solver is not initialized yet, do so: - Initialize(); - - if (actor.solverIndices == null) - actor.solverIndices = new ObiNativeIntList(); - actor.solverIndices.ResizeUninitialized(actor.sourceBlueprint.particleCount); - - AllocateParticles(actor.solverIndices); - - for (int i = 0; i < actor.solverIndices.count; ++i) - particleToActor[actor.solverIndices[i]] = new ParticleInActor(actor, i); - - actors.Add(actor); - - if (freeGroupIDs.Count == 0) - freeGroupIDs.Push(actors.Count); - actor.groupID = freeGroupIDs.Pop(); - - actor.LoadBlueprint(); - - implementation.ParticleCountChanged(this); - OnParticleCountChanged?.Invoke(this); - } - /// /// Updates solver parameters. /// @@ -2065,41 +1215,39 @@ namespace Obi if (!initialized) return; - implementation.SetParameters(parameters); + m_SolverImpl.SetParameters(parameters); - implementation.SetConstraintGroupParameters(Oni.ConstraintType.Distance, ref distanceConstraintParameters); + m_SolverImpl.SetConstraintGroupParameters(Oni.ConstraintType.Distance, ref distanceConstraintParameters); - implementation.SetConstraintGroupParameters(Oni.ConstraintType.Bending, ref bendingConstraintParameters); + m_SolverImpl.SetConstraintGroupParameters(Oni.ConstraintType.Bending, ref bendingConstraintParameters); - implementation.SetConstraintGroupParameters(Oni.ConstraintType.ParticleCollision, ref particleCollisionConstraintParameters); + m_SolverImpl.SetConstraintGroupParameters(Oni.ConstraintType.ParticleCollision, ref particleCollisionConstraintParameters); - implementation.SetConstraintGroupParameters(Oni.ConstraintType.ParticleFriction, ref particleFrictionConstraintParameters); + m_SolverImpl.SetConstraintGroupParameters(Oni.ConstraintType.ParticleFriction, ref particleFrictionConstraintParameters); - implementation.SetConstraintGroupParameters(Oni.ConstraintType.Collision, ref collisionConstraintParameters); + m_SolverImpl.SetConstraintGroupParameters(Oni.ConstraintType.Collision, ref collisionConstraintParameters); - implementation.SetConstraintGroupParameters(Oni.ConstraintType.Friction, ref frictionConstraintParameters); + m_SolverImpl.SetConstraintGroupParameters(Oni.ConstraintType.Friction, ref frictionConstraintParameters); - implementation.SetConstraintGroupParameters(Oni.ConstraintType.Density, ref densityConstraintParameters); + m_SolverImpl.SetConstraintGroupParameters(Oni.ConstraintType.Density, ref densityConstraintParameters); - implementation.SetConstraintGroupParameters(Oni.ConstraintType.Skin, ref skinConstraintParameters); + m_SolverImpl.SetConstraintGroupParameters(Oni.ConstraintType.Skin, ref skinConstraintParameters); - implementation.SetConstraintGroupParameters(Oni.ConstraintType.Volume, ref volumeConstraintParameters); + m_SolverImpl.SetConstraintGroupParameters(Oni.ConstraintType.Volume, ref volumeConstraintParameters); - implementation.SetConstraintGroupParameters(Oni.ConstraintType.ShapeMatching, ref shapeMatchingConstraintParameters); + m_SolverImpl.SetConstraintGroupParameters(Oni.ConstraintType.ShapeMatching, ref shapeMatchingConstraintParameters); - implementation.SetConstraintGroupParameters(Oni.ConstraintType.Tether, ref tetherConstraintParameters); + m_SolverImpl.SetConstraintGroupParameters(Oni.ConstraintType.Tether, ref tetherConstraintParameters); - implementation.SetConstraintGroupParameters(Oni.ConstraintType.Pin, ref pinConstraintParameters); + m_SolverImpl.SetConstraintGroupParameters(Oni.ConstraintType.Pin, ref pinConstraintParameters); - implementation.SetConstraintGroupParameters(Oni.ConstraintType.Pinhole, ref pinholeConstraintParameters); + m_SolverImpl.SetConstraintGroupParameters(Oni.ConstraintType.Stitch, ref stitchConstraintParameters); - implementation.SetConstraintGroupParameters(Oni.ConstraintType.Stitch, ref stitchConstraintParameters); + m_SolverImpl.SetConstraintGroupParameters(Oni.ConstraintType.StretchShear, ref stretchShearConstraintParameters); - implementation.SetConstraintGroupParameters(Oni.ConstraintType.StretchShear, ref stretchShearConstraintParameters); + m_SolverImpl.SetConstraintGroupParameters(Oni.ConstraintType.BendTwist, ref bendTwistConstraintParameters); - implementation.SetConstraintGroupParameters(Oni.ConstraintType.BendTwist, ref bendTwistConstraintParameters); - - implementation.SetConstraintGroupParameters(Oni.ConstraintType.Chain, ref chainConstraintParameters); + m_SolverImpl.SetConstraintGroupParameters(Oni.ConstraintType.Chain, ref chainConstraintParameters); if (OnUpdateParameters != null) OnUpdateParameters(this); @@ -2130,7 +1278,6 @@ namespace Obi case Oni.ConstraintType.ShapeMatching: return shapeMatchingConstraintParameters; case Oni.ConstraintType.Tether: return tetherConstraintParameters; case Oni.ConstraintType.Pin: return pinConstraintParameters; - case Oni.ConstraintType.Pinhole: return pinholeConstraintParameters; case Oni.ConstraintType.Stitch: return stitchConstraintParameters; case Oni.ConstraintType.Density: return densityConstraintParameters; case Oni.ConstraintType.StretchShear: return stretchShearConstraintParameters; @@ -2158,218 +1305,153 @@ namespace Obi private void PushActiveParticles() { - if (dirtyActiveParticles) + activeParticles.Clear(); + for (int i = 0; i < actors.Count; ++i) { - using (m_PushActiveParticles.Auto()) + ObiActor currentActor = actors[i]; + + if (currentActor.isActiveAndEnabled) { - activeParticles.Clear(); - for (int i = 0; i < actors.Count; ++i) - { - if (actors[i].isActiveAndEnabled) - activeParticles.AddRange(actors[i].solverIndices, actors[i].activeParticleCount); - } - - implementation.SetActiveParticles(activeParticles); - - dirtyActiveParticles = false; + for (int j = 0; j < currentActor.activeParticleCount; ++j) + activeParticles.Add(currentActor.solverIndices[j]); } } - } - private void PushDeformableTriangles() - { - if (dirtyDeformableTriangles) - { - using (m_PushDeformableTriangles.Auto()) - { - deformableTriangles.Clear(); - deformableUVs.Clear(); - - for (int i = 0; i < actors.Count; ++i) - { - ObiActor currentActor = actors[i]; - if (currentActor.isActiveAndEnabled) - { - currentActor.ProvideDeformableTriangles(deformableTriangles, deformableUVs); - } - } - - implementation.SetDeformableTriangles(deformableTriangles, deformableUVs); - - dirtyDeformableTriangles = false; - } - } - } - - private void PushDeformableEdges() - { - if (dirtyDeformableEdges) - { - using (m_PushDeformableEdges.Auto()) - { - deformableEdges.Clear(); - - for (int i = 0; i < actors.Count; ++i) - { - ObiActor currentActor = actors[i]; - if (currentActor.isActiveAndEnabled) - { - currentActor.ProvideDeformableEdges(deformableEdges); - } - } - - implementation.SetDeformableEdges(deformableEdges); - - dirtyDeformableEdges = false; - } - } + implementation.SetActiveParticles(activeParticles); + dirtyActiveParticles = false; } private void PushSimplices() { + simplices.Clear(); + points.Clear(); + edges.Clear(); + triangles.Clear(); - if (dirtySimplices != Oni.SimplexType.None) + for (int i = 0; i < actors.Count; ++i) { - using (m_PushSimplices.Auto()) + ObiActor currentActor = actors[i]; + + if (currentActor.isActiveAndEnabled && currentActor.isLoaded) { - simplices.Clear(); - - if ((dirtySimplices & Oni.SimplexType.Point) != 0) - points.Clear(); - - if ((dirtySimplices & Oni.SimplexType.Edge) != 0) - edges.Clear(); - - if ((dirtySimplices & Oni.SimplexType.Triangle) != 0) - triangles.Clear(); - - for (int i = 0; i < actors.Count; ++i) + //simplex based contacts + if (currentActor.surfaceCollisions) { - var currentActor = actors[i]; - - if (currentActor.isActiveAndEnabled && currentActor.isLoaded) - { - //simplex based contacts - if (currentActor.surfaceCollisions) + if (currentActor.blueprint.points != null) + for (int j = 0; j < currentActor.blueprint.points.Length; ++j) { - if (currentActor.sharedBlueprint.points != null && (dirtySimplices & Oni.SimplexType.Point) != 0) - for (int j = 0; j < currentActor.sharedBlueprint.points.Length; ++j) - { - int actorIndex = currentActor.sharedBlueprint.points[j]; + int actorIndex = currentActor.blueprint.points[j]; - if (actorIndex < currentActor.activeParticleCount) - points.Add(currentActor.solverIndices[actorIndex]); - } - - if (currentActor.sharedBlueprint.edges != null && (dirtySimplices & Oni.SimplexType.Edge) != 0) - for (int j = 0; j < currentActor.sharedBlueprint.edges.Length / 2; ++j) - { - int actorIndex1 = currentActor.sharedBlueprint.edges[j * 2]; - int actorIndex2 = currentActor.sharedBlueprint.edges[j * 2 + 1]; - - if (actorIndex1 < currentActor.activeParticleCount && actorIndex2 < currentActor.activeParticleCount) - { - edges.Add(currentActor.solverIndices[actorIndex1]); - edges.Add(currentActor.solverIndices[actorIndex2]); - } - } - - if (currentActor.sharedBlueprint.triangles != null && (dirtySimplices & Oni.SimplexType.Triangle) != 0) - for (int j = 0; j < currentActor.sharedBlueprint.triangles.Length / 3; ++j) - { - int actorIndex1 = currentActor.sharedBlueprint.triangles[j * 3]; - int actorIndex2 = currentActor.sharedBlueprint.triangles[j * 3 + 1]; - int actorIndex3 = currentActor.sharedBlueprint.triangles[j * 3 + 2]; - - if (actorIndex1 < currentActor.activeParticleCount && - actorIndex2 < currentActor.activeParticleCount && - actorIndex3 < currentActor.activeParticleCount) - { - triangles.Add(currentActor.solverIndices[actorIndex1]); - triangles.Add(currentActor.solverIndices[actorIndex2]); - triangles.Add(currentActor.solverIndices[actorIndex3]); - } - } + if (actorIndex < currentActor.activeParticleCount) + points.Add(currentActor.solverIndices[actorIndex]); } - // particle based contacts - else if ((dirtySimplices & Oni.SimplexType.Point) != 0) + + if (currentActor.blueprint.edges != null) + for (int j = 0; j < currentActor.blueprint.edges.Length / 2; ++j) { - // generate a point simplex out of each active particle: - points.AddRange(currentActor.solverIndices, currentActor.activeParticleCount); + int actorIndex1 = currentActor.blueprint.edges[j * 2]; + int actorIndex2 = currentActor.blueprint.edges[j * 2 + 1]; + + if (actorIndex1 < currentActor.activeParticleCount && actorIndex2 < currentActor.activeParticleCount) + { + edges.Add(currentActor.solverIndices[actorIndex1]); + edges.Add(currentActor.solverIndices[actorIndex2]); + } + } + + if (currentActor.blueprint.triangles != null) + for (int j = 0; j < currentActor.blueprint.triangles.Length / 3; ++j) + { + int actorIndex1 = currentActor.blueprint.triangles[j * 3]; + int actorIndex2 = currentActor.blueprint.triangles[j * 3 + 1]; + int actorIndex3 = currentActor.blueprint.triangles[j * 3 + 2]; // TODO: +1: degenerate triangles. check out! + + if (actorIndex1 < currentActor.activeParticleCount && + actorIndex2 < currentActor.activeParticleCount && + actorIndex3 < currentActor.activeParticleCount) + { + triangles.Add(currentActor.solverIndices[actorIndex1]); + triangles.Add(currentActor.solverIndices[actorIndex2]); + triangles.Add(currentActor.solverIndices[actorIndex3]); + } } - } } - - simplices.EnsureCapacity(points.count + edges.count + triangles.count); - simplices.AddRange(triangles); - simplices.AddRange(edges); - simplices.AddRange(points); - - m_SimplexCounts = new SimplexCounts(points.count, edges.count / 2, triangles.count / 3); - - cellCoords.ResizeInitialized(m_SimplexCounts.simplexCount); - - implementation.SetSimplices(simplices, m_SimplexCounts); - - dirtySimplices = Oni.SimplexType.None; + // particle based contacts + else + { + // generate a point simplex out of each active particle: + for (int j = 0; j < currentActor.activeParticleCount; ++j) + points.Add(currentActor.solverIndices[j]); + } } } + + simplices.capacity = points.Count + edges.Count + triangles.Count; + simplices.AddRange(points); + simplices.AddRange(edges); + simplices.AddRange(triangles); + + m_SimplexCounts = new SimplexCounts(points.Count, edges.Count / 2, triangles.Count / 3); + cellCoords.ResizeInitialized(m_SimplexCounts.simplexCount); + + m_SolverImpl.SetSimplices(simplices, m_SimplexCounts); + dirtySimplices = false; + } private void PushConstraints() { - if (dirtyConstraints != 0) + // Clear all dirty constraints: + for (int i = 0; i < Oni.ConstraintTypeCount; ++i) + if (m_Constraints[i] != null && ((1 << i) & dirtyConstraints) != 0) + m_Constraints[i].Clear(); + + // Iterate over all actors, merging their batches together: + for (int k = 0; k < actors.Count; ++k) { - // Clear all dirty constraints: - for (int i = 0; i < Oni.ConstraintTypeCount; ++i) - if (m_Constraints[i] != null && ((1 << i) & dirtyConstraints) != 0) - m_Constraints[i].Clear(); - - // Iterate over all actors, merging their batches together: - for (int k = 0; k < actors.Count; ++k) + if (actors[k].isLoaded) { - if (actors[k].isLoaded) - { - for (int i = 0; i < Oni.ConstraintTypeCount; ++i) - if (m_Constraints[i] != null && ((1 << i) & dirtyConstraints) != 0) - { - var constraints = actors[k].GetConstraintsByType((Oni.ConstraintType)i); - m_Constraints[i].Merge(actors[k], constraints); - } - } + for (int i = 0; i < Oni.ConstraintTypeCount; ++i) + if (m_Constraints[i] != null && ((1 << i) & dirtyConstraints) != 0) + { + var constraints = actors[k].GetConstraintsByType((Oni.ConstraintType)i); + m_Constraints[i].Merge(actors[k], constraints); + } } - - // Readd the constraints to the solver: - for (int i = 0; i < Oni.ConstraintTypeCount; ++i) - if (m_Constraints[i] != null && ((1 << i) & dirtyConstraints) != 0) - m_Constraints[i].AddToSolver(this); - - // Reset the dirty flag: - dirtyConstraints = 0; } + + // Readd the constraints to the solver: + for (int i = 0; i < Oni.ConstraintTypeCount; ++i) + if (m_Constraints[i] != null && ((1 << i) & dirtyConstraints) != 0) + m_Constraints[i].AddToSolver(this); + + // Reset the dirty flag: + dirtyConstraints = 0; } /** - * Updates solver bounds, then checks if they're visible from at least one camera. If so, sets isVisible to true, false otherwise. + * Checks if any particle in the solver is visible from at least one camera. If so, sets isVisible to true, false otherwise. */ private void UpdateVisibility() { + using (m_UpdateVisibilityPerfMarker.Auto()) { + using (m_GetSolverBoundsPerfMarker.Auto()) { // get bounds in solver space: Vector3 min = Vector3.zero, max = Vector3.zero; - implementation.GetBounds(ref min, ref max); - m_Bounds.SetMinMax(min, max); + m_SolverImpl.GetBounds(ref min, ref max); + bounds.SetMinMax(min, max); } - if (m_Bounds.AreValid()) + if (bounds.AreValid()) { using (m_TestBoundsPerfMarker.Auto()) { // transform bounds to world space: - m_BoundsWS = m_Bounds.Transform(transform.localToWorldMatrix); + bounds = bounds.Transform(transform.localToWorldMatrix); using (m_GetAllCamerasPerfMarker.Auto()) { @@ -2380,7 +1462,7 @@ namespace Obi foreach (Camera cam in sceneCameras) { GeometryUtility.CalculateFrustumPlanes(cam, planes); - if (GeometryUtility.TestPlanesAABB(planes, m_BoundsWS)) + if (GeometryUtility.TestPlanesAABB(planes, bounds)) { if (!isVisible) { @@ -2409,123 +1491,344 @@ namespace Obi Vector4 scale = transform.lossyScale; Quaternion rotation = transform.rotation; - implementation.InitializeFrame(translation, scale, rotation); + m_SolverImpl.InitializeFrame(translation, scale, rotation); } - private IObiJobHandle UpdateTransformFrame(float dt) + private void UpdateTransformFrame(float dt) { Vector4 translation = transform.position; Vector4 scale = transform.lossyScale; Quaternion rotation = transform.rotation; - implementation.UpdateFrame(translation, scale, rotation, dt); - return implementation.ApplyFrame(worldLinearInertiaScale, worldAngularInertiaScale, dt); + m_SolverImpl.UpdateFrame(translation, scale, rotation, dt); + m_SolverImpl.ApplyFrame(worldLinearInertiaScale, worldAngularInertiaScale, dt); } - public void RegisterRenderSystem(IRenderSystem renderSystem) + public void PrepareFrame() { - m_RenderSystems.RegisterRenderSystem(renderSystem); - } + if (OnPrepareFrame != null) + OnPrepareFrame(this); - public void UnregisterRenderSystem(IRenderSystem renderSystem) - { - m_RenderSystems.UnregisterRenderSystem(renderSystem); - } - - public RenderSystem GetRenderSystem() where T : ObiRenderer - { - return m_RenderSystems.GetRenderSystem(); - } - - public IRenderSystem GetRenderSystem(Oni.RenderingSystemType type) - { - return m_RenderSystems.GetRenderSystem(type); + foreach (ObiActor actor in actors) + actor.PrepareFrame(); } /// - /// Enqueues a generic spatial query to be performed during the next physics update. - /// If called when the solver is yet uninitialized, - /// the query will be ignored and this method will return -1. + /// Signals the start of a new time step. + /// + /// Pushes active particles (if dirtyActiveParticles is true), and runtime constraints (if dirtyConstraints != 0). + /// Updates the solver's nertial reference frame. Calls begin step callbacks. + /// Finally, it schedules execution of simulation tasks at the beginng on a physics step (most notably, collision detection), and returns a handle to the job that will perform them. + /// Duration of the entire time step (in seconds). + /// + /// A handle to the job. + /// + public IObiJobHandle BeginStep(float stepTime) + { + if (!isActiveAndEnabled || !initialized) + return null; + + if (OnPrepareStep != null) + OnPrepareStep(this, stepTime); + + foreach (ObiActor actor in actors) + actor.PrepareStep(stepTime); + + // Update the active particles array: + if (dirtyActiveParticles) + PushActiveParticles(); + + // Update the simplices array: + if (dirtySimplices) + PushSimplices(); + + // Update constraint batches: + if (dirtyConstraints != 0) + PushConstraints(); + + // Update inertial frame: + UpdateTransformFrame(stepTime); + + // Update gravity: + parameters.gravity = gravitySpace == Space.World ? transform.InverseTransformVector(gravity) : gravity; + if (initialized) + m_SolverImpl.SetParameters(parameters); + + // Copy positions / orientations at the start of the step, for interpolation: + startPositions.CopyFrom(positions); + startOrientations.CopyFrom(orientations); + + if (OnBeginStep != null) + OnBeginStep(this, stepTime); + + foreach (ObiActor actor in actors) + actor.BeginStep(stepTime); + + // Perform collision detection: + if (simulateWhenInvisible || isVisible) + return m_SolverImpl.CollisionDetection(stepTime); + + return null; + } + + /// + /// Schedules the job to advance the simulation a given amount of time, then returns a handle to this job. + /// + /// Amount of time to advance (in seconds). + /// + /// A handle to the job. + /// + public IObiJobHandle Substep(float stepTime, float substepTime, int index) + { + + // Only update the solver if it is visible, or if we must simulate even when invisible. + if (isActiveAndEnabled && (simulateWhenInvisible || isVisible) && initialized) + { + if (OnSubstep != null) + OnSubstep(this, substepTime); + + foreach (ObiActor actor in actors) + actor.Substep(substepTime); + + // Update the solver (this is internally split in tasks so multiple solvers can be updated in parallel) + return m_SolverImpl.Substep(stepTime, substepTime, index); + } + + return null; + } + + /// + /// Wraps up a simulation step: resets external forces and calls collision callbacks. + /// + /// Size of the last substep performed this step (in seconds). + public void EndStep(float substepTime) + { + if (!initialized) + return; + + m_contactCount = implementation.GetConstraintCount(Oni.ConstraintType.Collision); + m_particleContactCount = implementation.GetConstraintCount(Oni.ConstraintType.ParticleCollision); + + if (OnCollision != null) + { + collisionArgs.contacts.SetCount(m_contactCount); + + if (m_contactCount > 0) + implementation.GetCollisionContacts(collisionArgs.contacts.Data, m_contactCount); + + OnCollision(this, collisionArgs); + + } + + if (OnParticleCollision != null) + { + particleCollisionArgs.contacts.SetCount(m_particleContactCount); + + if (m_particleContactCount > 0) + implementation.GetParticleCollisionContacts(particleCollisionArgs.contacts.Data, m_particleContactCount); + + OnParticleCollision(this, particleCollisionArgs); + + } + + m_SolverImpl.ResetForces(); + + if (OnEndStep != null) + OnEndStep(this); + + foreach (ObiActor actor in actors) + actor.EndStep(substepTime); + } + + /// + /// Finalizes the frame by performing physics state interpolation. + /// + /// This is usually used for mesh generation, rendering setup and other tasks that must take place after all physics steps for this frame are done. + /// Duration of this time step (in seconds). Note this is the entire timestep, not just the ast substep. + /// Remaining time that could not be simulated during this step (in seconds). This is used to interpolate physics state. + public void Interpolate(float stepTime, float unsimulatedTime) + { + if (!isActiveAndEnabled || !initialized) + return; + + // Only perform interpolation if the solver is visible, or if we must simulate even when invisible. + if (simulateWhenInvisible || isVisible) + { + using (m_StateInterpolationPerfMarker.Auto()) + { + // interpolate physics state: + m_SolverImpl.ApplyInterpolation(startPositions, startOrientations, stepTime, unsimulatedTime); + } + } + + UpdateVisibility(); + + if (OnInterpolate != null) + OnInterpolate(this); + + foreach (ObiActor actor in actors) + actor.Interpolate(); + + } + + public void ReleaseJobHandles() + { + if (!initialized) + return; + + m_SolverImpl.ReleaseJobHandles(); + } + + /// + /// Performs multiple spatial queries in parallel against all simplices in the solver, and returns a list of results. + /// + /// All other query/raycast methods are built on top of this one. Use it when you need maximum flexibility/performance. + /// List of query shapes to test against all simplices in the solver. + /// List of transforms, must have the same size as the shapes list. + /// + /// This list will contain results for all queries, in no specific order. + /// Use the queryIndex member of each query result to correlate each result to the query that spawned it. For instance: + /// a query result with queryIndex 5, belongs to the query shape at index 5 in the input shapes list. + /// + public void SpatialQuery(ObiNativeQueryShapeList shapes, ObiNativeAffineTransformList transforms, ObiNativeQueryResultList results) + { + if (!initialized || shapes == null || transforms == null || results == null || shapes.count != transforms.count) + return; + + m_SolverImpl.SpatialQuery(shapes, transforms, results); + } + + /// + /// Performs a single spatial queries against all simplices in the solver, and returns a list of results. /// /// Query shape to test against all simplices in the solver. - /// Transform to apply to the query shape. + /// Transform applied to the query shape. /// - /// Index of the query in the queue. Use the queryIndex member of each query result to correlate each result to the query that spawned it. For instance: - /// a query result with queryIndex 5, belongs to the query shape at index 5 in the queue. + /// An array that contains the query results. /// - public int EnqueueSpatialQuery(QueryShape shape, AffineTransform transform) + public QueryResult[] SpatialQuery(QueryShape shape, AffineTransform transform) { - // if the solver is not initialized, bail out. if (!initialized) - return -1; + return null; - int index = bufferedQueryShapes.count; - bufferedQueryShapes.Add(shape); - bufferedQueryTransforms.Add(transform); - return index; + var queries = new ObiNativeQueryShapeList(); + var transforms = new ObiNativeAffineTransformList(); + var results = new ObiNativeQueryResultList(); + + queries.Add(shape); + transforms.Add(transform); + + m_SolverImpl.SpatialQuery(queries, transforms, results); + + var resultsArray = results.ToArray(); + + queries.Dispose(); + transforms.Dispose(); + results.Dispose(); + + return resultsArray; } /// - /// Enqueues multiple generic spatial query to be performed during the next physics update. - /// If called when the solver is yet uninitialized, - /// the query will be ignored and this method will return -1. - /// - /// Query shapes to test against all simplices in the solver. - /// Transforms to apply to the query shapes. - /// - /// Index of the first query in the queue. Use the queryIndex member of each query result to correlate each result to the query that spawned it. For instance: - /// a query result with queryIndex 5, belongs to the query shape at index 5 in the queue. - /// - public int EnqueueSpatialQueries(ObiNativeQueryShapeList shapes, ObiNativeAffineTransformList transforms) - { - // if the solver is not initialized or input is not ok, bail out. - if (!initialized || shapes == null || transforms == null || shapes.count != transforms.count) - return -1; - - int index = bufferedQueryShapes.count; - bufferedQueryShapes.AddRange(shapes); - bufferedQueryTransforms.AddRange(transforms); - return index; - } - - /// - /// Enqueues a raycast to be performed during the next physics update. - /// If called when the solver is yet uninitialized, - /// the query will be ignored and this method will return -1. + /// Performs a single raycast against all simplices in the solver, and returns the result. /// /// Ray to cast against all simplices in the solver. Expressed in world space. + /// Struct containing hit info, if any. /// Filter (mask, category) used to filter out collisions against certain simplices. /// Ray length. /// /// Ray thickness. If the ray hits a simplex, hitInfo will contain a point on the simplex. /// If it merely passes near the simplex (within its thickness distance, but no actual hit), it will contain the point on the ray closest to the simplex surface. /// - /// Index of the query in the queue. Use the queryIndex member of each query result to correlate each result to the query that spawned it. For instance: - /// a query result with queryIndex 5, belongs to the query shape at index 5 in the queue. + /// Whether the ray hit anything. If the ray did not hit, the hitInfo will contain a simplexIndex of -1 and a distance equal to maxDistance. /// - public int EnqueueRaycast(Ray ray, int filter, float maxDistance = 100, float rayThickness = 0) + public bool Raycast(Ray ray, out QueryResult hitInfo, int filter, float maxDistance = 100, float rayThickness = 0) { - // if the solver is not initialized or simulation is currently underway, bail out. - if (!initialized) - return -1; - - int index = bufferedQueryShapes.count; - - bufferedQueryShapes.Add(new QueryShape + var result = Raycast(new List { ray }, filter, maxDistance, rayThickness); + if (result != null && result.Length > 0 && result[0].simplexIndex >= 0) { - type = QueryShape.QueryType.Ray, - center = ray.origin, - size = ray.direction * maxDistance, - contactOffset = rayThickness, - maxDistance = 0.0001f, - filter = filter - }); - - bufferedQueryTransforms.Add(new AffineTransform(Vector4.zero, Quaternion.identity, Vector4.one)); - - return index; + hitInfo = result[0]; + return true; + } + else + { + hitInfo = new QueryResult() { distance = maxDistance }; + return false; + } } + /// + /// Performs multiple raycasts in parallel against all simplices in the solver, and returns the results. + /// + /// List of rays to cast against all simplices in the solver. Expressed in world space. + /// Filter (mask, category) used to filter out collisions against certain simplices. + /// Ray length. + /// + /// Ray thickness. If the ray hits a simplex, hitInfo will contain a point on the simplex. + /// If it merely passes near the simplex (within its thickness distance, but no actual hit), it will contain the point on the ray closest to the simplex surface. + /// + /// This list will contain results for all raycasts, in no specific order. + /// Use the queryIndex member of each query result to correlate each result to the raycast that spawned it. For instance: + /// a query result with queryIndex 5, belongs to the raycast at index 5 in the input rays list. + /// + public QueryResult[] Raycast(List rays, int filter, float maxDistance = 100, float rayThickness = 0) + { + if (!initialized) + return null; + + var queries = new ObiNativeQueryShapeList(); + var transforms = new ObiNativeAffineTransformList(); + var results = new ObiNativeQueryResultList(); + var resultArray = new QueryResult[rays.Count]; + + for (int i = 0; i < rays.Count; ++i) + { + queries.Add(new QueryShape() + { + type = QueryShape.QueryType.Ray, + center = rays[i].origin, + size = rays[i].origin + rays[i].direction * maxDistance, + contactOffset = rayThickness, + maxDistance = 0.0005f, + filter = filter + }); + + transforms.Add(new AffineTransform(Vector4.zero, Quaternion.identity, Vector4.one)); + + resultArray[i] = new QueryResult { distance = maxDistance, simplexIndex = -1, queryIndex = -1 }; + } + + m_SolverImpl.SpatialQuery(queries, transforms, results); + + Matrix4x4 solver2World = transform.localToWorldMatrix; + for (int i = 0; i < results.count; ++i) + { + int rayIndex = results[i].queryIndex; + var pointWS = solver2World.MultiplyPoint3x4(results[i].queryPoint + results[i].normal * results[i].distance); + + if (results[i].distance <= 0.001f) + { + // project the hit on the ray: + float rayDistance = (pointWS.x - rays[rayIndex].origin.x) * rays[rayIndex].direction.x + + (pointWS.y - rays[rayIndex].origin.y) * rays[rayIndex].direction.y + + (pointWS.z - rays[rayIndex].origin.z) * rays[rayIndex].direction.z; + + // keep the closest hit: + if (rayDistance < resultArray[rayIndex].distance) + { + resultArray[rayIndex] = results[i]; + resultArray[rayIndex].distance = rayDistance; + resultArray[rayIndex].queryPoint = rays[rayIndex].origin + rays[rayIndex].direction * rayDistance; + } + } + } + + queries.Dispose(); + transforms.Dispose(); + results.Dispose(); + + return resultArray; + } } } diff --git a/Assets/Obi/Scripts/Common/Updaters.meta b/Assets/Obi/Scripts/Common/Updaters.meta new file mode 100644 index 000000000..3f65456b0 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Updaters.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cefe4e650f12d45c2bc73c7e1996aee7 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Updaters/ObiFixedUpdater.cs b/Assets/Obi/Scripts/Common/Updaters/ObiFixedUpdater.cs new file mode 100644 index 000000000..35cb5f99d --- /dev/null +++ b/Assets/Obi/Scripts/Common/Updaters/ObiFixedUpdater.cs @@ -0,0 +1,70 @@ +using UnityEngine; +using System.Collections; +using System.Collections.Generic; +using System; + +namespace Obi +{ + /// + /// Updater class that will perform simulation during FixedUpdate(). This is the most physically correct updater, + /// and the one to be used in most cases. Also allows to perform substepping, greatly improving convergence. + + [AddComponentMenu("Physics/Obi/Obi Fixed Updater", 801)] + [ExecuteInEditMode] + public class ObiFixedUpdater : ObiUpdater + { + /// + /// Each FixedUpdate() call will be divided into several substeps. Performing more substeps will greatly improve the accuracy/convergence speed of the simulation. + /// Increasing the amount of substeps is more effective than increasing the amount of constraint iterations. + /// + [Tooltip("Amount of substeps performed per FixedUpdate. Increasing the amount of substeps greatly improves accuracy and convergence speed.")] + public int substeps = 4; + + [NonSerialized] private float accumulatedTime; + + private void OnValidate() + { + substeps = Mathf.Max(1, substeps); + } + + private void OnEnable() + { + accumulatedTime = 0; + } + + private void OnDisable() + { + Physics.autoSimulation = true; + } + + private void FixedUpdate() + { + ObiProfiler.EnableProfiler(); + + PrepareFrame(); + + BeginStep(Time.fixedDeltaTime); + + float substepDelta = Time.fixedDeltaTime / (float)substeps; + + // Divide the step into multiple smaller substeps: + for (int i = 0; i < substeps; ++i) + Substep(Time.fixedDeltaTime, substepDelta, substeps-i); + + EndStep(substepDelta); + + ObiProfiler.DisableProfiler(); + + accumulatedTime -= Time.fixedDeltaTime; + } + + private void Update() + { + accumulatedTime += Time.deltaTime; + + ObiProfiler.EnableProfiler(); + Interpolate(Time.fixedDeltaTime, accumulatedTime); + ObiProfiler.DisableProfiler(); + } + } +} \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Utils/ObiFoamEmitter.cs.meta b/Assets/Obi/Scripts/Common/Updaters/ObiFixedUpdater.cs.meta similarity index 64% rename from Assets/Obi/Scripts/Common/Utils/ObiFoamEmitter.cs.meta rename to Assets/Obi/Scripts/Common/Updaters/ObiFixedUpdater.cs.meta index f626a9f32..cac670221 100644 --- a/Assets/Obi/Scripts/Common/Utils/ObiFoamEmitter.cs.meta +++ b/Assets/Obi/Scripts/Common/Updaters/ObiFixedUpdater.cs.meta @@ -1,11 +1,11 @@ fileFormatVersion: 2 -guid: 3a2bd12c1cc9c45428b37635331065db +guid: 1d9704d540ac448439a425526f6b2986 MonoImporter: externalObjects: {} serializedVersion: 2 defaultReferences: [] executionOrder: 0 - icon: {fileID: 2800000, guid: b7cec6e680e3a479ca03a89eccd4e052, type: 3} + icon: {fileID: 2800000, guid: 4e2c952f509ae40bdaf836136058d487, type: 3} userData: assetBundleName: assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Updaters/ObiLateFixedUpdater.cs b/Assets/Obi/Scripts/Common/Updaters/ObiLateFixedUpdater.cs new file mode 100644 index 000000000..1a482cb96 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Updaters/ObiLateFixedUpdater.cs @@ -0,0 +1,84 @@ +using UnityEngine; +using System.Collections; +using System.Collections.Generic; +using System; + +namespace Obi +{ + /// + /// Updater class that will perform simulation after WaitForFixedUpdate. Use this for simulations that require animation data as input, such as character clothing. + /// Make sure to set the Animator update mode to "Animate Physics". + + [AddComponentMenu("Physics/Obi/Obi Late Fixed Updater", 802)] + [ExecuteInEditMode] + public class ObiLateFixedUpdater : ObiUpdater + { + + /// + /// Each LateFixedUpdate() call will be divided into several substeps. Performing more substeps will greatly improve the accuracy/convergence speed of the simulation. + /// Increasing the amount of substeps is more effective than increasing the amount of constraint iterations. + /// + [Tooltip("Amount of substeps performed per FixedUpdate. Increasing the amount of substeps greatly improves accuracy and convergence speed.")] + public int substeps = 4; + + [NonSerialized] private float accumulatedTime; + + private void OnValidate() + { + substeps = Mathf.Max(1, substeps); + } + + private void OnEnable() + { + accumulatedTime = 0; + StartCoroutine(RunLateFixedUpdate()); + } + private void OnDisable() + { + StopCoroutine(RunLateFixedUpdate()); + } + + private void FixedUpdate() + { + PrepareFrame(); + } + + private IEnumerator RunLateFixedUpdate() + { + while (true) + { + yield return new WaitForFixedUpdate(); + if (Application.isPlaying) + LateFixedUpdate(); + } + } + + private void LateFixedUpdate() + { + ObiProfiler.EnableProfiler(); + + BeginStep(Time.fixedDeltaTime); + + float substepDelta = Time.fixedDeltaTime / (float)substeps; + + // Divide the step into multiple smaller substeps: + for (int i = 0; i < substeps; ++i) + Substep(Time.fixedDeltaTime, substepDelta, substeps - i); + + EndStep(substepDelta); + + ObiProfiler.DisableProfiler(); + + accumulatedTime -= Time.fixedDeltaTime; + } + + private void Update() + { + accumulatedTime += Time.deltaTime; + + ObiProfiler.EnableProfiler(); + Interpolate(Time.fixedDeltaTime, accumulatedTime); + ObiProfiler.DisableProfiler(); + } + } +} \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Utils/ObiFoamGenerator.cs.meta b/Assets/Obi/Scripts/Common/Updaters/ObiLateFixedUpdater.cs.meta similarity index 64% rename from Assets/Obi/Scripts/Common/Utils/ObiFoamGenerator.cs.meta rename to Assets/Obi/Scripts/Common/Updaters/ObiLateFixedUpdater.cs.meta index a26a9e659..3982fd1ef 100644 --- a/Assets/Obi/Scripts/Common/Utils/ObiFoamGenerator.cs.meta +++ b/Assets/Obi/Scripts/Common/Updaters/ObiLateFixedUpdater.cs.meta @@ -1,11 +1,11 @@ fileFormatVersion: 2 -guid: 87b741a43af4845478fd8eff354a1510 +guid: 434ec3c1822e84ae79a7f64f950b1bf9 MonoImporter: externalObjects: {} serializedVersion: 2 defaultReferences: [] executionOrder: 0 - icon: {fileID: 2800000, guid: b7cec6e680e3a479ca03a89eccd4e052, type: 3} + icon: {fileID: 2800000, guid: 4e2c952f509ae40bdaf836136058d487, type: 3} userData: assetBundleName: assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Updaters/ObiLateUpdater.cs b/Assets/Obi/Scripts/Common/Updaters/ObiLateUpdater.cs new file mode 100644 index 000000000..71d42a1a7 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Updaters/ObiLateUpdater.cs @@ -0,0 +1,72 @@ +using UnityEngine; +using System.Collections; +using System.Collections.Generic; +using System; + +namespace Obi +{ + /// + /// Updater class that will perform simulation during LateUpdate(). This is highly unphysical and should be avoided whenever possible. + /// This updater does not make any accuracy guarantees when it comes to two-way coupling with rigidbodies. + /// It is only provided for the odd case when there's no way to perform simulation with a fixed timestep. + /// If in doubt, use the ObiFixedUpdater component instead. + /// + [AddComponentMenu("Physics/Obi/Obi Late Updater", 802)] + public class ObiLateUpdater : ObiUpdater + { + /// + /// Smoothing factor fo the timestep (smoothDelta). Values closer to 1 will yield stabler simulation, but it will be off-sync with rendering. + /// + [Tooltip("Smoothing factor fo the timestep (smoothDelta). Values closer to 1 will yield stabler simulation, but it will be off-sync with rendering.")] + [Range(0,1)] + public float deltaSmoothing = 0.95f; + + /// + /// Target timestep used to advance the simulation. The updater will interpolate this value with Time.deltaTime to find the actual timestep used for each frame. + /// + [Tooltip("Target timestep used to advance the simulation. The updater will interpolate this value with Time.deltaTime to find the actual timestep used for each frame.")] + private float smoothDelta = 0.02f; + + /// + /// Each FixedUpdate() call will be divided into several substeps. Performing more substeps will greatly improve the accuracy/convergence speed of the simulation. + /// Increasing the amount of substeps is more effective than increasing the amount of constraint iterations. + /// + [Tooltip("Amount of substeps performed per FixedUpdate. Increasing the amount of substeps greatly improves accuracy and convergence speed.")] + public int substeps = 4; + + private void OnValidate() + { + smoothDelta = Mathf.Max(0.0001f, smoothDelta); + substeps = Mathf.Max(1, substeps); + } + + private void Update() + { + PrepareFrame(); + } + + private void LateUpdate() + { + if (Time.deltaTime > 0) + { + if (Application.isPlaying) + { + // smooth out timestep: + smoothDelta = Mathf.Lerp(Time.deltaTime, smoothDelta, deltaSmoothing); + + BeginStep(smoothDelta); + + float substepDelta = smoothDelta / (float)substeps; + + // Divide the step into multiple smaller substeps: + for (int i = 0; i < substeps; ++i) + Substep(smoothDelta, substepDelta, substeps - i); + + EndStep(substepDelta); + } + + Interpolate(smoothDelta, smoothDelta); + } + } + } +} \ No newline at end of file diff --git a/Assets/Obi/Scripts/RopeAndRod/Actors/ObiBoneOverride.cs.meta b/Assets/Obi/Scripts/Common/Updaters/ObiLateUpdater.cs.meta similarity index 64% rename from Assets/Obi/Scripts/RopeAndRod/Actors/ObiBoneOverride.cs.meta rename to Assets/Obi/Scripts/Common/Updaters/ObiLateUpdater.cs.meta index 31a7fae95..41bbce652 100644 --- a/Assets/Obi/Scripts/RopeAndRod/Actors/ObiBoneOverride.cs.meta +++ b/Assets/Obi/Scripts/Common/Updaters/ObiLateUpdater.cs.meta @@ -1,11 +1,11 @@ fileFormatVersion: 2 -guid: eed7ac246d14742e5a77c218f4e491ec +guid: 434d88f9b3534406382ff56c0e74bd9a MonoImporter: externalObjects: {} serializedVersion: 2 defaultReferences: [] executionOrder: 0 - icon: {fileID: 2800000, guid: 0a18e0376cc184a9b96ebb3bf0175cc2, type: 3} + icon: {fileID: 2800000, guid: 4e2c952f509ae40bdaf836136058d487, type: 3} userData: assetBundleName: assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Updaters/ObiUpdater.cs b/Assets/Obi/Scripts/Common/Updaters/ObiUpdater.cs new file mode 100644 index 000000000..0fa3c60d0 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Updaters/ObiUpdater.cs @@ -0,0 +1,136 @@ +using UnityEngine; +using Unity.Profiling; +using System.Collections; +using System.Collections.Generic; +using System; + +using Unity.Jobs; +using Unity.Collections; + +namespace Obi +{ + /// + /// Base class for updating multiple solvers in parallel. + /// Derive from this class to write your onw updater. This grants you precise control over execution order, + /// as you can choose to update solvers at any point during Unity's update cycle. + /// + [ExecuteInEditMode] + public abstract class ObiUpdater : MonoBehaviour + { + static ProfilerMarker m_BeginStepPerfMarker = new ProfilerMarker("BeginStep"); + static ProfilerMarker m_SubstepPerfMarker = new ProfilerMarker("Substep"); + static ProfilerMarker m_EndStepPerfMarker = new ProfilerMarker("EndStep"); + static ProfilerMarker m_InterpolatePerfMarker = new ProfilerMarker("Interpolate"); + + /// + /// List of solvers updated by this updater. + /// + public List solvers = new List(); + + private List handles = new List(); + + + /// + /// Prepares all solvers to begin simulating a new frame. This should be called as soon as possible in the frame, + /// and guaranteed to be called every frame that will step physics. + /// + protected void PrepareFrame() + { + foreach (ObiSolver solver in solvers) + if (solver != null) + solver.PrepareFrame(); + } + + /// + /// Prepares all solvers to begin simulating a new physics step. This involves + /// caching some particle data for interpolation, performing collision detection, among other things. + /// + /// Duration (in seconds) of the next step. + protected void BeginStep(float stepDeltaTime) + { + using (m_BeginStepPerfMarker.Auto()) + { + // Update colliders right before collision detection: + ObiColliderWorld.GetInstance().UpdateColliders(); + ObiColliderWorld.GetInstance().UpdateRigidbodies(solvers,stepDeltaTime); + ObiColliderWorld.GetInstance().UpdateWorld(stepDeltaTime); + + handles.Clear(); + + // Kick off all solver jobs: + foreach (ObiSolver solver in solvers) + if (solver != null) + handles.Add(solver.BeginStep(stepDeltaTime)); + + // wait for all solver jobs to complete: + foreach (IObiJobHandle handle in handles) + if (handle != null) + handle.Complete(); + + foreach (ObiSolver solver in solvers) + if (solver != null) + solver.ReleaseJobHandles(); + } + } + + + /// + /// Advances the simulation a given amount of time. Note that once BeginStep has been called, + /// Substep can be called multiple times. + /// + /// Duration (in seconds) of the substep. + protected void Substep(float stepDeltaTime, float substepDeltaTime, int index) + { + using (m_SubstepPerfMarker.Auto()) + { + handles.Clear(); + + // Kick off all solver jobs: + foreach (ObiSolver solver in solvers) + if (solver != null) + handles.Add(solver.Substep(stepDeltaTime, substepDeltaTime, index)); + + // wait for all solver jobs to complete: + foreach (IObiJobHandle handle in handles) + if (handle != null) + handle.Complete(); + + foreach (ObiSolver solver in solvers) + if (solver != null) + solver.ReleaseJobHandles(); + } + } + + /// + /// Wraps up the current simulation step. This will trigger contact callbacks. + /// + protected void EndStep(float substepDeltaTime) + { + using (m_EndStepPerfMarker.Auto()) + { + // End step: Invokes collision callbacks and notifies actors that the solver step has ended. + foreach (ObiSolver solver in solvers) + if (solver != null) + solver.EndStep(substepDeltaTime); + } + + // Write back rigidbody velocity deltas: + ObiColliderWorld.GetInstance().UpdateRigidbodyVelocities(solvers); + } + + /// + /// Interpolates the previous and current physics states. Should be called right before rendering the current frame. + /// + /// Duration (in seconds) of the last step taken. + /// Amount of accumulated (not yet simulated) time. + protected void Interpolate(float stepDeltaTime, float accumulatedTime) + { + using (m_InterpolatePerfMarker.Auto()) + { + foreach (ObiSolver solver in solvers) + if (solver != null) + solver.Interpolate(stepDeltaTime, accumulatedTime); + } + } + } +} \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Updaters/ObiUpdater.cs.meta b/Assets/Obi/Scripts/Common/Updaters/ObiUpdater.cs.meta new file mode 100644 index 000000000..14db883fd --- /dev/null +++ b/Assets/Obi/Scripts/Common/Updaters/ObiUpdater.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4b1bfb6ce01f944a78a3761b5b77d359 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Utils/Attributes/LayerField.cs b/Assets/Obi/Scripts/Common/Utils/Attributes/LayerField.cs deleted file mode 100644 index 458d1b88f..000000000 --- a/Assets/Obi/Scripts/Common/Utils/Attributes/LayerField.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using UnityEngine; -#if UNITY_EDITOR -using UnityEditor; -#endif - -namespace Obi{ - - [AttributeUsage(AttributeTargets.Field)] - public class LayerField : MultiPropertyAttribute - { -#if UNITY_EDITOR - public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) - { - property.intValue = EditorGUI.LayerField(position, label, property.intValue); - } -#endif - } - -} - diff --git a/Assets/Obi/Scripts/Common/Utils/Attributes/LayerField.cs.meta b/Assets/Obi/Scripts/Common/Utils/Attributes/LayerField.cs.meta deleted file mode 100644 index e7694c6c9..000000000 --- a/Assets/Obi/Scripts/Common/Utils/Attributes/LayerField.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 636fa558efd1441fdbf787bdda34c53a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Utils/Attributes/MultiPropertyAttribute.cs b/Assets/Obi/Scripts/Common/Utils/Attributes/MultiPropertyAttribute.cs index 8dc8923d8..f1face328 100644 --- a/Assets/Obi/Scripts/Common/Utils/Attributes/MultiPropertyAttribute.cs +++ b/Assets/Obi/Scripts/Common/Utils/Attributes/MultiPropertyAttribute.cs @@ -16,7 +16,7 @@ namespace Obi{ public virtual void OnGUI(Rect position, SerializedProperty property, GUIContent label) { - EditorGUI.PropertyField(position,property,label,true); + EditorGUI.PropertyField(position,property,label); } internal virtual void OnPreGUI(Rect position, SerializedProperty property){} @@ -53,9 +53,8 @@ namespace Obi{ if (!attr.IsVisible(property)) return -EditorGUIUtility.standardVerticalSpacing; - // In case no attribute returns a modified height, return the property's default one: - float height = EditorGUI.GetPropertyHeight(property, label, true); - //base.GetPropertyHeight(property, label); + // In case no attribute returns a modified height, return the property's default one: + float height = base.GetPropertyHeight(property, label); // Check if any of the attributes wants to modify height: foreach (object atr in mAttribute.stored) diff --git a/Assets/Obi/Scripts/Common/Utils/Attributes/SerializeProperty.cs b/Assets/Obi/Scripts/Common/Utils/Attributes/SerializeProperty.cs index b5863040f..ad7ffae98 100644 --- a/Assets/Obi/Scripts/Common/Utils/Attributes/SerializeProperty.cs +++ b/Assets/Obi/Scripts/Common/Utils/Attributes/SerializeProperty.cs @@ -48,18 +48,15 @@ namespace Obi{ // If any changes were detected, call the property setter: if (EditorGUI.EndChangeCheck() && propertyFieldInfo != null) { - foreach (var t in property.serializedObject.targetObjects) - { - // Record object state for undo: - Undo.RecordObject(t, "Inspector"); + + // Record object state for undo: + Undo.RecordObject(property.serializedObject.targetObject, "Inspector"); + + // Call property setter: + propertyFieldInfo.SetValue(target,value,null); - // Call property setter: - propertyFieldInfo.SetValue(t, value, null); - SetPropertyValue(property, propertyFieldInfo.PropertyType, value); - - // Record prefab modification: - PrefabUtility.RecordPrefabInstancePropertyModifications(t); - } + // Record prefab modification: + PrefabUtility.RecordPrefabInstancePropertyModifications(property.serializedObject.targetObject); } EditorGUI.EndProperty(); @@ -71,18 +68,18 @@ namespace Obi{ private object GetSource(SerializedProperty property) { - object trgt = property.serializedObject.targetObject; + object target = property.serializedObject.targetObject; string[] data = property.propertyPath.Split('.'); if (data.Length == 1) - return trgt; + return target; else{ for (int i = 0; i < data.Length-1;++i){ - trgt = trgt.GetType().GetField(data[i]).GetValue(trgt); + target = target.GetType().GetField(data[i]).GetValue(target); } } - return trgt; + return target; } private object DrawProperty(Rect position, SerializedPropertyType propertyType, Type type, object value, GUIContent label) @@ -123,46 +120,7 @@ namespace Obi{ throw new NotImplementedException("Unimplemented propertyType "+propertyType+"."); } } - - private void SetPropertyValue(SerializedProperty property, Type type, object value) - { - switch (property.propertyType) - { - case SerializedPropertyType.Integer: - property.intValue = (int)value; break; - case SerializedPropertyType.Boolean: - property.boolValue = (bool)value; break; - case SerializedPropertyType.Float: - property.floatValue = (float)value; break; - case SerializedPropertyType.String: - property.stringValue = (string)value; break; - case SerializedPropertyType.Color: - property.colorValue = (Color)value; break; - case SerializedPropertyType.ObjectReference: - property.objectReferenceValue = (UnityEngine.Object)value; break; - case SerializedPropertyType.ExposedReference: - property.exposedReferenceValue = (UnityEngine.Object)value; break; - case SerializedPropertyType.LayerMask: - property.intValue = (int)value; break; - case SerializedPropertyType.Enum: - property.enumValueIndex = (int)value; break; - case SerializedPropertyType.Vector2: - property.vector2Value = (Vector2)value; break; - case SerializedPropertyType.Vector3: - property.vector3Value = (Vector3)value; break; - case SerializedPropertyType.Vector4: - property.vector4Value = (Vector4)value; break; - case SerializedPropertyType.Rect: - property.rectValue = (Rect)value; break; - case SerializedPropertyType.AnimationCurve: - property.animationCurveValue = (AnimationCurve)value; break; - case SerializedPropertyType.Bounds: - property.boundsValue = (Bounds)value; break; - default: - throw new NotImplementedException("Unimplemented propertyType " + property.propertyType + "."); - } - } - + } #endif } \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Utils/Attributes/VisibleIf.cs b/Assets/Obi/Scripts/Common/Utils/Attributes/VisibleIf.cs index 16920a9b1..1d0244b87 100644 --- a/Assets/Obi/Scripts/Common/Utils/Attributes/VisibleIf.cs +++ b/Assets/Obi/Scripts/Common/Utils/Attributes/VisibleIf.cs @@ -14,7 +14,6 @@ namespace Obi{ private MethodInfo eventMethodInfo = null; private FieldInfo fieldInfo = null; - private PropertyInfo propertyInfo = null; public VisibleIf(string methodName, bool negate = false) { @@ -40,19 +39,13 @@ namespace Obi{ // If we could not find a method with that name, look for a field: if (eventMethodInfo == null && fieldInfo == null) fieldInfo = eventOwnerType.GetField(eventName, BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); - - // or maybe a property - if (eventMethodInfo == null && fieldInfo == null && propertyInfo == null) - propertyInfo = eventOwnerType.GetProperty(eventName, BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); - - if (eventMethodInfo != null) + + if (eventMethodInfo != null) return (bool)eventMethodInfo.Invoke(property.serializedObject.targetObject, null); else if (fieldInfo != null) return (bool)fieldInfo.GetValue(property.serializedObject.targetObject); - else if (propertyInfo != null) - return (bool)propertyInfo.GetValue(property.serializedObject.targetObject); - else - Debug.LogWarning(string.Format("VisibleIf: Unable to find method, field or property {0} in {1}", eventName, eventOwnerType)); + else + Debug.LogWarning(string.Format("VisibleIf: Unable to find method or field {0} in {1}", eventName, eventOwnerType)); return true; } diff --git a/Assets/Obi/Scripts/Common/Utils/Coroutines/CoroutineJob.cs b/Assets/Obi/Scripts/Common/Utils/Coroutines/CoroutineJob.cs index 199ebcbee..c4c5aa21d 100644 --- a/Assets/Obi/Scripts/Common/Utils/Coroutines/CoroutineJob.cs +++ b/Assets/Obi/Scripts/Common/Utils/Coroutines/CoroutineJob.cs @@ -48,7 +48,7 @@ public class CoroutineJob{ private bool stop; private Exception e; - public int asyncThreshold = 250; //Time in milliseconds that must pass before job switches to async mode. By default, the job is asynchronous from the start. + public int asyncThreshold = 0; //Time in milliseconds that must pass before job switches to async mode. By default, the job is asynchronous from the start. private void Init(){ isDone = false; diff --git a/Assets/Obi/Scripts/Common/Utils/Coroutines/EditorCoroutine.cs b/Assets/Obi/Scripts/Common/Utils/Coroutines/EditorCoroutine.cs index 7a7f83bb7..b000bcd80 100644 --- a/Assets/Obi/Scripts/Common/Utils/Coroutines/EditorCoroutine.cs +++ b/Assets/Obi/Scripts/Common/Utils/Coroutines/EditorCoroutine.cs @@ -6,31 +6,38 @@ using System.Collections; namespace Obi { - public class EditorCoroutine - { - public static bool ShowCoroutineProgressBar(string title, IEnumerator coroutine) - { +public class EditorCoroutine +{ - bool cancelled = false; - - #if (UNITY_EDITOR) - if (coroutine != null){ - - while (coroutine.MoveNext() && !cancelled) - { - var progressInfo = coroutine.Current as CoroutineJob.ProgressInfo; - cancelled |= EditorUtility.DisplayCancelableProgressBar(title, progressInfo.userReadableInfo, progressInfo.progress); - } - - // once finished, set coroutine to null and clear progress bar. - coroutine = null; - EditorUtility.ClearProgressBar(); - - } - #endif - return cancelled; - } + public static void ShowCoroutineProgressBar(string title, ref IEnumerator coroutine){ - } + #if (UNITY_EDITOR) + if (coroutine != null){ + + CoroutineJob.ProgressInfo progressInfo; + + do{ + if (!coroutine.MoveNext()) + progressInfo = null; + else + progressInfo = coroutine.Current as CoroutineJob.ProgressInfo; + + if (progressInfo != null && EditorUtility.DisplayCancelableProgressBar(title, progressInfo.userReadableInfo, progressInfo.progress)){ + progressInfo = null; + } + }while (progressInfo != null); + + // once finished, clear progress bar and set coroutine to null. + coroutine = null; + + // Unity bug here: https://issuetracker.unity3d.com/issues/unity-throws-nullreferenceexception-or-endlayoutgroup-errors-when-editorutility-dot-clearprogressbar-is-called + EditorUtility.ClearProgressBar(); + + } + #endif + + } + +} } \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Utils/Forces/ObiAmbientForceZone.cs b/Assets/Obi/Scripts/Common/Utils/Forces/ObiAmbientForceZone.cs new file mode 100644 index 000000000..6a9dbde3d --- /dev/null +++ b/Assets/Obi/Scripts/Common/Utils/Forces/ObiAmbientForceZone.cs @@ -0,0 +1,39 @@ +using UnityEngine; +using System; + +namespace Obi +{ + public class ObiAmbientForceZone : ObiExternalForce + { + + public override void ApplyForcesToActor(ObiActor actor) + { + + Matrix4x4 l2sTransform = actor.solver.transform.worldToLocalMatrix * transform.localToWorldMatrix; + + Vector4 force = l2sTransform.MultiplyVector(Vector3.forward * (intensity + GetTurbulence(turbulence))); + + if (actor.usesCustomExternalForces) + { + for (int i = 0; i < actor.activeParticleCount; ++i) + actor.solver.wind[actor.solverIndices[i]] += force; + } + else + { + for (int i = 0; i < actor.activeParticleCount; ++i) + actor.solver.externalForces[actor.solverIndices[i]] += force; + } + } + + public void OnDrawGizmosSelected() + { + + Gizmos.matrix = transform.localToWorldMatrix; + Gizmos.color = new Color(0,0.7f,1,1); + + // arrow body: + ObiUtils.DrawArrowGizmo(0.5f + GetTurbulence(1),0.2f,0.3f,0.2f); + } + } +} + diff --git a/Assets/Obi/Scripts/Common/Utils/Forces/ObiAmbientForceZone.cs.meta b/Assets/Obi/Scripts/Common/Utils/Forces/ObiAmbientForceZone.cs.meta new file mode 100644 index 000000000..32645ed8d --- /dev/null +++ b/Assets/Obi/Scripts/Common/Utils/Forces/ObiAmbientForceZone.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8f33b658b41e945e0bae1d3f0af0830e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 092f06332c018434b8c8ea86164ef4fd, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Utils/Forces/ObiExternalForce.cs b/Assets/Obi/Scripts/Common/Utils/Forces/ObiExternalForce.cs new file mode 100644 index 000000000..41089fd0c --- /dev/null +++ b/Assets/Obi/Scripts/Common/Utils/Forces/ObiExternalForce.cs @@ -0,0 +1,50 @@ +using UnityEngine; +using System; + +namespace Obi +{ + public abstract class ObiExternalForce : MonoBehaviour + { + + public float intensity = 0; + public float turbulence = 0; + public float turbulenceFrequency = 1; + public float turbulenceSeed = 0; + public ObiSolver[] affectedSolvers; + + public void OnEnable() + { + foreach (ObiSolver solver in affectedSolvers) + { + if (solver != null) + solver.OnBeginStep += Solver_OnStepBegin; + } + } + + public void OnDisable() + { + foreach (ObiSolver solver in affectedSolvers) + { + if (solver != null) + solver.OnBeginStep -= Solver_OnStepBegin; + } + } + + void Solver_OnStepBegin(ObiSolver solver, float stepTime) + { + foreach (ObiActor actor in solver.actors) + { + if (actor != null) + ApplyForcesToActor(actor); + } + } + + protected float GetTurbulence(float turbulenceIntensity){ + return Mathf.PerlinNoise(Time.fixedTime * turbulenceFrequency,turbulenceSeed) * turbulenceIntensity; + } + + public abstract void ApplyForcesToActor(ObiActor actor); + + } +} + diff --git a/Assets/Obi/Scripts/Common/Utils/Forces/ObiExternalForce.cs.meta b/Assets/Obi/Scripts/Common/Utils/Forces/ObiExternalForce.cs.meta new file mode 100644 index 000000000..adabe4f4f --- /dev/null +++ b/Assets/Obi/Scripts/Common/Utils/Forces/ObiExternalForce.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 4978a525b6164476d96f5d28d8b309f8 +timeCreated: 1480349422 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Utils/Forces/ObiForceZone.cs b/Assets/Obi/Scripts/Common/Utils/Forces/ObiForceZone.cs deleted file mode 100644 index 23bd10b92..000000000 --- a/Assets/Obi/Scripts/Common/Utils/Forces/ObiForceZone.cs +++ /dev/null @@ -1,137 +0,0 @@ -using UnityEngine; - -namespace Obi -{ - [ExecuteInEditMode] - [RequireComponent(typeof(ObiCollider))] - public class ObiForceZone : MonoBehaviour - { - [SerializeProperty("sourceCollider")] - [SerializeField] private ObiCollider m_SourceCollider; - - protected ObiForceZoneHandle forcezoneHandle; - - /// - /// The ObiCollider this ObiForceZone should affect. - /// - /// This is automatically set when you first create the ObiForceZone component, but you can override it afterwards. - public ObiCollider SourceCollider - { - set - { - if (value != null && value.gameObject != this.gameObject) - { - Debug.LogError("The ObiCollider component must reside in the same GameObject as ObiForceZone."); - return; - } - - RemoveCollider(); - m_SourceCollider = value; - AddCollider(); - - } - get { return m_SourceCollider; } - } - - public ObiForceZoneHandle Handle - { - get - { - // don't check forcezoneHandle.isValid: - // CreateForceZone may defer creation, so we get a non-null, but invalid handle. - // If calling handle again right away before it becomes valid, it will call CreateForceZone again and create a second handle to the same zone. - if (forcezoneHandle == null) - { - var world = ObiColliderWorld.GetInstance(); - - // create the material: - forcezoneHandle = world.CreateForceZone(); - forcezoneHandle.owner = this; - } - return forcezoneHandle; - } - } - - public ForceZone.ZoneType type; - public ForceZone.ForceMode mode; - public float intensity; - - [Header("Damping")] - public ForceZone.DampingDirection dampingDir; - public float damping = 0; - - [Header("Falloff")] - public float minDistance; - public float maxDistance; - [Min(0)] - public float falloffPower = 1; - - [Header("Tint")] - public Color color = Color.clear; - - [Header("Pulse")] - public float pulseIntensity; - public float pulseFrequency; - public float pulseSeed; - - protected float intensityVariation; - - public void OnEnable() - { - forcezoneHandle = ObiColliderWorld.GetInstance().CreateForceZone(); - forcezoneHandle.owner = this; - FindSourceCollider(); - } - - public void OnDisable() - { - RemoveCollider(); - ObiColliderWorld.GetInstance().DestroyForceZone(forcezoneHandle); - } - - private void FindSourceCollider() - { - if (SourceCollider == null) - SourceCollider = GetComponent(); - else - AddCollider(); - } - - private void AddCollider() - { - if (m_SourceCollider != null) - m_SourceCollider.ForceZone = this; - } - - private void RemoveCollider() - { - if (m_SourceCollider != null) - m_SourceCollider.ForceZone = null; - } - - public virtual void UpdateIfNeeded() - { - if (!Handle.isValid) - return; - - var fc = ObiColliderWorld.GetInstance().forceZones[Handle.index]; - fc.type = type; - fc.mode = mode; - fc.intensity = intensity + intensityVariation; - fc.minDistance = minDistance; - fc.maxDistance = maxDistance; - fc.falloffPower = falloffPower; - fc.damping = damping; - fc.dampingDir = dampingDir; - fc.color = color; - ObiColliderWorld.GetInstance().forceZones[Handle.index] = fc; - } - - public void Update() - { - if (Application.isPlaying) - intensityVariation = Mathf.PerlinNoise(Time.time * pulseFrequency, pulseSeed) * pulseIntensity; - } - } -} - diff --git a/Assets/Obi/Scripts/Common/Utils/Forces/ObiSphericalForceZone.cs b/Assets/Obi/Scripts/Common/Utils/Forces/ObiSphericalForceZone.cs new file mode 100644 index 000000000..7e7bb03bd --- /dev/null +++ b/Assets/Obi/Scripts/Common/Utils/Forces/ObiSphericalForceZone.cs @@ -0,0 +1,63 @@ +using UnityEngine; +using System; + +namespace Obi +{ + public class ObiSphericalForceZone : ObiExternalForce + { + + public float radius = 5; + public bool radial = true; + + public override void ApplyForcesToActor(ObiActor actor) + { + + float sqrRadius = radius * radius; + float finalIntensity = intensity + GetTurbulence(turbulence); + + Matrix4x4 l2sTransform = actor.solver.transform.worldToLocalMatrix * transform.localToWorldMatrix; + + Vector4 center = l2sTransform.MultiplyPoint3x4(Vector4.zero); + Vector4 forward = l2sTransform.MultiplyVector(Vector3.forward); + + // Calculate force intensity for each actor particle: + for (int i = 0; i < actor.activeParticleCount; ++i){ + + Vector4 distanceVector = actor.solver.positions[actor.solverIndices[i]] - center; + + float sqrMag = distanceVector.sqrMagnitude; + float falloff = Mathf.Clamp01((sqrRadius - sqrMag) / sqrRadius); + + Vector4 force; + if (radial) + force = distanceVector/(Mathf.Sqrt(sqrMag) + float.Epsilon) * falloff * finalIntensity; + else + force = forward * falloff * finalIntensity; + + if (actor.usesCustomExternalForces) + actor.solver.wind[actor.solverIndices[i]] += force; + else + actor.solver.externalForces[actor.solverIndices[i]] += force; + } + + } + + public void OnDrawGizmosSelected() + { + Gizmos.matrix = transform.localToWorldMatrix; + Gizmos.color = new Color(0,0.7f,1,1); + Gizmos.DrawWireSphere(Vector3.zero,radius); + + float turb = GetTurbulence(1); + + if (!radial){ + ObiUtils.DrawArrowGizmo(radius + turb,radius*0.2f,radius*0.3f,radius*0.2f); + }else{ + Gizmos.DrawLine(new Vector3(0,0,-radius*0.5f)*turb,new Vector3(0,0,radius*0.5f)*turb); + Gizmos.DrawLine(new Vector3(0,-radius*0.5f,0)*turb,new Vector3(0,radius*0.5f,0)*turb); + Gizmos.DrawLine(new Vector3(-radius*0.5f,0,0)*turb,new Vector3(radius*0.5f,0,0)*turb); + } + } + } +} + diff --git a/Assets/Obi/Scripts/Common/Utils/Forces/ObiForceZone.cs.meta b/Assets/Obi/Scripts/Common/Utils/Forces/ObiSphericalForceZone.cs.meta similarity index 86% rename from Assets/Obi/Scripts/Common/Utils/Forces/ObiForceZone.cs.meta rename to Assets/Obi/Scripts/Common/Utils/Forces/ObiSphericalForceZone.cs.meta index b0a77b8f4..56ae827cd 100644 --- a/Assets/Obi/Scripts/Common/Utils/Forces/ObiForceZone.cs.meta +++ b/Assets/Obi/Scripts/Common/Utils/Forces/ObiSphericalForceZone.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 4978a525b6164476d96f5d28d8b309f8 +guid: f05961933f21f46a683fc5d5beec4061 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Obi/Scripts/Common/Utils/ObiContactEventDispatcher.cs b/Assets/Obi/Scripts/Common/Utils/ObiContactEventDispatcher.cs index 6e67c4a1c..c8c1315ef 100644 --- a/Assets/Obi/Scripts/Common/Utils/ObiContactEventDispatcher.cs +++ b/Assets/Obi/Scripts/Common/Utils/ObiContactEventDispatcher.cs @@ -1,6 +1,5 @@ using UnityEngine; using UnityEngine.Events; -using Unity.Collections; using System; using System.Collections.Generic; @@ -25,11 +24,11 @@ namespace Obi public int Compare(Oni.Contact x, Oni.Contact y) { - return CompareByRef(x, y, solver); + return CompareByRef(ref x, ref y, solver); } } - private static int CompareByRef(Oni.Contact a, Oni.Contact b, ObiSolver solver) + private static int CompareByRef(ref Oni.Contact a, ref Oni.Contact b, ObiSolver solver) { if (a.bodyB == b.bodyB) { @@ -65,7 +64,7 @@ namespace Obi solver.OnCollision -= Solver_OnCollision; } - private int FilterOutDistantContacts(ObiNativeContactList data, int count) + private int FilterOutDistantContacts(Oni.Contact[] data, int count) { int filteredCount = count; @@ -73,12 +72,12 @@ namespace Obi // moving the ones above the threshold to the end of the array: for (int i = count - 1; i >= 0; --i) if (data[i].distance > distanceThreshold) - data.Swap(i, --filteredCount); + ObiUtils.Swap(ref data[i], ref data[--filteredCount]); return filteredCount; } - private int RemoveDuplicates(ObiNativeContactList data, int count) + private int RemoveDuplicates(Oni.Contact[] data, int count) { if (count == 0) return 0; @@ -87,13 +86,13 @@ namespace Obi // replacing duplicates by the first contact that's different: int i = 0, r = 0; while (++i != count) - if (CompareByRef(data[i], data[r], solver) != 0 && ++r != i) + if (CompareByRef(ref data[i], ref data[r], solver) != 0 && ++r != i) data[r] = data[i]; return ++r; } - private void InvokeCallbacks(ObiNativeContactList data, int count) + private void InvokeCallbacks(Oni.Contact[] data, int count) { int a = 0, b = 0; int lengthA = count, lengthB = prevCount; @@ -102,7 +101,7 @@ namespace Obi while (a < lengthA && b < lengthB) { // compare both contacts: - int compare = CompareByRef(data[a], prevData[b], solver); + int compare = CompareByRef(ref data[a], ref prevData[b], solver); // call the appropiate event depending on the comparison result: if (compare < 0) @@ -123,26 +122,30 @@ namespace Obi onContactExit.Invoke(solver, prevData[b++]); } - void Solver_OnCollision(object sender, ObiNativeContactList contacts) + void Solver_OnCollision(object sender, ObiSolver.ObiCollisionEventArgs args) { + // here we access the internal backing array (Data) directly, + // instead of using the accessor property. This slightly improves performance. + // note: the backing array length is the lists' capacity, so we + // need to use args.contacts.Count to get the actual number of contacts. + // skip all contacts above the distance threshold by moving them to the end of the array: - int filteredCount = FilterOutDistantContacts(contacts, contacts.count); + int filteredCount = FilterOutDistantContacts(args.contacts.Data, args.contacts.Count); // sort the remaining contacts by collider, then by actor: - contacts.AsNativeArray().Slice(0,filteredCount).Sort(comparer); + Array.Sort(args.contacts.Data, 0, filteredCount, comparer); // remove duplicates: - filteredCount = RemoveDuplicates(contacts, filteredCount); + filteredCount = RemoveDuplicates(args.contacts.Data, filteredCount); // zip trough the current and previous contact lists once, invoking events when appropiate. - InvokeCallbacks(contacts, filteredCount); + InvokeCallbacks(args.contacts.Data, filteredCount); // store current contact list/count for next frame. // could get better performance by double buffering instead of copying: if (filteredCount > prevData.Length) Array.Resize(ref prevData, filteredCount); - - contacts.CopyTo(prevData, 0, filteredCount); + Array.Copy(args.contacts.Data, prevData, filteredCount); prevCount = filteredCount; } diff --git a/Assets/Obi/Scripts/Common/Utils/ObiContactGrabber.cs b/Assets/Obi/Scripts/Common/Utils/ObiContactGrabber.cs index caadb3b8b..bdd58b078 100644 --- a/Assets/Obi/Scripts/Common/Utils/ObiContactGrabber.cs +++ b/Assets/Obi/Scripts/Common/Utils/ObiContactGrabber.cs @@ -45,7 +45,7 @@ public class ObiContactGrabber : MonoBehaviour } } - private Dictionary collisionEvents = new Dictionary(); /**< store the current collision event*/ + private Dictionary collisionEvents = new Dictionary(); /**< store the current collision event*/ private ObiCollider localCollider; /**< the collider on this gameObject.*/ private HashSet grabbedParticles = new HashSet(); /**< set to store all currently grabbed particles.*/ private HashSet grabbedActors = new HashSet(); /**< set of softbodies grabbed during this step.*/ @@ -69,7 +69,7 @@ public class ObiContactGrabber : MonoBehaviour solver.OnCollision -= Solver_OnCollision; } - private void Solver_OnCollision(object sender, ObiNativeContactList e) + private void Solver_OnCollision(object sender, Obi.ObiSolver.ObiCollisionEventArgs e) { collisionEvents[(ObiSolver)sender] = e; } @@ -122,10 +122,10 @@ public class ObiContactGrabber : MonoBehaviour { foreach (ObiSolver solver in solvers) { - ObiNativeContactList collisionEvent; + ObiSolver.ObiCollisionEventArgs collisionEvent; if (collisionEvents.TryGetValue(solver, out collisionEvent)) { - foreach (Oni.Contact contact in collisionEvent) + foreach (Oni.Contact contact in collisionEvent.contacts) { // this one is an actual collision: if (contact.distance < 0.01f) diff --git a/Assets/Obi/Scripts/Common/Utils/ObiFoamEmitter.cs b/Assets/Obi/Scripts/Common/Utils/ObiFoamEmitter.cs deleted file mode 100644 index f2419738b..000000000 --- a/Assets/Obi/Scripts/Common/Utils/ObiFoamEmitter.cs +++ /dev/null @@ -1,39 +0,0 @@ -using UnityEngine; -using System; - -namespace Obi -{ - - [AddComponentMenu("Physics/Obi/Obi Foam Emitter", 1000)] - [ExecuteInEditMode] - [RequireComponent(typeof(ObiActor))] - [DisallowMultipleComponent] - public class ObiFoamEmitter : ObiFoamGenerator - { - public enum ShapeType - { - Cylinder = 0, - Box = 1 - } - - [Header("Emission shape")] - public ShapeType shape; - public Transform shapeTransform; - public Vector3 shapeSize = Vector3.one; - - private float emissionAccumulator = 0; - - public int GetParticleNumberToEmit(float deltaTime) - { - emissionAccumulator += foamGenerationRate * deltaTime; - int particles = (int)emissionAccumulator; - emissionAccumulator -= particles; - return particles; - } - - public void Reset() - { - emissionAccumulator = 0; - } - } -} diff --git a/Assets/Obi/Scripts/Common/Utils/ObiFoamGenerator.cs b/Assets/Obi/Scripts/Common/Utils/ObiFoamGenerator.cs deleted file mode 100644 index fe9cec91b..000000000 --- a/Assets/Obi/Scripts/Common/Utils/ObiFoamGenerator.cs +++ /dev/null @@ -1,101 +0,0 @@ -using UnityEngine; -using System; - -namespace Obi -{ - /** - * Foam generators create diffuse particles in areas where certain conditions meet (high velocity constrasts, high vorticity, low density, high normal values, etc.). These particles - * are then advected trough the fluid velocity field. - */ - - [AddComponentMenu("Physics/Obi/Obi Foam Generator", 1000)] - [ExecuteInEditMode] - [RequireComponent(typeof(ObiActor))] - [DisallowMultipleComponent] - public class ObiFoamGenerator : MonoBehaviour, ObiActorRenderer - { - public ObiActor actor { get; private set; } - - [Header("Foam spawning")] - public float foamGenerationRate = 100; - public float foamPotential = 50; - - [Range(0,1)] - public float foamPotentialDiffusion = 0.95f; - public Vector2 velocityRange = new Vector2(2, 4); - public Vector2 vorticityRange = new Vector2(4, 8); - - [Header("Foam properties")] - public Light volumeLight; - public Color color = new Color(1,1,1,0.25f); - public float size = 0.02f; - [Range(0,1)] - public float sizeRandom = 0.2f; - public float lifetime = 5; - [Range(0, 1)] - public float lifetimeRandom = 0.2f; - - public float buoyancy = 0.5f; - - [Range(0, 1)] - public float drag = 0.5f; - - [Range(0, 1)] - public float atmosphericDrag = 0.5f; - - [Range(1, 50)] - public float airAging = 2; - - [Range(0, 1)] - public float isosurface = 0.02f; - - [Header("Density Control (Compute only)")] - [Range(0, 1)] - public float pressure = 1; - [Range(0, 1)] - public float density = 0.3f; - [Range(1, 4)] - public float smoothingRadius = 2.5f; - [Range(0, 1)] - public float viscosity = 0.5f; - [Min(0)] - public float surfaceTension = 2; - - public void Awake() - { - actor = GetComponent(); - } - - public void OnEnable() - { - ((ObiActorRenderer)this).EnableRenderer(); - } - - public void OnDisable() - { - ((ObiActorRenderer)this).DisableRenderer(); - } - - public void OnValidate() - { - ((ObiActorRenderer)this).SetRendererDirty(Oni.RenderingSystemType.FoamParticles); - } - - RenderSystem ObiRenderer.CreateRenderSystem(ObiSolver solver) - { - switch (solver.backendType) - { - -#if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) - case ObiSolver.BackendType.Burst: return new BurstFoamRenderSystem(solver); -#endif - case ObiSolver.BackendType.Compute: - default: - - if (SystemInfo.supportsComputeShaders) - return new ComputeFoamRenderSystem(solver); - return null; - } - } - } -} diff --git a/Assets/Obi/Scripts/Common/Utils/ObiIntegration.cs b/Assets/Obi/Scripts/Common/Utils/ObiIntegration.cs deleted file mode 100644 index 8c0f50135..000000000 --- a/Assets/Obi/Scripts/Common/Utils/ObiIntegration.cs +++ /dev/null @@ -1,50 +0,0 @@ -using UnityEngine; -using System.Runtime.CompilerServices; - -namespace Obi -{ - public static class ObiIntegration - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector4 IntegrateLinear(Vector4 position, Vector4 velocity, float dt) - { - return position + velocity * dt; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector4 DifferentiateLinear(Vector4 position, Vector4 prevPosition, float dt) - { - return (position - prevPosition) / dt; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Quaternion AngularVelocityToSpinQuaternion(Quaternion rotation, Vector4 angularVelocity, float dt) - { - var delta = new Quaternion(angularVelocity.x, - angularVelocity.y, - angularVelocity.z, 0); - - var rot = delta * rotation; - var v = new Vector4(rot.x, rot.y, rot.z, rot.w) * 0.5f * dt; - return new Quaternion(v.x, v.y, v.z, v.w); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Quaternion IntegrateAngular(Quaternion rotation, Vector4 angularVelocity, float dt) - { - var spin = AngularVelocityToSpinQuaternion(rotation, angularVelocity, dt); - rotation.x += spin.x; - rotation.y += spin.y; - rotation.z += spin.z; - rotation.w += spin.w; - return rotation.normalized; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static Vector4 DifferentiateAngular(Quaternion rotation, Quaternion prevRotation, float dt) - { - var delta = rotation * Quaternion.Inverse(prevRotation); - return new Vector4(delta.x, delta.y, delta.z, 0) * 2.0f / dt; - } - } -} \ No newline at end of file diff --git a/Assets/Obi/Scripts/Common/Utils/ObiIntegration.cs.meta b/Assets/Obi/Scripts/Common/Utils/ObiIntegration.cs.meta deleted file mode 100644 index 819d6050c..000000000 --- a/Assets/Obi/Scripts/Common/Utils/ObiIntegration.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: dbcd2b1cce6ff448ebca664dd6c55e2d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Utils/ObiParticleAttachment.cs b/Assets/Obi/Scripts/Common/Utils/ObiParticleAttachment.cs index 3cd2b72d6..9fbff25fe 100644 --- a/Assets/Obi/Scripts/Common/Utils/ObiParticleAttachment.cs +++ b/Assets/Obi/Scripts/Common/Utils/ObiParticleAttachment.cs @@ -1,70 +1,508 @@ -using System; using UnityEngine; namespace Obi { [AddComponentMenu("Physics/Obi/Obi Particle Attachment", 820)] [RequireComponent(typeof(ObiActor))] [ExecuteInEditMode] public class ObiParticleAttachment : MonoBehaviour { public enum AttachmentType { Static, Dynamic } [SerializeField] [HideInInspector] private ObiActor m_Actor; [SerializeField] [HideInInspector] private Transform m_Target; [SerializeField] [HideInInspector] private ObiParticleGroup m_ParticleGroup; [SerializeField] [HideInInspector] private AttachmentType m_AttachmentType = AttachmentType.Static; [SerializeField] [HideInInspector] private bool m_ConstrainOrientation = false; - [SerializeField] [HideInInspector] private bool m_Projection = false; [SerializeField] [HideInInspector] private float m_Compliance = 0; +using System; +using UnityEngine; + +namespace Obi +{ + [AddComponentMenu("Physics/Obi/Obi Particle Attachment", 820)] + [RequireComponent(typeof(ObiActor))] + [ExecuteInEditMode] + public class ObiParticleAttachment : MonoBehaviour + { + public enum AttachmentType + { + Static, + Dynamic + } + + [SerializeField] [HideInInspector] private ObiActor m_Actor; + [SerializeField] [HideInInspector] private Transform m_Target; + + [SerializeField] [HideInInspector] private ObiParticleGroup m_ParticleGroup; + [SerializeField] [HideInInspector] private AttachmentType m_AttachmentType = AttachmentType.Static; + [SerializeField] [HideInInspector] private bool m_ConstrainOrientation = false; + [SerializeField] [HideInInspector] private float m_Compliance = 0; + [SerializeField] [HideInInspector] [Delayed] private float m_BreakThreshold = float.PositiveInfinity; // private variables are serialized during script reloading, to keep their value. Must mark them explicitly as non-serialized. - [NonSerialized] private ObiPinConstraintsBatch pinBatch; [NonSerialized] private ObiColliderBase attachedCollider; [NonSerialized] private int attachedColliderHandleIndex; [NonSerialized] private int[] m_SolverIndices; [NonSerialized] private Vector3[] m_PositionOffsets = null; [NonSerialized] private Quaternion[] m_OrientationOffsets = null; + [NonSerialized] private ObiPinConstraintsBatch pinBatch; + [NonSerialized] private ObiColliderBase attachedCollider; + [NonSerialized] private int attachedColliderHandleIndex; - /// /// The actor this attachment is added to. /// public ObiActor actor { get { return m_Actor; } } + [NonSerialized] private int[] m_SolverIndices; + [NonSerialized] private Vector3[] m_PositionOffsets = null; + [NonSerialized] private Quaternion[] m_OrientationOffsets = null; - /// /// The target transform that the should be attached to. /// public Transform target { get { return m_Target; } set { if (value != m_Target) { m_Target = value; Bind(); } } } + /// + /// The actor this attachment is added to. + /// + public ObiActor actor + { + get { return m_Actor; } + } - /// /// The particle group that should be attached to the . /// public ObiParticleGroup particleGroup { get { return m_ParticleGroup; } set { if (value != m_ParticleGroup) { m_ParticleGroup = value; Bind(); } } } + /// + /// The target transform that the should be attached to. + /// + public Transform target + { + get { return m_Target; } + set + { + if (value != m_Target) + { + m_Target = value; + Bind(); + } + } + } - /// /// Whether this attachment is currently bound or not. /// public bool isBound { get { return m_Target != null && m_SolverIndices != null && m_PositionOffsets != null; } } + /// + /// The particle group that should be attached to the . + /// + public ObiParticleGroup particleGroup + { + get + { + return m_ParticleGroup; + } - /// /// Type of attachment, can be either static or dynamic. /// public AttachmentType attachmentType { get { return m_AttachmentType; } set { if (value != m_AttachmentType) { DisableAttachment(m_AttachmentType); m_AttachmentType = value; EnableAttachment(m_AttachmentType); } } } + set + { + if (value != m_ParticleGroup) + { + m_ParticleGroup = value; + Bind(); + } + } + } - /// /// Should this attachment constraint particle orientations too? /// public bool constrainOrientation { get { return m_ConstrainOrientation; } set { if (value != m_ConstrainOrientation) { DisableAttachment(m_AttachmentType); m_ConstrainOrientation = value; EnableAttachment(m_AttachmentType); } } } + /// + /// Whether this attachment is currently bound or not. + /// + public bool isBound + { + get { return m_Target != null && m_SolverIndices != null && m_PositionOffsets != null; } + } - /// /// Should this dynamic attachment project renderable particle positions every frame to the target? /// public bool projection { get { return m_Projection; } set { if (value != m_Projection) { DisableAttachment(m_AttachmentType); m_Projection = value; EnableAttachment(m_AttachmentType); } } } + /// + /// Type of attachment, can be either static or dynamic. + /// + public AttachmentType attachmentType + { + get { return m_AttachmentType; } + set + { + if (value != m_AttachmentType) + { + DisableAttachment(m_AttachmentType); + m_AttachmentType = value; + EnableAttachment(m_AttachmentType); + } + } + } - /// /// Constraint compliance, in case this attachment is dynamic. /// /// High compliance values will increase the attachment's elasticity. public float compliance { get { return m_Compliance; } set { if (!Mathf.Approximately(value, m_Compliance)) { m_Compliance = value; if (m_AttachmentType == AttachmentType.Dynamic && pinBatch != null) { for (int i = 0; i < m_SolverIndices.Length; ++i) pinBatch.stiffnesses[i * 2] = m_Compliance; } } } } + /// + /// Should this attachment constraint particle orientations too? + /// + public bool constrainOrientation + { + get { return m_ConstrainOrientation; } + set + { + if (value != m_ConstrainOrientation) + { + DisableAttachment(m_AttachmentType); + m_ConstrainOrientation = value; + EnableAttachment(m_AttachmentType); + } + } + } - /// /// Force thershold above which the attachment should break. /// /// Only affects dynamic attachments, as static attachments do not work with forces. [Delayed] public float breakThreshold = float.PositiveInfinity; private void OnEnable() { m_Actor = GetComponent(); m_Actor.OnBlueprintLoaded += Actor_OnBlueprintLoaded; m_Actor.OnSimulationStart += Actor_OnSimulate; if (m_Actor.solver != null) Actor_OnBlueprintLoaded(m_Actor, m_Actor.sourceBlueprint); EnableAttachment(m_AttachmentType); } - private void OnDisable() { DisableAttachment(m_AttachmentType); m_Actor.OnBlueprintLoaded -= Actor_OnBlueprintLoaded; m_Actor.OnSimulationStart -= Actor_OnSimulate; } private void OnValidate() { m_Actor = GetComponent(); + /// + /// Constraint compliance, in case this attachment is dynamic. + /// + /// High compliance values will increase the attachment's elasticity. + public float compliance + { + get { return m_Compliance; } + set + { + if (!Mathf.Approximately(value, m_Compliance)) + { + m_Compliance = value; + if (m_AttachmentType == AttachmentType.Dynamic && pinBatch != null) + { + for (int i = 0; i < m_SolverIndices.Length; ++i) + pinBatch.stiffnesses[i * 2] = m_Compliance; + } + } + } + } + + /// + /// Force thershold above which the attachment should break. + /// + /// Only affects dynamic attachments, as static attachments do not work with forces. + public float breakThreshold + { + get { return m_BreakThreshold; } + set + { + if (!Mathf.Approximately(value, m_BreakThreshold)) + { + m_BreakThreshold = value; + if (m_AttachmentType == AttachmentType.Dynamic && pinBatch != null) + { + for (int i = 0; i < m_SolverIndices.Length; ++i) + pinBatch.breakThresholds[i] = m_BreakThreshold; + } + } + } + } + + private void OnEnable() + { + m_Actor = GetComponent(); + m_Actor.OnBlueprintLoaded += Actor_OnBlueprintLoaded; + m_Actor.OnPrepareStep += Actor_OnPrepareStep; + m_Actor.OnEndStep += Actor_OnEndStep; + + if (m_Actor.solver != null) + Actor_OnBlueprintLoaded(m_Actor, m_Actor.sourceBlueprint); + + EnableAttachment(m_AttachmentType); + } + + private void OnDisable() + { + DisableAttachment(m_AttachmentType); + + m_Actor.OnBlueprintLoaded -= Actor_OnBlueprintLoaded; + m_Actor.OnPrepareStep -= Actor_OnPrepareStep; + m_Actor.OnEndStep -= Actor_OnEndStep; + } + + private void OnValidate() + { + m_Actor = GetComponent(); // do not re-bind: simply disable and re-enable the attachment. - DisableAttachment(AttachmentType.Static); DisableAttachment(AttachmentType.Dynamic); EnableAttachment(m_AttachmentType); } void Actor_OnBlueprintLoaded(ObiActor act, ObiActorBlueprint blueprint) { Bind(); } + DisableAttachment(AttachmentType.Static); + DisableAttachment(AttachmentType.Dynamic); + EnableAttachment(m_AttachmentType); + } - void Actor_OnSimulate(ObiActor act, float stepTime, float substepTime) { + void Actor_OnBlueprintLoaded(ObiActor act, ObiActorBlueprint blueprint) + { + Bind(); + } + + void Actor_OnPrepareStep(ObiActor act, float stepTime) + { // Attachments must be updated at the start of the step, before performing any simulation. UpdateAttachment(); + } + private void Actor_OnEndStep(ObiActor act, float stepTime) + { + // dynamic attachments must be tested at the end of the step, once constraint forces have been calculated. // if there's any broken constraint, flag pin constraints as dirty for remerging at the start of the next step. - BreakDynamicAttachment(substepTime); } private void Bind() { + BreakDynamicAttachment(stepTime); + } + + private void Bind() + { // Disable attachment. - DisableAttachment(m_AttachmentType); if (m_Target != null && m_ParticleGroup != null && m_Actor.isLoaded) { Matrix4x4 bindMatrix = m_Target.worldToLocalMatrix * m_Actor.solver.transform.localToWorldMatrix; m_SolverIndices = new int[m_ParticleGroup.Count]; m_PositionOffsets = new Vector3[m_ParticleGroup.Count]; m_OrientationOffsets = new Quaternion[m_ParticleGroup.Count]; for (int i = 0; i < m_ParticleGroup.Count; ++i) { int particleIndex = m_ParticleGroup.particleIndices[i]; if (particleIndex >= 0 && particleIndex < m_Actor.solverIndices.count) { m_SolverIndices[i] = m_Actor.solverIndices[particleIndex]; m_PositionOffsets[i] = bindMatrix.MultiplyPoint3x4(m_Actor.solver.positions[m_SolverIndices[i]]); } else { Debug.LogError("The particle group \'" + m_ParticleGroup.name + "\' references a particle that does not exist in the actor \'" + m_Actor.name + "\'."); m_SolverIndices = null; m_PositionOffsets = null; m_OrientationOffsets = null; return; } } if (m_Actor.usesOrientedParticles) { Quaternion bindOrientation = bindMatrix.rotation; for (int i = 0; i < m_ParticleGroup.Count; ++i) { int particleIndex = m_ParticleGroup.particleIndices[i]; if (particleIndex >= 0 && particleIndex < m_Actor.solverIndices.count) m_OrientationOffsets[i] = bindOrientation * m_Actor.solver.orientations[m_SolverIndices[i]]; } } } else { m_PositionOffsets = null; m_OrientationOffsets = null; } EnableAttachment(m_AttachmentType); } private void EnableAttachment(AttachmentType type) { if (enabled && m_Actor.isLoaded && isBound) { var solver = m_Actor.solver; switch (type) { case AttachmentType.Dynamic: var pins = m_Actor.GetConstraintsByType(Oni.ConstraintType.Pin) as ObiPinConstraintsData; attachedCollider = m_Target.GetComponent(); if (pins != null && attachedCollider != null && pinBatch == null) { + DisableAttachment(m_AttachmentType); + + if (m_Target != null && m_ParticleGroup != null && m_Actor.isLoaded) + { + Matrix4x4 bindMatrix = m_Target.worldToLocalMatrix * m_Actor.solver.transform.localToWorldMatrix; + + m_SolverIndices = new int[m_ParticleGroup.Count]; + m_PositionOffsets = new Vector3[m_ParticleGroup.Count]; + m_OrientationOffsets = new Quaternion[m_ParticleGroup.Count]; + + for (int i = 0; i < m_ParticleGroup.Count; ++i) + { + int particleIndex = m_ParticleGroup.particleIndices[i]; + if (particleIndex >= 0 && particleIndex < m_Actor.solverIndices.Length) + { + m_SolverIndices[i] = m_Actor.solverIndices[particleIndex]; + m_PositionOffsets[i] = bindMatrix.MultiplyPoint3x4(m_Actor.solver.positions[m_SolverIndices[i]]); + } + else + { + Debug.LogError("The particle group \'" + m_ParticleGroup.name + "\' references a particle that does not exist in the actor \'" + m_Actor.name + "\'."); + m_SolverIndices = null; + m_PositionOffsets = null; + m_OrientationOffsets = null; + return; + } + } + + if (m_Actor.usesOrientedParticles) + { + Quaternion bindOrientation = bindMatrix.rotation; + + for (int i = 0; i < m_ParticleGroup.Count; ++i) + { + int particleIndex = m_ParticleGroup.particleIndices[i]; + if (particleIndex >= 0 && particleIndex < m_Actor.solverIndices.Length) + m_OrientationOffsets[i] = bindOrientation * m_Actor.solver.orientations[m_SolverIndices[i]]; + } + } + } + else + { + m_PositionOffsets = null; + m_OrientationOffsets = null; + } + + EnableAttachment(m_AttachmentType); + } + + + private void EnableAttachment(AttachmentType type) + { + + if (enabled && m_Actor.isLoaded && isBound) + { + var solver = m_Actor.solver; + + switch (type) + { + case AttachmentType.Dynamic: + + var pins = m_Actor.GetConstraintsByType(Oni.ConstraintType.Pin) as ObiPinConstraintsData; + attachedCollider = m_Target.GetComponent(); + + if (pins != null && attachedCollider != null && pinBatch == null) + { // create a new data batch with all our pin constraints: - pinBatch = new ObiPinConstraintsBatch(pins); for (int i = 0; i < m_SolverIndices.Length; ++i) { pinBatch.AddConstraint(m_SolverIndices[i], attachedCollider, m_PositionOffsets[i], m_OrientationOffsets[i], m_Compliance, constrainOrientation ? 0 : 10000, projection); pinBatch.activeConstraintCount++; } + pinBatch = new ObiPinConstraintsBatch(pins); + for (int i = 0; i < m_SolverIndices.Length; ++i) + { + pinBatch.AddConstraint(m_SolverIndices[i], + attachedCollider, + m_PositionOffsets[i], + m_OrientationOffsets[i], + m_Compliance, + constrainOrientation ? 0 : 10000, + m_BreakThreshold); + + pinBatch.activeConstraintCount++; + } // add the batch to the actor: pins.AddBatch(pinBatch); // store the attached collider's handle: - attachedColliderHandleIndex = -1; if (attachedCollider.Handle != null) attachedColliderHandleIndex = attachedCollider.Handle.index; m_Actor.SetConstraintsDirty(Oni.ConstraintType.Pin); } break; case AttachmentType.Static: for (int i = 0; i < m_SolverIndices.Length; ++i) if (m_SolverIndices[i] >= 0 && m_SolverIndices[i] < solver.invMasses.count) solver.invMasses[m_SolverIndices[i]] = 0; if (m_Actor.usesOrientedParticles && m_ConstrainOrientation) { for (int i = 0; i < m_SolverIndices.Length; ++i) if (m_SolverIndices[i] >= 0 && m_SolverIndices[i] < solver.invRotationalMasses.count) solver.invRotationalMasses[m_SolverIndices[i]] = 0; } m_Actor.UpdateParticleProperties(); break; } } } private void DisableAttachment(AttachmentType type) { if (isBound) { switch (type) { case AttachmentType.Dynamic: if (pinBatch != null) { var pins = m_Actor.GetConstraintsByType(Oni.ConstraintType.Pin) as ObiConstraints; if (pins != null) { pins.RemoveBatch(pinBatch); if (actor.isLoaded) m_Actor.SetConstraintsDirty(Oni.ConstraintType.Pin); } attachedCollider = null; pinBatch = null; attachedColliderHandleIndex = -1; } break; case AttachmentType.Static: var solver = m_Actor.solver; var blueprint = m_Actor.sourceBlueprint; for (int i = 0; i < m_SolverIndices.Length; ++i) { int solverIndex = m_SolverIndices[i]; if (solverIndex >= 0 && solverIndex < solver.invMasses.count) solver.invMasses[solverIndex] = blueprint.invMasses[i]; } if (m_Actor.usesOrientedParticles) { for (int i = 0; i < m_SolverIndices.Length; ++i) { int solverIndex = m_SolverIndices[i]; if (solverIndex >= 0 && solverIndex < solver.invRotationalMasses.count) solver.invRotationalMasses[solverIndex] = blueprint.invRotationalMasses[i]; } } m_Actor.UpdateParticleProperties(); break; } } } private void UpdateAttachment() { if (enabled && m_Actor.isLoaded && isBound) { var solver = m_Actor.solver; switch (m_AttachmentType) { case AttachmentType.Dynamic: + attachedColliderHandleIndex = -1; + if (attachedCollider.Handle != null) + attachedColliderHandleIndex = attachedCollider.Handle.index; + + m_Actor.SetConstraintsDirty(Oni.ConstraintType.Pin); + } + + break; + + case AttachmentType.Static: + + for (int i = 0; i < m_SolverIndices.Length; ++i) + if (m_SolverIndices[i] >= 0 && m_SolverIndices[i] < solver.invMasses.count) + solver.invMasses[m_SolverIndices[i]] = 0; + + if (m_Actor.usesOrientedParticles && m_ConstrainOrientation) + { + for (int i = 0; i < m_SolverIndices.Length; ++i) + if (m_SolverIndices[i] >= 0 && m_SolverIndices[i] < solver.invRotationalMasses.count) + solver.invRotationalMasses[m_SolverIndices[i]] = 0; + } + + m_Actor.UpdateParticleProperties(); + + break; + + } + } + + } + + private void DisableAttachment(AttachmentType type) + { + if (isBound) + { + switch (type) + { + case AttachmentType.Dynamic: + + if (pinBatch != null) + { + var pins = m_Actor.GetConstraintsByType(Oni.ConstraintType.Pin) as ObiConstraints; + if (pins != null) + { + pins.RemoveBatch(pinBatch); + if (actor.isLoaded) + m_Actor.SetConstraintsDirty(Oni.ConstraintType.Pin); + } + + attachedCollider = null; + pinBatch = null; + attachedColliderHandleIndex = -1; + } + + break; + + case AttachmentType.Static: + + var solver = m_Actor.solver; + var blueprint = m_Actor.sourceBlueprint; + + for (int i = 0; i < m_SolverIndices.Length; ++i) + { + int solverIndex = m_SolverIndices[i]; + if (solverIndex >= 0 && solverIndex < solver.invMasses.count) + solver.invMasses[solverIndex] = blueprint.invMasses[i]; + } + + if (m_Actor.usesOrientedParticles) + { + for (int i = 0; i < m_SolverIndices.Length; ++i) + { + int solverIndex = m_SolverIndices[i]; + if (solverIndex >= 0 && solverIndex < solver.invRotationalMasses.count) + solver.invRotationalMasses[solverIndex] = blueprint.invRotationalMasses[i]; + } + } + + m_Actor.UpdateParticleProperties(); + + break; + + } + } + } + + private void UpdateAttachment() + { + + if (enabled && m_Actor.isLoaded && isBound) + { + var solver = m_Actor.solver; + + switch (m_AttachmentType) + { + case AttachmentType.Dynamic: // in case the handle has been updated/invalidated (for instance, when disabling the target) rebuild constraints: if (attachedCollider != null && attachedCollider.Handle != null && - attachedCollider.Handle.index != attachedColliderHandleIndex) { attachedColliderHandleIndex = attachedCollider.Handle.index; m_Actor.SetConstraintsDirty(Oni.ConstraintType.Pin); } break; case AttachmentType.Static: var blueprint = m_Actor.sourceBlueprint; bool targetActive = m_Target.gameObject.activeInHierarchy; + attachedCollider.Handle.index != attachedColliderHandleIndex) + { + attachedColliderHandleIndex = attachedCollider.Handle.index; + m_Actor.SetConstraintsDirty(Oni.ConstraintType.Pin); + } + + break; + + case AttachmentType.Static: + + var blueprint = m_Actor.sourceBlueprint; + bool targetActive = m_Target.gameObject.activeInHierarchy; // Build the attachment matrix: Matrix4x4 attachmentMatrix = solver.transform.worldToLocalMatrix * m_Target.localToWorldMatrix; // Fix all particles in the group and update their position // Note: skip assignment to startPositions if you want attached particles to be interpolated too. - for (int i = 0; i < m_SolverIndices.Length; ++i) { int solverIndex = m_SolverIndices[i]; if (solverIndex >= 0 && solverIndex < solver.invMasses.count) { if (targetActive) { solver.invMasses[solverIndex] = 0; solver.velocities[solverIndex] = Vector3.zero; solver.startPositions[solverIndex] = solver.endPositions[solverIndex] = solver.positions[solverIndex] = attachmentMatrix.MultiplyPoint3x4(m_PositionOffsets[i]); } - else solver.invMasses[solverIndex] = blueprint.invMasses[i]; } } if (m_Actor.usesOrientedParticles && m_ConstrainOrientation) { Quaternion attachmentRotation = attachmentMatrix.rotation; for (int i = 0; i < m_SolverIndices.Length; ++i) { int solverIndex = m_SolverIndices[i]; if (solverIndex >= 0 && solverIndex < solver.invRotationalMasses.count) { if (targetActive) { solver.invRotationalMasses[solverIndex] = 0; solver.angularVelocities[solverIndex] = Vector3.zero; solver.startOrientations[solverIndex] = solver.endOrientations[solverIndex] = solver.orientations[solverIndex] = attachmentRotation * m_OrientationOffsets[i]; } else solver.invRotationalMasses[solverIndex] = blueprint.invRotationalMasses[i]; } } } break; } } else if (!isBound && attachedColliderHandleIndex >= 0) + for (int i = 0; i < m_SolverIndices.Length; ++i) + { + int solverIndex = m_SolverIndices[i]; + + if (solverIndex >= 0 && solverIndex < solver.invMasses.count) + { + if (targetActive) + { + solver.invMasses[solverIndex] = 0; + solver.velocities[solverIndex] = Vector3.zero; + solver.startPositions[solverIndex] = solver.positions[solverIndex] = attachmentMatrix.MultiplyPoint3x4(m_PositionOffsets[i]); + }else + solver.invMasses[solverIndex] = blueprint.invMasses[i]; + } + } + + if (m_Actor.usesOrientedParticles && m_ConstrainOrientation) + { + Quaternion attachmentRotation = attachmentMatrix.rotation; + + for (int i = 0; i < m_SolverIndices.Length; ++i) + { + int solverIndex = m_SolverIndices[i]; + + if (solverIndex >= 0 && solverIndex < solver.invRotationalMasses.count) + { + if (targetActive) + { + solver.invRotationalMasses[solverIndex] = 0; + solver.angularVelocities[solverIndex] = Vector3.zero; + solver.startOrientations[solverIndex] = solver.orientations[solverIndex] = attachmentRotation * m_OrientationOffsets[i]; + } + else + solver.invRotationalMasses[solverIndex] = blueprint.invRotationalMasses[i]; + } + } + } + break; + } + } + } + + private void BreakDynamicAttachment(float stepTime) + { + + if (enabled && m_AttachmentType == AttachmentType.Dynamic && m_Actor.isLoaded && isBound) { - attachedColliderHandleIndex = -1; - m_Actor.SetConstraintsDirty(Oni.ConstraintType.Pin); - } } private void BreakDynamicAttachment(float substepTime) { if (enabled && m_AttachmentType == AttachmentType.Dynamic && m_Actor.isLoaded && isBound) { var solver = m_Actor.solver; var actorConstraints = m_Actor.GetConstraintsByType(Oni.ConstraintType.Pin) as ObiConstraints; var solverConstraints = solver.GetConstraintsByType(Oni.ConstraintType.Pin) as ObiConstraints; bool dirty = false; if (actorConstraints != null && pinBatch != null && actorConstraints.batchCount <= solverConstraints.batchCount) { int pinBatchIndex = actorConstraints.batches.IndexOf(pinBatch); if (pinBatchIndex >= 0 && pinBatchIndex < actor.solverBatchOffsets[(int)Oni.ConstraintType.Pin].Count) { int offset = actor.solverBatchOffsets[(int)Oni.ConstraintType.Pin][pinBatchIndex]; var solverBatch = solverConstraints.batches[pinBatchIndex]; float sqrTime = substepTime * substepTime; for (int i = 0; i < pinBatch.activeConstraintCount; i++) { + + var solver = m_Actor.solver; + + var actorConstraints = m_Actor.GetConstraintsByType(Oni.ConstraintType.Pin) as ObiConstraints; + var solverConstraints = solver.GetConstraintsByType(Oni.ConstraintType.Pin) as ObiConstraints; + + bool dirty = false; + if (actorConstraints != null && pinBatch != null) + { + int pinBatchIndex = actorConstraints.batches.IndexOf(pinBatch); + if (pinBatchIndex >= 0 && pinBatchIndex < actor.solverBatchOffsets[(int)Oni.ConstraintType.Pin].Count) + { + int offset = actor.solverBatchOffsets[(int)Oni.ConstraintType.Pin][pinBatchIndex]; + var solverBatch = solverConstraints.batches[pinBatchIndex]; + + float sqrTime = stepTime * stepTime; + for (int i = 0; i < pinBatch.activeConstraintCount; i++) + { // In case the handle has been created/destroyed. - if (pinBatch.pinBodies[i] != attachedCollider.Handle) { pinBatch.pinBodies[i] = attachedCollider.Handle; dirty = true; } + if (pinBatch.pinBodies[i] != attachedCollider.Handle) + { + pinBatch.pinBodies[i] = attachedCollider.Handle; + dirty = true; + } // in case the constraint has been broken: - if (-solverBatch.lambdas[(offset + i) * 4 + 3] / sqrTime > breakThreshold) { pinBatch.DeactivateConstraint(i); dirty = true; } } } } + if (-solverBatch.lambdas[(offset + i) * 4 + 3] / sqrTime > pinBatch.breakThresholds[i]) + { + pinBatch.DeactivateConstraint(i); + dirty = true; + } + } + } + } // constraints are recreated at the start of a step. - if (dirty) m_Actor.SetConstraintsDirty(Oni.ConstraintType.Pin); } } } } \ No newline at end of file + if (dirty) + m_Actor.SetConstraintsDirty(Oni.ConstraintType.Pin); + } + } + } +} diff --git a/Assets/Obi/Scripts/Common/Utils/ObiParticleDragger.cs b/Assets/Obi/Scripts/Common/Utils/ObiParticleDragger.cs index 564490594..90f193dec 100644 --- a/Assets/Obi/Scripts/Common/Utils/ObiParticleDragger.cs +++ b/Assets/Obi/Scripts/Common/Utils/ObiParticleDragger.cs @@ -22,24 +22,23 @@ namespace Obi picker.OnParticlePicked.AddListener(Picker_OnParticleDragged); picker.OnParticleDragged.AddListener(Picker_OnParticleDragged); picker.OnParticleReleased.AddListener(Picker_OnParticleReleased); - - picker.solver.OnSimulationStart += Solver_OnEndSimulation; } void OnDisable() { - picker.solver.OnSimulationStart -= Solver_OnEndSimulation; - picker.OnParticlePicked.RemoveListener(Picker_OnParticleDragged); picker.OnParticleDragged.RemoveListener(Picker_OnParticleDragged); picker.OnParticleReleased.RemoveListener(Picker_OnParticleReleased); lineRenderer.positionCount = 0; } - private void Solver_OnEndSimulation(ObiSolver solver, float timeToSimulate, float substepTime) + void FixedUpdate() { + ObiSolver solver = picker.solver; + if (solver != null && pickArgs != null) { + // Calculate picking position in solver space: Vector4 targetPosition = solver.transform.InverseTransformPoint(pickArgs.worldPosition); @@ -53,6 +52,7 @@ namespace Obi Vector4 velocity = solver.velocities[pickArgs.particleIndex]; solver.externalForces[pickArgs.particleIndex] = ((targetPosition - position) * springStiffness - velocity * springDamping) / invMass; + if (drawSpring) { lineRenderer.positionCount = 2; diff --git a/Assets/Obi/Scripts/Common/Utils/ObiParticleGridDebugger.cs b/Assets/Obi/Scripts/Common/Utils/ObiParticleGridDebugger.cs new file mode 100644 index 000000000..4a2a827b4 --- /dev/null +++ b/Assets/Obi/Scripts/Common/Utils/ObiParticleGridDebugger.cs @@ -0,0 +1,45 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +namespace Obi +{ + + [RequireComponent(typeof(ObiSolver))] + public class ObiParticleGridDebugger : MonoBehaviour + { + + ObiSolver solver; + ObiNativeAabbList cells; + + void OnEnable() + { + solver = GetComponent(); + cells = new ObiNativeAabbList(); + } + + private void OnDisable() + { + cells.Dispose(); + } + + void LateUpdate () + { + cells.count = solver.implementation.GetParticleGridSize(); + solver.implementation.GetParticleGrid(cells); + } + + void OnDrawGizmos() + { + + if (cells != null) + { + Gizmos.color = Color.yellow; + for(int i = 0; i < cells.count; ++i) + Gizmos.DrawWireCube(cells[i].center, cells[i].size); + } + + } + + } +} diff --git a/Assets/Obi/Scripts/Common/Utils/ObiParticleGridDebugger.cs.meta b/Assets/Obi/Scripts/Common/Utils/ObiParticleGridDebugger.cs.meta new file mode 100644 index 000000000..f787114ba --- /dev/null +++ b/Assets/Obi/Scripts/Common/Utils/ObiParticleGridDebugger.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 12c0ac28542b14de6a887a6a9067d86d +timeCreated: 1487351379 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Utils/ObiParticlePicker.cs b/Assets/Obi/Scripts/Common/Utils/ObiParticlePicker.cs index 8c2d7fdb9..9c5d4a474 100644 --- a/Assets/Obi/Scripts/Common/Utils/ObiParticlePicker.cs +++ b/Assets/Obi/Scripts/Common/Utils/ObiParticlePicker.cs @@ -63,13 +63,13 @@ namespace Obi Matrix4x4 solver2World = solver.transform.localToWorldMatrix; // Find the closest particle hit by the ray: - for (int i = 0; i < solver.positions.count; ++i) + for (int i = 0; i < solver.renderablePositions.count; ++i) { - Vector3 worldPos = solver2World.MultiplyPoint3x4(solver.positions[i]); + Vector3 worldPos = solver2World.MultiplyPoint3x4(solver.renderablePositions[i]); float mu; - Vector3 projected = ObiUtils.ProjectPointLine(ray.origin, ray.origin + ray.direction, worldPos, out mu, false); + Vector3 projected = ObiUtils.ProjectPointLine(worldPos, ray.origin, ray.origin + ray.direction, out mu, false); float distanceToRay = Vector3.SqrMagnitude(worldPos - projected); // Disregard particles behind the camera: @@ -88,7 +88,7 @@ namespace Obi if (pickedParticleIndex >= 0) { - pickedParticleDepth = Camera.main.transform.InverseTransformVector(solver2World.MultiplyPoint3x4(solver.positions[pickedParticleIndex]) - Camera.main.transform.position).z; + pickedParticleDepth = Camera.main.transform.InverseTransformVector(solver2World.MultiplyPoint3x4(solver.renderablePositions[pickedParticleIndex]) - Camera.main.transform.position).z; if (OnParticlePicked != null) { diff --git a/Assets/Obi/Scripts/Common/Utils/ObiProfiler.cs b/Assets/Obi/Scripts/Common/Utils/ObiProfiler.cs new file mode 100644 index 000000000..32e62596f --- /dev/null +++ b/Assets/Obi/Scripts/Common/Utils/ObiProfiler.cs @@ -0,0 +1,215 @@ +using System; +using UnityEngine; + +namespace Obi +{ + [DisallowMultipleComponent] + public class ObiProfiler : MonoBehaviour + { + [Header("Appearance")] + public GUISkin skin; + public Color threadColor = Color.white; + public Color taskColor = new Color(0.1f, 1, 0.2f); + public Color parallelTaskColor = new Color(1,0.8f,0.2f); + //public Color idleColor = new Color(0.7f,0.7f,0.7f); + public Color renderTaskColor = new Color(0.2f, 0.7f, 1.0f); + public Color defaultTaskColor = new Color(1, 0.5f, 0.2f); + + [Header("Visualization")] + public bool showPercentages = false; + public int profileThrottle = 30; + + private Oni.ProfileInfo[] info; + private double frameStart; + private double frameEnd; + private int frameCounter = 0; + private int yPos = 25; + private bool profiling = false; + + private float zoom = 1; + private Vector2 scrollPosition = Vector2.zero; + + private static ObiProfiler _instance; + + private void Awake() + { + if (_instance != null && _instance != this) + DestroyImmediate(this); + else{ + _instance = this; + } + } + + public void OnDestroy(){ +#if (OBI_ONI_SUPPORTED) + _instance = null; + Oni.EnableProfiler(false); +#endif + } + + private void OnEnable() + { +#if (OBI_ONI_SUPPORTED) + if (_instance != null && _instance.profiling) + Oni.EnableProfiler(true); +#endif + } + + private void OnDisable() + { +#if (OBI_ONI_SUPPORTED) + if (_instance != null) + Oni.EnableProfiler(false); +#endif + } + + public static void EnableProfiler() + { +#if (OBI_ONI_SUPPORTED) + if (_instance != null) + { + _instance.profiling = true; + if (_instance.isActiveAndEnabled) + Oni.EnableProfiler(true); + } +#endif + } + + public static void DisableProfiler() + { +#if (OBI_ONI_SUPPORTED) + if (_instance != null) + { + _instance.profiling = false; + Oni.EnableProfiler(false); + } +#endif + } + + public static void BeginSample(string name, byte type) + { +#if (OBI_ONI_SUPPORTED) + if (_instance != null) + Oni.BeginSample(name, type); +#endif + } + + public static void EndSample() + { +#if (OBI_ONI_SUPPORTED) + if (_instance != null) + Oni.EndSample(); +#endif + } + + private void UpdateProfilerInfo(){ +#if (OBI_ONI_SUPPORTED) + frameCounter--; + if (frameCounter <= 0) + { + int count = Oni.GetProfilingInfoCount(); + info = new Oni.ProfileInfo[count]; + Oni.GetProfilingInfo(info,count); + + frameCounter = profileThrottle; + + // Calculate frame duration: + frameStart = double.MaxValue; + frameEnd = double.MinValue; + foreach (Oni.ProfileInfo i in info){ + frameStart = Math.Min(frameStart,i.start); + frameEnd = Math.Max(frameEnd,i.end); + } + } + + Oni.ClearProfiler(); +#endif + } + + public void OnGUI() + { +#if (OBI_ONI_SUPPORTED) + if (Event.current.type == EventType.Layout) + UpdateProfilerInfo(); + + if (info == null) + return; + + GUI.skin = skin; + int toolbarHeight = 20; + int threadHeight = 20; + int scrollViewWidth = (int)(Screen.width / zoom); + + double frameDuration = frameEnd - frameStart; + + // Toolbar: + GUI.BeginGroup(new Rect(0,0,Screen.width,toolbarHeight),"","Box"); + + GUI.Label(new Rect(5,0,50,toolbarHeight),"Zoom:"); + zoom = GUI.HorizontalSlider(new Rect(50,5,100,toolbarHeight),zoom,0.005f,1); + GUI.Label(new Rect(Screen.width - 100,0,100,toolbarHeight),(frameDuration/1000.0f).ToString("0.###") + " ms/frame"); + + GUI.EndGroup(); + + // Timeline view: + scrollPosition = GUI.BeginScrollView(new Rect(0, toolbarHeight, Screen.width, Screen.height-20), scrollPosition, + new Rect(0, 0, scrollViewWidth, yPos+30)); // height depends on amount of threads. + + GUI.color = threadColor; + GUI.Label(new Rect(5,0,200,20),"Thread 1"); + GUI.Box(new Rect(0, 0, scrollViewWidth, 40),"","Thread"); + + yPos = 25; + uint currentThreadId = 0; + uint currentLevel = 0; + foreach (Oni.ProfileInfo i in info) + { + uint threadId = (i.info & (uint)Oni.ProfileMask.ThreadIdMask) >> 16; + uint level = (i.info & (uint)Oni.ProfileMask.StackLevelMask) >> 8; + uint type = i.info & (uint)Oni.ProfileMask.TypeMask; + + if (currentThreadId != threadId){ + yPos += threadHeight+1; + GUI.color = threadColor; + GUI.Label(new Rect(5,yPos+5,200,20),"Thread "+(threadId+1)); + GUI.Box(new Rect(0, yPos+5, scrollViewWidth, 40),"","Thread"); + yPos += 30; + }else if (currentLevel != level){ + yPos += threadHeight+1; + } + + currentLevel = level; + currentThreadId = threadId; + + switch(type){ + case 0: GUI.color = taskColor; break; + //case 1: GUI.color = idleColor; break; + case 2: GUI.color = parallelTaskColor; break; + case 3: GUI.color = renderTaskColor; break; + default: GUI.color = defaultTaskColor; break; + } + + // task duration: + int taskStart = (int) ((i.start - frameStart) / frameDuration * (Screen.width-10) / zoom); + int taskEnd = (int) ((i.end - frameStart) / frameDuration * (Screen.width-10) / zoom); + int taskDuration = taskEnd-taskStart; + + string name; + if (showPercentages) + { + double pctg = (i.end-i.start)/frameDuration*100; + name = i.name + " ("+pctg.ToString("0.#")+"%)"; + } + else{ + double ms = (i.end-i.start)/1000.0f; + name = i.name + " ("+ms.ToString("0.###")+"ms)"; + } + + GUI.Box(new Rect(taskStart, yPos, taskDuration-1, threadHeight),name,"Task"); + } + GUI.EndScrollView(); +#endif + } + } +} + diff --git a/Assets/Obi/Scripts/Common/Utils/ObiProfiler.cs.meta b/Assets/Obi/Scripts/Common/Utils/ObiProfiler.cs.meta new file mode 100644 index 000000000..d26c93d7c --- /dev/null +++ b/Assets/Obi/Scripts/Common/Utils/ObiProfiler.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 62e83a599724f45a4aa337d74764e572 +timeCreated: 1482252100 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: + - skin: {fileID: 11400000, guid: b90d3c214c99743b0865fc0e0d1f1a15, type: 2} + executionOrder: 0 + icon: {fileID: 2800000, guid: 1c322d61eeb3640408ee1119729d5c21, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Utils/ObiStitcher.cs b/Assets/Obi/Scripts/Common/Utils/ObiStitcher.cs index e7c95e84b..86c1f76bd 100644 --- a/Assets/Obi/Scripts/Common/Utils/ObiStitcher.cs +++ b/Assets/Obi/Scripts/Common/Utils/ObiStitcher.cs @@ -34,9 +34,9 @@ namespace Obi [SerializeField] [HideInInspector] private ObiActor actor1 = null; /**< one of the actors used by the stitcher.*/ [SerializeField] [HideInInspector] private ObiActor actor2 = null; /**< the second actor used by the stitcher.*/ - [HideInInspector] public ObiNativeIntList particleIndices; - [HideInInspector] public ObiNativeFloatList stiffnesses; - [HideInInspector] public ObiNativeFloatList lambdas; + [HideInInspector] public ObiNativeIntList particleIndices = new ObiNativeIntList(); + [HideInInspector] public ObiNativeFloatList stiffnesses = new ObiNativeFloatList(); + [HideInInspector] public ObiNativeFloatList lambdas = new ObiNativeFloatList(); //private IntPtr batch; private IStitchConstraintsBatchImpl m_BatchImpl; @@ -176,10 +176,6 @@ namespace Obi inSolver = true; - particleIndices = new ObiNativeIntList(); - stiffnesses = new ObiNativeFloatList(); - lambdas = new ObiNativeFloatList(); - // create a constraint batch (CreateStitchConstraints() in burst returns a singleton): m_BatchImpl = solver.implementation.CreateConstraintsBatch(Oni.ConstraintType.Stitch) as IStitchConstraintsBatchImpl; @@ -199,10 +195,6 @@ namespace Obi // Oni.RemoveBatch(actor1.solver.OniSolver, batch); if (inSolver && m_BatchImpl != null) { - lambdas.Dispose(); - particleIndices.Dispose(); - stiffnesses.Dispose(); - solver.implementation.DestroyConstraintsBatch(m_BatchImpl as IStitchConstraintsBatchImpl); m_BatchImpl.Destroy(); m_BatchImpl = null; @@ -235,6 +227,7 @@ namespace Obi m_BatchImpl.SetStitchConstraints(particleIndices, stiffnesses, lambdas, stitches.Count); } + } } diff --git a/Assets/Obi/Scripts/Common/Utils/ObiUtils.cs b/Assets/Obi/Scripts/Common/Utils/ObiUtils.cs index a3e1a1966..fcf48adf2 100644 --- a/Assets/Obi/Scripts/Common/Utils/ObiUtils.cs +++ b/Assets/Obi/Scripts/Common/Utils/ObiUtils.cs @@ -1,114 +1,888 @@ -using UnityEngine; using System; using System.Collections.Generic; using System.Runtime.CompilerServices; using System.IO; namespace Obi { public static class Constants { public const int maxVertsPerMesh = 65000; public const int maxInstancesPerBatch = 1023; } public static class ObiUtils { public const float epsilon = 0.0000001f; public const float sqrt3 = 1.73205080f; public const float sqrt2 = 1.41421356f; public const int FilterMaskBitmask = unchecked((int)0xffff0000); public const int FilterCategoryBitmask = 0x0000ffff; public const int ParticleGroupBitmask = 0x00ffffff; public const int CollideWithEverything = 0x0000ffff; public const int CollideWithNothing= 0x0; public const int MaxCategory = 15; public const int MinCategory = 0; [Flags] public enum ParticleFlags { SelfCollide = 1 << 24, Fluid = 1 << 25, OneSided = 1 << 26, Isolated = 1 << 27 // particles that are not part of persistent constraints and can be deleted without ill effects: fluids and granulars - } // Colour alphabet from https://www.aic-color.org/resources/Documents/jaic_v5_06.pdf public static readonly Color32[] colorAlphabet = { new Color32(240,163,255,255), new Color32(0,117,220,255), new Color32(153,63,0,255), new Color32(76,0,92,255), new Color32(25,25,25,255), new Color32(0,92,49,255), new Color32(43,206,72,255), new Color32(255,204,153,255), new Color32(128,128,128,255), new Color32(148,255,181,255), new Color32(143,124,0,255), new Color32(157,204,0,255), new Color32(194,0,136,255), new Color32(0,51,128,255), new Color32(255,164,5,255), new Color32(255,168,187,255), new Color32(66,102,0,255), new Color32(255,0,16,255), new Color32(94,241,242,255), new Color32(0,153,143,255), new Color32(224,255,102,255), new Color32(116,10,255,255), new Color32(153,0,0,255), new Color32(255,255,128,255), new Color32(255,255,0,255), new Color32(255,80,5,255) }; public static readonly string[] categoryNames = { "0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15" }; +using UnityEngine; +using System; +using System.Collections.Generic; +using System.Runtime.CompilerServices; - // Based on Kubelka-Munk theory: https://vanity-ibex.xyz/blog/kubelka_munk_colormixing/ - public static Color RGBToAbsorption(this Color rgb) +namespace Obi +{ + + public static class Constants + { + public const int maxVertsPerMesh = 65000; + public const int maxInstancesPerBatch = 1023; + } + + public static class ObiUtils + { + + public const float epsilon = 0.0000001f; + public const float sqrt3 = 1.73205080f; + public const float sqrt2 = 1.41421356f; + + public const int FilterMaskBitmask = unchecked((int)0xffff0000); + public const int FilterCategoryBitmask = 0x0000ffff; + public const int ParticleGroupBitmask = 0x00ffffff; + + public const int CollideWithEverything = 0x0000ffff; + public const int CollideWithNothing= 0x0; + + public const int MaxCategory = 15; + public const int MinCategory = 0; + + [Flags] + public enum ParticleFlags { - // S (scattering) is assumed to be 1 for all channels - Color k; - k.r = Mathf.Pow(1 - rgb.r, 2) / (2 * rgb.r + epsilon); - k.g = Mathf.Pow(1 - rgb.g, 2) / (2 * rgb.g + epsilon); - k.b = Mathf.Pow(1 - rgb.b, 2) / (2 * rgb.b + epsilon); - k.a = rgb.a; - return k; + SelfCollide = 1 << 24, + Fluid = 1 << 25, + OneSided = 1 << 26 } - // Based on Kubelka-Munk theory: https://vanity-ibex.xyz/blog/kubelka_munk_colormixing/ - public static Color AbsorptionToRGB(this Color k) + // Colour alphabet from https://www.aic-color.org/resources/Documents/jaic_v5_06.pdf + public static readonly Color32[] colorAlphabet = { - // Assuming S=1 for all channels - Color rgb; - rgb.r = 1 + k.r - Mathf.Sqrt(k.r * (k.r + 2)); - rgb.g = 1 + k.g - Mathf.Sqrt(k.g * (k.g + 2)); - rgb.b = 1 + k.b - Mathf.Sqrt(k.b * (k.b + 2)); - rgb.a = k.a; - return rgb; - } public static void DrawArrowGizmo(float bodyLenght, float bodyWidth, float headLenght, float headWidth) { float halfBodyLenght = bodyLenght * 0.5f; float halfBodyWidth = bodyWidth * 0.5f; // arrow body: Gizmos.DrawLine(new Vector3(halfBodyWidth, 0, -halfBodyLenght), new Vector3(halfBodyWidth, 0, halfBodyLenght)); Gizmos.DrawLine(new Vector3(-halfBodyWidth, 0, -halfBodyLenght), new Vector3(-halfBodyWidth, 0, halfBodyLenght)); Gizmos.DrawLine(new Vector3(-halfBodyWidth, 0, -halfBodyLenght), new Vector3(halfBodyWidth, 0, -halfBodyLenght)); // arrow head: Gizmos.DrawLine(new Vector3(halfBodyWidth, 0, halfBodyLenght), new Vector3(headWidth, 0, halfBodyLenght)); Gizmos.DrawLine(new Vector3(-halfBodyWidth, 0, halfBodyLenght), new Vector3(-headWidth, 0, halfBodyLenght)); Gizmos.DrawLine(new Vector3(0, 0, halfBodyLenght + headLenght), new Vector3(headWidth, 0, halfBodyLenght)); Gizmos.DrawLine(new Vector3(0, 0, halfBodyLenght + headLenght), new Vector3(-headWidth, 0, halfBodyLenght)); } + new Color32(240,163,255,255), + new Color32(0,117,220,255), + new Color32(153,63,0,255), + new Color32(76,0,92,255), + new Color32(25,25,25,255), + new Color32(0,92,49,255), + new Color32(43,206,72,255), + new Color32(255,204,153,255), + new Color32(128,128,128,255), + new Color32(148,255,181,255), + new Color32(143,124,0,255), + new Color32(157,204,0,255), + new Color32(194,0,136,255), + new Color32(0,51,128,255), + new Color32(255,164,5,255), + new Color32(255,168,187,255), + new Color32(66,102,0,255), + new Color32(255,0,16,255), + new Color32(94,241,242,255), + new Color32(0,153,143,255), + new Color32(224,255,102,255), + new Color32(116,10,255,255), + new Color32(153,0,0,255), + new Color32(255,255,128,255), + new Color32(255,255,0,255), + new Color32(255,80,5,255) + }; - public static void DebugDrawBox(Vector3 pos, Quaternion rot, Vector3 scale, Color c) + public static readonly string[] categoryNames = { - // create matrix - Matrix4x4 m = new Matrix4x4(); - m.SetTRS(pos, rot, scale); + "0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15" + }; - var point1 = m.MultiplyPoint(new Vector3(-0.5f, -0.5f, 0.5f)); - var point2 = m.MultiplyPoint(new Vector3(0.5f, -0.5f, 0.5f)); - var point3 = m.MultiplyPoint(new Vector3(0.5f, -0.5f, -0.5f)); - var point4 = m.MultiplyPoint(new Vector3(-0.5f, -0.5f, -0.5f)); + public static void DrawArrowGizmo(float bodyLenght, float bodyWidth, float headLenght, float headWidth) + { - var point5 = m.MultiplyPoint(new Vector3(-0.5f, 0.5f, 0.5f)); - var point6 = m.MultiplyPoint(new Vector3(0.5f, 0.5f, 0.5f)); - var point7 = m.MultiplyPoint(new Vector3(0.5f, 0.5f, -0.5f)); - var point8 = m.MultiplyPoint(new Vector3(-0.5f, 0.5f, -0.5f)); + float halfBodyLenght = bodyLenght * 0.5f; + float halfBodyWidth = bodyWidth * 0.5f; - Debug.DrawLine(point1, point2, c); - Debug.DrawLine(point2, point3, c); - Debug.DrawLine(point3, point4, c); - Debug.DrawLine(point4, point1, c); + // arrow body: + Gizmos.DrawLine(new Vector3(halfBodyWidth, 0, -halfBodyLenght), new Vector3(halfBodyWidth, 0, halfBodyLenght)); + Gizmos.DrawLine(new Vector3(-halfBodyWidth, 0, -halfBodyLenght), new Vector3(-halfBodyWidth, 0, halfBodyLenght)); + Gizmos.DrawLine(new Vector3(-halfBodyWidth, 0, -halfBodyLenght), new Vector3(halfBodyWidth, 0, -halfBodyLenght)); - Debug.DrawLine(point5, point6, c); - Debug.DrawLine(point6, point7, c); - Debug.DrawLine(point7, point8, c); - Debug.DrawLine(point8, point5, c); - - Debug.DrawLine(point1, point5, c); - Debug.DrawLine(point2, point6, c); - Debug.DrawLine(point3, point7, c); - Debug.DrawLine(point4, point8, c); + // arrow head: + Gizmos.DrawLine(new Vector3(halfBodyWidth, 0, halfBodyLenght), new Vector3(headWidth, 0, halfBodyLenght)); + Gizmos.DrawLine(new Vector3(-halfBodyWidth, 0, halfBodyLenght), new Vector3(-headWidth, 0, halfBodyLenght)); + Gizmos.DrawLine(new Vector3(0, 0, halfBodyLenght + headLenght), new Vector3(headWidth, 0, halfBodyLenght)); + Gizmos.DrawLine(new Vector3(0, 0, halfBodyLenght + headLenght), new Vector3(-headWidth, 0, halfBodyLenght)); } - public static void DebugDrawCross(Vector3 pos, float size, Color color) { Debug.DrawLine(pos - Vector3.right * size, pos + Vector3.right * size, color); Debug.DrawLine(pos - Vector3.up * size, pos + Vector3.up * size, color); Debug.DrawLine(pos - Vector3.forward * size, pos + Vector3.forward * size, color); } public static int CeilToPowerOfTwo(this int count) { int powerOfTwo = 1; while (powerOfTwo < count) powerOfTwo <<= 1; return powerOfTwo; } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void Swap(ref T lhs, ref T rhs) { T temp = lhs; lhs = rhs; rhs = temp; } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void Swap(this T[] source, int index1, int index2) { if (source != null && index1 >= 0 && index2 >= 0 && index1 < source.Length && index2 < source.Length) { T temp = source[index1]; source[index1] = source[index2]; source[index2] = temp; } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static void Swap(this IList list, int index1, int index2) { if (list != null && index1 >= 0 && index2 >= 0 && index1 < list.Count && index2 < list.Count) { T temp = list[index1]; list[index1] = list[index2]; list[index2] = temp; } } public static void ShiftLeft(this T[] source, int index, int count, int positions) { for (int j = 0; j < positions; ++j) { for (int i = index; i < index + count; ++i) source.Swap(i, i - 1); index--; } } public static void ShiftRight(this T[] source, int index, int count, int positions) { for (int j = 0; j < positions; ++j) { for (int i = index + count - 1; i >= index; --i) source.Swap(i, i + 1); index++; } } public static int Unique(this IList list, Func equals) { int result = 0; for (int i = 0; i < list.Count; ++i) { if (!equals(list[result],list[i]) && ++result != i) list[result] = list[i]; } result++; return result; } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool AreValid(this Bounds bounds) { return !(float.IsNaN(bounds.max.x) || float.IsInfinity(bounds.max.x) || float.IsNaN(bounds.max.y) || float.IsInfinity(bounds.max.y) || float.IsNaN(bounds.max.z) || float.IsInfinity(bounds.max.z) || float.IsNaN(bounds.min.x) || float.IsInfinity(bounds.min.x) || float.IsNaN(bounds.min.y) || float.IsInfinity(bounds.min.y) || float.IsNaN(bounds.min.z) || float.IsInfinity(bounds.min.z)); } public static Bounds Transform(this Bounds b, Matrix4x4 m) { var xa = m.GetColumn(0) * b.min.x; var xb = m.GetColumn(0) * b.max.x; var ya = m.GetColumn(1) * b.min.y; var yb = m.GetColumn(1) * b.max.y; var za = m.GetColumn(2) * b.min.z; var zb = m.GetColumn(2) * b.max.z; Bounds result = new Bounds(); Vector3 pos = m.GetColumn(3); result.SetMinMax(Vector3.Min(xa, xb) + Vector3.Min(ya, yb) + Vector3.Min(za, zb) + pos, Vector3.Max(xa, xb) + Vector3.Max(ya, yb) + Vector3.Max(za, zb) + pos); return result; } public static int CountTrailingZeroes(int x) { int mask = 1; for (int i = 0; i < 32; i++, mask <<= 1) if ((x & mask) != 0) return i; return 32; } public static void Add(Vector3 a, Vector3 b, ref Vector3 result) { result.x = a.x + b.x; result.y = a.y + b.y; result.z = a.z + b.z; } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static float Remap(this float value, float from1, float to1, float from2, float to2) { return (value - from1) / (to1 - from1) * (to2 - from2) + from2; } /** * Modulo operator that also follows intuition for negative arguments. That is , -1 mod 3 = 2, not -1. */ [MethodImpl(MethodImplOptions.AggressiveInlining)] public static float Mod(float a, float b) { return a - b * Mathf.Floor(a / b); } public static Matrix4x4 Add(this Matrix4x4 a, Matrix4x4 other) { for (int i = 0; i < 16; ++i) a[i] += other[i]; return a; } public static float FrobeniusNorm(this Matrix4x4 a) { float norm = 0; for (int i = 0; i < 16; ++i) norm += a[i] * a[i]; return norm > 0 ? Mathf.Sqrt(norm) : 0; } public static Matrix4x4 ScalarMultiply(this Matrix4x4 a, float s) { for (int i = 0; i < 16; ++i) a[i] *= s; return a; } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector4 Diagonal(this Matrix4x4 value) { return new Vector4(value.m00, value.m11, value.m22, value.m33); } public static Vector3 ProjectPointLine(Vector3 lineStart, Vector3 lineEnd, Vector3 point, out float mu, bool clampToSegment = true) { Vector3 ap = point - lineStart; Vector3 ab = lineEnd - lineStart; mu = Vector3.Dot(ap, ab) / Vector3.Dot(ab, ab); if (clampToSegment) mu = Mathf.Clamp01(mu); return lineStart + ab * mu; } public static bool LinePlaneIntersection(Vector3 planePoint, Vector3 planeNormal, Vector3 linePoint, Vector3 lineDirection, out Vector3 point) { point = linePoint; Vector3 lineNormal = lineDirection.normalized; float denom = Vector3.Dot(planeNormal, lineNormal); if (Mathf.Approximately(denom, 0)) return false; float t = (Vector3.Dot(planeNormal,planePoint) - Vector3.Dot(planeNormal,linePoint)) / denom; point = linePoint + lineNormal * t; return true; } public static float RaySphereIntersection(Vector3 rayOrigin, Vector3 rayDirection, Vector3 center, float radius) { Vector3 oc = rayOrigin - center; float a = Vector3.Dot(rayDirection, rayDirection); float b = 2.0f * Vector3.Dot(oc, rayDirection); float c = Vector3.Dot(oc, oc) - radius * radius; float discriminant = b * b - 4 * a * c; if(discriminant < 0){ return -1.0f; } else{ return (-b - Mathf.Sqrt(discriminant)) / (2.0f * a); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static float InvMassToMass(float invMass) { return 1.0f / invMass; } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static float MassToInvMass(float mass) { return 1.0f / Mathf.Max(mass, 0.00001f); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int PureSign(this float val) { return ((0 <= val)?1:0) - ((val < 0)?1:0); } public static void NearestPointOnTri(in Vector3 p1, in Vector3 p2, in Vector3 p3, in Vector3 p, out Vector3 result) { float e0x = p2.x - p1.x; float e0y = p2.y - p1.y; float e0z = p2.z - p1.z; float e1x = p3.x - p1.x; float e1y = p3.y - p1.y; float e1z = p3.z - p1.z; float v0x = p1.x - p.x; float v0y = p1.y - p.y; float v0z = p1.z - p.z; float a00 = e0x * e0x + e0y * e0y + e0z * e0z; float a01 = e0x * e1x + e0y * e1y + e0z * e1z; float a11 = e1x * e1x + e1y * e1y + e1z * e1z; float b0 = e0x * v0x + e0y * v0y + e0z * v0z; float b1 = e1x * v0x + e1y * v0y + e1z * v0z; const float zero = 0; const float one = 1; float det = a00 * a11 - a01 * a01; float t0 = a01 * b1 - a11 * b0; float t1 = a01 * b0 - a00 * b1; if (t0 + t1 <= det) { if (t0 < zero) { if (t1 < zero) // region 4 { if (b0 < zero) { t1 = zero; if (-b0 >= a00) // V0 { t0 = one; } else // E01 { t0 = -b0 / a00; } } else { t0 = zero; if (b1 >= zero) // V0 { t1 = zero; } else if (-b1 >= a11) // V2 { t1 = one; } else // E20 { t1 = -b1 / a11; } } } else // region 3 { t0 = zero; if (b1 >= zero) // V0 { t1 = zero; } else if (-b1 >= a11) // V2 { t1 = one; } else // E20 { t1 = -b1 / a11; } } } else if (t1 < zero) // region 5 { t1 = zero; if (b0 >= zero) // V0 { t0 = zero; } else if (-b0 >= a00) // V1 { t0 = one; } else // E01 { t0 = -b0 / a00; } } else // region 0, interior { float invDet = one / det; t0 *= invDet; t1 *= invDet; } } else { float tmp0, tmp1, numer, denom; if (t0 < zero) // region 2 { tmp0 = a01 + b0; tmp1 = a11 + b1; if (tmp1 > tmp0) { numer = tmp1 - tmp0; denom = a00 - 2 * a01 + a11; if (numer >= denom) // V1 { t0 = one; t1 = zero; } else // E12 { t0 = numer / denom; t1 = one - t0; } } else { t0 = zero; if (tmp1 <= zero) // V2 { t1 = one; } else if (b1 >= zero) // V0 { t1 = zero; } else // E20 { t1 = -b1 / a11; } } } else if (t1 < zero) // region 6 { tmp0 = a01 + b1; tmp1 = a00 + b0; if (tmp1 > tmp0) { numer = tmp1 - tmp0; denom = a00 - 2 * a01 + a11; if (numer >= denom) // V2 { t1 = one; t0 = zero; } else // E12 { t1 = numer / denom; t0 = one - t1; } } else { t1 = zero; if (tmp1 <= zero) // V1 { t0 = one; } else if (b0 >= zero) // V0 { t0 = zero; } else // E01 { t0 = -b0 / a00; } } } else // region 1 { numer = a11 + b1 - a01 - b0; if (numer <= zero) // V2 { t0 = zero; t1 = one; } else { denom = a00 - 2 * a01 + a11; if (numer >= denom) // V1 { t0 = one; t1 = zero; } else // 12 { t0 = numer / denom; t1 = one - t0; } } } } result.x = p1.x + t0 * e0x + t1 * e1x; result.y = p1.y + t0 * e0y + t1 * e1y; result.z = p1.z + t0 * e0z + t1 * e1z; } /** * Calculates the area of a triangle. */ [MethodImpl(MethodImplOptions.AggressiveInlining)] public static float TriangleArea(Vector3 p1, Vector3 p2, Vector3 p3) { return Mathf.Sqrt(Vector3.Cross(p2 - p1, p3 - p1).sqrMagnitude) / 2f; } // Volume of a tetrahedron, assumes one of the corners is at zero. [MethodImpl(MethodImplOptions.AggressiveInlining)] public static float TetraVolume(Vector3 p1, Vector3 p2, Vector3 p3) { return Vector3.Dot(Vector3.Cross(p1, p2), p3) / 6.0f; } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector3 TriangleNormal(Vector3 p1, Vector3 p2, Vector3 p3) { return Vector3.Cross(p2 - p1, p3 - p1).normalized; } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static float TriangleAspectRatio(float a, float b, float c) { float s = (a + b + c) / 2.0f; float den = 8.0f * (s - a) * (s - b) * (s - c); if (den > epsilon) return (a * b * c) / den; // a triangle with zero area has zero aspect ratio: return 0; } public static void BestTriangleAxisProjection(Vector3 p1, Vector3 p2, Vector3 p3, out Vector2 r1, out Vector2 r2, out Vector2 r3) { float areaX = TriangleArea(new Vector3(0, p1.y, p1.z), new Vector3(0, p2.y, p2.z), new Vector3(0, p3.y, p3.z)); float areaY = TriangleArea(new Vector3(p1.x, 0, p1.z), new Vector3(p2.x, 0, p2.z), new Vector3(p3.x, 0, p3.z)); float areaZ = TriangleArea(new Vector3(p1.x, p1.y, 0), new Vector3(p2.x, p2.y, 0), new Vector3(p3.x, p3.y, 0)); if (areaX > areaY && areaX > areaZ) { r1 = new Vector2(p1.y, p1.z); r2 = new Vector2(p2.y, p2.z); r3 = new Vector2(p3.y, p3.z); } else if (areaY > areaX && areaY > areaZ) { r1 = new Vector2(p1.x, p1.z); r2 = new Vector2(p2.x, p2.z); r3 = new Vector2(p3.x, p3.z); } else { r1 = new Vector2(p1.x, p1.y); r2 = new Vector2(p2.x, p2.y); r3 = new Vector2(p3.x, p3.y); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static float EllipsoidVolume(Vector3 principalRadii) { return 4.0f / 3.0f * Mathf.PI * principalRadii.x * principalRadii.y * principalRadii.z; } public static Quaternion RestDarboux(Quaternion q1, Quaternion q2) { Quaternion darboux = Quaternion.Inverse(q1) * q2; Vector4 omega_plus, omega_minus; omega_plus = new Vector4(darboux.x, darboux.y, darboux.z, darboux.w + 1); omega_minus = new Vector4(darboux.x, darboux.y, darboux.z, darboux.w - 1); if (omega_minus.sqrMagnitude > omega_plus.sqrMagnitude) darboux = new Quaternion(darboux.x * -1, darboux.y * -1, darboux.z * -1, darboux.w * -1); return darboux; } public static Vector4 AsVector4(this Quaternion q) - { - return new Vector4(q.x,q.y,q.z,q.w); - } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static float RestBendingConstraint(Vector3 positionA, Vector3 positionB, Vector3 positionC) { Vector3 center = (positionA + positionB + positionC) / 3; return (positionC - center).magnitude; } public static System.Collections.IEnumerable BilateralInterleaved(int count) { for (int i = 0; i < count; ++i) { if (i % 2 != 0) yield return count - (count % 2) - i; else yield return i; } } public static void BarycentricCoordinates(in Vector3 A, in Vector3 B, in Vector3 C, in Vector3 P, ref Vector3 bary) { // Compute vectors Vector3 v0 = C - A; Vector3 v1 = B - A; Vector3 v2 = P - A; // Compute dot products float dot00 = Vector3.Dot(v0,v0); float dot01 = Vector3.Dot(v0,v1); float dot02 = Vector3.Dot(v0,v2); float dot11 = Vector3.Dot(v1,v1); float dot12 = Vector3.Dot(v1,v2); // Compute barycentric coordinates float det = dot00 * dot11 - dot01 * dot01; if (Math.Abs(det) > 1E-38) { float u = (dot11 * dot02 - dot01 * dot12) / det; float v = (dot00 * dot12 - dot01 * dot02) / det; bary = new Vector3(1-u-v,v,u); } } public static void BarycentricInterpolation(in Vector3 p1, in Vector3 p2, in Vector3 p3, in Vector3 coords, out Vector3 result) { result.x = coords.x * p1.x + coords.y * p2.x + coords.z * p3.x; result.y = coords.x * p1.y + coords.y * p2.y + coords.z * p3.y; result.z = coords.x * p1.z + coords.y * p2.z + coords.z * p3.z; } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static float BarycentricInterpolation(float p1, float p2, float p3, Vector3 coords) { return coords[0] * p1 + coords[1] * p2 + coords[2] * p3; } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static float BarycentricExtrapolationScale(Vector3 coords) { return 1.0f / (coords[0] * coords[0] + coords[1] * coords[1] + coords[2] * coords[2]); } public static Vector3[] CalculateAngleWeightedNormals(Vector3[] vertices, int[] triangles) { Vector3[] normals = new Vector3[vertices.Length]; var normalBuffer = new Dictionary(); Vector3 v1, v2, v3, e1, e2; for (int i = 0; i < triangles.Length; i += 3) { v1 = vertices[triangles[i]]; v2 = vertices[triangles[i + 1]]; v3 = vertices[triangles[i + 2]]; if (!normalBuffer.ContainsKey(v1)) normalBuffer[v1] = Vector3.zero; if (!normalBuffer.ContainsKey(v2)) normalBuffer[v2] = Vector3.zero; if (!normalBuffer.ContainsKey(v3)) normalBuffer[v3] = Vector3.zero; e1 = v2 - v1; e2 = v3 - v1; normalBuffer[v1] += Vector3.Cross(e1,e2).normalized * Mathf.Acos(Vector3.Dot(e1.normalized, e2.normalized)); e1 = v3 - v2; e2 = v1 - v2; normalBuffer[v2] += Vector3.Cross(e1, e2).normalized * Mathf.Acos(Vector3.Dot(e1.normalized, e2.normalized)); e1 = v1 - v3; e2 = v2 - v3; normalBuffer[v3] += Vector3.Cross(e1, e2).normalized * Mathf.Acos(Vector3.Dot(e1.normalized, e2.normalized)); } for (int i = 0; i < vertices.Length; ++i) normals[i] = normalBuffer[vertices[i]].normalized; return normals; } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int MakePhase(int group, ParticleFlags flags) { return (group & ParticleGroupBitmask) | (int)flags; } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int GetGroupFromPhase(int phase) { return phase & ParticleGroupBitmask; } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static ParticleFlags GetFlagsFromPhase(int phase) { return (ParticleFlags)(phase & ~ParticleGroupBitmask); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int MakeFilter(int mask, int category) { return (mask << 16) | (1 << category); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int GetCategoryFromFilter(int filter) { return CountTrailingZeroes(filter & FilterCategoryBitmask); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public static int GetMaskFromFilter(int filter) { return (filter & FilterMaskBitmask) >> 16; } public static void EigenSolve(Matrix4x4 D, out Vector3 S, out Matrix4x4 V) { // D is symmetric // S is a vector whose elements are eigenvalues // V is a matrix whose columns are eigenvectors S = EigenValues(D); Vector3 V0, V1, V2; if (S[0] - S[1] > S[1] - S[2]) { V0 = EigenVector(D, S[0]); if (S[1] - S[2] < epsilon) { V2 = V0.unitOrthogonal(); } else { V2 = EigenVector(D, S[2]); V2 -= V0 * Vector3.Dot(V0, V2); V2 = Vector3.Normalize(V2); } V1 = Vector3.Cross(V2, V0); } else { V2 = EigenVector(D, S[2]); if (S[0] - S[1] < epsilon) { V1 = V2.unitOrthogonal(); } else { V1 = EigenVector(D, S[1]); V1 -= V2 * Vector3.Dot(V2, V1); V1 = Vector3.Normalize(V1); } V0 = Vector3.Cross(V1, V2); } V = Matrix4x4.identity; V.SetColumn(0,V0); V.SetColumn(1,V1); V.SetColumn(2,V2); } static Vector3 unitOrthogonal(this Vector3 input) { // Find a vector to cross() the input with. if (!(input.x < input.z * epsilon) || !(input.y < input.z * epsilon)) { float invnm = 1 / Vector3.Magnitude(new Vector2(input.x,input.y)); return new Vector3(-input.y * invnm, input.x * invnm, 0); } else { float invnm = 1 / Vector3.Magnitude(new Vector2(input.y,input.z)); return new Vector3(0, -input.z * invnm, input.y * invnm); } } // D is symmetric, S is an eigen value static Vector3 EigenVector(Matrix4x4 D, float S) { // Compute a cofactor matrix of D - sI. Vector4 c0 = D.GetColumn(0); c0[0] -= S; Vector4 c1 = D.GetColumn(1); c1[1] -= S; Vector4 c2 = D.GetColumn(2); c2[2] -= S; // Use an upper triangle Vector3 c0p = new Vector3(c1[1] * c2[2] - c2[1] * c2[1], 0, 0); Vector3 c1p = new Vector3(c2[1] * c2[0] - c1[0] * c2[2], c0[0] * c2[2] - c2[0] * c2[0], 0); Vector3 c2p = new Vector3(c1[0] * c2[1] - c1[1] * c2[0], c1[0] * c2[0] - c0[0] * c2[1], c0[0] * c1[1] - c1[0] * c1[0]); // Get a column vector with a largest norm (non-zero). float C01s = c1p[0] * c1p[0]; float C02s = c2p[0] * c2p[0]; float C12s = c2p[1] * c2p[1]; Vector3 norm = new Vector3(c0p[0] * c0p[0] + C01s + C02s, C01s + c1p[1] * c1p[1] + C12s, C02s + C12s + c2p[2] * c2p[2]); // index of largest: int index = 0; if (norm[0] > norm[1] && norm[0] > norm[2]) index = 0; else if (norm[1] > norm[0] && norm[1] > norm[2]) index = 1; else index = 2; Vector3 V = Vector3.zero; // special case if (norm[index] < epsilon) { V[0] = 1; return V; } else if (index == 0) { V[0] = c0p[0]; V[1] = c1p[0]; V[2] = c2p[0]; } else if (index == 1) { V[0] = c1p[0]; V[1] = c1p[1]; V[2] = c2p[1]; } else { V = c2p; } return Vector3.Normalize(V); } static Vector3 EigenValues(Matrix4x4 D) { float one_third = 1 / 3.0f; float one_sixth = 1 / 6.0f; float three_sqrt = Mathf.Sqrt(3.0f); Vector3 c0 = D.GetColumn(0); Vector3 c1 = D.GetColumn(1); Vector3 c2 = D.GetColumn(2); float m = one_third * (c0[0] + c1[1] + c2[2]); // K is D - I*diag(S) float K00 = c0[0] - m; float K11 = c1[1] - m; float K22 = c2[2] - m; float K01s = c1[0] * c1[0]; float K02s = c2[0] * c2[0]; float K12s = c2[1] * c2[1]; float q = 0.5f * (K00 * (K11 * K22 - K12s) - K22 * K01s - K11 * K02s) + c1[0] * c2[1] * c0[2]; float p = one_sixth * (K00 * K00 + K11 * K11 + K22 * K22 + 2 * (K01s + K02s + K12s)); float p_sqrt = Mathf.Sqrt(p); float tmp = p * p * p - q * q; float phi = one_third * Mathf.Atan2(Mathf.Sqrt(Mathf.Max(0, tmp)), q); float phi_c = Mathf.Cos(phi); float phi_s = Mathf.Sin(phi); float sqrt_p_c_phi = p_sqrt * phi_c; float sqrt_p_3_s_phi = p_sqrt * three_sqrt * phi_s; float e0 = m + 2 * sqrt_p_c_phi; float e1 = m - sqrt_p_c_phi - sqrt_p_3_s_phi; float e2 = m - sqrt_p_c_phi + sqrt_p_3_s_phi; float aux; if (e0 > e1) { aux = e0; e0 = e1; e1 = aux; } if (e0 > e2) { aux = e0; e0 = e2; e2 = aux; } if (e1 > e2) { aux = e1; e1 = e2; e2 = aux; } return new Vector3(e2, e1, e0); } public static Vector3 GetPointCloudCentroid(List points) { Vector3 centroid = Vector3.zero; for (int i = 0; i < points.Count; ++i) centroid += points[i]; return centroid / points.Count; } public static void GetPointCloudAnisotropy(List points, float max_anisotropy, float radius, in Vector3 hint_normal, ref Vector3 centroid, ref Quaternion orientation, ref Vector3 principal_radii) { int count = points.Count; if (count < 2 || radius <= 0 || max_anisotropy <= 0) { principal_radii = Vector3.one * radius; orientation = Quaternion.identity; return; } centroid = GetPointCloudCentroid(points); // three columns of a 3x3 anisotropy matrix: Vector4 c0 = Vector4.zero, c1 = Vector4.zero, c2 = Vector4.zero; Matrix4x4 anisotropy = Matrix4x4.zero; // multiply offset by offset transposed, and add to matrix: for (int i = 0; i < count; i++) { Vector4 offset = points[i] - centroid; c0 += offset * offset[0]; c1 += offset * offset[1]; c2 += offset * offset[2]; } // calculate maximum absolute value: float max0 = Mathf.Max(Mathf.Max(Mathf.Abs(c0.x), Mathf.Abs(c0.y)), Mathf.Abs(c0.z)); float max1 = Mathf.Max(Mathf.Max(Mathf.Abs(c1.x), Mathf.Abs(c1.y)), Mathf.Abs(c1.z)); float max2 = Mathf.Max(Mathf.Max(Mathf.Abs(c2.x), Mathf.Abs(c2.y)), Mathf.Abs(c2.z)); float max = Mathf.Max(Mathf.Max(max0,max1), max2); // normalize matrix: if (max > epsilon) { c0 /= max; c1 /= max; c2 /= max; } anisotropy.SetColumn(0, c0); anisotropy.SetColumn(1, c1); anisotropy.SetColumn(2, c2); Matrix4x4 orientMat; EigenSolve(anisotropy, out principal_radii, out orientMat); // flip orientation if it is not in the same side as the hint normal: if (Vector3.Dot(orientMat.GetColumn(2),hint_normal) < 0) { orientMat.SetColumn(2,orientMat.GetColumn(2) * -1); orientMat.SetColumn(1,orientMat.GetColumn(1) * -1); } max = principal_radii[0]; principal_radii = Vector3.Max(principal_radii,Vector3.one * max/max_anisotropy) / max * radius; orientation = orientMat.rotation; } public static int MergeBatches(List batches, int count, bool trimExcess) where T : IRenderBatch { // merge batches (using a method similar to std::unique): int current = 0; for (int i = 1; i < count; ++i) { var resultBatch = batches[current]; // see if we can merge this batch: if (current != i) { - // if we can't merge with the current batch, - // advance to the next one. - if (!resultBatch.TryMergeWith(batches[i])) batches.Swap(++current, i); } } current++; // get rid of excess batches: if (trimExcess && current < batches.Count) batches.RemoveRange(current, batches.Count - current); return current; } public static int MergeBatches(List batches) where T : IRenderBatch { - return MergeBatches(batches, batches.Count, true); } public static void Concatenate(this MemoryStream ms, Vector3 v) { for (int i = 0; i < 3; ++i) { var b = BitConverter.GetBytes(v[i]); ms.Write(b, 0, b.Length); } } public static void Concatenate(this MemoryStream ms, Quaternion q) { for (int i = 0; i < 4; ++i) { var b = BitConverter.GetBytes(q[i]); ms.Write(b, 0, b.Length); } } public static void Concatenate(this MemoryStream ms, float f) { var b = BitConverter.GetBytes(f); ms.Write(b, 0, b.Length); } public static void Concatenate(this MemoryStream ms, int f) { var b = BitConverter.GetBytes(f); ms.Write(b, 0, b.Length); } public static uint Adler32(byte[] bytes) { const int mod = 65521; uint a = 1, b = 0; foreach (byte c in bytes) { a = (a + c) % mod; b = (b + a) % mod; } return (b << 16) | a; } - public unsafe static Vector3 OctDecode(float k) + public static void DebugDrawCross(Vector3 pos, float size, Color color) { - uint d = *(uint*)&k; - Vector2 f = new Vector2((d >> 16) / 65535f, (d & 0xffff) / 65535f); - f.x = f.x * 2 - 1; - f.y = f.y * 2 - 1; + Debug.DrawLine(pos - Vector3.right * size, pos + Vector3.right * size, color); + Debug.DrawLine(pos - Vector3.up * size, pos + Vector3.up * size, color); + Debug.DrawLine(pos - Vector3.forward * size, pos + Vector3.forward * size, color); + } - Vector3 n = new Vector3(f.x, f.y, 1.0f - Mathf.Abs(f.x) - Mathf.Abs(f.y)); - float t = Mathf.Max(-n.z, 0); - n.x += n.x >= 0.0f ? -t : t; - n.y += n.y >= 0.0f ? -t : t; - return Vector3.Normalize(n); + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void Swap(ref T lhs, ref T rhs) + { + T temp = lhs; + lhs = rhs; + rhs = temp; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void Swap(this T[] source, int index1, int index2) + { + if (source != null && index1 >= 0 && index2 != 0 && index1 < source.Length && index2 < source.Length) + { + T temp = source[index1]; + source[index1] = source[index2]; + source[index2] = temp; + } + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void Swap(this IList list, int index1, int index2) + { + if (list != null && index1 >= 0 && index2 != 0 && index1 < list.Count && index2 < list.Count) + { + T temp = list[index1]; + list[index1] = list[index2]; + list[index2] = temp; + } + } + + public static void ShiftLeft(this T[] source, int index, int count, int positions) + { + for (int j = 0; j < positions; ++j) + { + for (int i = index; i < index + count; ++i) + source.Swap(i, i - 1); + index--; + } + } + + public static void ShiftRight(this T[] source, int index, int count, int positions) + { + for (int j = 0; j < positions; ++j) + { + for (int i = index + count - 1; i >= index; --i) + source.Swap(i, i + 1); + index++; + } + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool AreValid(this Bounds bounds) + { + return !(float.IsNaN(bounds.center.x) || float.IsInfinity(bounds.center.x) || + float.IsNaN(bounds.center.y) || float.IsInfinity(bounds.center.y) || + float.IsNaN(bounds.center.z) || float.IsInfinity(bounds.center.z)); + } + + public static Bounds Transform(this Bounds b, Matrix4x4 m) + { + var xa = m.GetColumn(0) * b.min.x; + var xb = m.GetColumn(0) * b.max.x; + + var ya = m.GetColumn(1) * b.min.y; + var yb = m.GetColumn(1) * b.max.y; + + var za = m.GetColumn(2) * b.min.z; + var zb = m.GetColumn(2) * b.max.z; + + Bounds result = new Bounds(); + Vector3 pos = m.GetColumn(3); + result.SetMinMax(Vector3.Min(xa, xb) + Vector3.Min(ya, yb) + Vector3.Min(za, zb) + pos, + Vector3.Max(xa, xb) + Vector3.Max(ya, yb) + Vector3.Max(za, zb) + pos); + + + return result; + } + + public static int CountTrailingZeroes(int x) + { + int mask = 1; + for (int i = 0; i < 32; i++, mask <<= 1) + if ((x & mask) != 0) + return i; + + return 32; + } + + public static void Add(Vector3 a, Vector3 b, ref Vector3 result) + { + result.x = a.x + b.x; + result.y = a.y + b.y; + result.z = a.z + b.z; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Remap(this float value, float from1, float to1, float from2, float to2) + { + return (value - from1) / (to1 - from1) * (to2 - from2) + from2; + } + + /** + * Modulo operator that also follows intuition for negative arguments. That is , -1 mod 3 = 2, not -1. + */ + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float Mod(float a, float b) + { + return a - b * Mathf.Floor(a / b); + } + + public static Matrix4x4 Add(this Matrix4x4 a, Matrix4x4 other) + { + for (int i = 0; i < 16; ++i) + a[i] += other[i]; + return a; + } + + public static float FrobeniusNorm(this Matrix4x4 a) + { + float norm = 0; + for (int i = 0; i < 16; ++i) + norm += a[i] * a[i]; + + return Mathf.Sqrt(norm); + } + + public static Matrix4x4 ScalarMultiply(this Matrix4x4 a, float s) + { + for (int i = 0; i < 16; ++i) + a[i] *= s; + return a; + } + + public static Vector3 ProjectPointLine(Vector3 point, Vector3 lineStart, Vector3 lineEnd, out float mu, bool clampToSegment = true) + { + Vector3 ap = point - lineStart; + Vector3 ab = lineEnd - lineStart; + + mu = Vector3.Dot(ap, ab) / Vector3.Dot(ab, ab); + + if (clampToSegment) + mu = Mathf.Clamp01(mu); + + return lineStart + ab * mu; + } + + public static bool LinePlaneIntersection(Vector3 planePoint, Vector3 planeNormal, Vector3 linePoint, Vector3 lineDirection, out Vector3 point) + { + point = linePoint; + Vector3 lineNormal = lineDirection.normalized; + float denom = Vector3.Dot(planeNormal, lineNormal); + + if (Mathf.Approximately(denom, 0)) + return false; + + float t = (Vector3.Dot(planeNormal,planePoint) - Vector3.Dot(planeNormal,linePoint)) / denom; + point = linePoint + lineNormal * t; + return true; + } + + public static float RaySphereIntersection(Vector3 rayOrigin, Vector3 rayDirection, Vector3 center, float radius) + { + Vector3 oc = rayOrigin - center; + + float a = Vector3.Dot(rayDirection, rayDirection); + float b = 2.0f * Vector3.Dot(oc, rayDirection); + float c = Vector3.Dot(oc, oc) - radius * radius; + float discriminant = b * b - 4 * a * c; + if(discriminant < 0){ + return -1.0f; + } + else{ + return (-b - Mathf.Sqrt(discriminant)) / (2.0f * a); + } + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float InvMassToMass(float invMass) + { + return 1.0f / invMass; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float MassToInvMass(float mass) + { + return 1.0f / Mathf.Max(mass, 0.00001f); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int PureSign(this float val) + { + return ((0 <= val)?1:0) - ((val < 0)?1:0); + } + + public static void NearestPointOnTri(in Vector3 p1, + in Vector3 p2, + in Vector3 p3, + in Vector3 p, + out Vector3 result) + { + float e0x = p2.x - p1.x; + float e0y = p2.y - p1.y; + float e0z = p2.z - p1.z; + + float e1x = p3.x - p1.x; + float e1y = p3.y - p1.y; + float e1z = p3.z - p1.z; + + float v0x = p1.x - p.x; + float v0y = p1.y - p.y; + float v0z = p1.z - p.z; + + float a00 = e0x * e0x + e0y * e0y + e0z * e0z; + float a01 = e0x * e1x + e0y * e1y + e0z * e1z; + float a11 = e1x * e1x + e1y * e1y + e1z * e1z; + float b0 = e0x * v0x + e0y * v0y + e0z * v0z; + float b1 = e1x * v0x + e1y * v0y + e1z * v0z; + + const float zero = 0; + const float one = 1; + + float det = a00 * a11 - a01 * a01; + float t0 = a01 * b1 - a11 * b0; + float t1 = a01 * b0 - a00 * b1; + + if (t0 + t1 <= det) + { + if (t0 < zero) + { + if (t1 < zero) // region 4 + { + if (b0 < zero) + { + t1 = zero; + if (-b0 >= a00) // V0 + { + t0 = one; + } + else // E01 + { + t0 = -b0 / a00; + } + } + else + { + t0 = zero; + if (b1 >= zero) // V0 + { + t1 = zero; + } + else if (-b1 >= a11) // V2 + { + t1 = one; + } + else // E20 + { + t1 = -b1 / a11; + } + } + } + else // region 3 + { + t0 = zero; + if (b1 >= zero) // V0 + { + t1 = zero; + } + else if (-b1 >= a11) // V2 + { + t1 = one; + } + else // E20 + { + t1 = -b1 / a11; + } + } + } + else if (t1 < zero) // region 5 + { + t1 = zero; + if (b0 >= zero) // V0 + { + t0 = zero; + } + else if (-b0 >= a00) // V1 + { + t0 = one; + } + else // E01 + { + t0 = -b0 / a00; + } + } + else // region 0, interior + { + float invDet = one / det; + t0 *= invDet; + t1 *= invDet; + } + } + else + { + float tmp0, tmp1, numer, denom; + + if (t0 < zero) // region 2 + { + tmp0 = a01 + b0; + tmp1 = a11 + b1; + if (tmp1 > tmp0) + { + numer = tmp1 - tmp0; + denom = a00 - 2 * a01 + a11; + if (numer >= denom) // V1 + { + t0 = one; + t1 = zero; + } + else // E12 + { + t0 = numer / denom; + t1 = one - t0; + } + } + else + { + t0 = zero; + if (tmp1 <= zero) // V2 + { + t1 = one; + } + else if (b1 >= zero) // V0 + { + t1 = zero; + } + else // E20 + { + t1 = -b1 / a11; + } + } + } + else if (t1 < zero) // region 6 + { + tmp0 = a01 + b1; + tmp1 = a00 + b0; + if (tmp1 > tmp0) + { + numer = tmp1 - tmp0; + denom = a00 - 2 * a01 + a11; + if (numer >= denom) // V2 + { + t1 = one; + t0 = zero; + } + else // E12 + { + t1 = numer / denom; + t0 = one - t1; + } + } + else + { + t1 = zero; + if (tmp1 <= zero) // V1 + { + t0 = one; + } + else if (b0 >= zero) // V0 + { + t0 = zero; + } + else // E01 + { + t0 = -b0 / a00; + } + } + } + else // region 1 + { + numer = a11 + b1 - a01 - b0; + if (numer <= zero) // V2 + { + t0 = zero; + t1 = one; + } + else + { + denom = a00 - 2 * a01 + a11; + if (numer >= denom) // V1 + { + t0 = one; + t1 = zero; + } + else // 12 + { + t0 = numer / denom; + t1 = one - t0; + } + } + } + } + + result.x = p1.x + t0 * e0x + t1 * e1x; + result.y = p1.y + t0 * e0y + t1 * e1y; + result.z = p1.z + t0 * e0z + t1 * e1z; + } + + /** + * Calculates the area of a triangle. + */ + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float TriangleArea(Vector3 p1, Vector3 p2, Vector3 p3) + { + return Mathf.Sqrt(Vector3.Cross(p2 - p1, p3 - p1).sqrMagnitude) / 2f; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float EllipsoidVolume(Vector3 principalRadii) + { + return 4.0f / 3.0f * Mathf.PI * principalRadii.x * principalRadii.y * principalRadii.z; + } + + public static Quaternion RestDarboux(Quaternion q1, Quaternion q2) + { + Quaternion darboux = Quaternion.Inverse(q1) * q2; + + Vector4 omega_plus, omega_minus; + omega_plus = new Vector4(darboux.x, darboux.y, darboux.z, darboux.w + 1); + omega_minus = new Vector4(darboux.x, darboux.y, darboux.z, darboux.w - 1); + + if (omega_minus.sqrMagnitude > omega_plus.sqrMagnitude) + darboux = new Quaternion(darboux.x * -1, darboux.y * -1, darboux.z * -1, darboux.w * -1); + + return darboux; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float RestBendingConstraint(Vector3 positionA, Vector3 positionB, Vector3 positionC) + { + Vector3 center = (positionA + positionB + positionC) / 3; + return (positionC - center).magnitude; + } + + public static System.Collections.IEnumerable BilateralInterleaved(int count) + { + for (int i = 0; i < count; ++i) + { + if (i % 2 != 0) + yield return count - (count % 2) - i; + else yield return i; + } + } + + public static void BarycentricCoordinates(in Vector3 A, + in Vector3 B, + in Vector3 C, + in Vector3 P, + ref Vector3 bary) + { + + // Compute vectors + Vector3 v0 = C - A; + Vector3 v1 = B - A; + Vector3 v2 = P - A; + + // Compute dot products + float dot00 = Vector3.Dot(v0,v0); + float dot01 = Vector3.Dot(v0,v1); + float dot02 = Vector3.Dot(v0,v2); + float dot11 = Vector3.Dot(v1,v1); + float dot12 = Vector3.Dot(v1,v2); + + // Compute barycentric coordinates + float det = dot00 * dot11 - dot01 * dot01; + if (Math.Abs(det) > 1E-38) + { + float u = (dot11 * dot02 - dot01 * dot12) / det; + float v = (dot00 * dot12 - dot01 * dot02) / det; + bary = new Vector3(1-u-v,v,u); + } + + } + + public static void BarycentricInterpolation(in Vector3 p1, in Vector3 p2, in Vector3 p3, in Vector3 coords, out Vector3 result) + { + result.x = coords.x * p1.x + coords.y * p2.x + coords.z * p3.x; + result.y = coords.x * p1.y + coords.y * p2.y + coords.z * p3.y; + result.z = coords.x * p1.z + coords.y * p2.z + coords.z * p3.z; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float BarycentricInterpolation(float p1, float p2, float p3, Vector3 coords) + { + return coords[0] * p1 + coords[1] * p2 + coords[2] * p3; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static float BarycentricExtrapolationScale(Vector3 coords) + { + + return 1.0f / (coords[0] * coords[0] + + coords[1] * coords[1] + + coords[2] * coords[2]); + + } + + public static Vector3[] CalculateAngleWeightedNormals(Vector3[] vertices, int[] triangles) + { + Vector3[] normals = new Vector3[vertices.Length]; + var normalBuffer = new Dictionary(); + + Vector3 v1, v2, v3, e1, e2; + for (int i = 0; i < triangles.Length; i += 3) + { + v1 = vertices[triangles[i]]; + v2 = vertices[triangles[i + 1]]; + v3 = vertices[triangles[i + 2]]; + + if (!normalBuffer.ContainsKey(v1)) + normalBuffer[v1] = Vector3.zero; + if (!normalBuffer.ContainsKey(v2)) + normalBuffer[v2] = Vector3.zero; + if (!normalBuffer.ContainsKey(v3)) + normalBuffer[v3] = Vector3.zero; + + e1 = v2 - v1; + e2 = v3 - v1; + normalBuffer[v1] += Vector3.Cross(e1,e2).normalized * Mathf.Acos(Vector3.Dot(e1.normalized, e2.normalized)); + + e1 = v3 - v2; + e2 = v1 - v2; + normalBuffer[v2] += Vector3.Cross(e1, e2).normalized * Mathf.Acos(Vector3.Dot(e1.normalized, e2.normalized)); + + e1 = v1 - v3; + e2 = v2 - v3; + normalBuffer[v3] += Vector3.Cross(e1, e2).normalized * Mathf.Acos(Vector3.Dot(e1.normalized, e2.normalized)); + } + + for (int i = 0; i < vertices.Length; ++i) + normals[i] = normalBuffer[vertices[i]].normalized; + + return normals; + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int MakePhase(int group, ParticleFlags flags) + { + return (group & ParticleGroupBitmask) | (int)flags; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetGroupFromPhase(int phase) + { + return phase & ParticleGroupBitmask; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ParticleFlags GetFlagsFromPhase(int phase) + { + return (ParticleFlags)(phase & ~ParticleGroupBitmask); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int MakeFilter(int mask, int category) + { + return (mask << 16) | (1 << category); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetCategoryFromFilter(int filter) + { + return CountTrailingZeroes(filter & FilterCategoryBitmask); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int GetMaskFromFilter(int filter) + { + return (filter & FilterMaskBitmask) >> 16; + } + + public static void EigenSolve(Matrix4x4 D, out Vector3 S, out Matrix4x4 V) + { + // D is symmetric + // S is a vector whose elements are eigenvalues + // V is a matrix whose columns are eigenvectors + S = EigenValues(D); + Vector3 V0, V1, V2; + + if (S[0] - S[1] > S[1] - S[2]) + { + V0 = EigenVector(D, S[0]); + if (S[1] - S[2] < epsilon) + { + V2 = V0.unitOrthogonal(); + } + else + { + V2 = EigenVector(D, S[2]); V2 -= V0 * Vector3.Dot(V0, V2); V2 = Vector3.Normalize(V2); + } + V1 = Vector3.Cross(V2, V0); + } + else + { + V2 = EigenVector(D, S[2]); + if (S[0] - S[1] < epsilon) + { + V1 = V2.unitOrthogonal(); + } + else + { + V1 = EigenVector(D, S[1]); V1 -= V2 * Vector3.Dot(V2, V1); V1 = Vector3.Normalize(V1); + } + V0 = Vector3.Cross(V1, V2); + } + + V = Matrix4x4.identity; + V.SetColumn(0,V0); + V.SetColumn(1,V1); + V.SetColumn(2,V2); } - public unsafe static Vector4 UnpackFloatRGBA(float v) + static Vector3 unitOrthogonal(this Vector3 input) { - uint rgba = *(uint*)&v; - float r = ((rgba & 0xff000000) >> 24) / 255f; - float g = ((rgba & 0x00ff0000) >> 16) / 255f; - float b = ((rgba & 0x0000ff00) >> 8) / 255f; - float a = (rgba & 0x000000ff) / 255f; - return new Vector4(r, g, b, a); + // Find a vector to cross() the input with. + if (!(input.x < input.z * epsilon) + || !(input.y < input.z * epsilon)) + { + float invnm = 1 / Vector3.Magnitude(new Vector2(input.x,input.y)); + return new Vector3(-input.y * invnm, input.x * invnm, 0); + } + else + { + float invnm = 1 / Vector3.Magnitude(new Vector2(input.y,input.z)); + return new Vector3(0, -input.z * invnm, input.y * invnm); + } + } + + // D is symmetric, S is an eigen value + static Vector3 EigenVector(Matrix4x4 D, float S) + { + // Compute a cofactor matrix of D - sI. + Vector4 c0 = D.GetColumn(0); c0[0] -= S; + Vector4 c1 = D.GetColumn(1); c1[1] -= S; + Vector4 c2 = D.GetColumn(2); c2[2] -= S; + + // Use an upper triangle + Vector3 c0p = new Vector3(c1[1] * c2[2] - c2[1] * c2[1], 0, 0); + Vector3 c1p = new Vector3(c2[1] * c2[0] - c1[0] * c2[2], c0[0] * c2[2] - c2[0] * c2[0], 0); + Vector3 c2p = new Vector3(c1[0] * c2[1] - c1[1] * c2[0], c1[0] * c2[0] - c0[0] * c2[1], c0[0] * c1[1] - c1[0] * c1[0]); + + // Get a column vector with a largest norm (non-zero). + float C01s = c1p[0] * c1p[0]; + float C02s = c2p[0] * c2p[0]; + float C12s = c2p[1] * c2p[1]; + Vector3 norm = new Vector3(c0p[0] * c0p[0] + C01s + C02s, + C01s + c1p[1] * c1p[1] + C12s, + C02s + C12s + c2p[2] * c2p[2]); + + // index of largest: + int index = 0; + if (norm[0] > norm[1] && norm[0] > norm[2]) + index = 0; + else if (norm[1] > norm[0] && norm[1] > norm[2]) + index = 1; + else + index = 2; + + Vector3 V = Vector3.zero; + + // special case + if (norm[index] < epsilon) + { + V[0] = 1; return V; + } + else if (index == 0) + { + V[0] = c0p[0]; V[1] = c1p[0]; V[2] = c2p[0]; + } + else if (index == 1) + { + V[0] = c1p[0]; V[1] = c1p[1]; V[2] = c2p[1]; + } + else + { + V = c2p; + } + return Vector3.Normalize(V); + } + + static Vector3 EigenValues(Matrix4x4 D) + { + float one_third = 1 / 3.0f; + float one_sixth = 1 / 6.0f; + float three_sqrt = Mathf.Sqrt(3.0f); + + Vector3 c0 = D.GetColumn(0); + Vector3 c1 = D.GetColumn(1); + Vector3 c2 = D.GetColumn(2); + + float m = one_third * (c0[0] + c1[1] + c2[2]); + + // K is D - I*diag(S) + float K00 = c0[0] - m; + float K11 = c1[1] - m; + float K22 = c2[2] - m; + + float K01s = c1[0] * c1[0]; + float K02s = c2[0] * c2[0]; + float K12s = c2[1] * c2[1]; + + float q = 0.5f * (K00 * (K11 * K22 - K12s) - K22 * K01s - K11 * K02s) + c1[0] * c2[1] * c0[2]; + float p = one_sixth * (K00 * K00 + K11 * K11 + K22 * K22 + 2 * (K01s + K02s + K12s)); + + float p_sqrt = Mathf.Sqrt(p); + + float tmp = p * p * p - q * q; + float phi = one_third * Mathf.Atan2(Mathf.Sqrt(Mathf.Max(0, tmp)), q); + float phi_c = Mathf.Cos(phi); + float phi_s = Mathf.Sin(phi); + float sqrt_p_c_phi = p_sqrt * phi_c; + float sqrt_p_3_s_phi = p_sqrt * three_sqrt * phi_s; + + float e0 = m + 2 * sqrt_p_c_phi; + float e1 = m - sqrt_p_c_phi - sqrt_p_3_s_phi; + float e2 = m - sqrt_p_c_phi + sqrt_p_3_s_phi; + + float aux; + if (e0 > e1) + { + aux = e0; + e0 = e1; + e1 = aux; + } + if (e0 > e2) + { + aux = e0; + e0 = e2; + e2 = aux; + } + if (e1 > e2) + { + aux = e1; + e1 = e2; + e2 = aux; + } + + return new Vector3(e2, e1, e0); } - public unsafe static float PackFloatRGBA(Vector4 enc) + public static Vector3 GetPointCloudCentroid(List points) { - uint rgba = ((uint)(enc.x * 255f) << 24) + - ((uint)(enc.y * 255f) << 16) + - ((uint)(enc.z * 255f) << 8) + - (uint)(enc.w * 255f); - return *(float*)&rgba; + Vector3 centroid = Vector3.zero; + for (int i = 0; i < points.Count; ++i) + centroid += points[i]; + return centroid / points.Count; } - public unsafe static Vector2 UnpackFloatRG(float v) + public static void GetPointCloudAnisotropy(List points, float max_anisotropy, float radius, in Vector3 hint_normal, ref Vector3 centroid, ref Quaternion orientation, ref Vector3 principal_radii) { - uint rgba = *(uint*)&v; - float r = ((rgba & 0xffff0000) >> 16) / 65535f; - float g = (rgba & 0x0000ffff) / 65535f; - return new Vector2(r, g); - } + int count = points.Count; if (count < 2 || radius <= 0 || max_anisotropy <= 0) { principal_radii = Vector3.one * radius; orientation = Quaternion.identity; return; } centroid = GetPointCloudCentroid(points); + + // three columns of a 3x3 anisotropy matrix: + Vector4 c0 = Vector4.zero, + c1 = Vector4.zero, + c2 = Vector4.zero; Matrix4x4 anisotropy = Matrix4x4.zero; + + // multiply offset by offset transposed, and add to matrix: + for (int i = 0; i < count; i++) { Vector4 offset = points[i] - centroid; c0 += offset * offset[0]; c1 += offset * offset[1]; c2 += offset * offset[2]; } + + // calculate maximum absolute value: + float max0 = Mathf.Max(Mathf.Max(Mathf.Abs(c0.x), Mathf.Abs(c0.y)), Mathf.Abs(c0.z)); float max1 = Mathf.Max(Mathf.Max(Mathf.Abs(c1.x), Mathf.Abs(c1.y)), Mathf.Abs(c1.z)); float max2 = Mathf.Max(Mathf.Max(Mathf.Abs(c2.x), Mathf.Abs(c2.y)), Mathf.Abs(c2.z)); float max = Mathf.Max(Mathf.Max(max0, max1), max2); + + // normalize matrix: + if (max > epsilon) + { + c0 /= max; + c1 /= max; + c2 /= max; + } anisotropy.SetColumn(0, c0); + anisotropy.SetColumn(1, c1); + anisotropy.SetColumn(2, c2); + + Matrix4x4 orientMat; EigenSolve(anisotropy, out principal_radii, out orientMat); + + // flip orientation if it is not in the same side as the hint normal: + if (Vector3.Dot(orientMat.GetColumn(2), hint_normal) < 0) { orientMat.SetColumn(2, orientMat.GetColumn(2) * -1); orientMat.SetColumn(1, orientMat.GetColumn(1) * -1); } max = principal_radii[0]; principal_radii = Vector3.Max(principal_radii, Vector3.one * max / max_anisotropy) / max * radius; orientation = orientMat.rotation; + } + } +} - public unsafe static float PackFloatRG(Vector2 enc) - { - uint rgba = ((uint)(enc.x * 65535f) << 16) + - (uint)(enc.y * 65535f); - return *(float*)&rgba; - } } } \ No newline at end of file diff --git a/Assets/Obi/Scripts/Oni.cs b/Assets/Obi/Scripts/Oni.cs index b65575d0e..43c01674d 100644 --- a/Assets/Obi/Scripts/Oni.cs +++ b/Assets/Obi/Scripts/Oni.cs @@ -4,67 +4,33 @@ using System.Collections; using System.Runtime.InteropServices; using Obi; - -public static class Oni +/** + * Interface for the Oni particle physics library. + */ +public static class Oni { - public const int ConstraintTypeCount = 18; - public const int ColliderShapeTypeCount = 7; - public const int QueryTypeCount = 3; + + public const int ConstraintTypeCount = 17; public enum ConstraintType { Tether = 0, Volume = 1, Chain = 2, - Pinhole = 3, - Bending = 4, - Distance = 5, - ShapeMatching = 6, - BendTwist = 7, - StretchShear = 8, - Pin = 9, - ParticleCollision = 10, - Density = 11, - Collision = 12, - Skin = 13, - Aerodynamics = 14, - Stitch = 15, - ParticleFriction = 16, - Friction = 17, - }; - - [Flags] - public enum RenderingSystemType - { - None = 0, - PathSmoother = 1 << 0, - ExtrudedRope = 1 << 1, - ChainRope = 1 << 2, - LineRope = 1 << 3, - MeshRope = 1 << 4, - Cloth = 1 << 5, - SkinnedCloth = 1 << 6, - TearableCloth = 1 << 7, - Softbody = 1 << 8, - Fluid = 1 << 9, - Particles = 1 << 10, - InstancedParticles = 1 << 11, - FoamParticles = 1 << 12, - - AllSmoothedRopes = PathSmoother | ExtrudedRope | LineRope | MeshRope, - AllRopes = PathSmoother | ExtrudedRope | ChainRope | LineRope | MeshRope | Particles | InstancedParticles, - AllClothes = Cloth | SkinnedCloth | TearableCloth | Particles | InstancedParticles, - AllParticles = Fluid | Particles | InstancedParticles | FoamParticles - }; - - [Flags] - public enum SimplexType - { - None = 0, - Point = 1 << 0, - Edge = 1 << 1, - Triangle = 1 << 2, - All = ~0 + Bending = 3, + Distance = 4, + ShapeMatching = 5, + BendTwist = 6, + StretchShear = 7, + Pin = 8, + ParticleCollision = 9, + Density = 10, + Collision = 11, + Skin = 12, + Aerodynamics = 13, + Stitch = 14, + ParticleFriction = 15, + Friction = 16 }; public enum ShapeType @@ -86,8 +52,31 @@ public static class Oni Maximum = 3 } + public enum ProfileMask : uint + { + ThreadIdMask = 0xffff0000, + TypeMask = 0x000000ff, + StackLevelMask = 0x0000ff00 + } + + public struct ProfileInfo + { + public double start; + public double end; + public uint info; + public int pad; + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 64)] + public string name; + } + + public struct GridCell + { + public Vector3 center; + public Vector3 size; + public int count; + } + [Serializable] - [StructLayout(LayoutKind.Sequential)] public struct SolverParameters { @@ -95,7 +84,6 @@ public static class Oni { None, Interpolate, - Extrapolate }; public enum Mode @@ -113,13 +101,6 @@ public static class Oni [Tooltip("Simulation gravity expressed in local space.")] public Vector3 gravity; - [Tooltip("Simulation wind expressed in local space.")] - public Vector3 ambientWind; - - [Tooltip("Foam gravity scale.")] - [Range(-1, 3)] - public float foamGravityScale; - [Tooltip("Percentage of velocity lost per second, between 0% (0) and 100% (1).")] [Range(0, 1)] public float damping; @@ -131,25 +112,15 @@ public static class Oni [Tooltip("Mass-normalized kinetic energy threshold below which particle positions aren't updated.")] public float sleepThreshold; - [Tooltip("Maximum particle linear velocity.")] - public float maxVelocity; - - [Tooltip("Maximum particle angular velocity.")] - public float maxAngularVelocity; - [Tooltip("Maximum distance between elements (simplices/colliders) for a contact to be generated.")] public float collisionMargin; [Tooltip("Maximum depenetration velocity applied to particles that start a frame inside an object. Low values ensure no 'explosive' collision resolution. Should be > 0 unless looking for non-physical effects.")] public float maxDepenetration; - [Tooltip("Percentage of collider velocities used for continuous collision detection. Set to 0 for purely static collisions, set to 1 for pure continuous collisions.")] - [Range(0, 1)] - public float colliderCCD; - [Tooltip("Percentage of particle velocities used for continuous collision detection. Set to 0 for purely static collisions, set to 1 for pure continuous collisions.")] [Range(0, 1)] - public float particleCCD; + public float continuousCollisionDetection; [Tooltip("Percentage of shock propagation applied to particle-particle collisions. Useful for particle stacking.")] [Range(0, 1)] @@ -162,16 +133,12 @@ public static class Oni [Tooltip("Error threshold at which to stop convex optimization for surface collisions.")] public float surfaceCollisionTolerance; - [Tooltip("Scales user data diffusion speed between nearby particles, for each of the 4 user data channels.")] - public Vector4 diffusionMask; public SolverParameters(Interpolation interpolation, Vector4 gravity) { this.mode = Mode.Mode3D; this.gravity = gravity; - this.ambientWind = Vector3.zero; this.interpolation = interpolation; - foamGravityScale = 1; damping = 0; shockPropagation = 0; surfaceCollisionIterations = 8; @@ -179,12 +146,8 @@ public static class Oni maxAnisotropy = 3; maxDepenetration = 10; sleepThreshold = 0.0005f; - maxVelocity = 50.0f; - maxAngularVelocity = 20.0f; collisionMargin = 0.02f; - colliderCCD = 1; - particleCCD = 0; - diffusionMask = Vector4.one; + continuousCollisionDetection = 1; } } @@ -223,20 +186,15 @@ public static class Oni } - [StructLayout(LayoutKind.Sequential)] - public struct ContactPair - { - public int bodyA; /** simplex index*/ - public int bodyB; /** simplex or rigidbody index*/ - } - - [StructLayout(LayoutKind.Sequential)] + // In this particular case, size is forced to 144 bytes to ensure 16 byte memory alignment needed by Oni. + [StructLayout(LayoutKind.Sequential, Size = 144)] public struct Contact { public Vector4 pointA; public Vector4 pointB; /**< Speculative point of contact. */ public Vector4 normal; /**< Normal direction. */ public Vector4 tangent; /**< Tangent direction. */ + public Vector4 bitangent; /**< Bitangent direction. */ public float distance; /** distance between both colliding entities at the beginning of the timestep.*/ @@ -249,4 +207,447 @@ public static class Oni public int bodyA; /** simplex index*/ public int bodyB; /** simplex or rigidbody index*/ } + + public static GCHandle PinMemory(object data) + { + return GCHandle.Alloc(data, GCHandleType.Pinned); + } + + public static void UnpinMemory(GCHandle handle) + { + if (handle.IsAllocated) + handle.Free(); + } + +#if (UNITY_IOS && !UNITY_EDITOR) + const string LIBNAME = "__Internal"; +#elif ((UNITY_ANDROID || UNITY_STANDALONE_LINUX) && !UNITY_EDITOR) + const string LIBNAME = "Oni"; +#else + const string LIBNAME = "libOni"; +#endif + +// platform custom define (https://docs.unity3d.com/Manual/PlatformDependentCompilation.html) +#if (OBI_ONI_SUPPORTED) + + [DllImport(LIBNAME)] + public static extern void UpdateColliderGrid(float dt); + + [DllImport(LIBNAME)] + public static extern void SetColliders(IntPtr shapes, IntPtr bounds, IntPtr transforms, int count); + + [DllImport(LIBNAME)] + public static extern void SetRigidbodies(IntPtr rigidbodies); + + [DllImport(LIBNAME)] + public static extern void SetCollisionMaterials(IntPtr materials); + + [DllImport(LIBNAME)] + public static extern void SetTriangleMeshData(IntPtr headers, IntPtr nodes, IntPtr triangles, IntPtr vertices); + + [DllImport(LIBNAME)] + public static extern void SetEdgeMeshData(IntPtr headers, IntPtr nodes, IntPtr edges, IntPtr vertices); + + [DllImport(LIBNAME)] + public static extern void SetDistanceFieldData(IntPtr headers, IntPtr nodes); + + [DllImport(LIBNAME)] + public static extern void SetHeightFieldData(IntPtr headers, IntPtr samples); + + [DllImport(LIBNAME)] + public static extern IntPtr CreateSolver(int capacity); + + [DllImport(LIBNAME)] + public static extern void DestroySolver(IntPtr solver); + + [DllImport(LIBNAME)] + public static extern void SetCapacity(IntPtr solver, int capacity); + + [DllImport(LIBNAME)] + public static extern void InitializeFrame(IntPtr solver, ref Vector4 translation, ref Vector4 scale, ref Quaternion rotation); + + [DllImport(LIBNAME)] + public static extern void UpdateFrame(IntPtr solver, ref Vector4 translation, ref Vector4 scale, ref Quaternion rotation, float dt); + + [DllImport(LIBNAME)] + public static extern void ApplyFrame(IntPtr solver, float linearVelocityScale, float angularVelocityScale, float linearInertiaScale, float angularInertiaScale, float dt); + + [DllImport(LIBNAME)] + public static extern void RecalculateInertiaTensors(IntPtr solver); + + [DllImport(LIBNAME)] + public static extern void ResetForces(IntPtr solver); + + [DllImport(LIBNAME)] + public static extern void SetRigidbodyLinearDeltas(IntPtr solver, IntPtr linearDeltas); + + [DllImport(LIBNAME)] + public static extern void SetRigidbodyAngularDeltas(IntPtr solver, IntPtr angularDeltas); + + [DllImport(LIBNAME)] + public static extern void GetBounds(IntPtr solver, ref Vector3 min, ref Vector3 max); + + [DllImport(LIBNAME)] + public static extern int GetParticleGridSize(IntPtr solver); + + [DllImport(LIBNAME)] + public static extern void GetParticleGrid(IntPtr solver, GridCell[] cells); + + [DllImport(LIBNAME)] + public static extern int SpatialQuery(IntPtr solver, IntPtr shapes, IntPtr transforms, int count); + + [DllImport(LIBNAME)] + public static extern void GetQueryResults(IntPtr solver, IntPtr results, int num); + + [DllImport(LIBNAME)] + public static extern void SetSolverParameters(IntPtr solver, ref SolverParameters parameters); + + [DllImport(LIBNAME)] + public static extern void GetSolverParameters(IntPtr solver, ref SolverParameters parameters); + + [DllImport(LIBNAME)] + public static extern int SetActiveParticles(IntPtr solver, int[] active, int num); + + [DllImport(LIBNAME)] + public static extern IntPtr CollisionDetection(IntPtr solver, float delta_time); + + [DllImport(LIBNAME)] + public static extern IntPtr Step(IntPtr solver, float step_time, float substep_time, int substeps); + + [DllImport(LIBNAME)] + public static extern void ApplyPositionInterpolation(IntPtr solver, IntPtr draw_positions, IntPtr draw_orientations, float delta_seconds, float unsimulated_time); + + [DllImport(LIBNAME)] + public static extern void UpdateSkeletalAnimation(IntPtr solver); + + [DllImport(LIBNAME)] + public static extern int GetConstraintCount(IntPtr solver, int type); + + [DllImport(LIBNAME)] + public static extern void SetRenderableParticlePositions(IntPtr solver, IntPtr positions); + + [DllImport(LIBNAME)] + public static extern void SetParticlePhases(IntPtr solver, IntPtr phases); + + [DllImport(LIBNAME)] + public static extern void SetParticleFilters(IntPtr solver, IntPtr filters); + + [DllImport(LIBNAME)] + public static extern void SetParticleCollisionMaterials(IntPtr solver, IntPtr materialIndices); + + [DllImport(LIBNAME)] + public static extern void SetParticlePositions(IntPtr solver, IntPtr positions); + + [DllImport(LIBNAME)] + public static extern void SetParticlePreviousPositions(IntPtr solver, IntPtr prevPositions); + + [DllImport(LIBNAME)] + public static extern void SetParticleOrientations(IntPtr solver, IntPtr orientations); + + [DllImport(LIBNAME)] + public static extern void SetParticlePreviousOrientations(IntPtr solver, IntPtr prevOrientations); + + [DllImport(LIBNAME)] + public static extern void SetRenderableParticleOrientations(IntPtr solver, IntPtr orientations); + + [DllImport(LIBNAME)] + public static extern void SetParticleInverseMasses(IntPtr solver, IntPtr invMasses); + + [DllImport(LIBNAME)] + public static extern void SetParticleInverseRotationalMasses(IntPtr solver, IntPtr invRotMasses); + + [DllImport(LIBNAME)] + public static extern void SetParticlePrincipalRadii(IntPtr solver, IntPtr principalRadii); + + [DllImport(LIBNAME)] + public static extern void SetParticleVelocities(IntPtr solver, IntPtr velocities); + + [DllImport(LIBNAME)] + public static extern void SetParticleAngularVelocities(IntPtr solver, IntPtr angularVelocities); + + [DllImport(LIBNAME)] + public static extern void SetParticleExternalForces(IntPtr solver, IntPtr forces); + + [DllImport(LIBNAME)] + public static extern void SetParticleExternalTorques(IntPtr solver, IntPtr torques); + + [DllImport(LIBNAME)] + public static extern void SetParticleWinds(IntPtr solver, IntPtr winds); + + [DllImport(LIBNAME)] + public static extern void SetParticlePositionDeltas(IntPtr solver, IntPtr deltas); + + [DllImport(LIBNAME)] + public static extern void SetParticleOrientationDeltas(IntPtr solver, IntPtr deltas); + + [DllImport(LIBNAME)] + public static extern void SetParticlePositionConstraintCounts(IntPtr solver, IntPtr counts); + + [DllImport(LIBNAME)] + public static extern void SetParticleOrientationConstraintCounts(IntPtr solver, IntPtr counts); + + [DllImport(LIBNAME)] + public static extern void SetParticleNormals(IntPtr solver, IntPtr normals); + + [DllImport(LIBNAME)] + public static extern void SetParticleInverseInertiaTensors(IntPtr solver, IntPtr tensors); + + + [DllImport(LIBNAME)] + public static extern void SetParticleSmoothingRadii(IntPtr solver, IntPtr radii); + + [DllImport(LIBNAME)] + public static extern void SetParticleBuoyancy(IntPtr solver, IntPtr buoyancy); + + [DllImport(LIBNAME)] + public static extern void SetParticleRestDensities(IntPtr solver, IntPtr rest_densities); + + [DllImport(LIBNAME)] + public static extern void SetParticleViscosities(IntPtr solver, IntPtr viscosities); + + [DllImport(LIBNAME)] + public static extern void SetParticleSurfaceTension(IntPtr solver, IntPtr surface_tension); + + [DllImport(LIBNAME)] + public static extern void SetParticleVorticityConfinement(IntPtr solver, IntPtr vort_confinement); + + [DllImport(LIBNAME)] + public static extern void SetParticleAtmosphericDragPressure(IntPtr solver, IntPtr atmospheric_drag, IntPtr atmospheric_pressure); + + [DllImport(LIBNAME)] + public static extern void SetParticleDiffusion(IntPtr solver, IntPtr diffusion); + + + + [DllImport(LIBNAME)] + public static extern void SetParticleVorticities(IntPtr solver, IntPtr vorticities); + + [DllImport(LIBNAME)] + public static extern void SetParticleFluidData(IntPtr solver, IntPtr fluidData); + + [DllImport(LIBNAME)] + public static extern void SetParticleUserData(IntPtr solver, IntPtr userData); + + [DllImport(LIBNAME)] + public static extern void SetParticleAnisotropies(IntPtr solver, IntPtr anisotropies); + + [DllImport(LIBNAME)] + public static extern void SetSimplices(IntPtr solver, int[] indices, int pointCount, int edgeCount, int triangleCount); + + [DllImport(LIBNAME)] + public static extern int GetDeformableTriangleCount(IntPtr solver); + + [DllImport(LIBNAME)] + public static extern void SetDeformableTriangles(IntPtr solver, int[] indices, int num, int destOffset); + + [DllImport(LIBNAME)] + public static extern int RemoveDeformableTriangles(IntPtr solver, int num, int sourceOffset); + + [DllImport(LIBNAME)] + public static extern void SetConstraintGroupParameters(IntPtr solver, int type, ref ConstraintParameters parameters); + + [DllImport(LIBNAME)] + public static extern void GetConstraintGroupParameters(IntPtr solver, int type, ref ConstraintParameters parameters); + + [DllImport(LIBNAME)] + public static extern void SetRestPositions(IntPtr solver, IntPtr restPositions); + + [DllImport(LIBNAME)] + public static extern void SetRestOrientations(IntPtr solver, IntPtr restOrientations); + + [DllImport(LIBNAME)] + public static extern IntPtr CreateBatch(int type); + + [DllImport(LIBNAME)] + public static extern void DestroyBatch(IntPtr batch); + + [DllImport(LIBNAME)] + public static extern IntPtr AddBatch(IntPtr solver, IntPtr batch); + + [DllImport(LIBNAME)] + public static extern void RemoveBatch(IntPtr solver, IntPtr batch); + + [DllImport(LIBNAME)] + public static extern bool EnableBatch(IntPtr batch, [MarshalAs(UnmanagedType.I1)]bool enabled); + + [DllImport(LIBNAME)] + public static extern int GetBatchConstraintForces(IntPtr batch, float[] forces, int num, int destOffset); + + + + [DllImport(LIBNAME)] + public static extern void SetBatchConstraintCount(IntPtr batch, int num); + + [DllImport(LIBNAME)] + public static extern int GetBatchConstraintCount(IntPtr batch); + + [DllImport(LIBNAME)] + public static extern void SetDistanceConstraints(IntPtr batch, IntPtr indices, + IntPtr restLengths, + IntPtr stiffnesses, + IntPtr lambdas, + int num); + + [DllImport(LIBNAME)] + public static extern void SetBendingConstraints(IntPtr batch, IntPtr indices, + IntPtr restBends, + IntPtr bendingStiffnesses, + IntPtr plasticity, + IntPtr lambdas, + int num); + + [DllImport(LIBNAME)] + public static extern void SetSkinConstraints(IntPtr batch, + IntPtr indices, + IntPtr points, + IntPtr normals, + IntPtr radiiBackstops, + IntPtr stiffnesses, + IntPtr lambdas, + int num); + + [DllImport(LIBNAME)] + public static extern void SetAerodynamicConstraints(IntPtr batch, + IntPtr particleIndices, + IntPtr aerodynamicCoeffs, + int num); + + [DllImport(LIBNAME)] + public static extern void SetVolumeConstraints(IntPtr batch, + IntPtr triangleIndices, + IntPtr firstTriangle, + IntPtr numTriangles, + IntPtr restVolumes, + IntPtr pressureStiffnesses, + IntPtr lambdas, + int num); + + [DllImport(LIBNAME)] + public static extern void SetShapeMatchingConstraints(IntPtr batch, + IntPtr shapeIndices, + IntPtr firstIndex, + IntPtr numIndices, + IntPtr explicitGroup, + IntPtr materialParameters, + IntPtr restComs, + IntPtr coms, + IntPtr orientations, + IntPtr linearTransforms, + IntPtr plasticDeformations, + int num); + + [DllImport(LIBNAME)] + public static extern void CalculateRestShapeMatching(IntPtr solver, IntPtr batch); + + + [DllImport(LIBNAME)] + public static extern void SetStretchShearConstraints(IntPtr batch, + IntPtr particleIndices, + IntPtr orientationIndices, + IntPtr restLengths, + IntPtr restOrientations, + IntPtr stiffnesses, + IntPtr lambdas, + int num); + + [DllImport(LIBNAME)] + public static extern void SetBendTwistConstraints(IntPtr batch, + IntPtr orientationIndices, + IntPtr restDarboux, + IntPtr stiffnesses, + IntPtr plasticity, + IntPtr lambdas, + int num); + + [DllImport(LIBNAME)] + public static extern void SetTetherConstraints(IntPtr batch, + IntPtr indices, + IntPtr maxLenghtsScales, + IntPtr stiffnesses, + IntPtr lambdas, + int num); + + [DllImport(LIBNAME)] + public static extern void SetPinConstraints(IntPtr batch, + IntPtr indices, + IntPtr pinOffsets, + IntPtr restDarboux, + IntPtr colliders, + IntPtr stiffnesses, + IntPtr lambdas, + int num); + + [DllImport(LIBNAME)] + public static extern void SetStitchConstraints(IntPtr batch, + IntPtr indices, + IntPtr stiffnesses, + IntPtr lambdas, + int num); + + [DllImport(LIBNAME)] + public static extern void SetChainConstraints(IntPtr batch, + IntPtr indices, + IntPtr lengths, + IntPtr firstIndex, + IntPtr numIndex, + int num); + + [DllImport(LIBNAME)] + public static extern void GetCollisionContacts(IntPtr solver, Contact[] contacts, int n); + + [DllImport(LIBNAME)] + public static extern void GetParticleCollisionContacts(IntPtr solver, Contact[] contacts, int n); + + [DllImport(LIBNAME)] + public static extern int InterpolateDiffuseParticles(IntPtr solver, IntPtr properties, IntPtr diffusePositions, IntPtr diffuseProperties, IntPtr neighbourCount, int n); + + [DllImport(LIBNAME)] + public static extern int MakePhase(int group, ObiUtils.ParticleFlags flags); + + [DllImport(LIBNAME)] + public static extern int GetGroupFromPhase(int phase); + + [DllImport(LIBNAME)] + public static extern int GetFlagsFromPhase(int phase); + + [DllImport(LIBNAME)] + public static extern float BendingConstraintRest(float[] constraintCoordinates); + + [DllImport(LIBNAME)] + public static extern void CompleteAll(); + + [DllImport(LIBNAME)] + public static extern void Complete(IntPtr task); + + [DllImport(LIBNAME)] + public static extern IntPtr CreateEmpty(); + + [DllImport(LIBNAME)] + public static extern void Schedule(IntPtr task); + + [DllImport(LIBNAME)] + public static extern void AddChild(IntPtr task, IntPtr child); + + [DllImport(LIBNAME)] + public static extern int GetMaxSystemConcurrency(); + + [DllImport(LIBNAME)] + public static extern void ClearProfiler(); + + [DllImport(LIBNAME)] + public static extern void EnableProfiler([MarshalAs(UnmanagedType.I1)]bool cooked); + + [DllImport(LIBNAME)] + public static extern void BeginSample(string name, byte type); + + [DllImport(LIBNAME)] + public static extern void EndSample(); + + [DllImport(LIBNAME)] + public static extern int GetProfilingInfoCount(); + + [DllImport(LIBNAME)] + public static extern void GetProfilingInfo([Out] ProfileInfo[] info, int num); + +#endif } diff --git a/Assets/Obi/Scripts/RopeAndRod/Actors/ObiBone.cs b/Assets/Obi/Scripts/RopeAndRod/Actors/ObiBone.cs index 83d722604..1f87271a1 100644 --- a/Assets/Obi/Scripts/RopeAndRod/Actors/ObiBone.cs +++ b/Assets/Obi/Scripts/RopeAndRod/Actors/ObiBone.cs @@ -7,8 +7,7 @@ namespace Obi [AddComponentMenu("Physics/Obi/Obi Bone", 882)] [ExecuteInEditMode] [DisallowMultipleComponent] - [DefaultExecutionOrder(100)] // make sure ObiBone's LateUpdate is updated after ObiSolver's. - public class ObiBone : ObiActor, IStretchShearConstraintsUser, IBendTwistConstraintsUser, ISkinConstraintsUser, IAerodynamicConstraintsUser + public class ObiBone : ObiActor, IStretchShearConstraintsUser, IBendTwistConstraintsUser, ISkinConstraintsUser { [Serializable] public class BonePropertyCurve @@ -32,7 +31,7 @@ namespace Obi [Serializable] public class IgnoredBone { - public Transform bone; + public Transform bone; public bool ignoreChildren; } @@ -40,9 +39,9 @@ namespace Obi [SerializeField] protected bool m_SelfCollisions = false; - [SerializeField] protected BonePropertyCurve _radius = new BonePropertyCurve(0.1f, 1); - [SerializeField] protected BonePropertyCurve _mass = new BonePropertyCurve(0.1f, 1); - [SerializeField] protected BonePropertyCurve _rotationalMass = new BonePropertyCurve(0.1f, 1); + [SerializeField] protected BonePropertyCurve _radius = new BonePropertyCurve(0.1f,1); + [SerializeField] protected BonePropertyCurve _mass = new BonePropertyCurve(0.1f,1); + [SerializeField] protected BonePropertyCurve _rotationalMass = new BonePropertyCurve(0.1f,1); // skin constraints: [SerializeField] protected bool _skinConstraintsEnabled = true; @@ -63,11 +62,6 @@ namespace Obi [SerializeField] protected BonePropertyCurve _plasticYield = new BonePropertyCurve(0, 1); [SerializeField] protected BonePropertyCurve _plasticCreep = new BonePropertyCurve(0, 1); - // aerodynamics - [SerializeField] protected bool _aerodynamicsEnabled = true; - [SerializeField] protected BonePropertyCurve _drag = new BonePropertyCurve(0.05f, 1); - [SerializeField] protected BonePropertyCurve _lift = new BonePropertyCurve(0.02f, 1); - [Tooltip("Filter used for collision detection.")] [SerializeField] private int filter = ObiUtils.MakeFilter(ObiUtils.CollideWithEverything, 1); @@ -242,34 +236,7 @@ namespace Obi public BonePropertyCurve plasticCreep { get { return _plasticCreep; } - set { _plasticCreep = value; SetConstraintsDirty(Oni.ConstraintType.BendTwist); } - } - - /// - /// Whether this actor's aerodynamic constraints are enabled. - /// - public bool aerodynamicsEnabled - { - get { return _aerodynamicsEnabled; } - set { if (value != _aerodynamicsEnabled) { _aerodynamicsEnabled = value; SetConstraintsDirty(Oni.ConstraintType.Aerodynamics); } } - } - - /// - /// Aerodynamic drag value. - /// - public BonePropertyCurve drag - { - get { return _drag; } - set { _drag = value; SetConstraintsDirty(Oni.ConstraintType.Aerodynamics); } - } - - /// - /// Aerodynamic lift value. - /// - public BonePropertyCurve lift - { - get { return _lift; } - set { _lift = value; SetConstraintsDirty(Oni.ConstraintType.Aerodynamics); } + set { _plasticCreep = value; SetConstraintsDirty(Oni.ConstraintType.BendTwist); } } @@ -295,7 +262,6 @@ namespace Obi protected override void Awake() { - // TODO: guard against having another ObiBone above it in hierarchy. m_BoneBlueprint = ScriptableObject.CreateInstance(); UpdateBlueprint(); base.Awake(); @@ -331,45 +297,18 @@ namespace Obi } } - internal override void LoadBlueprint() + public override void LoadBlueprint(ObiSolver solver) { - base.LoadBlueprint(); - - // synchronously read required data from GPU: - solver.renderablePositions.Readback(false); - solver.renderableOrientations.Readback(false); - solver.orientations.Readback(false); - solver.angularVelocities.Readback(false); - + base.LoadBlueprint(solver); SetupRuntimeConstraints(); ResetToCurrentShape(); } - internal override void UnloadBlueprint() + public override void UnloadBlueprint(ObiSolver solver) { ResetParticles(); CopyParticleDataToTransforms(); - base.UnloadBlueprint(); - } - - public override void RequestReadback() - { - base.RequestReadback(); - - solver.orientations.Readback(); - solver.angularVelocities.Readback(); - solver.renderablePositions.Readback(); - solver.renderableOrientations.Readback(); - } - - public override void SimulationEnd(float simulatedTime, float substepTime) - { - base.SimulationEnd(simulatedTime, substepTime); - - solver.orientations.WaitForReadback(); - solver.angularVelocities.WaitForReadback(); - solver.renderablePositions.WaitForReadback(); - solver.renderableOrientations.WaitForReadback(); + base.UnloadBlueprint(solver); } private void SetupRuntimeConstraints() @@ -377,21 +316,10 @@ namespace Obi SetConstraintsDirty(Oni.ConstraintType.Skin); SetConstraintsDirty(Oni.ConstraintType.StretchShear); SetConstraintsDirty(Oni.ConstraintType.BendTwist); - SetConstraintsDirty(Oni.ConstraintType.Aerodynamics); SetSelfCollisions(selfCollisions); SetSimplicesDirty(); UpdateFilter(); - } - - public override void ProvideDeformableEdges(ObiNativeIntList deformableEdges) - { - var boneBprint = sharedBlueprint as ObiBoneBlueprint; - if (boneBprint != null && boneBprint.deformableEdges != null) - { - // Send deformable edge indices to the solver: - for (int i = 0; i < boneBprint.deformableEdges.Length; ++i) - deformableEdges.Add(solverIndices[boneBprint.deformableEdges[i]]); - } + UpdateCollisionMaterials(); } private void FixRoot() @@ -409,10 +337,10 @@ namespace Obi solver.angularVelocities[rootIndex] = Vector4.zero; // take particle rest position in actor space (which is always zero), converts to solver space: - solver.startPositions[rootIndex] = solver.endPositions[rootIndex] = solver.positions[rootIndex] = actor2Solver.MultiplyPoint3x4(Vector3.zero); + solver.renderablePositions[rootIndex] = solver.positions[rootIndex] = actor2Solver.MultiplyPoint3x4(Vector3.zero); // take particle rest orientation in actor space, and convert to solver space: - solver.startOrientations[rootIndex] = solver.endOrientations[rootIndex] = solver.orientations[rootIndex] = actor2SolverR * boneBlueprint.orientations[0]; + solver.renderableOrientations[rootIndex] = solver.orientations[rootIndex] = actor2SolverR * boneBlueprint.orientations[0]; } } @@ -430,8 +358,8 @@ namespace Obi { for (int i = 0; i < particleCount; ++i) { - var boneOverride = boneBlueprint.GetOverride(i, out float normalizedCoord); - var radii = Vector3.one * (boneOverride != null ? boneOverride.radius.Evaluate(normalizedCoord) : radius.Evaluate(normalizedCoord)); + var normalizedCoord = boneBlueprint.normalizedLengths[i]; + var radii = Vector3.one * radius.Evaluate(normalizedCoord); boneBlueprint.principalRadii[i] = radii; if (isLoaded) @@ -443,9 +371,9 @@ namespace Obi { for (int i = 0; i < particleCount; ++i) { - var boneOverride = boneBlueprint.GetOverride(i, out float normalizedCoord); - var invMass = ObiUtils.MassToInvMass(boneOverride != null ? boneOverride .mass.Evaluate(normalizedCoord) : mass.Evaluate(normalizedCoord)); - var invRotMass = ObiUtils.MassToInvMass(boneOverride != null ? boneOverride.rotationalMass.Evaluate(normalizedCoord) : rotationalMass.Evaluate(normalizedCoord)); + var normalizedCoord = boneBlueprint.normalizedLengths[i]; + var invMass = ObiUtils.MassToInvMass(mass.Evaluate(normalizedCoord)); + var invRotMass = ObiUtils.MassToInvMass(rotationalMass.Evaluate(normalizedCoord)); boneBlueprint.invMasses[i] = invMass; boneBlueprint.invRotationalMasses[i] = invRotMass; @@ -460,24 +388,20 @@ namespace Obi public Vector3 GetSkinRadiiBackstop(ObiSkinConstraintsBatch batch, int constraintIndex) { - var boneOverride = boneBlueprint.GetOverride(batch.particleIndices[constraintIndex], out float normalizedCoord); - return new Vector3(boneOverride != null ? boneOverride.skinRadius.Evaluate(normalizedCoord) : skinRadius.Evaluate(normalizedCoord), 0, 0); + float normalizedCoord = boneBlueprint.normalizedLengths[batch.particleIndices[constraintIndex]]; + return new Vector3(skinRadius.Evaluate(normalizedCoord),0,0); } public float GetSkinCompliance(ObiSkinConstraintsBatch batch, int constraintIndex) { - var boneOverride = boneBlueprint.GetOverride(batch.particleIndices[constraintIndex], out float normalizedCoord); - return boneOverride != null ? boneOverride.skinCompliance.Evaluate(normalizedCoord) : skinCompliance.Evaluate(normalizedCoord); + float normalizedCoord = boneBlueprint.normalizedLengths[batch.particleIndices[constraintIndex]]; + return skinCompliance.Evaluate(normalizedCoord); } + public Vector3 GetBendTwistCompliance(ObiBendTwistConstraintsBatch batch, int constraintIndex) { - var boneOverride = boneBlueprint.GetOverride(batch.particleIndices[constraintIndex * 2], out float normalizedCoord); - - if (boneOverride != null) - return new Vector3(boneOverride.bend1Compliance.Evaluate(normalizedCoord), - boneOverride.bend2Compliance.Evaluate(normalizedCoord), - boneOverride.torsionCompliance.Evaluate(normalizedCoord)); + float normalizedCoord = boneBlueprint.normalizedLengths[batch.particleIndices[constraintIndex * 2]]; return new Vector3(bend1Compliance.Evaluate(normalizedCoord), bend2Compliance.Evaluate(normalizedCoord), torsionCompliance.Evaluate(normalizedCoord)); @@ -485,51 +409,22 @@ namespace Obi public Vector2 GetBendTwistPlasticity(ObiBendTwistConstraintsBatch batch, int constraintIndex) { - var boneOverride = boneBlueprint.GetOverride(batch.particleIndices[constraintIndex * 2], out float normalizedCoord); - - if (boneOverride != null) - return new Vector2(boneOverride.plasticYield.Evaluate(normalizedCoord), - boneOverride.plasticCreep.Evaluate(normalizedCoord)); + float normalizedCoord = boneBlueprint.normalizedLengths[batch.particleIndices[constraintIndex * 2]]; return new Vector2(plasticYield.Evaluate(normalizedCoord), plasticCreep.Evaluate(normalizedCoord)); - } public Vector3 GetStretchShearCompliance(ObiStretchShearConstraintsBatch batch, int constraintIndex) { - var boneOverride = boneBlueprint.GetOverride(batch.particleIndices[constraintIndex * 2], out float normalizedCoord); - - if (boneOverride != null) - return new Vector3(boneOverride.shear1Compliance.Evaluate(normalizedCoord), - boneOverride.shear2Compliance.Evaluate(normalizedCoord), - boneOverride.stretchCompliance.Evaluate(normalizedCoord)); + float normalizedCoord = boneBlueprint.normalizedLengths[batch.particleIndices[constraintIndex * 2]]; return new Vector3(shear1Compliance.Evaluate(normalizedCoord), shear2Compliance.Evaluate(normalizedCoord), stretchCompliance.Evaluate(normalizedCoord)); } - public float GetDrag(ObiAerodynamicConstraintsBatch batch, int constraintIndex) + public override void BeginStep(float stepTime) { - var boneOverride = boneBlueprint.GetOverride(batch.particleIndices[constraintIndex], out float normalizedCoord); - return boneOverride != null ? boneOverride.drag.Evaluate(normalizedCoord) : drag.Evaluate(normalizedCoord); - } - - public float GetLift(ObiAerodynamicConstraintsBatch batch, int constraintIndex) - { - var boneOverride = boneBlueprint.GetOverride(batch.particleIndices[constraintIndex], out float normalizedCoord); - return boneOverride != null ? boneOverride.lift.Evaluate(normalizedCoord) : lift.Evaluate(normalizedCoord); - } - - public void FixedUpdate() - { - // This resets all bones not affected by animation, - // needs to happen once per frame at the very start before Animators are updated. - ResetReferenceOrientations(); - } - - public override void SimulationStart(float timeToSimulate, float substepTime) - { - base.SimulationStart(timeToSimulate, substepTime); + base.BeginStep(stepTime); if (fixRoot) FixRoot(); @@ -537,10 +432,18 @@ namespace Obi UpdateRestShape(); } - public void LateUpdate() + public override void PrepareFrame() + { + ResetReferenceOrientations(); + base.PrepareFrame(); + } + + public override void Interpolate() { if (Application.isPlaying && isActiveAndEnabled) CopyParticleDataToTransforms(); + + base.Interpolate(); } /// @@ -560,49 +463,11 @@ namespace Obi solver.velocities[solverIndex] = Vector4.zero; solver.angularVelocities[solverIndex] = Vector4.zero; - solver.startPositions[solverIndex] = solver.endPositions[solverIndex] = solver.positions[solverIndex] = world2Solver.MultiplyPoint3x4(trfm.position); + solver.renderablePositions[solverIndex] = solver.positions[solverIndex] = world2Solver.MultiplyPoint3x4(trfm.position); var boneDeltaAWS = trfm.rotation * Quaternion.Inverse(boneBlueprint.restOrientations[i]); - solver.startOrientations[solverIndex] = solver.endOrientations[solverIndex] = solver.orientations[solverIndex] = world2Solver.rotation * boneDeltaAWS * boneBlueprint.root2WorldR * boneBlueprint.orientations[i]; + solver.renderableOrientations[solverIndex] = solver.orientations[solverIndex] = world2Solver.rotation * boneDeltaAWS * boneBlueprint.root2WorldR * boneBlueprint.orientations[i]; } - - // Update constraint data in the blueprint, since StartSimulation won't be called until next frame. - var bc = GetConstraintsByType(Oni.ConstraintType.BendTwist) as ObiConstraints; - - if (bc != null) - for (int j = 0; j < bc.batchCount; ++j) - { - var batch = bc.GetBatch(j) as ObiBendTwistConstraintsBatch; - - for (int i = 0; i < batch.activeConstraintCount; i++) - { - int indexA = batch.particleIndices[i * 2]; - int indexB = batch.particleIndices[i * 2 + 1]; - - // calculate bone rotation delta in world space: - var boneDeltaAWS = boneBlueprint.transforms[indexA].rotation * Quaternion.Inverse(boneBlueprint.restOrientations[indexA]); - var boneDeltaBWS = boneBlueprint.transforms[indexB].rotation * Quaternion.Inverse(boneBlueprint.restOrientations[indexB]); - - // apply delta to rest particle orientation: - var orientationA = boneDeltaAWS * boneBlueprint.root2WorldR * boneBlueprint.orientations[indexA]; - var orientationB = boneDeltaBWS * boneBlueprint.root2WorldR * boneBlueprint.orientations[indexB]; - - batch.restDarbouxVectors[i] = ObiUtils.RestDarboux(orientationA, orientationB); - } - } - - var sc = GetConstraintsByType(Oni.ConstraintType.Skin) as ObiConstraints; - - if (sc != null) - for (int j = 0; j < sc.batchCount; ++j) - { - var batch = sc.GetBatch(j) as ObiSkinConstraintsBatch; - for (int i = 0; i < batch.activeConstraintCount; i++) - { - int index = batch.particleIndices[i]; - batch.skinPoints[i] = solver.transform.worldToLocalMatrix.MultiplyPoint3x4(boneBlueprint.transforms[index].position); - } - } } private void ResetReferenceOrientations() @@ -619,20 +484,14 @@ namespace Obi var sbc = solver.GetConstraintsByType(Oni.ConstraintType.BendTwist) as ObiConstraints; if (bendTwistConstraintsEnabled && bc != null && sbc != null) - { - // iterate up to the amount of entries in solverBatchOffsets, insteaf of bc.batchCount. This ensures - // the batches we access have been added to the solver, as solver.UpdateConstraints() could have not been called yet on a newly added actor. - for (int j = 0; j < solverBatchOffsets[(int)Oni.ConstraintType.BendTwist].Count; ++j) + for (int j = 0; j < bc.GetBatchCount(); ++j) { var batch = bc.GetBatch(j) as ObiBendTwistConstraintsBatch; var solverBatch = sbc.batches[j] as ObiBendTwistConstraintsBatch; - int offset = solverBatchOffsets[(int)Oni.ConstraintType.BendTwist][j]; + int offset = solverBatchOffsets[(int)solverBatch.constraintType][j]; if (solverBatch.restDarbouxVectors.isCreated) { - if (solverBatch.restDarbouxVectors.computeBuffer == null) - solverBatch.restDarbouxVectors.SafeAsComputeBuffer(); - for (int i = 0; i < batch.activeConstraintCount; i++) { int indexA = batch.particleIndices[i * 2]; @@ -648,45 +507,34 @@ namespace Obi solverBatch.restDarbouxVectors[offset + i] = ObiUtils.RestDarboux(orientationA, orientationB); } - - solverBatch.restDarbouxVectors.Upload(); } } - } var sc = GetConstraintsByType(Oni.ConstraintType.Skin) as ObiConstraints; var ssc = solver.GetConstraintsByType(Oni.ConstraintType.Skin) as ObiConstraints; if (skinConstraintsEnabled && sc != null && ssc != null) - { - // iterate up to the amount of entries in solverBatchOffsets, insteaf of sc.batchCount. This ensures - // the batches we access have been added to the solver, as solver.UpdateConstraints() could have not been called yet on a newly added actor. - for (int j = 0; j < solverBatchOffsets[(int)Oni.ConstraintType.Skin].Count; ++j) + for (int j = 0; j < sc.GetBatchCount(); ++j) { var batch = sc.GetBatch(j) as ObiSkinConstraintsBatch; var solverBatch = ssc.batches[j] as ObiSkinConstraintsBatch; - int offset = solverBatchOffsets[(int)Oni.ConstraintType.Skin][j]; + int offset = solverBatchOffsets[(int)solverBatch.constraintType][j]; if (solverBatch.skinPoints.isCreated) { - if (solverBatch.skinPoints.computeBuffer == null) - solverBatch.skinPoints.SafeAsComputeBuffer(); - for (int i = 0; i < batch.activeConstraintCount; i++) { int index = batch.particleIndices[i]; solverBatch.skinPoints[offset + i] = solver.transform.worldToLocalMatrix.MultiplyPoint3x4(boneBlueprint.transforms[index].position); } - - solverBatch.skinPoints.Upload(); } } - } } private void CopyParticleDataToTransforms() { - if (isLoaded && boneBlueprint != null) + + if (boneBlueprint != null) { // copy current particle transforms to bones: for (int i = 1; i < particleCount; ++i) diff --git a/Assets/Obi/Scripts/RopeAndRod/Actors/ObiBoneOverride.cs b/Assets/Obi/Scripts/RopeAndRod/Actors/ObiBoneOverride.cs deleted file mode 100644 index f4a20adcd..000000000 --- a/Assets/Obi/Scripts/RopeAndRod/Actors/ObiBoneOverride.cs +++ /dev/null @@ -1,192 +0,0 @@ -using UnityEngine; -using System; -using System.Collections.Generic; - -namespace Obi -{ - [AddComponentMenu("Physics/Obi/Obi Bone Override", 882)] - [ExecuteInEditMode] - [DisallowMultipleComponent] - public class ObiBoneOverride : MonoBehaviour - { - [SerializeField] protected ObiBone.BonePropertyCurve _radius = new ObiBone.BonePropertyCurve(0.1f, 1); - [SerializeField] protected ObiBone.BonePropertyCurve _mass = new ObiBone.BonePropertyCurve(0.1f, 1); - [SerializeField] protected ObiBone.BonePropertyCurve _rotationalMass = new ObiBone.BonePropertyCurve(0.1f, 1); - - // skin constraints: - [SerializeField] protected ObiBone.BonePropertyCurve _skinCompliance = new ObiBone.BonePropertyCurve(0.01f, 1); - [SerializeField] protected ObiBone.BonePropertyCurve _skinRadius = new ObiBone.BonePropertyCurve(0.1f, 1); - - // distance constraints: - [SerializeField] protected ObiBone.BonePropertyCurve _stretchCompliance = new ObiBone.BonePropertyCurve(0, 1); - [SerializeField] protected ObiBone.BonePropertyCurve _shear1Compliance = new ObiBone.BonePropertyCurve(0, 1); - [SerializeField] protected ObiBone.BonePropertyCurve _shear2Compliance = new ObiBone.BonePropertyCurve(0, 1); - - // bend constraints: - [SerializeField] protected ObiBone.BonePropertyCurve _torsionCompliance = new ObiBone.BonePropertyCurve(0, 1); - [SerializeField] protected ObiBone.BonePropertyCurve _bend1Compliance = new ObiBone.BonePropertyCurve(0, 1); - [SerializeField] protected ObiBone.BonePropertyCurve _bend2Compliance = new ObiBone.BonePropertyCurve(0, 1); - [SerializeField] protected ObiBone.BonePropertyCurve _plasticYield = new ObiBone.BonePropertyCurve(0, 1); - [SerializeField] protected ObiBone.BonePropertyCurve _plasticCreep = new ObiBone.BonePropertyCurve(0, 1); - - // aerodynamics - [SerializeField] protected ObiBone.BonePropertyCurve _drag = new ObiBone.BonePropertyCurve(0.05f, 1); - [SerializeField] protected ObiBone.BonePropertyCurve _lift = new ObiBone.BonePropertyCurve(0.02f, 1); - - /// - /// Particle radius distribution over this bone hierarchy length. - /// - public ObiBone.BonePropertyCurve radius - { - get { return _radius; } - set { _radius = value; bone.UpdateRadius(); } - } - - /// - /// Mass distribution over this bone hierarchy length. - /// - public ObiBone.BonePropertyCurve mass - { - get { return _mass; } - set { _mass = value; bone.UpdateMasses(); } - } - - /// - /// Rotational mass distribution over this bone hierarchy length. - /// - public ObiBone.BonePropertyCurve rotationalMass - { - get { return _rotationalMass; } - set { _rotationalMass = value; bone.UpdateMasses(); } - } - - /// - /// Compliance of this actor's skin constraints. - /// - public ObiBone.BonePropertyCurve skinCompliance - { - get { return _skinCompliance; } - set { _skinCompliance = value; bone.SetConstraintsDirty(Oni.ConstraintType.Skin); } - } - - /// - /// Compliance of this actor's skin radius - /// - public ObiBone.BonePropertyCurve skinRadius - { - get { return _skinRadius; } - set { _skinRadius = value; bone.SetConstraintsDirty(Oni.ConstraintType.Skin); } - } - - /// - /// Compliance of this actor's stretch/shear constraints, along their length. - /// - public ObiBone.BonePropertyCurve stretchCompliance - { - get { return _stretchCompliance; } - set { _stretchCompliance = value; bone.SetConstraintsDirty(Oni.ConstraintType.StretchShear); } - } - - /// - /// Shearing compliance of this actor's stretch/shear constraints, along the first axis orthogonal to their length. - /// - public ObiBone.BonePropertyCurve shear1Compliance - { - get { return _shear1Compliance; } - set { _shear1Compliance = value; bone.SetConstraintsDirty(Oni.ConstraintType.StretchShear); } - } - - /// - /// Shearing compliance of this actor's stretch/shear constraints, along the second axis orthogonal to their length. - /// - public ObiBone.BonePropertyCurve shear2Compliance - { - get { return _shear2Compliance; } - set { _shear2Compliance = value; bone.SetConstraintsDirty(Oni.ConstraintType.StretchShear); } - } - - /// - /// Torsional compliance of this actor's bend/twist constraints along their length. - /// - public ObiBone.BonePropertyCurve torsionCompliance - { - get { return _torsionCompliance; } - set { _torsionCompliance = value; bone.SetConstraintsDirty(Oni.ConstraintType.BendTwist); } - } - - /// - /// Bending compliance of this actor's bend/twist constraints along the first axis orthogonal to their length. - /// - public ObiBone.BonePropertyCurve bend1Compliance - { - get { return _bend1Compliance; } - set { _bend1Compliance = value; bone.SetConstraintsDirty(Oni.ConstraintType.BendTwist); } - } - - /// - /// Bending compliance of this actor's bend/twist constraints along the second axis orthogonal to their length. - /// - public ObiBone.BonePropertyCurve bend2Compliance - { - get { return _bend2Compliance; } - set { _bend2Compliance = value; bone.SetConstraintsDirty(Oni.ConstraintType.BendTwist); } - } - - /// - /// Threshold for plastic behavior. - /// - /// Once bending goes above this value, a percentage of the deformation (determined by ) will be permanently absorbed into the rod's rest shape. - public ObiBone.BonePropertyCurve plasticYield - { - get { return _plasticYield; } - set { _plasticYield = value; bone.SetConstraintsDirty(Oni.ConstraintType.BendTwist); } - } - - /// - /// Percentage of deformation that gets absorbed into the rest shape per second, once deformation goes above the threshold. - /// - public ObiBone.BonePropertyCurve plasticCreep - { - get { return _plasticCreep; } - set { _plasticCreep = value; bone.SetConstraintsDirty(Oni.ConstraintType.BendTwist); } - } - - /// - /// Aerodynamic drag value. - /// - public ObiBone.BonePropertyCurve drag - { - get { return _drag; } - set { _drag = value; bone.SetConstraintsDirty(Oni.ConstraintType.Aerodynamics); } - } - - /// - /// Aerodynamic lift value. - /// - public ObiBone.BonePropertyCurve lift - { - get { return _lift; } - set { _lift = value; bone.SetConstraintsDirty(Oni.ConstraintType.Aerodynamics); } - } - - private ObiBone bone; - - public void Awake() - { - bone = GetComponentInParent(); - } - - protected void OnValidate() - { - if (bone != null) - { - bone.UpdateRadius(); - bone.UpdateMasses(); - bone.SetConstraintsDirty(Oni.ConstraintType.Skin); - bone.SetConstraintsDirty(Oni.ConstraintType.StretchShear); - bone.SetConstraintsDirty(Oni.ConstraintType.BendTwist); - bone.SetConstraintsDirty(Oni.ConstraintType.Aerodynamics); - } - } - } -} diff --git a/Assets/Obi/Scripts/RopeAndRod/Actors/ObiRod.cs b/Assets/Obi/Scripts/RopeAndRod/Actors/ObiRod.cs index 5521ac86c..fec820e8c 100644 --- a/Assets/Obi/Scripts/RopeAndRod/Actors/ObiRod.cs +++ b/Assets/Obi/Scripts/RopeAndRod/Actors/ObiRod.cs @@ -183,35 +183,22 @@ namespace Obi SetupRuntimeConstraints(); } - internal override void LoadBlueprint() + public override void LoadBlueprint(ObiSolver solver) { - base.LoadBlueprint(); + base.LoadBlueprint(solver); RebuildElementsFromConstraints(); SetupRuntimeConstraints(); } - public override void RequestReadback() - { - base.RequestReadback(); - solver.orientations.Readback(); - } - - public override void SimulationEnd(float simulatedTime, float substepTime) - { - base.SimulationEnd(simulatedTime, substepTime); - solver.orientations.WaitForReadback(); - } - private void SetupRuntimeConstraints() { SetConstraintsDirty(Oni.ConstraintType.StretchShear); - SetConstraintsDirty(Oni.ConstraintType.BendTwist); + //SetConstraintsDirty(Oni.ConstraintType.BendTwist); SetConstraintsDirty(Oni.ConstraintType.Chain); - SetConstraintsDirty(Oni.ConstraintType.Aerodynamics); SetSelfCollisions(selfCollisions); - SetMassScale(m_MassScale); RecalculateRestLength(); SetSimplicesDirty(); + UpdateCollisionMaterials(); } public Vector3 GetBendTwistCompliance(ObiBendTwistConstraintsBatch batch, int constraintIndex) @@ -232,7 +219,7 @@ namespace Obi protected override void RebuildElementsFromConstraintsInternal() { var dc = GetConstraintsByType(Oni.ConstraintType.StretchShear) as ObiConstraints; - if (dc == null || dc.batchCount < 2) + if (dc == null || dc.GetBatchCount() < 2) return; int constraintCount = dc.batches[0].activeConstraintCount + dc.batches[1].activeConstraintCount; diff --git a/Assets/Obi/Scripts/RopeAndRod/Actors/ObiRope.cs b/Assets/Obi/Scripts/RopeAndRod/Actors/ObiRope.cs index 60d42359a..50be7dc5a 100644 --- a/Assets/Obi/Scripts/RopeAndRod/Actors/ObiRope.cs +++ b/Assets/Obi/Scripts/RopeAndRod/Actors/ObiRope.cs @@ -178,20 +178,20 @@ namespace Obi SetupRuntimeConstraints(); } - internal override void LoadBlueprint() + public override void LoadBlueprint(ObiSolver solver) { // create a copy of the blueprint for this cloth: if (Application.isPlaying) m_RopeBlueprintInstance = this.blueprint as ObiRopeBlueprint; - base.LoadBlueprint(); + base.LoadBlueprint(solver); RebuildElementsFromConstraints(); SetupRuntimeConstraints(); } - internal override void UnloadBlueprint() + public override void UnloadBlueprint(ObiSolver solver) { - base.UnloadBlueprint(); + base.UnloadBlueprint(solver); // delete the blueprint instance: if (m_RopeBlueprintInstance != null) @@ -202,25 +202,26 @@ namespace Obi { SetConstraintsDirty(Oni.ConstraintType.Distance); SetConstraintsDirty(Oni.ConstraintType.Bending); - SetConstraintsDirty(Oni.ConstraintType.Aerodynamics); SetSelfCollisions(selfCollisions); - SetMassScale(m_MassScale); RecalculateRestLength(); SetSimplicesDirty(); + UpdateCollisionMaterials(); } - // Tearing must be done at the end of each step instead of substep, to give a chance to solver constraints to be rebuilt. - public override void SimulationStart(float timeToSimulate, float substepTime) + public override void Substep(float substepTime) { - base.SimulationStart(timeToSimulate, substepTime); + base.Substep(substepTime); - if (isActiveAndEnabled && tearingEnabled) + if (isActiveAndEnabled) ApplyTearing(substepTime); } protected void ApplyTearing(float substepTime) { + if (!tearingEnabled) + return; + float sqrTime = substepTime * substepTime; tornElements.Clear(); @@ -229,28 +230,24 @@ namespace Obi var sc = this.solver.GetConstraintsByType(Oni.ConstraintType.Distance) as ObiConstraints; if (dc != null && sc != null) + for (int j = 0; j < dc.GetBatchCount(); ++j) { - // iterate up to the amount of entries in solverBatchOffsets, insteaf of dc.batchCount. This ensures - // the batches we access have been added to the solver, as solver.UpdateConstraints() could have not been called yet on a newly added actor. - for (int j = 0; j < solverBatchOffsets[(int)Oni.ConstraintType.Distance].Count; ++j) + var batch = dc.GetBatch(j) as ObiDistanceConstraintsBatch; + var solverBatch = sc.batches[j] as ObiDistanceConstraintsBatch; + + for (int i = 0; i < batch.activeConstraintCount; i++) { - var batch = dc.GetBatch(j) as ObiDistanceConstraintsBatch; - var solverBatch = sc.batches[j] as ObiDistanceConstraintsBatch; + int elementIndex = j + 2 * i; - for (int i = 0; i < batch.activeConstraintCount; i++) + // divide lambda by squared delta time to get force in newtons: + int offset = solverBatchOffsets[(int)Oni.ConstraintType.Distance][j]; + float force = solverBatch.lambdas[offset + i] / sqrTime; + + elements[elementIndex].constraintForce = force; + + if (-force > tearResistanceMultiplier) { - int elementIndex = j + 2 * i; - - // divide lambda by squared delta time to get force in newtons: - int offset = solverBatchOffsets[(int)Oni.ConstraintType.Distance][j]; - float force = solverBatch.lambdas[offset + i] / sqrTime; - - elements[elementIndex].constraintForce = force; - - if (-force > tearResistanceMultiplier) - { - tornElements.Add(elements[elementIndex]); - } + tornElements.Add(elements[elementIndex]); } } } @@ -285,8 +282,7 @@ namespace Obi m_Solver.invMasses[splitIndex] *= 2; CopyParticle(solver.particleToActor[splitIndex].indexInActor, activeParticleCount); - ActivateParticle(); - SetRenderingDirty(Oni.RenderingSystemType.AllRopes); + ActivateParticle(activeParticleCount); return solverIndices[activeParticleCount - 1]; } @@ -313,7 +309,8 @@ namespace Obi element.particle1 = SplitParticle(element.particle1); - OnRopeTorn?.Invoke(this, new ObiRopeTornEventArgs(element, element.particle1)); + if (OnRopeTorn != null) + OnRopeTorn(this, new ObiRopeTornEventArgs(element, element.particle1)); return true; } @@ -321,7 +318,7 @@ namespace Obi protected override void RebuildElementsFromConstraintsInternal() { var dc = GetConstraintsByType(Oni.ConstraintType.Distance) as ObiConstraints; - if (dc == null || dc.batchCount < 2) + if (dc == null || dc.GetBatchCount() < 2) return; int constraintCount = dc.batches[0].activeConstraintCount + dc.batches[1].activeConstraintCount; @@ -359,26 +356,13 @@ namespace Obi // regenerate constraints from elements: var dc = GetConstraintsByType(Oni.ConstraintType.Distance) as ObiConstraints; var bc = GetConstraintsByType(Oni.ConstraintType.Bending) as ObiConstraints; - var ac = GetConstraintsByType(Oni.ConstraintType.Aerodynamics) as ObiConstraints; dc.DeactivateAllConstraints(); bc.DeactivateAllConstraints(); - ac.DeactivateAllConstraints(); - - for (int i = 0; i < activeParticleCount; ++i) - { - // aerodynamic constraints: - var ab = ac.batches[0] as ObiAerodynamicConstraintsBatch; - int constraint = ab.activeConstraintCount; - ab.particleIndices[constraint] = i; - ab.aerodynamicCoeffs[constraint * 3] = 2 * solver.principalRadii[solverIndices[i]].x; - ab.ActivateConstraint(constraint); - } int elementsCount = elements.Count - (ropeBlueprint.path.Closed ? 1 : 0); for (int i = 0; i < elementsCount; ++i) { - // distance constraints var db = dc.batches[i % 2] as ObiDistanceConstraintsBatch; int constraint = db.activeConstraintCount; @@ -388,7 +372,6 @@ namespace Obi db.stiffnesses[constraint] = new Vector2(_stretchCompliance, _maxCompression * db.restLengths[constraint]); db.ActivateConstraint(constraint); - // bend constraints if (i < elementsCount - 1) { var bb = bc.batches[i % 3] as ObiBendConstraintsBatch; @@ -401,7 +384,7 @@ namespace Obi int indexA = elements[i].particle1; int indexB = elements[i + 1].particle2; int indexC = elements[i].particle2; - float restBend = 0;//ObiUtils.RestBendingConstraint(solver.restPositions[indexA], solver.restPositions[indexB], solver.restPositions[indexC]); + float restBend = ObiUtils.RestBendingConstraint(solver.restPositions[indexA], solver.restPositions[indexB], solver.restPositions[indexC]); bb.particleIndices[constraint * 3] = solver.particleToActor[indexA].indexInActor; bb.particleIndices[constraint * 3 + 1] = solver.particleToActor[indexB].indexInActor; @@ -447,21 +430,16 @@ namespace Obi loopClosingBatch.ActivateConstraint(0); } - // edge simplices and deformable edges - var rb = sharedBlueprint as ObiRopeBlueprint; - rb.edges = new int[elements.Count * 2]; - rb.deformableEdges = new int[elements.Count * 2]; + // edge simplices: + sharedBlueprint.edges = new int[elements.Count*2]; for (int i = 0; i < elements.Count; ++i) { - rb.deformableEdges[i * 2] = rb.edges[i * 2] = solver.particleToActor[elements[i].particle1].indexInActor; - rb.deformableEdges[i * 2 + 1] = rb.edges[i * 2 + 1] = solver.particleToActor[elements[i].particle2].indexInActor; + sharedBlueprint.edges[i * 2] = solver.particleToActor[elements[i].particle1].indexInActor; + sharedBlueprint.edges[i * 2 + 1] = solver.particleToActor[elements[i].particle2].indexInActor; } SetConstraintsDirty(Oni.ConstraintType.Distance); SetConstraintsDirty(Oni.ConstraintType.Bending); - SetConstraintsDirty(Oni.ConstraintType.Aerodynamics); - - solver.dirtyDeformableEdges = true; SetSimplicesDirty(); } } diff --git a/Assets/Obi/Scripts/RopeAndRod/Actors/ObiRopeBase.cs b/Assets/Obi/Scripts/RopeAndRod/Actors/ObiRopeBase.cs index 0b2080748..1fae42696 100644 --- a/Assets/Obi/Scripts/RopeAndRod/Actors/ObiRopeBase.cs +++ b/Assets/Obi/Scripts/RopeAndRod/Actors/ObiRopeBase.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; namespace Obi { - public abstract class ObiRopeBase : ObiActor, IAerodynamicConstraintsUser + public abstract class ObiRopeBase : ObiActor { [SerializeField] protected bool m_SelfCollisions = false; @@ -12,44 +12,11 @@ namespace Obi [HideInInspector] public List elements = new List(); /**< Elements.*/ public event ActorCallback OnElementsGenerated; - // aerodynamics - [SerializeField] protected bool _aerodynamicsEnabled = true; - [SerializeField] protected float _drag = 0.05f; - [SerializeField] protected float _lift = 0.02f; - - /// - /// Whether this actor's aerodynamic constraints are enabled. - /// - public bool aerodynamicsEnabled - { - get { return _aerodynamicsEnabled; } - set { if (value != _aerodynamicsEnabled) { _aerodynamicsEnabled = value; SetConstraintsDirty(Oni.ConstraintType.Aerodynamics); } } - } - - /// - /// Aerodynamic drag value. - /// - public float drag - { - get { return _drag; } - set { _drag = value; SetConstraintsDirty(Oni.ConstraintType.Aerodynamics); } - } - - /// - /// Aerodynamic lift value. - /// - public float lift - { - get { return _lift; } - set { _lift = value; SetConstraintsDirty(Oni.ConstraintType.Aerodynamics); } - } - public float restLength { get { return restLength_; } } - public ObiPath path { get { @@ -58,37 +25,6 @@ namespace Obi } } - public float GetDrag(ObiAerodynamicConstraintsBatch batch, int constraintIndex) - { - return drag; - } - - public float GetLift(ObiAerodynamicConstraintsBatch batch, int constraintIndex) - { - return lift; - } - - public override void ProvideDeformableEdges(ObiNativeIntList deformableEdges) - { - deformableEdgesOffset = deformableEdges.count / 2; - - var ropeBlueprint = sharedBlueprint as ObiRopeBlueprintBase; - if (ropeBlueprint != null && ropeBlueprint.deformableEdges != null) - { - // Send deformable edge indices to the solver: - for (int i = 0; i < ropeBlueprint.deformableEdges.Length; ++i) - deformableEdges.Add(solverIndices[ropeBlueprint.deformableEdges[i]]); - } - } - - public override int GetDeformableEdgeCount() - { - var ropeBlueprint = sharedBlueprint as ObiRopeBlueprintBase; - if (ropeBlueprint != null && ropeBlueprint.deformableEdges != null) - return ropeBlueprint.deformableEdges.Length / 2; - return 0; - } - /// /// Calculates and returns current rope length, including stretching/compression. /// @@ -169,25 +105,5 @@ namespace Obi return null; } - /// - /// Returns index of the edge that contains a length-normalized coordinate. It will also return the length-normalized coordinate within the edge. - /// - public int GetEdgeAt(float mu, out float elementMu) - { - elementMu = -1; - var ropeBlueprint = sharedBlueprint as ObiRopeBlueprintBase; - if (ropeBlueprint != null && ropeBlueprint.deformableEdges != null) - { - float edgeMu = ropeBlueprint.deformableEdges.Length/2 * Mathf.Clamp(mu, 0, 0.99999f); - - int index = (int)edgeMu; - elementMu = edgeMu - index; - - if (index < ropeBlueprint.deformableEdges.Length/2) - return index; - } - return -1; - } - } } \ No newline at end of file diff --git a/Assets/Obi/Scripts/RopeAndRod/Actors/ObiRopeCursor.cs b/Assets/Obi/Scripts/RopeAndRod/Actors/ObiRopeCursor.cs index bf2456a9a..f360aa2bb 100644 --- a/Assets/Obi/Scripts/RopeAndRod/Actors/ObiRopeCursor.cs +++ b/Assets/Obi/Scripts/RopeAndRod/Actors/ObiRopeCursor.cs @@ -20,7 +20,6 @@ namespace Obi ObiStructuralElement m_CursorElement = null; private int m_SourceIndex = -1; - private float lengthChange = 0; public float cursorMu { @@ -67,7 +66,6 @@ namespace Obi rope = GetComponent(); rope.OnElementsGenerated += Actor_OnElementsGenerated; - rope.OnSimulationStart += Rope_OnSimulate; if (rope.elements != null && rope.elements.Count > 0) Actor_OnElementsGenerated(rope); } @@ -75,7 +73,6 @@ namespace Obi private void OnDisable() { rope.OnElementsGenerated -= Actor_OnElementsGenerated; - rope.OnSimulationStart -= Rope_OnSimulate; } private void Actor_OnElementsGenerated(ObiActor actor) @@ -84,13 +81,64 @@ namespace Obi UpdateSource(); } - private void Rope_OnSimulate(ObiActor actor, float simulatedTime, float substepTime) + public void UpdateCursor() { - if (!rope.isLoaded || Mathf.Abs(lengthChange) < ObiUtils.epsilon) + rope = GetComponent(); + m_CursorElement = null; + if (rope.isLoaded) + { + float elmMu; + m_CursorElement = rope.GetElementAt(cursorMu, out elmMu); + } + } + + public void UpdateSource() + { + rope = GetComponent(); + m_SourceIndex = -1; + if (rope.isLoaded) + { + float elmMu; + var elm = rope.GetElementAt(sourceMu, out elmMu); + if (elm != null && rope.solver != null) + { + m_SourceIndex = elmMu < 0.5f ? elm.particle1 : elm.particle2; + } + } + } + + private int AddParticleAt(int index) + { + // Copy data from the particle where we will insert new particles, to the particles we will insert: + int targetIndex = rope.activeParticleCount; + rope.CopyParticle(rope.solver.particleToActor[m_SourceIndex].indexInActor, targetIndex); + + // Move the new particle to the one at the place where we will insert it: + rope.TeleportParticle(targetIndex, rope.solver.positions[rope.solverIndices[index]]); + + // Activate the particle: + rope.ActivateParticle(targetIndex); + return rope.solverIndices[targetIndex]; + } + + private void RemoveParticleAt(int index) + { + rope.DeactivateParticle(index); + } + + public void ChangeLength(float newLength) + { + if (!rope.isLoaded) return; var solver = rope.solver; + // clamp new length to sane limits: + newLength = Mathf.Clamp(newLength, 0, (rope.sourceBlueprint.particleCount - 1) * rope.ropeBlueprint.interParticleDistance); + + // calculate the change in rope length: + float lengthChange = newLength - rope.restLength; + // remove: if (lengthChange < 0) { @@ -100,10 +148,6 @@ namespace Obi { lengthChange -= m_CursorElement.restLength; - // if we subtracted the length of the last element, break out of the loop. - if (rope.elements.Count == 1) - break; - int index = rope.elements.IndexOf(m_CursorElement); if (index >= 0) @@ -121,8 +165,8 @@ namespace Obi m_CursorElement = rope.elements[index]; } - else - m_CursorElement = rope.elements[Mathf.Max(0, index - 1)]; + else + m_CursorElement = rope.elements[Mathf.Max(0,index - 1)]; } else // negative direction: { @@ -220,69 +264,6 @@ namespace Obi // rebuild constraints: rope.RebuildConstraintsFromElements(); - - lengthChange = 0; - } - - public void UpdateCursor() - { - rope = GetComponent(); - m_CursorElement = null; - if (rope.isLoaded) - { - float elmMu; - m_CursorElement = rope.GetElementAt(cursorMu, out elmMu); - } - } - - public void UpdateSource() - { - rope = GetComponent(); - m_SourceIndex = -1; - if (rope.isLoaded) - { - float elmMu; - var elm = rope.GetElementAt(sourceMu, out elmMu); - if (elm != null && rope.solver != null) - { - m_SourceIndex = elmMu < 0.5f ? elm.particle1 : elm.particle2; - } - } - } - - private int AddParticleAt(int index) - { - int targetIndex = rope.activeParticleCount; - - // Copy data from the particle where we will insert new particles, to the particles we will insert: - rope.CopyParticle(rope.solver.particleToActor[m_SourceIndex].indexInActor, targetIndex); - - // Move the new particle to the one at the place where we will insert it: - rope.TeleportParticle(targetIndex, rope.solver.positions[rope.solverIndices[index]]); - - // Activate the particle: - rope.ActivateParticle(); - rope.SetRenderingDirty(Oni.RenderingSystemType.AllRopes); - - return rope.solverIndices[targetIndex]; - } - - private void RemoveParticleAt(int index) - { - rope.DeactivateParticle(index); - rope.SetRenderingDirty(Oni.RenderingSystemType.AllRopes); - } - - public float ChangeLength(float lengthChange) - { - // clamp new length to sane limits: - //newLength = Mathf.Clamp(newLength, 0, (rope.sourceBlueprint.particleCount - 1) * rope.ropeBlueprint.interParticleDistance); - - // accumulate length change, we'll reset it to zero after it has been applied. - this.lengthChange += lengthChange; - - // return new length: - return this.lengthChange + rope.restLength; } } } \ No newline at end of file diff --git a/Assets/Obi/Scripts/RopeAndRod/Blueprints/ObiBoneBlueprint.cs b/Assets/Obi/Scripts/RopeAndRod/Blueprints/ObiBoneBlueprint.cs index f2f71727e..04a51e6d0 100644 --- a/Assets/Obi/Scripts/RopeAndRod/Blueprints/ObiBoneBlueprint.cs +++ b/Assets/Obi/Scripts/RopeAndRod/Blueprints/ObiBoneBlueprint.cs @@ -20,8 +20,6 @@ namespace Obi [HideInInspector] public List parentIndices = new List(); [HideInInspector] public List normalizedLengths = new List(); - [HideInInspector] public int[] deformableEdges = null; /**< Indices of deformable edges (2 per edge)*/ - [HideInInspector] [NonSerialized] public List ignored; [HideInInspector] [NonSerialized] public ObiBone.BonePropertyCurve mass; [HideInInspector] [NonSerialized] public ObiBone.BonePropertyCurve rotationalMass; @@ -40,24 +38,6 @@ namespace Obi return null; } - public ObiBoneOverride GetOverride(int particleIndex, out float normalizedLength) - { - int overrideIndex = particleIndex; - normalizedLength = normalizedLengths[overrideIndex]; - - while (overrideIndex >= 0) - { - if (transforms[overrideIndex].TryGetComponent(out ObiBoneOverride over)) - { - normalizedLength = 1 - (1 - normalizedLengths[particleIndex]) / Mathf.Max(ObiUtils.epsilon,1 - normalizedLengths[overrideIndex]); - return over; - } - - overrideIndex = parentIndices[overrideIndex]; - } - return null; - } - protected override IEnumerator Initialize() { ClearParticleGroups(); @@ -184,21 +164,12 @@ namespace Obi filters[i] = ObiUtils.MakeFilter(ObiUtils.CollideWithEverything, 0); colors[i] = Color.white; - var group = ScriptableObject.CreateInstance(); - group.SetSourceBlueprint(this); - group.name = transforms[i].name; - group.particleIndices.Add(i); - groups.Add(group); - if (i % 100 == 0) yield return new CoroutineJob.ProgressInfo("ObiRod: generating particles...", i / (float)m_ActiveParticleCount); } colorizer = new GraphColoring(m_ActiveParticleCount); - // Deformable edges: - CreateDeformableEdges(); - // Create edge simplices: CreateSimplices(); @@ -214,23 +185,9 @@ namespace Obi IEnumerator sc = CreateSkinConstraints(particlePositions); while (sc.MoveNext()) yield return sc.Current; - // Create aerodynamic constraints: - IEnumerator ac = CreateAerodynamicConstraints(); - while (ac.MoveNext()) yield return ac.Current; - yield return new CoroutineJob.ProgressInfo("ObiBone: complete", 1); } - protected void CreateDeformableEdges() - { - deformableEdges = new int[(parentIndices.Count - 1) * 2]; - for (int i = 0; i < parentIndices.Count - 1; ++i) - { - deformableEdges[i * 2] = i + 1; - deformableEdges[i * 2 + 1] = parentIndices[i + 1]; - } - } - protected void CreateSimplices() { edges = new int[(parentIndices.Count - 1) * 2]; @@ -241,29 +198,9 @@ namespace Obi } } - protected virtual IEnumerator CreateAerodynamicConstraints() - { - aerodynamicConstraintsData = new ObiAerodynamicConstraintsData(); - var aeroBatch = new ObiAerodynamicConstraintsBatch(); - aerodynamicConstraintsData.AddBatch(aeroBatch); - - for (int i = 0; i < m_ActiveParticleCount; i++) - { - aeroBatch.AddConstraint(i, 2 * principalRadii[i].x, 1, 1); - - if (i % 500 == 0) - yield return new CoroutineJob.ProgressInfo("ObiRope generating aerodynamic constraints...", i / (float)m_ActiveParticleCount); - } - - // Set initial amount of active constraints: - for (int i = 0; i < aerodynamicConstraintsData.batches.Count; ++i) - { - aerodynamicConstraintsData.batches[i].activeConstraintCount = m_ActiveParticleCount; - } - } - protected virtual IEnumerator CreateStretchShearConstraints(List particlePositions) { + colorizer.Clear(); for (int i = 1; i < particlePositions.Count; ++i) @@ -291,7 +228,7 @@ namespace Obi int cIndex = constraintIndices[i]; // Add a new batch if needed: - if (color >= stretchShearConstraintsData.batchCount) + if (color >= stretchShearConstraintsData.GetBatchCount()) stretchShearConstraintsData.AddBatch(new ObiStretchShearConstraintsBatch()); int index1 = particleIndices[cIndex]; @@ -337,7 +274,7 @@ namespace Obi int cIndex = constraintIndices[i]; // Add a new batch if needed: - if (color >= bendTwistConstraintsData.batchCount) + if (color >= bendTwistConstraintsData.GetBatchCount()) bendTwistConstraintsData.AddBatch(new ObiBendTwistConstraintsBatch()); int index1 = particleIndices[cIndex]; diff --git a/Assets/Obi/Scripts/RopeAndRod/Blueprints/ObiRodBlueprint.cs b/Assets/Obi/Scripts/RopeAndRod/Blueprints/ObiRodBlueprint.cs index e17ce9c15..0e41b1ef2 100644 --- a/Assets/Obi/Scripts/RopeAndRod/Blueprints/ObiRodBlueprint.cs +++ b/Assets/Obi/Scripts/RopeAndRod/Blueprints/ObiRodBlueprint.cs @@ -127,9 +127,6 @@ namespace Obi yield return new CoroutineJob.ProgressInfo("ObiRod: generating particles...", i / (float)m_ActiveParticleCount); } - // Deformable edges: - CreateDeformableEdges(numSegments); - // Create edge simplices: CreateSimplices(numSegments); @@ -145,12 +142,6 @@ namespace Obi while (bc.MoveNext()) yield return bc.Current; - // Create aerodynamic constraints: - IEnumerator ac = CreateAerodynamicConstraints(); - - while (ac.MoveNext()) - yield return ac.Current; - // Create chain constraints: IEnumerator cc = CreateChainConstraints(); @@ -159,6 +150,7 @@ namespace Obi } + protected virtual IEnumerator CreateStretchShearConstraints(List particleNormals) { stretchShearConstraintsData = new ObiStretchShearConstraintsData(); @@ -167,7 +159,8 @@ namespace Obi stretchShearConstraintsData.AddBatch(new ObiStretchShearConstraintsBatch()); // rotation minimizing frame: - ObiPathFrame frame = ObiPathFrame.Identity; + ObiPathFrame frame = new ObiPathFrame(); + frame.Reset(); for (int i = 0; i < totalParticles - 1; i++) { diff --git a/Assets/Obi/Scripts/RopeAndRod/Blueprints/ObiRopeBlueprint.cs b/Assets/Obi/Scripts/RopeAndRod/Blueprints/ObiRopeBlueprint.cs index ce89d4028..4448ae3f8 100644 --- a/Assets/Obi/Scripts/RopeAndRod/Blueprints/ObiRopeBlueprint.cs +++ b/Assets/Obi/Scripts/RopeAndRod/Blueprints/ObiRopeBlueprint.cs @@ -10,6 +10,7 @@ namespace Obi [CreateAssetMenu(fileName = "rope blueprint", menuName = "Obi/Rope Blueprint", order = 140)] public class ObiRopeBlueprint : ObiRopeBlueprintBase { + public int pooledParticles = 100; public const float DEFAULT_PARTICLE_MASS = 0.1f; @@ -112,9 +113,6 @@ namespace Obi yield return new CoroutineJob.ProgressInfo("ObiRope: generating particles...", i / (float)m_ActiveParticleCount); } - // Deformable edges: - CreateDeformableEdges(numSegments); - // Create edge simplices: CreateSimplices(numSegments); @@ -130,12 +128,6 @@ namespace Obi while (bc.MoveNext()) yield return bc.Current; - // Create aerodynamic constraints: - IEnumerator ac = CreateAerodynamicConstraints(); - - while (ac.MoveNext()) - yield return ac.Current; - // Recalculate rest length: m_RestLength = 0; foreach (float length in restLengths) @@ -201,7 +193,7 @@ namespace Obi var batch = bendConstraintsData.batches[i % 3] as ObiBendConstraintsBatch; Vector3Int indices = new Vector3Int(i, i + 2, i + 1); - float restBend = 0;//ObiUtils.RestBendingConstraint(restPositions[indices[0]], restPositions[indices[1]], restPositions[indices[2]]); + float restBend = ObiUtils.RestBendingConstraint(restPositions[indices[0]], restPositions[indices[1]], restPositions[indices[2]]); batch.AddConstraint(indices, restBend); if (i < m_ActiveParticleCount - 2) diff --git a/Assets/Obi/Scripts/RopeAndRod/Blueprints/ObiRopeBlueprintBase.cs b/Assets/Obi/Scripts/RopeAndRod/Blueprints/ObiRopeBlueprintBase.cs index 36f2ac9d9..189a09441 100644 --- a/Assets/Obi/Scripts/RopeAndRod/Blueprints/ObiRopeBlueprintBase.cs +++ b/Assets/Obi/Scripts/RopeAndRod/Blueprints/ObiRopeBlueprintBase.cs @@ -19,7 +19,6 @@ namespace Obi [HideInInspector] [SerializeField] protected int totalParticles; [HideInInspector] [SerializeField] protected float m_RestLength; - [HideInInspector] public int[] deformableEdges = null; /**< Indices of deformable edges (2 per edge)*/ [HideInInspector] public float[] restLengths; public float interParticleDistance @@ -63,44 +62,13 @@ namespace Obi RemoveParticleGroupAt(index); } - protected virtual IEnumerator CreateAerodynamicConstraints() - { - aerodynamicConstraintsData = new ObiAerodynamicConstraintsData(); - var aeroBatch = new ObiAerodynamicConstraintsBatch(); - aerodynamicConstraintsData.AddBatch(aeroBatch); - - for (int i = 0; i < totalParticles; i++) - { - aeroBatch.AddConstraint(i, 2 * principalRadii[i].x, 1, 1); - - if (i % 500 == 0) - yield return new CoroutineJob.ProgressInfo("ObiRope generating aerodynamic constraints...", i / (float)totalParticles); - } - - // Set initial amount of active constraints: - for (int i = 0; i < aerodynamicConstraintsData.batches.Count; ++i) - { - aerodynamicConstraintsData.batches[i].activeConstraintCount = m_ActiveParticleCount; - } - } - - protected void CreateDeformableEdges(int numSegments) - { - deformableEdges = new int[numSegments * 2]; - for (int i = 0; i < numSegments; ++i) - { - deformableEdges[i * 2] = i % activeParticleCount; - deformableEdges[i * 2 + 1] = (i + 1) % activeParticleCount; - } - } - protected void CreateSimplices(int numSegments) { edges = new int[numSegments * 2]; for (int i = 0; i < numSegments; ++i) { - edges[i * 2] = i % activeParticleCount; - edges[i * 2 + 1] = (i + 1) % activeParticleCount; + edges[i * 2] = i % totalParticles; + edges[i * 2 + 1] = (i + 1) % totalParticles; } } diff --git a/Assets/Obi/Scripts/RopeAndRod/DataStructures/ObiRopeSection.cs b/Assets/Obi/Scripts/RopeAndRod/DataStructures/ObiRopeSection.cs index be0c8eecb..c096d5554 100644 --- a/Assets/Obi/Scripts/RopeAndRod/DataStructures/ObiRopeSection.cs +++ b/Assets/Obi/Scripts/RopeAndRod/DataStructures/ObiRopeSection.cs @@ -1,4 +1,6 @@ -using System.Collections.Generic; +using System; +using System.Collections; +using System.Collections.Generic; using UnityEngine; namespace Obi diff --git a/Assets/Obi/Scripts/RopeAndRod/DataStructures/Path/DataChannels/ObiPointsDataChannel.cs b/Assets/Obi/Scripts/RopeAndRod/DataStructures/Path/DataChannels/ObiPointsDataChannel.cs index 1aba7db14..2f07a22bd 100644 --- a/Assets/Obi/Scripts/RopeAndRod/DataStructures/Path/DataChannels/ObiPointsDataChannel.cs +++ b/Assets/Obi/Scripts/RopeAndRod/DataStructures/Path/DataChannels/ObiPointsDataChannel.cs @@ -63,6 +63,7 @@ namespace Obi { throw new InvalidOperationException("Cannot get position in path because it has zero control points."); } + } /** diff --git a/Assets/Obi/Scripts/RopeAndRod/DataStructures/Path/ObiPathFrame.cs b/Assets/Obi/Scripts/RopeAndRod/DataStructures/Path/ObiPathFrame.cs index 38377d460..11f390881 100644 --- a/Assets/Obi/Scripts/RopeAndRod/DataStructures/Path/ObiPathFrame.cs +++ b/Assets/Obi/Scripts/RopeAndRod/DataStructures/Path/ObiPathFrame.cs @@ -12,9 +12,7 @@ namespace Obi Z = 2 } - public static ObiPathFrame Identity => new ObiPathFrame(Vector3.zero, Vector3.forward, Vector3.up, Vector3.right, Color.white, 0); - - public Vector3 position; + public Vector3 position; public Vector3 tangent; public Vector3 normal; @@ -30,7 +28,7 @@ namespace Obi this.binormal = binormal; this.color = color; this.thickness = thickness; - } + } public void Reset() { @@ -52,7 +50,7 @@ namespace Obi return new ObiPathFrame(c.position * f, c.tangent * f, c.normal * f, c.binormal * f,c.color * f, c.thickness * f); } - public static void WeightedSum(float w1, float w2, float w3, in ObiPathFrame c1, in ObiPathFrame c2, in ObiPathFrame c3, ref ObiPathFrame sum) + public static void WeightedSum(float w1, float w2, float w3, ref ObiPathFrame c1, ref ObiPathFrame c2, ref ObiPathFrame c3, ref ObiPathFrame sum) { sum.position.x = c1.position.x * w1 + c2.position.x * w2 + c3.position.x * w3; sum.position.y = c1.position.y * w1 + c2.position.y * w2 + c3.position.y * w3; diff --git a/Assets/Obi/Scripts/RopeAndRod/DataStructures/Path/ObiPathSmoother.cs b/Assets/Obi/Scripts/RopeAndRod/DataStructures/Path/ObiPathSmoother.cs index 1251981a6..4ddee1215 100644 --- a/Assets/Obi/Scripts/RopeAndRod/DataStructures/Path/ObiPathSmoother.cs +++ b/Assets/Obi/Scripts/RopeAndRod/DataStructures/Path/ObiPathSmoother.cs @@ -1,12 +1,21 @@ using UnityEngine; +using Unity.Profiling; using System; +using System.Collections; +using System.Collections.Generic; namespace Obi { [ExecuteInEditMode] [RequireComponent(typeof(ObiRopeBase))] - public class ObiPathSmoother : MonoBehaviour, ObiActorRenderer + public class ObiPathSmoother : MonoBehaviour { + static ProfilerMarker m_AllocateRawChunksPerfMarker = new ProfilerMarker("AllocateRawChunks"); + static ProfilerMarker m_GenerateSmoothChunksPerfMarker = new ProfilerMarker("GenerateSmoothChunks"); + + private Matrix4x4 w2l; + private Quaternion w2lRotation; + [Range(0, 1)] [Tooltip("Curvature threshold below which the path will be decimated. A value of 0 won't apply any decimation. As you increase the value, decimation will become more aggresive.")] public float decimation = 0; @@ -18,84 +27,353 @@ namespace Obi [Tooltip("Twist in degrees applied to each sucessive path section.")] public float twist = 0; - public ObiActor actor { get; private set; } + public event ObiActor.ActorCallback OnCurveGenerated; - [HideInInspector] public int indexInSystem = 0; + protected float smoothLength = 0; + protected int smoothSections = 0; + + [HideInInspector] public ObiList> rawChunks = new ObiList>(); + [HideInInspector] public ObiList> smoothChunks = new ObiList>(); + private Stack stack = new Stack(); + private BitArray decimateBitArray = new BitArray(0); public float SmoothLength { - get - { - if (actor.isLoaded) - { - var system = actor.solver.GetRenderSystem() as ObiPathSmootherRenderSystem; - - if (system != null) - return system.GetSmoothLength(indexInSystem); - } - return 0; - } + get { return smoothLength; } } public float SmoothSections { - get { - if (actor.isLoaded) - { - var system = actor.solver.GetRenderSystem() as ObiPathSmootherRenderSystem; - - if (system != null) - return system.GetSmoothFrameCount(indexInSystem); - } - return 0; - } + get { return smoothSections; } } - public void OnEnable() + private void OnEnable() { - actor = GetComponent(); - ((ObiActorRenderer)this).EnableRenderer(); + GetComponent().OnInterpolate += Actor_OnInterpolate; } private void OnDisable() { - ((ObiActorRenderer)this).DisableRenderer(); + GetComponent().OnInterpolate -= Actor_OnInterpolate; } - private void OnValidate() + void Actor_OnInterpolate(ObiActor actor) { - ((ObiActorRenderer)this).SetRendererDirty(Oni.RenderingSystemType.AllSmoothedRopes); + GenerateSmoothChunks(((ObiRopeBase)actor), smoothing); + + if (OnCurveGenerated != null) + OnCurveGenerated(actor); + } + + private void AllocateChunk(int sections) + { + if (sections > 1) + { + + if (rawChunks.Data[rawChunks.Count] == null) + { + rawChunks.Data[rawChunks.Count] = new ObiList(); + smoothChunks.Data[smoothChunks.Count] = new ObiList(); + } + + rawChunks.Data[rawChunks.Count].SetCount(sections); + + rawChunks.SetCount(rawChunks.Count + 1); + smoothChunks.SetCount(smoothChunks.Count + 1); + } + } + + private float CalculateChunkLength(ObiList chunk) + { + float length = 0; + for (int i = 1; i < chunk.Count; ++i) + length += Vector3.Distance(chunk[i].position, chunk[i - 1].position); + return length; + } + + /** + * Generates raw curve chunks from the rope description. + */ + private void AllocateRawChunks(ObiRopeBase actor) + { + using (m_AllocateRawChunksPerfMarker.Auto()) + { + rawChunks.Clear(); + + if (actor.path == null) + return; + + // Count particles for each chunk. + int particles = 0; + for (int i = 0; i < actor.elements.Count; ++i) + { + particles++; + // At discontinuities, start a new chunk. + if (i < actor.elements.Count - 1 && actor.elements[i].particle2 != actor.elements[i + 1].particle1) + { + AllocateChunk(++particles); + particles = 0; + } + } + AllocateChunk(++particles); + } + } + + private void PathFrameFromParticle(ObiRopeBase actor, ref ObiPathFrame frame, int particleIndex, bool interpolateOrientation = true) + { + // Update current frame values from particles: + frame.position = w2l.MultiplyPoint3x4(actor.GetParticlePosition(particleIndex)); + frame.thickness = actor.GetParticleMaxRadius(particleIndex); + frame.color = actor.GetParticleColor(particleIndex); + + // Use particle orientation if possible: + if (actor.usesOrientedParticles) + { + Quaternion current = actor.GetParticleOrientation(particleIndex); + Quaternion previous = actor.GetParticleOrientation(Mathf.Max(0, particleIndex - 1)); + Quaternion average = w2lRotation * (interpolateOrientation ? Quaternion.SlerpUnclamped(current, previous, 0.5f) : current); + frame.normal = average * Vector3.up; + frame.binormal = average * Vector3.right; + frame.tangent = average * Vector3.forward; + } + } + + /** + * Generates smooth curve chunks. + */ + public void GenerateSmoothChunks(ObiRopeBase actor, uint smoothingLevels) + { + using (m_GenerateSmoothChunksPerfMarker.Auto()) + { + smoothChunks.Clear(); + smoothSections = 0; + smoothLength = 0; + + if (!Application.isPlaying) + actor.RebuildElementsFromConstraints(); + + AllocateRawChunks(actor); + + w2l = actor.transform.worldToLocalMatrix; + w2lRotation = w2l.rotation; + + // keep track of the first element of each chunk + int chunkStart = 0; + + ObiPathFrame frame_0 = new ObiPathFrame(); // "next" frame + ObiPathFrame frame_1 = new ObiPathFrame(); // current frame + ObiPathFrame frame_2 = new ObiPathFrame(); // previous frame + + // generate curve for each rope chunk: + for (int i = 0; i < rawChunks.Count; ++i) + { + int elementCount = rawChunks[i].Count - 1; + + // Initialize frames: + frame_0.Reset(); + frame_1.Reset(); + frame_2.Reset(); + + PathFrameFromParticle(actor, ref frame_1, actor.elements[chunkStart].particle1, false); + + frame_2 = frame_1; + + for (int m = 1; m <= rawChunks[i].Count; ++m) + { + + int index; + if (m >= elementCount) + // second particle of last element in the chunk. + index = actor.elements[chunkStart + elementCount - 1].particle2; + else + //first particle of current element. + index = actor.elements[chunkStart + m].particle1; + + // generate curve frame from particle: + PathFrameFromParticle(actor, ref frame_0, index); + + if (actor.usesOrientedParticles) + { + // copy frame directly. + frame_2 = frame_1; + } + else + { + // perform parallel transport, using forward / backward average to calculate tangent. + frame_1.tangent = ((frame_1.position - frame_2.position) + (frame_0.position - frame_1.position)).normalized; + frame_2.Transport(frame_1, twist); + } + + // in case we wrapped around the rope, average first and last frames: + if (chunkStart + m > actor.activeParticleCount) + { + frame_2 = rawChunks[0][0] = 0.5f * frame_2 + 0.5f * rawChunks[0][0]; + } + + frame_1 = frame_0; + + rawChunks[i][m - 1] = frame_2; + } + + // increment chunkStart by the amount of elements in this chunk: + chunkStart += elementCount; + + // adaptive curvature-based decimation: + if (Decimate(rawChunks[i], smoothChunks[i], decimation)) + { + // if any decimation took place, swap raw and smooth chunks: + var aux = rawChunks[i]; + rawChunks[i] = smoothChunks[i]; + smoothChunks[i] = aux; + } + + // get smooth curve points: + Chaikin(rawChunks[i], smoothChunks[i], smoothingLevels); + + // count total curve sections and total curve length: + smoothSections += smoothChunks[i].Count; + smoothLength += CalculateChunkLength(smoothChunks[i]); + } + } } public ObiPathFrame GetSectionAt(float mu) { - if (actor.isLoaded) - { - var system = actor.solver.GetRenderSystem() as ObiPathSmootherRenderSystem; + float edgeMu = smoothSections * Mathf.Clamp(mu,0,0.9999f); + int index = (int)edgeMu; + float sectionMu = edgeMu - index; - if (system != null) - return system.GetFrameAt(indexInSystem, mu); + int counter = 0; + int chunkIndex = -1; + int indexInChunk = -1; + for (int i = 0; i < smoothChunks.Count; ++i) + { + if (counter + smoothChunks[i].Count > index) + { + chunkIndex = i; + indexInChunk = index - counter; + break; + } + counter += smoothChunks[i].Count; } - return ObiPathFrame.Identity; + ObiList chunk = smoothChunks[chunkIndex]; + ObiPathFrame s1 = chunk[indexInChunk]; + ObiPathFrame s2 = chunk[Mathf.Min(indexInChunk + 1, chunk.Count - 1)]; + + return (1 - sectionMu) * s1 + sectionMu * s2; } - RenderSystem ObiRenderer.CreateRenderSystem(ObiSolver solver) + /** + * Iterative version of the Ramer-Douglas-Peucker path decimation algorithm. + */ + private bool Decimate(ObiList input, ObiList output, float threshold) { - switch (solver.backendType) + // no decimation, no work to do, just return: + if (threshold < 0.00001f || input.Count < 3) + return false; + + float scaledThreshold = threshold * threshold * 0.01f; + + stack.Push(new Vector2Int(0, input.Count - 1)); + + decimateBitArray.Length = Mathf.Max(decimateBitArray.Length, input.Count); + decimateBitArray.SetAll(true); + + while (stack.Count > 0) { + var range = stack.Pop(); -#if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) - case ObiSolver.BackendType.Burst: return new BurstPathSmootherRenderSystem(solver); -#endif - case ObiSolver.BackendType.Compute: - default: + float dmax = 0; + int index = range.x; + float mu; - if (SystemInfo.supportsComputeShaders) - return new ComputePathSmootherRenderSystem(solver); - return null; + for (int i = index + 1; i < range.y; ++i) + { + if (decimateBitArray[i]) + { + float d = Vector3.SqrMagnitude(ObiUtils.ProjectPointLine(input[i].position, input[range.x].position, input[range.y].position, out mu) - input[i].position); + if (d > dmax) + { + index = i; + dmax = d; + } + } + } + + if (dmax > scaledThreshold) + { + stack.Push(new Vector2Int(range.x, index)); + stack.Push(new Vector2Int(index, range.y)); + } + else + { + for (int i = range.x + 1; i < range.y; ++i) + decimateBitArray[i] = false; + } } + + output.Clear(); + for (int i = 0; i < input.Count; ++i) + if (decimateBitArray[i]) + output.Add(input[i]); + + return true; } + + /** + * This method uses a variant of Chainkin's algorithm to produce a smooth curve from a set of control points. It is specially fast + * because it directly calculates subdivision level k, instead of recursively calculating levels 1..k. + */ + private void Chaikin(ObiList input, ObiList output, uint k) + { + // no subdivision levels, no work to do. just copy the input to the output: + if (k == 0 || input.Count < 3) + { + output.SetCount(input.Count); + for (int i = 0; i < input.Count; ++i) + output[i] = input[i]; + return; + } + + // calculate amount of new points generated by each inner control point: + int pCount = (int)Mathf.Pow(2, k); + + // precalculate some quantities: + int n0 = input.Count - 1; + float twoRaisedToMinusKPlus1 = Mathf.Pow(2, -(k + 1)); + float twoRaisedToMinusK = Mathf.Pow(2, -k); + float twoRaisedToMinus2K = Mathf.Pow(2, -2 * k); + float twoRaisedToMinus2KMinus1 = Mathf.Pow(2, -2 * k - 1); + + // allocate ouput: + output.SetCount((n0 - 1) * pCount + 2); + + // calculate initial curve points: + output[0] = (0.5f + twoRaisedToMinusKPlus1) * input[0] + (0.5f - twoRaisedToMinusKPlus1) * input[1]; + output[pCount * n0 - pCount + 1] = (0.5f - twoRaisedToMinusKPlus1) * input[n0 - 1] + (0.5f + twoRaisedToMinusKPlus1) * input[n0]; + + // calculate internal points: + for (int j = 1; j <= pCount; ++j) + { + // precalculate coefficients: + float F = 0.5f - twoRaisedToMinusKPlus1 - (j - 1) * (twoRaisedToMinusK - j * twoRaisedToMinus2KMinus1); + float G = 0.5f + twoRaisedToMinusKPlus1 + (j - 1) * (twoRaisedToMinusK - j * twoRaisedToMinus2K); + float H = (j - 1) * j * twoRaisedToMinus2KMinus1; + + for (int i = 1; i < n0; ++i) + ObiPathFrame.WeightedSum(F, G, H, + ref input.Data[i - 1], + ref input.Data[i], + ref input.Data[i + 1], + ref output.Data[(i - 1) * pCount + j]); + } + + // make first and last curve points coincide with original points: + output[0] = input[0]; + output[output.Count - 1] = input[input.Count - 1]; + } + } } \ No newline at end of file diff --git a/Assets/Obi/Scripts/RopeAndRod/DataStructures/Path/ObiPathSmoother.cs.meta b/Assets/Obi/Scripts/RopeAndRod/DataStructures/Path/ObiPathSmoother.cs.meta index bbfec3dfc..3bc0efb08 100644 --- a/Assets/Obi/Scripts/RopeAndRod/DataStructures/Path/ObiPathSmoother.cs.meta +++ b/Assets/Obi/Scripts/RopeAndRod/DataStructures/Path/ObiPathSmoother.cs.meta @@ -5,7 +5,7 @@ MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 - icon: {fileID: 2800000, guid: 8791eecf125744cbeadea65319c29d5a, type: 3} + icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: diff --git a/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiChainRopeRenderSystem.cs b/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiChainRopeRenderSystem.cs deleted file mode 100644 index eb6d1bf8e..000000000 --- a/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiChainRopeRenderSystem.cs +++ /dev/null @@ -1,216 +0,0 @@ - -using System.Runtime.InteropServices; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.Rendering; -using Unity.Profiling; - -namespace Obi -{ - - [StructLayout(LayoutKind.Sequential)] - public struct ChainRendererData - { - public int modifierOffset; - public float twistAnchor; - public float twist; - public uint usesOrientedParticles; - - public Vector4 scale; - - public ChainRendererData(int modifierOffset, float twistAnchor, float twist, Vector3 scale, bool usesOrientedParticles) - { - this.modifierOffset = modifierOffset; - this.twistAnchor = twistAnchor; - this.twist = twist; - this.usesOrientedParticles = (uint)(usesOrientedParticles ? 1 : 0); - this.scale = scale; - } - } - - public abstract class ObiChainRopeRenderSystem : RenderSystem - { - public Oni.RenderingSystemType typeEnum { get => Oni.RenderingSystemType.ChainRope; } - - public RendererSet renderers { get; } = new RendererSet(); - - // specify vertex count and layout - protected VertexAttributeDescriptor[] layout = - { - new VertexAttributeDescriptor(VertexAttribute.Position, VertexAttributeFormat.Float32, 3), - new VertexAttributeDescriptor(VertexAttribute.Normal, VertexAttributeFormat.Float32, 3), - new VertexAttributeDescriptor(VertexAttribute.Tangent, VertexAttributeFormat.Float32, 4), - new VertexAttributeDescriptor(VertexAttribute.Color, VertexAttributeFormat.Float32, 4), - new VertexAttributeDescriptor(VertexAttribute.TexCoord0, VertexAttributeFormat.Float32, 2), - }; - - static protected ProfilerMarker m_SetupRenderMarker = new ProfilerMarker("SetupChainRopeRendering"); - static protected ProfilerMarker m_RenderMarker = new ProfilerMarker("ChainRopeRendering"); - - protected ObiSolver m_Solver; - protected List batchList = new List(); - - protected ObiNativeList rendererData; - protected ObiNativeList chunkData; - protected ObiNativeList modifiers; - - protected ObiNativeList elements; - protected ObiNativeList instanceTransforms; - protected ObiNativeList invInstanceTransforms; - protected ObiNativeList instanceColors; - - public ObiChainRopeRenderSystem(ObiSolver solver) - { - m_Solver = solver; - } - - public virtual void Dispose() - { - CleanupBatches(); - DestroyLists(); - } - - private void DestroyLists() - { - if (instanceTransforms != null) - instanceTransforms.Dispose(); - if (invInstanceTransforms != null) - invInstanceTransforms.Dispose(); - if (instanceColors != null) - instanceColors.Dispose(); - - if (elements != null) - elements.Dispose(); - if (chunkData != null) - chunkData.Dispose(); - if (rendererData != null) - rendererData.Dispose(); - if (modifiers != null) - modifiers.Dispose(); - } - - private void CreateListsIfNecessary() - { - DestroyLists(); - - instanceTransforms = new ObiNativeList(); - invInstanceTransforms = new ObiNativeList(); - instanceColors = new ObiNativeList(); - elements = new ObiNativeList(); - chunkData = new ObiNativeList(); - rendererData = new ObiNativeList(); - modifiers = new ObiNativeList(); - } - - private void CleanupBatches() - { - for (int i = 0; i < batchList.Count; ++i) - batchList[i].Dispose(); - batchList.Clear(); - } - - private void GenerateBatches() - { - instanceTransforms.Clear(); - invInstanceTransforms.Clear(); - instanceColors.Clear(); - elements.Clear(); - rendererData.Clear(); - chunkData.Clear(); - modifiers.Clear(); - - // generate batches: - for (int i = 0; i < renderers.Count; ++i) - { - var renderer = renderers[i]; - if (renderer.linkMesh != null && renderer.linkMaterial != null) - { - renderer.renderParameters.layer = renderer.gameObject.layer; - batchList.Add(new InstancedRenderBatch(i, renderer.linkMesh, renderer.linkMaterial, renderer.renderParameters)); - } - - } - - // sort batches: - batchList.Sort(); - - // append elements: - for (int i = 0; i < batchList.Count; ++i) - { - var renderer = renderers[batchList[i].firstRenderer]; - var rope = renderer.actor as ObiRopeBase; - - modifiers.AddRange(renderer.linkModifiers); - - rendererData.Add(new ChainRendererData(modifiers.count, renderer.twistAnchor, renderer.linkTwist, renderer.linkScale, rope.usesOrientedParticles)); - - batchList[i].firstInstance = elements.count; - batchList[i].instanceCount = rope.elements.Count; - - // iterate trough elements, finding discontinuities as we go: - for (int e = 0; e < rope.elements.Count; ++e) - { - elements.Add(new Vector2Int(rope.elements[e].particle1, rope.elements[e].particle2)); - - // At discontinuities, start a new chunk. - if (e < rope.elements.Count - 1 && rope.elements[e].particle2 != rope.elements[e + 1].particle1) - { - chunkData.Add(new ChunkData(rendererData.count - 1, elements.count)); - } - } - chunkData.Add(new ChunkData(rendererData.count - 1, elements.count)); - } - - instanceTransforms.ResizeUninitialized(elements.count); - invInstanceTransforms.ResizeUninitialized(elements.count); - instanceColors.ResizeUninitialized(elements.count); - } - - protected virtual void CloseBatches() - { - // Initialize each batch: - for (int i = 0; i < batchList.Count; ++i) - batchList[i].Initialize(); - } - - public virtual void Setup() - { - using (m_SetupRenderMarker.Auto()) - { - CreateListsIfNecessary(); - - CleanupBatches(); - - GenerateBatches(); - - ObiUtils.MergeBatches(batchList); - - CloseBatches(); - } - } - - public abstract void Render(); - - public void Step() - { - } - - public void BakeMesh(ObiRopeChainRenderer renderer, ref Mesh mesh, bool transformToActorLocalSpace = false) - { - int index = renderers.IndexOf(renderer); - - for (int i = 0; i < batchList.Count; ++i) - { - var batch = batchList[i]; - if (index >= batch.firstRenderer && index < batch.firstRenderer + batch.rendererCount) - { - batch.BakeMesh(renderers, renderer, chunkData, instanceTransforms, - renderer.actor.actorSolverToLocalMatrix, ref mesh, transformToActorLocalSpace); - return; - } - } - } - } -} - - diff --git a/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiChainRopeRenderSystem.cs.meta b/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiChainRopeRenderSystem.cs.meta deleted file mode 100644 index 276835a70..000000000 --- a/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiChainRopeRenderSystem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9a4cb8b10f8b049c2ae0a97c50c9b33c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiExtrudedRopeRenderSystem.cs b/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiExtrudedRopeRenderSystem.cs deleted file mode 100644 index a34d3e0ab..000000000 --- a/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiExtrudedRopeRenderSystem.cs +++ /dev/null @@ -1,279 +0,0 @@ - -using System.Runtime.InteropServices; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.Rendering; -using Unity.Profiling; - -namespace Obi -{ - [StructLayout(LayoutKind.Sequential)] - public struct BurstExtrudedMeshData - { - public int sectionVertexCount; - public float thicknessScale; - public float uvAnchor; - public uint normalizeV; - - public Vector2 uvScale; - - public BurstExtrudedMeshData(ObiRopeExtrudedRenderer renderer) - { - sectionVertexCount = renderer.section.vertices.Count; - uvAnchor = renderer.uvAnchor; - thicknessScale = renderer.thicknessScale; - uvScale = renderer.uvScale; - normalizeV = (uint)(renderer.normalizeV ? 1 : 0); - } - } - - [StructLayout(LayoutKind.Sequential)] - public struct ProceduralRopeVertex - { - public Vector3 pos; - public Vector3 normal; - public Vector4 tangent; - public Vector4 color; - public Vector2 uv; - } - - public abstract class ObiExtrudedRopeRenderSystem : RenderSystem - { - public Oni.RenderingSystemType typeEnum { get => Oni.RenderingSystemType.ExtrudedRope; } - - public RendererSet renderers { get; } = new RendererSet(); - protected List sortedRenderers = new List(); /**< temp list used to store renderers sorted by batch.*/ - - // specify vertex count and layout - protected VertexAttributeDescriptor[] layout = - { - new VertexAttributeDescriptor(VertexAttribute.Position, VertexAttributeFormat.Float32, 3), - new VertexAttributeDescriptor(VertexAttribute.Normal, VertexAttributeFormat.Float32, 3), - new VertexAttributeDescriptor(VertexAttribute.Tangent, VertexAttributeFormat.Float32, 4), - new VertexAttributeDescriptor(VertexAttribute.Color, VertexAttributeFormat.Float32, 4), - new VertexAttributeDescriptor(VertexAttribute.TexCoord0, VertexAttributeFormat.Float32, 2), - }; - - static protected ProfilerMarker m_SetupRenderMarker = new ProfilerMarker("SetupExtrudedRopeRendering"); - static protected ProfilerMarker m_RenderMarker = new ProfilerMarker("ExtrudedRopeRendering"); - - protected ObiSolver m_Solver; - protected SubMeshDescriptor subMeshDescriptor = new SubMeshDescriptor(0, 0); - - protected List> batchList = new List>(); - - protected ObiNativeList rendererData; /**< for each renderer, data about smoother.*/ - protected ObiNativeList pathSmootherIndices; /**< renderer indices, sorted by batch */ - - protected Dictionary sectionToIndex = new Dictionary(); - protected ObiNativeVector2List sectionData; - protected ObiNativeList sectionOffsets; /**< for each section, offset of its first entry in the sectionData array.*/ - protected ObiNativeList sectionIndices; /**< for each renderer, index of the section used.*/ - - protected ObiNativeList vertexOffsets; /**< for each renderer, vertex offset in its batch mesh data.*/ - protected ObiNativeList triangleOffsets; /**< for each renderer, triangle offset in its batch mesh data.*/ - - protected ObiNativeList vertexCounts; /**< for each renderer, vertex count.*/ - protected ObiNativeList triangleCounts; /**< for each renderer, triangle count.*/ - - protected ObiPathSmootherRenderSystem pathSmootherSystem; - - public ObiExtrudedRopeRenderSystem(ObiSolver solver) - { - m_Solver = solver; - - rendererData = new ObiNativeList(); - pathSmootherIndices = new ObiNativeList(); - - sectionData = new ObiNativeVector2List(); - sectionOffsets = new ObiNativeList(); - sectionIndices = new ObiNativeList(); - - vertexOffsets = new ObiNativeList(); - triangleOffsets = new ObiNativeList(); - - vertexCounts = new ObiNativeList(); - triangleCounts = new ObiNativeList(); - } - - public void Dispose() - { - for (int i = 0; i < batchList.Count; ++i) - batchList[i].Dispose(); - batchList.Clear(); - - if (rendererData != null) - rendererData.Dispose(); - if (pathSmootherIndices != null) - pathSmootherIndices.Dispose(); - - if (sectionData != null) - sectionData.Dispose(); - if (sectionOffsets != null) - sectionOffsets.Dispose(); - if (sectionIndices != null) - sectionIndices.Dispose(); - - if (vertexOffsets != null) - vertexOffsets.Dispose(); - if (triangleOffsets != null) - triangleOffsets.Dispose(); - - if (vertexCounts != null) - vertexCounts.Dispose(); - if (triangleCounts != null) - triangleCounts.Dispose(); - } - - private void Clear() - { - rendererData.Clear(); - pathSmootherIndices.Clear(); - - sectionData.Clear(); - sectionToIndex.Clear(); - sectionOffsets.Clear(); - sectionIndices.Clear(); - - vertexOffsets.Clear(); - triangleOffsets.Clear(); - - vertexCounts.Clear(); - triangleCounts.Clear(); - - for (int i = 0; i < batchList.Count; ++i) - batchList[i].Dispose(); - batchList.Clear(); - } - - private void CreateBatches() - { - // generate batches: - sortedRenderers.Clear(); - for (int i = 0; i < renderers.Count; ++i) - { - if (renderers[i].section != null && renderers[i].TryGetComponent(out ObiPathSmoother smoother) && smoother.enabled) - { - renderers[i].renderParameters.layer = renderers[i].gameObject.layer; - batchList.Add(new ProceduralRenderBatch(i, renderers[i].material, renderers[i].renderParameters)); - sortedRenderers.Add(renderers[i]); - } - } - - vertexOffsets.ResizeUninitialized(sortedRenderers.Count); - triangleOffsets.ResizeUninitialized(sortedRenderers.Count); - - // sort batches: - batchList.Sort(); - - // reorder renderers based on sorted batches: - sortedRenderers.Clear(); - for (int i = 0; i < batchList.Count; ++i) - { - var batch = batchList[i]; - - sortedRenderers.Add(renderers[batch.firstRenderer]); - batch.firstRenderer = i; - - int pathIndex = sortedRenderers[i].GetComponent().indexInSystem; - pathSmootherIndices.Add(pathIndex); - - // get or create extruded section: - if (!sectionToIndex.TryGetValue(sortedRenderers[i].section, out int sectionIndex)) - { - sectionIndex = sectionOffsets.count; - sectionToIndex[sortedRenderers[i].section] = sectionIndex; - sectionOffsets.Add(sectionData.count); - sectionData.AddRange(sortedRenderers[i].section.vertices); - } - - sectionIndices.Add(sectionIndex); - - // calculate vertex and triangle counts for each renderer: - int chunkStart = pathSmootherSystem.chunkOffsets[pathIndex]; - int chunkAmount = pathSmootherSystem.chunkOffsets[pathIndex + 1] - chunkStart; - - for (int k = chunkStart; k < chunkStart + chunkAmount; ++k) - { - int frameCount = pathSmootherSystem.smoothFrameCounts[k]; - batch.vertexCount += frameCount * sortedRenderers[i].section.vertices.Count; - batch.triangleCount += (frameCount - 1) * (sortedRenderers[i].section.vertices.Count - 1) * 2; - } - - vertexCounts.Add(batch.vertexCount); - triangleCounts.Add(batch.triangleCount); - - rendererData.Add(new BurstExtrudedMeshData(sortedRenderers[i])); - } - - // add last entry to section offsets: - sectionOffsets.Add(sectionData.count); - - } - - private void CalculateMeshOffsets() - { - for (int i = 0; i < batchList.Count; ++i) - { - var batch = batchList[i]; - - int vtxCount = 0; - int triCount = 0; - - // Calculate vertex and triangle offsets for each renderer in the batch: - for (int j = 0; j < batch.rendererCount; ++j) - { - int r = batch.firstRenderer + j; - - vertexOffsets[r] = vtxCount; - triangleOffsets[r] = triCount; - - vtxCount += vertexCounts[r]; - triCount += triangleCounts[r]; - } - } - } - - public virtual void Setup() - { - pathSmootherSystem = m_Solver.GetRenderSystem() as ObiPathSmootherRenderSystem; - if (pathSmootherSystem == null) - return; - - using (m_SetupRenderMarker.Auto()) - { - Clear(); - - CreateBatches(); - - ObiUtils.MergeBatches(batchList); - - CalculateMeshOffsets(); - } - } - - public abstract void Render(); - - public void Step() - { - } - - public void BakeMesh(ObiRopeExtrudedRenderer renderer, ref Mesh mesh, bool transformToActorLocalSpace = false) - { - int index = sortedRenderers.IndexOf(renderer); - - for (int i = 0; i < batchList.Count; ++i) - { - var batch = batchList[i]; - if (index >= batch.firstRenderer && index < batch.firstRenderer + batch.rendererCount) - { - batch.BakeMesh(vertexOffsets[index], vertexCounts[index], triangleOffsets[index], triangleCounts[index], - renderer.actor.actorSolverToLocalMatrix, ref mesh, transformToActorLocalSpace); - return; - } - } - } - } -} - - diff --git a/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiExtrudedRopeRenderSystem.cs.meta b/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiExtrudedRopeRenderSystem.cs.meta deleted file mode 100644 index 3b5bd971b..000000000 --- a/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiExtrudedRopeRenderSystem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e19ecda6559144921868e71085db8408 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiLineRopeRenderSystem.cs b/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiLineRopeRenderSystem.cs deleted file mode 100644 index dbb068e67..000000000 --- a/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiLineRopeRenderSystem.cs +++ /dev/null @@ -1,230 +0,0 @@ - -using System.Runtime.InteropServices; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.Rendering; -using Unity.Profiling; - -namespace Obi -{ - [StructLayout(LayoutKind.Sequential)] - public struct BurstLineMeshData - { - public Vector2 uvScale; - public float thicknessScale; - public float uvAnchor; - public uint normalizeV; - - public BurstLineMeshData(ObiRopeLineRenderer renderer) - { - uvAnchor = renderer.uvAnchor; - thicknessScale = renderer.thicknessScale; - uvScale = renderer.uvScale; - normalizeV = (uint)(renderer.normalizeV ? 1 : 0); - } - } - - public abstract class ObiLineRopeRenderSystem : RenderSystem - { - public Oni.RenderingSystemType typeEnum { get => Oni.RenderingSystemType.LineRope; } - - public RendererSet renderers { get; } = new RendererSet(); - protected List sortedRenderers = new List(); - - // specify vertex count and layout - protected VertexAttributeDescriptor[] layout = - { - new VertexAttributeDescriptor(VertexAttribute.Position, VertexAttributeFormat.Float32, 3), - new VertexAttributeDescriptor(VertexAttribute.Normal, VertexAttributeFormat.Float32, 3), - new VertexAttributeDescriptor(VertexAttribute.Tangent, VertexAttributeFormat.Float32, 4), - new VertexAttributeDescriptor(VertexAttribute.Color, VertexAttributeFormat.Float32, 4), - new VertexAttributeDescriptor(VertexAttribute.TexCoord0, VertexAttributeFormat.Float32, 2), - }; - - static protected ProfilerMarker m_SetupRenderMarker = new ProfilerMarker("SetupExtrudedRopeRendering"); - static protected ProfilerMarker m_RenderMarker = new ProfilerMarker("ExtrudedRopeRendering"); - - protected ObiSolver m_Solver; - protected SubMeshDescriptor subMeshDescriptor = new SubMeshDescriptor(0, 0); - - protected List> batchList = new List>(); - - protected ObiNativeList pathSmootherIndices; - protected ObiNativeList rendererData; /**< for each renderer, data about smoother.*/ - - protected ObiNativeList vertexOffsets; /**< for each renderer, vertex offset in its batch mesh data.*/ - protected ObiNativeList triangleOffsets; /**< for each renderer, triangle offset in its batch mesh data.*/ - - protected ObiNativeList vertexCounts; /**< for each renderer, vertex count.*/ - protected ObiNativeList triangleCounts; /**< for each renderer, triangle count.*/ - - protected ObiPathSmootherRenderSystem pathSmootherSystem; - -#if (UNITY_2019_1_OR_NEWER) - System.Action renderCallback; -#endif - - public ObiLineRopeRenderSystem(ObiSolver solver) - { -#if (UNITY_2019_1_OR_NEWER) - renderCallback = new System.Action((cntxt, cam) => { RenderFromCamera(cam); }); - RenderPipelineManager.beginCameraRendering += renderCallback; -#endif - Camera.onPreCull += RenderFromCamera; - - m_Solver = solver; - - pathSmootherIndices = new ObiNativeList(); - rendererData = new ObiNativeList(); - - vertexOffsets = new ObiNativeList(); - triangleOffsets = new ObiNativeList(); - - vertexCounts = new ObiNativeList(); - triangleCounts = new ObiNativeList(); - } - - public void Dispose() - { -#if (UNITY_2019_1_OR_NEWER) - RenderPipelineManager.beginCameraRendering -= renderCallback; -#endif - Camera.onPreCull -= RenderFromCamera; - - for (int i = 0; i < batchList.Count; ++i) - batchList[i].Dispose(); - batchList.Clear(); - - if (pathSmootherIndices != null) - pathSmootherIndices.Dispose(); - if (rendererData != null) - rendererData.Dispose(); - - if (vertexOffsets != null) - vertexOffsets.Dispose(); - if (triangleOffsets != null) - triangleOffsets.Dispose(); - - if (vertexCounts != null) - vertexCounts.Dispose(); - if (triangleCounts != null) - triangleCounts.Dispose(); - } - - private void Clear() - { - pathSmootherIndices.Clear(); - rendererData.Clear(); - - vertexOffsets.Clear(); - vertexCounts.Clear(); - - triangleCounts.Clear(); - - for (int i = 0; i < batchList.Count; ++i) - batchList[i].Dispose(); - batchList.Clear(); - } - - private void CreateBatches() - { - // generate batches: - sortedRenderers.Clear(); - for (int i = 0; i < renderers.Count; ++i) - { - if (renderers[i].TryGetComponent(out ObiPathSmoother smoother) && smoother.enabled) - { - renderers[i].renderParams.layer = renderers[i].gameObject.layer; - batchList.Add(new ProceduralRenderBatch(i, renderers[i].material, renderers[i].renderParams)); - sortedRenderers.Add(renderers[i]); - } - } - - vertexOffsets.ResizeUninitialized(sortedRenderers.Count); - triangleOffsets.ResizeUninitialized(sortedRenderers.Count); - - // sort batches: - batchList.Sort(); - - // reorder renderers based on sorted batches: - sortedRenderers.Clear(); - for (int i = 0; i < batchList.Count; ++i) - { - var batch = batchList[i]; - - sortedRenderers.Add(renderers[batch.firstRenderer]); - batch.firstRenderer = i; - - int pathIndex = sortedRenderers[i].GetComponent().indexInSystem; - pathSmootherIndices.Add(pathIndex); - - // calculate vertex and triangle counts for each renderer: - int chunkStart = pathSmootherSystem.chunkOffsets[pathIndex]; - int chunkAmount = pathSmootherSystem.chunkOffsets[pathIndex + 1] - chunkStart; - - for (int k = chunkStart; k < chunkStart + chunkAmount; ++k) - { - int frameCount = pathSmootherSystem.smoothFrameCounts[k]; - batch.vertexCount += frameCount * 2; // in a triangle strip, there's 2 vertices per frame. - batch.triangleCount += (frameCount - 1) * 2; // and 2 triangles per frame (except for the last one) - } - - vertexCounts.Add(batch.vertexCount); - triangleCounts.Add(batch.triangleCount); - - rendererData.Add(new BurstLineMeshData(sortedRenderers[i])); - } - } - - private void CalculateMeshOffsets() - { - for (int i = 0; i < batchList.Count; ++i) - { - var batch = batchList[i]; - - int vtxCount = 0; - int triCount = 0; - - // Calculate vertex and triangle offsets for each renderer in the batch: - for (int j = 0; j < batch.rendererCount; ++j) - { - int r = batch.firstRenderer + j; - - vertexOffsets[r] = vtxCount; - triangleOffsets[r] = triCount; - - vtxCount += vertexCounts[r]; - triCount += triangleCounts[r]; - } - } - } - - public virtual void Setup() - { - pathSmootherSystem = m_Solver.GetRenderSystem() as ObiPathSmootherRenderSystem; - if (pathSmootherSystem == null) - return; - - using (m_SetupRenderMarker.Auto()) - { - Clear(); - - CreateBatches(); - - ObiUtils.MergeBatches(batchList); - - CalculateMeshOffsets(); - } - } - - public abstract void RenderFromCamera(Camera camera); - - public abstract void Render(); - - public void Step() - { - } - } -} - - diff --git a/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiLineRopeRenderSystem.cs.meta b/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiLineRopeRenderSystem.cs.meta deleted file mode 100644 index 1a6ddf1bf..000000000 --- a/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiLineRopeRenderSystem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: feb78fd6bed7a49979dee4205d74deaa -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiMeshRopeRenderSystem.cs b/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiMeshRopeRenderSystem.cs deleted file mode 100644 index 1f0e8ff9a..000000000 --- a/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiMeshRopeRenderSystem.cs +++ /dev/null @@ -1,296 +0,0 @@ - -using System.Runtime.InteropServices; -using UnityEngine; - -using Unity.Profiling; -using UnityEngine.Rendering; -using System.Collections.Generic; -using System; - -namespace Obi -{ - [StructLayout(LayoutKind.Sequential)] - public struct BurstMeshData - { - public uint axis; - public float volumeScaling; - public uint stretchWithRope; - public uint spanEntireLength; - - public uint instances; - public float instanceSpacing; - public float offset; - public float meshSizeAlongAxis; - - public Vector4 scale; - - public BurstMeshData(ObiRopeMeshRenderer renderer) - { - axis = (uint)renderer.axis; - volumeScaling = renderer.volumeScaling; - stretchWithRope = (uint)(renderer.stretchWithRope ? 1 : 0); - spanEntireLength = (uint)(renderer.spanEntireLength ? 1 : 0); - instances = renderer.instances; - instanceSpacing = renderer.instanceSpacing; - offset = renderer.offset; - meshSizeAlongAxis = renderer.sourceMesh != null ? renderer.sourceMesh.bounds.size[(int)renderer.axis] : 0; - scale = renderer.scale; - } - } - - [StructLayout(LayoutKind.Sequential)] - public struct RopeMeshVertex - { - public Vector3 pos; - public Vector3 normal; - public Vector4 tangent; - public Vector4 color; - } - - public abstract class ObiMeshRopeRenderSystem : RenderSystem - { - public Oni.RenderingSystemType typeEnum { get => Oni.RenderingSystemType.MeshRope; } - - public RendererSet renderers { get; } = new RendererSet(); - protected List sortedRenderers = new List(); /**< temp list used to store renderers sorted by batch.*/ - - static protected ProfilerMarker m_SetupRenderMarker = new ProfilerMarker("SetupMeshRopeRendering"); - static protected ProfilerMarker m_RenderMarker = new ProfilerMarker("MeshRopeRendering"); - - // specify vertex count and layout - protected VertexAttributeDescriptor[] layout = - { - new VertexAttributeDescriptor(VertexAttribute.Position, VertexAttributeFormat.Float32, 3,0), - new VertexAttributeDescriptor(VertexAttribute.Normal, VertexAttributeFormat.Float32, 3,0), - new VertexAttributeDescriptor(VertexAttribute.Tangent, VertexAttributeFormat.Float32, 4,0), - new VertexAttributeDescriptor(VertexAttribute.Color, VertexAttributeFormat.Float32, 4,0), - new VertexAttributeDescriptor(VertexAttribute.TexCoord0, VertexAttributeFormat.Float32, 2,1), - new VertexAttributeDescriptor(VertexAttribute.TexCoord1, VertexAttributeFormat.Float32, 2,1), - new VertexAttributeDescriptor(VertexAttribute.TexCoord2, VertexAttributeFormat.Float32, 2,1), - new VertexAttributeDescriptor(VertexAttribute.TexCoord3, VertexAttributeFormat.Float32, 2,1), - }; - - protected ObiSolver m_Solver; - protected List> batchList = new List>(); - - - protected MeshDataBatch meshData; - protected ObiNativeList meshIndices; // for each renderer, its mesh index. - - protected ObiNativeList pathSmootherIndices; /**< for each renderer, index of its path smoother in the path smoother system.*/ - protected ObiNativeList rendererData; - - protected ObiNativeList sortedIndices; /**< axis-sorted vertex indices. */ - protected ObiNativeList sortedOffsets; /**< for each renderer, offset in the sortedIndices array.*/ - - protected ObiNativeList vertexOffsets; /**< for each renderer, vertex offset in its batch mesh data.*/ - protected ObiNativeList vertexCounts; /**< for each renderer, vertex count.*/ - - protected ObiPathSmootherRenderSystem pathSmootherSystem; - - public ObiMeshRopeRenderSystem(ObiSolver solver) - { - m_Solver = solver; - - meshData = new MeshDataBatch(); - meshIndices = new ObiNativeList(); - - pathSmootherIndices = new ObiNativeList(); - rendererData = new ObiNativeList(); - - sortedIndices = new ObiNativeList(); - sortedOffsets = new ObiNativeList(); - - vertexOffsets = new ObiNativeList(); - vertexCounts = new ObiNativeList(); - } - - public void Dispose() - { - for (int i = 0; i < batchList.Count; ++i) - batchList[i].Dispose(); - batchList.Clear(); - - meshData.Dispose(); - - if (pathSmootherIndices != null) - pathSmootherIndices.Dispose(); - if (meshIndices != null) - meshIndices.Dispose(); - - if (sortedIndices != null) - sortedIndices.Dispose(); - if (sortedOffsets != null) - sortedOffsets.Dispose(); - - if (vertexOffsets != null) - vertexOffsets.Dispose(); - if (vertexCounts != null) - vertexCounts.Dispose(); - - if (rendererData != null) - rendererData.Dispose(); - } - - private void Clear() - { - meshData.Clear(); - meshIndices.Clear(); - - pathSmootherIndices.Clear(); - rendererData.Clear(); - - vertexOffsets.Clear(); - vertexCounts.Clear(); - - sortedIndices.Clear(); - sortedOffsets.Clear(); - - for (int i = 0; i < batchList.Count; ++i) - batchList[i].Dispose(); - batchList.Clear(); - - meshData.InitializeStaticData(); - meshData.InitializeTempData(); - } - - private void CreateBatches() - { - // generate batches: - sortedRenderers.Clear(); - for (int i = 0; i < renderers.Count; ++i) - { - if (renderers[i].sourceMesh != null && renderers[i].TryGetComponent(out ObiPathSmoother smoother) && smoother.enabled) - { - int vertexCount = renderers[i].vertexCount * (int)renderers[i].meshInstances; - renderers[i].renderParameters.layer = renderers[i].gameObject.layer; - batchList.Add(new DynamicRenderBatch(i, vertexCount, renderers[i].materials, renderers[i].renderParameters)); - sortedRenderers.Add(renderers[i]); - } - } - - vertexOffsets.ResizeUninitialized(sortedRenderers.Count); - - // sort batches: - batchList.Sort(); - - // reorder renderers based on sorted batches: - sortedRenderers.Clear(); - for (int i = 0; i < batchList.Count; ++i) - { - var batch = batchList[i]; - - // store amount of vertices in this batch, prior to merging: - vertexCounts.Add(batch.vertexCount); - - // write renderers in the order dictated by the sorted batch: - sortedRenderers.Add(renderers[batch.firstRenderer]); - batch.firstRenderer = i; - - pathSmootherIndices.Add(sortedRenderers[i].GetComponent().indexInSystem); - - rendererData.Add(new BurstMeshData(sortedRenderers[i])); - } - } - - protected virtual void PopulateBatches() - { - List verts = new List(); - - // store per-mesh data - for (int i = 0; i < sortedRenderers.Count; ++i) - { - // sort vertices along curve axis: - sortedRenderers[i].GetVertices(verts); - float[] keys = new float[sortedRenderers[i].vertexCount]; - var orderedVertices = new int[sortedRenderers[i].vertexCount]; - - for (int j = 0; j < keys.Length; ++j) - { - keys[j] = verts[j][(int)sortedRenderers[i].axis]; - orderedVertices[j] = j; - } - - Array.Sort(keys, orderedVertices); - - sortedOffsets.Add(sortedIndices.count); - sortedIndices.AddRange(orderedVertices); - - // add mesh index - meshIndices.Add(meshData.AddMesh(sortedRenderers[i])); - } - } - - private void CalculateMeshOffsets() - { - for (int i = 0; i < batchList.Count; ++i) - { - var batch = batchList[i]; - - int vtxCount = 0; - - // Calculate vertex and triangle offsets for each renderer in the batch: - for (int j = 0; j < batch.rendererCount; ++j) - { - int r = batch.firstRenderer + j; - - vertexOffsets[r] = vtxCount; - vtxCount += vertexCounts[r]; - } - } - } - - protected virtual void CloseBatches() - { - meshData.DisposeOfStaticData(); - meshData.DisposeOfTempData(); - } - - public void Setup() - { - pathSmootherSystem = m_Solver.GetRenderSystem() as ObiPathSmootherRenderSystem; - if (pathSmootherSystem == null) - return; - - using (m_SetupRenderMarker.Auto()) - { - Clear(); - - CreateBatches(); - - PopulateBatches(); - - ObiUtils.MergeBatches(batchList); - - CalculateMeshOffsets(); - - CloseBatches(); - } - } - - public void Step() - { - } - - public virtual void Render() - { - } - - public void BakeMesh(ObiRopeMeshRenderer renderer, ref Mesh mesh, bool transformToActorLocalSpace = false) - { - int index = sortedRenderers.IndexOf(renderer); - - for (int i = 0; i < batchList.Count; ++i) - { - var batch = batchList[i]; - if (index >= batch.firstRenderer && index < batch.firstRenderer + batch.rendererCount) - { - batch.BakeMesh(sortedRenderers, renderer, ref mesh, transformToActorLocalSpace); - return; - } - } - } - } -} - - diff --git a/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiMeshRopeRenderSystem.cs.meta b/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiMeshRopeRenderSystem.cs.meta deleted file mode 100644 index f739eb97a..000000000 --- a/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiMeshRopeRenderSystem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ad311e324f23a480d867e8e9b7f89cfe -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiPathSmootherRenderSystem.cs b/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiPathSmootherRenderSystem.cs deleted file mode 100644 index e6ad64565..000000000 --- a/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiPathSmootherRenderSystem.cs +++ /dev/null @@ -1,325 +0,0 @@ -using System.Runtime.InteropServices; -using UnityEngine; -using Unity.Profiling; - -namespace Obi -{ - [StructLayout(LayoutKind.Sequential)] - public struct BurstPathSmootherData - { - public uint smoothing; - public float decimation; - public float twist; - public float restLength; - public float smoothLength; - public uint usesOrientedParticles; - - public BurstPathSmootherData(ObiRopeBase rope, ObiPathSmoother smoother) - { - smoothing = smoother.smoothing; - decimation = smoother.decimation; - twist = smoother.twist; - usesOrientedParticles = (uint)(rope.usesOrientedParticles ? 1 : 0); - restLength = rope.restLength; - smoothLength = 0; - } - } - - public abstract class ObiPathSmootherRenderSystem : RenderSystem - { - public Oni.RenderingSystemType typeEnum { get => Oni.RenderingSystemType.AllSmoothedRopes; } - - public RendererSet renderers { get; } = new RendererSet(); - - static protected ProfilerMarker m_SetupRenderMarker = new ProfilerMarker("SetupSmoothPathRendering"); - static protected ProfilerMarker m_RenderMarker = new ProfilerMarker("SmoothPathRendering"); - - protected ObiSolver m_Solver; - - public ObiNativeList particleIndices; - public ObiNativeList chunkOffsets; /**< for each actor, index of the first chunk */ - - public ObiNativeList pathData; /**< for each chunk, smoother params/data.*/ - - public ObiNativeList rawFrames; - public ObiNativeList rawFrameOffsets; /**< index of the first frame for each chunk.*/ - public ObiNativeList decimatedFrameCounts; /**< amount of frames in each chunk, after decimation.*/ - - public ObiNativeList smoothFrames; - public ObiNativeList smoothFrameOffsets; /**< index of the first frame for each chunk.*/ - public ObiNativeList smoothFrameCounts; /**< amount of smooth frames for each chunk.*/ - - // path smoothing must be done before all other rope render systems, which are on a higher tier. - public uint tier - { - get { return 0; } - } - - public ObiPathSmootherRenderSystem(ObiSolver solver) - { - m_Solver = solver; - - pathData = new ObiNativeList(); - particleIndices = new ObiNativeList(); - chunkOffsets = new ObiNativeList(); - - rawFrames = new ObiNativeList(); - rawFrameOffsets = new ObiNativeList(); - - decimatedFrameCounts = new ObiNativeList(); - - smoothFrames = new ObiNativeList(); - smoothFrameOffsets = new ObiNativeList(); - smoothFrameCounts = new ObiNativeList(); - } - - public void Dispose() - { - if (particleIndices != null) - particleIndices.Dispose(); - if (chunkOffsets != null) - chunkOffsets.Dispose(); - - if (pathData != null) - pathData.Dispose(); - - if (rawFrames != null) - rawFrames.Dispose(); - if (rawFrameOffsets != null) - rawFrameOffsets.Dispose(); - if (decimatedFrameCounts != null) - decimatedFrameCounts.Dispose(); - - if (smoothFrames != null) - smoothFrames.Dispose(); - if (smoothFrameOffsets != null) - smoothFrameOffsets.Dispose(); - if (smoothFrameCounts != null) - smoothFrameCounts.Dispose(); - } - - private void Clear() - { - pathData.Clear(); - particleIndices.Clear(); - chunkOffsets.Clear(); - - rawFrames.Clear(); - rawFrameOffsets.Clear(); - decimatedFrameCounts.Clear(); - - smoothFrames.Clear(); - smoothFrameOffsets.Clear(); - smoothFrameCounts.Clear(); - } - - private int GetChaikinCount(int initialPoints, uint recursionLevel) - { - if (recursionLevel <= 0 || initialPoints < 3) - return initialPoints; - - // calculate amount of new points generated by each inner control point: - int pCount = (int)Mathf.Pow(2, recursionLevel); - return (initialPoints - 2) * pCount + 2; - } - - public virtual void Setup() - { - using (m_SetupRenderMarker.Auto()) - { - Clear(); - - int actorCount = 0; - int chunkCount = 0; - int rawFrameCount = 0; - - for (int i = 0; i < renderers.Count; ++i) - { - var renderer = renderers[i]; - - var rope = renderer.actor as ObiRopeBase; - var data = new BurstPathSmootherData(rope, renderer); - - chunkOffsets.Add(chunkCount); - - // iterate trough elements, finding discontinuities as we go: - for (int e = 0; e < rope.elements.Count; ++e) - { - rawFrameCount++; - particleIndices.Add(rope.elements[e].particle1); - - // At discontinuities, start a new chunk. - if (e < rope.elements.Count - 1 && rope.elements[e].particle2 != rope.elements[e + 1].particle1) - { - rawFrameOffsets.Add(++rawFrameCount); - particleIndices.Add(rope.elements[e].particle2); - pathData.Add(data); - chunkCount++; - } - } - - chunkCount++; - rawFrameOffsets.Add(++rawFrameCount); - particleIndices.Add(rope.elements[rope.elements.Count - 1].particle2); - pathData.Add(data); - - // store the index in this system, so that other render systems - // in higher tiers can easily access smooth path data: - renderer.indexInSystem = actorCount++; - } - - // Add last entry (total amount of chunks): - chunkOffsets.Add(chunkCount); - - // resize storage: - rawFrames.ResizeUninitialized(rawFrameCount); - decimatedFrameCounts.ResizeUninitialized(rawFrameOffsets.count); - smoothFrameOffsets.ResizeUninitialized(rawFrameOffsets.count); - smoothFrameCounts.ResizeUninitialized(rawFrameOffsets.count); - - // calculate smooth chunk counts: - int smoothFrameCount = 0; - for (int i = 0; i < rawFrameOffsets.count; ++i) - { - int frameCount = rawFrameOffsets[i] - (i > 0 ? rawFrameOffsets[i - 1] : 0); - - int smoothCount = GetChaikinCount(frameCount, pathData[i].smoothing); - - smoothFrameOffsets[i] = smoothFrameCount; - smoothFrameCounts[i] = smoothCount; - smoothFrameCount += smoothCount; - } - - smoothFrames.ResizeUninitialized(smoothFrameCount); - } - } - - public int GetChunkCount(int rendererIndex) - { - rendererIndex = Mathf.Clamp(rendererIndex, 0, renderers.Count); - - if (rendererIndex >= chunkOffsets.count) - return 0; - - return chunkOffsets[rendererIndex + 1] - chunkOffsets[rendererIndex]; - } - - - public int GetSmoothFrameCount(int rendererIndex) - { - rendererIndex = Mathf.Clamp(rendererIndex, 0, renderers.Count); - - int frameCount = 0; - - if (rendererIndex >= chunkOffsets.count) - return frameCount; - - for (int i = chunkOffsets[rendererIndex]; i < chunkOffsets[rendererIndex + 1]; ++i) - frameCount += smoothFrameCounts[i]; - - return frameCount; - } - - public int GetSmoothFrameCount(int rendererIndex, int chunkIndex) - { - rendererIndex = Mathf.Clamp(rendererIndex, 0, renderers.Count); - - if (rendererIndex >= chunkOffsets.count) - return 0; - - int chunkCount = chunkOffsets[rendererIndex + 1] - chunkOffsets[rendererIndex]; - int chunk = chunkOffsets[rendererIndex] + Mathf.Clamp(chunkIndex, 0, chunkCount); - - return smoothFrameCounts[chunk]; - } - - public float GetSmoothLength(int rendererIndex) - { - rendererIndex = Mathf.Clamp(rendererIndex, 0, renderers.Count); - - float smoothLength = 0; - - if (rendererIndex >= chunkOffsets.count) - return smoothLength; - - for (int i = chunkOffsets[rendererIndex]; i < chunkOffsets[rendererIndex + 1]; ++i) - smoothLength += pathData[i].smoothLength; - - return smoothLength; - } - - public ObiPathFrame GetFrameAt(int rendererIndex, int chunkIndex, int frameIndex) - { - rendererIndex = Mathf.Clamp(rendererIndex, 0, renderers.Count); - - if (rendererIndex >= chunkOffsets.count) - return ObiPathFrame.Identity; - - int chunkCount = chunkOffsets[rendererIndex + 1] - chunkOffsets[rendererIndex]; - int chunk = chunkOffsets[rendererIndex] + Mathf.Clamp(chunkIndex, 0, chunkCount); - - return smoothFrames[smoothFrameOffsets[chunk] + Mathf.Clamp(frameIndex, 0, smoothFrameCounts[chunk])]; - } - - public ObiPathFrame GetFrameAt(int rendererIndex, float mu) - { - rendererIndex = Mathf.Clamp(rendererIndex, 0, renderers.Count); - - if (rendererIndex >= chunkOffsets.count) - return ObiPathFrame.Identity; - - float length = 0; - for (int i = chunkOffsets[rendererIndex]; i < chunkOffsets[rendererIndex + 1]; ++i) - length += pathData[i].smoothLength; - - length *= mu; - - // iterate trough all chunks: - float lerp = 0; - int frame = 0; - for (int i = chunkOffsets[rendererIndex]; i < chunkOffsets[rendererIndex + 1]; ++i) - { - int firstFrame = smoothFrameOffsets[i]; - int frameCount = smoothFrameCounts[i]; - - // iterate trough all frames in this chunk, accumulating distance: - for (int j = firstFrame + 1; j < firstFrame + frameCount; ++j) - { - float frameDistance = Vector3.Distance(smoothFrames[j - 1].position, - smoothFrames[j].position); - - lerp = length / frameDistance; - length -= frameDistance; - frame = j; - - if (length <= 0) - return (1 - lerp) * smoothFrames[j - 1] + lerp * smoothFrames[j]; - } - } - - // if no chunks/no frames, return default frame. - return (1 - lerp) * smoothFrames[frame - 1] + lerp * smoothFrames[frame]; - } - - public void Step() - { - } - - public virtual void Render() - { - // Update rest lengths, in case they've changed due to cursors: - for (int i = 0; i < renderers.Count; ++i) - { - var rope = renderers[i].actor as ObiRopeBase; - - for (int j = chunkOffsets[i]; j < chunkOffsets[i + 1]; ++j) - { - var data = pathData[j]; - data.restLength = rope.restLength; - pathData[j] = data; - } - } - } - } -} - diff --git a/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiPathSmootherRenderSystem.cs.meta b/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiPathSmootherRenderSystem.cs.meta deleted file mode 100644 index 3fb94beb0..000000000 --- a/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiPathSmootherRenderSystem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: fab1fee6e450d4e28a7a2770af3c94d9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiRopeChainRenderer.cs b/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiRopeChainRenderer.cs index 361d445ce..7bbb1a5ae 100644 --- a/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiRopeChainRenderer.cs +++ b/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiRopeChainRenderer.cs @@ -7,71 +7,163 @@ namespace Obi { [AddComponentMenu("Physics/Obi/Obi Rope Chain Renderer", 885)] [ExecuteInEditMode] - public class ObiRopeChainRenderer : MonoBehaviour, ObiActorRenderer + public class ObiRopeChainRenderer : MonoBehaviour { - [Serializable] - public struct LinkModifier - { - public Vector3 translation; - public Vector3 scale; - public Vector3 rotation; + static ProfilerMarker m_UpdateChainRopeRendererChunksPerfMarker = new ProfilerMarker("UpdateChainRopeRenderer"); - public void Clear() - { - translation = Vector3.zero; - scale = Vector3.one; - rotation = Vector3.zero; - } - } + [HideInInspector] [SerializeField] public List linkInstances = new List(); + + [SerializeProperty("RandomizeLinks")] + [SerializeField] private bool randomizeLinks = false; - public Mesh linkMesh; - public Material linkMaterial; public Vector3 linkScale = Vector3.one; /**< Scale of chain links.*/ + public List linkPrefabs = new List(); [Range(0, 1)] public float twistAnchor = 0; /**< Normalized position of twisting origin along rope.*/ - public float linkTwist = 0; /**< Amount of twist applied to each section, in degrees.*/ - public List linkModifiers = new List(); + public float sectionTwist = 0; /**< Amount of twist applied to each section, in degrees.*/ - public RenderBatchParams renderParameters = new RenderBatchParams(true); - - public ObiActor actor { get; private set; } + ObiPathFrame frame = new ObiPathFrame(); void Awake() { - actor = GetComponent(); + ClearChainLinkInstances(); } - public void OnEnable() + public bool RandomizeLinks { - ((ObiActorRenderer)this).EnableRenderer(); + get { return randomizeLinks; } + set + { + if (value != randomizeLinks) + { + randomizeLinks = value; + CreateChainLinkInstances(GetComponent()); + } + } } - public void OnDisable() + void OnEnable() { - ((ObiActorRenderer)this).DisableRenderer(); + GetComponent().OnInterpolate += UpdateRenderer; } - public void OnValidate() + void OnDisable() { - ((ObiActorRenderer)this).SetRendererDirty(Oni.RenderingSystemType.ChainRope); + GetComponent().OnInterpolate -= UpdateRenderer; + ClearChainLinkInstances(); } - RenderSystem ObiRenderer.CreateRenderSystem(ObiSolver solver) + /** + * Destroys all chain link instances. Used when the chain must be re-created from scratch, and when the actor is disabled/destroyed. + */ + public void ClearChainLinkInstances() { - switch (solver.backendType) + + if (linkInstances == null) + return; + + for (int i = 0; i < linkInstances.Count; ++i) + { + if (linkInstances[i] != null) + GameObject.DestroyImmediate(linkInstances[i]); + } + linkInstances.Clear(); + } + + public void CreateChainLinkInstances(ObiRopeBase rope) + { + + ClearChainLinkInstances(); + + if (linkPrefabs.Count > 0) { -#if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) - case ObiSolver.BackendType.Burst: return new BurstChainRopeRenderSystem(solver); -#endif - case ObiSolver.BackendType.Compute: - default: + for (int i = 0; i < rope.particleCount; ++i) + { - if (SystemInfo.supportsComputeShaders) - return new ComputeChainRopeRenderSystem(solver); - return null; + int index = randomizeLinks ? UnityEngine.Random.Range(0, linkPrefabs.Count) : i % linkPrefabs.Count; + + GameObject linkInstance = null; + + if (linkPrefabs[index] != null) + { + linkInstance = GameObject.Instantiate(linkPrefabs[index]); + linkInstance.transform.SetParent(rope.transform, false); + linkInstance.hideFlags = HideFlags.HideAndDontSave; + linkInstance.SetActive(false); + } + + linkInstances.Add(linkInstance); + } + } + } + + public void UpdateRenderer(ObiActor actor) + { + using (m_UpdateChainRopeRendererChunksPerfMarker.Auto()) + { + var rope = actor as ObiRopeBase; + + // In case there are no link prefabs to instantiate: + if (linkPrefabs.Count == 0) + return; + + // Regenerate instances if needed: + if (linkInstances == null || linkInstances.Count < rope.particleCount) + { + CreateChainLinkInstances(rope); + } + + var blueprint = rope.sourceBlueprint; + int elementCount = rope.elements.Count; + + float twist = -sectionTwist * elementCount * twistAnchor; + + //we will define and transport a reference frame along the curve using parallel transport method: + frame.Reset(); + frame.SetTwist(twist); + + int lastParticle = -1; + + for (int i = 0; i < elementCount; ++i) + { + ObiStructuralElement elm = rope.elements[i]; + + Vector3 pos = rope.GetParticlePosition(elm.particle1); + Vector3 nextPos = rope.GetParticlePosition(elm.particle2); + Vector3 linkVector = nextPos - pos; + Vector3 tangent = linkVector.normalized; + + if (rope.sourceBlueprint.usesOrientedParticles) + { + frame.Transport(nextPos, tangent, rope.GetParticleOrientation(elm.particle1) * Vector3.up, twist); + twist += sectionTwist; + } + else + { + frame.Transport(nextPos, tangent, sectionTwist); + } + + if (linkInstances[i] != null) + { + linkInstances[i].SetActive(true); + Transform linkTransform = linkInstances[i].transform; + linkTransform.position = pos + linkVector * 0.5f; + linkTransform.localScale = rope.GetParticleMaxRadius(elm.particle1) * 2 * linkScale; + linkTransform.rotation = Quaternion.LookRotation(tangent, frame.normal); + } + + lastParticle = elm.particle2; + + } + + for (int i = elementCount; i < linkInstances.Count; ++i) + { + if (linkInstances[i] != null) + linkInstances[i].SetActive(false); + } } } } diff --git a/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiRopeExtrudedRenderer.cs b/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiRopeExtrudedRenderer.cs index bac5b6877..02b526b6a 100644 --- a/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiRopeExtrudedRenderer.cs +++ b/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiRopeExtrudedRenderer.cs @@ -7,14 +7,23 @@ namespace Obi { [AddComponentMenu("Physics/Obi/Obi Rope Extruded Renderer", 883)] [ExecuteInEditMode] + [RequireComponent(typeof(MeshRenderer))] + [RequireComponent(typeof(MeshFilter))] [RequireComponent(typeof(ObiPathSmoother))] - public class ObiRopeExtrudedRenderer : MonoBehaviour, ObiActorRenderer + public class ObiRopeExtrudedRenderer : MonoBehaviour { - public ObiPathSmoother smoother { get; private set; } // Each renderer should have its own smoother. The renderer then has a method to get position and orientation at a point. + static ProfilerMarker m_UpdateExtrudedRopeRendererChunksPerfMarker = new ProfilerMarker("UpdateExtrudedRopeRenderer"); - public Material material; + private List vertices = new List(); + private List normals = new List(); + private List tangents = new List(); + private List uvs = new List(); + private List vertColors = new List(); + private List tris = new List(); - public RenderBatchParams renderParameters = new RenderBatchParams(true); + ObiPathSmoother smoother; // Each renderer should have its own smoother. The renderer then has a method to get position and orientation at a point. + + [HideInInspector] [NonSerialized] public Mesh extrudedMesh; [Range(0, 1)] public float uvAnchor = 0; /**< Normalized position of texture coordinate origin along rope.*/ @@ -27,47 +36,140 @@ namespace Obi public float thicknessScale = 0.8f; /**< Scales section thickness.*/ - public ObiActor actor { get; private set; } - - public void Awake() - { - actor = GetComponent(); - } - - public void OnEnable() + void OnEnable() { smoother = GetComponent(); - ((ObiActorRenderer)this).EnableRenderer(); - + smoother.OnCurveGenerated += UpdateRenderer; + CreateMeshIfNeeded(); } - public void OnDisable() + void OnDisable() { - ((ObiActorRenderer)this).DisableRenderer(); + smoother.OnCurveGenerated -= UpdateRenderer; + GameObject.DestroyImmediate(extrudedMesh); } - public void OnValidate() + private void CreateMeshIfNeeded() { - ((ObiActorRenderer)this).SetRendererDirty(Oni.RenderingSystemType.AllSmoothedRopes); - } - - RenderSystem ObiRenderer.CreateRenderSystem(ObiSolver solver) - { - switch (solver.backendType) + if (extrudedMesh == null) { - -#if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) - case ObiSolver.BackendType.Burst: return new BurstExtrudedRopeRenderSystem(solver); -#endif - case ObiSolver.BackendType.Compute: - default: - - if (SystemInfo.supportsComputeShaders) - return new ComputeExtrudedRopeRenderSystem(solver); - return null; + extrudedMesh = new Mesh(); + extrudedMesh.name = "extrudedMesh"; + extrudedMesh.MarkDynamic(); + GetComponent().mesh = extrudedMesh; } } + public void UpdateRenderer(ObiActor actor) + { + using (m_UpdateExtrudedRopeRendererChunksPerfMarker.Auto()) + { + if (section == null) + return; + + var rope = actor as ObiRopeBase; + + CreateMeshIfNeeded(); + ClearMeshData(); + + int sectionIndex = 0; + int sectionSegments = section.Segments; + int verticesPerSection = sectionSegments + 1; // the last vertex in each section must be duplicated, due to uv wraparound. + float vCoord = -uvScale.y * rope.restLength * uvAnchor; // v texture coordinate. + float actualToRestLengthRatio = smoother.SmoothLength / rope.restLength; + + Vector3 vertex = Vector3.zero, normal = Vector3.zero; + Vector4 texTangent = Vector4.zero; + Vector2 uv = Vector2.zero; + + for (int c = 0; c < smoother.smoothChunks.Count; ++c) + { + ObiList curve = smoother.smoothChunks[c]; + + for (int i = 0; i < curve.Count; ++i) + { + // Calculate previous and next curve indices: + int prevIndex = Mathf.Max(i - 1, 0); + + // advance v texcoord: + vCoord += uvScale.y * (Vector3.Distance(curve.Data[i].position, curve.Data[prevIndex].position) / + (normalizeV ? smoother.SmoothLength : actualToRestLengthRatio)); + + // calculate section thickness and scale the basis vectors by it: + float sectionThickness = curve.Data[i].thickness * thicknessScale; + + // Loop around each segment: + int nextSectionIndex = sectionIndex + 1; + for (int j = 0; j <= sectionSegments; ++j) + { + // make just one copy of the section vertex: + Vector2 sectionVertex = section.vertices[j]; + + // calculate normal using section vertex, curve normal and binormal: + normal.x = (sectionVertex.x * curve.Data[i].normal.x + sectionVertex.y * curve.Data[i].binormal.x) * sectionThickness; + normal.y = (sectionVertex.x * curve.Data[i].normal.y + sectionVertex.y * curve.Data[i].binormal.y) * sectionThickness; + normal.z = (sectionVertex.x * curve.Data[i].normal.z + sectionVertex.y * curve.Data[i].binormal.z) * sectionThickness; + + // offset curve position by normal: + vertex.x = curve.Data[i].position.x + normal.x; + vertex.y = curve.Data[i].position.y + normal.y; + vertex.z = curve.Data[i].position.z + normal.z; + + // cross(normal, curve tangent) + texTangent.x = normal.y * curve.Data[i].tangent.z - normal.z * curve.Data[i].tangent.y; + texTangent.y = normal.z * curve.Data[i].tangent.x - normal.x * curve.Data[i].tangent.z; + texTangent.z = normal.x * curve.Data[i].tangent.y - normal.y * curve.Data[i].tangent.x; + texTangent.w = -1; + + uv.x = (j / (float)sectionSegments) * uvScale.x; + uv.y = vCoord; + + vertices.Add(vertex); + normals.Add(normal); + tangents.Add(texTangent); + vertColors.Add(curve.Data[i].color); + uvs.Add(uv); + + if (j < sectionSegments && i < curve.Count - 1) + { + tris.Add(sectionIndex * verticesPerSection + j); + tris.Add(nextSectionIndex * verticesPerSection + j); + tris.Add(sectionIndex * verticesPerSection + (j + 1)); + + tris.Add(sectionIndex * verticesPerSection + (j + 1)); + tris.Add(nextSectionIndex * verticesPerSection + j); + tris.Add(nextSectionIndex * verticesPerSection + (j + 1)); + } + } + sectionIndex++; + } + + } + + CommitMeshData(); + } + } + + private void ClearMeshData() + { + extrudedMesh.Clear(); + vertices.Clear(); + normals.Clear(); + tangents.Clear(); + uvs.Clear(); + vertColors.Clear(); + tris.Clear(); + } + + private void CommitMeshData() + { + extrudedMesh.SetVertices(vertices); + extrudedMesh.SetNormals(normals); + extrudedMesh.SetTangents(tangents); + extrudedMesh.SetColors(vertColors); + extrudedMesh.SetUVs(0, uvs); + extrudedMesh.SetTriangles(tris, 0, true); + } } } diff --git a/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiRopeLineRenderer.cs b/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiRopeLineRenderer.cs index 83a537ee9..e340a7b9d 100644 --- a/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiRopeLineRenderer.cs +++ b/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiRopeLineRenderer.cs @@ -8,14 +8,28 @@ namespace Obi { [AddComponentMenu("Physics/Obi/Obi Rope Line Renderer", 884)] [ExecuteInEditMode] - [RequireComponent(typeof(ObiPathSmoother))] - public class ObiRopeLineRenderer : MonoBehaviour, ObiActorRenderer + [RequireComponent(typeof(MeshRenderer))] + [RequireComponent(typeof(MeshFilter))] + [RequireComponent(typeof(ObiPathSmoother))] + public class ObiRopeLineRenderer : MonoBehaviour { - public ObiActor actor { get; private set; } + static ProfilerMarker m_UpdateLineRopeRendererChunksPerfMarker = new ProfilerMarker("UpdateLineRopeRenderer"); - public Material material; + private List vertices = new List(); + private List normals = new List(); + private List tangents = new List(); + private List uvs = new List(); + private List vertColors = new List(); + private List tris = new List(); - public RenderBatchParams renderParams = new RenderBatchParams(true); + ObiRopeBase rope; + ObiPathSmoother smoother; + +#if (UNITY_2019_1_OR_NEWER) + System.Action renderCallback; +#endif + + [HideInInspector] [NonSerialized] public Mesh lineMesh; [Range(0, 1)] public float uvAnchor = 0; /**< Normalized position of texture coordinate origin along rope.*/ @@ -26,42 +40,159 @@ namespace Obi public float thicknessScale = 0.8f; /**< Scales section thickness.*/ - public void Awake() - { - actor = GetComponent(); - } - void OnEnable() { - ((ObiActorRenderer)this).EnableRenderer(); + + CreateMeshIfNeeded(); + +#if (UNITY_2019_1_OR_NEWER) + renderCallback = new System.Action((cntxt, cam) => { UpdateRenderer(cam); }); + RenderPipelineManager.beginCameraRendering += renderCallback; +#endif + Camera.onPreCull += UpdateRenderer; + + rope = GetComponent(); + smoother = GetComponent(); } void OnDisable() { - ((ObiActorRenderer)this).DisableRenderer(); + +#if (UNITY_2019_1_OR_NEWER) + RenderPipelineManager.beginCameraRendering -= renderCallback; +#endif + Camera.onPreCull -= UpdateRenderer; + + GameObject.DestroyImmediate(lineMesh); } - public void OnValidate() + private void CreateMeshIfNeeded() { - ((ObiActorRenderer)this).SetRendererDirty(Oni.RenderingSystemType.LineRope); + if (lineMesh == null) + { + lineMesh = new Mesh(); + lineMesh.name = "extrudedMesh"; + lineMesh.MarkDynamic(); + GetComponent().mesh = lineMesh; + } } - RenderSystem ObiRenderer.CreateRenderSystem(ObiSolver solver) + public void UpdateRenderer(Camera camera) { - switch (solver.backendType) + using (m_UpdateLineRopeRendererChunksPerfMarker.Auto()) { -#if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) - case ObiSolver.BackendType.Burst: return new BurstLineRopeRenderSystem(solver); -#endif - case ObiSolver.BackendType.Compute: - default: + if (camera == null || !rope.gameObject.activeInHierarchy) + return; - if (SystemInfo.supportsComputeShaders) - return new ComputeLineRopeRenderSystem(solver); - return null; + CreateMeshIfNeeded(); + ClearMeshData(); + + float actualToRestLengthRatio = smoother.SmoothLength / rope.restLength; + + float vCoord = -uvScale.y * rope.restLength * uvAnchor; // v texture coordinate. + int sectionIndex = 0; + + Vector3 localSpaceCamera = rope.transform.InverseTransformPoint(camera.transform.position); + Vector3 vertex = Vector3.zero, normal = Vector3.zero; + Vector4 bitangent = Vector4.zero; + Vector2 uv = Vector2.zero; + + for (int c = 0; c < smoother.smoothChunks.Count; ++c) + { + + ObiList curve = smoother.smoothChunks[c]; + + for (int i = 0; i < curve.Count; ++i) + { + + // Calculate previous and next curve indices: + int prevIndex = Mathf.Max(i - 1, 0); + + // advance v texcoord: + vCoord += uvScale.y * (Vector3.Distance(curve.Data[i].position, curve.Data[prevIndex].position) / + (normalizeV ? smoother.SmoothLength : actualToRestLengthRatio)); + + // calculate section thickness (either constant, or particle radius based): + float sectionThickness = curve.Data[i].thickness * thicknessScale; + + + normal.x = curve.Data[i].position.x - localSpaceCamera.x; + normal.y = curve.Data[i].position.y - localSpaceCamera.y; + normal.z = curve.Data[i].position.z - localSpaceCamera.z; + normal.Normalize(); + + bitangent.x = -(normal.y * curve.Data[i].tangent.z - normal.z * curve.Data[i].tangent.y); + bitangent.y = -(normal.z * curve.Data[i].tangent.x - normal.x * curve.Data[i].tangent.z); + bitangent.z = -(normal.x * curve.Data[i].tangent.y - normal.y * curve.Data[i].tangent.x); + bitangent.w = 0; + bitangent.Normalize(); + + vertex.x = curve.Data[i].position.x - bitangent.x * sectionThickness; + vertex.y = curve.Data[i].position.y - bitangent.y * sectionThickness; + vertex.z = curve.Data[i].position.z - bitangent.z * sectionThickness; + vertices.Add(vertex); + + vertex.x = curve.Data[i].position.x + bitangent.x * sectionThickness; + vertex.y = curve.Data[i].position.y + bitangent.y * sectionThickness; + vertex.z = curve.Data[i].position.z + bitangent.z * sectionThickness; + vertices.Add(vertex); + + normals.Add(-normal); + normals.Add(-normal); + + bitangent.w = 1; + tangents.Add(bitangent); + tangents.Add(bitangent); + + vertColors.Add(curve.Data[i].color); + vertColors.Add(curve.Data[i].color); + + uv.x = 0; uv.y = vCoord; + uvs.Add(uv); + uv.x = 1; + uvs.Add(uv); + + if (i < curve.Count - 1) + { + tris.Add(sectionIndex * 2); + tris.Add((sectionIndex + 1) * 2); + tris.Add(sectionIndex * 2 + 1); + + tris.Add(sectionIndex * 2 + 1); + tris.Add((sectionIndex + 1) * 2); + tris.Add((sectionIndex + 1) * 2 + 1); + } + + sectionIndex++; + } + + } + + CommitMeshData(); } } + + private void ClearMeshData() + { + lineMesh.Clear(); + vertices.Clear(); + normals.Clear(); + tangents.Clear(); + uvs.Clear(); + vertColors.Clear(); + tris.Clear(); + } + + private void CommitMeshData() + { + lineMesh.SetVertices(vertices); + lineMesh.SetNormals(normals); + lineMesh.SetTangents(tangents); + lineMesh.SetColors(vertColors); + lineMesh.SetUVs(0, uvs); + lineMesh.SetTriangles(tris, 0, true); + } } } diff --git a/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiRopeMeshRenderer.cs b/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiRopeMeshRenderer.cs index c18e3de74..32837e564 100644 --- a/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiRopeMeshRenderer.cs +++ b/Assets/Obi/Scripts/RopeAndRod/Rendering/ObiRopeMeshRenderer.cs @@ -1,85 +1,259 @@ +using System; using System.Collections.Generic; using UnityEngine; +using Unity.Profiling; namespace Obi { [AddComponentMenu("Physics/Obi/Obi Rope Mesh Renderer", 886)] [ExecuteInEditMode] + [RequireComponent(typeof(MeshRenderer))] + [RequireComponent(typeof(MeshFilter))] [RequireComponent(typeof(ObiPathSmoother))] - public class ObiRopeMeshRenderer : MonoBehaviour, ObiActorRenderer, IMeshDataProvider + public class ObiRopeMeshRenderer : MonoBehaviour { - public Renderer sourceRenderer { get; protected set; } - public ObiActor actor { get; private set; } - public uint meshInstances { get {return instances;} } + static ProfilerMarker m_UpdateMeshRopeRendererChunksPerfMarker = new ProfilerMarker("UpdateMeshRopeRenderer"); - [field: SerializeField] - public Mesh sourceMesh { get; set; } + [SerializeProperty("SourceMesh")] + [SerializeField] private Mesh mesh; - [field: SerializeField] - public Material[] materials { get; set; } - - public virtual int vertexCount { get { return sourceMesh ? sourceMesh.vertexCount : 0; } } - public virtual int triangleCount { get { return sourceMesh ? sourceMesh.triangles.Length / 3 : 0; } } - - public RenderBatchParams renderParameters = new RenderBatchParams(true); - - public ObiPathFrame.Axis axis; + [SerializeProperty("SweepAxis")] + [SerializeField] private ObiPathFrame.Axis axis; public float volumeScaling = 0; public bool stretchWithRope = true; public bool spanEntireLength = true; - public uint instances = 1; - public float instanceSpacing = 0; + [SerializeProperty("Instances")] + [SerializeField] private int instances = 1; + + [SerializeProperty("InstanceSpacing")] + [SerializeField] private float instanceSpacing = 1; public float offset = 0; public Vector3 scale = Vector3.one; - public void Awake() + [HideInInspector] [SerializeField] private float meshSizeAlongAxis = 1; + + private Vector3[] inputVertices; + private Vector3[] inputNormals; + private Vector4[] inputTangents; + + private Vector3[] vertices; + private Vector3[] normals; + private Vector4[] tangents; + + private int[] orderedVertices = new int[0]; + + private ObiPathSmoother smoother; + + public Mesh SourceMesh { - actor = GetComponent(); - sourceRenderer = GetComponent(); + set { mesh = value; PreprocessInputMesh(); } + get { return mesh; } } - public void OnEnable() + public ObiPathFrame.Axis SweepAxis { - ((ObiActorRenderer)this).EnableRenderer(); + set { axis = value; PreprocessInputMesh(); } + get { return axis; } } - public void OnDisable() + public int Instances { - ((ObiActorRenderer)this).DisableRenderer(); + set { instances = value; PreprocessInputMesh(); } + get { return instances; } } - public void OnValidate() + public float InstanceSpacing { - ((ObiActorRenderer)this).SetRendererDirty(Oni.RenderingSystemType.MeshRope); + set { instanceSpacing = value; PreprocessInputMesh(); } + get { return instanceSpacing; } } - RenderSystem ObiRenderer.CreateRenderSystem(ObiSolver solver) + [HideInInspector] [NonSerialized] public Mesh deformedMesh; + + void OnEnable() { - switch (solver.backendType) + smoother = GetComponent(); + smoother.OnCurveGenerated += UpdateRenderer; + PreprocessInputMesh(); + } + + void OnDisable() + { + smoother.OnCurveGenerated -= UpdateRenderer; + GameObject.DestroyImmediate(deformedMesh); + } + + private void PreprocessInputMesh() + { + + if (deformedMesh == null) + { + deformedMesh = new Mesh(); + deformedMesh.name = "deformedMesh"; + deformedMesh.MarkDynamic(); + GetComponent().mesh = deformedMesh; + } + + deformedMesh.Clear(); + + if (mesh == null) + { + orderedVertices = new int[0]; + return; + } + + // Clamp instance count to a positive value. + instances = Mathf.Max(0, instances); + + // combine all mesh instances into a single mesh: + Mesh combinedMesh = new Mesh(); + CombineInstance[] meshInstances = new CombineInstance[instances]; + Vector3 pos = Vector3.zero; + + // initial offset for the combined mesh is half the size of its bounding box in the swept axis: + pos[(int)axis] = mesh.bounds.extents[(int)axis]; + + for (int i = 0; i < instances; ++i) + { + meshInstances[i].mesh = mesh; + meshInstances[i].transform = Matrix4x4.TRS(pos, Quaternion.identity, Vector3.one); + pos[(int)axis] = mesh.bounds.extents[(int)axis] + (i + 1) * mesh.bounds.size[(int)axis] * instanceSpacing; + } + combinedMesh.CombineMeshes(meshInstances, true, true); + + // get combined mesh data: + inputVertices = combinedMesh.vertices; + inputNormals = combinedMesh.normals; + inputTangents = combinedMesh.tangents; + + // sort vertices along curve axis: + float[] keys = new float[inputVertices.Length]; + orderedVertices = new int[inputVertices.Length]; + + for (int i = 0; i < keys.Length; ++i) + { + keys[i] = inputVertices[i][(int)axis]; + orderedVertices[i] = i; + } + + Array.Sort(keys, orderedVertices); + + // Copy the combined mesh data to deform it: + deformedMesh.vertices = combinedMesh.vertices; + deformedMesh.normals = combinedMesh.normals; + deformedMesh.tangents = combinedMesh.tangents; + deformedMesh.uv = combinedMesh.uv; + deformedMesh.uv2 = combinedMesh.uv2; + deformedMesh.uv3 = combinedMesh.uv3; + deformedMesh.uv4 = combinedMesh.uv4; + deformedMesh.colors = combinedMesh.colors; + deformedMesh.triangles = combinedMesh.triangles; + + vertices = deformedMesh.vertices; + normals = deformedMesh.normals; + tangents = deformedMesh.tangents; + + // Calculate scale along swept axis so that the mesh spans the entire lenght of the rope if required. + meshSizeAlongAxis = combinedMesh.bounds.size[(int)axis]; + + // destroy combined mesh: + GameObject.DestroyImmediate(combinedMesh); + + } + + public void UpdateRenderer(ObiActor actor) + { + using (m_UpdateMeshRopeRendererChunksPerfMarker.Auto()) { -#if (OBI_BURST && OBI_MATHEMATICS && OBI_COLLECTIONS) - case ObiSolver.BackendType.Burst: return new BurstMeshRopeRenderSystem(solver); -#endif - case ObiSolver.BackendType.Compute: - default: + if (mesh == null) + return; - if (SystemInfo.supportsComputeShaders) - return new ComputeMeshRopeRenderSystem(solver); - return null; + if (smoother.smoothChunks.Count == 0) + return; + + ObiList curve = smoother.smoothChunks[0]; + + if (curve.Count < 2) + return; + + var rope = actor as ObiRopeBase; + + float actualToRestLengthRatio = stretchWithRope ? smoother.SmoothLength / rope.restLength : 1; + + // squashing factor, makes mesh thinner when stretched and thicker when compresssed. + float squashing = Mathf.Clamp(1 + volumeScaling * (1 / Mathf.Max(actualToRestLengthRatio, 0.01f) - 1), 0.01f, 2); + + // Calculate scale along swept axis so that the mesh spans the entire lenght of the rope if required. + Vector3 actualScale = scale; + if (spanEntireLength) + actualScale[(int)axis] = rope.restLength / meshSizeAlongAxis; + + float previousVertexValue = 0; + float meshLength = 0; + int index = 0; + int nextIndex = 1; + int prevIndex = 0; + float sectionMagnitude = Vector3.Distance(curve[index].position, curve[nextIndex].position); + + // basis matrix for deforming the mesh: + Matrix4x4 basis = curve[0].ToMatrix(axis); + + for (int i = 0; i < orderedVertices.Length; ++i) + { + + int vIndex = orderedVertices[i]; + float vertexValue = inputVertices[vIndex][(int)axis] * actualScale[(int)axis] + offset; + + // Calculate how much we've advanced in the sort axis since the last vertex: + meshLength += (vertexValue - previousVertexValue) * actualToRestLengthRatio; + previousVertexValue = vertexValue; + + // If we have advanced to the next section of the curve: + while (meshLength > sectionMagnitude && sectionMagnitude > Mathf.Epsilon) + { + + meshLength -= sectionMagnitude; + index = Mathf.Min(index + 1, curve.Count - 1); + + // Calculate previous and next curve indices: + nextIndex = Mathf.Min(index + 1, curve.Count - 1); + prevIndex = Mathf.Max(index - 1, 0); + + // Calculate current tangent as the vector between previous and next curve points: + sectionMagnitude = Vector3.Distance(curve[index].position, curve[nextIndex].position); + + // Update basis matrix: + basis = curve[index].ToMatrix(axis); + + } + + float sectionThickness = curve[index].thickness; + + // calculate deformed vertex position: + Vector3 offsetFromCurve = Vector3.Scale(inputVertices[vIndex], actualScale * sectionThickness * squashing); + offsetFromCurve[(int)axis] = meshLength; + + vertices[vIndex] = curve[index].position + basis.MultiplyVector(offsetFromCurve); + normals[vIndex] = basis.MultiplyVector(inputNormals[vIndex]); + tangents[vIndex] = basis * inputTangents[vIndex]; // avoids expensive implicit conversion from Vector4 to Vector3. + tangents[vIndex].w = inputTangents[vIndex].w; + } + + CommitMeshData(); } } - public virtual void GetVertices(List vertices) { sourceMesh.GetVertices(vertices); } - public virtual void GetNormals(List normals) { sourceMesh.GetNormals(normals); } - public virtual void GetTangents(List tangents) { sourceMesh.GetTangents(tangents); } - public virtual void GetColors(List colors) { sourceMesh.GetColors(colors); } - public virtual void GetUVs(int channel, List uvs) { sourceMesh.GetUVs(channel, uvs); } - - public virtual void GetTriangles(List triangles) { triangles.Clear(); triangles.AddRange(sourceMesh.triangles); } + private void CommitMeshData() + { + deformedMesh.vertices = vertices; + deformedMesh.normals = normals; + deformedMesh.tangents = tangents; + deformedMesh.RecalculateBounds(); + } } } diff --git a/Assets/Obi/Scripts/RopeAndRod/Utils/ObiPinhole.cs b/Assets/Obi/Scripts/RopeAndRod/Utils/ObiPinhole.cs deleted file mode 100644 index 827462c95..000000000 --- a/Assets/Obi/Scripts/RopeAndRod/Utils/ObiPinhole.cs +++ /dev/null @@ -1,337 +0,0 @@ -using System; using UnityEngine; namespace Obi { [AddComponentMenu("Physics/Obi/Obi Pinhole", 820)] [RequireComponent(typeof(ObiRopeBase))] [ExecuteInEditMode] public class ObiPinhole : MonoBehaviour { [SerializeField] [HideInInspector] private ObiRopeBase m_Rope; [SerializeField] [HideInInspector] private Transform m_Target; [Range(0, 1)] [SerializeField] [HideInInspector] private float m_Position = 0; - - [SerializeField] [HideInInspector] private bool m_LimitRange = false; [MinMax(0, 1)] [SerializeField] [HideInInspector] private Vector2 m_Range = new Vector2(0, 1); [Range(0, 1)] [SerializeField] [HideInInspector] private float m_Friction = 0; [SerializeField] [HideInInspector] private float m_MotorSpeed = 0; [SerializeField] [HideInInspector] private float m_MotorForce = 0; - [SerializeField] [HideInInspector] private float m_Compliance = 0; [SerializeField] [HideInInspector] private bool m_ClampAtEnds = true; - - [SerializeField] [HideInInspector] private ObiPinholeConstraintsBatch.PinholeEdge currentEdge; - [SerializeField] [HideInInspector] public ObiPinholeConstraintsBatch.PinholeEdge firstEdge; - [SerializeField] [HideInInspector] public ObiPinholeConstraintsBatch.PinholeEdge lastEdge; - - // private variables are serialized during script reloading, to keep their value. Must mark them explicitly as non-serialized. - [NonSerialized] private ObiPinholeConstraintsBatch pinBatch; [NonSerialized] private ObiColliderBase attachedCollider; [NonSerialized] private int attachedColliderHandleIndex; - - [NonSerialized] private Vector3 m_PositionOffset; - [NonSerialized] private bool m_ParametersDirty = true; - [NonSerialized] private bool m_PositionDirty = false; - [NonSerialized] private bool m_RangeDirty = false; - - /// /// The rope this attachment is added to. /// public ObiActor rope { get { return m_Rope; } } - - public float edgeCoordinate - { - get { return currentEdge.coordinate; } - } - - public int edgeIndex - { - get { return currentEdge.edgeIndex; } - } - - /// /// The target transform that the pinhole should be attached to. /// public Transform target { get { return m_Target; } set { if (value != m_Target) { m_Target = value; Bind(); } } } - - /// /// Normalized coordinate of the point along the rope where the pinhole is positioned. /// - public float position - { - get { return m_Position; } - set - { - if (!Mathf.Approximately(value, m_Position)) { m_Position = value; CalculateMu(); } - } - } - - public bool limitRange - { - get { return m_LimitRange; } - set - { if (m_LimitRange != value) - { - m_LimitRange = value; - CalculateRange(); - } } - } - - /// /// Normalized coordinate of the point along the rope where the pinhole is positioned. /// - public Vector2 range - { - get { return m_Range; } - set - { m_Range = value; CalculateRange(); } - } - - /// /// Whether this pinhole is currently bound or not. /// public bool isBound { get { return m_Target != null && currentEdge.edgeIndex >= 0; } } - - /// /// Constraint compliance. /// /// High compliance values will increase the pinhole's elasticity. public float compliance { get { return m_Compliance; } set { if (!Mathf.Approximately(value, m_Compliance)) { m_Compliance = value; m_ParametersDirty = true; } } } - - public float friction { get { return m_Friction; } set { if (!Mathf.Approximately(value, m_Friction)) { m_Friction = value; m_ParametersDirty = true; - } } } - - public float motorSpeed { get { return m_MotorSpeed; } set { if (!Mathf.Approximately(value, m_MotorSpeed)) { m_MotorSpeed = value; m_ParametersDirty = true; } } } - - public float motorForce { get { return m_MotorForce; } set { if (!Mathf.Approximately(value, m_MotorForce)) { m_MotorForce = value; m_ParametersDirty = true; } } } - - public bool clampAtEnds { get { return m_ClampAtEnds; } set { if (m_ClampAtEnds != value) { m_ClampAtEnds = value; m_ParametersDirty = true; } } } - - /// /// Force threshold above which the pinhole should break. /// [Delayed] public float breakThreshold = float.PositiveInfinity; public float relativeVelocity { get; private set; } private void OnEnable() { m_Rope = GetComponent(); m_Rope.OnBlueprintLoaded += Actor_OnBlueprintLoaded; m_Rope.OnSimulationStart += Actor_OnSimulationStart; m_Rope.OnRequestReadback += Actor_OnRequestReadback; if (m_Rope.solver != null) Actor_OnBlueprintLoaded(m_Rope, m_Rope.sourceBlueprint); EnablePinhole(); } - - private void OnDisable() { DisablePinhole(); m_Rope.OnBlueprintLoaded -= Actor_OnBlueprintLoaded; m_Rope.OnSimulationStart -= Actor_OnSimulationStart; m_Rope.OnRequestReadback -= Actor_OnRequestReadback; } private void OnValidate() { m_Rope = GetComponent(); - m_ParametersDirty = true; m_PositionDirty = true; m_RangeDirty = true; } private void Actor_OnBlueprintLoaded(ObiActor act, ObiActorBlueprint blueprint) { Bind(); } private void Actor_OnSimulationStart(ObiActor act, float stepTime, float substepTime) { - // Attachments must be updated at the start of the step, before performing any simulation. - UpdatePinhole(); - - // if there's any broken constraint, flag pinhole constraints as dirty for remerging at the start of the next step. - BreakPinhole(substepTime); } - - private void Actor_OnRequestReadback(ObiActor actor) - { - if (enabled && m_Rope.isLoaded && isBound) { - var solver = m_Rope.solver; - - var actorConstraints = m_Rope.GetConstraintsByType(Oni.ConstraintType.Pinhole) as ObiConstraints; - var solverConstraints = solver.GetConstraintsByType(Oni.ConstraintType.Pinhole) as ObiConstraints; - - if (actorConstraints != null && pinBatch != null && actorConstraints.batchCount <= solverConstraints.batchCount) - { - int pinBatchIndex = actorConstraints.batches.IndexOf(pinBatch); - if (pinBatchIndex >= 0 && pinBatchIndex < rope.solverBatchOffsets[(int)Oni.ConstraintType.Pinhole].Count) - { - var solverBatch = solverConstraints.batches[pinBatchIndex]; - - solverBatch.particleIndices.Readback(); - solverBatch.edgeMus.Readback(); - solverBatch.relativeVelocities.Readback(); - } - } - } - } - - private void ClampMuToRange() - { - if (m_LimitRange) - { - float maxCoord = lastEdge.GetRopeCoordinate(m_Rope); - float minCoord = firstEdge.GetRopeCoordinate(m_Rope); - - if (m_Position > maxCoord) - { - m_Position = maxCoord; - currentEdge.edgeIndex = m_Rope.GetEdgeAt(m_Position, out currentEdge.coordinate); - m_PositionDirty = true; - } - else if (m_Position < minCoord) - { - m_Position = minCoord; - currentEdge.edgeIndex = m_Rope.GetEdgeAt(m_Position, out currentEdge.coordinate); - m_PositionDirty = true; - } - } - } - - public void CalculateMu() - { - currentEdge.edgeIndex = m_Rope.GetEdgeAt(m_Position, out currentEdge.coordinate); - ClampMuToRange(); - - m_PositionDirty = true; - } public void CalculateRange() - { - if (m_LimitRange) - { - firstEdge.edgeIndex = m_Rope.GetEdgeAt(m_Range.x, out firstEdge.coordinate); - lastEdge.edgeIndex = m_Rope.GetEdgeAt(m_Range.y, out lastEdge.coordinate); - } - else - { - firstEdge.edgeIndex = m_Rope.GetEdgeAt(0, out firstEdge.coordinate); - lastEdge.edgeIndex = m_Rope.GetEdgeAt(1, out lastEdge.coordinate); - firstEdge.coordinate = -float.MaxValue; - lastEdge.coordinate = float.MaxValue; - } - - ClampMuToRange(); - - m_RangeDirty = true; - } public void Bind() { - // Disable pinhole. - DisablePinhole(); if (m_Target != null && m_Rope.isLoaded) { Matrix4x4 bindMatrix = m_Target.worldToLocalMatrix * m_Rope.solver.transform.localToWorldMatrix; - - var ropeBlueprint = m_Rope.sharedBlueprint as ObiRopeBlueprintBase; - if (ropeBlueprint != null && ropeBlueprint.deformableEdges != null) - { - currentEdge.edgeIndex = m_Rope.GetEdgeAt(m_Position, out currentEdge.coordinate); - - if (currentEdge.edgeIndex >= 0) - { - CalculateRange(); - m_RangeDirty = false; - m_PositionDirty = false; - - int p1 = ropeBlueprint.deformableEdges[currentEdge.edgeIndex * 2]; - int p2 = ropeBlueprint.deformableEdges[currentEdge.edgeIndex * 2+1]; - Vector4 pos = Vector4.Lerp(m_Rope.solver.positions[m_Rope.solverIndices[p1]], m_Rope.solver.positions[m_Rope.solverIndices[p2]], currentEdge.coordinate); - m_PositionOffset = bindMatrix.MultiplyPoint3x4(pos); - } } } else { currentEdge.edgeIndex = -1; } // Re-enable pinhole. EnablePinhole(); } private void EnablePinhole() { if (enabled && m_Rope.isLoaded && isBound) { var pins = m_Rope.GetConstraintsByType(Oni.ConstraintType.Pinhole) as ObiPinholeConstraintsData; - attachedCollider = m_Target.GetComponent(); - - if (pins != null && attachedCollider != null && pinBatch == null) - { - // create a new data batch with all our pin constraints: - pinBatch = new ObiPinholeConstraintsBatch(pins); - pinBatch.AddConstraint(currentEdge, - firstEdge, - lastEdge, - m_Rope, - attachedCollider, - m_PositionOffset, - m_Compliance, - m_Friction, - m_MotorSpeed, - m_MotorForce, - m_ClampAtEnds); - - pinBatch.activeConstraintCount++; - - // add the batch to the actor: - pins.AddBatch(pinBatch); - - // store the attached collider's handle: - attachedColliderHandleIndex = -1; - if (attachedCollider.Handle != null) - attachedColliderHandleIndex = attachedCollider.Handle.index; - - m_Rope.SetConstraintsDirty(Oni.ConstraintType.Pinhole); - } } } private void DisablePinhole() { if (isBound) { if (pinBatch != null) - { - var pins = m_Rope.GetConstraintsByType(Oni.ConstraintType.Pinhole) as ObiConstraints; - if (pins != null) - { - pins.RemoveBatch(pinBatch); - if (rope.isLoaded) - m_Rope.SetConstraintsDirty(Oni.ConstraintType.Pinhole); - } - - attachedCollider = null; - pinBatch = null; - attachedColliderHandleIndex = -1; - } } } private void UpdatePinhole() { if (enabled && m_Rope.isLoaded && isBound) { - UpdateEdgeCoordinate(); - UpdateParameters(); - - // in case the handle has been updated/invalidated (for instance, when disabling the target) rebuild constraints: - if (attachedCollider != null && - attachedCollider.Handle != null && - attachedCollider.Handle.index != attachedColliderHandleIndex) - { - attachedColliderHandleIndex = attachedCollider.Handle.index; - m_Rope.SetConstraintsDirty(Oni.ConstraintType.Pinhole); - } } else if (!isBound && attachedColliderHandleIndex >= 0) - { - attachedColliderHandleIndex = -1; - m_Rope.SetConstraintsDirty(Oni.ConstraintType.Pinhole); - } } - - private void UpdateParameters() - { - if (enabled && m_Rope.isLoaded && isBound && m_ParametersDirty) { - var solver = m_Rope.solver; - - var actorConstraints = m_Rope.GetConstraintsByType(Oni.ConstraintType.Pinhole) as ObiConstraints; - var solverConstraints = solver.GetConstraintsByType(Oni.ConstraintType.Pinhole) as ObiConstraints; - - if (actorConstraints != null && pinBatch != null && actorConstraints.batchCount <= solverConstraints.batchCount) - { - int pinBatchIndex = actorConstraints.batches.IndexOf(pinBatch); - if (pinBatchIndex >= 0 && pinBatchIndex < rope.solverBatchOffsets[(int)Oni.ConstraintType.Pinhole].Count) - { - int offset = rope.solverBatchOffsets[(int)Oni.ConstraintType.Pinhole][pinBatchIndex]; - var solverBatch = solverConstraints.batches[pinBatchIndex]; - - for (int i = 0; i < pinBatch.activeConstraintCount; i++) - { - solverBatch.parameters[(offset + i) * 5] = m_Compliance; - solverBatch.parameters[(offset + i) * 5+1] = m_Friction; - solverBatch.parameters[(offset + i) * 5+2] = m_MotorSpeed; - solverBatch.parameters[(offset + i) * 5+3] = m_MotorForce; - solverBatch.parameters[(offset + i) * 5+4] = m_ClampAtEnds ? 1 : 0; - } - solverBatch.parameters.Upload(); - - m_ParametersDirty = false; - } - } - } - } private void UpdateEdgeCoordinate() - { - if (enabled && m_Rope.isLoaded && isBound) { - var solver = m_Rope.solver; - - var actorConstraints = m_Rope.GetConstraintsByType(Oni.ConstraintType.Pinhole) as ObiConstraints; - var solverConstraints = solver.GetConstraintsByType(Oni.ConstraintType.Pinhole) as ObiConstraints; - - if (actorConstraints != null && pinBatch != null && actorConstraints.batchCount <= solverConstraints.batchCount) - { - int pinBatchIndex = actorConstraints.batches.IndexOf(pinBatch); - if (pinBatchIndex >= 0 && pinBatchIndex < rope.solverBatchOffsets[(int)Oni.ConstraintType.Pinhole].Count) - { - int offset = rope.solverBatchOffsets[(int)Oni.ConstraintType.Pinhole][pinBatchIndex]; - var solverBatch = solverConstraints.batches[pinBatchIndex]; - - solverBatch.particleIndices.WaitForReadback(); - solverBatch.edgeMus.WaitForReadback(); - solverBatch.relativeVelocities.WaitForReadback(); - - if (m_RangeDirty) - { - // update edge index and coordinate, then upload them. - for (int i = 0; i < pinBatch.activeConstraintCount; i++) - { - solverBatch.edgeRanges[(offset + i) * 2] = m_Rope.deformableEdgesOffset + firstEdge.edgeIndex; - solverBatch.edgeRanges[(offset + i) * 2 + 1] = m_Rope.deformableEdgesOffset + lastEdge.edgeIndex; - solverBatch.edgeRangeMus[(offset + i) * 2] = firstEdge.coordinate; - solverBatch.edgeRangeMus[(offset + i) * 2 + 1] = lastEdge.coordinate; - } - solverBatch.edgeRanges.Upload(); - solverBatch.edgeRangeMus.Upload(); - - m_RangeDirty = false; - } - - if (m_PositionDirty) - { - // update edge index and coordinate, then upload them. - for (int i = 0; i < pinBatch.activeConstraintCount; i++) - { - solverBatch.particleIndices[offset + i] = m_Rope.deformableEdgesOffset + currentEdge.edgeIndex; - solverBatch.edgeMus[offset + i] = currentEdge.coordinate; - } - solverBatch.particleIndices.Upload(); - solverBatch.edgeMus.Upload(); - - m_PositionDirty = false; - } - else - { - // read edge index and coordinate: - for (int i = 0; i < pinBatch.activeConstraintCount; i++) - { - currentEdge.coordinate = solverBatch.edgeMus[offset + i]; - currentEdge.edgeIndex = solverBatch.particleIndices[offset + i] - m_Rope.deformableEdgesOffset; - m_Position = currentEdge.GetRopeCoordinate(m_Rope); - } - } - - for (int i = 0; i < pinBatch.activeConstraintCount; i++) - { - relativeVelocity = solverBatch.relativeVelocities[offset + i]; - } - } - } - } - } private void BreakPinhole(float substepTime) { if (enabled && m_Rope.isLoaded && isBound) { var solver = m_Rope.solver; var actorConstraints = m_Rope.GetConstraintsByType(Oni.ConstraintType.Pinhole) as ObiConstraints; var solverConstraints = solver.GetConstraintsByType(Oni.ConstraintType.Pinhole) as ObiConstraints; bool dirty = false; if (actorConstraints != null && pinBatch != null && actorConstraints.batchCount <= solverConstraints.batchCount) { int pinBatchIndex = actorConstraints.batches.IndexOf(pinBatch); if (pinBatchIndex >= 0 && pinBatchIndex < rope.solverBatchOffsets[(int)Oni.ConstraintType.Pinhole].Count) { int offset = rope.solverBatchOffsets[(int)Oni.ConstraintType.Pinhole][pinBatchIndex]; var solverBatch = solverConstraints.batches[pinBatchIndex]; float sqrTime = substepTime * substepTime; for (int i = 0; i < pinBatch.activeConstraintCount; i++) { - // In case the handle has been created/destroyed. - if (pinBatch.pinBodies[i] != attachedCollider.Handle) { pinBatch.pinBodies[i] = attachedCollider.Handle; dirty = true; } - - // in case the constraint has been broken: - if (-solverBatch.lambdas[offset + i] / sqrTime > breakThreshold) { pinBatch.DeactivateConstraint(i); dirty = true; } } } } - - // constraints are recreated at the start of a step. - if (dirty) m_Rope.SetConstraintsDirty(Oni.ConstraintType.Pinhole); } } } } \ No newline at end of file diff --git a/Assets/Obi/Scripts/RopeAndRod/Utils/ObiPinhole.cs.meta b/Assets/Obi/Scripts/RopeAndRod/Utils/ObiPinhole.cs.meta deleted file mode 100644 index bec258d4c..000000000 --- a/Assets/Obi/Scripts/RopeAndRod/Utils/ObiPinhole.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2aadf7c5471054b0db8c70bd317bc272 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {fileID: 2800000, guid: 214df93f7c2ed4c1094bb6105c050575, type: 3} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Obi/Scripts/RopeAndRod/Utils/ObiRopeAttach.cs b/Assets/Obi/Scripts/RopeAndRod/Utils/ObiRopeAttach.cs index 7a108393c..63fc3b315 100644 --- a/Assets/Obi/Scripts/RopeAndRod/Utils/ObiRopeAttach.cs +++ b/Assets/Obi/Scripts/RopeAndRod/Utils/ObiRopeAttach.cs @@ -8,14 +8,13 @@ namespace Obi [Range(0,1)] public float m; - public void LateUpdate() + public void LateUpdate() { - if (smoother != null && smoother.actor.isLoaded) + if (smoother != null) { - var trfm = smoother.actor.solver.transform; ObiPathFrame section = smoother.GetSectionAt(m); - transform.position = trfm.TransformPoint(section.position); - transform.rotation = trfm.rotation * Quaternion.LookRotation(section.tangent, section.binormal); + transform.position = smoother.transform.TransformPoint(section.position); + transform.rotation = smoother.transform.rotation * (Quaternion.LookRotation(section.tangent, section.binormal)); } } diff --git a/Assets/Obi/Scripts/RopeAndRod/Utils/ObiRopePrefabPlugger.cs b/Assets/Obi/Scripts/RopeAndRod/Utils/ObiRopePrefabPlugger.cs index 9697db2e0..045b3d99d 100644 --- a/Assets/Obi/Scripts/RopeAndRod/Utils/ObiRopePrefabPlugger.cs +++ b/Assets/Obi/Scripts/RopeAndRod/Utils/ObiRopePrefabPlugger.cs @@ -8,6 +8,7 @@ namespace Obi /** * This component plugs a prefab instance at each cut in the rope. Optionally, it will also place a couple instances at the start/end of an open rope. */ + [RequireComponent(typeof(ObiRope))] [RequireComponent(typeof(ObiPathSmoother))] public class ObiRopePrefabPlugger : MonoBehaviour { @@ -24,12 +25,12 @@ namespace Obi { instances = new List(); smoother = GetComponent(); - GetComponent().OnInterpolate += UpdatePlugs; + smoother.OnCurveGenerated += UpdatePlugs; } void OnDisable() { - GetComponent().OnInterpolate -= UpdatePlugs; + smoother.OnCurveGenerated -= UpdatePlugs; ClearPrefabInstances(); } @@ -53,46 +54,43 @@ namespace Obi } // Update is called once per frame - void UpdatePlugs(ObiActor actor, float simulatedTime, float substepTime) + void UpdatePlugs(ObiActor actor) { - if (!actor.isLoaded) - return; + var rope = actor as ObiRopeBase; // cache the rope's transform matrix/quaternion: - Matrix4x4 l2w = smoother.actor.solver.transform.localToWorldMatrix; + Matrix4x4 l2w = rope.transform.localToWorldMatrix; Quaternion l2wRot = l2w.rotation; int instanceIndex = 0; - var system = actor.solver.GetRenderSystem() as ObiPathSmootherRenderSystem; - int chunkCount = system.GetChunkCount(smoother.indexInSystem); - // place prefabs at the start/end of each curve: - for (int c = 0; c < chunkCount; ++c) + for (int c = 0; c < smoother.smoothChunks.Count; ++c) { + ObiList curve = smoother.smoothChunks[c]; + if ((plugTears && c > 0) || (plugStart && c == 0)) { var instance = GetOrCreatePrefabInstance(instanceIndex++); instance.SetActive(true); - ObiPathFrame frame = system.GetFrameAt(smoother.indexInSystem, c, 0); + ObiPathFrame frame = curve[0]; instance.transform.position = l2w.MultiplyPoint3x4(frame.position); instance.transform.rotation = l2wRot * (Quaternion.LookRotation(-frame.tangent, frame.binormal)); instance.transform.localScale = instanceScale; } - - if ((plugTears && c < chunkCount - 1) || - (plugEnd && c == chunkCount - 1)) + if ((plugTears && c < smoother.smoothChunks.Count - 1) || + (plugEnd && c == smoother.smoothChunks.Count - 1)) { + var instance = GetOrCreatePrefabInstance(instanceIndex++); instance.SetActive(true); - int frameCount = system.GetSmoothFrameCount(smoother.indexInSystem, c); - ObiPathFrame frame = system.GetFrameAt(smoother.indexInSystem, c, frameCount-1); + ObiPathFrame frame = curve[curve.Count - 1]; instance.transform.position = l2w.MultiplyPoint3x4(frame.position); - instance.transform.rotation = l2wRot * Quaternion.LookRotation(frame.tangent, frame.binormal); + instance.transform.rotation = l2wRot * (Quaternion.LookRotation(frame.tangent, frame.binormal)); instance.transform.localScale = instanceScale; } diff --git a/Assets/Obi/Scripts/RopeAndRod/Utils/ObiRopeReel.cs b/Assets/Obi/Scripts/RopeAndRod/Utils/ObiRopeReel.cs index 58dfb54f4..be1c694b7 100644 --- a/Assets/Obi/Scripts/RopeAndRod/Utils/ObiRopeReel.cs +++ b/Assets/Obi/Scripts/RopeAndRod/Utils/ObiRopeReel.cs @@ -13,19 +13,14 @@ namespace Obi public float inThreshold = 0.4f; [Header("Roll out/in speeds")] - public float outSpeed = 4; - public float inSpeed = 2; + public float outSpeed = 0.05f; + public float inSpeed = 0.15f; - public float maxLength = 10; - - private float restLength; - - public void Awake() + public void Awake() { cursor = GetComponent(); rope = GetComponent(); - restLength = rope.restLength; - } + } public void OnValidate() { @@ -38,25 +33,21 @@ namespace Obi { // get current and rest lengths: float length = rope.CalculateLength(); + float restLength = rope.restLength; // calculate difference between current length and rest length: float diff = Mathf.Max(0, length - restLength); - float lengthChange = 0; - // if the rope has been stretched beyond the reel out threshold, increase its rest length: if (diff > outThreshold) - lengthChange = outSpeed * Time.deltaTime; + restLength += diff * outSpeed; // if the rope is not stretched past the reel in threshold, decrease its rest length: if (diff < inThreshold) - lengthChange = -inSpeed * Time.deltaTime; + restLength -= diff * inSpeed; - // make sure not to exceed maxLength: - lengthChange -= Mathf.Max(0, restLength + lengthChange - maxLength); - - // set the new rest length: - restLength = cursor.ChangeLength(lengthChange); + // set the new rest length: + cursor.ChangeLength(restLength); } } } diff --git a/Assets/Plugins/Easy Save 3/Resources/ES3/ES3Defaults.asset b/Assets/Plugins/Easy Save 3/Resources/ES3/ES3Defaults.asset index 873994780..04facf78f 100644 --- a/Assets/Plugins/Easy Save 3/Resources/ES3/ES3Defaults.asset +++ b/Assets/Plugins/Easy Save 3/Resources/ES3/ES3Defaults.asset @@ -71,6 +71,13 @@ MonoBehaviour: - StompyRobot.SRF - Unity.InputSystem.RebindingUI - VInspector + - WaveHarmonic.Crest + - WaveHarmonic.Crest.Samples + - WaveHarmonic.Crest.Samples.Boats + - WaveHarmonic.Crest.Samples.Examples + - WaveHarmonic.Crest.Samples.Ripples + - WaveHarmonic.Crest.Scripting + - WaveHarmonic.Crest.Shared showAdvancedSettings: 0 addMgrToSceneAutomatically: 0 autoUpdateReferences: 1 diff --git a/Assets/ResRaw/Maps/Map1/Map1.unity b/Assets/ResRaw/Maps/Map1/Map1.unity index 760f239bc..88f176b9e 100644 --- a/Assets/ResRaw/Maps/Map1/Map1.unity +++ b/Assets/ResRaw/Maps/Map1/Map1.unity @@ -15,9 +15,9 @@ RenderSettings: m_ObjectHideFlags: 0 serializedVersion: 10 m_Fog: 0 - m_FogColor: {r: 0.37126836, g: 0.43109637, b: 0.55486846, a: 0.6347309} + m_FogColor: {r: 0.31837568, g: 0.37657586, b: 0.49708903, a: 0.5801726} m_FogMode: 2 - m_FogDensity: 0.05 + m_FogDensity: 0.002 m_LinearFogStart: 0 m_LinearFogEnd: 300 m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} @@ -25,8 +25,8 @@ RenderSettings: m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} m_AmbientIntensity: 0.8050667 m_AmbientMode: 0 - m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 1546849776} + m_SubtractiveShadowColor: {r: 0.8679245, g: 0.8679245, b: 0.8679245, a: 1} + m_SkyboxMaterial: {fileID: 641191170} m_HaloStrength: 0.5 m_FlareStrength: 1 m_FlareFadeSpeed: 3 @@ -119,6 +119,52 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} +--- !u!1 &40077496 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 40077497} + - component: {fileID: 40077498} + m_Layer: 0 + m_Name: Wind Zone + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &40077497 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 40077496} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0.38268346, z: -0, w: 0.92387956} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 989742918774999200} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!182 &40077498 +WindZone: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 40077496} + m_Enabled: 1 + m_Mode: 0 + m_Radius: 20 + m_WindMain: 0.5 + m_WindTurbulence: 0.2 + m_WindPulseMagnitude: 0.5 + m_WindPulseFrequency: 0.01 --- !u!1 &116710580 GameObject: m_ObjectHideFlags: 0 @@ -165,6 +211,24 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 26623fd0e291a478a9f8b68a3df7e8a6, type: 3} m_Name: m_EditorClassIdentifier: + _Mode: 0 + _Weight: 1 + _Queue: 0 + _Blend: 1 + _FeatherWidth: 0.1 + _FollowHorizontalWaveMotion: 0 + _Data: + rid: -2 + _DrawBounds: 0 + _Version: 0 + _Primitive: 3 + _Inverted: 0 + _WaterHeightDistanceCulling: 0 + references: + version: 2 + RefIds: + - rid: -2 + type: {class: , ns: , asm: } --- !u!23 &116710583 MeshRenderer: m_ObjectHideFlags: 0 @@ -309,6 +373,20 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 8958fecc82ae04c7d9128101addbdc3b, type: 3} m_Name: m_EditorClassIdentifier: + _Version: 0 + _Radius: 1 + _Weight: 1 + _WeightVerticalMultiplier: 0.5 + _InnerSphereMultiplier: 1.55 + _InnerSphereOffset: 0.109 + _VelocityOffset: 0.04 + _CompensateForWaveMotion: 0.45 + _BoostLargeWaves: 0 + _TeleportSpeed: 500 + _WarnOnTeleport: 0 + _MaximumSpeed: 100 + _WarnOnSpeedClamp: 0 + _DebugSubsteps: 0 --- !u!1 &211586105 GameObject: m_ObjectHideFlags: 0 @@ -434,6 +512,357 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!21 &641191170 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Enviro/Skybox + m_Shader: {fileID: 4800000, guid: 34fee0a1b19b20b45aea7483b5f757da, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _GalaxyTex: + m_Texture: {fileID: 8900000, guid: 5734983fc81450b4187c3cfa5985edef, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MoonGlowTex: + m_Texture: {fileID: 2800000, guid: 6838e0810da4e49488b5d9a6ee76eb07, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MoonTex: + m_Texture: {fileID: 2800000, guid: c6fd9f694390e0245b6dca5812065950, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _StarsTex: + m_Texture: {fileID: 8900000, guid: b5a7175da0f133b4d951c19c9c2cebfc, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SunTex: + m_Texture: {fileID: 2800000, guid: c95bed5306e94f24ba5802d841607ac7, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: [] + m_Colors: [] + m_BuildTextureStacks: [] + m_AllowLocking: 1 +--- !u!1 &718680766 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 718680767} + - component: {fileID: 718680768} + m_Layer: 0 + m_Name: Water + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &718680767 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 718680766} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 965921865900907107} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &718680768 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 718680766} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e64c239f69eea46778ded6dcc3427a34, type: 3} + m_Name: + m_EditorClassIdentifier: WaveHarmonic.Crest::WaveHarmonic.Crest.WaterRenderer + _Version: 0 + _Camera: {fileID: 0} + _TimeProvider: {fileID: 0} + _OverrideRenderHDR: 0 + _RenderHDR: 1 + _WindSpeed: 10 + _OverrideGravity: 0 + _GravityOverride: -9.8 + _GravityMultiplier: 1 + _PrimaryLight: {fileID: 0} + _Layer: 4 + _Material: {fileID: 2100000, guid: 8ab064b6606504a55b489af2787350c2, type: 2} + _VolumeMaterial: {fileID: 0} + _ChunkTemplate: {fileID: 1516456258233481520, guid: 17840562212c147d6bdb5144d35bc442, type: 3} + _CastShadows: 0 + _WriteMotionVectors: 1 + _WriteToDepthTexture: 1 + _WaterBodyCulling: 1 + _TimeSliceBoundsUpdateFrameCount: 1 + _SurfaceSelfIntersectionFixMode: 4 + _AllowRenderQueueSorting: 0 + _ScaleRange: {x: 4, y: 256} + _DropDetailHeightBasedOnWaves: 0.2 + _Slices: 7 + _Resolution: 384 + _GeometryDownSampleFactor: 2 + _ExtentsSizeMultiplier: 100 + _Viewpoint: {fileID: 0} + _SampleTerrainHeightForScale: 1 + _ForceScaleChangeSmoothing: 0 + _TeleportThreshold: 100 + _AnimatedWavesLod: + rid: 4604655776581025792 + _DepthLod: + rid: 4604655776581025793 + _LevelLod: + rid: 4604655776581025794 + _FoamLod: + rid: 4604655776581025795 + _DynamicWavesLod: + rid: 4604655776581025796 + _FlowLod: + rid: 4604655776581025797 + _ShadowLod: + rid: 4604655776581025798 + _AbsorptionLod: + rid: 4604655776581025799 + _ScatteringLod: + rid: 4604655776581025800 + _ClipLod: + rid: 4604655776581025801 + _AlbedoLod: + rid: 4604655776581025802 + _Reflections: + rid: 4604655776581025803 + _Underwater: + rid: 4604655776581025804 + _Portals: + rid: 4604655776581025805 + _ShowWaterProxyPlane: 0 + _EditModeFrameRate: 30 + _FollowSceneCamera: 1 + _HeightQueries: 1 + _Debug: + _AttachDebugGUI: 0 + _ShowHiddenObjects: 0 + _DisableFollowViewpoint: 0 + _DestroyResourcesInOnDisable: 0 + _LogScaleChange: 0 + _PauseOnScaleChange: 0 + _IgnoreWavesForScaleChange: 0 + _ForceBatchMode: 0 + _ForceNoGraphics: 0 + _Resources: {fileID: 11400000, guid: 0817af17dea584e5382e6216db162d4a, type: 2} + references: + version: 2 + RefIds: + - rid: 4604655776581025792 + type: {class: AnimatedWavesLod, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest} + data: + _Enabled: 1 + _OverrideResolution: 0 + _Resolution: 256 + _TextureFormatMode: 100 + _TextureFormat: 48 + _WaveResolutionMultiplier: 1 + _AttenuationInShallows: 0.95 + _ShallowsMaximumDepth: 1000 + _CollisionSource: 2 + _CollisionLayers: -1 + _MaximumQueryCount: 4096 + _BakedWaveData: {fileID: 0} + - rid: 4604655776581025793 + type: {class: DepthLod, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest} + data: + _Enabled: 1 + _OverrideResolution: 1 + _Resolution: 256 + _TextureFormatMode: 100 + _TextureFormat: 46 + _EnableSignedDistanceFields: 1 + - rid: 4604655776581025794 + type: {class: LevelLod, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest} + data: + _Enabled: 0 + _OverrideResolution: 0 + _Resolution: 256 + _TextureFormatMode: 300 + _TextureFormat: 45 + - rid: 4604655776581025795 + type: {class: FoamLod, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest} + data: + _Enabled: 1 + _OverrideResolution: 1 + _Resolution: 256 + _TextureFormatMode: 100 + _TextureFormat: 45 + _SimulationFrequency: 30 + _Prewarm: 1 + _Settings: {fileID: 0} + - rid: 4604655776581025796 + type: {class: DynamicWavesLod, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest} + data: + _Enabled: 0 + _OverrideResolution: 0 + _Resolution: 512 + _TextureFormatMode: 300 + _TextureFormat: 46 + _SimulationFrequency: 60 + _AttenuationInShallows: 1 + _Settings: {fileID: 0} + - rid: 4604655776581025797 + type: {class: FlowLod, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest} + data: + _Enabled: 0 + _OverrideResolution: 1 + _Resolution: 128 + _TextureFormatMode: 100 + _TextureFormat: 46 + - rid: 4604655776581025798 + type: {class: ShadowLod, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest} + data: + _Enabled: 1 + _OverrideResolution: 1 + _Resolution: 256 + _TextureFormatMode: 100 + _TextureFormat: 6 + _DynamicSoftShadows: 1 + _SoftJitterExtinctionFactor: 0.75 + _JitterDiameterSoft: 15 + _CurrentFrameWeightSoft: 0.03 + _JitterDiameterHard: 0.6 + _CurrentFrameWeightHard: 0.15 + _AllowNullLight: 0 + _AllowNoShadows: 0 + - rid: 4604655776581025799 + type: {class: AbsorptionLod, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest} + data: + _Enabled: 0 + _OverrideResolution: 1 + _Resolution: 256 + _TextureFormatMode: 200 + _TextureFormat: 23 + _ShorelineColorSource: 0 + _ShorelineColor: {r: 0.513, g: 1, b: 1, a: 0.153} + _ShorelineColorMaximumDistance: 10 + _ShorelineColorFalloff: 2 + - rid: 4604655776581025800 + type: {class: ScatteringLod, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest} + data: + _Enabled: 0 + _OverrideResolution: 1 + _Resolution: 256 + _TextureFormatMode: 200 + _TextureFormat: 23 + _ShorelineColorSource: 0 + _ShorelineColor: {r: 0, g: 0.588, b: 1, a: 1} + _ShorelineColorMaximumDistance: 10 + _ShorelineColorFalloff: 2 + - rid: 4604655776581025801 + type: {class: ClipLod, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest} + data: + _Enabled: 0 + _OverrideResolution: 1 + _Resolution: 256 + _TextureFormatMode: 100 + _TextureFormat: 5 + _DefaultClippingState: 0 + - rid: 4604655776581025802 + type: {class: AlbedoLod, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest} + data: + _Enabled: 0 + _OverrideResolution: 1 + _Resolution: 768 + _TextureFormatMode: 100 + _TextureFormat: 8 + - rid: 4604655776581025803 + type: {class: WaterReflections, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest} + data: + _Version: 0 + _Enabled: 1 + _Mode: 1 + _Layers: + serializedVersion: 2 + m_Bits: 4294967295 + _Resolution: 256 + _RenderOnlySingleCamera: 0 + _Sky: 1 + _DisablePixelLights: 1 + _DisableShadows: 1 + _HDR: 1 + _Stencil: 0 + _AllowMSAA: 0 + _QualitySettingsOverride: + _OverrideLodBias: 0 + _LodBias: 0.5 + _OverrideMaximumLodLevel: 0 + _MaximumLodLevel: 1 + _OverrideTerrainPixelError: 0 + _TerrainPixelError: 10 + _ClipPlaneOffset: 0 + _FarClipPlane: 1000 + _DisableOcclusionCulling: 1 + _RefreshPerFrames: 1 + _FrameRefreshOffset: 0 + _UseObliqueMatrix: 1 + _NonObliqueNearSurface: 0 + _NonObliqueNearSurfaceThreshold: 0.05 + _Debug: + _ShowHiddenObjects: 0 + _DisableRecursiveRendering: 0 + - rid: 4604655776581025804 + type: {class: UnderwaterRenderer, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest} + data: + _Version: 0 + _Enabled: 1 + _Layer: 4 + _Material: {fileID: 2100000, guid: f2b096e4d95e646c49d48ece0afa0547, type: 2} + _EnvironmentalLightingEnable: 0 + _EnvironmentalLightingWeight: 1 + _EnvironmentalLightingVolumeProfile: {fileID: 0} + _EnableShaderAPI: 0 + _TransparentObjectLayers: + serializedVersion: 2 + m_Bits: 0 + _AllCameras: 0 + _CopyWaterMaterialParametersEachFrame: 1 + _FarPlaneMultiplier: 0.68 + _CullLimit: 0.001 + _Debug: + _VisualizeMask: 0 + _DisableMask: 0 + _VisualizeStencil: 0 + _DisableHeightAboveWaterOptimization: 0 + _DisableArtifactCorrection: 0 + _OnlyReflectionCameras: 0 + - rid: 4604655776581025805 + type: {class: PortalRenderer, ns: WaveHarmonic.Crest.Portals, asm: WaveHarmonic.Crest} + data: --- !u!1 &862991151 GameObject: m_ObjectHideFlags: 0 @@ -468,7 +897,7 @@ Transform: - {fileID: 2079119366} m_Father: {fileID: 1943117823856942010} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &864597986 +--- !u!1 &955279618 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -476,30 +905,86 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 864597987} + - component: {fileID: 955279619} + - component: {fileID: 955279621} + - component: {fileID: 955279620} m_Layer: 0 - m_Name: Water + m_Name: Global Reflection Probe m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!4 &864597987 +--- !u!4 &955279619 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 864597986} + m_GameObject: {fileID: 955279618} serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 1928542629} - m_Father: {fileID: 965921865900907107} + m_Children: [] + m_Father: {fileID: 989742918774999200} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &955279620 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 955279618} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 766b1caed0279ea4281500fc502a2853, type: 3} + m_Name: + m_EditorClassIdentifier: Enviro3.Runtime::Enviro.EnviroReflectionProbe + standalone: 1 + updateReflectionOnGameTime: 1 + reflectionsUpdateTreshhold: 0.025 + useTimeSlicing: 1 + renderCam: {fileID: 0} + myProbe: {fileID: 955279621} + customRendering: 0 + useFog: 0 + bakingCam: {fileID: 0} + renderId: 2 +--- !u!215 &955279621 +ReflectionProbe: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 955279618} + m_Enabled: 1 + serializedVersion: 2 + m_Type: 0 + m_Mode: 1 + m_RefreshMode: 2 + m_TimeSlicingMode: 0 + m_Resolution: 128 + m_UpdateFrequency: 0 + m_BoxSize: {x: 10000, y: 10000, z: 10000} + m_BoxOffset: {x: 0, y: 0, z: 0} + m_NearClip: 0.3 + m_FarClip: 1000 + m_ShadowDistance: 100 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_CullingMask: + serializedVersion: 2 + m_Bits: 0 + m_IntensityMultiplier: 1 + m_BlendDistance: 1 + m_HDR: 1 + m_BoxProjection: 0 + m_RenderDynamicObjects: 0 + m_UseOcclusionCulling: 1 + m_Importance: 1 + m_CustomBakedTexture: {fileID: 0} --- !u!1 &961739749 GameObject: m_ObjectHideFlags: 0 @@ -669,133 +1154,6 @@ Transform: - {fileID: 116710581} m_Father: {fileID: 5747463267817327974} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1104814497 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1104814498} - - component: {fileID: 1104814500} - - component: {fileID: 1104814499} - m_Layer: 0 - m_Name: Sun and Moon Directional Light - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1104814498 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1104814497} - serializedVersion: 2 - m_LocalRotation: {x: 0.17391904, y: -0.6545418, z: 0.15844022, w: 0.71848726} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 4324982765284968024} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1104814499 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1104814497} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3} - m_Name: - m_EditorClassIdentifier: - m_UsePipelineSettings: 1 - m_AdditionalLightsShadowResolutionTier: 2 - m_CustomShadowLayers: 0 - m_LightCookieSize: {x: 1, y: 1} - m_LightCookieOffset: {x: 0, y: 0} - m_SoftShadowQuality: 0 - m_RenderingLayersMask: - serializedVersion: 0 - m_Bits: 1 - m_ShadowRenderingLayersMask: - serializedVersion: 0 - m_Bits: 1 - m_Version: 4 - m_LightLayerMask: 1 - m_ShadowLayerMask: 1 - m_RenderingLayers: 1 - m_ShadowRenderingLayers: 1 ---- !u!108 &1104814500 -Light: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1104814497} - m_Enabled: 1 - serializedVersion: 11 - m_Type: 1 - m_Color: {r: 0.91764706, g: 0.7976338, b: 0.6711095, a: 1} - m_Intensity: 1.9410446 - m_Range: 10 - m_SpotAngle: 30 - m_InnerSpotAngle: 21.80208 - m_CookieSize: 10 - m_Shadows: - m_Type: 2 - m_Resolution: -1 - m_CustomResolution: -1 - m_Strength: 0.996 - m_Bias: 0.05 - m_NormalBias: 0.4 - m_NearPlane: 0.2 - m_CullingMatrixOverride: - e00: 1 - e01: 0 - e02: 0 - e03: 0 - e10: 0 - e11: 1 - e12: 0 - e13: 0 - e20: 0 - e21: 0 - e22: 1 - e23: 0 - e30: 0 - e31: 0 - e32: 0 - e33: 1 - m_UseCullingMatrixOverride: 0 - m_Cookie: {fileID: 0} - m_DrawHalo: 0 - m_Flare: {fileID: 0} - m_RenderMode: 0 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingLayerMask: 1 - m_Lightmapping: 4 - m_LightShadowCasterMode: 0 - m_AreaSize: {x: 1, y: 1} - m_BounceIntensity: 1 - m_ColorTemperature: 6570 - m_UseColorTemperature: 0 - m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} - m_UseBoundingSphereOverride: 0 - m_UseViewFrustumForShadowCasterCull: 1 - m_ForceVisible: 0 - m_ShadowRadius: 0 - m_ShadowAngle: 0 - m_LightUnit: 1 - m_LuxAtDistance: 1 - m_EnableSpotReflector: 1 --- !u!1 &1346995590 GameObject: m_ObjectHideFlags: 0 @@ -886,7 +1244,7 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1371648165 +--- !u!1 &1511791494 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -894,86 +1252,125 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 1371648166} - - component: {fileID: 1371648168} - - component: {fileID: 1371648167} + - component: {fileID: 1511791497} + - component: {fileID: 1511791496} + - component: {fileID: 1511791495} m_Layer: 0 - m_Name: Global Reflection Probe + m_Name: Directional Light m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!4 &1371648166 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1371648165} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 4324982765284968024} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1371648167 +--- !u!114 &1511791495 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1371648165} + m_GameObject: {fileID: 1511791494} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 766b1caed0279ea4281500fc502a2853, type: 3} + m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3} m_Name: - m_EditorClassIdentifier: - standalone: 0 - updateReflectionOnGameTime: 1 - reflectionsUpdateTreshhold: 0.025 - useTimeSlicing: 1 - renderCam: {fileID: 0} - myProbe: {fileID: 1371648168} - customRendering: 0 - useFog: 0 - bakingCam: {fileID: 0} - renderId: 2 ---- !u!215 &1371648168 -ReflectionProbe: + m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Runtime::UnityEngine.Rendering.Universal.UniversalAdditionalLightData + m_UsePipelineSettings: 1 + m_AdditionalLightsShadowResolutionTier: 2 + m_CustomShadowLayers: 0 + m_LightCookieSize: {x: 1, y: 1} + m_LightCookieOffset: {x: 0, y: 0} + m_SoftShadowQuality: 0 + m_RenderingLayersMask: + serializedVersion: 0 + m_Bits: 1 + m_ShadowRenderingLayersMask: + serializedVersion: 0 + m_Bits: 1 + m_Version: 4 + m_LightLayerMask: 1 + m_ShadowLayerMask: 1 + m_RenderingLayers: 1 + m_ShadowRenderingLayers: 1 +--- !u!108 &1511791496 +Light: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1371648165} + m_GameObject: {fileID: 1511791494} m_Enabled: 1 - serializedVersion: 2 - m_Type: 0 - m_Mode: 1 - m_RefreshMode: 2 - m_TimeSlicingMode: 1 - m_Resolution: 128 - m_UpdateFrequency: 0 - m_BoxSize: {x: 10000, y: 10000, z: 10000} - m_BoxOffset: {x: 0, y: 0, z: 0} - m_NearClip: 0.3 - m_FarClip: 1000 - m_ShadowDistance: 100 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + serializedVersion: 11 + m_Type: 1 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 0 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 m_CullingMask: serializedVersion: 2 - m_Bits: 0 - m_IntensityMultiplier: 1 - m_BlendDistance: 1 - m_HDR: 1 - m_BoxProjection: 0 - m_RenderDynamicObjects: 0 - m_UseOcclusionCulling: 1 - m_Importance: 1 - m_CustomBakedTexture: {fileID: 2041534842} + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 4 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ForceVisible: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 + m_LightUnit: 1 + m_LuxAtDistance: 1 + m_EnableSpotReflector: 1 +--- !u!4 &1511791497 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1511791494} + serializedVersion: 2 + m_LocalRotation: {x: 0.37858087, y: -0.23811157, z: 0.10144042, w: 0.88864464} + m_LocalPosition: {x: 0, y: 80.93, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 46.15, y: -30, z: 0} --- !u!1 &1533030985 GameObject: m_ObjectHideFlags: 0 @@ -1005,54 +1402,6 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!21 &1546849776 -Material: - serializedVersion: 8 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Enviro/Skybox - m_Shader: {fileID: 4800000, guid: 34fee0a1b19b20b45aea7483b5f757da, type: 3} - m_Parent: {fileID: 0} - m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] - m_InvalidKeywords: [] - m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: {} - disabledShaderPasses: [] - m_LockedProperties: - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _GalaxyTex: - m_Texture: {fileID: 8900000, guid: 5734983fc81450b4187c3cfa5985edef, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MoonGlowTex: - m_Texture: {fileID: 2800000, guid: 6838e0810da4e49488b5d9a6ee76eb07, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MoonTex: - m_Texture: {fileID: 2800000, guid: c6fd9f694390e0245b6dca5812065950, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _StarsTex: - m_Texture: {fileID: 8900000, guid: b5a7175da0f133b4d951c19c9c2cebfc, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _SunTex: - m_Texture: {fileID: 2800000, guid: c95bed5306e94f24ba5802d841607ac7, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] - m_Floats: [] - m_Colors: [] - m_BuildTextureStacks: [] - m_AllowLocking: 1 --- !u!1 &1804549341 GameObject: m_ObjectHideFlags: 0 @@ -1097,148 +1446,20 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 8958fecc82ae04c7d9128101addbdc3b, type: 3} m_Name: m_EditorClassIdentifier: ---- !u!1 &1928542628 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1928542629} - - component: {fileID: 1928542630} - m_Layer: 0 - m_Name: Ocean - m_TagString: Water - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1928542629 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1928542628} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 864597987} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1928542630 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1928542628} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c051a435f6c61e143a579931f862085e, type: 3} - m_Name: - m_EditorClassIdentifier: KriptoFX.KWS2.Core.Runtime::KWS.KWS_Ocean - WindSpeed: 1 - WindRotation: 0 - WindTurbulence: 0.25 - FftWavesQuality: 256 - FftWavesCascades: 4 - WavesAreaScale: 1 - WindZone: {fileID: 0} - WindZoneSpeedMultiplier: 1 - WindZoneTurbulenceMultiplier: 1 - OceanFoam: 0 - FoamTextureType: 0 - FoamTextureContrast: 1 - FoamTextureScaleMultiplier: 1.5 - OceanFoamStrength: 0.4 - OceanFoamLifetimeMultiplier: 0.9 ---- !u!1 &1993932966 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1993932967} - - component: {fileID: 1993932968} - m_Layer: 0 - m_Name: Wind Zone - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1993932967 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1993932966} - serializedVersion: 2 - m_LocalRotation: {x: -0, y: 0.99959016, z: -0, w: -0.028627168} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 4324982765284968024} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!182 &1993932968 -WindZone: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1993932966} - m_Enabled: 1 - m_Mode: 0 - m_Radius: 20 - m_WindMain: 0.25 - m_WindTurbulence: 0.25 - m_WindPulseMagnitude: 0.5 - m_WindPulseFrequency: 0.01 ---- !u!84 &2041534842 -RenderTexture: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Enviro Reflection Final Cubemap - m_ImageContentsHash: - serializedVersion: 2 - Hash: 00000000000000000000000000000000 - m_IsAlphaChannelOptional: 0 - serializedVersion: 6 - m_Width: 128 - m_Height: 128 - m_AntiAliasing: 1 - m_MipCount: -1 - m_DepthStencilFormat: 90 - m_ColorFormat: 48 - m_MipMap: 1 - m_GenerateMips: 0 - m_SRGB: 0 - m_UseDynamicScale: 0 - m_UseDynamicScaleExplicit: 0 - m_BindMS: 0 - m_EnableCompatibleFormat: 1 - m_EnableRandomWrite: 0 - m_TextureSettings: - serializedVersion: 2 - m_FilterMode: 2 - m_Aniso: 0 - m_MipBias: 0 - m_WrapU: 1 - m_WrapV: 1 - m_WrapW: 1 - m_Dimension: 4 - m_VolumeDepth: 1 - m_ShadowSamplingMode: 2 + _Version: 0 + _Radius: 1 + _Weight: 1 + _WeightVerticalMultiplier: 0.5 + _InnerSphereMultiplier: 1.55 + _InnerSphereOffset: 0.109 + _VelocityOffset: 0.04 + _CompensateForWaveMotion: 0.45 + _BoostLargeWaves: 0 + _TeleportSpeed: 500 + _WarnOnTeleport: 0 + _MaximumSpeed: 100 + _WarnOnSpeedClamp: 0 + _DebugSubsteps: 0 --- !u!1 &2079119365 GameObject: m_ObjectHideFlags: 0 @@ -1341,6 +1562,14 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 5ba152b967dd345829964814e3b3a4e6, type: 3} m_Name: m_EditorClassIdentifier: + _Mesh: {fileID: 0} + _Queue: 0 + _Mode: 0 + _Inverted: 0 + _UseClipWithDisplacement: 1 + _Debug: + _DrawBounds: 0 + _Version: 1 --- !u!4 &1345093109557349 Transform: m_ObjectHideFlags: 0 @@ -1765,21 +1994,6 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 8077375561338272600} m_Mesh: {fileID: 4300000, guid: 3d00fcd877fc5194cbf42ef3245bd301, type: 2} ---- !u!4 &379090385507356818 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2978328581946532500} - serializedVersion: 2 - m_LocalRotation: {x: 0.054023523, y: 0.85641605, z: 0.5052195, w: -0.09157726} - m_LocalPosition: {x: 0.10226898, y: -0.8752507, z: 0.47273383} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 4324982765284968024} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &449780223987794218 Transform: m_ObjectHideFlags: 0 @@ -2229,11 +2443,408 @@ Transform: - {fileID: 8006659725824498249} - {fileID: 3673832994973231279} - {fileID: 6022323663597824692} - - {fileID: 4324982765284968024} - {fileID: 211586106} - - {fileID: 864597987} + - {fileID: 989742918774999200} + - {fileID: 718680767} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &989742918217322004 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 989742918217322005} + serializedVersion: 2 + m_LocalRotation: {x: -0.089434616, y: 0.80694884, z: 0.1266322, w: 0.56991166} + m_LocalPosition: {x: -0.8971251, y: -0.30631, z: 0.31834066} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 989742918774999200} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &989742918217322005 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 989742918217322004} + m_Layer: 2 + m_Name: Moon + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &989742918420971980 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 989742918420971981} + serializedVersion: 2 + m_LocalRotation: {x: 0.12663215, y: -0.56991166, z: 0.08943459, w: 0.80694884} + m_LocalPosition: {x: 0.8971251, y: 0.3063099, z: -0.31834066} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 989742918774999200} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &989742918420971981 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 989742918420971980} + m_Layer: 2 + m_Name: Sun + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &989742918628623789 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 989742918628623791} + serializedVersion: 2 + m_LocalRotation: {x: 0.12663215, y: -0.56991166, z: 0.08943459, w: 0.80694884} + m_LocalPosition: {x: 14.555425, y: -6.115484, z: 2.5310612} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 989742918774999200} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!108 &989742918628623790 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 989742918628623791} + m_Enabled: 1 + serializedVersion: 11 + m_Type: 1 + m_Color: {r: 0.91764706, g: 0.7879085, b: 0.6506863, a: 1} + m_Intensity: 1.9310833 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 4 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ForceVisible: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 + m_LightUnit: 1 + m_LuxAtDistance: 1 + m_EnableSpotReflector: 1 +--- !u!1 &989742918628623791 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 989742918628623789} + - component: {fileID: 989742918628623790} + - component: {fileID: 989742918628623792} + m_Layer: 2 + m_Name: Sun/Moon Directional Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &989742918628623792 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 989742918628623791} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3} + m_Name: + m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Runtime::UnityEngine.Rendering.Universal.UniversalAdditionalLightData + m_UsePipelineSettings: 1 + m_AdditionalLightsShadowResolutionTier: 2 + m_CustomShadowLayers: 0 + m_LightCookieSize: {x: 1, y: 1} + m_LightCookieOffset: {x: 0, y: 0} + m_SoftShadowQuality: 0 + m_RenderingLayersMask: + serializedVersion: 0 + m_Bits: 1 + m_ShadowRenderingLayersMask: + serializedVersion: 0 + m_Bits: 1 + m_Version: 4 + m_LightLayerMask: 1 + m_ShadowLayerMask: 1 + m_RenderingLayers: 1 + m_ShadowRenderingLayers: 1 +--- !u!4 &989742918774999200 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 989742918774999202} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 472.92648, y: -0.98064, z: 383.69223} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 989742918420971980} + - {fileID: 989742918217322004} + - {fileID: 989742919492330551} + - {fileID: 989742918628623789} + - {fileID: 955279619} + - {fileID: 40077497} + m_Father: {fileID: 965921865900907107} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &989742918774999201 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 989742918774999202} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 43b4e18e1baccc642a82a5e642fd6997, type: 3} + m_Name: + m_EditorClassIdentifier: + configuration: {fileID: 11400000, guid: 59da3fbf5f918234799ed9be3eb0ddba, type: 2} + lastConfiguration: {fileID: 11400000, guid: 59da3fbf5f918234799ed9be3eb0ddba, type: 2} + Time: {fileID: 1290233478698596523, guid: 59da3fbf5f918234799ed9be3eb0ddba, type: 2} + Lighting: {fileID: 1121697361819163703, guid: 59da3fbf5f918234799ed9be3eb0ddba, type: 2} + Reflections: {fileID: 3003072118128753163, guid: 59da3fbf5f918234799ed9be3eb0ddba, type: 2} + Sky: {fileID: -1033463005042072443, guid: 59da3fbf5f918234799ed9be3eb0ddba, type: 2} + Fog: {fileID: 0} + VolumetricClouds: {fileID: 3171557369469055653, guid: 59da3fbf5f918234799ed9be3eb0ddba, type: 2} + FlatClouds: {fileID: -6856645797116724545, guid: 59da3fbf5f918234799ed9be3eb0ddba, type: 2} + Weather: {fileID: -2780709178333184838, guid: 59da3fbf5f918234799ed9be3eb0ddba, type: 2} + Aurora: {fileID: 4011421771873438716, guid: 59da3fbf5f918234799ed9be3eb0ddba, type: 2} + Audio: {fileID: 2333546472042683326, guid: 59da3fbf5f918234799ed9be3eb0ddba, type: 2} + Effects: {fileID: -6613759932185320841, guid: 59da3fbf5f918234799ed9be3eb0ddba, type: 2} + Lightning: {fileID: 8141577898218642580, guid: 59da3fbf5f918234799ed9be3eb0ddba, type: 2} + Quality: {fileID: 2305770137650243923, guid: 59da3fbf5f918234799ed9be3eb0ddba, type: 2} + Environment: {fileID: 1310742743334959994, guid: 59da3fbf5f918234799ed9be3eb0ddba, type: 2} + Objects: + sun: {fileID: 989742918420971981} + moon: {fileID: 989742918217322005} + stars: {fileID: 989742919492330544} + directionalLight: {fileID: 989742918628623790} + additionalDirectionalLight: {fileID: 0} + globalReflectionProbe: {fileID: 955279620} + effects: {fileID: 0} + audio: {fileID: 0} + windZone: {fileID: 40077498} + worldAnchor: {fileID: 0} + dontDestroyOnLoad: 0 + Camera: {fileID: 0} + CameraTag: MainCamera + Cameras: [] + optionalFollowTransform: {fileID: 0} + showSetup: 0 + showModules: 1 + showEvents: 0 + showThirdParty: 0 + dayNightSwitch: 0.45 + isNight: 0 + solarTime: 0.5801726 + lunarTime: 0.3726298 + notFirstFrame: 1 + removalZones: [] + sunRotationX: 0 + sunRotationY: 0 + moonRotationX: 0 + moonRotationY: 0 + showNonTimeControls: 0 + Events: + onHourPassedActions: + m_PersistentCalls: + m_Calls: [] + onDayPassedActions: + m_PersistentCalls: + m_Calls: [] + onYearPassedActions: + m_PersistentCalls: + m_Calls: [] + onWeatherChangedActions: + m_PersistentCalls: + m_Calls: [] + onSeasonChangedActions: + m_PersistentCalls: + m_Calls: [] + onNightActions: + m_PersistentCalls: + m_Calls: [] + onDayActions: + m_PersistentCalls: + m_Calls: [] + onZoneChangedActions: + m_PersistentCalls: + m_Calls: [] + currentZone: {fileID: 0} + defaultZone: {fileID: 0} + zones: [] + updateSkyAndLighting: 1 + updateSkyAndLightingHDRP: 0 +--- !u!1 &989742918774999202 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 989742918774999200} + - component: {fileID: 989742918774999201} + - component: {fileID: 989742918774999204} + - component: {fileID: 989742918774999203} + m_Layer: 2 + m_Name: Enviro 3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!54 &989742918774999203 +Rigidbody: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 989742918774999202} + serializedVersion: 5 + m_Mass: 1 + m_LinearDamping: 0 + m_AngularDamping: 0.05 + m_CenterOfMass: {x: 0, y: 0, z: 0} + m_InertiaTensor: {x: 1, y: 1, z: 1} + m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ImplicitCom: 1 + m_ImplicitTensor: 1 + m_UseGravity: 1 + m_IsKinematic: 1 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 0 +--- !u!65 &989742918774999204 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 989742918774999202} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 1 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 0.1, y: 0.1, z: 0.1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!1 &989742919492330544 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 989742919492330551} + m_Layer: 2 + m_Name: Stars + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &989742919492330551 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 989742919492330544} + serializedVersion: 2 + m_LocalRotation: {x: -0.69596165, y: 0.12504967, z: 0.12504967, w: -0.69596165} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 989742918774999200} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &1027953915030805339 PrefabInstance: m_ObjectHideFlags: 0 @@ -3721,22 +4332,6 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!1 &2368800143683692204 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7082384786192877284} - m_Layer: 2 - m_Name: Stars - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 --- !u!23 &2369231124064723141 MeshRenderer: m_ObjectHideFlags: 0 @@ -4049,21 +4644,6 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 6163600924217123614} m_Mesh: {fileID: 4300000, guid: 25a0ef5045228ee4e975d801a5ec8c0c, type: 2} ---- !u!4 &2583252117655472510 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3405489974697339674} - serializedVersion: 2 - m_LocalRotation: {x: 0.17391904, y: -0.6545418, z: 0.15844022, w: 0.71848726} - m_LocalPosition: {x: 0.8854483, y: 0.45732868, z: -0.082654424} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 4324982765284968024} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!33 &2627661590887933203 MeshFilter: m_ObjectHideFlags: 0 @@ -4266,95 +4846,6 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 7886262711658993960} m_Mesh: {fileID: 4300000, guid: 9d105a58fa183b8428e72981879b5605, type: 2} ---- !u!114 &2895753200459031419 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8066862111335547337} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 43b4e18e1baccc642a82a5e642fd6997, type: 3} - m_Name: - m_EditorClassIdentifier: - configuration: {fileID: 11400000, guid: 26eed3b55a7238b489d5aa168f53eff2, type: 2} - lastConfiguration: {fileID: 11400000, guid: 26eed3b55a7238b489d5aa168f53eff2, type: 2} - Time: {fileID: 1328511524460245323, guid: 26eed3b55a7238b489d5aa168f53eff2, type: 2} - Lighting: {fileID: 5080756264030504889, guid: 26eed3b55a7238b489d5aa168f53eff2, type: 2} - Reflections: {fileID: 3003072118128753163, guid: 26eed3b55a7238b489d5aa168f53eff2, type: 2} - Sky: {fileID: -1033463005042072443, guid: 26eed3b55a7238b489d5aa168f53eff2, type: 2} - Fog: {fileID: 0} - VolumetricClouds: {fileID: 7628734766152291347, guid: 26eed3b55a7238b489d5aa168f53eff2, type: 2} - FlatClouds: {fileID: -6856645797116724545, guid: 26eed3b55a7238b489d5aa168f53eff2, type: 2} - Weather: {fileID: 5286980405202375680, guid: 26eed3b55a7238b489d5aa168f53eff2, type: 2} - Aurora: {fileID: 0} - Audio: {fileID: -662796855879562952, guid: 26eed3b55a7238b489d5aa168f53eff2, type: 2} - Effects: {fileID: 70454876032145318, guid: 26eed3b55a7238b489d5aa168f53eff2, type: 2} - Lightning: {fileID: 8141577898218642580, guid: 26eed3b55a7238b489d5aa168f53eff2, type: 2} - Quality: {fileID: 2305770137650243923, guid: 26eed3b55a7238b489d5aa168f53eff2, type: 2} - Environment: {fileID: 1310742743334959994, guid: 26eed3b55a7238b489d5aa168f53eff2, type: 2} - Objects: - sun: {fileID: 3405489974697339674} - moon: {fileID: 2978328581946532500} - stars: {fileID: 2368800143683692204} - directionalLight: {fileID: 1104814500} - additionalDirectionalLight: {fileID: 0} - globalReflectionProbe: {fileID: 1371648167} - effects: {fileID: 0} - audio: {fileID: 0} - windZone: {fileID: 1993932968} - worldAnchor: {fileID: 0} - dontDestroyOnLoad: 0 - Camera: {fileID: 0} - CameraTag: MainCamera - Cameras: [] - optionalFollowTransform: {fileID: 0} - showSetup: 0 - showModules: 1 - showEvents: 0 - showThirdParty: 0 - dayNightSwitch: 0.45 - isNight: 0 - solarTime: 0.6347309 - lunarTime: 0.12108326 - notFirstFrame: 1 - removalZones: [] - sunRotationX: 0 - sunRotationY: 0 - moonRotationX: 0 - moonRotationY: 0 - showNonTimeControls: 0 - Events: - onHourPassedActions: - m_PersistentCalls: - m_Calls: [] - onDayPassedActions: - m_PersistentCalls: - m_Calls: [] - onYearPassedActions: - m_PersistentCalls: - m_Calls: [] - onWeatherChangedActions: - m_PersistentCalls: - m_Calls: [] - onSeasonChangedActions: - m_PersistentCalls: - m_Calls: [] - onNightActions: - m_PersistentCalls: - m_Calls: [] - onDayActions: - m_PersistentCalls: - m_Calls: [] - onZoneChangedActions: - m_PersistentCalls: - m_Calls: [] - currentZone: {fileID: 0} - defaultZone: {fileID: 0} - zones: [] - updateSkyAndLighting: 1 - updateSkyAndLightingHDRP: 0 --- !u!23 &2904389142946997621 MeshRenderer: m_ObjectHideFlags: 0 @@ -4428,22 +4919,6 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 3602072567373658216} m_Mesh: {fileID: 4300000, guid: 63bd96b0562970240ae138324f9e4712, type: 2} ---- !u!1 &2978328581946532500 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 379090385507356818} - m_Layer: 2 - m_Name: Moon - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 --- !u!23 &3006292850052201028 MeshRenderer: m_ObjectHideFlags: 0 @@ -4638,22 +5113,6 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!1 &3405489974697339674 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2583252117655472510} - m_Layer: 2 - m_Name: Sun - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 --- !u!4 &3425524784200107516 Transform: m_ObjectHideFlags: 0 @@ -5434,27 +5893,6 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!4 &4324982765284968024 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8066862111335547337} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 2583252117655472510} - - {fileID: 379090385507356818} - - {fileID: 7082384786192877284} - - {fileID: 1104814498} - - {fileID: 1371648166} - - {fileID: 1993932967} - m_Father: {fileID: 965921865900907107} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &4372521486794592899 Transform: m_ObjectHideFlags: 0 @@ -7634,21 +8072,6 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!4 &7082384786192877284 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2368800143683692204} - serializedVersion: 2 - m_LocalRotation: {x: -0.42413792, y: -0.56578004, z: -0.56578004, w: -0.42413792} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 4324982765284968024} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &7129536884356025001 GameObject: m_ObjectHideFlags: 0 @@ -7907,6 +8330,24 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: eba37e6f7ba7a4a488c7831f45a078b2, type: 3} m_Name: m_EditorClassIdentifier: + _Version: 0 + _RigidBody: {fileID: 0} + _Model: 0 + _Layer: 1 + _BuoyancyForceStrength: 10 + _BuoyancyTorqueStrength: 8 + _MaximumBuoyancyForce: 100 + _CenterToBottomOffset: -1 + _AccelerateDownhill: 0 + _Probes: [] + _Drag: {x: 2, y: 3, z: 1} + _AngularDrag: 0.2 + _ForceHeightOffset: 0 + _ObjectWidth: 3 + _UseObjectLength: 0 + _ObjectLength: 3 + _Debug: + _DrawQueries: 0 --- !u!23 &7301085436333048822 MeshRenderer: m_ObjectHideFlags: 0 @@ -8140,10 +8581,10 @@ MonoBehaviour: m_EditorClassIdentifier: sceneID: 0 sceneName: Jack - WaterObject: {fileID: 1928542629} + WaterObject: {fileID: 718680767} Node: {fileID: 3673832994973231279} GearNode: {fileID: 6022323663597824692} - Water: {fileID: 1928542630} + Water: {fileID: 0} obiFixedUpdater: {fileID: 8626483452638139103} LineRenderer: {fileID: 0} FPS: 0 @@ -8688,73 +9129,6 @@ SphereCollider: serializedVersion: 3 m_Radius: 0.1 m_Center: {x: 0, y: -0.2, z: 0} ---- !u!1 &8066862111335547337 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 4324982765284968024} - - component: {fileID: 2895753200459031419} - - component: {fileID: 8066862111335547339} - - component: {fileID: 8066862111335547338} - m_Layer: 2 - m_Name: Enviro 3 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!54 &8066862111335547338 -Rigidbody: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8066862111335547337} - serializedVersion: 5 - m_Mass: 1 - m_LinearDamping: 0 - m_AngularDamping: 0.05 - m_CenterOfMass: {x: 0, y: 0, z: 0} - m_InertiaTensor: {x: 1, y: 1, z: 1} - m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ImplicitCom: 1 - m_ImplicitTensor: 1 - m_UseGravity: 1 - m_IsKinematic: 1 - m_Interpolate: 0 - m_Constraints: 0 - m_CollisionDetection: 0 ---- !u!65 &8066862111335547339 -BoxCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8066862111335547337} - m_Material: {fileID: 0} - m_IncludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_ExcludeLayers: - serializedVersion: 2 - m_Bits: 0 - m_LayerOverridePriority: 0 - m_IsTrigger: 1 - m_ProvidesContacts: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Size: {x: 0.1, y: 0.1, z: 0.1} - m_Center: {x: 0, y: 0, z: 0} --- !u!1 &8077375561338272600 GameObject: m_ObjectHideFlags: 0 @@ -9900,3 +10274,4 @@ SceneRoots: - {fileID: 1533030986} - {fileID: 128657311} - {fileID: 1346995592} + - {fileID: 1511791497} diff --git a/Assets/ResRaw/Prefabs/FFishingLine_0.prefab b/Assets/ResRaw/Prefabs/FFishingLine_0.prefab index a04b27c2a..a411c03d2 100644 --- a/Assets/ResRaw/Prefabs/FFishingLine_0.prefab +++ b/Assets/ResRaw/Prefabs/FFishingLine_0.prefab @@ -17,13 +17,14 @@ GameObject: - component: {fileID: 114681723296609205} - component: {fileID: 114410952205869838} - component: {fileID: 114477279609362843} + - component: {fileID: 1568341944772933809} m_Layer: 0 m_Name: Fishing line m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!4 &4137890480302320 Transform: m_ObjectHideFlags: 0 @@ -107,84 +108,37 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} m_Name: m_EditorClassIdentifier: - solverIndices: - serializedContents: - m_AlignBytes: 16 - groupID: 2 + solverIndices: 6a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b0000007c0000007d0000007e0000007f000000800000008100000082000000830000008400000085000000860000008700000088000000890000008a0000008b0000008c0000008d0000008e0000008f000000900000009100000092000000930000009400000095000000960000009700000098000000990000009a0000009b0000009c0000009d0000009e0000009f000000a0000000a1000000a2000000a3000000a4000000a5000000a6000000a7000000a8000000a9000000aa000000ab000000ac000000ad000000ae000000af000000b0000000b1000000b2000000b3000000b4000000b5000000b6000000b7000000b8000000b9000000ba000000bb000000bc000000bd000000be000000bf000000c0000000c1000000c2000000c3000000c4000000c5000000c6000000c7000000c8000000c9000000ca000000cb000000cc000000cd000000ce000000cf000000d0000000d1000000d2000000d3000000 m_CollisionMaterial: {fileID: 0} m_SurfaceCollisions: 0 - m_MassScale: 1 m_SelfCollisions: 0 - restLength_: 0.31933346 + restLength_: 0.1 elements: - - particle1: 114 - particle2: 115 - restLength: 0.025281452 + - particle1: 106 + particle2: 107 + restLength: 0.019992497 constraintForce: 0 tearResistance: 1 - - particle1: 115 - particle2: 116 - restLength: 0.023859516 + - particle1: 107 + particle2: 108 + restLength: 0.020001434 constraintForce: 0 tearResistance: 1 - - particle1: 116 - particle2: 117 - restLength: 0.025210889 + - particle1: 108 + particle2: 109 + restLength: 0.02001214 constraintForce: 0 tearResistance: 1 - - particle1: 117 - particle2: 118 - restLength: 0.02424051 + - particle1: 109 + particle2: 110 + restLength: 0.020001423 constraintForce: 0 tearResistance: 1 - - particle1: 118 - particle2: 119 - restLength: 0.024628486 + - particle1: 110 + particle2: 111 + restLength: 0.019992508 constraintForce: 0 tearResistance: 1 - - particle1: 119 - particle2: 120 - restLength: 0.024751194 - constraintForce: 0 - tearResistance: 1 - - particle1: 120 - particle2: 121 - restLength: 0.024425108 - constraintForce: 0 - tearResistance: 1 - - particle1: 121 - particle2: 122 - restLength: 0.024396013 - constraintForce: 0 - tearResistance: 1 - - particle1: 122 - particle2: 123 - restLength: 0.024576226 - constraintForce: 0 - tearResistance: 1 - - particle1: 123 - particle2: 124 - restLength: 0.024684237 - constraintForce: 0 - tearResistance: 1 - - particle1: 124 - particle2: 125 - restLength: 0.024272759 - constraintForce: 0 - tearResistance: 1 - - particle1: 125 - particle2: 126 - restLength: 0.024583023 - constraintForce: 0 - tearResistance: 1 - - particle1: 126 - particle2: 127 - restLength: 0.024424033 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 m_RopeBlueprint: {fileID: 11400000, guid: 2ade1c037e0bf214783dcb44ae3b7be7, type: 2} tearingEnabled: 0 tearResistanceMultiplier: 1000 @@ -213,7 +167,6 @@ MonoBehaviour: decimation: 0 smoothing: 0 twist: 0 - indexInSystem: 1 --- !u!114 &114110690660507634 MonoBehaviour: m_ObjectHideFlags: 0 @@ -231,9 +184,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: -5395693579433732326, guid: 2ade1c037e0bf214783dcb44ae3b7be7, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &114681723296609205 MonoBehaviour: m_ObjectHideFlags: 0 @@ -251,9 +203,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: -2515171973132415257, guid: 2ade1c037e0bf214783dcb44ae3b7be7, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &114410952205869838 MonoBehaviour: m_ObjectHideFlags: 0 @@ -266,17 +217,10 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c8b45ebbf86be4df6b0e6cd933812af2, type: 3} m_Name: m_EditorClassIdentifier: - material: {fileID: 0} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - k__BackingField: {r: 1, g: 1, b: 1, a: 1} - k__BackingField: 1 + render: 1 + shader: {fileID: 0} + particleColor: {r: 1, g: 1, b: 1, a: 1} + radiusScale: 1 --- !u!114 &114477279609362843 MonoBehaviour: m_ObjectHideFlags: 0 @@ -289,20 +233,121 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} m_Name: m_EditorClassIdentifier: - material: {fileID: 0} - renderParameters: - layer: 0 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 uvAnchor: 0 uvScale: {x: 1, y: 1} normalizeV: 1 section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} thicknessScale: 0.05 +--- !u!120 &1568341944772933809 +LineRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1073320741336326} + m_Enabled: 0 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 0 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_Positions: + - {x: 0, y: 0, z: 0} + - {x: 0, y: 0, z: 1} + m_Parameters: + serializedVersion: 3 + widthMultiplier: 1 + widthCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.01 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + colorGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_ColorSpace: -1 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + numCornerVertices: 0 + numCapVertices: 0 + alignment: 0 + textureMode: 0 + textureScale: {x: 1, y: 1} + shadowBias: 0.5 + generateLightingData: 0 + m_MaskInteraction: 0 + m_UseWorldSpace: 1 + m_Loop: 0 + m_ApplyActiveColorSpace: 1 --- !u!1 &1303932502464986 GameObject: m_ObjectHideFlags: 0 @@ -320,13 +365,14 @@ GameObject: - component: {fileID: 114578949562872425} - component: {fileID: 114380538510599426} - component: {fileID: 7246091911713430238} + - component: {fileID: 5505135081678272049} m_Layer: 19 m_Name: Bobber line m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!4 &4814276752198582 Transform: m_ObjectHideFlags: 0 @@ -336,7 +382,7 @@ Transform: m_GameObject: {fileID: 1303932502464986} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0.3171} + m_LocalPosition: {x: 0, y: 0, z: 0.1} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -410,84 +456,37 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} m_Name: m_EditorClassIdentifier: - solverIndices: - serializedContents: - m_AlignBytes: 16 - groupID: 1 + solverIndices: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f00000060000000610000006200000063000000640000006500000066000000670000006800000069000000 m_CollisionMaterial: {fileID: 0} m_SurfaceCollisions: 0 - m_MassScale: 1 m_SelfCollisions: 0 - restLength_: 0.31933346 + restLength_: 0.1 elements: - particle1: 0 particle2: 1 - restLength: 0.025281452 + restLength: 0.019992497 constraintForce: 0 tearResistance: 1 - particle1: 1 particle2: 2 - restLength: 0.023859516 + restLength: 0.020001434 constraintForce: 0 tearResistance: 1 - particle1: 2 particle2: 3 - restLength: 0.025210889 + restLength: 0.02001214 constraintForce: 0 tearResistance: 1 - particle1: 3 particle2: 4 - restLength: 0.02424051 + restLength: 0.020001423 constraintForce: 0 tearResistance: 1 - particle1: 4 particle2: 5 - restLength: 0.024628486 + restLength: 0.019992508 constraintForce: 0 tearResistance: 1 - - particle1: 5 - particle2: 6 - restLength: 0.024751194 - constraintForce: 0 - tearResistance: 1 - - particle1: 6 - particle2: 7 - restLength: 0.024425108 - constraintForce: 0 - tearResistance: 1 - - particle1: 7 - particle2: 8 - restLength: 0.024396013 - constraintForce: 0 - tearResistance: 1 - - particle1: 8 - particle2: 9 - restLength: 0.024576226 - constraintForce: 0 - tearResistance: 1 - - particle1: 9 - particle2: 10 - restLength: 0.024684237 - constraintForce: 0 - tearResistance: 1 - - particle1: 10 - particle2: 11 - restLength: 0.024272759 - constraintForce: 0 - tearResistance: 1 - - particle1: 11 - particle2: 12 - restLength: 0.024583023 - constraintForce: 0 - tearResistance: 1 - - particle1: 12 - particle2: 13 - restLength: 0.024424033 - constraintForce: 0 - tearResistance: 1 - _aerodynamicsEnabled: 1 - _drag: 0.05 - _lift: 0.02 m_RopeBlueprint: {fileID: 11400000, guid: 2ade1c037e0bf214783dcb44ae3b7be7, type: 2} tearingEnabled: 0 tearResistanceMultiplier: 1000 @@ -516,7 +515,6 @@ MonoBehaviour: decimation: 0 smoothing: 0 twist: 0 - indexInSystem: 0 --- !u!114 &114844249086754130 MonoBehaviour: m_ObjectHideFlags: 0 @@ -534,9 +532,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: -5395693579433732326, guid: 2ade1c037e0bf214783dcb44ae3b7be7, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &114578949562872425 MonoBehaviour: m_ObjectHideFlags: 0 @@ -554,9 +551,8 @@ MonoBehaviour: m_ParticleGroup: {fileID: -2515171973132415257, guid: 2ade1c037e0bf214783dcb44ae3b7be7, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 - m_Projection: 0 m_Compliance: 0 - breakThreshold: Infinity + m_BreakThreshold: Infinity --- !u!114 &114380538510599426 MonoBehaviour: m_ObjectHideFlags: 0 @@ -569,17 +565,10 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c8b45ebbf86be4df6b0e6cd933812af2, type: 3} m_Name: m_EditorClassIdentifier: - material: {fileID: 0} - renderParameters: - layer: 19 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 - k__BackingField: {r: 1, g: 1, b: 1, a: 1} - k__BackingField: 1 + render: 1 + shader: {fileID: 0} + particleColor: {r: 1, g: 1, b: 1, a: 1} + radiusScale: 1 --- !u!114 &7246091911713430238 MonoBehaviour: m_ObjectHideFlags: 0 @@ -592,20 +581,121 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} m_Name: m_EditorClassIdentifier: - material: {fileID: 0} - renderParameters: - layer: 19 - lightProbeUsage: 1 - reflectionProbeUsage: 1 - shadowCastingMode: 1 - receiveShadows: 1 - motionVectors: 0 - renderingLayerMask: 4294967295 uvAnchor: 0 uvScale: {x: 1, y: 1} normalizeV: 1 section: {fileID: 11400000, guid: a0bc36a59515f413e90e10895929c938, type: 2} thicknessScale: 0.04 +--- !u!120 &5505135081678272049 +LineRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1303932502464986} + m_Enabled: 0 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 0 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 + m_ForceMeshLod: -1 + m_MeshLodSelectionBias: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_GlobalIlluminationMeshLod: 0 + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_Positions: + - {x: 0, y: 0, z: 0} + - {x: 0, y: 0, z: 1} + m_Parameters: + serializedVersion: 3 + widthMultiplier: 1 + widthCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.01 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + colorGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_ColorSpace: -1 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + numCornerVertices: 0 + numCapVertices: 0 + alignment: 0 + textureMode: 0 + textureScale: {x: 1, y: 1} + shadowBias: 0.5 + generateLightingData: 0 + m_MaskInteraction: 0 + m_UseWorldSpace: 1 + m_Loop: 0 + m_ApplyActiveColorSpace: 1 --- !u!1 &1353563270990582 GameObject: m_ObjectHideFlags: 0 @@ -658,57 +748,23 @@ MonoBehaviour: m_EditorClassIdentifier: simulateWhenInvisible: 1 m_Backend: 1 - substeps: 4 - maxStepsPerFrame: 1 - synchronization: 0 parameters: mode: 0 interpolation: 0 gravity: {x: 0, y: -9.81, z: 0} - ambientWind: {x: 0, y: 0, z: 0} - foamGravityScale: 1 damping: 0.8 maxAnisotropy: 3 sleepThreshold: 0.0001 - maxVelocity: 50 - maxAngularVelocity: 20 collisionMargin: 0.02 maxDepenetration: 10 - colliderCCD: 1 - particleCCD: 0 + continuousCollisionDetection: 1 shockPropagation: 0 surfaceCollisionIterations: 8 surfaceCollisionTolerance: 0.005 - diffusionMask: {x: 1, y: 1, z: 1, w: 1} - m_MaxSurfaceChunks: 32768 - maxQueryResults: 8192 - maxFoamParticles: 8192 - maxParticleNeighbors: 128 - maxParticleContacts: 6 - useLimits: 0 - killOffLimitsParticles: 0 - boundaryLimits: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 5, y: 5, z: 5} gravity: {x: 0, y: -9, z: 0} gravitySpace: 1 - ambientWind: {x: 0, y: 0, z: 0} - windSpace: 1 - foamSubsteps: 1 - foamMinNeighbors: 3 - foamCollisions: 0 - maxFoamVelocityStretch: 0.3 - foamRadiusScale: 1 - foamFade: {x: 0.05, y: 0.8} - foamAccelAgingRange: {x: 0.5, y: 0.8} - foamAccelAging: 4 - foamVolumeDensity: 0.1 - foamAmbientDensity: 0.02 - foamScatterColor: {r: 0.8, g: 0.75, b: 0.7, a: 1} - foamAmbientColor: {r: 0.4, g: 0.5, b: 0.6, a: 1} worldLinearInertiaScale: 0 worldAngularInertiaScale: 0 - synchronousSpatialQueries: 0 distanceConstraintParameters: evaluationOrder: 0 iterations: 5 @@ -764,11 +820,6 @@ MonoBehaviour: iterations: 3 SORFactor: 1 enabled: 1 - pinholeConstraintParameters: - evaluationOrder: 1 - iterations: 1 - SORFactor: 1 - enabled: 1 stitchConstraintParameters: evaluationOrder: 1 iterations: 2 @@ -807,6 +858,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: lineType: 2 + startParticleAttachment: {fileID: 114110690660507634} obiRopeSegment_1: {fileID: 114755058551407608} obiRopeSegment_2: {fileID: 114352801149539185} obiRopeSegment_3: {fileID: 0} @@ -820,6 +872,8 @@ MonoBehaviour: EndLineRigidbody_2: {fileID: 0} EndLineRigidbody_3: {fileID: 0} Rod: {fileID: 0} + LineRenderer1: {fileID: 0} + LineRenderer2: {fileID: 0} --- !u!1 &1399535376626843 GameObject: m_ObjectHideFlags: 0 @@ -850,7 +904,7 @@ Transform: m_GameObject: {fileID: 1399535376626843} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0.3176} + m_LocalPosition: {x: 0, y: 0, z: 0.1} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -1007,7 +1061,7 @@ Transform: serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0.017769676, y: 0.017769676, z: 0.017769653} + m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 4176961363705938} @@ -1151,7 +1205,7 @@ Transform: m_GameObject: {fileID: 1777911290578827} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0.6396} + m_LocalPosition: {x: 0, y: 0, z: 0.2} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] diff --git a/Assets/ResRaw/Prefabs/FFishingLine_1.prefab b/Assets/ResRaw/Prefabs/FFishingLine_1.prefab index a8c64a32a..e7b340b32 100644 --- a/Assets/ResRaw/Prefabs/FFishingLine_1.prefab +++ b/Assets/ResRaw/Prefabs/FFishingLine_1.prefab @@ -30,7 +30,7 @@ Transform: m_GameObject: {fileID: 1216861808783687} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0.31902} + m_LocalPosition: {x: 0, y: 0, z: 0.1} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -355,6 +355,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: lineType: 1 + startParticleAttachment: {fileID: 114426966214432178} obiRopeSegment_1: {fileID: 114690977222484832} obiRopeSegment_2: {fileID: 0} obiRopeSegment_3: {fileID: 0} @@ -399,7 +400,7 @@ Transform: serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0.015783645, y: 0.015783645, z: 0.015783627} + m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 4472327255735813} @@ -536,7 +537,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!4 &4086094945373968 Transform: m_ObjectHideFlags: 0 @@ -621,78 +622,38 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: solverIndices: - serializedContents: + serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f00000060000000610000006200000063000000640000006500000066000000670000006800000069000000 m_AlignBytes: 16 groupID: 1 m_CollisionMaterial: {fileID: 0} m_SurfaceCollisions: 0 m_MassScale: 1 m_SelfCollisions: 0 - restLength_: 0.31933346 + restLength_: 0.1 elements: - particle1: 0 particle2: 1 - restLength: 0.025281452 + restLength: 0.019992497 constraintForce: 0 tearResistance: 1 - particle1: 1 particle2: 2 - restLength: 0.023859516 + restLength: 0.020001434 constraintForce: 0 tearResistance: 1 - particle1: 2 particle2: 3 - restLength: 0.025210889 + restLength: 0.02001214 constraintForce: 0 tearResistance: 1 - particle1: 3 particle2: 4 - restLength: 0.02424051 + restLength: 0.020001423 constraintForce: 0 tearResistance: 1 - particle1: 4 particle2: 5 - restLength: 0.024628486 - constraintForce: 0 - tearResistance: 1 - - particle1: 5 - particle2: 6 - restLength: 0.024751194 - constraintForce: 0 - tearResistance: 1 - - particle1: 6 - particle2: 7 - restLength: 0.024425108 - constraintForce: 0 - tearResistance: 1 - - particle1: 7 - particle2: 8 - restLength: 0.024396013 - constraintForce: 0 - tearResistance: 1 - - particle1: 8 - particle2: 9 - restLength: 0.024576226 - constraintForce: 0 - tearResistance: 1 - - particle1: 9 - particle2: 10 - restLength: 0.024684237 - constraintForce: 0 - tearResistance: 1 - - particle1: 10 - particle2: 11 - restLength: 0.024272759 - constraintForce: 0 - tearResistance: 1 - - particle1: 11 - particle2: 12 - restLength: 0.024583023 - constraintForce: 0 - tearResistance: 1 - - particle1: 12 - particle2: 13 - restLength: 0.024424033 + restLength: 0.019992508 constraintForce: 0 tearResistance: 1 _aerodynamicsEnabled: 1 diff --git a/Assets/ResRaw/bbb/MonoBehaviour/RopeSegment_1.asset b/Assets/ResRaw/Prefabs/Line/RopeSegment_1.asset similarity index 77% rename from Assets/ResRaw/bbb/MonoBehaviour/RopeSegment_1.asset rename to Assets/ResRaw/Prefabs/Line/RopeSegment_1.asset index 7b48a4645..5a42341f0 100644 --- a/Assets/ResRaw/bbb/MonoBehaviour/RopeSegment_1.asset +++ b/Assets/ResRaw/Prefabs/Line/RopeSegment_1.asset @@ -26,7 +26,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 775ad4994fda946d1a5936c7e2dfc785, type: 3} m_Name: end m_EditorClassIdentifier: - particleIndices: 0d000000 + particleIndices: 05000000 m_Blueprint: {fileID: 11400000} --- !u!114 &11400000 MonoBehaviour: @@ -40,27 +40,21 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 8f7e67b5626124d0db9886e6cd2aacff, type: 3} m_Name: RopeSegment_1 m_EditorClassIdentifier: + m_Checksum: 1150028685 m_Empty: 0 - m_ActiveParticleCount: 14 - m_InitialActiveParticleCount: 14 + m_Edited: 0 + m_ActiveParticleCount: 6 + m_InitialActiveParticleCount: 6 _bounds: - m_Center: {x: 0.00006357717, y: -0.00019559264, z: 0.15966581} - m_Extent: {x: 0.00015004587, y: 0.00028696656, z: 0.15966581} + m_Center: {x: 0, y: 0, z: 0.05} + m_Extent: {x: 0, y: 0, z: 0.05} positions: - - {x: 0.00021362305, y: -0.0004825592, z: 0} - - {x: 0.00019518234, y: -0.0004815907, z: 0.025281444} - - {x: 0.00017706465, y: -0.000478744, z: 0.049140953} - - {x: 0.00015708237, y: -0.00047340174, z: 0.07435183} - - {x: 0.00013695797, y: -0.00046564484, z: 0.09859233} - - {x: 0.000115472234, y: -0.0004546597, z: 0.12322081} - - {x: 0.00009266487, y: -0.00043982422, z: 0.14797199} - - {x: 0.00006875995, y: -0.00042056615, z: 0.17239708} - - {x: 0.000043225158, y: -0.0003954536, z: 0.19679306} - - {x: 0.00001544148, y: -0.0003621297, z: 0.22136925} - - {x: -0.000015118114, y: -0.00031677342, z: 0.24605343} - - {x: -0.00004859493, y: -0.00025262174, z: 0.27032608} - - {x: -0.0000864687, y: -0.0001417575, z: 0.29490882} - - {x: -0.000008068979, y: 0.00009137392, z: 0.31933162} + - {x: 0, y: 0, z: 0} + - {x: 0, y: 0, z: 0.019992497} + - {x: 0, y: 0, z: 0.03999393} + - {x: 0, y: 0, z: 0.06000607} + - {x: 0, y: 0, z: 0.08000749} + - {x: 0, y: 0, z: 0.1} - {x: 0, y: 0, z: 0} - {x: 0, y: 0, z: 0} - {x: 0, y: 0, z: 0} @@ -162,20 +156,12 @@ MonoBehaviour: - {x: 0, y: 0, z: 0} - {x: 0, y: 0, z: 0} restPositions: - - {x: 0.00021362305, y: -0.0004825592, z: 0, w: 1} - - {x: 0.00019518234, y: -0.0004815907, z: 0.025281444, w: 1} - - {x: 0.00017706465, y: -0.000478744, z: 0.049140953, w: 1} - - {x: 0.00015708237, y: -0.00047340174, z: 0.07435183, w: 1} - - {x: 0.00013695797, y: -0.00046564484, z: 0.09859233, w: 1} - - {x: 0.000115472234, y: -0.0004546597, z: 0.12322081, w: 1} - - {x: 0.00009266487, y: -0.00043982422, z: 0.14797199, w: 1} - - {x: 0.00006875995, y: -0.00042056615, z: 0.17239708, w: 1} - - {x: 0.000043225158, y: -0.0003954536, z: 0.19679306, w: 1} - - {x: 0.00001544148, y: -0.0003621297, z: 0.22136925, w: 1} - - {x: -0.000015118114, y: -0.00031677342, z: 0.24605343, w: 1} - - {x: -0.00004859493, y: -0.00025262174, z: 0.27032608, w: 1} - - {x: -0.0000864687, y: -0.0001417575, z: 0.29490882, w: 1} - - {x: -0.000008068979, y: 0.00009137392, z: 0.31933162, w: 1} + - {x: 0, y: 0, z: 0, w: 1} + - {x: 0, y: 0, z: 0.019992497, w: 1} + - {x: 0, y: 0, z: 0.03999393, w: 1} + - {x: 0, y: 0, z: 0.06000607, w: 1} + - {x: 0, y: 0, z: 0.08000749, w: 1} + - {x: 0, y: 0, z: 0.1, w: 1} - {x: 0, y: 0, z: 0, w: 0} - {x: 0, y: 0, z: 0, w: 0} - {x: 0, y: 0, z: 0, w: 0} @@ -276,6 +262,7 @@ MonoBehaviour: - {x: 0, y: 0, z: 0, w: 0} - {x: 0, y: 0, z: 0, w: 0} - {x: 0, y: 0, z: 0, w: 0} + restNormals: [] orientations: [] restOrientations: [] velocities: @@ -385,29 +372,13 @@ MonoBehaviour: - {x: 0, y: 0, z: 0} - {x: 0, y: 0, z: 0} - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} angularVelocities: [] invMasses: - 10 - - 10.000001 - - 10.000001 - - 10.000001 + - 10 + - 9.999998 - 9.999999 - 9.999999 - - 10 - - 9.999999 - - 10 - - 10 - - 10.000001 - - 10 - - 9.999999 - 9.999999 - 0 - 0 @@ -510,21 +481,13 @@ MonoBehaviour: - 0 - 0 invRotationalMasses: [] - filters: 0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 + filters: 0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 principalRadii: - {x: 0.028379995, y: 0.028379995, z: 0.028379995} - - {x: 0.028365852, y: 0.028365852, z: 0.028365852} - - {x: 0.02832429, y: 0.02832429, z: 0.02832429} - - {x: 0.028246285, y: 0.028246285, z: 0.028246285} - - {x: 0.02813303, y: 0.02813303, z: 0.02813303} - - {x: 0.027972635, y: 0.027972635, z: 0.027972635} - - {x: 0.027756022, y: 0.027756022, z: 0.027756022} - - {x: 0.027474837, y: 0.027474837, z: 0.027474837} - - {x: 0.027108166, y: 0.027108166, z: 0.027108166} - - {x: 0.026621602, y: 0.026621602, z: 0.026621602} - - {x: 0.025959356, y: 0.025959356, z: 0.025959356} - - {x: 0.02502268, y: 0.02502268, z: 0.02502268} - - {x: 0.023403952, y: 0.023403952, z: 0.023403952} + - {x: 0.026704626, y: 0.026704626, z: 0.026704626} + - {x: 0.025028506, y: 0.025028506, z: 0.025028506} + - {x: 0.02335149, y: 0.02335149, z: 0.02335149} + - {x: 0.021675372, y: 0.021675372, z: 0.021675372} - {x: 0.02, y: 0.02, z: 0.02} - {x: 0, y: 0, z: 0} - {x: 0, y: 0, z: 0} @@ -628,18 +591,10 @@ MonoBehaviour: - {x: 0, y: 0, z: 0} colors: - {r: 1, g: 0, b: 0, a: 1} - - {r: 0.99999994, g: 0.0016874466, b: 0.0016874466, a: 0.99999994} - - {r: 0.99999994, g: 0.006647369, b: 0.006647369, a: 0.99999994} - - {r: 0.99999994, g: 0.015955579, b: 0.015955579, a: 0.99999994} - - {r: 1, g: 0.029470984, b: 0.029470984, a: 1} - - {r: 1, g: 0.04861112, b: 0.04861112, a: 1} - - {r: 1, g: 0.07445987, b: 0.07445987, a: 1} - - {r: 1, g: 0.10801444, b: 0.10801444, a: 1} - - {r: 1, g: 0.15176961, b: 0.15176961, a: 1} - - {r: 1, g: 0.20983198, b: 0.20983198, a: 1} - - {r: 0.99999994, g: 0.288859, b: 0.288859, a: 0.99999994} - - {r: 1, g: 0.40063462, b: 0.40063462, a: 1} - - {r: 1.0000001, g: 0.5938004, b: 0.5938004, a: 1.0000001} + - {r: 1, g: 0.19992499, b: 0.19992499, a: 1} + - {r: 1.0000001, g: 0.39993933, b: 0.39993933, a: 1.0000001} + - {r: 1.0000001, g: 0.60006076, b: 0.60006076, a: 1.0000001} + - {r: 1.0000001, g: 0.80007505, b: 0.80007505, a: 1.0000001} - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - {r: 0, g: 0, b: 0, a: 0} - {r: 0, g: 0, b: 0, a: 0} @@ -742,30 +697,26 @@ MonoBehaviour: - {r: 0, g: 0, b: 0, a: 0} - {r: 0, g: 0, b: 0, a: 0} points: - edges: 000000000100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000a0000000a0000000b0000000b0000000c0000000c0000000d000000 + edges: 00000000010000000100000002000000020000000300000003000000040000000400000005000000 triangles: distanceConstraintsData: batches: - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000 - m_ConstraintCount: 57 - m_ActiveConstraintCount: 7 - m_InitialActiveConstraintCount: 7 + - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f0000003000000031000000320000003300000034000000 + m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f0000003000000031000000320000003300000034000000 + m_ConstraintCount: 53 + m_ActiveConstraintCount: 3 + m_InitialActiveConstraintCount: 3 particleIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 + serializedContents: 00000000010000000200000003000000040000000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 m_AlignBytes: 16 lambdas: serializedContents: [] m_AlignBytes: 16 restLengths: serializedContents: - - 0.025281452 - - 0.025210889 - - 0.024628486 - - 0.024425108 - - 0.024576226 - - 0.024272759 - - 0.024424033 + - 0.019992497 + - 0.02001214 + - 0.019992508 - 0 - 0 - 0 @@ -872,30 +823,22 @@ MonoBehaviour: - {x: 0, y: 0} - {x: 0, y: 0} - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} m_AlignBytes: 16 - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f0000003000000031000000320000003300000034000000350000003600000037000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f0000003000000031000000320000003300000034000000350000003600000037000000 - m_ConstraintCount: 56 - m_ActiveConstraintCount: 6 - m_InitialActiveConstraintCount: 6 + - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f00000030000000310000003200000033000000 + m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f00000030000000310000003200000033000000 + m_ConstraintCount: 52 + m_ActiveConstraintCount: 2 + m_InitialActiveConstraintCount: 2 particleIndices: - serializedContents: 0100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 + serializedContents: 0100000002000000030000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 m_AlignBytes: 16 lambdas: serializedContents: [] m_AlignBytes: 16 restLengths: serializedContents: - - 0.023859516 - - 0.02424051 - - 0.024751194 - - 0.024396013 - - 0.024684237 - - 0.024583023 + - 0.020001434 + - 0.020001423 - 0 - 0 - 0 @@ -1001,31 +944,24 @@ MonoBehaviour: - {x: 0, y: 0} - {x: 0, y: 0} - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} m_AlignBytes: 16 bendConstraintsData: batches: - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000 - m_ConstraintCount: 38 - m_ActiveConstraintCount: 4 - m_InitialActiveConstraintCount: 4 + - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000 + m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000 + m_ConstraintCount: 35 + m_ActiveConstraintCount: 2 + m_InitialActiveConstraintCount: 2 particleIndices: - serializedContents: 000000000200000001000000030000000500000004000000060000000800000007000000090000000b0000000a0000000c0000000e0000000d0000000f0000001100000010000000120000001400000013000000150000001700000016000000180000001a000000190000001b0000001d0000001c0000001e000000200000001f0000002100000023000000220000002400000026000000250000002700000029000000280000002a0000002c0000002b0000002d0000002f0000002e000000300000003200000031000000330000003500000034000000360000003800000037000000390000003b0000003a0000003c0000003e0000003d0000003f0000004100000040000000420000004400000043000000450000004700000046000000480000004a000000490000004b0000004d0000004c0000004e000000500000004f0000005100000053000000520000005400000056000000550000005700000059000000580000005a0000005c0000005b0000005d0000005f0000005e000000600000006200000061000000630000006500000064000000660000006800000067000000690000006b0000006a0000006c0000006e0000006d0000006f0000007100000070000000 + serializedContents: 000000000200000001000000030000000500000004000000060000000800000007000000090000000b0000000a0000000c0000000e0000000d0000000f0000001100000010000000120000001400000013000000150000001700000016000000180000001a000000190000001b0000001d0000001c0000001e000000200000001f0000002100000023000000220000002400000026000000250000002700000029000000280000002a0000002c0000002b0000002d0000002f0000002e000000300000003200000031000000330000003500000034000000360000003800000037000000390000003b0000003a0000003c0000003e0000003d0000003f0000004100000040000000420000004400000043000000450000004700000046000000480000004a000000490000004b0000004d0000004c0000004e000000500000004f0000005100000053000000520000005400000056000000550000005700000059000000580000005a0000005c0000005b0000005d0000005f0000005e000000600000006200000061000000630000006500000064000000660000006800000067000000 m_AlignBytes: 16 lambdas: serializedContents: [] m_AlignBytes: 16 restBends: serializedContents: - - 0.00047397843 - - 0.00012933245 - - 0.000009909901 - - 0.00013732653 - - 0.11458487 + - 0 + - 0 - 0 - 0 - 0 @@ -1097,9 +1033,6 @@ MonoBehaviour: - {x: 0, y: 0} - {x: 0, y: 0} - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} m_AlignBytes: 16 plasticity: serializedContents: @@ -1138,28 +1071,23 @@ MonoBehaviour: - {x: 0, y: 0} - {x: 0, y: 0} - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} m_AlignBytes: 16 - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f0000002000000021000000220000002300000024000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f0000002000000021000000220000002300000024000000 - m_ConstraintCount: 37 - m_ActiveConstraintCount: 4 - m_InitialActiveConstraintCount: 4 + - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000 + m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000 + m_ConstraintCount: 35 + m_ActiveConstraintCount: 1 + m_InitialActiveConstraintCount: 1 particleIndices: - serializedContents: 0100000003000000020000000400000006000000050000000700000009000000080000000a0000000c0000000b0000000d0000000f0000000e000000100000001200000011000000130000001500000014000000160000001800000017000000190000001b0000001a0000001c0000001e0000001d0000001f0000002100000020000000220000002400000023000000250000002700000026000000280000002a000000290000002b0000002d0000002c0000002e000000300000002f0000003100000033000000320000003400000036000000350000003700000039000000380000003a0000003c0000003b0000003d0000003f0000003e000000400000004200000041000000430000004500000044000000460000004800000047000000490000004b0000004a0000004c0000004e0000004d0000004f0000005100000050000000520000005400000053000000550000005700000056000000580000005a000000590000005b0000005d0000005c0000005e000000600000005f0000006100000063000000620000006400000066000000650000006700000069000000680000006a0000006c0000006b0000006d0000006f0000006e000000 + serializedContents: 0100000003000000020000000400000006000000050000000700000009000000080000000a0000000c0000000b0000000d0000000f0000000e000000100000001200000011000000130000001500000014000000160000001800000017000000190000001b0000001a0000001c0000001e0000001d0000001f0000002100000020000000220000002400000023000000250000002700000026000000280000002a000000290000002b0000002d0000002c0000002e000000300000002f0000003100000033000000320000003400000036000000350000003700000039000000380000003a0000003c0000003b0000003d0000003f0000003e000000400000004200000041000000430000004500000044000000460000004800000047000000490000004b0000004a0000004c0000004e0000004d0000004f0000005100000050000000520000005400000053000000550000005700000056000000580000005a000000590000005b0000005d0000005c0000005e000000600000005f000000610000006300000062000000640000006600000065000000670000006900000068000000 m_AlignBytes: 16 lambdas: serializedContents: [] m_AlignBytes: 16 restBends: serializedContents: - - 0.00045045957 - - 0.00004092619 - - 0.000060148468 - - 0.000104531064 - - 0.10644388 + - 0 + - 0 + - 0 - 0 - 0 - 0 @@ -1230,8 +1158,6 @@ MonoBehaviour: - {x: 0, y: 0} - {x: 0, y: 0} - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} m_AlignBytes: 16 plasticity: serializedContents: @@ -1270,26 +1196,21 @@ MonoBehaviour: - {x: 0, y: 0} - {x: 0, y: 0} - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} m_AlignBytes: 16 - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f0000002000000021000000220000002300000024000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f0000002000000021000000220000002300000024000000 - m_ConstraintCount: 37 - m_ActiveConstraintCount: 4 - m_InitialActiveConstraintCount: 4 + - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f0000002000000021000000 + m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f0000002000000021000000 + m_ConstraintCount: 34 + m_ActiveConstraintCount: 1 + m_InitialActiveConstraintCount: 1 particleIndices: - serializedContents: 020000000400000003000000050000000700000006000000080000000a000000090000000b0000000d0000000c0000000e000000100000000f0000001100000013000000120000001400000016000000150000001700000019000000180000001a0000001c0000001b0000001d0000001f0000001e000000200000002200000021000000230000002500000024000000260000002800000027000000290000002b0000002a0000002c0000002e0000002d0000002f0000003100000030000000320000003400000033000000350000003700000036000000380000003a000000390000003b0000003d0000003c0000003e000000400000003f0000004100000043000000420000004400000046000000450000004700000049000000480000004a0000004c0000004b0000004d0000004f0000004e000000500000005200000051000000530000005500000054000000560000005800000057000000590000005b0000005a0000005c0000005e0000005d0000005f0000006100000060000000620000006400000063000000650000006700000066000000680000006a000000690000006b0000006d0000006c0000006e000000700000006f000000 + serializedContents: 020000000400000003000000050000000700000006000000080000000a000000090000000b0000000d0000000c0000000e000000100000000f0000001100000013000000120000001400000016000000150000001700000019000000180000001a0000001c0000001b0000001d0000001f0000001e000000200000002200000021000000230000002500000024000000260000002800000027000000290000002b0000002a0000002c0000002e0000002d0000002f0000003100000030000000320000003400000033000000350000003700000036000000380000003a000000390000003b0000003d0000003c0000003e000000400000003f0000004100000043000000420000004400000046000000450000004700000049000000480000004a0000004c0000004b0000004d0000004f0000004e000000500000005200000051000000530000005500000054000000560000005800000057000000590000005b0000005a0000005c0000005e0000005d0000005f0000006100000060000000620000006400000063000000650000006700000066000000 m_AlignBytes: 16 lambdas: serializedContents: [] m_AlignBytes: 16 restBends: serializedContents: - - 0.00032346052 - - 0.00010871458 - - 0.00003623575 - - 0.0000774973 + - 0 - 0 - 0 - 0 @@ -1360,9 +1281,6 @@ MonoBehaviour: - {x: 0, y: 0} - {x: 0, y: 0} - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} m_AlignBytes: 16 plasticity: serializedContents: @@ -1400,9 +1318,6 @@ MonoBehaviour: - {x: 0, y: 0} - {x: 0, y: 0} - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} m_AlignBytes: 16 skinConstraintsData: batches: [] @@ -1415,7 +1330,339 @@ MonoBehaviour: shapeMatchingConstraintsData: batches: [] aerodynamicConstraintsData: - batches: [] + batches: + - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f00000060000000610000006200000063000000640000006500000066000000670000006800000069000000 + m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f00000060000000610000006200000063000000640000006500000066000000670000006800000069000000 + m_ConstraintCount: 106 + m_ActiveConstraintCount: 6 + m_InitialActiveConstraintCount: 6 + particleIndices: + serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f00000060000000610000006200000063000000640000006500000066000000670000006800000069000000 + m_AlignBytes: 16 + lambdas: + serializedContents: [] + m_AlignBytes: 16 + aerodynamicCoeffs: + serializedContents: + - 0.05675999 + - 1 + - 1 + - 0.053409252 + - 1 + - 1 + - 0.050057013 + - 1 + - 1 + - 0.04670298 + - 1 + - 1 + - 0.043350745 + - 1 + - 1 + - 0.04 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + - 0 + - 1 + - 1 + m_AlignBytes: 16 chainConstraintsData: batches: [] volumeConstraintsData: @@ -1430,13 +1677,13 @@ MonoBehaviour: m_Points: data: - tangentMode: 0 - inTangent: {x: -0.24984515, y: -2.8150266e-16, z: 0.008795024} - position: {x: 0.00021362305, y: -0.0004825592, z: 0} - outTangent: {x: -0.0002593845, y: 0, z: 0.36276904} + inTangent: {x: 0, y: 0, z: 0} + position: {x: 0, y: 0, z: 0} + outTangent: {x: -0, y: -0, z: -0} - tangentMode: 0 - inTangent: {x: -0.0002039969, y: 0, z: -0.02831608} - position: {x: -0.000008068979, y: 0.00009137392, z: 0.31933162} - outTangent: {x: 0, y: -0, z: 0} + inTangent: {x: 0, y: 0, z: 0} + position: {x: 0, y: 0, z: 0.1} + outTangent: {x: -0, y: -0, z: -0} m_Normals: data: - {x: 0, y: 1, z: 0} @@ -1462,28 +1709,28 @@ MonoBehaviour: m_Closed: 0 m_ArcLengthTable: - 0 - - 0.04892595 - - 0.09228638 - - 0.13042764 - - 0.1636961 - - 0.19243808 - - 0.21699996 - - 0.23772807 - - 0.2549688 - - 0.26906845 - - 0.2803734 - - 0.28923002 - - 0.29598463 - - 0.3009836 - - 0.30457333 - - 0.30710012 - - 0.30891034 - - 0.3103503 - - 0.3117663 - - 0.31350467 - - 0.3159118 - - 0.31933403 - m_TotalSplineLenght: 0.31933403 + - 0.0006586762 + - 0.0025483212 + - 0.0055393595 + - 0.009502214 + - 0.014307311 + - 0.019825075 + - 0.025925927 + - 0.032480296 + - 0.0393586 + - 0.04643127 + - 0.053568732 + - 0.0606414 + - 0.06751971 + - 0.074074075 + - 0.08017493 + - 0.08569269 + - 0.090497784 + - 0.09446064 + - 0.09745167 + - 0.09934132 + - 0.099999994 + m_TotalSplineLenght: 0.099999994 OnPathChanged: m_PersistentCalls: m_Calls: [] @@ -1498,122 +1745,115 @@ MonoBehaviour: m_Calls: [] thickness: 0.01 resolution: 0.4 - m_InterParticleDistance: 0.024564156 - totalParticles: 114 - m_RestLength: 2.775752 + m_InterParticleDistance: 0.02 + totalParticles: 106 + m_RestLength: 2.0999987 + deformableEdges: 00000000010000000100000002000000020000000300000003000000040000000400000005000000 restLengths: - - 0.025281452 - - 0.023859516 - - 0.025210889 - - 0.02424051 - - 0.024628486 - - 0.024751194 - - 0.024425108 - - 0.024396013 - - 0.024576226 - - 0.024684237 - - 0.024272759 - - 0.024583023 - - 0.024424033 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 - - 0.024564156 + - 0.019992497 + - 0.020001434 + - 0.02001214 + - 0.020001423 + - 0.019992508 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 - 0 pooledParticles: 100 diff --git a/Assets/ResRaw/bbb/MonoBehaviour/RopeSegment_1.asset.meta b/Assets/ResRaw/Prefabs/Line/RopeSegment_1.asset.meta similarity index 100% rename from Assets/ResRaw/bbb/MonoBehaviour/RopeSegment_1.asset.meta rename to Assets/ResRaw/Prefabs/Line/RopeSegment_1.asset.meta diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Vine.asset b/Assets/ResRaw/Prefabs/Line/RopeSegment_2.asset similarity index 67% rename from Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Vine.asset rename to Assets/ResRaw/Prefabs/Line/RopeSegment_2.asset index 9154a48d9..5587879c6 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Vine.asset +++ b/Assets/ResRaw/Prefabs/Line/RopeSegment_2.asset @@ -1,6 +1,6 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: ---- !u!114 &-5470652867224400354 +--- !u!114 &-5395693579433732326 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -10,9 +10,23 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 775ad4994fda946d1a5936c7e2dfc785, type: 3} - m_Name: top + m_Name: toRod m_EditorClassIdentifier: - particleIndices: 23000000 + particleIndices: 00000000 + m_Blueprint: {fileID: 11400000} +--- !u!114 &-2515171973132415257 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 775ad4994fda946d1a5936c7e2dfc785, type: 3} + m_Name: end + m_EditorClassIdentifier: + particleIndices: 05000000 m_Blueprint: {fileID: 11400000} --- !u!114 &11400000 MonoBehaviour: @@ -24,53 +38,23 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 8f7e67b5626124d0db9886e6cd2aacff, type: 3} - m_Name: Vine + m_Name: RopeSegment_2 m_EditorClassIdentifier: - m_Checksum: 424840046 + m_Checksum: 1945112077 m_Empty: 0 m_Edited: 0 - m_ActiveParticleCount: 36 - m_InitialActiveParticleCount: 36 + m_ActiveParticleCount: 6 + m_InitialActiveParticleCount: 6 _bounds: - m_Center: {x: -2.431271, y: 0.000000022801423, z: 0} - m_Extent: {x: 3.431271, y: 0.000000022801423, z: 0} + m_Center: {x: 0, y: -0.05, z: 0} + m_Extent: {x: 0, y: 0.05, z: 0} positions: - - {x: -5.8625426, y: 0.000000045602846, z: 0} - - {x: -5.6722326, y: 0.000000044661085, z: 0} - - {x: -5.476199, y: 0.00000004345452, z: 0} - - {x: -5.2812467, y: 0.000000042201993, z: 0} - - {x: -5.0818825, y: 0.000000040893514, z: 0} - - {x: -4.8862047, y: 0.000000039592237, z: 0} - - {x: -4.690538, y: 0.0000000382794, z: 0} - - {x: -4.492412, y: 0.00000003694134, z: 0} - - {x: -4.297604, y: 0.000000035619152, z: 0} - - {x: -4.1000786, y: 0.00000003427336, z: 0} - - {x: -3.9043136, y: 0.000000032935475, z: 0} - - {x: -3.7079797, y: 0.000000031590446, z: 0} - - {x: -3.5108986, y: 0.000000030237675, z: 0} - - {x: -3.3154495, y: 0.00000002889405, z: 0} - - {x: -3.117693, y: 0.000000027532945, z: 0} - - {x: -2.9224498, y: 0.00000002618795, z: 0} - - {x: -2.7257571, y: 0.000000024832138, z: 0} - - {x: -2.5293643, y: 0.000000023477908, z: 0} - - {x: -2.3331788, y: 0.000000022124942, z: 0} - - {x: -2.1367855, y: 0.000000020770708, z: 0} - - {x: -1.9400933, y: 0.0000000194149, z: 0} - - {x: -1.7448498, y: 0.000000018069901, z: 0} - - {x: -1.5470929, y: 0.000000016708796, z: 0} - - {x: -1.3516445, y: 0.000000015365174, z: 0} - - {x: -1.1545635, y: 0.000000014012405, z: 0} - - {x: -0.95822966, y: 0.000000012667375, z: 0} - - {x: -0.7624652, y: 0.0000000113294965, z: 0} - - {x: -0.56493855, y: 0.00000000998369, z: 0} - - {x: -0.37013018, y: 0.000000008661504, z: 0} - - {x: -0.17200387, y: 0.0000000073234414, z: 0} - - {x: 0.023661926, y: 0.0000000060106076, z: 0} - - {x: 0.21933958, y: 0.000000004709335, z: 0} - - {x: 0.41870385, y: 0.0000000034008523, z: 0} - - {x: 0.6136565, y: 0.0000000021483273, z: 0} - - {x: 0.8096897, y: 9.417602e-10, z: 0} - - {x: 1, y: 0, z: 0} + - {x: 0, y: 0, z: 0} + - {x: 0, y: -0.019992497, z: 0} + - {x: 0, y: -0.03999393, z: 0} + - {x: 0, y: -0.06000607, z: 0} + - {x: 0, y: -0.08000749, z: 0} + - {x: 0, y: -0.1, z: 0} - {x: 0, y: 0, z: 0} - {x: 0, y: 0, z: 0} - {x: 0, y: 0, z: 0} @@ -172,42 +156,12 @@ MonoBehaviour: - {x: 0, y: 0, z: 0} - {x: 0, y: 0, z: 0} restPositions: - - {x: -5.8625426, y: 0.000000045602846, z: 0, w: 1} - - {x: -5.6722326, y: 0.000000044661085, z: 0, w: 1} - - {x: -5.476199, y: 0.00000004345452, z: 0, w: 1} - - {x: -5.2812467, y: 0.000000042201993, z: 0, w: 1} - - {x: -5.0818825, y: 0.000000040893514, z: 0, w: 1} - - {x: -4.8862047, y: 0.000000039592237, z: 0, w: 1} - - {x: -4.690538, y: 0.0000000382794, z: 0, w: 1} - - {x: -4.492412, y: 0.00000003694134, z: 0, w: 1} - - {x: -4.297604, y: 0.000000035619152, z: 0, w: 1} - - {x: -4.1000786, y: 0.00000003427336, z: 0, w: 1} - - {x: -3.9043136, y: 0.000000032935475, z: 0, w: 1} - - {x: -3.7079797, y: 0.000000031590446, z: 0, w: 1} - - {x: -3.5108986, y: 0.000000030237675, z: 0, w: 1} - - {x: -3.3154495, y: 0.00000002889405, z: 0, w: 1} - - {x: -3.117693, y: 0.000000027532945, z: 0, w: 1} - - {x: -2.9224498, y: 0.00000002618795, z: 0, w: 1} - - {x: -2.7257571, y: 0.000000024832138, z: 0, w: 1} - - {x: -2.5293643, y: 0.000000023477908, z: 0, w: 1} - - {x: -2.3331788, y: 0.000000022124942, z: 0, w: 1} - - {x: -2.1367855, y: 0.000000020770708, z: 0, w: 1} - - {x: -1.9400933, y: 0.0000000194149, z: 0, w: 1} - - {x: -1.7448498, y: 0.000000018069901, z: 0, w: 1} - - {x: -1.5470929, y: 0.000000016708796, z: 0, w: 1} - - {x: -1.3516445, y: 0.000000015365174, z: 0, w: 1} - - {x: -1.1545635, y: 0.000000014012405, z: 0, w: 1} - - {x: -0.95822966, y: 0.000000012667375, z: 0, w: 1} - - {x: -0.7624652, y: 0.0000000113294965, z: 0, w: 1} - - {x: -0.56493855, y: 0.00000000998369, z: 0, w: 1} - - {x: -0.37013018, y: 0.000000008661504, z: 0, w: 1} - - {x: -0.17200387, y: 0.0000000073234414, z: 0, w: 1} - - {x: 0.023661926, y: 0.0000000060106076, z: 0, w: 1} - - {x: 0.21933958, y: 0.000000004709335, z: 0, w: 1} - - {x: 0.41870385, y: 0.0000000034008523, z: 0, w: 1} - - {x: 0.6136565, y: 0.0000000021483273, z: 0, w: 1} - - {x: 0.8096897, y: 9.417602e-10, z: 0, w: 1} - - {x: 1, y: 0, z: 0, w: 1} + - {x: 0, y: 0, z: 0, w: 1} + - {x: 0, y: -0.019992497, z: 0, w: 1} + - {x: 0, y: -0.03999393, z: 0, w: 1} + - {x: 0, y: -0.06000607, z: 0, w: 1} + - {x: 0, y: -0.08000749, z: 0, w: 1} + - {x: 0, y: -0.1, z: 0, w: 1} - {x: 0, y: 0, z: 0, w: 0} - {x: 0, y: 0, z: 0, w: 0} - {x: 0, y: 0, z: 0, w: 0} @@ -418,74 +372,14 @@ MonoBehaviour: - {x: 0, y: 0, z: 0} - {x: 0, y: 0, z: 0} - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} - - {x: 0, y: 0, z: 0} angularVelocities: [] invMasses: - 10 - 10 + - 9.999998 - 9.999999 - - 10 - 9.999999 - - 10 - - 10.000001 - - 10.000001 - - 10.000001 - 9.999999 - - 10 - - 10 - - 10 - - 10.000001 - - 9.999999 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - 0 - 0 - 0 @@ -587,44 +481,14 @@ MonoBehaviour: - 0 - 0 invRotationalMasses: [] - filters: 0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 + filters: 0200ffff0200ffff0200ffff0200ffff0200ffff0200ffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 principalRadii: - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.10000002, y: 0.10000002, z: 0.10000002} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.099999994, y: 0.099999994, z: 0.099999994} - - {x: 0.099999994, y: 0.099999994, z: 0.099999994} - - {x: 0.099999994, y: 0.099999994, z: 0.099999994} - - {x: 0.10000002, y: 0.10000002, z: 0.10000002} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.099999994, y: 0.099999994, z: 0.099999994} - - {x: 0.10000002, y: 0.10000002, z: 0.10000002} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} - - {x: 0.1, y: 0.1, z: 0.1} + - {x: 0.028379995, y: 0.028379995, z: 0.028379995} + - {x: 0.026704626, y: 0.026704626, z: 0.026704626} + - {x: 0.025028506, y: 0.025028506, z: 0.025028506} + - {x: 0.02335149, y: 0.02335149, z: 0.02335149} + - {x: 0.021675372, y: 0.021675372, z: 0.021675372} + - {x: 0.02, y: 0.02, z: 0.02} - {x: 0, y: 0, z: 0} - {x: 0, y: 0, z: 0} - {x: 0, y: 0, z: 0} @@ -726,42 +590,12 @@ MonoBehaviour: - {x: 0, y: 0, z: 0} - {x: 0, y: 0, z: 0} colors: - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} + - {r: 1, g: 0, b: 0, a: 1} + - {r: 1, g: 0.19992499, b: 0.19992499, a: 1} + - {r: 1.0000001, g: 0.39993933, b: 0.39993933, a: 1.0000001} + - {r: 1.0000001, g: 0.60006076, b: 0.60006076, a: 1.0000001} + - {r: 1.0000001, g: 0.80007505, b: 0.80007505, a: 1.0000001} - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 0.99999994, g: 0.99999994, b: 0.99999994, a: 0.99999994} - - {r: 0.99999994, g: 0.99999994, b: 0.99999994, a: 0.99999994} - - {r: 0.99999994, g: 0.99999994, b: 0.99999994, a: 0.99999994} - - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 0.99999994, g: 0.99999994, b: 0.99999994, a: 0.99999994} - - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} - {r: 0, g: 0, b: 0, a: 0} - {r: 0, g: 0, b: 0, a: 0} - {r: 0, g: 0, b: 0, a: 0} @@ -863,41 +697,26 @@ MonoBehaviour: - {r: 0, g: 0, b: 0, a: 0} - {r: 0, g: 0, b: 0, a: 0} points: - edges: 000000000100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000a0000000a0000000b0000000b0000000c0000000c0000000d0000000d0000000e0000000e0000000f0000000f00000010000000100000001100000011000000120000001200000013000000130000001400000014000000150000001500000016000000160000001700000017000000180000001800000019000000190000001a0000001a0000001b0000001b0000001c0000001c0000001d0000001d0000001e0000001e0000001f0000001f00000020000000200000002100000021000000220000002200000023000000 + edges: 00000000010000000100000002000000020000000300000003000000040000000400000005000000 triangles: distanceConstraintsData: batches: - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f00000040000000410000004200000043000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f00000040000000410000004200000043000000 - m_ConstraintCount: 68 - m_ActiveConstraintCount: 18 - m_InitialActiveConstraintCount: 18 + - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f0000003000000031000000320000003300000034000000 + m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f0000003000000031000000320000003300000034000000 + m_ConstraintCount: 53 + m_ActiveConstraintCount: 3 + m_InitialActiveConstraintCount: 3 particleIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f0000002000000021000000220000002300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 + serializedContents: 00000000010000000200000003000000040000000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 m_AlignBytes: 16 lambdas: serializedContents: [] m_AlignBytes: 16 restLengths: serializedContents: - - 0.19031 - - 0.19495249 - - 0.19567776 - - 0.19812584 - - 0.1975255 - - 0.19633389 - - 0.19544911 - - 0.19524312 - - 0.19639277 - - 0.19639325 - - 0.19524348 - - 0.1954484 - - 0.19633389 - - 0.19752663 - - 0.19812632 - - 0.19567765 - - 0.19495267 - - 0.1903103 + - 0.019992497 + - 0.02001214 + - 0.019992508 - 0 - 0 - 0 @@ -1004,52 +823,22 @@ MonoBehaviour: - {x: 0, y: 0} - {x: 0, y: 0} - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} m_AlignBytes: 16 - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000 - m_ConstraintCount: 67 - m_ActiveConstraintCount: 17 - m_InitialActiveConstraintCount: 17 + - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f00000030000000310000003200000033000000 + m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f00000030000000310000003200000033000000 + m_ConstraintCount: 52 + m_ActiveConstraintCount: 2 + m_InitialActiveConstraintCount: 2 particleIndices: - serializedContents: 0100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f00000020000000210000002200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 + serializedContents: 0100000002000000030000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 m_AlignBytes: 16 lambdas: serializedContents: [] m_AlignBytes: 16 restLengths: serializedContents: - - 0.19603348 - - 0.19936419 - - 0.19566679 - - 0.194808 - - 0.19576502 - - 0.19708109 - - 0.19775653 - - 0.1966927 - - 0.19618559 - - 0.19669223 - - 0.19775689 - - 0.19708097 - - 0.19576448 - - 0.19480836 - - 0.19566579 - - 0.19936427 - - 0.19603318 + - 0.020001434 + - 0.020001423 - 0 - 0 - 0 @@ -1155,31 +944,16 @@ MonoBehaviour: - {x: 0, y: 0} - {x: 0, y: 0} - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} m_AlignBytes: 16 bendConstraintsData: batches: - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c000000 - m_ConstraintCount: 45 - m_ActiveConstraintCount: 12 - m_InitialActiveConstraintCount: 12 + - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000 + m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000 + m_ConstraintCount: 35 + m_ActiveConstraintCount: 2 + m_InitialActiveConstraintCount: 2 particleIndices: - serializedContents: 000000000200000001000000030000000500000004000000060000000800000007000000090000000b0000000a0000000c0000000e0000000d0000000f0000001100000010000000120000001400000013000000150000001700000016000000180000001a000000190000001b0000001d0000001c0000001e000000200000001f0000002100000023000000220000002400000026000000250000002700000029000000280000002a0000002c0000002b0000002d0000002f0000002e000000300000003200000031000000330000003500000034000000360000003800000037000000390000003b0000003a0000003c0000003e0000003d0000003f0000004100000040000000420000004400000043000000450000004700000046000000480000004a000000490000004b0000004d0000004c0000004e000000500000004f0000005100000053000000520000005400000056000000550000005700000059000000580000005a0000005c0000005b0000005d0000005f0000005e000000600000006200000061000000630000006500000064000000660000006800000067000000690000006b0000006a0000006c0000006e0000006d0000006f0000007100000070000000720000007400000073000000750000007700000076000000780000007a000000790000007b0000007d0000007c0000007e000000800000007f000000810000008300000082000000840000008600000085000000 + serializedContents: 000000000200000001000000030000000500000004000000060000000800000007000000090000000b0000000a0000000c0000000e0000000d0000000f0000001100000010000000120000001400000013000000150000001700000016000000180000001a000000190000001b0000001d0000001c0000001e000000200000001f0000002100000023000000220000002400000026000000250000002700000029000000280000002a0000002c0000002b0000002d0000002f0000002e000000300000003200000031000000330000003500000034000000360000003800000037000000390000003b0000003a0000003c0000003e0000003d0000003f0000004100000040000000420000004400000043000000450000004700000046000000480000004a000000490000004b0000004d0000004c0000004e000000500000004f0000005100000053000000520000005400000056000000550000005700000059000000580000005a0000005c0000005b0000005d0000005f0000005e000000600000006200000061000000630000006500000064000000660000006800000067000000 m_AlignBytes: 16 lambdas: serializedContents: [] @@ -1221,16 +995,6 @@ MonoBehaviour: - 0 - 0 - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 m_AlignBytes: 16 bendingStiffnesses: serializedContents: @@ -1269,16 +1033,6 @@ MonoBehaviour: - {x: 0, y: 0} - {x: 0, y: 0} - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} m_AlignBytes: 16 plasticity: serializedContents: @@ -1317,24 +1071,14 @@ MonoBehaviour: - {x: 0, y: 0} - {x: 0, y: 0} - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} m_AlignBytes: 16 - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c000000 - m_ConstraintCount: 45 - m_ActiveConstraintCount: 11 - m_InitialActiveConstraintCount: 11 + - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000 + m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000 + m_ConstraintCount: 35 + m_ActiveConstraintCount: 1 + m_InitialActiveConstraintCount: 1 particleIndices: - serializedContents: 0100000003000000020000000400000006000000050000000700000009000000080000000a0000000c0000000b0000000d0000000f0000000e000000100000001200000011000000130000001500000014000000160000001800000017000000190000001b0000001a0000001c0000001e0000001d0000001f0000002100000020000000220000002400000023000000250000002700000026000000280000002a000000290000002b0000002d0000002c0000002e000000300000002f0000003100000033000000320000003400000036000000350000003700000039000000380000003a0000003c0000003b0000003d0000003f0000003e000000400000004200000041000000430000004500000044000000460000004800000047000000490000004b0000004a0000004c0000004e0000004d0000004f0000005100000050000000520000005400000053000000550000005700000056000000580000005a000000590000005b0000005d0000005c0000005e000000600000005f0000006100000063000000620000006400000066000000650000006700000069000000680000006a0000006c0000006b0000006d0000006f0000006e000000700000007200000071000000730000007500000074000000760000007800000077000000790000007b0000007a0000007c0000007e0000007d0000007f0000008100000080000000820000008400000083000000850000008700000086000000 + serializedContents: 0100000003000000020000000400000006000000050000000700000009000000080000000a0000000c0000000b0000000d0000000f0000000e000000100000001200000011000000130000001500000014000000160000001800000017000000190000001b0000001a0000001c0000001e0000001d0000001f0000002100000020000000220000002400000023000000250000002700000026000000280000002a000000290000002b0000002d0000002c0000002e000000300000002f0000003100000033000000320000003400000036000000350000003700000039000000380000003a0000003c0000003b0000003d0000003f0000003e000000400000004200000041000000430000004500000044000000460000004800000047000000490000004b0000004a0000004c0000004e0000004d0000004f0000005100000050000000520000005400000053000000550000005700000056000000580000005a000000590000005b0000005d0000005c0000005e000000600000005f000000610000006300000062000000640000006600000065000000670000006900000068000000 m_AlignBytes: 16 lambdas: serializedContents: [] @@ -1376,16 +1120,6 @@ MonoBehaviour: - 0 - 0 - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 m_AlignBytes: 16 bendingStiffnesses: serializedContents: @@ -1424,16 +1158,6 @@ MonoBehaviour: - {x: 0, y: 0} - {x: 0, y: 0} - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} m_AlignBytes: 16 plasticity: serializedContents: @@ -1472,24 +1196,14 @@ MonoBehaviour: - {x: 0, y: 0} - {x: 0, y: 0} - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} m_AlignBytes: 16 - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b000000 - m_ConstraintCount: 44 - m_ActiveConstraintCount: 11 - m_InitialActiveConstraintCount: 11 + - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f0000002000000021000000 + m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f0000002000000021000000 + m_ConstraintCount: 34 + m_ActiveConstraintCount: 1 + m_InitialActiveConstraintCount: 1 particleIndices: - serializedContents: 020000000400000003000000050000000700000006000000080000000a000000090000000b0000000d0000000c0000000e000000100000000f0000001100000013000000120000001400000016000000150000001700000019000000180000001a0000001c0000001b0000001d0000001f0000001e000000200000002200000021000000230000002500000024000000260000002800000027000000290000002b0000002a0000002c0000002e0000002d0000002f0000003100000030000000320000003400000033000000350000003700000036000000380000003a000000390000003b0000003d0000003c0000003e000000400000003f0000004100000043000000420000004400000046000000450000004700000049000000480000004a0000004c0000004b0000004d0000004f0000004e000000500000005200000051000000530000005500000054000000560000005800000057000000590000005b0000005a0000005c0000005e0000005d0000005f0000006100000060000000620000006400000063000000650000006700000066000000680000006a000000690000006b0000006d0000006c0000006e000000700000006f0000007100000073000000720000007400000076000000750000007700000079000000780000007a0000007c0000007b0000007d0000007f0000007e000000800000008200000081000000830000008500000084000000 + serializedContents: 020000000400000003000000050000000700000006000000080000000a000000090000000b0000000d0000000c0000000e000000100000000f0000001100000013000000120000001400000016000000150000001700000019000000180000001a0000001c0000001b0000001d0000001f0000001e000000200000002200000021000000230000002500000024000000260000002800000027000000290000002b0000002a0000002c0000002e0000002d0000002f0000003100000030000000320000003400000033000000350000003700000036000000380000003a000000390000003b0000003d0000003c0000003e000000400000003f0000004100000043000000420000004400000046000000450000004700000049000000480000004a0000004c0000004b0000004d0000004f0000004e000000500000005200000051000000530000005500000054000000560000005800000057000000590000005b0000005a0000005c0000005e0000005d0000005f0000006100000060000000620000006400000063000000650000006700000066000000 m_AlignBytes: 16 lambdas: serializedContents: [] @@ -1530,16 +1244,6 @@ MonoBehaviour: - 0 - 0 - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 m_AlignBytes: 16 bendingStiffnesses: serializedContents: @@ -1577,16 +1281,6 @@ MonoBehaviour: - {x: 0, y: 0} - {x: 0, y: 0} - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} m_AlignBytes: 16 plasticity: serializedContents: @@ -1624,16 +1318,6 @@ MonoBehaviour: - {x: 0, y: 0} - {x: 0, y: 0} - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} - - {x: 0, y: 0} m_AlignBytes: 16 skinConstraintsData: batches: [] @@ -1647,125 +1331,35 @@ MonoBehaviour: batches: [] aerodynamicConstraintsData: batches: - - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b0000007c0000007d0000007e0000007f0000008000000081000000820000008300000084000000850000008600000087000000 - m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b0000007c0000007d0000007e0000007f0000008000000081000000820000008300000084000000850000008600000087000000 - m_ConstraintCount: 136 - m_ActiveConstraintCount: 36 - m_InitialActiveConstraintCount: 36 + - m_IDs: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f00000060000000610000006200000063000000640000006500000066000000670000006800000069000000 + m_IDToIndex: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f00000060000000610000006200000063000000640000006500000066000000670000006800000069000000 + m_ConstraintCount: 106 + m_ActiveConstraintCount: 6 + m_InitialActiveConstraintCount: 6 particleIndices: - serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f000000600000006100000062000000630000006400000065000000660000006700000068000000690000006a0000006b0000006c0000006d0000006e0000006f000000700000007100000072000000730000007400000075000000760000007700000078000000790000007a0000007b0000007c0000007d0000007e0000007f0000008000000081000000820000008300000084000000850000008600000087000000 + serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f00000060000000610000006200000063000000640000006500000066000000670000006800000069000000 m_AlignBytes: 16 lambdas: serializedContents: [] m_AlignBytes: 16 aerodynamicCoeffs: serializedContents: - - 0.2 + - 0.05675999 - 1 - 1 - - 0.2 + - 0.053409252 - 1 - 1 - - 0.2 + - 0.050057013 - 1 - 1 - - 0.2 + - 0.04670298 - 1 - 1 - - 0.20000003 + - 0.043350745 - 1 - 1 - - 0.2 - - 1 - - 1 - - 0.19999999 - - 1 - - 1 - - 0.19999999 - - 1 - - 1 - - 0.19999999 - - 1 - - 1 - - 0.20000003 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.19999999 - - 1 - - 1 - - 0.20000003 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 - - 1 - - 1 - - 0.2 + - 0.04 - 1 - 1 - 0 @@ -2074,69 +1668,69 @@ MonoBehaviour: volumeConstraintsData: batches: [] groups: - - {fileID: 6295150216905737680} - - {fileID: -5470652867224400354} + - {fileID: -5395693579433732326} + - {fileID: -2515171973132415257} path: m_Names: - - bottom - - top + - toRod + - end m_Points: data: - tangentMode: 0 - inTangent: {x: -0.25, y: 0, z: 0} - position: {x: -5.8625426, y: 0.000000045602846, z: 0} - outTangent: {x: 0.25, y: 0, z: 0} + inTangent: {x: 0, y: 0, z: 0} + position: {x: 0, y: 0, z: 0} + outTangent: {x: -0, y: -0, z: -0} - tangentMode: 0 - inTangent: {x: -0.25, y: 0, z: 0} - position: {x: 1, y: 0, z: 0} - outTangent: {x: 0.25, y: 0, z: 0} + inTangent: {x: 0, y: 0, z: 0} + position: {x: 0, y: -0.1, z: 0} + outTangent: {x: -0, y: -0, z: -0} m_Normals: data: - {x: 0, y: 1, z: 0} - - {x: 0, y: 1, z: 0} + - {x: 0, y: 1.0000001, z: 0} m_Colors: data: - - {r: 1, g: 1, b: 1, a: 1} - - {r: 1, g: 1, b: 1, a: 1} + - {r: 1, g: 0, b: 0, a: 1} + - {r: 1.0000001, g: 1.0000001, b: 1.0000001, a: 1.0000001} m_Thickness: data: - - 1 - - 1 + - 2.8379996 + - 2 m_Masses: data: - 0.1 - - 0.1 + - 0.10000001 m_RotationalMasses: data: - 1 - - 1 + - 1.0000001 m_Filters: data: 0200ffff0200ffff m_Closed: 0 m_ArcLengthTable: - 0 - - 0.07597615 - - 0.22719578 - - 0.44573855 - - 0.7236841 - - 1.0531119 - - 1.4261019 - - 1.8347335 - - 2.2710862 - - 2.7272398 - - 3.195274 - - 3.6672688 - - 4.135303 - - 4.591457 - - 5.0278096 - - 5.436441 - - 5.8094306 - - 6.1388583 - - 6.416804 - - 6.6353464 - - 6.786566 - - 6.862542 - m_TotalSplineLenght: 6.862542 + - 0.0006586762 + - 0.0025483212 + - 0.0055393595 + - 0.009502214 + - 0.014307311 + - 0.019825075 + - 0.025925927 + - 0.032480296 + - 0.0393586 + - 0.04643127 + - 0.053568732 + - 0.0606414 + - 0.06751971 + - 0.074074075 + - 0.08017493 + - 0.08569269 + - 0.090497784 + - 0.09446064 + - 0.09745167 + - 0.09934132 + - 0.099999994 + m_TotalSplineLenght: 0.099999994 OnPathChanged: m_PersistentCalls: m_Calls: [] @@ -2149,161 +1743,117 @@ MonoBehaviour: OnControlPointRenamed: m_PersistentCalls: m_Calls: [] - thickness: 0.1 - resolution: 0.5 - m_InterParticleDistance: 0.19607264 - totalParticles: 136 - m_RestLength: 26.469852 - deformableEdges: 000000000100000001000000020000000200000003000000030000000400000004000000050000000500000006000000060000000700000007000000080000000800000009000000090000000a0000000a0000000b0000000b0000000c0000000c0000000d0000000d0000000e0000000e0000000f0000000f00000010000000100000001100000011000000120000001200000013000000130000001400000014000000150000001500000016000000160000001700000017000000180000001800000019000000190000001a0000001a0000001b0000001b0000001c0000001c0000001d0000001d0000001e0000001e0000001f0000001f00000020000000200000002100000021000000220000002200000023000000 + thickness: 0.01 + resolution: 0.4 + m_InterParticleDistance: 0.02 + totalParticles: 106 + m_RestLength: 2.0999987 + deformableEdges: 00000000010000000100000002000000020000000300000003000000040000000400000005000000 restLengths: - - 0.19031 - - 0.19603348 - - 0.19495249 - - 0.19936419 - - 0.19567776 - - 0.19566679 - - 0.19812584 - - 0.194808 - - 0.1975255 - - 0.19576502 - - 0.19633389 - - 0.19708109 - - 0.19544911 - - 0.19775653 - - 0.19524312 - - 0.1966927 - - 0.19639277 - - 0.19618559 - - 0.19639325 - - 0.19669223 - - 0.19524348 - - 0.19775689 - - 0.1954484 - - 0.19708097 - - 0.19633389 - - 0.19576448 - - 0.19752663 - - 0.19480836 - - 0.19812632 - - 0.19566579 - - 0.19567765 - - 0.19936427 - - 0.19495267 - - 0.19603318 - - 0.1903103 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 - - 0.19607264 + - 0.019992497 + - 0.020001434 + - 0.02001214 + - 0.020001423 + - 0.019992508 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 + - 0.02 - 0 pooledParticles: 100 ---- !u!114 &6295150216905737680 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 775ad4994fda946d1a5936c7e2dfc785, type: 3} - m_Name: bottom - m_EditorClassIdentifier: - particleIndices: 00000000 - m_Blueprint: {fileID: 11400000} diff --git a/Assets/Obi/Samples/Common/SampleResources/CollisionMaterials/RollingFrictionSmoke.asset.meta b/Assets/ResRaw/Prefabs/Line/RopeSegment_2.asset.meta similarity index 79% rename from Assets/Obi/Samples/Common/SampleResources/CollisionMaterials/RollingFrictionSmoke.asset.meta rename to Assets/ResRaw/Prefabs/Line/RopeSegment_2.asset.meta index 3dff32bfc..cc021f78d 100644 --- a/Assets/Obi/Samples/Common/SampleResources/CollisionMaterials/RollingFrictionSmoke.asset.meta +++ b/Assets/ResRaw/Prefabs/Line/RopeSegment_2.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: bb309543303c94a32b84f20d84389f76 +guid: 85c17c422242c8848a83af20ba2e4b52 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/ResRaw/Prefabs/Line/fishing line float set.prefab b/Assets/ResRaw/Prefabs/Line/fishing line float set.prefab index 67c096626..7306d3927 100644 --- a/Assets/ResRaw/Prefabs/Line/fishing line float set.prefab +++ b/Assets/ResRaw/Prefabs/Line/fishing line float set.prefab @@ -24,7 +24,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!4 &4439867113915692 Transform: m_ObjectHideFlags: 0 @@ -52,13 +52,45 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} m_Name: m_EditorClassIdentifier: - solverIndices: 0000000010000000 + solverIndices: + serializedContents: 000000000100000002000000030000000400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000100000001100000012000000130000001400000015000000160000001700000018000000190000001a0000001b0000001c0000001d0000001e0000001f000000200000002100000022000000230000002400000025000000260000002700000028000000290000002a0000002b0000002c0000002d0000002e0000002f000000300000003100000032000000330000003400000035000000360000003700000038000000390000003a0000003b0000003c0000003d0000003e0000003f000000400000004100000042000000430000004400000045000000460000004700000048000000490000004a0000004b0000004c0000004d0000004e0000004f000000500000005100000052000000530000005400000055000000560000005700000058000000590000005a0000005b0000005c0000005d0000005e0000005f00000060000000610000006200000063000000640000006500000066000000670000006800000069000000 + m_AlignBytes: 16 + groupID: 1 m_CollisionMaterial: {fileID: 0} m_SurfaceCollisions: 0 + m_MassScale: 1 m_SelfCollisions: 0 - restLength_: 0 - elements: [] - m_RopeBlueprint: {fileID: 11400000, guid: b9af42d80396eae47978edea24f03a71, type: 2} + restLength_: 0.1 + elements: + - particle1: 0 + particle2: 1 + restLength: 0.019992497 + constraintForce: 0 + tearResistance: 1 + - particle1: 1 + particle2: 2 + restLength: 0.020001434 + constraintForce: 0 + tearResistance: 1 + - particle1: 2 + particle2: 3 + restLength: 0.02001214 + constraintForce: 0 + tearResistance: 1 + - particle1: 3 + particle2: 4 + restLength: 0.020001423 + constraintForce: 0 + tearResistance: 1 + - particle1: 4 + particle2: 5 + restLength: 0.019992508 + constraintForce: 0 + tearResistance: 1 + _aerodynamicsEnabled: 1 + _drag: 0.05 + _lift: 0.02 + m_RopeBlueprint: {fileID: 11400000, guid: 85c17c422242c8848a83af20ba2e4b52, type: 2} tearingEnabled: 0 tearResistanceMultiplier: 1000 tearRate: 1 @@ -142,6 +174,7 @@ MonoBehaviour: decimation: 0 smoothing: 3 twist: 25 + indexInSystem: 0 --- !u!114 &114148468497635697 MonoBehaviour: m_ObjectHideFlags: 0 @@ -154,6 +187,15 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} m_Name: m_EditorClassIdentifier: + material: {fileID: 0} + renderParameters: + layer: 0 + lightProbeUsage: 1 + reflectionProbeUsage: 1 + shadowCastingMode: 1 + receiveShadows: 1 + motionVectors: 0 + renderingLayerMask: 4294967295 uvAnchor: 0 uvScale: {x: 1, y: 1} normalizeV: 1 @@ -176,8 +218,9 @@ MonoBehaviour: m_ParticleGroup: {fileID: -3803899459416562112, guid: b9af42d80396eae47978edea24f03a71, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 + m_Projection: 0 m_Compliance: 0 - m_BreakThreshold: Infinity + breakThreshold: Infinity --- !u!114 &114172005767509640 MonoBehaviour: m_ObjectHideFlags: 0 @@ -195,8 +238,9 @@ MonoBehaviour: m_ParticleGroup: {fileID: 1168889126576124136, guid: b9af42d80396eae47978edea24f03a71, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 + m_Projection: 0 m_Compliance: 0 - m_BreakThreshold: Infinity + breakThreshold: Infinity --- !u!114 &114941649757569269 MonoBehaviour: m_ObjectHideFlags: 0 @@ -255,7 +299,7 @@ Transform: m_GameObject: {fileID: 1035052809208993} serializedVersion: 2 m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: -1.5, z: 0} + m_LocalPosition: {x: 0, y: -0.2, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -460,6 +504,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c0403ffd74ce46fab8bd4ef057e51432, type: 3} m_Name: m_EditorClassIdentifier: + Solver: {fileID: 0} startParticleAttachment: {fileID: 114671520904232594} isLureConnect: 0 rodLine: {fileID: 4922671409596527468} @@ -495,7 +540,7 @@ Transform: m_GameObject: {fileID: 1858052053854210} serializedVersion: 2 m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: -1, z: 0} + m_LocalPosition: {x: 0, y: -0.1, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -664,7 +709,7 @@ Transform: m_GameObject: {fileID: 1933124697579601} serializedVersion: 2 m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: -1, z: 0} + m_LocalPosition: {x: 0, y: -0.1, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -682,13 +727,20 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} m_Name: m_EditorClassIdentifier: - solverIndices: 0000000010000000 + solverIndices: + serializedContents: + m_AlignBytes: 16 + groupID: 0 m_CollisionMaterial: {fileID: 0} m_SurfaceCollisions: 0 + m_MassScale: 1 m_SelfCollisions: 0 restLength_: 0 elements: [] - m_RopeBlueprint: {fileID: 11400000, guid: b9af42d80396eae47978edea24f03a71, type: 2} + _aerodynamicsEnabled: 1 + _drag: 0.05 + _lift: 0.02 + m_RopeBlueprint: {fileID: 11400000, guid: 2ade1c037e0bf214783dcb44ae3b7be7, type: 2} tearingEnabled: 0 tearResistanceMultiplier: 1000 tearRate: 1 @@ -772,6 +824,7 @@ MonoBehaviour: decimation: 0 smoothing: 0 twist: 0 + indexInSystem: 0 --- !u!114 &114972033155067211 MonoBehaviour: m_ObjectHideFlags: 0 @@ -784,6 +837,15 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} m_Name: m_EditorClassIdentifier: + material: {fileID: 0} + renderParameters: + layer: 0 + lightProbeUsage: 1 + reflectionProbeUsage: 1 + shadowCastingMode: 1 + receiveShadows: 1 + motionVectors: 0 + renderingLayerMask: 4294967295 uvAnchor: 0 uvScale: {x: 1, y: 1} normalizeV: 1 @@ -806,8 +868,9 @@ MonoBehaviour: m_ParticleGroup: {fileID: -3803899459416562112, guid: b9af42d80396eae47978edea24f03a71, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 + m_Projection: 0 m_Compliance: 0 - m_BreakThreshold: Infinity + breakThreshold: Infinity --- !u!114 &114623075352630189 MonoBehaviour: m_ObjectHideFlags: 0 @@ -825,8 +888,9 @@ MonoBehaviour: m_ParticleGroup: {fileID: 1168889126576124136, guid: b9af42d80396eae47978edea24f03a71, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 + m_Projection: 0 m_Compliance: 0 - m_BreakThreshold: Infinity + breakThreshold: Infinity --- !u!114 &114422070939195681 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/ResRaw/Prefabs/Line/fishing line spinning.prefab b/Assets/ResRaw/Prefabs/Line/fishing line spinning.prefab index 5df1a25a6..251deb66c 100644 --- a/Assets/ResRaw/Prefabs/Line/fishing line spinning.prefab +++ b/Assets/ResRaw/Prefabs/Line/fishing line spinning.prefab @@ -47,6 +47,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c0403ffd74ce46fab8bd4ef057e51432, type: 3} m_Name: m_EditorClassIdentifier: + Solver: {fileID: 0} startParticleAttachment: {fileID: 114052339901978322} isLureConnect: 1 rodLine: {fileID: 4297776814324645408} @@ -106,13 +107,20 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 61104f33a3f344db9b7e0d0cda41a9fb, type: 3} m_Name: m_EditorClassIdentifier: - solverIndices: 0000000010000000 + solverIndices: + serializedContents: + m_AlignBytes: 16 + groupID: 0 m_CollisionMaterial: {fileID: 0} m_SurfaceCollisions: 0 + m_MassScale: 1 m_SelfCollisions: 0 restLength_: 0 elements: [] - m_RopeBlueprint: {fileID: 11400000, guid: b9af42d80396eae47978edea24f03a71, type: 2} + _aerodynamicsEnabled: 1 + _drag: 0.05 + _lift: 0.02 + m_RopeBlueprint: {fileID: 11400000, guid: 85c17c422242c8848a83af20ba2e4b52, type: 2} tearingEnabled: 0 tearResistanceMultiplier: 1000 tearRate: 1 @@ -196,6 +204,7 @@ MonoBehaviour: decimation: 0 smoothing: 3 twist: 25 + indexInSystem: 0 --- !u!114 &114606677337991535 MonoBehaviour: m_ObjectHideFlags: 0 @@ -208,6 +217,15 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c4747da60837c44f9ba4b4a86879bcc8, type: 3} m_Name: m_EditorClassIdentifier: + material: {fileID: 0} + renderParameters: + layer: 0 + lightProbeUsage: 1 + reflectionProbeUsage: 1 + shadowCastingMode: 1 + receiveShadows: 1 + motionVectors: 0 + renderingLayerMask: 4294967295 uvAnchor: 0 uvScale: {x: 1, y: 1} normalizeV: 1 @@ -230,8 +248,9 @@ MonoBehaviour: m_ParticleGroup: {fileID: -3803899459416562112, guid: b9af42d80396eae47978edea24f03a71, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 + m_Projection: 0 m_Compliance: 0 - m_BreakThreshold: Infinity + breakThreshold: Infinity --- !u!114 &114975473824467752 MonoBehaviour: m_ObjectHideFlags: 0 @@ -249,8 +268,9 @@ MonoBehaviour: m_ParticleGroup: {fileID: 1168889126576124136, guid: b9af42d80396eae47978edea24f03a71, type: 2} m_AttachmentType: 0 m_ConstrainOrientation: 0 + m_Projection: 0 m_Compliance: 0 - m_BreakThreshold: Infinity + breakThreshold: Infinity --- !u!114 &114821237079273711 MonoBehaviour: m_ObjectHideFlags: 0 @@ -449,7 +469,7 @@ Transform: m_GameObject: {fileID: 1900952002951889} serializedVersion: 2 m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: -1, z: 0} + m_LocalPosition: {x: 0, y: -0.1, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] diff --git a/Assets/Samples/Crest/5.4.2/Boats/Materials/Boats_Hull.mat b/Assets/Samples/Crest/5.4.2/Boats/Materials/Boats_Hull.mat index 625349864..3a1b202ee 100644 --- a/Assets/Samples/Crest/5.4.2/Boats/Materials/Boats_Hull.mat +++ b/Assets/Samples/Crest/5.4.2/Boats/Materials/Boats_Hull.mat @@ -25,7 +25,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 9 + version: 10 --- !u!21 &2100000 Material: serializedVersion: 8 @@ -38,9 +38,9 @@ Material: m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 m_ValidKeywords: - - _SPECULARHIGHLIGHTS_OFF - m_InvalidKeywords: - _DISABLE_SSR_TRANSPARENT + - _SPECULARHIGHLIGHTS_OFF + m_InvalidKeywords: [] m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 diff --git a/Assets/Samples/Crest/5.4.2/Examples/Materials/Examples_TransparentPrimitive.mat b/Assets/Samples/Crest/5.4.2/Examples/Materials/Examples_TransparentPrimitive.mat index fea94e366..db3248fb2 100644 --- a/Assets/Samples/Crest/5.4.2/Examples/Materials/Examples_TransparentPrimitive.mat +++ b/Assets/Samples/Crest/5.4.2/Examples/Materials/Examples_TransparentPrimitive.mat @@ -42,11 +42,11 @@ Material: m_ModifiedSerializedProperties: 0 m_ValidKeywords: - _BUILTIN_SURFACE_TYPE_TRANSPARENT - - _SPECULARHIGHLIGHTS_OFF - - _SURFACE_TYPE_TRANSPARENT - m_InvalidKeywords: - _DISABLE_SSR_TRANSPARENT - _ENABLE_FOG_ON_TRANSPARENT + - _SPECULARHIGHLIGHTS_OFF + - _SURFACE_TYPE_TRANSPARENT + m_InvalidKeywords: [] m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 @@ -230,4 +230,4 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 9 + version: 10 diff --git a/Assets/Samples/Crest/5.4.2/Examples/Materials/Examples_Water.mat b/Assets/Samples/Crest/5.4.2/Examples/Materials/Examples_Water.mat index 34aa98338..7d66bfdcd 100644 --- a/Assets/Samples/Crest/5.4.2/Examples/Materials/Examples_Water.mat +++ b/Assets/Samples/Crest/5.4.2/Examples/Materials/Examples_Water.mat @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 9 + version: 10 --- !u!114 &-3939334617012234168 MonoBehaviour: m_ObjectHideFlags: 11 @@ -59,15 +59,15 @@ Material: - _BUILTIN_ALPHATEST_ON - _BUILTIN_AlphaClip - _BUILTIN_SURFACE_TYPE_TRANSPARENT + - _DOUBLESIDED_ON + - _ENABLE_FOG_ON_TRANSPARENT - _SPECULAR_SETUP - _SURFACE_TYPE_TRANSPARENT + - _TRANSPARENT_WRITES_MOTION_VEC m_InvalidKeywords: - CREST_CAUSTICS_ON - CREST_FOAM_ON - - _DOUBLESIDED_ON - _EMISSION - - _ENABLE_FOG_ON_TRANSPARENT - - _TRANSPARENT_WRITES_MOTION_VEC m_LightmapFlags: 1 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 @@ -79,6 +79,7 @@ Material: - TransparentBackface - RayTracingPrepass - SHADOWCASTER + - MOTIONVECTORS m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -97,7 +98,6 @@ Material: - _DstBlend: 10 - _QueueControl: 0 - _SrcBlend: 5 - - _ZWrite: 1 m_Colors: [] m_BuildTextureStacks: [] m_AllowLocking: 1 diff --git a/Assets/Samples/Crest/5.4.2/Examples/Scenes/Examples.unity b/Assets/Samples/Crest/5.4.2/Examples/Scenes/Examples.unity index 46906b8e1..8d30d77e2 100644 --- a/Assets/Samples/Crest/5.4.2/Examples/Scenes/Examples.unity +++ b/Assets/Samples/Crest/5.4.2/Examples/Scenes/Examples.unity @@ -13,7 +13,7 @@ OcclusionCullingSettings: --- !u!104 &2 RenderSettings: m_ObjectHideFlags: 0 - serializedVersion: 10 + serializedVersion: 9 m_Fog: 0 m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} m_FogMode: 3 @@ -42,8 +42,8 @@ RenderSettings: --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 - serializedVersion: 13 - m_BakeOnSceneLoad: 1 + serializedVersion: 12 + m_GIWorkflowMode: 1 m_GISettings: serializedVersion: 2 m_BounceScale: 1 @@ -66,6 +66,9 @@ LightmapSettings: m_LightmapParameters: {fileID: 0} m_LightmapsBakeMode: 1 m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 m_ReflectionCompression: 2 m_MixedBakeMode: 2 m_BakeBackend: 1 @@ -93,8 +96,9 @@ LightmapSettings: m_ExportTrainingData: 0 m_TrainingDataDestination: TrainingData m_LightProbeSampleCountMultiplier: 4 - m_LightingDataAsset: {fileID: 112000000, guid: be61fd374ee0fad46a337d78e0ed01ae, type: 2} - m_LightingSettings: {fileID: 4890085278179872738, guid: 6e72aca972f324f7886200f86939d735, type: 2} + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 4890085278179872738, guid: 6e72aca972f324f7886200f86939d735, + type: 2} --- !u!196 &4 NavMeshSettings: serializedVersion: 2 @@ -767,17 +771,28 @@ MonoBehaviour: m_MoveRepeatDelay: 0.5 m_MoveRepeatRate: 0.1 m_XRTrackingOrigin: {fileID: 0} - m_ActionsAsset: {fileID: -944628639613478452, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} - m_PointAction: {fileID: 1054132383583890850, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} - m_MoveAction: {fileID: 3710738434707379630, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} - m_SubmitAction: {fileID: 2064916234097673511, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} - m_CancelAction: {fileID: -1967631576421560919, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} - m_LeftClickAction: {fileID: 8056856818456041789, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} - m_MiddleClickAction: {fileID: 3279352641294131588, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} - m_RightClickAction: {fileID: 3837173908680883260, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} - m_ScrollWheelAction: {fileID: 4502412055082496612, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} - m_TrackedDevicePositionAction: {fileID: 4754684134866288074, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} - m_TrackedDeviceOrientationAction: {fileID: 1025543830046995696, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3} + m_ActionsAsset: {fileID: -944628639613478452, guid: ca9f5fa95ffab41fb9a615ab714db018, + type: 3} + m_PointAction: {fileID: 1054132383583890850, guid: ca9f5fa95ffab41fb9a615ab714db018, + type: 3} + m_MoveAction: {fileID: 3710738434707379630, guid: ca9f5fa95ffab41fb9a615ab714db018, + type: 3} + m_SubmitAction: {fileID: 2064916234097673511, guid: ca9f5fa95ffab41fb9a615ab714db018, + type: 3} + m_CancelAction: {fileID: -1967631576421560919, guid: ca9f5fa95ffab41fb9a615ab714db018, + type: 3} + m_LeftClickAction: {fileID: 8056856818456041789, guid: ca9f5fa95ffab41fb9a615ab714db018, + type: 3} + m_MiddleClickAction: {fileID: 3279352641294131588, guid: ca9f5fa95ffab41fb9a615ab714db018, + type: 3} + m_RightClickAction: {fileID: 3837173908680883260, guid: ca9f5fa95ffab41fb9a615ab714db018, + type: 3} + m_ScrollWheelAction: {fileID: 4502412055082496612, guid: ca9f5fa95ffab41fb9a615ab714db018, + type: 3} + m_TrackedDevicePositionAction: {fileID: 4754684134866288074, guid: ca9f5fa95ffab41fb9a615ab714db018, + type: 3} + m_TrackedDeviceOrientationAction: {fileID: 1025543830046995696, guid: ca9f5fa95ffab41fb9a615ab714db018, + type: 3} m_DeselectOnBackgroundClick: 1 m_PointerBehavior: 0 m_CursorLockBehavior: 0 @@ -867,9 +882,6 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -926,47 +938,58 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 1845454492} m_Modifications: - - target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, type: 3} + - target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, + type: 3} propertyPath: m_LocalPosition.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, type: 3} + - target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, + type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, type: 3} + - target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, + type: 3} propertyPath: m_LocalPosition.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, type: 3} + - target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, + type: 3} propertyPath: m_LocalRotation.w value: 0 objectReference: {fileID: 0} - - target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, type: 3} + - target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, + type: 3} propertyPath: m_LocalRotation.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, type: 3} + - target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, + type: 3} propertyPath: m_LocalRotation.y value: 0.9063079 objectReference: {fileID: 0} - - target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, type: 3} + - target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, + type: 3} propertyPath: m_LocalRotation.z value: -0.42261827 objectReference: {fileID: 0} - - target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, type: 3} + - target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, + type: 3} propertyPath: m_LocalEulerAnglesHint.x value: 105 objectReference: {fileID: 0} - - target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, type: 3} + - target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, + type: 3} propertyPath: m_LocalEulerAnglesHint.y value: 15 objectReference: {fileID: 0} - - target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, type: 3} + - target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, + type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 5304508333967466499, guid: 774ab582b39374a7e9d5dac8e31b9a5a, type: 3} + - target: {fileID: 5304508333967466499, guid: 774ab582b39374a7e9d5dac8e31b9a5a, + type: 3} propertyPath: m_Name value: Sun objectReference: {fileID: 0} @@ -977,7 +1000,8 @@ PrefabInstance: m_SourcePrefab: {fileID: 100100000, guid: 774ab582b39374a7e9d5dac8e31b9a5a, type: 3} --- !u!4 &1364867124 stripped Transform: - m_CorrespondingSourceObject: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, type: 3} + m_CorrespondingSourceObject: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, + type: 3} m_PrefabInstance: {fileID: 1364867123} m_PrefabAsset: {fileID: 0} --- !u!1 &1682107712 @@ -1069,47 +1093,58 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 1845454492} m_Modifications: - - target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, type: 3} + - target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, + type: 3} propertyPath: m_LocalPosition.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, type: 3} + - target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, + type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, type: 3} + - target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, + type: 3} propertyPath: m_LocalPosition.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, type: 3} + - target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, + type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, type: 3} + - target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, + type: 3} propertyPath: m_LocalRotation.x value: -0 objectReference: {fileID: 0} - - target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, type: 3} + - target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, + type: 3} propertyPath: m_LocalRotation.y value: -0 objectReference: {fileID: 0} - - target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, type: 3} + - target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, + type: 3} propertyPath: m_LocalRotation.z value: -0 objectReference: {fileID: 0} - - target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, type: 3} + - target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, + type: 3} propertyPath: m_LocalEulerAnglesHint.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, type: 3} + - target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, + type: 3} propertyPath: m_LocalEulerAnglesHint.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, type: 3} + - target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, + type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 2942909709672342223, guid: 63a4b7e65d06948649ac3e10077d8c2e, type: 3} + - target: {fileID: 2942909709672342223, guid: 63a4b7e65d06948649ac3e10077d8c2e, + type: 3} propertyPath: m_Name value: Atmosphere objectReference: {fileID: 0} @@ -1120,7 +1155,8 @@ PrefabInstance: m_SourcePrefab: {fileID: 100100000, guid: 63a4b7e65d06948649ac3e10077d8c2e, type: 3} --- !u!4 &1734491900 stripped Transform: - m_CorrespondingSourceObject: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, type: 3} + m_CorrespondingSourceObject: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, + type: 3} m_PrefabInstance: {fileID: 1734491899} m_PrefabAsset: {fileID: 0} --- !u!1 &1835631273 @@ -1268,47 +1304,58 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 1845454492} m_Modifications: - - target: {fileID: 963553959586484309, guid: bece9afbf3ddd49059dd73ba2cc986f6, type: 3} + - target: {fileID: 963553959586484309, guid: bece9afbf3ddd49059dd73ba2cc986f6, + type: 3} propertyPath: m_Name value: Lighting objectReference: {fileID: 0} - - target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, type: 3} + - target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, + type: 3} propertyPath: m_LocalPosition.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, type: 3} + - target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, + type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, type: 3} + - target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, + type: 3} propertyPath: m_LocalPosition.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, type: 3} + - target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, + type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, type: 3} + - target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, + type: 3} propertyPath: m_LocalRotation.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, type: 3} + - target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, + type: 3} propertyPath: m_LocalRotation.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, type: 3} + - target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, + type: 3} propertyPath: m_LocalRotation.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, type: 3} + - target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, + type: 3} propertyPath: m_LocalEulerAnglesHint.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, type: 3} + - target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, + type: 3} propertyPath: m_LocalEulerAnglesHint.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, type: 3} + - target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, + type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} @@ -1319,7 +1366,8 @@ PrefabInstance: m_SourcePrefab: {fileID: 100100000, guid: bece9afbf3ddd49059dd73ba2cc986f6, type: 3} --- !u!4 &1886939755 stripped Transform: - m_CorrespondingSourceObject: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, type: 3} + m_CorrespondingSourceObject: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, + type: 3} m_PrefabInstance: {fileID: 1886939754} m_PrefabAsset: {fileID: 0} --- !u!1 &2128464135 diff --git a/Assets/Samples/Crest/5.4.2/Examples/Scenes/Examples/LightingData.asset b/Assets/Samples/Crest/5.4.2/Examples/Scenes/Examples/LightingData.asset index 459ab30f0..f567fd78e 100644 Binary files a/Assets/Samples/Crest/5.4.2/Examples/Scenes/Examples/LightingData.asset and b/Assets/Samples/Crest/5.4.2/Examples/Scenes/Examples/LightingData.asset differ diff --git a/Assets/Samples/Crest/5.4.2/Main/Materials/Main_Water.mat b/Assets/Samples/Crest/5.4.2/Main/Materials/Main_Water.mat index a1dbbee6d..cf1f7b701 100644 --- a/Assets/Samples/Crest/5.4.2/Main/Materials/Main_Water.mat +++ b/Assets/Samples/Crest/5.4.2/Main/Materials/Main_Water.mat @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 9 + version: 10 --- !u!21 &2100000 Material: serializedVersion: 8 @@ -46,8 +46,8 @@ Material: - TransparentDepthPostpass - TransparentBackface - RayTracingPrepass - - SHADOWCASTER - MOTIONVECTORS + - SHADOWCASTER m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -71,7 +71,6 @@ Material: - _QueueControl: 0 - _SrcBlend: 5 - _ZTestGBuffer: 3 - - _ZWrite: 1 m_Colors: - _DoubleSidedConstants: {r: 1, g: 1, b: 1, a: 0} m_BuildTextureStacks: [] diff --git a/Assets/Samples/Crest/5.4.2/Main/Props/Island/Island.mat b/Assets/Samples/Crest/5.4.2/Main/Props/Island/Island.mat index cb82a0fcd..bf1952d13 100644 --- a/Assets/Samples/Crest/5.4.2/Main/Props/Island/Island.mat +++ b/Assets/Samples/Crest/5.4.2/Main/Props/Island/Island.mat @@ -25,9 +25,9 @@ Material: m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 m_ValidKeywords: - - _SPECULARHIGHLIGHTS_OFF - m_InvalidKeywords: - _DISABLE_SSR_TRANSPARENT + - _SPECULARHIGHLIGHTS_OFF + m_InvalidKeywords: [] m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 @@ -210,7 +210,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 9 + version: 10 --- !u!114 &3702943853698020124 MonoBehaviour: m_ObjectHideFlags: 11 diff --git a/Assets/Samples/Crest/5.4.2/Main/Scenes/Main.unity b/Assets/Samples/Crest/5.4.2/Main/Scenes/Main.unity index 213ef6759..81b80ef5d 100644 --- a/Assets/Samples/Crest/5.4.2/Main/Scenes/Main.unity +++ b/Assets/Samples/Crest/5.4.2/Main/Scenes/Main.unity @@ -13,7 +13,7 @@ OcclusionCullingSettings: --- !u!104 &2 RenderSettings: m_ObjectHideFlags: 0 - serializedVersion: 9 + serializedVersion: 10 m_Fog: 0 m_FogColor: {r: 0.867, g: 0.9962, b: 1, a: 1} m_FogMode: 2 @@ -42,8 +42,8 @@ RenderSettings: --- !u!157 &4 LightmapSettings: m_ObjectHideFlags: 0 - serializedVersion: 12 - m_GIWorkflowMode: 0 + serializedVersion: 13 + m_BakeOnSceneLoad: 1 m_GISettings: serializedVersion: 2 m_BounceScale: 1 @@ -66,9 +66,6 @@ LightmapSettings: m_LightmapParameters: {fileID: 0} m_LightmapsBakeMode: 1 m_TextureCompression: 0 - m_FinalGather: 0 - m_FinalGatherFiltering: 1 - m_FinalGatherRayCount: 1024 m_ReflectionCompression: 2 m_MixedBakeMode: 1 m_BakeBackend: 0 @@ -96,10 +93,8 @@ LightmapSettings: m_ExportTrainingData: 0 m_TrainingDataDestination: TrainingData m_LightProbeSampleCountMultiplier: 4 - m_LightingDataAsset: {fileID: 112000000, guid: 184df75fa69c64aaabbe087a1ac35fb9, - type: 2} - m_LightingSettings: {fileID: 4890085278179872738, guid: 6e72aca972f324f7886200f86939d735, - type: 2} + m_LightingDataAsset: {fileID: 112000000, guid: e9d2fa138f38e5940850bccf089c7dcb, type: 2} + m_LightingSettings: {fileID: 4890085278179872738, guid: 6e72aca972f324f7886200f86939d735, type: 2} --- !u!196 &5 NavMeshSettings: serializedVersion: 2 @@ -157,6 +152,7 @@ MonoBehaviour: m_StaticLightingSkyUniqueID: 4 m_StaticLightingCloudsUniqueID: 0 m_StaticLightingVolumetricClouds: 1 + bounces: 1 --- !u!4 &2142142571 Transform: m_ObjectHideFlags: 1 @@ -180,58 +176,47 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: - - target: {fileID: 4917276513506780838, guid: 63940726193fe4fa3a458e216e6cfff3, - type: 3} + - target: {fileID: 4917276513506780838, guid: 63940726193fe4fa3a458e216e6cfff3, type: 3} propertyPath: m_Name value: Scene objectReference: {fileID: 0} - - target: {fileID: 8969366642797183597, guid: 63940726193fe4fa3a458e216e6cfff3, - type: 3} + - target: {fileID: 8969366642797183597, guid: 63940726193fe4fa3a458e216e6cfff3, type: 3} propertyPath: m_LocalPosition.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 8969366642797183597, guid: 63940726193fe4fa3a458e216e6cfff3, - type: 3} + - target: {fileID: 8969366642797183597, guid: 63940726193fe4fa3a458e216e6cfff3, type: 3} propertyPath: m_LocalPosition.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 8969366642797183597, guid: 63940726193fe4fa3a458e216e6cfff3, - type: 3} + - target: {fileID: 8969366642797183597, guid: 63940726193fe4fa3a458e216e6cfff3, type: 3} propertyPath: m_LocalPosition.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 8969366642797183597, guid: 63940726193fe4fa3a458e216e6cfff3, - type: 3} + - target: {fileID: 8969366642797183597, guid: 63940726193fe4fa3a458e216e6cfff3, type: 3} propertyPath: m_LocalRotation.w value: 1 objectReference: {fileID: 0} - - target: {fileID: 8969366642797183597, guid: 63940726193fe4fa3a458e216e6cfff3, - type: 3} + - target: {fileID: 8969366642797183597, guid: 63940726193fe4fa3a458e216e6cfff3, type: 3} propertyPath: m_LocalRotation.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 8969366642797183597, guid: 63940726193fe4fa3a458e216e6cfff3, - type: 3} + - target: {fileID: 8969366642797183597, guid: 63940726193fe4fa3a458e216e6cfff3, type: 3} propertyPath: m_LocalRotation.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 8969366642797183597, guid: 63940726193fe4fa3a458e216e6cfff3, - type: 3} + - target: {fileID: 8969366642797183597, guid: 63940726193fe4fa3a458e216e6cfff3, type: 3} propertyPath: m_LocalRotation.z value: 0 objectReference: {fileID: 0} - - target: {fileID: 8969366642797183597, guid: 63940726193fe4fa3a458e216e6cfff3, - type: 3} + - target: {fileID: 8969366642797183597, guid: 63940726193fe4fa3a458e216e6cfff3, type: 3} propertyPath: m_LocalEulerAnglesHint.x value: 0 objectReference: {fileID: 0} - - target: {fileID: 8969366642797183597, guid: 63940726193fe4fa3a458e216e6cfff3, - type: 3} + - target: {fileID: 8969366642797183597, guid: 63940726193fe4fa3a458e216e6cfff3, type: 3} propertyPath: m_LocalEulerAnglesHint.y value: 0 objectReference: {fileID: 0} - - target: {fileID: 8969366642797183597, guid: 63940726193fe4fa3a458e216e6cfff3, - type: 3} + - target: {fileID: 8969366642797183597, guid: 63940726193fe4fa3a458e216e6cfff3, type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} diff --git a/Assets/Samples/Crest/5.4.2/Main/Scenes/Main/LightingData.asset b/Assets/Samples/Crest/5.4.2/Main/Scenes/Main/LightingData.asset index 35bd20737..f8e84d15d 100644 Binary files a/Assets/Samples/Crest/5.4.2/Main/Scenes/Main/LightingData.asset and b/Assets/Samples/Crest/5.4.2/Main/Scenes/Main/LightingData.asset differ diff --git a/Assets/Samples/Crest/5.4.2/Ripples/Materials/Ripples_Water.mat b/Assets/Samples/Crest/5.4.2/Ripples/Materials/Ripples_Water.mat index 3eba8ee99..fd0e9f818 100644 --- a/Assets/Samples/Crest/5.4.2/Ripples/Materials/Ripples_Water.mat +++ b/Assets/Samples/Crest/5.4.2/Ripples/Materials/Ripples_Water.mat @@ -28,7 +28,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 9 + version: 10 --- !u!21 &2100000 Material: serializedVersion: 8 @@ -45,12 +45,12 @@ Material: - _BUILTIN_ALPHATEST_ON - _BUILTIN_AlphaClip - _BUILTIN_SURFACE_TYPE_TRANSPARENT - - _SPECULAR_SETUP - - _SURFACE_TYPE_TRANSPARENT - m_InvalidKeywords: - _DOUBLESIDED_ON - _ENABLE_FOG_ON_TRANSPARENT + - _SPECULAR_SETUP + - _SURFACE_TYPE_TRANSPARENT - _TRANSPARENT_WRITES_MOTION_VEC + m_InvalidKeywords: [] m_LightmapFlags: 2 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 1 @@ -62,6 +62,7 @@ Material: - TransparentDepthPostpass - TransparentBackface - RayTracingPrepass + - MOTIONVECTORS - SHADOWCASTER m_LockedProperties: m_SavedProperties: @@ -85,7 +86,6 @@ Material: - _RefractionModel: 0 - _SrcBlend: 5 - _ZTestGBuffer: 3 - - _ZWrite: 1 m_Colors: - _DoubleSidedConstants: {r: 1, g: 1, b: 1, a: 0} m_BuildTextureStacks: [] diff --git a/Assets/Samples/Crest/5.4.2/Ripples/Scenes/Ripples 1.meta b/Assets/Samples/Crest/5.4.2/Ripples/Scenes/Ripples 1.meta new file mode 100644 index 000000000..70ea342dd --- /dev/null +++ b/Assets/Samples/Crest/5.4.2/Ripples/Scenes/Ripples 1.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b5f94828634c3904691810c1851f1352 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Samples/Crest/5.4.2/Ripples/Scenes/Ripples 1.unity b/Assets/Samples/Crest/5.4.2/Ripples/Scenes/Ripples 1.unity new file mode 100644 index 000000000..4d107032f --- /dev/null +++ b/Assets/Samples/Crest/5.4.2/Ripples/Scenes/Ripples 1.unity @@ -0,0 +1,983 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 2100000, guid: 9dbeaf053c6fb4c2f93b45a9995c408e, type: 2} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 256 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 1 + m_PVRDenoiserTypeDirect: 1 + m_PVRDenoiserTypeIndirect: 1 + m_PVRDenoiserTypeAO: 1 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 4890085278179872738, guid: 6e72aca972f324f7886200f86939d735, + type: 2} +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 3 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + buildHeightMesh: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &204793447 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 204793448} + m_Layer: 0 + m_Name: Camera + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &204793448 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 204793447} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1730370255} + - {fileID: 1305144323} + m_Father: {fileID: 1713053107} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &849648605 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 1737612588} + m_Modifications: + - target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, + type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2942909709672342223, guid: 63a4b7e65d06948649ac3e10077d8c2e, + type: 3} + propertyPath: m_Name + value: Atmosphere + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 63a4b7e65d06948649ac3e10077d8c2e, type: 3} +--- !u!4 &849648606 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 2272289698115174340, guid: 63a4b7e65d06948649ac3e10077d8c2e, + type: 3} + m_PrefabInstance: {fileID: 849648605} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1305144322 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 204793448} + m_Modifications: + - target: {fileID: 6079220456006713144, guid: 5e01cffb9e8324147affb8e08fd5ed13, + type: 3} + propertyPath: m_Name + value: PostProcessing + objectReference: {fileID: 0} + - target: {fileID: 9013060131419009103, guid: 5e01cffb9e8324147affb8e08fd5ed13, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9013060131419009103, guid: 5e01cffb9e8324147affb8e08fd5ed13, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9013060131419009103, guid: 5e01cffb9e8324147affb8e08fd5ed13, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9013060131419009103, guid: 5e01cffb9e8324147affb8e08fd5ed13, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 9013060131419009103, guid: 5e01cffb9e8324147affb8e08fd5ed13, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 9013060131419009103, guid: 5e01cffb9e8324147affb8e08fd5ed13, + type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 9013060131419009103, guid: 5e01cffb9e8324147affb8e08fd5ed13, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 9013060131419009103, guid: 5e01cffb9e8324147affb8e08fd5ed13, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9013060131419009103, guid: 5e01cffb9e8324147affb8e08fd5ed13, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 9013060131419009103, guid: 5e01cffb9e8324147affb8e08fd5ed13, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 5e01cffb9e8324147affb8e08fd5ed13, type: 3} +--- !u!4 &1305144323 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 9013060131419009103, guid: 5e01cffb9e8324147affb8e08fd5ed13, + type: 3} + m_PrefabInstance: {fileID: 1305144322} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1713053106 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1713053107} + m_Layer: 0 + m_Name: Scene + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1713053107 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1713053106} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 204793448} + - {fileID: 1737612588} + - {fileID: 1887373153} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &1730370254 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 204793448} + m_Modifications: + - target: {fileID: 2452750316707852747, guid: c26fe2b4fef6c484089497b549dd6b04, + type: 3} + propertyPath: m_Name + value: Camera + objectReference: {fileID: 0} + - target: {fileID: 2452750316707852748, guid: c26fe2b4fef6c484089497b549dd6b04, + type: 3} + propertyPath: m_LocalPosition.x + value: -12.755484 + objectReference: {fileID: 0} + - target: {fileID: 2452750316707852748, guid: c26fe2b4fef6c484089497b549dd6b04, + type: 3} + propertyPath: m_LocalPosition.y + value: 3.9116275 + objectReference: {fileID: 0} + - target: {fileID: 2452750316707852748, guid: c26fe2b4fef6c484089497b549dd6b04, + type: 3} + propertyPath: m_LocalPosition.z + value: -0.47643661 + objectReference: {fileID: 0} + - target: {fileID: 2452750316707852748, guid: c26fe2b4fef6c484089497b549dd6b04, + type: 3} + propertyPath: m_LocalRotation.w + value: 0.6911961 + objectReference: {fileID: 0} + - target: {fileID: 2452750316707852748, guid: c26fe2b4fef6c484089497b549dd6b04, + type: 3} + propertyPath: m_LocalRotation.x + value: 0.1276672 + objectReference: {fileID: 0} + - target: {fileID: 2452750316707852748, guid: c26fe2b4fef6c484089497b549dd6b04, + type: 3} + propertyPath: m_LocalRotation.y + value: 0.6994695 + objectReference: {fileID: 0} + - target: {fileID: 2452750316707852748, guid: c26fe2b4fef6c484089497b549dd6b04, + type: 3} + propertyPath: m_LocalRotation.z + value: -0.12919533 + objectReference: {fileID: 0} + - target: {fileID: 2452750316707852748, guid: c26fe2b4fef6c484089497b549dd6b04, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2452750316707852748, guid: c26fe2b4fef6c484089497b549dd6b04, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2452750316707852748, guid: c26fe2b4fef6c484089497b549dd6b04, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: c26fe2b4fef6c484089497b549dd6b04, type: 3} +--- !u!4 &1730370255 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 2452750316707852748, guid: c26fe2b4fef6c484089497b549dd6b04, + type: 3} + m_PrefabInstance: {fileID: 1730370254} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1737612587 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1737612588} + m_Layer: 0 + m_Name: Lighting + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1737612588 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1737612587} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1745844464} + - {fileID: 1773514259} + - {fileID: 849648606} + m_Father: {fileID: 1713053107} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &1745844463 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 1737612588} + m_Modifications: + - target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, + type: 3} + propertyPath: m_LocalRotation.w + value: -0.6898038 + objectReference: {fileID: 0} + - target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, + type: 3} + propertyPath: m_LocalRotation.x + value: -0.28572607 + objectReference: {fileID: 0} + - target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, + type: 3} + propertyPath: m_LocalRotation.y + value: 0.6145928 + objectReference: {fileID: 0} + - target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, + type: 3} + propertyPath: m_LocalRotation.z + value: -0.25457266 + objectReference: {fileID: 0} + - target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 276.6 + objectReference: {fileID: 0} + - target: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5304508333967466499, guid: 774ab582b39374a7e9d5dac8e31b9a5a, + type: 3} + propertyPath: m_Name + value: Sun + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 774ab582b39374a7e9d5dac8e31b9a5a, type: 3} +--- !u!4 &1745844464 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 1399345652565587599, guid: 774ab582b39374a7e9d5dac8e31b9a5a, + type: 3} + m_PrefabInstance: {fileID: 1745844463} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1773514258 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 1737612588} + m_Modifications: + - target: {fileID: 963553959586484309, guid: bece9afbf3ddd49059dd73ba2cc986f6, + type: 3} + propertyPath: m_Name + value: Lighting + objectReference: {fileID: 0} + - target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: bece9afbf3ddd49059dd73ba2cc986f6, type: 3} +--- !u!4 &1773514259 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6033288213199496986, guid: bece9afbf3ddd49059dd73ba2cc986f6, + type: 3} + m_PrefabInstance: {fileID: 1773514258} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1887373152 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1887373153} + - component: {fileID: 1887373154} + m_Layer: 0 + m_Name: Water + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1887373153 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1887373152} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1713053107} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1887373154 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1887373152} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e64c239f69eea46778ded6dcc3427a34, type: 3} + m_Name: + m_EditorClassIdentifier: + _Version: 0 + _Camera: {fileID: 0} + _TimeProvider: {fileID: 0} + _OverrideRenderHDR: 0 + _RenderHDR: 1 + _WindSpeed: 10 + _OverrideGravity: 0 + _GravityOverride: -9.8 + _GravityMultiplier: 1 + _PrimaryLight: {fileID: 0} + _Layer: 4 + _Material: {fileID: 2100000, guid: aa74fe26a90564079a48cdae97645f7b, type: 2} + _VolumeMaterial: {fileID: 0} + _ChunkTemplate: {fileID: 1516456258233481520, guid: 17840562212c147d6bdb5144d35bc442, + type: 3} + _CastShadows: 0 + _WriteMotionVectors: 1 + _WriteToDepthTexture: 1 + _WaterBodyCulling: 1 + _TimeSliceBoundsUpdateFrameCount: 1 + _SurfaceSelfIntersectionFixMode: 4 + _AllowRenderQueueSorting: 0 + _ScaleRange: {x: 4, y: 256} + _DropDetailHeightBasedOnWaves: 0.2 + _Slices: 7 + _Resolution: 384 + _GeometryDownSampleFactor: 2 + _ExtentsSizeMultiplier: 100 + _Viewpoint: {fileID: 0} + _SampleTerrainHeightForScale: 1 + _ForceScaleChangeSmoothing: 0 + _TeleportThreshold: 10 + _AnimatedWavesLod: + rid: 9154139594981113859 + _DepthLod: + rid: 9154139594981113860 + _LevelLod: + rid: 9154139594981113861 + _FoamLod: + rid: 9154139594981113862 + _DynamicWavesLod: + rid: 9154139594981113863 + _FlowLod: + rid: 9154139594981113864 + _ShadowLod: + rid: 9154139594981113865 + _AbsorptionLod: + rid: 323759186686771352 + _ScatteringLod: + rid: 323759186686771353 + _ClipLod: + rid: 9154139594981113866 + _AlbedoLod: + rid: 9154139594981113867 + _Reflections: + rid: 9154139594981113868 + _Underwater: + rid: 9154139594981113869 + _Portals: + rid: 9154139594981113870 + _ShowWaterProxyPlane: 0 + _EditModeFrameRate: 30 + _FollowSceneCamera: 1 + _HeightQueries: 1 + _Debug: + _AttachDebugGUI: 0 + _ShowHiddenObjects: 0 + _DisableFollowViewpoint: 0 + _DestroyResourcesInOnDisable: 0 + _DisableChunks: 0 + _UniformTiles: 0 + _DisableSkirt: 0 + _DrawLodOutline: 0 + _ShowDebugInformation: 0 + _LogScaleChange: 0 + _PauseOnScaleChange: 0 + _IgnoreWavesForScaleChange: 0 + _ForceBatchMode: 0 + _ForceNoGraphics: 0 + _Resources: {fileID: 11400000, guid: 0817af17dea584e5382e6216db162d4a, type: 2} + references: + version: 2 + RefIds: + - rid: 323759186686771352 + type: {class: AbsorptionLod, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest} + data: + _Enabled: 0 + _OverrideResolution: 1 + _Resolution: 256 + _TextureFormatMode: 100 + _TextureFormat: 7 + _ShorelineColorSource: 0 + _ShorelineColor: {r: 1.026, g: 2.085, b: 2.5500002, a: 0.306} + _ShorelineColorMaximumDistance: 10 + _ShorelineColorFalloff: 2 + - rid: 323759186686771353 + type: {class: ScatteringLod, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest} + data: + _Enabled: 0 + _OverrideResolution: 1 + _Resolution: 256 + _TextureFormatMode: 200 + _TextureFormat: 23 + _ShorelineColorSource: 0 + _ShorelineColor: {r: 0, g: 0.588, b: 1.2, a: 6} + _ShorelineColorMaximumDistance: 10 + _ShorelineColorFalloff: 2 + - rid: 9154139594981113859 + type: {class: AnimatedWavesLod, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest} + data: + _Enabled: 1 + _OverrideResolution: 0 + _Resolution: 256 + _TextureFormatMode: 100 + _TextureFormat: 48 + _WaveResolutionMultiplier: 1 + _AttenuationInShallows: 0.95 + _ShallowsMaximumDepth: 1000 + _CollisionSource: 2 + _CollisionLayers: -1 + _MaximumQueryCount: 4096 + _BakedWaveData: {fileID: 0} + - rid: 9154139594981113860 + type: {class: DepthLod, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest} + data: + _Enabled: 1 + _OverrideResolution: 1 + _Resolution: 256 + _TextureFormatMode: 100 + _TextureFormat: 46 + _EnableSignedDistanceFields: 1 + - rid: 9154139594981113861 + type: {class: LevelLod, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest} + data: + _Enabled: 0 + _OverrideResolution: 0 + _Resolution: 256 + _TextureFormatMode: 300 + _TextureFormat: 45 + - rid: 9154139594981113862 + type: {class: FoamLod, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest} + data: + _Enabled: 1 + _OverrideResolution: 1 + _Resolution: 256 + _TextureFormatMode: 100 + _TextureFormat: 45 + _SimulationFrequency: 30 + _Prewarm: 1 + _Settings: {fileID: 0} + - rid: 9154139594981113863 + type: {class: DynamicWavesLod, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest} + data: + _Enabled: 1 + _OverrideResolution: 0 + _Resolution: 512 + _TextureFormatMode: 300 + _TextureFormat: 46 + _SimulationFrequency: 60 + _AttenuationInShallows: 1 + _Settings: {fileID: 0} + - rid: 9154139594981113864 + type: {class: FlowLod, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest} + data: + _Enabled: 0 + _OverrideResolution: 1 + _Resolution: 128 + _TextureFormatMode: 100 + _TextureFormat: 46 + - rid: 9154139594981113865 + type: {class: ShadowLod, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest} + data: + _Enabled: 1 + _OverrideResolution: 1 + _Resolution: 256 + _TextureFormatMode: 100 + _TextureFormat: 6 + _DynamicSoftShadows: 1 + _SoftJitterExtinctionFactor: 0.75 + _JitterDiameterSoft: 15 + _CurrentFrameWeightSoft: 0.03 + _JitterDiameterHard: 0.6 + _CurrentFrameWeightHard: 0.15 + _AllowNullLight: 0 + _AllowNoShadows: 0 + - rid: 9154139594981113866 + type: {class: ClipLod, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest} + data: + _Enabled: 0 + _OverrideResolution: 1 + _Resolution: 256 + _TextureFormatMode: 100 + _TextureFormat: 5 + _DefaultClippingState: 0 + - rid: 9154139594981113867 + type: {class: AlbedoLod, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest} + data: + _Enabled: 0 + _OverrideResolution: 1 + _Resolution: 768 + _TextureFormatMode: 100 + _TextureFormat: 8 + - rid: 9154139594981113868 + type: {class: WaterReflections, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest} + data: + _Version: 0 + _Enabled: 1 + _Mode: 1 + _Layers: + serializedVersion: 2 + m_Bits: 1 + _Resolution: 512 + _RenderOnlySingleCamera: 0 + _Sky: 1 + _DisablePixelLights: 1 + _DisableShadows: 1 + _HDR: 1 + _Stencil: 0 + _AllowMSAA: 0 + _QualitySettingsOverride: + _OverrideLodBias: 0 + _LodBias: 0.5 + _OverrideMaximumLodLevel: 0 + _MaximumLodLevel: 1 + _OverrideTerrainPixelError: 0 + _TerrainPixelError: 10 + _ClipPlaneOffset: 0 + _FarClipPlane: 1000 + _DisableOcclusionCulling: 1 + _RefreshPerFrames: 1 + _FrameRefreshOffset: 0 + _UseObliqueMatrix: 1 + _NonObliqueNearSurface: 0 + _NonObliqueNearSurfaceThreshold: 0.05 + _Debug: + _ShowHiddenObjects: 0 + _DisableRecursiveRendering: 0 + - rid: 9154139594981113869 + type: {class: UnderwaterRenderer, ns: WaveHarmonic.Crest, asm: WaveHarmonic.Crest} + data: + _Version: 0 + _Enabled: 1 + _Layer: 4 + _Material: {fileID: 2100000, guid: f2b096e4d95e646c49d48ece0afa0547, type: 2} + _EnvironmentalLightingEnable: 0 + _EnvironmentalLightingWeight: 1 + _EnvironmentalLightingVolumeProfile: {fileID: 0} + _EnableShaderAPI: 0 + _TransparentObjectLayers: + serializedVersion: 2 + m_Bits: 0 + _AllCameras: 0 + _CopyWaterMaterialParametersEachFrame: 1 + _FarPlaneMultiplier: 0.68 + _CullLimit: 0.001 + _Debug: + _VisualizeMask: 0 + _DisableMask: 0 + _VisualizeStencil: 0 + _DisableHeightAboveWaterOptimization: 0 + _DisableArtifactCorrection: 0 + _OnlyReflectionCameras: 0 + - rid: 9154139594981113870 + type: {class: PortalRenderer, ns: WaveHarmonic.Crest.Portals, asm: WaveHarmonic.Crest} + data: + _Enabled: 0 + _Mode: 2 + _Geometry: {fileID: 0} + _Invert: 0 +--- !u!1001 &2904561123747805697 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 873869071320452477, guid: 178ae2ae1dc4f4224a165b75c017acfa, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 873869071320452477, guid: 178ae2ae1dc4f4224a165b75c017acfa, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 873869071320452477, guid: 178ae2ae1dc4f4224a165b75c017acfa, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 873869071320452477, guid: 178ae2ae1dc4f4224a165b75c017acfa, + type: 3} + propertyPath: m_LocalRotation.w + value: 0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 873869071320452477, guid: 178ae2ae1dc4f4224a165b75c017acfa, + type: 3} + propertyPath: m_LocalRotation.x + value: 0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 873869071320452477, guid: 178ae2ae1dc4f4224a165b75c017acfa, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 873869071320452477, guid: 178ae2ae1dc4f4224a165b75c017acfa, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 873869071320452477, guid: 178ae2ae1dc4f4224a165b75c017acfa, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 90 + objectReference: {fileID: 0} + - target: {fileID: 873869071320452477, guid: 178ae2ae1dc4f4224a165b75c017acfa, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 873869071320452477, guid: 178ae2ae1dc4f4224a165b75c017acfa, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6920241850790494902, guid: 178ae2ae1dc4f4224a165b75c017acfa, + type: 3} + propertyPath: m_Name + value: Ripple Generator + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 178ae2ae1dc4f4224a165b75c017acfa, type: 3} +--- !u!1660057539 &9223372036854775807 +SceneRoots: + m_ObjectHideFlags: 0 + m_Roots: + - {fileID: 1713053107} + - {fileID: 2904561123747805697} diff --git a/Assets/Obi/Samples/RopeAndRod/Ratchet.unity.meta b/Assets/Samples/Crest/5.4.2/Ripples/Scenes/Ripples 1.unity.meta similarity index 74% rename from Assets/Obi/Samples/RopeAndRod/Ratchet.unity.meta rename to Assets/Samples/Crest/5.4.2/Ripples/Scenes/Ripples 1.unity.meta index 1ff1a6dd7..3d8200b50 100644 --- a/Assets/Obi/Samples/RopeAndRod/Ratchet.unity.meta +++ b/Assets/Samples/Crest/5.4.2/Ripples/Scenes/Ripples 1.unity.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 0dfa9dcb619204188a53a53500c16db3 +guid: 5f4c8d07b8975284d81afa06ea89d0f1 DefaultImporter: externalObjects: {} userData: diff --git a/Assets/Samples/Crest/5.4.2/Ripples/Scenes/Ripples 1/LightingData.asset b/Assets/Samples/Crest/5.4.2/Ripples/Scenes/Ripples 1/LightingData.asset new file mode 100644 index 000000000..1917a792d Binary files /dev/null and b/Assets/Samples/Crest/5.4.2/Ripples/Scenes/Ripples 1/LightingData.asset differ diff --git a/Assets/Samples/Crest/5.4.2/Ripples/Scenes/Ripples 1/LightingData.asset.meta b/Assets/Samples/Crest/5.4.2/Ripples/Scenes/Ripples 1/LightingData.asset.meta new file mode 100644 index 000000000..5be7bb5ca --- /dev/null +++ b/Assets/Samples/Crest/5.4.2/Ripples/Scenes/Ripples 1/LightingData.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7df03ebe060fddc458aac08c619ecdf6 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 112000000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Samples/Crest/5.4.2/Ripples/Scenes/Ripples 1/ReflectionProbe-0.exr b/Assets/Samples/Crest/5.4.2/Ripples/Scenes/Ripples 1/ReflectionProbe-0.exr new file mode 100644 index 000000000..8072dee74 Binary files /dev/null and b/Assets/Samples/Crest/5.4.2/Ripples/Scenes/Ripples 1/ReflectionProbe-0.exr differ diff --git a/Assets/Samples/Crest/5.4.2/Ripples/Scenes/Ripples 1/ReflectionProbe-0.exr.meta b/Assets/Samples/Crest/5.4.2/Ripples/Scenes/Ripples 1/ReflectionProbe-0.exr.meta new file mode 100644 index 000000000..e061db683 --- /dev/null +++ b/Assets/Samples/Crest/5.4.2/Ripples/Scenes/Ripples 1/ReflectionProbe-0.exr.meta @@ -0,0 +1,117 @@ +fileFormatVersion: 2 +guid: c19a5fc7bb80ede45b150f4ecd189aba +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 1 + seamlessCubemap: 1 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 2 + aniso: 0 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 2 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 4 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 100 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 4 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + customData: + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + spriteCustomMetadata: + entries: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Samples/Crest/5.4.2/Ripples/Scenes/Ripples/LightingData.asset b/Assets/Samples/Crest/5.4.2/Ripples/Scenes/Ripples/LightingData.asset index 3b467cc52..1d4b19700 100644 Binary files a/Assets/Samples/Crest/5.4.2/Ripples/Scenes/Ripples/LightingData.asset and b/Assets/Samples/Crest/5.4.2/Ripples/Scenes/Ripples/LightingData.asset differ diff --git a/Assets/Samples/Crest/5.4.2/Wakes/Materials/Wakes_Water.mat b/Assets/Samples/Crest/5.4.2/Wakes/Materials/Wakes_Water.mat index a67655fb1..f9c2f883b 100644 --- a/Assets/Samples/Crest/5.4.2/Wakes/Materials/Wakes_Water.mat +++ b/Assets/Samples/Crest/5.4.2/Wakes/Materials/Wakes_Water.mat @@ -28,7 +28,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 9 + version: 10 --- !u!21 &2100000 Material: serializedVersion: 8 @@ -45,12 +45,12 @@ Material: - _BUILTIN_ALPHATEST_ON - _BUILTIN_AlphaClip - _BUILTIN_SURFACE_TYPE_TRANSPARENT - - _SPECULAR_SETUP - - _SURFACE_TYPE_TRANSPARENT - m_InvalidKeywords: - _DOUBLESIDED_ON - _ENABLE_FOG_ON_TRANSPARENT + - _SPECULAR_SETUP + - _SURFACE_TYPE_TRANSPARENT - _TRANSPARENT_WRITES_MOTION_VEC + m_InvalidKeywords: [] m_LightmapFlags: 2 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 1 @@ -62,6 +62,7 @@ Material: - TransparentDepthPostpass - TransparentBackface - RayTracingPrepass + - MOTIONVECTORS - SHADOWCASTER m_LockedProperties: m_SavedProperties: @@ -81,7 +82,6 @@ Material: - _QueueControl: 0 - _SrcBlend: 5 - _ZTestGBuffer: 3 - - _ZWrite: 1 m_Colors: - _Crest_Scattering: {r: 0, g: 0.04848485, b: 0.1, a: 1} - _DoubleSidedConstants: {r: 1, g: 1, b: 1, a: 0} diff --git a/Assets/Samples/Crest/5.4.2/Wakes/Materials/White.mat b/Assets/Samples/Crest/5.4.2/Wakes/Materials/White.mat index 546ea9bd1..35f70daca 100644 --- a/Assets/Samples/Crest/5.4.2/Wakes/Materials/White.mat +++ b/Assets/Samples/Crest/5.4.2/Wakes/Materials/White.mat @@ -12,9 +12,9 @@ Material: m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 m_ValidKeywords: - - _SPECULARHIGHLIGHTS_OFF - m_InvalidKeywords: - _DISABLE_SSR_TRANSPARENT + - _SPECULARHIGHLIGHTS_OFF + m_InvalidKeywords: [] m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 @@ -224,4 +224,4 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} m_Name: m_EditorClassIdentifier: - version: 9 + version: 10 diff --git a/Assets/Scripts/Demo/SceneSettings.cs b/Assets/Scripts/Demo/SceneSettings.cs index d6fdb1b53..6e43dcf28 100644 --- a/Assets/Scripts/Demo/SceneSettings.cs +++ b/Assets/Scripts/Demo/SceneSettings.cs @@ -18,7 +18,7 @@ public class SceneSettings : MonoBehaviour public KWS_Ocean Water; - // public ObiUpdater obiFixedUpdater; + public ObiUpdater obiFixedUpdater; public LineRenderer LineRenderer; diff --git a/Assets/Scripts/Fishing/FixedLine.cs b/Assets/Scripts/Fishing/FixedLine.cs index 8b9d37de1..271318a92 100644 --- a/Assets/Scripts/Fishing/FixedLine.cs +++ b/Assets/Scripts/Fishing/FixedLine.cs @@ -15,7 +15,7 @@ namespace NBF private void LateUpdate() { - // FixLine(); + FixLine(); } private void FixedUpdate() diff --git a/Assets/Scripts/Fishing/Tackle/FLineHandler.cs b/Assets/Scripts/Fishing/Tackle/FLineHandler.cs index 295d7b1d9..c479b69b6 100644 --- a/Assets/Scripts/Fishing/Tackle/FLineHandler.cs +++ b/Assets/Scripts/Fishing/Tackle/FLineHandler.cs @@ -1,7 +1,5 @@ -using System; -using NBF; +using NBF; using Obi; -using Unity.VisualScripting; using UnityEngine; public class FLineHandler : MonoBehaviour @@ -16,6 +14,8 @@ public class FLineHandler : MonoBehaviour public LineType lineType = LineType.TwoSegment; + // public ObiParticleAttachment startParticleAttachment; + public ObiRope obiRopeSegment_1; public ObiRope obiRopeSegment_2; @@ -53,6 +53,9 @@ public class FLineHandler : MonoBehaviour private Transform waterPlane; + public LineRenderer LineRenderer1; + public LineRenderer LineRenderer2; + // public float ropeToHookDistance; void Start() @@ -152,6 +155,7 @@ public class FLineHandler : MonoBehaviour // LineConnector_1.minDistance = LineConnector_1.maxDistance; } + public void SetSegmentTwoLenght(float lenght) { diff --git a/Assets/Scripts/Fishing/Tackle/FRod.cs b/Assets/Scripts/Fishing/Tackle/FRod.cs index 628951f39..9843f283c 100644 --- a/Assets/Scripts/Fishing/Tackle/FRod.cs +++ b/Assets/Scripts/Fishing/Tackle/FRod.cs @@ -71,6 +71,7 @@ namespace NBF transform.localPosition = Vector3.zero; transform.localRotation = Quaternion.identity; transform.localScale = Vector3.one; + SceneSettings.Instance.GearNode.position = Player.transform.position; yield return 1; var obj = new GameObject($"rod_{itemInfo.Id}_{itemInfo.ConfigId}"); obj.transform.SetParent(SceneSettings.Instance.GearNode); @@ -172,7 +173,7 @@ namespace NBF Weight.Init(Player, this); } - yield return 1; //等待1帧 + yield return 2; //等待1帧 transform.SetParent(Player.ModelAsset.RodRoot); transform.localPosition = Vector3.zero; transform.rotation = Player.ModelAsset.RodRoot.rotation; @@ -220,8 +221,9 @@ namespace NBF lineHandler.LineConnector_0.target = Asset.lineConnector; //.GetComponent(); // lineHandler.toRodConnector.target = rodAsset.lineConnector; lineHandler.Rod = this; - // var obiSolver = lineHandler.GetComponent(); - // SceneSettings.Instance.obiFixedUpdater.solvers.Add(obiSolver); + // lineHandler.startParticleAttachment.target = Asset.lineConnector; + var obiSolver = lineHandler.GetComponent(); + SceneSettings.Instance.obiFixedUpdater.solvers.Add(obiSolver); } } diff --git a/Assets/Scripts/Generate/NetworkProtocol/OuterOpcode.cs b/Assets/Scripts/Generate/NetworkProtocol/OuterOpcode.cs index 3c7764333..b4451ba3c 100644 --- a/Assets/Scripts/Generate/NetworkProtocol/OuterOpcode.cs +++ b/Assets/Scripts/Generate/NetworkProtocol/OuterOpcode.cs @@ -35,8 +35,8 @@ namespace Fantasy public const uint C2G_LoginRequest = 268445460; public const uint G2C_LoginResponse = 402663188; public const uint G2C_RepeatLogin = 134227729; - public const uint C2Game_GetRoleInfoRequest = 2281711386; - public const uint Game2C_GetRoleInfoResponse = 2415929114; + public const uint C2Game_GetRoleInfoRequest = 2281711387; + public const uint Game2C_GetRoleInfoResponse = 2415929115; public const uint Map2C_RoleEnterRoomNotify = 2147493653; public const uint Map2C_RoleExitRoomNotify = 2147493654; public const uint C2Map_TakeItemRequest = 2281711388; diff --git a/Packages/com.waveharmonic.crest/Documentation~/API.pdf b/Packages/com.waveharmonic.crest/Documentation~/API.pdf new file mode 100644 index 000000000..b7e06e2be Binary files /dev/null and b/Packages/com.waveharmonic.crest/Documentation~/API.pdf differ diff --git a/Assets/Obi/Samples/RopeAndRod/RenderModes.unity.meta b/Packages/com.waveharmonic.crest/Documentation~/API.pdf.meta similarity index 74% rename from Assets/Obi/Samples/RopeAndRod/RenderModes.unity.meta rename to Packages/com.waveharmonic.crest/Documentation~/API.pdf.meta index 7b96d264e..ea428fa50 100644 --- a/Assets/Obi/Samples/RopeAndRod/RenderModes.unity.meta +++ b/Packages/com.waveharmonic.crest/Documentation~/API.pdf.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: b5657544ccae14cb6bab0a77ecdf31f1 +guid: 1c86a082904904ed8b5bac5029f5b811 DefaultImporter: externalObjects: {} userData: diff --git a/Packages/com.waveharmonic.crest/Documentation~/Manual.pdf b/Packages/com.waveharmonic.crest/Documentation~/Manual.pdf new file mode 100644 index 000000000..3e2bfb4fd Binary files /dev/null and b/Packages/com.waveharmonic.crest/Documentation~/Manual.pdf differ diff --git a/Assets/Obi/Samples/RopeAndRod/TangledRopes.unity.meta b/Packages/com.waveharmonic.crest/Documentation~/Manual.pdf.meta similarity index 74% rename from Assets/Obi/Samples/RopeAndRod/TangledRopes.unity.meta rename to Packages/com.waveharmonic.crest/Documentation~/Manual.pdf.meta index 2fbd30a4c..aa2164022 100644 --- a/Assets/Obi/Samples/RopeAndRod/TangledRopes.unity.meta +++ b/Packages/com.waveharmonic.crest/Documentation~/Manual.pdf.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: d1c0a7d11dfd3425e80480fae4b6546c +guid: 735ed5b3b44b54da1af9edc799f25799 DefaultImporter: externalObjects: {} userData: diff --git a/Packages/com.waveharmonic.crest/Editor.meta b/Packages/com.waveharmonic.crest/Editor.meta new file mode 100644 index 000000000..b6a229fae --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a7c5b0e70850c4b5b9cc74cde678c8f5 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Icons.meta b/Packages/com.waveharmonic.crest/Editor/Icons.meta new file mode 100644 index 000000000..9e68bce83 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Icons.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 07713a05ee7134f699db61252add8587 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Icons/Logomark.png b/Packages/com.waveharmonic.crest/Editor/Icons/Logomark.png new file mode 100644 index 000000000..639e75493 Binary files /dev/null and b/Packages/com.waveharmonic.crest/Editor/Icons/Logomark.png differ diff --git a/Packages/com.waveharmonic.crest/Editor/Icons/Logomark.png.meta b/Packages/com.waveharmonic.crest/Editor/Icons/Logomark.png.meta new file mode 100644 index 000000000..7df6548cd --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Icons/Logomark.png.meta @@ -0,0 +1,114 @@ +fileFormatVersion: 2 +guid: 72a325a76c6624c768822a08fe625d55 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts.meta b/Packages/com.waveharmonic.crest/Editor/Scripts.meta new file mode 100644 index 000000000..488f979d7 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9e5b7e45774a04476ac12d691fec9152 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Assembly.cs b/Packages/com.waveharmonic.crest/Editor/Scripts/Assembly.cs new file mode 100644 index 000000000..822b45760 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Assembly.cs @@ -0,0 +1,19 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Samples.Editor")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.CPUQueries.Editor")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Paint.Editor")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.ShallowWater.Editor")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Splines.Editor")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Watercraft.Editor")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Whirlpool.Editor")] + +// Define empty namespaces for when assemblies are not present. +namespace UnityEditor.Rendering.HighDefinition { } +namespace UnityEngine.Rendering.HighDefinition { } +namespace UnityEngine.Rendering.Universal { } +namespace WaveHarmonic.Crest.Paint { } +namespace WaveHarmonic.Crest.Splines { } diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Assembly.cs.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Assembly.cs.meta new file mode 100644 index 000000000..c5cda04ff --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Assembly.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8bd644d8cd9e34f6aaa99d6b83420b22 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/BuildProcessor.cs b/Packages/com.waveharmonic.crest/Editor/Scripts/BuildProcessor.cs new file mode 100644 index 000000000..4882df301 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/BuildProcessor.cs @@ -0,0 +1,368 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using WaveHarmonic.Crest.Editor.Settings; +using System.Collections.Generic; +using System.Linq; +using UnityEditor; +using UnityEditor.Build; +using UnityEditor.Build.Reporting; +using UnityEditor.Rendering; +using UnityEngine; +using UnityEngine.Rendering; + +namespace WaveHarmonic.Crest.Editor.Build +{ + sealed class LegacyShaderGraphProcessor : IPreprocessShaders, IPostprocessBuildWithReport + { + static readonly ShaderTagId s_ShaderGraphShaderShaderTagId = new("ShaderGraphShader"); + + public int callbackOrder => -1; + + int _VariantCount; + int _VariantCountStripped; + + bool LogVariantStripping => +#if CREST_DEBUG + true; +#else + false; +#endif + + public void OnProcessShader(Shader shader, ShaderSnippetData snippet, IList data) + { + // Not one of our shaders. + if (!shader.name.StartsWithNoAlloc("Hidden/Crest/") && !shader.name.StartsWithNoAlloc("Crest/")) + { + return; + } + + // Not a Shader Graph. + if (shader.GetSubShaderTag(snippet, s_ShaderGraphShaderShaderTagId) != "true") + { + return; + } + + // Sub-shader is not targeting the built-in render pipeline. + if (shader.TryGetRenderPipelineTag(snippet, out _)) + { + return; + } + + _VariantCount += data.Count; + + // Strip BIRP sub-shader if not using BIRP, as Unity only strips HDRP/URP sub-shaders. + if (!RenderPipelineHelper.IsLegacy) + { + _VariantCountStripped += data.Count; + data.Clear(); + return; + } + + for (var i = data.Count - 1; i >= 0; --i) + { + var keywords = data[i].shaderKeywordSet.GetShaderKeywords(); + var isTransparent = keywords.Any(x => x.name == "_BUILTIN_SURFACE_TYPE_TRANSPARENT"); + + foreach (var keyword in keywords) + { + var name = keyword.name; + var strip = + // Main light shadows. Never used. + name.StartsWithNoAlloc("_MAIN_LIGHT_") || + // Additional lights. Never used. Although, vertex lighting keyword is set. + name.StartsWithNoAlloc("_ADDITIONAL_LIGHT") || + // Never used. Used in deferred pass, but not defined in deferred pass. + keyword.name is "LIGHTMAP_SHADOW_MIXING" or "SHADOWS_SHADOWMASK" || + // Never used. + keyword.name is "_SCREEN_SPACE_OCCLUSION" or "_SHADOWS_SOFT" or "_CASTING_PUNCTUAL_LIGHT_SHADOW" || + // BIRP does not support this feature (URP does). + keyword.name is "_GBUFFER_NORMALS_OCT" || + // TODO: check LightMode instead of pass name. + // Shadow keywords are not enabled for transparent objects, except if casting. + isTransparent && snippet.passName == "ShadowCaster" && keyword.name.Contains("SHADOW"); + + if (strip) + { + _VariantCountStripped++; + data.RemoveAt(i); + break; + } + } + } + } + + public void OnPostprocessBuild(BuildReport report) + { + if (LogVariantStripping) + { + Debug.Log($"Crest: {_VariantCountStripped} / {_VariantCount} stripped from Crest BIRP. Total variants: {_VariantCount - _VariantCountStripped}"); + } + } + } + + sealed class BuildProcessor : IPreprocessComputeShaders, IPreprocessShaders, IPostprocessBuildWithReport + { + public int callbackOrder => 0; + + int _VariantCount; + int _VariantCountStripped; + + ProjectSettings _Settings; + WaterResources _Resources; + + void Logger(string message) + { + Debug.Log(message); + } + + bool StripShader(Object shader, IList data) + { + _Settings = ProjectSettings.Instance; + _Resources = WaterResources.Instance; + + if (!AssetDatabase.GetAssetPath(shader).StartsWithNoAlloc("Packages/com.waveharmonic.crest")) + { + return false; + } + + if (shader.name.StartsWithNoAlloc("Hidden/Crest/Samples/")) + { + return false; + } + + if (_Settings.DebugEnableStrippingLogging) + { + Logger($"Shader: '{shader.name}' @ {AssetDatabase.GetAssetPath(shader)}"); + } + + _VariantCount += data.Count; + + if (ShouldStripShader(shader)) + { + if (_Settings.LogStrippedVariants) + { + Logger($"Stripping Shader: {shader.name}"); + } + + _VariantCountStripped += data.Count; + data.Clear(); + return false; + } + + return true; + } + + bool ShouldStripVariant(Object shader, ShaderCompilerData data, string[] keywords) + { + return false; + } + + bool ShouldStripVariant(ProjectSettings.State state, ShaderCompilerData data, string[] keywords, LocalKeyword keyword, Object shader0, Object shader1) + { + if (shader0 != shader1) + { + return false; + } + + return state switch + { + ProjectSettings.State.Disabled => data.shaderKeywordSet.IsEnabled(keyword), + // Strip if keyword is not enabled and appears in one other variant. + ProjectSettings.State.Enabled => !data.shaderKeywordSet.IsEnabled(keyword) && ArrayUtility.Contains(keywords, keyword.name), + _ => false, + }; + } + + bool ShouldStripVariant(ProjectSettings.State state, ShaderCompilerData data, string[] keywords, ShaderKeyword keyword) + { + return state switch + { + ProjectSettings.State.Disabled => data.shaderKeywordSet.IsEnabled(keyword), + // Strip if keyword is not enabled and appears in one other variant. + ProjectSettings.State.Enabled => !data.shaderKeywordSet.IsEnabled(keyword) && ArrayUtility.Contains(keywords, keyword.name), + _ => false, + }; + } + + bool ShouldStripVariant(Object shader, ShaderKeyword[] keywords) + { + // Strip debug variants. + if (!EditorUserBuildSettings.development) + { + foreach (var keyword in keywords) + { + if (keyword.name.StartsWithNoAlloc("_DEBUG")) + { + if (_Settings.LogStrippedVariants) + { + Logger($"Stripping Keyword: {keyword.name}"); + } + + return true; + } + } + } + + return false; + } + + bool ShouldStripShader(Object shader) + { + if (!EditorUserBuildSettings.development) + { + if (shader.name.Contains("Debug")) + { + return true; + } + } + + return false; + } + + void StripKeywords(Object shader, IList data) + { + // Get all keywords for this kernel/stage. + string[] keywords; + { + var set = new HashSet(); + for (var i = 0; i < data.Count; i++) + { + // Each ShaderCompilerData is a variant which is a combination of keywords. Since each list will be + // different, simply getting a list of all keywords is not possible. This also appears to be the only + // way to get a list of keywords without trying to extract them from shader property names. Lastly, + // shader_feature will be returned only if they are enabled. + set.UnionWith(data[i].shaderKeywordSet.GetShaderKeywords()); + } + + keywords = set.Select(x => x.name).ToArray(); + } + + for (var i = data.Count - 1; i >= 0; --i) + { + if (_Settings.LogStrippedVariants) + { + Logger($"Keywords: {string.Join(", ", data[i].shaderKeywordSet.GetShaderKeywords())}"); + } + + if (ShouldStripVariant(shader, data[i].shaderKeywordSet.GetShaderKeywords())) + { + _VariantCountStripped++; + data.RemoveAt(i); + continue; + } + + if (ShouldStripVariant(shader, data[i], keywords)) + { + _VariantCountStripped++; + data.RemoveAt(i); + continue; + } + + if (_Settings.LogKeptVariants) + { + Logger($"Keywords: {string.Join(", ", data[i].shaderKeywordSet.GetShaderKeywords())}"); + } + } + } + + bool ShouldStripSubShader(Shader shader, ShaderSnippetData snippet) + { + if (!shader.name.StartsWithNoAlloc("Crest/") && !shader.name.StartsWithNoAlloc("Hidden/Crest/")) + { + return false; + } + + // There will be at least three sub-shaders if one per render pipeline. + if (shader.subshaderCount <= 2) + { + return false; + } + + // Strip BIRP sub-shader if not using BIRP as Unity only strips HDRP/URP sub-shaders. + if (!RenderPipelineHelper.IsLegacy && !shader.TryGetRenderPipelineTag(snippet, out _)) + { + return true; + } + + return false; + } + + public void OnProcessShader(Shader shader, ShaderSnippetData snippet, IList data) + { + // Fixes point light cookie variant trigger shader compiler error: + // > Shader error in 'Crest/Water': call to 'texCUBE' is ambiguous at + // > Buidin/Library/PackageCache/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/Editor/ShaderGraph/Includes/PBRForwardAddPass.hlsl(58) (on gamecore_scarlett) + if (ProjectSettings.Instance.StripBrokenVariants && RenderPipelineHelper.IsLegacy && shader.name == "Crest/Water") + { + var pointCookie = new LocalKeyword(shader, "POINT_COOKIE"); + + for (var i = data.Count - 1; i >= 0; --i) + { + var d = data[i]; + + if (d.buildTarget != BuildTarget.GameCoreXboxSeries && d.shaderCompilerPlatform != ShaderCompilerPlatform.GameCoreXboxSeries) + { + continue; + } + + if (d.shaderKeywordSet.IsEnabled(pointCookie)) + { + _VariantCountStripped++; + data.RemoveAt(i); + Debug.Log($"Crest: Removing POINT_COOKIE {shader.name} {d.buildTarget} {d.shaderCompilerPlatform}"); + continue; + } + } + } + + if (!StripShader(shader, data)) + { + return; + } + + if (ShouldStripSubShader(shader, snippet)) + { + _VariantCountStripped += data.Count; + data.Clear(); + return; + } + + if (_Settings.DebugEnableStrippingLogging) + { + Logger($"Pass {snippet.passName} Type {snippet.passType} Stage {snippet.shaderType}"); + } + + // TODO: Add stripping specific to pixel shaders here. + + StripKeywords(shader, data); + } + + public void OnProcessComputeShader(ComputeShader shader, string kernel, IList data) + { + if (!StripShader(shader, data)) + { + return; + } + + if (_Settings.DebugEnableStrippingLogging) + { + Logger($"Kernel {kernel}"); + } + + // TODO: Add stripping specific to compute shaders here. + StripKeywords(shader, data); + } + + public void OnPostprocessBuild(BuildReport report) + { + _Settings = ProjectSettings.Instance; + _Resources = WaterResources.Instance; + + if (_Settings.DebugEnableStrippingLogging) + { + Debug.Log($"Crest: {_VariantCountStripped} / {_VariantCount} stripped from Crest. Total variants: {_VariantCount - _VariantCountStripped}"); + } + } + } +} diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/BuildProcessor.cs.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/BuildProcessor.cs.meta new file mode 100644 index 000000000..3dd253361 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/BuildProcessor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: cc038d319256b40b6912636ac2129a2c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Editors.cs b/Packages/com.waveharmonic.crest/Editor/Scripts/Editors.cs new file mode 100644 index 000000000..833fab3ac --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Editors.cs @@ -0,0 +1,496 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEditor; +using UnityEngine; +using WaveHarmonic.Crest.Internal; + +namespace WaveHarmonic.Crest.Editor +{ + [CustomEditor(typeof(WaterRenderer))] + sealed class WaterRendererEditor : Inspector + { + WaterRenderer _Target; + + void OnEnable() + { + _Target = (WaterRenderer)target; + } + + protected override void RenderInspectorGUI() + { + var target = this.target as WaterRenderer; + + var currentAssignedTP = serializedObject.FindProperty(nameof(WaterRenderer._TimeProvider)).objectReferenceValue; + + base.RenderInspectorGUI(); + + // Detect if user changed TP, if so update stack + var newlyAssignedTP = serializedObject.FindProperty(nameof(WaterRenderer._TimeProvider)).objectReferenceValue; + if (currentAssignedTP != newlyAssignedTP) + { + if (currentAssignedTP != null) + { + target.TimeProviders.Pop(currentAssignedTP as TimeProvider); + } + if (newlyAssignedTP != null) + { + target.TimeProviders.Push(newlyAssignedTP as TimeProvider); + } + } + + // Display version in information box. + { + // Fix leftover nesting from drawers. + EditorGUI.indentLevel = 0; + + var padding = GUI.skin.GetStyle("HelpBox").padding; + GUI.skin.GetStyle("HelpBox").padding = new(10, 10, 10, 10); + +#if CREST_DEBUG + if (target._Debug._ShowDebugInformation) + { + EditorGUILayout.Space(); + + var baseScale = target.CalcLodScale(0); + var baseTexelSize = 2f * 2f * baseScale / target.LodResolution; + + var message = ""; + for (var i = 0; i < target.LodLevels; i++) + { + message += $"LOD: {i}\n"; + message += $"Scale: {target.CalcLodScale(i)}\n"; + message += $"Texel: {2f * 2f * target.CalcLodScale(i) / target.LodResolution}\n"; + message += $"Minimum Slice: {Mathf.Floor(Mathf.Log(Mathf.Max(i / baseTexelSize, 1f), 2f))}"; + if (i < target.LodLevels - 1) message += "\n\n"; + } + + if (target.Material.HasVector(WaterRenderer.ShaderIDs.s_Absorption)) + { + message += $"\n\nDepth Fog Density: {target.Material.GetVector(WaterRenderer.ShaderIDs.s_Absorption)}"; + } + + EditorGUILayout.HelpBox(message, MessageType.None); + } +#endif + + GUI.skin.GetStyle("HelpBox").padding = padding; + } + } + + protected override void RenderBottomButtons() + { + base.RenderBottomButtons(); + + var target = this.target as WaterRenderer; + + EditorGUILayout.Space(); + +#if CREST_DEBUG + if (GUILayout.Button("Change Scale")) + { + var scale = target.ScaleRange; + scale.x = scale.x == 4f ? 256f : 4f; + target.ScaleRange = scale; + EditorApplication.isPaused = false; + } +#endif + + if (GUILayout.Button("Validate Setup")) + { + ValidatedHelper.ExecuteValidators(target, ValidatedHelper.DebugLog); + + foreach (var component in FindObjectsByType(FindObjectsSortMode.None)) + { + if (component is WaterRenderer) continue; + ValidatedHelper.ExecuteValidators(component, ValidatedHelper.DebugLog); + } + + Debug.Log("Crest: Validation complete!", target); + } + } + } + + [CustomEditor(typeof(WaveSpectrum))] + sealed class WaveSpectrumEditor : Inspector, IEmbeddableEditor + { + static readonly string[] s_ModelDescriptions = new[] + { + "Select an option to author waves using a spectrum model.", + "Fully developed sea with infinite fetch.", + }; + + static readonly GUIContent s_TimeScaleLabel = new("Time Scale"); + + System.Type _HostComponentType = null; + public void SetTypeOfHostComponent(System.Type hostComponentType) + { + _HostComponentType = hostComponentType; + } + + void OnEnable() + { + Undo.undoRedoEvent -= OnUndoRedo; + Undo.undoRedoEvent += OnUndoRedo; + } + + protected override void OnDisable() + { + base.OnDisable(); + Undo.undoRedoEvent -= OnUndoRedo; + } + + void OnUndoRedo(in UndoRedoInfo info) + { + var target = (WaveSpectrum)this.target; + + if (info.undoName == "Change Spectrum") + { + target.InitializeHandControls(); + } + } + + protected override void RenderInspectorGUI() + { + // Display a notice if its being edited as a standalone asset (not embedded in a component) because + // it displays the FFT-interface. + if (_HostComponentType == null) + { + EditorGUILayout.HelpBox("This editor is displaying the FFT spectrum settings. " + + "To edit settings specific to the ShapeGerstner component, assign this asset to a ShapeGerstner component " + + "and edit it there by expanding the Spectrum field.", MessageType.Info); + EditorGUILayout.Space(); + } + + base.RenderInspectorGUI(); + + EditorGUI.BeginChangeCheck(); + + var beingEditedOnGerstnerComponent = _HostComponentType == typeof(ShapeGerstner); + + var showAdvancedControls = false; + if (beingEditedOnGerstnerComponent) + { + EditorGUILayout.PropertyField(serializedObject.FindProperty(nameof(WaveSpectrum._GravityScale))); + + EditorGUILayout.PropertyField(serializedObject.FindProperty(nameof(WaveSpectrum._WaveDirectionVariance))); + + EditorGUILayout.PropertyField(serializedObject.FindProperty(nameof(WaveSpectrum._ShowAdvancedControls))); + showAdvancedControls = serializedObject.FindProperty(nameof(WaveSpectrum._ShowAdvancedControls)).boolValue; + } + else + { + EditorGUILayout.PropertyField(serializedObject.FindProperty(nameof(WaveSpectrum._GravityScale)), s_TimeScaleLabel); + } + + var spSpectrumModel = serializedObject.FindProperty(nameof(WaveSpectrum._Model)); + var spectraIndex = serializedObject.FindProperty(nameof(WaveSpectrum._Model)).enumValueIndex; + var spectrumModel = (WaveSpectrum.SpectrumModel)Mathf.Clamp(spectraIndex, 0, 1); + + EditorGUILayout.Space(); + + var spDisabled = serializedObject.FindProperty(nameof(WaveSpectrum._PowerDisabled)); + EditorGUILayout.BeginHorizontal(); + var allEnabled = true; + for (var i = 0; i < spDisabled.arraySize; i++) + { + if (spDisabled.GetArrayElementAtIndex(i).boolValue) allEnabled = false; + } + var toggle = allEnabled; + if (toggle != EditorGUILayout.Toggle(toggle, GUILayout.Width(13f))) + { + for (var i = 0; i < spDisabled.arraySize; i++) + { + spDisabled.GetArrayElementAtIndex(i).boolValue = toggle; + } + } + EditorGUILayout.LabelField("Spectrum", EditorStyles.boldLabel); + EditorGUILayout.EndHorizontal(); + + var spec = target as WaveSpectrum; + + var spPower = serializedObject.FindProperty(nameof(WaveSpectrum._PowerLogarithmicScales)); + var spChopScales = serializedObject.FindProperty(nameof(WaveSpectrum._ChopScales)); + var spGravScales = serializedObject.FindProperty(nameof(WaveSpectrum._GravityScales)); + + // Disable sliders if authoring with model. + var canEditSpectrum = spectrumModel == WaveSpectrum.SpectrumModel.None; + + for (var i = 0; i < spPower.arraySize; i++) + { + EditorGUILayout.BeginHorizontal(); + + var spDisabled_i = spDisabled.GetArrayElementAtIndex(i); + spDisabled_i.boolValue = !EditorGUILayout.Toggle(!spDisabled_i.boolValue, GUILayout.Width(15f)); + + var smallWL = WaveSpectrum.SmallWavelength(i); + var spPower_i = spPower.GetArrayElementAtIndex(i); + + var isPowerDisabled = spDisabled_i.boolValue; + var powerValue = isPowerDisabled ? WaveSpectrum.s_MinimumPowerLog : spPower_i.floatValue; + + if (showAdvancedControls) + { + EditorGUILayout.LabelField(string.Format("{0}", smallWL), EditorStyles.boldLabel); + EditorGUILayout.EndHorizontal(); + + // Disable slider if authoring with model. + using (new EditorGUI.DisabledGroupScope(!canEditSpectrum || spDisabled_i.boolValue)) + { + powerValue = EditorGUILayout.Slider(" Power", powerValue, WaveSpectrum.s_MinimumPowerLog, WaveSpectrum.s_MaximumPowerLog); + } + } + else + { + EditorGUILayout.LabelField(string.Format("{0}", smallWL), GUILayout.Width(50f)); + + // Disable slider if authoring with model. + using (new EditorGUI.DisabledGroupScope(!canEditSpectrum || spDisabled_i.boolValue)) + { + powerValue = EditorGUILayout.Slider(powerValue, WaveSpectrum.s_MinimumPowerLog, WaveSpectrum.s_MaximumPowerLog); + } + + EditorGUILayout.EndHorizontal(); + // This will create a tooltip for slider. + GUI.Label(GUILayoutUtility.GetLastRect(), new GUIContent("", powerValue.ToString())); + } + + // If the power is disabled, we are using the MIN_POWER_LOG value so we don't want to store it. + if (!isPowerDisabled) + { + spPower_i.floatValue = powerValue; + } + + if (showAdvancedControls) + { + EditorGUILayout.Slider(spChopScales.GetArrayElementAtIndex(i), 0f, 4f, " Chop Scale"); + EditorGUILayout.Slider(spGravScales.GetArrayElementAtIndex(i), 0f, 4f, " Grav Scale"); + } + } + + + EditorGUILayout.Space(); + EditorGUILayout.LabelField("Empirical Spectra", EditorStyles.boldLabel); + + EditorGUILayout.BeginHorizontal(); + spectrumModel = (WaveSpectrum.SpectrumModel)EditorGUILayout.EnumPopup(spectrumModel); + spSpectrumModel.enumValueIndex = (int)spectrumModel; + EditorGUILayout.EndHorizontal(); + + EditorGUILayout.Space(); + EditorGUILayout.HelpBox(s_ModelDescriptions[(int)spectrumModel], MessageType.Info); + EditorGUILayout.Space(); + + if (spectrumModel == WaveSpectrum.SpectrumModel.None) + { + Undo.RecordObject(spec, "Change Spectrum"); + } + else + { + // It doesn't seem to matter where this is called. + Undo.RecordObject(spec, $"Apply {ObjectNames.NicifyVariableName(spectrumModel.ToString())} Spectrum"); + + + // Descriptions from this very useful paper: + // https://hal.archives-ouvertes.fr/file/index/docid/307938/filename/frechot_realistic_simulation_of_ocean_surface_using_wave_spectra.pdf + + switch (spectrumModel) + { + case WaveSpectrum.SpectrumModel.PiersonMoskowitz: + spec.ApplyPiersonMoskowitzSpectrum(); + break; + } + } + + if (EditorGUI.EndChangeCheck()) + { + // NOTE: Undo/Redo will not update for some reason. + serializedObject.ApplyModifiedProperties(); + spec.InitializeHandControls(); + } + + if (GUI.changed) + { + // We need to call this otherwise any property which has HideInInspector won't save. + EditorUtility.SetDirty(spec); + } + } + } + + [CustomEditor(typeof(LodSettings), true)] + sealed class SimSettingsBaseEditor : Inspector + { + protected override void RenderInspectorGUI() + { + EditorGUILayout.Space(); + if (GUILayout.Button("Open Online Help Page")) + { + var targetType = target.GetType(); + var helpAttribute = (HelpURL)System.Attribute.GetCustomAttribute(targetType, typeof(HelpURL)); + Debug.AssertFormat(helpAttribute != null, "Crest: Could not get HelpURL attribute from {0}.", targetType); + Application.OpenURL(helpAttribute.URL); + } + EditorGUILayout.Space(); + + base.RenderInspectorGUI(); + } + } + + [CustomEditor(typeof(WaterChunkRenderer)), CanEditMultipleObjects] + sealed class WaterChunkRendererEditor : Inspector + { + Renderer _Renderer; + protected override void RenderInspectorGUI() + { + base.RenderInspectorGUI(); + + var target = this.target as WaterChunkRenderer; + + if (_Renderer == null) + { + _Renderer = target.GetComponent(); + } + + GUI.enabled = false; + var boundsXZ = new Bounds(target._UnexpandedBoundsXZ.center.XNZ(), target._UnexpandedBoundsXZ.size.XNZ()); + EditorGUILayout.BoundsField("Bounds XZ", boundsXZ); + EditorGUILayout.BoundsField("Expanded Bounds", _Renderer.bounds); + GUI.enabled = true; + } + } + + [CustomEditor(typeof(DepthProbe))] + sealed class DepthProbeEditor : Inspector + { + [InitializeOnLoadMethod] + static void OnLoad() + { + // Allows DepthProbe to trigger a bake without referencing assembly. + DepthProbe.OnBakeRequest -= Bake; + DepthProbe.OnBakeRequest += Bake; + } + + protected override void RenderBottomButtons() + { + base.RenderBottomButtons(); + + EditorGUILayout.Space(); + + var target = this.target as DepthProbe; + + var isBaked = target.Type == DepthProbeMode.Baked; + var onDemand = target.Type == DepthProbeMode.RealTime && target.RefreshMode == DepthProbeRefreshMode.ViaScripting; + var canBake = !onDemand && !Application.isPlaying; + var canPopulate = Application.isPlaying ? onDemand : target.Type != DepthProbeMode.Baked; + + if (target.SavedTexture != null && isBaked ? GUILayout.Button("Switch to Real-Time") : GUILayout.Button("Switch to Baked")) + { + Undo.RecordObject(target, isBaked ? "Switch to Real-Time" : "Switch to Baked"); + target.Type = isBaked ? DepthProbeMode.RealTime : DepthProbeMode.Baked; + EditorUtility.SetDirty(target); + } + + if (canPopulate && GUILayout.Button("Populate")) + { + target.Populate(); + } + + if (canBake && GUILayout.Button("Bake")) + { + Bake(target); + } + } + + internal static void Bake(DepthProbe target) + { + target.ForcePopulate(); + + var rt = target.RealtimeTexture; + RenderTexture.active = rt; + var tex = new Texture2D(rt.width, rt.height, TextureFormat.RGBAHalf, false); + tex.ReadPixels(new(0, 0, rt.width, rt.height), 0, 0); + RenderTexture.active = null; + + byte[] bytes; + bytes = tex.EncodeToEXR(Texture2D.EXRFlags.OutputAsFloat); + + var path = target.SavedTexture + ? AssetDatabase.GetAssetPath(target.SavedTexture) + : $"Assets/DepthProbe_{System.Guid.NewGuid()}.exr"; + System.IO.File.WriteAllBytes(path, bytes); + AssetDatabase.ImportAsset(path); + + if (target.SavedTexture == null) + { + var serializedObject = new SerializedObject(target); + serializedObject.FindProperty(nameof(DepthProbe._SavedTexture)).objectReferenceValue = AssetDatabase.LoadAssetAtPath(path); + serializedObject.FindProperty(nameof(DepthProbe._Type)).enumValueIndex = (int)DepthProbeMode.Baked; + serializedObject.ApplyModifiedProperties(); + } + + var ti = AssetImporter.GetAtPath(path) as TextureImporter; + ti.textureShape = TextureImporterShape.Texture2D; + ti.sRGBTexture = false; + ti.alphaSource = TextureImporterAlphaSource.None; + ti.mipmapEnabled = false; + ti.alphaIsTransparency = false; + // Compression will clamp negative values. + ti.textureCompression = TextureImporterCompression.Uncompressed; + ti.filterMode = FilterMode.Bilinear; + ti.wrapMode = TextureWrapMode.Clamp; + // Values are slightly different with NPOT Scale applied. + ti.npotScale = TextureImporterNPOTScale.None; + + // Set single component. + if (!target._GenerateSignedDistanceField) + { + ti.textureType = TextureImporterType.SingleChannel; + + var settings = new TextureImporterSettings(); + ti.ReadTextureSettings(settings); + settings.singleChannelComponent = TextureImporterSingleChannelComponent.Red; + ti.SetTextureSettings(settings); + } + + // Set format. + { + var settings = ti.GetDefaultPlatformTextureSettings(); + settings.format = target._GenerateSignedDistanceField ? TextureImporterFormat.RGFloat : TextureImporterFormat.RFloat; + ti.SetPlatformTextureSettings(settings); + } + + ti.SaveAndReimport(); + + Debug.Log("Crest: Probe saved to " + path, AssetDatabase.LoadAssetAtPath(path)); + } + } + + [CustomEditor(typeof(QueryEvents))] + sealed class QueryEventsEditor : Inspector + { + protected override void RenderInspectorGUI() + { + EditorGUILayout.Space(); + EditorGUILayout.HelpBox + ( + "For the Above/Below Water Surface Events, whenever this game object goes below or above the water " + + "surface, the appropriate event is fired once per state change. It can be used to trigger audio to " + + "play underwater and much more. For the Distance From Water Surface event, it will pass the " + + "distance every frame (passing normalised distance to audio volume as an example).", + MessageType.Info + ); + EditorGUILayout.Space(); + + base.RenderInspectorGUI(); + } + } + + [CustomEditor(typeof(NetworkedTimeProvider))] + sealed class NetworkedTimeProviderEditor : Inspector + { + public override void OnInspectorGUI() + { + EditorGUILayout.HelpBox($"Assign this component to the {nameof(WaterRenderer)} component and set the TimeOffsetToServer property of this component (at runtime from C#) to the delta from this client's time to the shared server time.", MessageType.Info); + } + } +} diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Editors.cs.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Editors.cs.meta new file mode 100644 index 000000000..ffafee598 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Editors.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d45e90774186f434b9c6d8dd507d22b2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Gizmos.cs b/Packages/com.waveharmonic.crest/Editor/Scripts/Gizmos.cs new file mode 100644 index 000000000..c27c61edc --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Gizmos.cs @@ -0,0 +1,410 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using System.Linq; +using UnityEditor; +using UnityEngine; +using WaveHarmonic.Crest.Internal; + +namespace WaveHarmonic.Crest.Editor +{ + static class Visualizers + { +#if CREST_DEBUG + static Material s_VisualizeMaterial; + static Material VisualizeMaterial => s_VisualizeMaterial != null ? s_VisualizeMaterial + : s_VisualizeMaterial = new(Shader.Find("Local/Debug/Visualize Signed Texture")); +#endif + + [DrawGizmo(GizmoType.Selected | GizmoType.NonSelected)] + static void DrawGizmos(WaterRenderer target, GizmoType type) + { +#if CREST_DEBUG + if (target._Debug._DrawLodOutline) + { + // Each LOD could have its own position due to snapping. + foreach (var simulation in target.Simulations.Cast()) + { + if (!simulation._Enabled) continue; + + for (var index = 0; index < simulation.Slices; index++) + { + Gizmos.color = simulation.GizmoColor; + var rect = simulation.Cascades[index].TexelRect; + + Gizmos.DrawWireCube + ( + rect.center.XNZ(target.SeaLevel), + rect.size.XNZ() + ); + } + } + } +#endif + + // Don't need proxy if in play mode + if (Application.isPlaying) + { + return; + } + + // Create proxy if not present already, and proxy enabled + if (target._ProxyPlane == null && target._ShowWaterProxyPlane) + { + target._ProxyPlane = GameObject.CreatePrimitive(PrimitiveType.Plane); + Helpers.Destroy(target._ProxyPlane.GetComponent()); + target._ProxyPlane.hideFlags = HideFlags.HideAndDontSave; + target._ProxyPlane.transform.parent = target.transform; + target._ProxyPlane.transform.SetLocalPositionAndRotation(Vector3.zero, Quaternion.identity); + target._ProxyPlane.transform.localScale = 4000f * Vector3.one; + + target._ProxyPlane.GetComponent().sharedMaterial = new(Shader.Find(WaterRenderer.k_ProxyShader)); + } + + // Change active state of proxy if necessary + if (target._ProxyPlane != null && target._ProxyPlane.activeSelf != target._ShowWaterProxyPlane) + { + target._ProxyPlane.SetActive(target._ShowWaterProxyPlane); + + // Scene view doesnt automatically refresh which makes the option confusing, so force it + EditorWindow view = EditorWindow.GetWindow(); + view.Repaint(); + } + + if (target.Root != null) + { + target.Root.gameObject.SetActive(!target._ShowWaterProxyPlane); + } + } + + [DrawGizmo(GizmoType.Selected)] + static void DrawGizmos(LodInput target, GizmoType type) + { + if (!target.Enabled) return; + + if (target._DrawBounds) + { + var rect = target.Rect; + if (rect != Rect.zero) + { + var height = WaterRenderer.Instance ? WaterRenderer.Instance.SeaLevel : target.transform.position.y; + Gizmos.color = Color.magenta; + Gizmos.DrawWireCube + ( + new(rect.center.x, height, rect.center.y), + new(rect.size.x, 0, rect.size.y) + ); + } + } + } + + [DrawGizmo(GizmoType.Selected)] + static void DrawRendererGizmos(LodInput target, GizmoType type) + { + if (!target.Enabled) return; + if (target.Data is not RendererLodInputData data) return; + + var renderer = data._Renderer; + + if (renderer != null && renderer.TryGetComponent(out var mf)) + { + var transform = renderer.transform; + Gizmos.color = target.GizmoColor; + Gizmos.DrawWireMesh(mf.sharedMesh, transform.position, transform.rotation, transform.lossyScale); + } + } + + [DrawGizmo(GizmoType.Selected)] + static void DrawGeometryGizmos(LodInput target, GizmoType type) + { + if (!target.Enabled) return; + if (target.Data is not GeometryLodInputData data) return; + + var geometry = data._Geometry; + + if (geometry != null) + { + var transform = target.transform; + Gizmos.color = target.GizmoColor; + Gizmos.DrawWireMesh(geometry, transform.position, transform.rotation, transform.lossyScale); + } + } + + [DrawGizmo(GizmoType.Selected)] + static void DrawWatertightHullGizmos(WatertightHull target, GizmoType type) + { + if (!target.Enabled) return; + + var transform = target.transform; + + Gizmos.color = ClipLod.s_GizmoColor; + Gizmos.DrawMesh(target._Mesh, submeshIndex: 0, transform.position, transform.rotation, transform.lossyScale); + Gizmos.DrawWireMesh(target._Mesh, transform.position, transform.rotation, transform.lossyScale); + + if (target._Debug._DrawBounds) + { + var rect = target.Rect; + if (rect != Rect.zero) + { + var height = WaterRenderer.Instance ? WaterRenderer.Instance.SeaLevel : target.transform.position.y; + Gizmos.color = Color.magenta; + Gizmos.DrawWireCube + ( + new(rect.center.x, height, rect.center.y), + new(rect.size.x, 0, rect.size.y) + ); + } + } + } + + [DrawGizmo(GizmoType.Selected)] + static void DrawTextureGizmos(LodInput target, GizmoType type) + { + if (!target.Enabled) return; + if (target.Data is not TextureLodInputData) return; + + Gizmos.color = target.GizmoColor; + Gizmos.matrix = Matrix4x4.TRS + ( + target.transform.position, + Quaternion.Euler(Vector3.up * target.transform.rotation.eulerAngles.y), + target.transform.lossyScale.XNZ() + ); + Gizmos.DrawWireCube(Vector3.zero, Vector3.one); + } + + [DrawGizmo(GizmoType.Selected)] + static void DrawGizmos(ClipLodInput target, GizmoType type) + { + if (!target.Enabled) return; + Gizmos.color = target.GizmoColor; + + if (target.Mode == LodInputMode.Primitive) + { + Gizmos.matrix = target.transform.localToWorldMatrix; + + switch (target._Primitive) + { + case LodInputPrimitive.Sphere: + // Use Unity's UV sphere mesh for gizmos as Gizmos.DrawSphere is too low resolution. + // Render mesh and wire sphere at default size (0.5m radius) which is scaled by gizmo matrix. + Gizmos.DrawMesh(Helpers.SphereMesh, submeshIndex: 0, Vector3.zero, Quaternion.identity, Vector3.one); + Gizmos.DrawWireSphere(Vector3.zero, 0.5f); + break; + case LodInputPrimitive.Cube: + // Render mesh and wire box at default size which is scaled by gizmo matrix. + Gizmos.DrawCube(Vector3.zero, Vector3.one); + Gizmos.DrawWireCube(Vector3.zero, Vector3.one); + break; + case LodInputPrimitive.Quad: + // Face quad upwards. + Gizmos.matrix *= Matrix4x4.Rotate(Quaternion.AngleAxis(90, Vector3.right)); + Gizmos.DrawMesh(Helpers.QuadMesh, submeshIndex: 0, Vector3.zero, Quaternion.identity, Vector3.one); + Gizmos.DrawWireMesh(Helpers.QuadMesh, submeshIndex: 0, Vector3.zero, Quaternion.identity, Vector3.one); + break; + default: + Debug.LogError("Crest: Not a valid primitive type!"); + break; + } + } + } + + [DrawGizmo(GizmoType.Selected | GizmoType.NonSelected)] + static void DrawGizmos(DepthProbe target, GizmoType type) + { +#if CREST_DEBUG + if (target._Debug._ShowSimulationDataInScene) + { + VisualizeMaterial.mainTexture = target.Texture; + VisualizeMaterial.SetPass(0); + Graphics.DrawMeshNow + ( + Helpers.QuadMesh, + Matrix4x4.TRS(target.Position, Quaternion.Euler(90f, 0, 0), target.Scale) + ); + } +#endif + + if (!type.HasFlag(GizmoType.Selected)) + { + return; + } + + // Lod Input gizmo. + Gizmos.matrix = Matrix4x4.TRS(target.Position, target.Rotation, target.Scale.XNZ(1f)); + Gizmos.color = DepthLod.s_GizmoColor; + Gizmos.DrawWireCube(Vector3.zero, new(1f, 0f, 1f)); + + if (target.Type == DepthProbeMode.RealTime) + { + Gizmos.color = Color.white; + + var scale = Vector3.one; + var position = Vector3.zero; + + position.y = Mathf.LerpUnclamped(target._CaptureRange.x, target._CaptureRange.y, target._CaptureRange.y / scale.y); + position.y *= 0.5f; + Gizmos.DrawWireCube(position, scale.XNZ(-target._CaptureRange.x + target._CaptureRange.y)); + + position.y = target._CaptureRange.y + target._FillHolesCaptureHeight * 0.5f; + Gizmos.DrawWireCube(position, scale.XNZ(target._FillHolesCaptureHeight)); + + var size = Gizmos.matrix.lossyScale.XZ(); + var offset = Vector3.one * 0.5f; + var height0 = target._CaptureRange.y; + var height1 = target._CaptureRange.x; + var height2 = target._CaptureRange.y + target._FillHolesCaptureHeight; + + DrawGrid(size, offset.XNZ(-height0)); + DrawGrid(size, offset.XNZ(-height1)); + DrawGrid(size, offset.XNZ(-height2)); + + Gizmos.color = new(1f, 1f, 1f, 0.2f); + Gizmos.DrawCube(Vector3.zero.XNZ(height0), Vector3.one.XNZ()); + Gizmos.DrawCube(Vector3.zero.XNZ(height1), Vector3.one.XNZ()); + Gizmos.DrawCube(Vector3.zero.XNZ(height2), Vector3.one.XNZ()); + } + } + + [DrawGizmo(GizmoType.Selected | GizmoType.NonSelected)] + static void DrawGizmos(ShapeWaves target, GizmoType type) + { + if (!target.Enabled) return; + + if (target._DrawBounds) + { + // Render bounds. + var water = WaterRenderer.Instance; + var rect = target._Rect; + if (water != null && rect != null && target.Mode != LodInputMode.Global) + { + Gizmos.DrawWireCube(new(rect.center.x, water.SeaLevel, rect.center.y), new(rect.size.x, 0, rect.size.y)); + } + } + } + + [DrawGizmo(GizmoType.Selected)] + static void DrawGizmos(SphereWaterInteraction target, GizmoType type) + { + Gizmos.color = DynamicWavesLod.s_GizmoColor; + Gizmos.DrawWireSphere(target.transform.position + target._VelocityOffset * target._Velocity, target._Radius); + } + + [DrawGizmo(GizmoType.Selected)] + static void DrawGizmos(WaterBody target, GizmoType type) + { + var oldColor = Gizmos.color; + Gizmos.color = new(1f, 1f, 1f, 0.5f); + var center = target.AABB.center; + var size = 2f * new Vector3(target.AABB.extents.x, 1f, target.AABB.extents.z); + Gizmos.DrawCube(center, size); + Gizmos.color = Color.white; + Gizmos.DrawWireCube(center, size); + Gizmos.color = oldColor; + } + + [DrawGizmo(GizmoType.Selected | GizmoType.NonSelected)] + static void DrawGizmos(WaterChunkRenderer target, GizmoType type) + { + if (target._DrawRenderBounds) + { + target.Rend.bounds.GizmosDraw(); + } + + if (!type.HasFlag(GizmoType.Selected)) + { + return; + } + + if (target.Rend != null) + { + target.Rend.bounds.GizmosDraw(); + } + + if (WaterBody.WaterBodies.Count > 0) + { + Gizmos.color = Color.green; + Gizmos.DrawWireCube + ( + target._UnexpandedBoundsXZ.center.XNZ(target.transform.position.y), + target._UnexpandedBoundsXZ.size.XNZ() + ); + } + } + + [DrawGizmo(GizmoType.Selected)] + static void DrawGizmos(FloatingObject target, GizmoType type) + { + if (!target.TryGetComponent(out var physics)) return; + + Gizmos.color = Color.yellow; + Gizmos.DrawCube(target.transform.TransformPoint(physics.centerOfMass), Vector3.one * 0.25f); + + if (target.Model != FloatingObjectModel.Probes) return; + + for (var i = 0; i < target._Probes.Length; i++) + { + var point = target._Probes[i]; + + var transformedPoint = target.transform.TransformPoint(point._Position + new Vector3(0, physics.centerOfMass.y, 0)); + + Gizmos.color = Color.red; + Gizmos.DrawCube(transformedPoint, Vector3.one * 0.5f); + } + } + + static void DrawGrid(Vector2 size, Vector3 offset) + { + var xPoints = new Vector3[Mathf.FloorToInt(size.x / 2f) * 2]; + var zPoints = new Vector3[Mathf.FloorToInt(size.y / 2f) * 2]; + var xCellSize = 1f / size.x; + var zCellSize = 1f / size.y; + var xSize = size.x; + var zSize = size.y; + + for (var x = 0; x < xPoints.Length; x += 2) + { + xPoints[x + 0] = new Vector3(x * xCellSize, 0, 0) - offset; + xPoints[x + 1] = new Vector3(x * xCellSize, 0, xSize * xCellSize) - offset; + } + + Gizmos.DrawLineList(xPoints); + + for (var z = 0; z < zPoints.Length; z += 2) + { + zPoints[z + 0] = new Vector3(0, 0, z * zCellSize) - offset; + zPoints[z + 1] = new Vector3(zSize * zCellSize, 0, z * zCellSize) - offset; + } + + Gizmos.DrawLineList(zPoints); + } + } + + static class BoundsHelper + { + internal static void GizmosDraw(this Bounds b) + { + var xmin = b.min.x; + var ymin = b.min.y; + var zmin = b.min.z; + var xmax = b.max.x; + var ymax = b.max.y; + var zmax = b.max.z; + + Gizmos.DrawLine(new(xmin, ymin, zmin), new(xmin, ymin, zmax)); + Gizmos.DrawLine(new(xmin, ymin, zmin), new(xmax, ymin, zmin)); + Gizmos.DrawLine(new(xmax, ymin, zmax), new(xmin, ymin, zmax)); + Gizmos.DrawLine(new(xmax, ymin, zmax), new(xmax, ymin, zmin)); + + Gizmos.DrawLine(new(xmin, ymax, zmin), new(xmin, ymax, zmax)); + Gizmos.DrawLine(new(xmin, ymax, zmin), new(xmax, ymax, zmin)); + Gizmos.DrawLine(new(xmax, ymax, zmax), new(xmin, ymax, zmax)); + Gizmos.DrawLine(new(xmax, ymax, zmax), new(xmax, ymax, zmin)); + + Gizmos.DrawLine(new(xmax, ymax, zmax), new(xmax, ymin, zmax)); + Gizmos.DrawLine(new(xmin, ymin, zmin), new(xmin, ymax, zmin)); + Gizmos.DrawLine(new(xmax, ymin, zmin), new(xmax, ymax, zmin)); + Gizmos.DrawLine(new(xmin, ymax, zmax), new(xmin, ymin, zmax)); + } + } +} diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Gizmos.cs.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Gizmos.cs.meta new file mode 100644 index 000000000..85c7d6a51 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Gizmos.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 93b89233ebf2e4123858483445c37f78 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/MaterialDrawers.cs b/Packages/com.waveharmonic.crest/Editor/Scripts/MaterialDrawers.cs new file mode 100644 index 000000000..3a81dc21d --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/MaterialDrawers.cs @@ -0,0 +1,69 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// Repository of custom material property drawers. +// All drawers must be prefixed with Crest as they are global. + +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; + +namespace WaveHarmonic.Crest.Editor +{ + static class MaterialAttributes + { + internal sealed class MaterialAttribute + { + public Vector2Int _IntegerRange; + } + + internal static readonly Dictionary s_Common = new() + { + + }; + + internal static readonly Dictionary> s_Grouped = new() + { + { + "Crest/Underwater", new() + { + { "_Crest_DataSliceOffset", new() { _IntegerRange = new(0, Lod.k_MaximumSlices - 2) } }, + } + }, + }; + } + + sealed class CrestIntegerRangeDrawer : MaterialPropertyDrawer + { + // Adapted from: + // https://github.com/Unity-Technologies/UnityCsReference/blob/b44c4cc9e4ce3dfa0bab2fe4bf7efae880c5a175/Editor/Mono/Inspector/MaterialEditor.cs#L1277-L1298 + public override void OnGUI(Rect position, MaterialProperty property, GUIContent label, MaterialEditor editor) + { + MaterialEditor.BeginProperty(position, property); + + EditorGUI.BeginChangeCheck(); + + // For range properties we want to show the slider so we adjust label width to use default width (setting it to 0) + // See SetDefaultGUIWidths where we set: EditorGUIUtility.labelWidth = GUIClip.visibleRect.width - EditorGUIUtility.fieldWidth - 17; + var oldLabelWidth = EditorGUIUtility.labelWidth; + EditorGUIUtility.labelWidth = 0f; + + var material = editor.target as Material; + var shader = material.shader; + + var attribute = MaterialAttributes.s_Grouped.GetValueOrDefault(shader.name, null)?.GetValueOrDefault(property.name, null); + attribute ??= MaterialAttributes.s_Common[property.name]; + + var newValue = EditorGUI.IntSlider(position, label, property.intValue, attribute._IntegerRange.x, attribute._IntegerRange.y); + + EditorGUIUtility.labelWidth = oldLabelWidth; + + if (EditorGUI.EndChangeCheck()) + { + property.intValue = newValue; + } + + MaterialEditor.EndProperty(); + } + } +} diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/MaterialDrawers.cs.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/MaterialDrawers.cs.meta new file mode 100644 index 000000000..7cda33ac7 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/MaterialDrawers.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a5c616b1730474d5f99e11c506d35e9b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/MaterialTooltips.cs b/Packages/com.waveharmonic.crest/Editor/Scripts/MaterialTooltips.cs new file mode 100644 index 000000000..aec8fe30c --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/MaterialTooltips.cs @@ -0,0 +1,330 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using System.Collections.Generic; +using System.Linq; +using UnityEditor; +using UnityEditor.Rendering; +using UnityEditor.Rendering.HighDefinition; +using UnityEngine; + +namespace WaveHarmonic.Crest.Editor +{ + static class MaterialTooltips + { + internal static readonly Dictionary s_Common = new() + { + // Feather + { "_Crest_Feather", "Feather the edges of the mesh using the texture coordinates. Easiest to understand with a plane" }, + { "_Crest_FeatherWidth", "How far from edge to feather" }, + }; + + internal static readonly Dictionary> s_Grouped = new() + { + { + "Crest/Inputs/Animated Waves/Add From Texture", new() + { + { "_Crest_HeightsOnly", "Treats the texture as a heightmap and reads from the R channel" }, + } + }, + { + "Crest/Inputs/Flow/Add From Texture", new() + { + { "_Crest_FlipX", "Flips the X direction (R channel)" }, + { "_Crest_FlipZ", "Flips the Z direction (Y channel)" }, + { "_Crest_NegativeValues", "Whether the texture supports negative values otherwise assumes data is packed in 0-1 range" }, + } + }, + { + "Crest/Inputs/All/Scale", new() + { + { "_Crest_Scale", "Scale the water data. Zero is no data and one leaves data untouched" }, + { "_Crest_ApplyTexture", "Use the texture instead of the scale value" }, + { "_Crest_Invert", "Inverts the scale value" }, + } + }, + { + "Crest/Inputs/Shape Waves/Add From Geometry", new() + { + { "_Crest_FeatherWaveStart", "Controls ramp distance over which waves grow/fade as they move forwards" }, + } + }, + { + "Crest/Underwater", new() + { + { "_Crest_ExtinctionMultiplier", "Scales the depth fog density. Useful to reduce the intensity of the depth fog when underwater only" }, + { "_Crest_SunBoost", "Boost the intensity of the sun scattering" }, + { "_Crest_OutScatteringFactor", "Applied to the water depth when calculating out-scattering. Less means it gets darker deeper" }, + { "_Crest_OutScatteringExtinctionFactor", "Applied to the distance where the out-scattering gradient is calculated. Lower decreases out-scattering influence" }, + { "_Crest_DitheringEnabled", "Dithering will reduce banding" }, + { "_Crest_DitheringIntensity", "Increase if banding persists" }, + { "_Crest_MeniscusEnabled", "Add a meniscus to the boundary between water and air" }, + { "_Crest_DataSliceOffset", "How much to smooth water data such as water depth, light scattering, shadowing. Helps to smooth flickering that can occur under camera motion" }, + } + }, + { + WaterShaderUtility.k_ShaderName, new() + { + { "_Crest_NormalsStrengthOverall", "Strength of the final surface normal (both wave normal and normal map)" }, + { "_Crest_NormalMapEnabled", "Whether to add normal detail from a texture. Can be used to add visual detail to the water surface" }, + { "_Crest_NormalMapTexture", "Normal map texture" }, + { "_Crest_NormalMapStrength", "Strength of normal map influence" }, + { "_Crest_NormalMapScale", "Base scale of multi-scale normal map texture" }, + { "_Crest_NormalMapScrollSpeed", "Speed of the normal maps scrolling" }, + { "_Crest_AbsorptionColor", "Works as a color (ie red adds red rather than subtracts red). This value is converted to real absorption values (proportion of light getting absorbed by water in atoms per meter). Alpha channel is for density. High alpha and darker color reduces transparency" }, + { "_Crest_Scattering", "Light scattered by the water towards the viewer (in-scattered) per meter. Brighter color reduces transparency" }, + { "_Crest_Anisotropy", "The directionality of the scattering where zero means scattered in all directions. The further towards one, the less visible soft shadows will be" }, + { "_Crest_DirectTerm", "Scale direct light contribution to volume lighting" }, + { "_Crest_AmbientTerm", "Scale ambient light contribution to volume lighting" }, + { "_Crest_SSSEnabled", "Whether to to emulate light scattering through waves" }, + { "_Crest_SSSIntensity", "Direct light contribution intensity. Applied to the scattering color. This effect is best if subtle" }, + { "_Crest_SSSPinchMinimum", "Higher the value the more scattering is towards the peaks of the waves" }, + { "_Crest_SSSPinchMaximum", "Higher the value for more scattering" }, + { "_Crest_SSSPinchFalloff", "Falloff for pinch minimum/maximum" }, + { "_Crest_SSSDirectionalFalloff", "Falloff for direct light scattering to affect directionality" }, + { "_Crest_Specular", "Strength of specular lighting response" }, + { "_Crest_Occlusion", "Strength of reflection" }, + { "_Crest_OcclusionUnderwater", "Strength of reflection when underwater. Keep this at zero to avoid skybox reflections which look incorrect when underwater, unless you want reflections from Planar Reflections or probes" }, + { "_Crest_Smoothness", "Smoothness of surface. A value of one is ideal for flat water only" }, + { "_Crest_SmoothnessFar", "Material smoothness at far distance from camera. Helps to spread out specular highlight in mid-to-background. From a theory point of view, models transfer of normal detail to microfacets in BRDF" }, + { "_Crest_SmoothnessFarDistance", "Definition of far distance" }, + { "_Crest_SmoothnessFalloff", "How smoothness varies between near and far distance" }, + { "_Crest_MinimumReflectionDirectionY", "Limits the reflection direction on the Y axis. Zero prevents reflections below the horizon. Small values above zero can be used to reduce horizon reflection contributions. Values above zero will negatively affect dynamic reflections like planar or SSR" }, + { "_Crest_PlanarReflectionsEnabled", "Dynamically rendered 'reflection plane' style reflections. Requires Reflections to be enabled on the Water Renderer" }, + { "_Crest_PlanarReflectionsIntensity", "Intensity of the planar reflections" }, + { "_Crest_PlanarReflectionsDistortion", "How much the water normal affects the planar reflection" }, + { "_Crest_PlanarReflectionsRoughness", "Controls the mipmap range" }, + { "_Crest_RefractionStrength", "How strongly light is refracted when passing through water surface" }, + { "_Crest_RefractiveIndexOfWater", "Index of refraction of water - typically left at 1.333. Changing this value can increase/decrease the size of the Snell's window" }, + { "_Crest_TotalInternalReflectionIntensity", "Zero will make the underwater reflections transparent. Slightly semi-transparency is a zero performance cost alternative to TIR" }, + { "_Crest_ShadowsEnabled", "Whether to receive shadow data. Does not affect shadow contributions from Unity" }, + { "_Crest_ShadowCasterThreshold", "Same concept as Alpha Clip Threshold but for foam casted shadows" }, + { "_Crest_FoamEnabled", "Enable foam layer on water surface" }, + { "_Crest_FoamTexture", "Foam texture" }, + { "_Crest_FoamScale", "Scale of multi-scale foam texture" }, + { "_Crest_FoamScrollSpeed", "Speed of the foam scrolling. This speed is slower than the other scroll speeds, as it scrolls in one direction only" }, + { "_Crest_FoamFeather", "Controls how gradual the transition is from full foam to no foam. Higher values look more realistic and can help mitigate flow phasing" }, + { "_Crest_FoamIntensityAlbedo", "Scale intensity of diffuse lighting" }, + { "_Crest_FoamSmoothness", "Smoothness of foam material" }, + { "_Crest_FoamNormalStrength", "Strength of the generated normals" }, + { "_Crest_CausticsEnabled", "Approximate rays being focused/defocused on underwater surfaces" }, + { "_Crest_CausticsTexture", "Caustics texture" }, + { "_Crest_CausticsStrength", "Intensity of caustics effect" }, + { "_Crest_CausticsTextureScale", "Caustics texture scale" }, + { "_Crest_CausticsScrollSpeed", "Speed of the caustics scrolling" }, + { "_Crest_CausticsTextureAverage", "The 'mid' value of the caustics texture, around which the caustic texture values are scaled. Decreasing this value will reduce the caustics darkening underwater surfaces" }, + { "_Crest_CausticsFocalDepth", "The depth at which the caustics are in focus" }, + { "_Crest_CausticsDepthOfField", "The range of depths over which the caustics are in focus" }, + { "_Crest_CausticsDistortionTexture", "Texture to distort caustics. Only applicable to underwater effect for now" }, + { "_Crest_CausticsDistortionStrength", "How much the caustics texture is distorted" }, + { "_Crest_CausticsDistortionScale", "The scale of the distortion pattern used to distort the caustics" }, + { "_Crest_CausticsMotionBlur", "How much caustics are blurred when advected by flow" }, + { "CREST_FLOW", "Flow is horizontal motion of water. Flow must be enabled on the Water Renderer to generate flow data" }, + { "_Crest_AlbedoEnabled", "Enable the Albedo simulation layer. Albedo must be enabled on the Water" }, + { "_Crest_AlbedoIgnoreFoam", "Whether Albedo renders over the top of foam or not." }, + } + }, + }; + } + + static class WaterShaderUtility + { + public const string k_ShaderName = "Crest/Water"; + + internal static void UpdateAbsorptionFromColor(Material material) + { + if (!material.HasProperty(WaterRenderer.ShaderIDs.s_Absorption) || !material.HasProperty(WaterRenderer.ShaderIDs.s_AbsorptionColor)) + { + return; + } + + // Convert an authored absorption colour to density values. + WaterRenderer.UpdateAbsorptionFromColor(material); + + if (!material.IsPropertyOverriden(WaterRenderer.ShaderIDs.s_AbsorptionColor)) + { + material.RevertPropertyOverride(WaterRenderer.ShaderIDs.s_Absorption); + } + } + + internal static MaterialProperty[] FilterProperties(MaterialProperty[] properties) + { + return properties.Where(x => x.name != "_Crest_Absorption").ToArray(); + } + } + + /// + /// Supports tooltips and skips rendering render pipeline properties like "Queue". + /// + sealed class CustomShaderGUI : ShaderGUI + { + static readonly GUIContent s_Label = new(); + + public override void OnMaterialPreviewGUI(MaterialEditor materialEditor, Rect r, GUIStyle background) + { + + } + + public override void OnGUI(MaterialEditor editor, MaterialProperty[] properties) + { + var material = editor.target as Material; + var shader = material.shader; + var grouped = MaterialTooltips.s_Grouped.GetValueOrDefault(shader.name, null); + + WaterShaderUtility.UpdateAbsorptionFromColor((Material)editor.target); + + foreach (var property in properties) + { + if ((property.propertyFlags & UnityEngine.Rendering.ShaderPropertyFlags.HideInInspector) != 0) continue; + + var name = property.name; + s_Label.text = property.displayName; + s_Label.tooltip = grouped?.GetValueOrDefault(name, null); + s_Label.tooltip ??= MaterialTooltips.s_Common.GetValueOrDefault(name, null); + editor.ShaderProperty(property, s_Label); + } + } + } + +#if d_UnityShaderGraph + class LegacyCustomShaderGUI : UnityEditor.Rendering.BuiltIn.ShaderGraph.BuiltInBaseShaderGUI + { + MaterialEditor _Editor; + MaterialProperty[] _Properties; + protected string _ShaderName; + + public override void OnMaterialPreviewGUI(MaterialEditor materialEditor, Rect r, GUIStyle background) + { + + } + + public override void OnGUI(MaterialEditor editor, MaterialProperty[] properties) + { + properties = properties.Where(x => x.name != "_Crest_Version").ToArray(); + + _Editor = editor; + _Properties = properties; + base.OnGUI(editor, properties); + } + + protected override void DrawSurfaceInputs(Material material) + { + ShaderGraphPropertyDrawers.DrawShaderGraphGUI(_Editor, _Properties, MaterialTooltips.s_Grouped[_ShaderName]); + } + } + + // Warning! Renaming this class is a breaking change due to users potentially + // exporting the shader to integrate with other assets. + sealed class LegacyWaterShaderGUI : LegacyCustomShaderGUI + { + public override void OnGUI(MaterialEditor editor, MaterialProperty[] properties) + { + _ShaderName = WaterShaderUtility.k_ShaderName; + properties = WaterShaderUtility.FilterProperties(properties); + + base.OnGUI(editor, properties); + WaterShaderUtility.UpdateAbsorptionFromColor(editor.target as Material); + } + } + +#if d_UnityURP + class UniversalCustomShaderGUI : ShaderGraphLitGUI + { + MaterialEditor _Editor; + MaterialProperty[] _Properties; + protected string _ShaderName; + + public override void OnMaterialPreviewGUI(MaterialEditor materialEditor, Rect r, GUIStyle background) + { + + } + + public override void OnGUI(MaterialEditor editor, MaterialProperty[] properties) + { + properties = properties.Where(x => x.name != "_Crest_Version").ToArray(); + + _Editor = editor; + _Properties = properties; + + base.OnGUI(editor, properties); + } + + public override void DrawSurfaceInputs(Material material) + { + ShaderGraphPropertyDrawers.DrawShaderGraphGUI(_Editor, _Properties, MaterialTooltips.s_Grouped[_ShaderName]); + } + } + + // Warning! Renaming this class is a breaking change due to users potentially + // exporting the shader to integrate with other assets. + sealed class UniversalWaterShaderGUI : UniversalCustomShaderGUI + { + public override void OnGUI(MaterialEditor editor, MaterialProperty[] properties) + { + _ShaderName = WaterShaderUtility.k_ShaderName; + properties = WaterShaderUtility.FilterProperties(properties); + + base.OnGUI(editor, properties); + WaterShaderUtility.UpdateAbsorptionFromColor(editor.target as Material); + } + } +#endif // d_UnityURP + +#if d_UnityHDRP + sealed class CustomShaderGraphUIBlock : MaterialUIBlock + { + public override void LoadMaterialProperties() { } + + public override void OnGUI() + { + using var header = new MaterialHeaderScope("Exposed Properties", (uint)ExpandableBit.ShaderGraph, materialEditor); + + if (!header.expanded) + { + return; + } + + var name = (materialEditor.customShaderGUI as HighDefinitionCustomShaderGUI)._ShaderName; + ShaderGraphPropertyDrawers.DrawShaderGraphGUI(materialEditor, properties, MaterialTooltips.s_Grouped[name]); + } + } + + class HighDefinitionCustomShaderGUI : LightingShaderGraphGUI + { + internal string _ShaderName; + + public HighDefinitionCustomShaderGUI() + { + // Add refraction block. + uiBlocks.Insert(1, new TransparencyUIBlock(MaterialUIBlock.ExpandableBit.Transparency, TransparencyUIBlock.Features.Refraction)); + // Remove the ShaderGraphUIBlock to avoid having duplicated properties in the UI. + uiBlocks.RemoveAll(x => x is ShaderGraphUIBlock); + // Insert the custom block just after the Surface Option block. + uiBlocks.Insert(1, new CustomShaderGraphUIBlock()); + } + + protected override void OnMaterialGUI(MaterialEditor editor, MaterialProperty[] properties) + { + properties = properties.Where(x => x.name != "_Crest_Version").ToArray(); + + base.OnMaterialGUI(editor, properties); + WaterShaderUtility.UpdateAbsorptionFromColor(editor.target as Material); + } + } + + // Warning! Renaming this class is a breaking change due to users potentially + // exporting the shader to integrate with other assets. + sealed class HighDefinitionWaterShaderGUI : HighDefinitionCustomShaderGUI + { + protected override void OnMaterialGUI(MaterialEditor editor, MaterialProperty[] properties) + { + _ShaderName = WaterShaderUtility.k_ShaderName; + properties = WaterShaderUtility.FilterProperties(properties); + + base.OnMaterialGUI(editor, properties); + WaterShaderUtility.UpdateAbsorptionFromColor(editor.target as Material); + } + } +#endif // d_UnityHDRP +#endif // d_UnityShaderGraph +} diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/MaterialTooltips.cs.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/MaterialTooltips.cs.meta new file mode 100644 index 000000000..60a3438c4 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/MaterialTooltips.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 03f27e0acbab243d09a4e509eb3777fc +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/OptionalLod.cs b/Packages/com.waveharmonic.crest/Editor/Scripts/OptionalLod.cs new file mode 100644 index 000000000..dbe48190e --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/OptionalLod.cs @@ -0,0 +1,164 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using System.Collections.Generic; + +namespace WaveHarmonic.Crest.Editor +{ + class OptionalLod + { + internal string _MaterialProperty; + + internal string PropertyName { get; private set; } + internal string PropertyLabel { get; private set; } + internal System.Type Dependency { get; private set; } + + internal Lod GetLod(WaterRenderer water) => PropertyName switch + { + nameof(WaterRenderer._AbsorptionLod) => water.AbsorptionLod, + nameof(WaterRenderer._AlbedoLod) => water.AlbedoLod, + nameof(WaterRenderer._AnimatedWavesLod) => water.AnimatedWavesLod, + nameof(WaterRenderer._ClipLod) => water.ClipLod, + nameof(WaterRenderer._DepthLod) => water.DepthLod, + nameof(WaterRenderer._DynamicWavesLod) => water.DynamicWavesLod, + nameof(WaterRenderer._FlowLod) => water.FlowLod, + nameof(WaterRenderer._FoamLod) => water.FoamLod, + nameof(WaterRenderer._LevelLod) => water.LevelLod, + nameof(WaterRenderer._ScatteringLod) => water.ScatteringLod, + nameof(WaterRenderer._ShadowLod) => water.ShadowLod, + _ => throw new System.NotImplementedException(), + }; + + + // Optional. Not all simulations will have a corresponding keyword. + internal bool HasMaterialToggle => !string.IsNullOrEmpty(MaterialProperty); + + // Needed as clip surface material toggle is Alpha Clipping. + internal virtual string MaterialProperty => _MaterialProperty; + internal virtual string MaterialPropertyPath => $"{PropertyLabel} > Enabled"; + internal virtual string MaterialKeyword => $"{MaterialProperty}_ON"; + + internal static OptionalLod Get(System.Type type) + { + return s_Lods.GetValueOrDefault(s_Mapping.GetValueOrDefault(type, type), null); + } + + static readonly Dictionary s_Lods = new() + { + { + typeof(AbsorptionLod), new ColorOptionLod() + { + PropertyLabel = "Absorption", + PropertyName = nameof(WaterRenderer._AbsorptionLod), + } + }, + { + typeof(AlbedoLod), new() + { + PropertyLabel = "Albedo", + PropertyName = nameof(WaterRenderer._AlbedoLod), + _MaterialProperty = "_Crest_AlbedoEnabled", + } + }, + { + typeof(AnimatedWavesLod), new() + { + PropertyLabel = "Animate Waves", + PropertyName = nameof(WaterRenderer._AnimatedWavesLod), + } + }, + { + typeof(ClipLod), new ClipOptionalLod() + { + PropertyLabel = "Clip Surface", + PropertyName = nameof(WaterRenderer._ClipLod), + } + }, + { + typeof(DepthLod), new() + { + PropertyLabel = "Water Depth", + PropertyName = nameof(WaterRenderer._DepthLod), + } + }, + { + typeof(DynamicWavesLod), new() + { + PropertyLabel = "Dynamic Waves", + PropertyName = nameof(WaterRenderer._DynamicWavesLod), + Dependency = typeof(AnimatedWavesLod), + } + }, + { + typeof(FlowLod), new() + { + PropertyLabel = "Flow", + PropertyName = nameof(WaterRenderer._FlowLod), + _MaterialProperty = "CREST_FLOW", + } + }, + { + typeof(FoamLod), new() + { + PropertyLabel = "Foam", + PropertyName = nameof(WaterRenderer._FoamLod), + _MaterialProperty = "_Crest_FoamEnabled", + } + }, + { + typeof(LevelLod), new() + { + PropertyLabel = "Water Level", + PropertyName = nameof(WaterRenderer._LevelLod), + _MaterialProperty = "_Crest_LevelEnabled", + Dependency = typeof(AnimatedWavesLod), + + } + }, + { + typeof(ScatteringLod), new ColorOptionLod() + { + PropertyLabel = "Scattering", + PropertyName = nameof(WaterRenderer._ScatteringLod), + } + }, + { + typeof(ShadowLod), new() + { + PropertyLabel = "Shadow", + PropertyName = nameof(WaterRenderer._ShadowLod), + _MaterialProperty = "_Crest_ShadowsEnabled", + } + }, + }; + + static readonly Dictionary s_Mapping = new() + { + { typeof(AbsorptionLodInput), typeof(AbsorptionLod) }, + { typeof(AlbedoLodInput), typeof(AlbedoLod) }, + { typeof(AnimatedWavesLodInput), typeof(AnimatedWavesLod) }, + { typeof(ClipLodInput), typeof(ClipLod) }, + { typeof(DepthLodInput), typeof(DepthLod) }, + { typeof(DynamicWavesLodInput), typeof(DynamicWavesLod) }, + { typeof(FlowLodInput), typeof(FlowLod) }, + { typeof(FoamLodInput), typeof(FoamLod) }, + { typeof(LevelLodInput), typeof(LevelLod) }, + { typeof(ScatteringLodInput), typeof(ScatteringLod) }, + { typeof(ShadowLodInput), typeof(ShadowLod) }, + }; + } + + sealed class ClipOptionalLod : OptionalLod + { + // BIRP SG has prefixes for Unity properties but other RPs do not. These prefixes + // are for serialisation only and are not used in the shader. + internal override string MaterialPropertyPath => "Alpha Clipping"; + internal override string MaterialProperty => (RenderPipelineHelper.IsLegacy ? "_BUILTIN" : "") + "_AlphaClip"; + internal override string MaterialKeyword => (RenderPipelineHelper.IsLegacy ? "_BUILTIN" : "") + "_ALPHATEST_ON"; + } + + sealed class ColorOptionLod : OptionalLod + { + internal override string MaterialPropertyPath => $"Volume Lighting > Sample {PropertyLabel} Simulation"; + } +} diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/OptionalLod.cs.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/OptionalLod.cs.meta new file mode 100644 index 000000000..bcca5c6e7 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/OptionalLod.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f8aa89e81afc448e38e1e4a046cdfacc +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Previews.cs b/Packages/com.waveharmonic.crest/Editor/Scripts/Previews.cs new file mode 100644 index 000000000..58910e10c --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Previews.cs @@ -0,0 +1,265 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEditor; +using UnityEngine; + +namespace WaveHarmonic.Crest.Editor +{ + // + // Lod + // + + abstract class LodPreview : TexturePreview + { + protected abstract Lod Lod { get; } + protected abstract bool VisualizeNegatives { get; } + protected virtual bool ForceAlpha => false; + public override GUIContent GetPreviewTitle() => new(Lod.Name); + protected RenderTexture _TemporaryTexture; + protected override Texture OriginalTexture + { + get + { + if (!Lod.Enabled || !((WaterRenderer)target).isActiveAndEnabled) return null; + + var texture = Lod.DataTexture; + + if (texture == null) + { + return null; + } + + return texture; + } + } + + protected override Texture ModifiedTexture => _TemporaryTexture; + + public override void OnPreviewSettings() + { + base.OnPreviewSettings(); + // OnPreviewSettings is called after OnPreviewGUI so release here. + RenderTexture.ReleaseTemporary(_TemporaryTexture); + _TemporaryTexture = null; + } + + public override void OnPreviewGUI(Rect rect, GUIStyle background) + { + var texture = Lod.DataTexture; + var descriptor = texture.descriptor; + _TemporaryTexture = RenderTexture.GetTemporary(descriptor); + _TemporaryTexture.name = "Crest Preview (Temporary)"; + Graphics.CopyTexture(texture, _TemporaryTexture); + + if (VisualizeNegatives) + { + var wrapper = new PropertyWrapperComputeStandalone(EditorHelpers.VisualizeNegativeValuesShader, 1); + wrapper.SetTexture(ShaderIDs.s_Target, _TemporaryTexture); + wrapper.Dispatch + ( + Lod.Resolution / Lod.k_ThreadGroupSizeX, + Lod.Resolution / Lod.k_ThreadGroupSizeY, + Lod.Slices + ); + } + + ModifyTexture(); + + if (ForceAlpha) + { + // Set alpha to one otherwise it shows nothing when set to RGB. + var clear = WaterResources.Instance.Compute._Clear; + if (clear != null) + { + clear.SetTexture(0, ShaderIDs.s_Target, _TemporaryTexture); + clear.SetVector(ShaderIDs.s_ClearMask, Color.black); + clear.SetVector(ShaderIDs.s_ClearColor, Color.black); + clear.Dispatch + ( + 0, + Lod.Resolution / Lod.k_ThreadGroupSizeX, + Lod.Resolution / Lod.k_ThreadGroupSizeY, + Lod.Slices + ); + } + } + + base.OnPreviewGUI(rect, background); + } + + + protected virtual void ModifyTexture() + { + + } + + public override void Cleanup() + { + base.Cleanup(); + RenderTexture.ReleaseTemporary(_TemporaryTexture); + } + + // FIXME: Without constructor Unity complains: + // WaveHarmonic.Crest.Editor.LodPreview does not contain a default constructor, it + // will not be registered as a preview handler. Use the Initialize function to set + // up your object instead. + public LodPreview() { } + } + + [CustomPreview(typeof(WaterRenderer))] + sealed class AbsorptionLodPreview : LodPreview + { + protected override Lod Lod => (target as WaterRenderer)._AbsorptionLod; + protected override bool VisualizeNegatives => false; + } + + [CustomPreview(typeof(WaterRenderer))] + sealed class AlbedoLodPreview : LodPreview + { + protected override Lod Lod => (target as WaterRenderer)._AlbedoLod; + protected override bool VisualizeNegatives => false; + } + + [CustomPreview(typeof(WaterRenderer))] + sealed class AnimatedWavesLodPreview : LodPreview + { + protected override Lod Lod => (target as WaterRenderer)._AnimatedWavesLod; + protected override bool VisualizeNegatives => true; + protected override bool ForceAlpha => true; + } + + [CustomPreview(typeof(WaterRenderer))] + sealed class ClipLodPreview : LodPreview + { + protected override Lod Lod => (target as WaterRenderer)._ClipLod; + protected override bool VisualizeNegatives => false; + } + + [CustomPreview(typeof(WaterRenderer))] + sealed class DepthLodPreview : LodPreview + { + protected override Lod Lod => (target as WaterRenderer)._DepthLod; + protected override bool VisualizeNegatives => true; + } + + [CustomPreview(typeof(WaterRenderer))] + sealed class DynamicWavesLodPreview : LodPreview + { + protected override Lod Lod => (target as WaterRenderer)._DynamicWavesLod; + // Negatives do not visualize well, and obscure positives too much. + protected override bool VisualizeNegatives => false; + } + + [CustomPreview(typeof(WaterRenderer))] + sealed class FlowLodPreview : LodPreview + { + protected override Lod Lod => (target as WaterRenderer)._FlowLod; + protected override bool VisualizeNegatives => true; + } + + [CustomPreview(typeof(WaterRenderer))] + sealed class FoamLodPreview : LodPreview + { + protected override Lod Lod => (target as WaterRenderer)._FoamLod; + protected override bool VisualizeNegatives => false; + } + + [CustomPreview(typeof(WaterRenderer))] + sealed class LevelLodPreview : LodPreview + { + protected override Lod Lod => (target as WaterRenderer)._LevelLod; + protected override bool VisualizeNegatives => true; + } + + [CustomPreview(typeof(WaterRenderer))] + sealed class ScatteringLodPreview : LodPreview + { + protected override Lod Lod => (target as WaterRenderer)._ScatteringLod; + protected override bool VisualizeNegatives => false; + protected override bool ForceAlpha => true; + } + + [CustomPreview(typeof(WaterRenderer))] + sealed class ShadowLodPreview : LodPreview + { + protected override Lod Lod => (target as WaterRenderer)._ShadowLod; + protected override bool VisualizeNegatives => false; + } + + + // + // LodInput + // + + // Adding abstract causes exception: + // does not contain a default constructor, it will not be registered as a preview + // handler. Use the Initialize function to set up your object instead. + class ShapeWavesPreview : TexturePreview + { + public override GUIContent GetPreviewTitle() => new($"{target.GetType().Name}: Wave Buffer"); + protected override Texture OriginalTexture => (target as ShapeWaves).WaveBuffer; + } + + [CustomPreview(typeof(ShapeFFT))] + sealed class ShapeFFTPreview : ShapeWavesPreview + { + } + + [CustomPreview(typeof(ShapeGerstner))] + sealed class ShapeGerstnerPreview : ShapeWavesPreview + { + } + + [CustomPreview(typeof(DepthProbe))] + sealed class DepthProbePreview : TexturePreview + { + public override GUIContent GetPreviewTitle() => new("Depth Probe"); + protected override Texture OriginalTexture => (target as DepthProbe).Texture; + } + +#if CREST_DEBUG + [CustomPreview(typeof(DepthProbe))] + sealed class DepthProbeCameraPreview : TexturePreview + { + public override GUIContent GetPreviewTitle() => new("Depth Probe: Camera"); + protected override Texture OriginalTexture + { + get + { + var target = this.target as DepthProbe; + if (target._Camera == null) return null; + return target._Camera.targetTexture; + } + } + } +#endif + + + // + // Other + // + +#if CREST_DEBUG + [CustomPreview(typeof(WaterRenderer))] + sealed class WaterLevelDepthPreview : TexturePreview + { + public override GUIContent GetPreviewTitle() => new("Water Level Screen-Space Depth"); + protected override Texture OriginalTexture => (target as WaterRenderer).WaterLevelDepthTexture; + } + + [CustomPreview(typeof(WaterRenderer))] + sealed class WaterVolumeMaskPreview : TexturePreview + { + public override GUIContent GetPreviewTitle() => new("Water Volume Mask"); + protected override Texture OriginalTexture => RenderPipelineHelper.IsLegacy && (target as WaterRenderer)._Underwater._MaskRT && (target as WaterRenderer)._Underwater._MaskRT.width > 0 ? (target as WaterRenderer)._Underwater._MaskRT : null; + } +#endif + + [CustomPreview(typeof(WaterRenderer))] + sealed class ReflectionPreview : TexturePreview + { + public override GUIContent GetPreviewTitle() => new("Water Reflections"); + protected override Texture OriginalTexture => (target as WaterRenderer)._Reflections._Enabled ? (target as WaterRenderer)._Reflections.ReflectionTexture : null; + } +} diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Previews.cs.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Previews.cs.meta new file mode 100644 index 000000000..0ad2edad9 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Previews.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6d305aa5a62d74c33bd73632e91b5ca8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/ProjectSettings.cs b/Packages/com.waveharmonic.crest/Editor/Scripts/ProjectSettings.cs new file mode 100644 index 000000000..7158d75c3 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/ProjectSettings.cs @@ -0,0 +1,197 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using System.IO; +using UnityEditor; +using UnityEngine; +using UnityEngine.UIElements; + +namespace WaveHarmonic.Crest.Editor.Settings +{ + [FilePath(k_Path, FilePathAttribute.Location.ProjectFolder)] + sealed class ProjectSettings : ScriptableSingleton + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + +#pragma warning disable IDE0032 // Use auto property + + [@Heading("Variant Stripping", Heading.Style.Settings)] + + [@Group] + + [@DecoratedField, SerializeField] + bool _DebugEnableStrippingLogging; + + [@Predicated(nameof(_DebugEnableStrippingLogging))] + [@DecoratedField, SerializeField] + bool _DebugOnlyLogRemainingVariants; + + [Tooltip("Whether to strip broken variants.\n\nCurrently, the only known case is the point cookie variant being broken on Xbox.")] + [@DecoratedField, SerializeField] + bool _StripBrokenVariants = true; + + [@Heading("Features", Heading.Style.Settings)] + + [@Group] + + [Tooltip("Whether to use full precision sampling for half precision platforms (typically mobile).\n\nThis will solve rendering artifacts like minor bumps and staircasing.")] + [@DecoratedField, SerializeField] + bool _FullPrecisionDisplacementOnHalfPrecisionPlatforms = true; + + [Tooltip("Whether to sample shadow maps for built-in renderer.")] + [@DecoratedField, SerializeField] + bool _BuiltInRendererSampleShadowMaps = true; + +#pragma warning restore IDE0032 // Use auto property + + internal const string k_Path = "ProjectSettings/Packages/com.waveharmonic.crest/Settings.asset"; + + internal enum State + { + Dynamic, + Disabled, + Enabled, + } + + internal static ProjectSettings Instance => instance; + + internal bool StripBrokenVariants => _StripBrokenVariants; + internal bool DebugEnableStrippingLogging => _DebugEnableStrippingLogging; + internal bool LogStrippedVariants => _DebugEnableStrippingLogging && !_DebugOnlyLogRemainingVariants; + internal bool LogKeptVariants => _DebugEnableStrippingLogging && _DebugOnlyLogRemainingVariants; + internal bool FullPrecisionDisplacementOnHalfPrecisionPlatforms => _FullPrecisionDisplacementOnHalfPrecisionPlatforms; + internal bool BuiltInRendererSampleShadowMaps => _BuiltInRendererSampleShadowMaps; + + + void OnEnable() + { + // Fixes not being editable. + hideFlags = HideFlags.HideAndDontSave & ~HideFlags.NotEditable; + } + + + internal static void Save() + { + instance.Save(saveAsText: true); + } + + [@OnChange(skipIfInactive: false)] + void OnChange(string path, object previous) + { + switch (path) + { + case nameof(_BuiltInRendererSampleShadowMaps): + case nameof(_FullPrecisionDisplacementOnHalfPrecisionPlatforms): + ShaderSettingsGenerator.Generate(); + break; + } + } + } + + sealed class SettingsProvider : UnityEditor.SettingsProvider + { + static readonly string[] s_ShaderGraphs = new string[] + { + "Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Water.shadergraph", + "Packages/com.waveharmonic.crest/Shared/Shaders/Lit.shadergraph", + "Packages/com.waveharmonic.crest.paint/Samples/Colorado/Shaders/SpeedTree8_PBRLit.shadergraph", + "Packages/com.waveharmonic.crest.paint/Samples/Colorado/Shaders/Environment (Splat Map).shadergraph", + }; + + UnityEditor.Editor _Editor; + + SettingsProvider(string path, SettingsScope scope = SettingsScope.User) : base(path, scope) + { + // Empty + } + + static bool IsSettingsAvailable() + { + return File.Exists(ProjectSettings.k_Path); + } + + public override void OnActivate(string searchContext, VisualElement rootElement) + { + base.OnActivate(searchContext, rootElement); + _Editor = UnityEditor.Editor.CreateEditor(ProjectSettings.Instance); + Undo.undoRedoPerformed -= OnUndoRedo; + Undo.undoRedoPerformed += OnUndoRedo; + } + + public override void OnDeactivate() + { + base.OnDeactivate(); + Helpers.Destroy(_Editor); + Undo.undoRedoPerformed -= OnUndoRedo; + } + + void OnUndoRedo() + { + ProjectSettings.Save(); + } + + public override void OnGUI(string searchContext) + { + if (_Editor.target == null) + { + Helpers.Destroy(_Editor); + _Editor = UnityEditor.Editor.CreateEditor(ProjectSettings.Instance); + return; + } + + // Reset foldout values. + DecoratedDrawer.s_IsFoldout = false; + DecoratedDrawer.s_IsFoldoutOpen = false; + + EditorGUI.BeginChangeCheck(); + + // Pad similar to settings header. + var style = new GUIStyle(); + style.padding.left = 8; + + // Same label with as other settings. + EditorGUIUtility.labelWidth = 251; + + EditorGUILayout.BeginVertical(style); + _Editor.OnInspectorGUI(); + EditorGUILayout.EndVertical(); + + // Commit all changes. Normally settings are written when user hits save or exits + // without any undo/redo entry and dirty state. No idea how to do the same. + // SaveChanges and hasUnsavedChanges on custom editor did not work. + // Not sure if hooking into EditorSceneManager.sceneSaving is correct. + if (EditorGUI.EndChangeCheck()) + { + ProjectSettings.Save(); + } + + GUILayout.Space(10 * 2); + + if (GUILayout.Button("Repair Shaders")) + { + foreach (var path in s_ShaderGraphs) + { + if (!File.Exists(path)) continue; + AssetDatabase.ImportAsset(path); + } + } + } + + [SettingsProvider] + static UnityEditor.SettingsProvider Create() + { + if (ProjectSettings.Instance) + { + var provider = new SettingsProvider("Project/Crest", SettingsScope.Project); + provider.keywords = GetSearchKeywordsFromSerializedObject(new(ProjectSettings.Instance)); + return provider; + } + + // Settings Asset doesn't exist yet; no need to display anything in the Settings window. + return null; + } + } +} diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/ProjectSettings.cs.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/ProjectSettings.cs.meta new file mode 100644 index 000000000..333cbac76 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/ProjectSettings.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 8ac118e410ac44d44a323c7c14819660 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: + - _ArtifactsShader: {fileID: 7200000, guid: 08549c36146ad4899a07193754b21ea2, type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Requirements.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Requirements.meta new file mode 100644 index 000000000..93ed231d9 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Requirements.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 26ea4863bc6b64a0ead57ac5251f169b +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Requirements/Requirements.cs b/Packages/com.waveharmonic.crest/Editor/Scripts/Requirements/Requirements.cs new file mode 100644 index 000000000..e49af48e3 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Requirements/Requirements.cs @@ -0,0 +1,34 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#if !UNITY_2022_3_OR_NEWER +#error "Crest requires Unity version 2022.3 at a minimum." +#endif + +#if d_UpdateCPUQueries +#error "Your Crest - CPU Queries package needs to be updated to be compatible with this version of Crest." +#endif + +#if d_UpdatePaint +#error "Your Crest - Paint package needs to be updated to be compatible with this version of Crest." +#endif + +#if d_UpdatePortals +#error "Your Crest - Portals package needs to be updated to be compatible with this version of Crest." +#endif + +#if d_UpdateShallowWater +#error "Your Crest - Shallow Water package needs to be updated to be compatible with this version of Crest." +#endif + +#if d_UpdateShiftingOrigin +#error "Your Crest - Shifting Origin package needs to be updated to be compatible with this version of Crest." +#endif + +#if d_UpdateSplines +#error "Your Crest - Splines package needs to be updated to be compatible with this version of Crest." +#endif + +#if d_UpdateWhirlpool +#error "Your Crest - Whirlpool package needs to be updated to be compatible with this version of Crest." +#endif diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Requirements/Requirements.cs.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Requirements/Requirements.cs.meta new file mode 100644 index 000000000..51f2ca304 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Requirements/Requirements.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5d837eafb40b24492abeb48eefb7936f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Requirements/WaveHarmonic.Crest.Editor.Requirements.asmdef b/Packages/com.waveharmonic.crest/Editor/Scripts/Requirements/WaveHarmonic.Crest.Editor.Requirements.asmdef new file mode 100644 index 000000000..8dd5e1a09 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Requirements/WaveHarmonic.Crest.Editor.Requirements.asmdef @@ -0,0 +1,52 @@ +{ + "name": "WaveHarmonic.Crest.Editor.Dependents", + "rootNamespace": "", + "references": [], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": false, + "defineConstraints": [], + "versionDefines": [ + { + "name": "com.waveharmonic.crest.cpu-queries", + "expression": "(,1.0.4)", + "define": "d_UpdateCPUQueries" + }, + { + "name": "com.waveharmonic.crest.paint", + "expression": "(,1.2.0)", + "define": "d_UpdatePaint" + }, + { + "name": "com.waveharmonic.crest.portals", + "expression": "(,1.2.1)", + "define": "d_UpdatePortals" + }, + { + "name": "com.waveharmonic.crest.shallow-water", + "expression": "(,1.3.1)", + "define": "d_UpdateShallowWater" + }, + { + "name": "com.waveharmonic.crest.shifting-origin", + "expression": "(,1.2.1)", + "define": "d_UpdateShiftingOrigin" + }, + { + "name": "com.waveharmonic.crest.splines", + "expression": "(,1.3.2)", + "define": "d_UpdateSplines" + }, + { + "name": "com.waveharmonic.crest.whirlpool", + "expression": "(,1.0.1)", + "define": "d_UpdateWhirlpool" + } + ], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Requirements/WaveHarmonic.Crest.Editor.Requirements.asmdef.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Requirements/WaveHarmonic.Crest.Editor.Requirements.asmdef.meta new file mode 100644 index 000000000..5bb61f94b --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Requirements/WaveHarmonic.Crest.Editor.Requirements.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f9ef151b7b8ca4034bc5cdd0c2a6465d +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/ShaderSettings.cs b/Packages/com.waveharmonic.crest/Editor/Scripts/ShaderSettings.cs new file mode 100644 index 000000000..e4c548cde --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/ShaderSettings.cs @@ -0,0 +1,92 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using System.Linq; +using UnityEditor; +using UnityEditor.Callbacks; +using UnityEditor.Compilation; +using UnityEngine.Rendering; +using WaveHarmonic.Crest.Editor.Settings; + +namespace WaveHarmonic.Crest.Editor +{ + static class ShaderSettingsGenerator + { + [DidReloadScripts] + static void OnReloadScripts() + { + EditorApplication.update -= GenerateAfterReloadScripts; + EditorApplication.update += GenerateAfterReloadScripts; + } + + static async void GenerateAfterReloadScripts() + { + if (EditorApplication.isCompiling) + { + return; + } + + EditorApplication.update -= GenerateAfterReloadScripts; + + // Generate HLSL from C#. Only targets WaveHarmonic.Crest assemblies. + await ShaderGeneratorUtility.GenerateAll(); + AssetDatabase.Refresh(); + } + + internal static void Generate() + { + if (EditorApplication.isCompiling) + { + return; + } + + // Could not ShaderGeneratorUtility.GenerateAll to work without recompiling… + CompilationPipeline.RequestScriptCompilation(); + } + + sealed class AssetPostProcessor : AssetPostprocessor + { + static async void OnPostprocessAllAssets(string[] imported, string[] deleted, string[] movedTo, string[] movedFrom, bool domainReload) + { + // Unused. + _ = deleted; _ = movedTo; _ = movedFrom; _ = domainReload; + + if (EditorApplication.isCompiling) + { + return; + } + + // Regenerate if file changed like re-importing. + if (imported.Contains("Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Settings.Crest.hlsl")) + { + // Generate HLSL from C#. Only targets WaveHarmonic.Crest assemblies. + await ShaderGeneratorUtility.GenerateAll(); + AssetDatabase.Refresh(); + } + } + } + } + + [GenerateHLSL(sourcePath = "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Settings.Crest")] + sealed class ShaderSettings + { + public static int s_CrestPortals = +#if d_CrestPortals + 1 +#else + 0 +#endif + ; + + public static int s_CrestShiftingOrigin = +#if d_WaveHarmonic_Crest_ShiftingOrigin + 1 +#else + 0 +#endif + ; + + public static int s_CrestShadowsBuiltInRenderPipeline = ProjectSettings.Instance.BuiltInRendererSampleShadowMaps ? 1 : 0; + public static int s_CrestFullPrecisionDisplacement = ProjectSettings.Instance.FullPrecisionDisplacementOnHalfPrecisionPlatforms ? 1 : 0; + } +} diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/ShaderSettings.cs.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/ShaderSettings.cs.meta new file mode 100644 index 000000000..0a31c4862 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/ShaderSettings.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 615f0aaf5e0444d73850b23c48e7fe01 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility.cs b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility.cs new file mode 100644 index 000000000..8ec865372 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility.cs @@ -0,0 +1,39 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using System.Linq; +using UnityEditor; +using UnityEngine; + +namespace WaveHarmonic.Crest.Editor +{ + static class Utility + { + static int s_LastCheckedForWater = -1; + static WaterRenderer s_Water; + public static WaterRenderer Water + { + get + { + if (s_LastCheckedForWater == Time.frameCount) + { + return s_Water; + } + + s_LastCheckedForWater = Time.frameCount; + + // Gets the water from the current stage. + return s_Water = UnityEditor.SceneManagement.StageUtility + .GetCurrentStageHandle() + .FindComponentsOfType() + .FirstOrDefault(); + } + } + + [InitializeOnEnterPlayMode] + static void OnEnterPlayMode() + { + s_LastCheckedForWater = -1; + } + } +} diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility.cs.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility.cs.meta new file mode 100644 index 000000000..e30841fb3 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c8451c0a25aa54024ab200d641ea2f0f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility.meta new file mode 100644 index 000000000..037f68c8d --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: dc4f7260556e24b6a87482a4cad878a9 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges.meta new file mode 100644 index 000000000..6126fc7bd --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1db68a6c1808a4d4d9099ac4c9f9812c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.RenderPipelines.Core.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.RenderPipelines.Core.meta new file mode 100644 index 000000000..49ed0ebd5 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.RenderPipelines.Core.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: abe8bdec24030408b8a545ae03e751f6 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.RenderPipelines.Core/Editor.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.RenderPipelines.Core/Editor.meta new file mode 100644 index 000000000..cd67e5a52 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.RenderPipelines.Core/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a8b444bc1fb43438aadcfff26a9342e3 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.RenderPipelines.Core/Editor/Assembly.cs b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.RenderPipelines.Core/Editor/Assembly.cs new file mode 100644 index 000000000..c56cf55c3 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.RenderPipelines.Core/Editor/Assembly.cs @@ -0,0 +1,7 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Editor")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Shared.Editor")] diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.RenderPipelines.Core/Editor/Assembly.cs.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.RenderPipelines.Core/Editor/Assembly.cs.meta new file mode 100644 index 000000000..9f0b1e422 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.RenderPipelines.Core/Editor/Assembly.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ebc89e55d7e224f58b73430f7f836895 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.RenderPipelines.Core/Editor/WaveHarmonic.Crest.Bridge.asmref b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.RenderPipelines.Core/Editor/WaveHarmonic.Crest.Bridge.asmref new file mode 100644 index 000000000..283920c77 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.RenderPipelines.Core/Editor/WaveHarmonic.Crest.Bridge.asmref @@ -0,0 +1,3 @@ +{ + "reference": "GUID:3eae0364be2026648bf74846acb8a731" +} \ No newline at end of file diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.RenderPipelines.Core/Editor/WaveHarmonic.Crest.Bridge.asmref.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.RenderPipelines.Core/Editor/WaveHarmonic.Crest.Bridge.asmref.meta new file mode 100644 index 000000000..a59e63bc4 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.RenderPipelines.Core/Editor/WaveHarmonic.Crest.Bridge.asmref.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5373b95f6a6234bd9acf598c2856b1c9 +AssemblyDefinitionReferenceImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.RenderPipelines.Universal.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.RenderPipelines.Universal.meta new file mode 100644 index 000000000..6a6b14fc4 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.RenderPipelines.Universal.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9efee046059b1440a932e76cb96a30d0 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.RenderPipelines.Universal/Editor.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.RenderPipelines.Universal/Editor.meta new file mode 100644 index 000000000..f992dcb42 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.RenderPipelines.Universal/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 645345341492f4e7daaf6a332bf6d944 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.RenderPipelines.Universal/Editor/Assembly.cs b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.RenderPipelines.Universal/Editor/Assembly.cs new file mode 100644 index 000000000..fe8ba8683 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.RenderPipelines.Universal/Editor/Assembly.cs @@ -0,0 +1,6 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Editor")] diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.RenderPipelines.Universal/Editor/Assembly.cs.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.RenderPipelines.Universal/Editor/Assembly.cs.meta new file mode 100644 index 000000000..a391eff4e --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.RenderPipelines.Universal/Editor/Assembly.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 89ed50bd0e0cc4e0593b1eb86b22e426 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.RenderPipelines.Universal/Editor/WaveHarmonic.Crest.Bridge.asmref b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.RenderPipelines.Universal/Editor/WaveHarmonic.Crest.Bridge.asmref new file mode 100644 index 000000000..583b71c76 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.RenderPipelines.Universal/Editor/WaveHarmonic.Crest.Bridge.asmref @@ -0,0 +1,3 @@ +{ + "reference": "GUID:c579267770062bf448e75eb160330b7f" +} \ No newline at end of file diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.RenderPipelines.Universal/Editor/WaveHarmonic.Crest.Bridge.asmref.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.RenderPipelines.Universal/Editor/WaveHarmonic.Crest.Bridge.asmref.meta new file mode 100644 index 000000000..6e5934532 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.RenderPipelines.Universal/Editor/WaveHarmonic.Crest.Bridge.asmref.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b4e50428db6234431b8ab6d9fe9af9ad +AssemblyDefinitionReferenceImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.ShaderGraph.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.ShaderGraph.meta new file mode 100644 index 000000000..d6ceb52bc --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.ShaderGraph.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ab8bbb10bd06a476aa3c33abddbdd42d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.ShaderGraph/Editor.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.ShaderGraph/Editor.meta new file mode 100644 index 000000000..0614699bc --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.ShaderGraph/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: abd60842ea94549cbbde56358927ae18 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.ShaderGraph/Editor/Assembly.cs b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.ShaderGraph/Editor/Assembly.cs new file mode 100644 index 000000000..491610c27 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.ShaderGraph/Editor/Assembly.cs @@ -0,0 +1,6 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Shared.Editor")] diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.ShaderGraph/Editor/Assembly.cs.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.ShaderGraph/Editor/Assembly.cs.meta new file mode 100644 index 000000000..8cc48e918 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.ShaderGraph/Editor/Assembly.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 88af6858f7fbe4851ae792f703289573 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.ShaderGraph/Editor/WaveHarmonic.Crest.Bridge.asmref b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.ShaderGraph/Editor/WaveHarmonic.Crest.Bridge.asmref new file mode 100644 index 000000000..6f5b7c273 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.ShaderGraph/Editor/WaveHarmonic.Crest.Bridge.asmref @@ -0,0 +1,3 @@ +{ + "reference": "GUID:be0903cd8e1546f498710afdc59db5eb" +} \ No newline at end of file diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.ShaderGraph/Editor/WaveHarmonic.Crest.Bridge.asmref.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.ShaderGraph/Editor/WaveHarmonic.Crest.Bridge.asmref.meta new file mode 100644 index 000000000..fe56a9547 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Bridges/Unity.ShaderGraph/Editor/WaveHarmonic.Crest.Bridge.asmref.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d1d2e8dc2707d4ea38f4e65cafa7ab83 +AssemblyDefinitionReferenceImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared.meta new file mode 100644 index 000000000..3af2f380b --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c2df0bac542844fa0a8e4ad57f8e16a0 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Assembly.cs b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Assembly.cs new file mode 100644 index 000000000..ec28d92b4 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Assembly.cs @@ -0,0 +1,24 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("WaveHarmonic.Crest")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Editor")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Samples")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Samples.Editor")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Samples.Examples")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.CPUQueries")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.CPUQueries.Editor")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Paint")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Paint.Editor")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.ShallowWater")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.ShallowWater.Editor")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.ShiftingOrigin")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.ShiftingOrigin.Editor")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Splines")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Splines.Editor")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Watercraft")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Watercraft.Editor")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Whirlpool")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Whirlpool.Editor")] diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Assembly.cs.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Assembly.cs.meta new file mode 100644 index 000000000..e09570f6b --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Assembly.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 959b22cf6debd4b5398062eb810543b2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes.meta new file mode 100644 index 000000000..cff2e9429 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 70a73c2fbd8a142b3956c49e19e17c31 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes/Attributes.cs b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes/Attributes.cs new file mode 100644 index 000000000..b86708537 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes/Attributes.cs @@ -0,0 +1,1052 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// Adapted from: +// https://forum.unity.com/threads/drawing-a-field-using-multiple-property-drawers.479377/ + +// DecoratedProperty renders the field and Decorator decorates said field. The decorator changes the +// GUI state so that the decorated field receives that state. The DecoratedDrawer targets DecoratedProperty, +// calls Decorator.Decorate for each decorator and reverts GUI state. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using UnityEditor; +using UnityEngine; +using UnityEditor.Rendering; +using WaveHarmonic.Crest.Attributes; +using WaveHarmonic.Crest.Editor; +using UnityEditor.SceneManagement; + +namespace WaveHarmonic.Crest.Attributes +{ + /// + /// Renders a property field accommodating decorator properties. + /// + [AttributeUsage(AttributeTargets.Field, AllowMultiple = false)] + abstract class DecoratedProperty : PropertyAttribute + { + /// + /// Override this method to customise the label. + /// + internal virtual GUIContent BuildLabel(GUIContent label) => label; + + /// + /// Override this method to make your own IMGUI based GUI for the property. + /// + internal abstract void OnGUI(Rect position, SerializedProperty property, GUIContent label, DecoratedDrawer drawer); + + /// + /// A new control rectangle is required. Only override as false if the attribute needs to create it itself. + /// See the embedded attribute as an example. + /// + internal virtual bool NeedsControlRectangle(SerializedProperty property) => true; + } + + /// + /// Decorates a decorator field by changing GUI state. + /// + [AttributeUsage(AttributeTargets.Field, AllowMultiple = true)] + abstract class Decorator : PropertyAttribute + { + public abstract bool AlwaysVisible { get; } + + /// + /// Override this method to customise the label. + /// + internal virtual GUIContent BuildLabel(GUIContent label) => label; + + /// + /// Override this method to additively change the appearance of a decorated field. + /// + internal virtual void Decorate(Rect position, SerializedProperty property, GUIContent label, DecoratedDrawer drawer) + { + + } + + internal virtual void DecorateAfter(Rect position, SerializedProperty property, GUIContent label, DecoratedDrawer drawer) + { + + } + } + + /// + /// An OnValidate replacement. + /// + [AttributeUsage(AttributeTargets.Field, AllowMultiple = true)] + abstract class Validator : PropertyAttribute + { + internal abstract void Validate(Rect position, SerializedProperty property, GUIContent label, DecoratedDrawer drawer, object previous); + } +} + +namespace WaveHarmonic.Crest +{ + /// + /// Renders the property using EditorGUI.PropertyField. + /// + sealed class DecoratedField : DecoratedProperty + { + public readonly bool _CustomFoldout; + + public DecoratedField(bool isCustomFoldout = false) + { + _CustomFoldout = isCustomFoldout; + } + + internal override void OnGUI(Rect position, SerializedProperty property, GUIContent label, DecoratedDrawer drawer) + { + var isCustomFoldout = _CustomFoldout && (property.propertyType == SerializedPropertyType.Generic || property.propertyType == SerializedPropertyType.ManagedReference); + + if (isCustomFoldout) + { + // Draw top border. + var rect = position; + rect.xMin = 0; + rect.xMax = 100000; + rect.height = 1; + EditorGUI.DrawRect(rect, new(0.1f, 0.1f, 0.1f, 1f)); + + // Draw background. + var background = position; + background.xMin = 0; + background.xMax = 100000; + background.yMin += 1; + background.yMax = background.yMin + EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing * 2; + EditorGUI.DrawRect(background, new(0.1f, 0.1f, 0.1f, 0.2f)); + + position.yMin += EditorGUIUtility.standardVerticalSpacing + 1; + position.yMax -= EditorGUIUtility.standardVerticalSpacing + 1; + } + + // FIXME: InvalidOperationException: Stack empty. + // System.Collections.Generic.Stack`1[T].Pop()(at:0) + EditorGUI.PropertyField(position, property, label, true); + + if (isCustomFoldout) + { + var background = position; + background.xMin = 0; + background.xMax = 100000; + background.yMin += EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing; + background.yMax = background.yMin + 1; + EditorGUI.DrawRect(background, property.isExpanded ? new(0.1f, 0.1f, 0.1f, 0.5f) : new(0.1f, 0.1f, 0.1f, 1f)); + EditorGUILayout.Space(1); + + if (property.isExpanded) + { + EditorGUILayout.Space(EditorGUIUtility.standardVerticalSpacing * 3); + } + } + } + } + + /// + /// Renders foldout without the foldout. + /// + sealed class Stripped : DecoratedProperty + { + internal override bool NeedsControlRectangle(SerializedProperty property) => false; + + internal override void OnGUI(Rect position, SerializedProperty property, GUIContent label, DecoratedDrawer drawer) + { + property.isExpanded = true; + DecoratedDrawer.s_TemporaryColor = true; + DecoratedDrawer.s_PreviousColor = GUI.color; + + GUI.color = new(0, 0, 0, 0); + + EditorGUI.indentLevel -= 1; + EditorGUI.PropertyField(position, property, label, true); + EditorGUI.indentLevel += 1; + } + } + + /// + /// Renders the property using EditorGUI.Delayed*. + /// + sealed class Delayed : DecoratedProperty + { + internal override void OnGUI(Rect position, SerializedProperty property, GUIContent label, DecoratedDrawer drawer) + { + switch (property.propertyType) + { + case SerializedPropertyType.Float: + EditorGUI.DelayedFloatField(position, property, label); + break; + case SerializedPropertyType.Integer: + EditorGUI.DelayedIntField(position, property, label); + break; + case SerializedPropertyType.String: + EditorGUI.DelayedTextField(position, property, label); + break; + default: + EditorGUI.LabelField(position, label.text, "Delayed: must be float, integer, or string."); + break; + } + } + } + + sealed class Group : Decorator + { + public enum Style + { + None, + Foldout, + Accordian, + } + + readonly GUIContent _Title; + readonly bool _IsEnd; + readonly bool _CustomFoldout; + + string _IsExpandedKey; + + public static bool s_Foldout = false; + + public override bool AlwaysVisible => true; + + readonly Style _Style; + + /// + /// Begins (and subsequently ends) a group of fields. They can be ordered and styled. + /// + /// Title of the group. + /// The appearance of the group. + /// Pass "true" if this field is an object which would normally be a foldout but you want accordian styling. Also set this value on the DecoratedField attribute. Other parameters are ignored with this set. + public Group(string title = null, Style style = Style.Foldout, bool isCustomFoldout = false) + { + _IsEnd = title == null || style == Style.None; + _Title = _IsEnd ? null : new(title); + _CustomFoldout = isCustomFoldout; + _Style = _IsEnd ? Style.None : style; + } + + internal override void Decorate(Rect position, SerializedProperty property, GUIContent label, DecoratedDrawer drawer) + { + if (DecoratedDrawer.s_IsFoldoutOpen) + { + --EditorGUI.indentLevel; + + if (!_IsEnd || _CustomFoldout) + { + EditorGUILayout.GetControlRect(false, EditorGUIUtility.standardVerticalSpacing * 3); + } + } + else if (_Style == Style.Accordian || _CustomFoldout) + { + // HACK: Otherwise anything groups following an embedded will be indented. + EditorGUI.indentLevel = 0; + } + + DecoratedDrawer.s_IsFoldout = DecoratedDrawer.s_IsFoldoutOpen = false; + + if (_CustomFoldout) + { + return; + } + + if (_IsEnd) + { + EditorGUILayout.GetControlRect(false, EditorGUIUtility.standardVerticalSpacing * 3); + return; + } + + DecoratedDrawer.s_IsFoldout = true; + + Rect rect; + Rect background; + + if (_Style == Style.Accordian) + { + // Draw top border. + rect = EditorGUILayout.GetControlRect(GUILayout.Height(1)); + rect.xMin = 0; + rect.xMax = 100000; + rect.height = 1; + EditorGUI.DrawRect(rect, new(0.1f, 0.1f, 0.1f, 1f)); + + rect = EditorGUILayout.GetControlRect(true); + + // Draw background. + background = rect; + background.xMin = 0; + background.xMax = 100000; + background.yMin -= 2; + background.yMax += 2; + EditorGUI.DrawRect(background, new(0.1f, 0.1f, 0.1f, 0.2f)); + } + else + { + rect = EditorGUILayout.GetControlRect(); + background = new Rect(); + } + + // Cannot use "property.isExpanded" as this will be used by nested built-in foldouts. + _IsExpandedKey ??= $"{property.serializedObject.targetObject.GetType().FullName}.{property.propertyPath}"; + var isExpanded = SessionState.GetBool(_IsExpandedKey, false); + + isExpanded = EditorGUI.Foldout(rect, isExpanded, _Title, toggleOnLabelClick: true); + DecoratedDrawer.s_IsFoldoutOpen = isExpanded; + + SessionState.SetBool(_IsExpandedKey, isExpanded); + + if (_Style != Style.Accordian) + { + EditorGUI.indentLevel++; + return; + } + + if (isExpanded) + { + // Draw bottom border (lighter when open). + rect = EditorGUILayout.GetControlRect(GUILayout.Height(1)); + rect.xMin = 0; + rect.xMax = 100000; + rect.height = 1; + EditorGUI.DrawRect(rect, new(0.1f, 0.1f, 0.1f, 0.5f)); + + ++EditorGUI.indentLevel; + + EditorGUILayout.GetControlRect(false, EditorGUIUtility.standardVerticalSpacing * 2); + } + else + { + // Draw bottom border. This will have same position as top border for next foldout. + background.yMax += 1; + background.yMin = background.yMax - 1; + EditorGUI.DrawRect(background, new(0.1f, 0.1f, 0.1f, 1f)); + } + } + } + + sealed class Stepped : DecoratedProperty + { + readonly int _Minimum; + readonly int _Maximum; + readonly int _Step; + readonly bool _Power; + + public Stepped(int minimum, int maximum, int step = 1, bool power = false) + { + _Minimum = minimum; + _Maximum = maximum; + _Step = step; + _Power = power; + } + + internal override void OnGUI(Rect position, SerializedProperty property, GUIContent label, DecoratedDrawer drawer) + { + if (property.propertyType == SerializedPropertyType.Integer) + { + property.intValue = EditorGUI.IntSlider(position, label, property.intValue, _Minimum, _Maximum); + property.intValue = _Power + ? Mathf.ClosestPowerOfTwo(property.intValue) + : property.intValue / _Step * _Step; + property.intValue = property.intValue; + } + else + { + EditorGUI.LabelField(position, label.text, "Use Stepped with int."); + } + } + } + + sealed class Minimum : Attributes.Validator + { + readonly float _Minimum; + + public Minimum(float minimum) + { + _Minimum = minimum; + } + + internal override void Validate(Rect position, SerializedProperty property, GUIContent label, DecoratedDrawer drawer, object previous) + { + switch (property.propertyType) + { + case SerializedPropertyType.Float: + property.floatValue = Mathf.Max(_Minimum, property.floatValue); + break; + case SerializedPropertyType.Integer: + property.floatValue = Mathf.Max((int)_Minimum, property.intValue); + break; + case SerializedPropertyType.Vector2: + var vector2Value = property.vector2Value; + vector2Value.x = Mathf.Max(_Minimum, vector2Value.x); + vector2Value.y = Mathf.Max(_Minimum, vector2Value.y); + property.vector2Value = vector2Value; + break; + case SerializedPropertyType.Vector2Int: + var vector2IntValue = property.vector2IntValue; + vector2IntValue.x = Mathf.Max((int)_Minimum, vector2IntValue.x); + vector2IntValue.y = Mathf.Max((int)_Minimum, vector2IntValue.y); + property.vector2Value = vector2IntValue; + break; + default: + EditorGUI.LabelField(position, label.text, "Minimum: must be float, integer, or string."); + break; + } + } + } + + sealed class Maximum : Attributes.Validator + { + readonly float _Maximum; + + public Maximum(float maximum) + { + _Maximum = maximum; + } + + internal override void Validate(Rect position, SerializedProperty property, GUIContent label, DecoratedDrawer drawer, object previous) + { + switch (property.propertyType) + { + case SerializedPropertyType.Float: + property.floatValue = Mathf.Min(_Maximum, property.floatValue); + break; + case SerializedPropertyType.Integer: + property.intValue = Mathf.Min((int)_Maximum, property.intValue); + break; + case SerializedPropertyType.Vector2: + var vector2Value = property.vector2Value; + vector2Value.x = Mathf.Min(_Maximum, vector2Value.x); + vector2Value.y = Mathf.Min(_Maximum, vector2Value.y); + property.vector2Value = vector2Value; + break; + case SerializedPropertyType.Vector2Int: + var vector2IntValue = property.vector2IntValue; + vector2IntValue.x = Mathf.Min((int)_Maximum, vector2IntValue.x); + vector2IntValue.y = Mathf.Min((int)_Maximum, vector2IntValue.y); + property.vector2IntValue = vector2IntValue; + break; + default: + EditorGUI.LabelField(position, label.text, "Maximum: must be float, integer, or string."); + break; + } + } + } + + /// + /// Renders the property using EditorGUI.Slider. + /// + sealed class Range : DecoratedProperty + { + readonly float _Minimum; + readonly float _Maximum; + readonly float _PowerScale; + readonly int _Step; + readonly bool _Power; + readonly bool _Delayed; + readonly Clamp _Clamp; + + [Flags] + public enum Clamp + { + None = 0, + Minimum = 1, + Maximum = 2, + Both = Minimum | Maximum, + } + + public Range(float minimum, float maximum, Clamp clamp = Clamp.Both, float scale = 1f, bool delayed = false, int step = 0, bool power = false) + { + _Minimum = minimum; + _Maximum = maximum; + _Step = step; + _Power = power; + _PowerScale = scale; + _Clamp = clamp; + _Delayed = delayed; + } + + static readonly FieldInfo s_RecycledEditor = typeof(EditorGUI).GetField("s_RecycledEditor", BindingFlags.NonPublic | BindingFlags.Static); + static readonly MethodInfo s_DoFloatField = typeof(EditorGUI).GetMethod("DoFloatField", BindingFlags.NonPublic | BindingFlags.Static, null, new Type[] { Assembly.GetAssembly(typeof(EditorGUI)).GetType("UnityEditor.EditorGUI+RecycledTextEditor"), typeof(Rect), typeof(Rect), typeof(int), typeof(float), typeof(string), typeof(GUIStyle), typeof(bool), typeof(float) }, null); + static readonly object[] s_Arguments = new object[] { null, null, null, null, null, "g7", null, true, null }; + + // For label dragging. + float FloatField(Rect position, Rect dragHotZone, float value, float minimum, float maximum) + { + s_Arguments[0] = s_RecycledEditor.GetValue(null); + s_Arguments[1] = position; + s_Arguments[2] = dragHotZone; + s_Arguments[3] = GUIUtility.GetControlID("EditorTextField".GetHashCode(), FocusType.Keyboard, position); + s_Arguments[4] = value; + s_Arguments[6] = EditorStyles.numberField; + s_Arguments[8] = Math.Abs(maximum - minimum) / 100f * 0.03f; + return (float)s_DoFloatField.Invoke(null, s_Arguments); + } + + static MethodInfo s_PowerSliderMethod; + + internal static void PowerSlider(Rect position, SerializedProperty property, float minimum, float maximum, float power, GUIContent label) + { + if (s_PowerSliderMethod == null) + { + // Grab the internal PowerSlider method. + s_PowerSliderMethod = typeof(EditorGUI).GetMethod + ( + name: "PowerSlider", + bindingAttr: BindingFlags.NonPublic | BindingFlags.Static, + binder: null, + types: new[] { typeof(Rect), typeof(GUIContent), typeof(float), typeof(float), typeof(float), typeof(float) }, + modifiers: null + ); + } + + // Render slider and apply value to SerializedProperty. + label = EditorGUI.BeginProperty(position, label, property); + EditorGUI.BeginChangeCheck(); + var newValue = (float)s_PowerSliderMethod.Invoke(null, new object[] { position, label, property.floatValue, minimum, maximum, power }); + if (EditorGUI.EndChangeCheck()) + { + property.floatValue = newValue; + } + EditorGUI.EndProperty(); + } + + internal override void OnGUI(Rect position, SerializedProperty property, GUIContent label, DecoratedDrawer drawer) + { + var isVector = property.propertyType is SerializedPropertyType.Vector2 or SerializedPropertyType.Vector2Int; + var isInteger = property.propertyType is SerializedPropertyType.Integer or SerializedPropertyType.Vector2Int; + + if (property.propertyType != SerializedPropertyType.Float && !isVector && !isInteger) + { + EditorGUI.LabelField(position, label.text, "Range: must be float, integer, or vector2."); + } + + // Power provided so use PowerSlider. + if (_PowerScale != 1f) + { + if (property.propertyType != SerializedPropertyType.Float) + { + // We could fallback to Slider, but better to raise an issue. + EditorGUI.LabelField(position, label.text, "Range: must be float if power is provided."); + return; + } + + PowerSlider(position, property, _Minimum, _Maximum, _PowerScale, label); + return; + } + + label = EditorGUI.BeginProperty(position, label, property); + + var dragHotZone = position; + position = EditorGUI.PrefixLabel(position, label); + dragHotZone.xMax = position.xMin; + + // Otherwise fields will have indentation. + var indent = EditorGUI.indentLevel; + EditorGUI.indentLevel = 0; + + if (isVector) + { + var range = isInteger ? property.vector2IntValue : property.vector2Value; + + var xMax = position.xMax; + position.width = EditorGUIUtility.fieldWidth; + + range.x = _Delayed + ? EditorGUI.DelayedFloatField(position, range.x) + : EditorGUI.FloatField(position, range.x); + range.x = Mathf.Min(range.x, range.y); + + position.xMin = position.xMax + 6f; + position.xMax = xMax - (EditorGUIUtility.fieldWidth + 6f); + position.width = Mathf.Max(position.width, 19f); + + EditorGUI.MinMaxSlider(position, ref range.x, ref range.y, _Minimum, _Maximum); + + position.xMin = position.xMax + 5f; + position.width = EditorGUIUtility.fieldWidth; + + range.y = _Delayed + ? EditorGUI.DelayedFloatField(position, range.y) + : EditorGUI.FloatField(position, range.y); + range.y = Mathf.Max(range.x, range.y); + + if (_Clamp.HasFlag(Clamp.Minimum)) range.x = Mathf.Max(range.x, _Minimum); + if (_Clamp.HasFlag(Clamp.Maximum)) range.y = Mathf.Min(range.y, _Maximum); + + if (isInteger) property.vector2IntValue = Vector2Int.RoundToInt(range); + else property.vector2Value = range; + } + else + { + var range = isInteger ? property.intValue : property.floatValue; + + using (var check = new EditorGUI.ChangeCheckScope()) + { + position.xMax -= EditorGUIUtility.fieldWidth + 6f; + position.width = Mathf.Max(position.width, 19f); + + // If we go outside of the range then the thumb control will disappear. + var clamped = Mathf.Clamp(range, _Minimum, _Maximum); + clamped = GUI.HorizontalSlider(position, clamped, _Minimum, _Maximum); + if (check.changed) range = clamped; + } + + position.xMin = position.xMax + 5f; + position.width = EditorGUIUtility.fieldWidth; + + // There does not seem to be a functional difference with using integer vs float + // fields since we handle rounding ourselves. + range = _Delayed + ? EditorGUI.DelayedFloatField(position, range) +#if UNITY_6000_0_OR_NEWER + : EditorGUI.FloatField(position, range); +#else + : FloatField(position, dragHotZone, range, _Minimum, _Maximum); +#endif + + if (_Step > 0) + { + var integer = Mathf.RoundToInt(range); + range = _Power ? Mathf.ClosestPowerOfTwo(integer) : integer / _Step * _Step; + } + + if (_Clamp.HasFlag(Clamp.Minimum)) range = Mathf.Max(range, _Minimum); + if (_Clamp.HasFlag(Clamp.Maximum)) range = Mathf.Min(range, _Maximum); + + if (isInteger) property.intValue = Mathf.RoundToInt(range); + else property.floatValue = range; + } + + EditorGUI.indentLevel = indent; + EditorGUI.EndProperty(); + } + } + + /// + /// Allows an enum to render only a subset of options in subclasses. + /// + sealed class Filtered : DecoratedProperty + { + public enum Mode + { + Include, + Exclude, + } + + bool _Initialized; + + readonly bool _HasUnset = false; + readonly int _Unset = -1; + + bool _Invalid; + readonly List _InvalidValues = new(); + + public Filtered() + { + } + + public Filtered(int unset) + { + _Unset = unset; + _HasUnset = true; + } + + GUIContent[] _Labels; + int[] _Values; + bool _UnsetHidden = false; + + readonly GUIContent _InvalidLabel = new("Invalid"); + + internal override void OnGUI(Rect position, SerializedProperty property, GUIContent label, DecoratedDrawer drawer) + { + if (property.propertyType != SerializedPropertyType.Enum) + { + EditorGUI.LabelField(position, label.text, "Filtered: must be an enum."); + return; + } + + var attributes = property + .GetDefiningBoxedObject() + .GetType() + .GetCustomAttributes(true) + .Where(x => x._Property == property.name); + + if (attributes.Count() == 0) + { + EditorGUI.PropertyField(position, property, label); + return; + } + + Debug.AssertFormat(attributes.Count() == 1, "Crest: {0}.{1} has a subclass with too many DynamicEnumFilters", + drawer.fieldInfo.FieldType, property.name); + + var attribute = attributes.First(); + var rebuild = false; + rebuild |= !_Initialized; + rebuild |= _HasUnset && _UnsetHidden != (property.intValue != _Unset); + rebuild |= _Invalid != _InvalidValues.Contains(property.intValue); + + if (rebuild) + { + var labels = Enum.GetNames(drawer.fieldInfo.FieldType).Select(x => new GUIContent(x)).ToList(); + var values = ((int[])Enum.GetValues(drawer.fieldInfo.FieldType)).ToList(); + + _Invalid = false; + _UnsetHidden = false; + + // Filter enum entries. + for (var i = 0; i < labels.Count; i++) + { + // If this enum has an "unset" value, and "unset" is not the current value, filter it out. + if (_HasUnset && values[i] == _Unset && property.intValue != _Unset) + { + labels.RemoveAt(i); + values.RemoveAt(i); + i--; + _UnsetHidden = true; + continue; + } + + if (attribute._Mode == Mode.Exclude && attribute._Values.Contains(values[i]) || + attribute._Mode == Mode.Include && !attribute._Values.Contains(values[i])) + { + if (!_Initialized) + { + _InvalidValues.Add(values[i]); + } + + if (property.intValue == values[i]) + { + _Invalid = true; + labels[i] = _InvalidLabel; + } + else + { + labels.RemoveAt(i); + values.RemoveAt(i); + i--; + } + } + } + + _Labels = labels.ToArray(); + _Values = values.ToArray(); + _Initialized = true; + } + + property.intValue = EditorGUI.IntPopup(position, label, property.intValue, _Labels, _Values); + } + } + + /// + /// Marks which enum options this subclass wants to use. Companion to Filtered. + /// Usage: [FilterEnum("_mode", Filtered.Mode.Include, (int)Mode.One, (int)Mode.Two)] + /// + [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)] + sealed class FilterEnum : Attribute + { + public string _Property; + public Filtered.Mode _Mode; + internal int[] _Values; + + public FilterEnum(string property, Filtered.Mode mode, params int[] values) + { + _Mode = mode; + _Values = values; + _Property = property; + } + } + + sealed class ShowComputedProperty : Decorator + { + readonly string _PropertyName; + PropertyInfo _PropertyInfo; + object _Target; + Array _EnumValues; + + public override bool AlwaysVisible => true; + + public ShowComputedProperty(string name) + { + _PropertyName = name; + } + + internal override void DecorateAfter(Rect position, SerializedProperty property, GUIContent label, DecoratedDrawer drawer) + { + if (!DecoratedDrawer.s_HideInInspector) + { + return; + } + + // Do not execute for now as some components are not active in prefab stage. + if (PrefabStageUtility.GetCurrentPrefabStage() != null) + { + return; + } + + _Target ??= property.GetDefiningBoxedObject(); + _PropertyInfo ??= _Target.GetType().GetProperty(_PropertyName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static); + + EditorGUI.BeginDisabledGroup(true); + + // Have to do this manually as PropertyField requires changing the property value + // but will mess with OnChange check. + switch (property.propertyType) + { + case SerializedPropertyType.Float: + EditorGUILayout.FloatField(label, (float)_PropertyInfo.GetValue(_Target)); + break; + case SerializedPropertyType.Enum: + _EnumValues ??= Enum.GetValues(_PropertyInfo.PropertyType); + EditorGUILayout.Popup(label, Array.IndexOf(_EnumValues, _PropertyInfo.GetValue(_Target)), property.enumDisplayNames); + break; + } + + EditorGUI.EndDisabledGroup(); + } + } + + /// + /// Manually provide a label (ie rename) for fields. + /// + sealed class Label : Decorator + { + + readonly string _Label; + + public override bool AlwaysVisible => false; + + public Label(string label) + { + _Label = label; + } + + internal override GUIContent BuildLabel(GUIContent label) + { + label = base.BuildLabel(label); + label.text = _Label; + return label; + } + + internal override void Decorate(Rect position, SerializedProperty property, GUIContent label, DecoratedDrawer drawer) + { + // Empty + } + } + + /// + /// Drop-in replacement for Header. Use when hiding property with Predicated. + /// + sealed class Heading : Decorator + { + readonly GUIContent _Text; + readonly string _HelpLink; + readonly Style _Style; + readonly bool _AlwaysVisible; + readonly bool _AlwaysEnabled; + + public enum Style + { + Normal, + Settings + } + + public Heading(string heading, Style style = Style.Normal, bool alwaysVisible = false, bool alwaysEnabled = false, string helpLink = null) + { + _Text = EditorGUIUtility.TrTextContent(heading); + _HelpLink = helpLink; + _Style = style; + _AlwaysVisible = alwaysVisible; + _AlwaysEnabled = alwaysEnabled; + } + + public override bool AlwaysVisible => _AlwaysVisible || _Style == Style.Settings; + + internal override void Decorate(Rect position, SerializedProperty property, GUIContent label, DecoratedDrawer drawer) + { + var enabled = GUI.enabled; + if (_AlwaysEnabled) GUI.enabled = true; + + switch (_Style) + { + case Style.Normal: + // Register margin with IMGUI so subsequent spacing is correct. + EditorGUILayout.GetControlRect(false, EditorGUIUtility.singleLineHeight * 0.5f); + GUI.Label(EditorGUI.IndentedRect(EditorGUILayout.GetControlRect(true)), _Text, EditorStyles.boldLabel); + break; + case Style.Settings: + // Draws the section header found in SRP global settings files. + CoreEditorUtils.DrawSectionHeader(_Text, _HelpLink); + break; + } + + GUI.enabled = enabled; + } + } + + /// + /// Drop-in replacement for Space but supports our Decorator system. + /// + sealed class Space : Decorator + { + readonly float _Height; + readonly bool _AlwaysVisible; + + public Space(float height, bool isAlwaysVisible = false) + { + _Height = height; + _AlwaysVisible = isAlwaysVisible; + } + + public override bool AlwaysVisible => _AlwaysVisible; + + internal override void Decorate(Rect position, SerializedProperty property, GUIContent label, DecoratedDrawer drawer) + { + EditorGUILayout.GetControlRect(false, _Height); + } + } + + sealed class PrefabField : DecoratedProperty + { + readonly EditorHelpers.CreateInstance _CreateInstance; + readonly string _Title; + readonly string _DefaultName; + + public PrefabField(string title, string name) + { + _CreateInstance = x => x.serializedObject.GetDefaultReference(x.name); + _DefaultName = name; + _Title = title; + } + + internal override void OnGUI(Rect position, SerializedProperty property, GUIContent label, DecoratedDrawer drawer) + { + EditorHelpers.AssetField + ( + typeof(GameObject), + label, + property, + position, + _Title, + _DefaultName, + "prefab", + string.Empty, + _CreateInstance + ); + } + } + + sealed class MaterialField : DecoratedProperty + { + readonly EditorHelpers.CreateInstance _CreateInstance; + readonly string _Title; + readonly string _DefaultName; + readonly string _MaterialVariantPropertyName; + + public MaterialField(string shader, string title = "Create Material", string name = "Material", string parent = null) + { + _CreateInstance = x => new Material(Shader.Find(shader)); + _DefaultName = name; + _Title = title; + _MaterialVariantPropertyName = parent; + } + + internal override void OnGUI(Rect position, SerializedProperty property, GUIContent label, DecoratedDrawer drawer) + { + var old = property.objectReferenceValue; + + EditorHelpers.AssetField + ( + typeof(Material), + label, + property, + position, + _Title, + _DefaultName, + "mat", + string.Empty, + _CreateInstance + ); + + // If we just created the material then parent. + if (old != property.objectReferenceValue && _MaterialVariantPropertyName != null && property.objectReferenceValue != null) + { + var parent = (Material)property.serializedObject.FindProperty(_MaterialVariantPropertyName).objectReferenceValue; + if (parent == null) return; + var child = (Material)property.objectReferenceValue; + child.parent = parent; + // After parenting it will have overrides. + child.RevertAllPropertyOverrides(); + } + } + } + + sealed class AttachMaterialEditor : Decorator + { + public override bool AlwaysVisible => true; + + internal override void Decorate(Rect position, SerializedProperty property, GUIContent label, DecoratedDrawer drawer) + { + Inspector.Current._Materials.Add((Material)property.objectReferenceValue); + } + } + + sealed class Disabled : Decorator + { + public override bool AlwaysVisible => false; + + internal override void Decorate(Rect position, SerializedProperty property, GUIContent label, DecoratedDrawer drawer) + { + GUI.enabled = false; + } + } + + sealed class WarnIfAbove : Attributes.Validator + { + readonly float _Maximum; + + public WarnIfAbove(float maximum) + { + _Maximum = maximum; + } + + internal override void Validate(Rect position, SerializedProperty property, GUIContent label, DecoratedDrawer drawer, object previous) + { + var warn = false; + + if (previous == property.boxedValue) + { + return; + } + + switch (property.propertyType) + { + case SerializedPropertyType.Float: + var newValue = property.floatValue; + var oldValue = (float)previous; + warn = newValue > _Maximum && newValue > oldValue && oldValue <= _Maximum; + break; + case SerializedPropertyType.Integer: + warn = property.intValue > _Maximum && property.intValue > (int)previous; + break; + default: + EditorGUI.LabelField(position, label.text, "Maximum: must be float or integer."); + break; + } + + if (warn) + { + var revert = EditorUtility.DisplayDialog + ( + "Warning!", + $"The entered value ({property.boxedValue}) is about to exceed the recommended maximum ({_Maximum}). " + + "A value this large could potentially freeze or even crash your computer.", + "Revert", + "Continue" + ); + + if (revert) + { + property.boxedValue = previous; + } + } + } + } +} diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes/Attributes.cs.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes/Attributes.cs.meta new file mode 100644 index 000000000..4aafefacd --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes/Attributes.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d4feed62e65f34662aea25208d1ce0bf +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes/Embedded.cs b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes/Embedded.cs new file mode 100644 index 000000000..67a45c596 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes/Embedded.cs @@ -0,0 +1,29 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEditor; +using UnityEngine; +using WaveHarmonic.Crest.Attributes; +using WaveHarmonic.Crest.Editor; + +namespace WaveHarmonic.Crest +{ + sealed class Embedded : DecoratedProperty + { + internal EmbeddedAssetEditor _Editor; + readonly int _BottomMargin; + + public Embedded(int margin = 0) + { + _Editor = new(); + _BottomMargin = margin; + } + + internal override void OnGUI(Rect position, SerializedProperty property, GUIContent label, DecoratedDrawer drawer) + { + _Editor.DrawEditorCombo(label, drawer, property, "asset", _BottomMargin); + } + + internal override bool NeedsControlRectangle(SerializedProperty property) => false; + } +} diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes/Embedded.cs.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes/Embedded.cs.meta new file mode 100644 index 000000000..b9ca7c6ce --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes/Embedded.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c024c6def66044f1cb4783f23a050bec +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes/HelpBox.cs b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes/HelpBox.cs new file mode 100644 index 000000000..c4c92f585 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes/HelpBox.cs @@ -0,0 +1,72 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEditor; +using UnityEngine; +using WaveHarmonic.Crest.Attributes; +using WaveHarmonic.Crest.Editor; + +namespace WaveHarmonic.Crest +{ + sealed class HelpBox : Decorator + { + // Define our own as Unity's won't be available in builds. + public enum MessageType + { + Info, + Warning, + Error, + } + + public string _Message; + public MessageType _MessageType; + public Visibility _Visibility; + + public enum Visibility + { + Always, + PropertyEnabled, + PropertyDisabled, + } + + readonly GUIContent _GuiContent; + + public override bool AlwaysVisible => false; + + public HelpBox(string message, MessageType messageType = MessageType.Info, Visibility visibility = Visibility.Always) + { + _Message = message; + _MessageType = messageType; + _Visibility = visibility; + _GuiContent = new(message); + } + + internal override void Decorate(Rect position, SerializedProperty property, GUIContent label, DecoratedDrawer drawer) + { + if (_Visibility == Visibility.PropertyEnabled && !GUI.enabled || _Visibility == Visibility.PropertyDisabled && GUI.enabled) + { + return; + } + + // Enable rich text in help boxes. Store original so we can revert since this might be a "hack". + var style = GUI.skin.GetStyle("HelpBox"); + var styleRichText = style.richText; + style.richText = true; + + var height = style.CalcHeight(_GuiContent, EditorGUIUtility.currentViewWidth); + if (height <= EditorGUIUtility.singleLineHeight) + { + // This gets internal layout of the help box right but breaks down if multiline. + height += style.padding.horizontal + style.lineHeight; + } + + // Always get a new control rect so we don't have to deal with positions and offsets. + position = EditorGUILayout.GetControlRect(true, height, style); + // + 1 maps our MessageType to Unity's. + EditorGUI.HelpBox(position, _Message, (UnityEditor.MessageType)_MessageType + 1); + + // Revert skin since it persists. + style.richText = styleRichText; + } + } +} diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes/HelpBox.cs.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes/HelpBox.cs.meta new file mode 100644 index 000000000..f67a6aa7d --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes/HelpBox.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 49c68d73fb5ce4690a444ab84a0abc8e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes/HelpURL.cs b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes/HelpURL.cs new file mode 100644 index 000000000..74553cd3c --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes/HelpURL.cs @@ -0,0 +1,25 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using System; +using UnityEngine; + +namespace WaveHarmonic.Crest +{ + /// + /// Constructs a custom link to Crest's documentation for the help URL button. + /// + [AttributeUsage(AttributeTargets.Class | AttributeTargets.Enum, AllowMultiple = false)] + sealed class HelpURL : HelpURLAttribute + { + public HelpURL(string path = "") : base(GetPageLink(path)) + { + // Blank. + } + + public static string GetPageLink(string path) + { + return "https://docs.crest.waveharmonic.com/" + path; + } + } +} diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes/HelpURL.cs.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes/HelpURL.cs.meta new file mode 100644 index 000000000..c5f51c368 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes/HelpURL.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f113b211b4a014cf19cf7828018f49d0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes/Layer.cs b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes/Layer.cs new file mode 100644 index 000000000..26601c70b --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes/Layer.cs @@ -0,0 +1,18 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEditor; +using UnityEngine; +using WaveHarmonic.Crest.Attributes; +using WaveHarmonic.Crest.Editor; + +namespace WaveHarmonic.Crest +{ + sealed class Layer : DecoratedProperty + { + internal override void OnGUI(Rect position, SerializedProperty property, GUIContent label, DecoratedDrawer drawer) + { + property.intValue = EditorGUI.LayerField(position, label, property.intValue); + } + } +} diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes/Layer.cs.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes/Layer.cs.meta new file mode 100644 index 000000000..9a9c6e5bc --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes/Layer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a25b1272591fc4fd6a34265f20064746 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes/OnChange.cs b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes/OnChange.cs new file mode 100644 index 000000000..9dbc79024 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes/OnChange.cs @@ -0,0 +1,33 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using System; + +namespace WaveHarmonic.Crest +{ + [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = true)] + sealed class OnChange : Attribute + { + public Type Type { get; } + public bool SkipIfInactive { get; } + + /// + /// Register an instance method as an OnChange handler. + /// + public OnChange(bool skipIfInactive = true) + { + SkipIfInactive = skipIfInactive; + } + + /// + /// Register a static method as an OnChange handler. + /// + /// The type to target. + /// Skip this handler if component is inactive. + public OnChange(Type type, bool skipIfInactive = true) + { + Type = type; + SkipIfInactive = skipIfInactive; + } + } +} diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes/OnChange.cs.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes/OnChange.cs.meta new file mode 100644 index 000000000..556d02e4e --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes/OnChange.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 75d2e7be9abf446048de686f69cb485c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes/Predicated.cs b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes/Predicated.cs new file mode 100644 index 000000000..c3ffae915 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes/Predicated.cs @@ -0,0 +1,213 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using System; +using System.Reflection; +using UnityEditor; +using UnityEngine; +using WaveHarmonic.Crest.Attributes; +using WaveHarmonic.Crest.Editor; + +namespace WaveHarmonic.Crest +{ + sealed class Predicated : Decorator + { + enum Mode + { + Property, + Member, + Type, + RenderPipeline, + } + + readonly Mode _Mode; + + readonly bool _Inverted; + readonly bool _Hide; + + readonly string _PropertyName; + readonly object _DisableValue; + + readonly Type _Type; + readonly MemberInfo _Member; + + readonly RenderPipeline _RenderPipeline; + + /// + /// The field with this attribute will be drawn enabled/disabled based on return of method. + /// + /// The type to call the method on. Must be either a static type or the type the field is defined on. + /// Member name. Method must match signature: bool MethodName(Component component). Can be any visibility and static or instance. + /// + /// Flip behaviour - for example disable if a bool field is set to true (instead of false). + /// Hide this component in the inspector. + public Predicated(Type type, string member, object disableValue, bool inverted = false, bool hide = false) + { + _Mode = Mode.Member; + _Inverted = inverted; + _Hide = hide; + _Type = type; + _DisableValue = disableValue; + _Member = _Type.GetMember(member, Helpers.s_AnyMethod)[0]; + } + + /// + /// Enable/Disable field depending on the current type of the component. + /// + /// If a component of this type is not attached to this GameObject, disable the GUI (or enable if inverted is true). + /// Flip behaviour - for example disable if a bool field is set to true (instead of false). + /// Hide this component in the inspector. + public Predicated(Type type, bool inverted = false, bool hide = false) + { + _Mode = Mode.Type; + _Inverted = inverted; + _Hide = hide; + _Type = type; + } + + /// + /// The field with this attribute will be drawn enabled/disabled based on another field. For example can be used + /// to disable a field if a toggle is false. + /// + /// The name of the other property whose value dictates whether this field is enabled or not. + /// Flip behaviour - for example disable if a bool field is set to true (instead of false). + /// If the field has this value, disable the GUI (or enable if inverted is true). + /// Hide this component in the inspector. + public Predicated(string property, bool inverted = false, object disableValue = null, bool hide = false) + { + _Mode = Mode.Property; + _Inverted = inverted; + _Hide = hide; + _PropertyName = property; + _DisableValue = disableValue; + } + + /// + /// Field is predicated (enabled/shown) on which render pipeline is active. + /// + /// Enable if this render pipeline is active. + /// Invert behaviour. + /// Hide instead of disable. + public Predicated(RenderPipeline rp, bool inverted = false, bool hide = false) + { + _Mode = Mode.RenderPipeline; + _Inverted = inverted; + _Hide = hide; + _RenderPipeline = rp; + } + + public override bool AlwaysVisible => true; + + public bool GUIEnabled(SerializedProperty property) + { + return _Inverted != property.propertyType switch + { + // Enable GUI if int value of field is not equal to 0, or whatever the disable-value is set to + SerializedPropertyType.Integer => property.intValue != ((int?)_DisableValue ?? 0), + // Enable GUI if disable-value is 0 and field is true, or disable-value is not 0 and field is false + SerializedPropertyType.Boolean => property.boolValue ^ (((int?)_DisableValue ?? 0) != 0), + SerializedPropertyType.Float => property.floatValue != ((float?)_DisableValue ?? 0), + SerializedPropertyType.String => property.stringValue != ((string)_DisableValue ?? ""), + // Must pass nameof enum entry as we are comparing names because index != value. + SerializedPropertyType.Enum => property.enumNames[property.enumValueIndex] != ((string)_DisableValue ?? ""), + SerializedPropertyType.ObjectReference => property.objectReferenceValue != null, + SerializedPropertyType.ManagedReference => property.managedReferenceValue != null, + _ => throw new ArgumentException($"Crest.Predicated: property type on {property.serializedObject.targetObject} not implemented yet: {property.propertyType}."), + }; + } + + internal override void Decorate(Rect position, SerializedProperty property, GUIContent label, DecoratedDrawer drawer) + { + var enabled = true; + + if (_Mode == Mode.Property) + { + var propertyPath = _PropertyName; + + if (property.depth > 0) + { + // Get the property path so we can find it from the serialized object. + propertyPath = $"{string.Join(".", property.propertyPath.Split(".", StringSplitOptions.None)[0..^1])}.{propertyPath}"; + } + + // Get the other property to be the predicate for the enabled/disabled state of this property. + // Do not use property.FindPropertyRelative as it does not work with nested properties. + // Try and find the nested property first and then fallback to the root object. + var otherProperty = property.serializedObject.FindProperty(propertyPath) ?? property.serializedObject.FindProperty(_PropertyName); + Debug.AssertFormat(otherProperty != null, "Crest.Predicated: {0} or {1} property on {2} ({3}) could not be found!", propertyPath, _PropertyName, property.serializedObject.targetObject.GetType(), property.name); + + if (otherProperty != null) + { + enabled = GUIEnabled(otherProperty); + } + } + else if (_Mode == Mode.Member) + { + // Static is both abstract and sealed: https://stackoverflow.com/a/1175950 + object @object = _Type.IsAbstract && _Type.IsSealed ? null : property.serializedObject.targetObject; + + // If this is a nested type, grab that type. This may not be suitable in all cases. + if (property.depth > 0) + { + // Get the property path so we can find it from the serialized object. + var propertyPath = string.Join(".", property.propertyPath.Split(".", StringSplitOptions.None)[0..^1]); + + var otherProperty = property.serializedObject.FindProperty(propertyPath); + + @object = otherProperty.propertyType switch + { + SerializedPropertyType.ManagedReference => otherProperty.managedReferenceValue, + SerializedPropertyType.Generic => otherProperty.boxedValue, + _ => @object, + }; + } + + if (_Member is PropertyInfo autoProperty) + { + // == operator does not work. + enabled = autoProperty.GetValue(@object).Equals(_DisableValue); + } + else if (_Member is MethodInfo method) + { + enabled = method.Invoke(@object, new object[] { }).Equals(_DisableValue); + } + + if (_Inverted) enabled = !enabled; + } + else if (_Mode == Mode.Type) + { + var type = property.serializedObject.targetObject.GetType(); + + // If this is a nested type, grab that type. This may not be suitable in all cases. + if (property.depth > 0) + { + // Get the property path so we can find it from the serialized object. + var propertyPath = string.Join(".", property.propertyPath.Split(".", StringSplitOptions.None)[0..^1]); + + var otherProperty = property.serializedObject.FindProperty(propertyPath); + + type = otherProperty.propertyType switch + { + SerializedPropertyType.ManagedReference => otherProperty.managedReferenceValue.GetType(), + SerializedPropertyType.Generic => otherProperty.boxedValue.GetType(), + _ => type, + }; + } + + var enabledByTypeCheck = _Type.IsAssignableFrom(type); + if (_Inverted) enabledByTypeCheck = !enabledByTypeCheck; + enabled = enabledByTypeCheck && enabled; + } + else if (_Mode == Mode.RenderPipeline) + { + enabled = RenderPipelineHelper.RenderPipeline == _RenderPipeline != _Inverted; + } + + // Keep current disabled state. + GUI.enabled &= enabled; + + // Keep previous hidden state. + DecoratedDrawer.s_HideInInspector = DecoratedDrawer.s_HideInInspector || (_Hide && !enabled); + } + } +} diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes/Predicated.cs.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes/Predicated.cs.meta new file mode 100644 index 000000000..983ac934f --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Attributes/Predicated.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a36938141700f4f47b31f7565311ace0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/DecoratedDrawer.cs b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/DecoratedDrawer.cs new file mode 100644 index 000000000..9aa60c592 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/DecoratedDrawer.cs @@ -0,0 +1,217 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// Adapted from: +// https://forum.unity.com/threads/drawing-a-field-using-multiple-property-drawers.479377/ + +// This class draws all the attributes which inherit from DecoratedProperty. This class may need to be +// extended to handle reseting GUI states as we need them. + +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using UnityEditor; +using UnityEngine; +using UnityEngine.Events; +using WaveHarmonic.Crest.Attributes; + +namespace WaveHarmonic.Crest.Editor +{ + [CustomPropertyDrawer(typeof(DecoratedProperty), true)] + sealed class DecoratedDrawer : PropertyDrawer + { + internal static bool s_HideInInspector = false; + public static bool s_IsFoldout = false; + public static bool s_IsFoldoutOpen = false; + + public static bool s_TemporaryColor; + public static Color s_PreviousColor; + + List _Decorators = null; + List Decorators + { + get + { + // Populate list with decorators. + _Decorators ??= fieldInfo + .GetCustomAttributes(typeof(Decorator), false) + .ToList(); + + return _Decorators; + } + } + + List _Validators = null; + List Validators => _Validators ??= fieldInfo + .GetCustomAttributes(typeof(Attributes.Validator), false) + .Cast() + .ToList(); + + static List<(MethodInfo, OnChange)> s_OnChangeHandlers; + static List<(MethodInfo, OnChange)> OnChangeHandlers => s_OnChangeHandlers ??= TypeCache + .GetMethodsWithAttribute() + .Select(x => (x, x.GetCustomAttribute())) + .ToList(); + + [InitializeOnLoadMethod] + static void OnDomainReload() + { + s_OnChangeHandlers = null; + } + + public override float GetPropertyHeight(SerializedProperty property, GUIContent label) + { + // Make original control rectangle be invisible because we always create our own. Zero still adds a little + // height which becomes noticeable once multiple properties are hidden. This could be some GUI style + // property but could not find which one. + return -2f; + } + + public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) + { + // Store the original GUI state so it can be reset later. + var originalColor = GUI.color; + var originalEnabled = GUI.enabled; + + if (s_TemporaryColor) GUI.color = s_PreviousColor; + + // Execute all non visual attributes like Predicated. If these change any IMGUI + // properties they might be overriden with EditorGUI.GetPropertyHeight call. + for (var index = 0; index < Decorators.Count; index++) + { + var attribute = (Decorator)Decorators[index]; + if (!attribute.AlwaysVisible) continue; + attribute.Decorate(position, property, label, this); + } + + if (!s_HideInInspector && (!s_IsFoldout || s_IsFoldoutOpen)) + { + // Execute all visual attributes. + for (var index = 0; index < Decorators.Count; index++) + { + var attribute = (Decorator)Decorators[index]; + if (attribute.AlwaysVisible) continue; + label = attribute.BuildLabel(label); + attribute.Decorate(position, property, label, this); + } + + var a = (DecoratedProperty)attribute; + position = a.NeedsControlRectangle(property) + ? EditorGUILayout.GetControlRect(true, EditorGUI.GetPropertyHeight(property, label, true)) + : position; + + // Call for labels again as EditorGUI.GetPropertyHeight will revert them. + for (var index = 0; index < Decorators.Count; index++) + { + var attribute = (Decorator)Decorators[index]; + if (attribute.AlwaysVisible) continue; + label = attribute.BuildLabel(label); + } + + var skipChange = fieldInfo.FieldType == typeof(UnityEvent); + + if (!skipChange) + { + EditorGUI.BeginChangeCheck(); + } + + var oldValue = skipChange ? null : property.boxedValue; + a.OnGUI(position, property, label, this); + + for (var index = 0; index < Validators.Count; index++) + { + Validators[index].Validate(position, property, label, this, oldValue); + } + + // Guard against foldouts triggering change check due to changing isExpanded. + if (!skipChange && EditorGUI.EndChangeCheck() && oldValue != property.boxedValue) + { + // Apply any changes. + property.serializedObject.ApplyModifiedProperties(); + + OnChange(property, oldValue); + } + + for (var index = 0; index < Decorators.Count; index++) + { + var attribute = (Decorator)Decorators[index]; + if (attribute.AlwaysVisible) continue; + attribute.DecorateAfter(position, property, label, this); + } + } + + if (!s_IsFoldout || s_IsFoldoutOpen) + { + for (var index = 0; index < Decorators.Count; index++) + { + var attribute = (Decorator)Decorators[index]; + if (!attribute.AlwaysVisible) continue; + attribute.DecorateAfter(position, property, label, this); + } + } + + // Handle resetting the GUI state. + s_HideInInspector = false; + GUI.color = originalColor; + GUI.enabled = originalEnabled; + } + + public static void OnChange(SerializedProperty property, object oldValue) + { + var target = property.serializedObject.targetObject; + // This is the type the field is declared on so it will work for nested objects. + var targetType = target.GetType(); + + var isActive = true; + if (property.serializedObject.targetObject is Internal.EditorBehaviour c && !c.isActiveAndEnabled) + { + isActive = false; + } + + // Send event to target. + foreach (var (method, attribute) in OnChangeHandlers) + { + if (attribute.SkipIfInactive && !isActive) continue; + var type = attribute.Type ?? method.DeclaringType; + if (!type.IsAssignableFrom(targetType)) continue; + + if (attribute.Type == null) + { + method.Invoke(target, new object[] { property.propertyPath, oldValue }); + } + else + { + method.Invoke(null, new object[] { target, property.propertyPath, oldValue, property }); + } + } + + // Propagate event to nested classes. + for (var i = 0; i < property.depth; i++) + { + var chunks = property.propertyPath.Split("."); + var nestedProperty = property.serializedObject.FindProperty(string.Join(".", chunks[..(i + 1)])); + if (nestedProperty.propertyType != SerializedPropertyType.ManagedReference) continue; + var relativePath = string.Join(".", chunks[(i + 1)..]); + + var nestedTarget = nestedProperty.managedReferenceValue; + var nestedTargetType = nestedTarget.GetType(); + + foreach (var (method, attribute) in OnChangeHandlers) + { + if (attribute.SkipIfInactive && !isActive) continue; + var type = attribute.Type ?? method.DeclaringType; + if (!type.IsAssignableFrom(nestedTargetType)) continue; + + if (attribute.Type == null) + { + method.Invoke(nestedTarget, new object[] { relativePath, oldValue }); + } + else + { + method.Invoke(null, new object[] { nestedTarget, relativePath, oldValue, property }); + } + } + } + } + } +} diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/DecoratedDrawer.cs.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/DecoratedDrawer.cs.meta new file mode 100644 index 000000000..3280a3b7d --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/DecoratedDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: bb1d9ebb9335a411586a683ac6f78acd +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/EmbeddedAssetHelpers.cs b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/EmbeddedAssetHelpers.cs new file mode 100644 index 000000000..348402057 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/EmbeddedAssetHelpers.cs @@ -0,0 +1,246 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// This file is subject to the Unity Companion License: +// https://github.com/Unity-Technologies/com.unity.cinemachine/blob/593fa283bee378322337e5d9f5a7b91331a45799/LICENSE.md + +// Lovingly adapted from Cinemachine: +// https://github.com/Unity-Technologies/com.unity.cinemachine/blob/593fa283bee378322337e5d9f5a7b91331a45799/Editor/Utility/EmbeddedAssetHelpers.cs + +using UnityEngine; +using UnityEditor; +using UnityEditor.VersionControl; + +namespace WaveHarmonic.Crest.Editor +{ + /// + /// Interface for editors that receive an argument + /// + interface IEmbeddableEditor + { + void SetTypeOfHostComponent(System.Type hostType); + } + + /// + /// Helper for drawing embedded asset editors + /// + sealed class EmbeddedAssetEditor + { + /// + /// Create in OnEnable() + /// + public EmbeddedAssetEditor() + { + _CreateButtonGUIContent = new("Create Asset", "Create a new shared settings asset"); + } + + /// + /// Called after the asset editor is created, in case it needs + /// to be customized + /// + public OnCreateEditorDelegate _OnCreateEditor; + public delegate void OnCreateEditorDelegate(UnityEditor.Editor editor); + + /// + /// Called when the asset being edited was changed by the user. + /// + public OnChangedDelegate _OnChanged; + public delegate void OnChangedDelegate(System.Type type, Object obj); + + /// + /// Free the resources in OnDisable() + /// + public void OnDisable() + { + DestroyEditor(); + Helpers.Destroy(_DefaultTarget); + } + + /// + /// Customize this after creation if you want + /// + public GUIContent _CreateButtonGUIContent; + + UnityEditor.Editor _Editor = null; + + System.Type _Type; + + Object _DefaultTarget; + + const int k_IndentOffset = 3; + + public void DrawEditorCombo(GUIContent label, PropertyDrawer drawer, SerializedProperty property, string extension, int bottomMargin = 0) + { + _Type = drawer.fieldInfo.FieldType; + + DrawEditorCombo + ( + label, + $"Create {property.displayName} Asset", + $"{property.displayName.Replace(' ', '_')}", + extension, + string.Empty, + false, + property, + bottomMargin + ); + } + + /// + /// Call this from OnInspectorGUI. Will draw the asset reference field, and + /// the embedded editor, or a Create Asset button, if no asset is set. + /// + public void DrawEditorCombo + ( + GUIContent label, + string title, + string defaultName, + string extension, + string message, + bool indent, + SerializedProperty property, + int bottomMargin + ) + { + UpdateEditor(property); + + EditorGUI.BeginChangeCheck(); + var rect = AssetField(label, property, title, defaultName, extension, message); + + if (EditorGUI.EndChangeCheck()) + { + property.serializedObject.ApplyModifiedProperties(); + UpdateEditor(property); + } + + // Display embedded editor. + if (_Editor != null) + { + var foldoutRect = new Rect(rect.x - k_IndentOffset, rect.y, rect.width + k_IndentOffset, EditorGUIUtility.singleLineHeight); + property.isExpanded = EditorGUI.Foldout(foldoutRect, property.isExpanded, GUIContent.none, true); + + var canEditAsset = AssetDatabase.IsOpenForEdit(_Editor.target, StatusQueryOptions.UseCachedIfPossible); + + // We take the current GUI state into account to support attribute stacking. + var guiEnabled = GUI.enabled; + GUI.enabled = guiEnabled && canEditAsset; + + if (property.isExpanded) + { + var level = EditorGUI.indentLevel; + EditorGUI.indentLevel = 0; + EditorGUILayout.BeginHorizontal(); + // NOTE: Tweaked for current usage but probably will not work everywhere. + if (level > 0) GUILayout.Space(8 * (level + 2)); + EditorGUILayout.BeginVertical(GUI.skin.box); + + if ((_Editor.target.hideFlags & HideFlags.NotEditable) == 0) + { + EditorGUILayout.HelpBox("This is a shared asset. Changes made here will apply to all users of this asset.", MessageType.Info); + } + EditorGUI.BeginChangeCheck(); + _Editor.OnInspectorGUI(); + if (EditorGUI.EndChangeCheck() && (_OnChanged != null)) + _OnChanged(_Type, property.objectReferenceValue); + EditorGUILayout.EndVertical(); + EditorGUILayout.EndHorizontal(); + + if (bottomMargin > 0) + { + EditorGUILayout.Space(bottomMargin); + } + } + + // Enable GUI so the checkout button works. + GUI.enabled = true; + + if (_Editor.target != null) + { + if (!canEditAsset && GUILayout.Button("Check out")) + { + var task = Provider.Checkout(AssetDatabase.GetAssetPath(_Editor.target), CheckoutMode.Asset); + task.Wait(); + } + } + + // Restore stacked GUI enabled state. + GUI.enabled = guiEnabled; + } + } + + Rect AssetField + ( + GUIContent label, + SerializedProperty property, + string title, + string defaultName, + string extension, + string message + ) + { + return EditorHelpers.AssetField + ( + _Type, + label, + property, + EditorGUILayout.GetControlRect(true), + title, + defaultName, + extension, + message, + x => ScriptableObject.CreateInstance(_Type) + ); + } + + public void DestroyEditor() + { + if (_Editor != null) + { + Object.DestroyImmediate(_Editor); + _Editor = null; + } + } + + public void UpdateEditor(SerializedProperty property) + { + var target = property.objectReferenceValue; + + if (target == null && _DefaultTarget == null) + { + _DefaultTarget = ScriptableObject.CreateInstance(_Type); + _DefaultTarget.hideFlags = HideFlags.DontSave | HideFlags.NotEditable; + } + + if (target == null) + { + target = _DefaultTarget; + } + + // Destroy the editor if target has changed. + if (_Editor != null && _Editor.target != target) + { + DestroyEditor(); + } + + if (_Editor != null) + { + return; + } + + // NOTE: This is triggered twice on asset switch for some reason. + // Create editor if need one. + if (target != null) + { + _Editor = UnityEditor.Editor.CreateEditor(target); + + // Pass through argument for editors that receive it + if (property.serializedObject.targetObject != null) + { + (_Editor as IEmbeddableEditor)?.SetTypeOfHostComponent(property.serializedObject.targetObject.GetType()); + } + + _OnCreateEditor?.Invoke(_Editor); + } + } + } +} diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/EmbeddedAssetHelpers.cs.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/EmbeddedAssetHelpers.cs.meta new file mode 100644 index 000000000..afe17f0ce --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/EmbeddedAssetHelpers.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 13b989c062ddf461a9afd71ab6da8921 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Helpers.cs b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Helpers.cs new file mode 100644 index 000000000..637c91561 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Helpers.cs @@ -0,0 +1,272 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using System.Diagnostics.CodeAnalysis; +using System.IO; +using System.Reflection; +using System.Text.RegularExpressions; +using UnityEditor; +using UnityEditor.Rendering; +using UnityEngine; +using UnityEngine.Rendering; + +namespace WaveHarmonic.Crest.Editor +{ + /// + /// Provides general helper functions for the editor. + /// + static class EditorHelpers + { + internal static ComputeShader s_VisualizeNegativeValuesShader; + internal static ComputeShader VisualizeNegativeValuesShader + { + get + { + if (s_VisualizeNegativeValuesShader == null) + { + s_VisualizeNegativeValuesShader = AssetDatabase.LoadAssetAtPath("Packages/com.waveharmonic.crest/Editor/Shaders/VisualizeNegativeValues.compute"); + } + + return s_VisualizeNegativeValuesShader; + } + } + + public static LayerMask LayerMaskField(string label, LayerMask layerMask) + { + // Adapted from: http://answers.unity.com/answers/1387522/view.html + var temporary = EditorGUILayout.MaskField( + label, + UnityEditorInternal.InternalEditorUtility.LayerMaskToConcatenatedLayersMask(layerMask), + UnityEditorInternal.InternalEditorUtility.layers); + return UnityEditorInternal.InternalEditorUtility.ConcatenatedLayersMaskToLayerMask(temporary); + } + + /// Attempts to get the scene view this camera is rendering. + /// The scene view or null if not found. + public static SceneView GetSceneViewFromSceneCamera(Camera camera) + { + foreach (SceneView sceneView in SceneView.sceneViews) + { + if (sceneView.camera == camera) + { + return sceneView; + } + } + + return null; + } + + /// Get time passed to animated materials. + public static float GetShaderTime() + { + // When "Always Refresh" is disabled, Unity passes zero. Also uses realtimeSinceStartup: + // https://github.com/Unity-Technologies/Graphics/blob/5743e39cdf0795cf7cbeb7ba8ffbbcc7ca200709/Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariablesGlobal.cs#L116 + return !Application.isPlaying && SceneView.lastActiveSceneView != null && + !SceneView.lastActiveSceneView.sceneViewState.alwaysRefresh ? 0f : Time.realtimeSinceStartup; + } + + public static GameObject GetGameObject(SerializedObject serializedObject) + { + // We will either get the component or the GameObject it is attached to. + return serializedObject.targetObject is GameObject + ? serializedObject.targetObject as GameObject + : (serializedObject.targetObject as Component).gameObject; + } + + public static Material CreateSerializedMaterial(string shaderPath, string message) + { + var shader = Shader.Find(shaderPath); + Debug.Assert(shader != null, "Crest: Cannot create required material because shader is null"); + + var material = new Material(shader); + + // Record the material and any subsequent changes. + Undo.RegisterCreatedObjectUndo(material, message); + Undo.RegisterCompleteObjectUndo(material, message); + + return material; + } + + public static Material CreateSerializedMaterial(string shaderPath) + { + return CreateSerializedMaterial(shaderPath, Undo.GetCurrentGroupName()); + } + + public static Object GetDefaultReference(this SerializedObject self, string property) + { + var path = AssetDatabase.GetAssetPath(MonoScript.FromMonoBehaviour(self.targetObject as MonoBehaviour)); + var importer = AssetImporter.GetAtPath(path) as MonoImporter; + return importer.GetDefaultReference(property); + } + + public static object GetDefiningBoxedObject(this SerializedProperty property) + { + object target = property.serializedObject.targetObject; + + if (property.depth > 0) + { + // Get the property path so we can find it from the serialized object. + var path = string.Join(".", property.propertyPath.Split(".", System.StringSplitOptions.None)[0..^1]); + var other = property.serializedObject.FindProperty(path); + // Boxed value can handle both managed and generic with caveats: + // https://docs.unity3d.com/ScriptReference/SerializedProperty-boxedValue.html + // Not sure if it will be a new or same instance as in the scene. + target = other.boxedValue; + } + + return target; + } + + internal delegate Object CreateInstance(SerializedProperty property); + + internal static Rect AssetField + ( + System.Type type, + GUIContent label, + SerializedProperty property, + Rect rect, + string title, + string defaultName, + string extension, + string message, + CreateInstance create + ) + { + var hSpace = 5; + var buttonWidth = 45; + var buttonCount = 2; + + rect.width -= buttonWidth * buttonCount + hSpace; + EditorGUI.PropertyField(rect, property, label); + + var r = new Rect(rect); + + r.x += r.width + hSpace; + r.width = buttonWidth; + if (GUI.Button(r, "New", EditorStyles.miniButtonLeft)) + { + var path = EditorUtility.SaveFilePanelInProject(title, defaultName, extension, message); + if (!string.IsNullOrEmpty(path)) + { + var asset = create(property); + if (asset != null) + { + if (extension == "prefab") + { + PrefabUtility.SaveAsPrefabAsset(asset as GameObject, path); + } + else + { + AssetDatabase.CreateAsset(asset, path); + } + + property.objectReferenceValue = AssetDatabase.LoadAssetAtPath(path); + property.serializedObject.ApplyModifiedProperties(); + } + else + { + Debug.LogError($"Crest: Could not create file"); + } + } + } + + // Only allow cloning if extensions match. Guards against cloning Shader Graph if + // using its embedded material. + var cloneable = property.objectReferenceValue != null; + cloneable = cloneable && Path.GetExtension(AssetDatabase.GetAssetPath(property.objectReferenceValue)) == $".{extension}"; + + EditorGUI.BeginDisabledGroup(!cloneable); + r.x += r.width; + if (GUI.Button(r, "Clone", EditorStyles.miniButtonRight)) + { + var oldPath = AssetDatabase.GetAssetPath(property.objectReferenceValue); + var newPath = oldPath; + if (!newPath.StartsWithNoAlloc("Assets")) newPath = Path.Join("Assets", Path.GetFileName(newPath)); + newPath = AssetDatabase.GenerateUniqueAssetPath(newPath); + AssetDatabase.CopyAsset(oldPath, newPath); + property.objectReferenceValue = AssetDatabase.LoadAssetAtPath(newPath); + } + EditorGUI.EndDisabledGroup(); + + return rect; + } + + internal static void RichTextHelpBox(string message, MessageType type) + { + var styleRichText = GUI.skin.GetStyle("HelpBox").richText; + GUI.skin.GetStyle("HelpBox").richText = true; + + EditorGUILayout.HelpBox(message, type); + + // Revert skin since it persists. + GUI.skin.GetStyle("HelpBox").richText = styleRichText; + } + + // Prettify nameof. + internal static string Pretty(this string text) + { + // Regular expression to split on transitions from lower to upper case and keep acronyms together + return Regex.Replace(text, @"([a-z])([A-Z])|([A-Z])([A-Z][a-z])", "$1$3 $2$4").Replace("_", ""); + } + + internal static string Italic(this string text) + { + return $"{text}"; + } + + public static void MarkCurrentStageAsDirty() + { + var stage = UnityEditor.SceneManagement.PrefabStageUtility.GetCurrentPrefabStage(); + + if (stage != null) + { + UnityEditor.SceneManagement.EditorSceneManager.MarkSceneDirty(stage.scene); + } + else + { + UnityEditor.SceneManagement.EditorSceneManager.MarkSceneDirty(UnityEngine.SceneManagement.SceneManager.GetActiveScene()); + } + } + + static readonly MethodInfo s_ButtonWithDropdownList = typeof(EditorGUI).GetMethod + ( + "ButtonWithDropdownList", + BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public, + null, + new System.Type[] { typeof(GUIContent), typeof(string[]), typeof(GenericMenu.MenuFunction2), typeof(GUILayoutOption[]) }, + null + ); + + static readonly GUILayoutOption[] s_GUILayoutOptionsZero; + + public static bool ButtonWithDropdownList(GUIContent name, string[] names, GenericMenu.MenuFunction2 callback) + { + if (names == null) + { + return GUILayout.Button(name); + } + + return (bool)s_ButtonWithDropdownList.Invoke(null, new object[] { name, names, callback, s_GUILayoutOptionsZero }); + } + } + + static partial class Extensions + { + internal static string GetSubShaderTag([DisallowNull] this Shader shader, ShaderSnippetData snippet, ShaderTagId id) + { + var data = ShaderUtil.GetShaderData(shader); + if (data == null) return null; + + var index = (int)snippet.pass.SubshaderIndex; + if (index < 0 || index >= shader.subshaderCount) return null; + + var subShader = data.GetSerializedSubshader(index); + if (subShader == null) return null; + + var tag = subShader.FindTagValue(id); + if (string.IsNullOrEmpty(tag.name)) return null; + + return tag.name; + } + } +} diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Helpers.cs.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Helpers.cs.meta new file mode 100644 index 000000000..5d0e4318c --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Helpers.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 19e5156bd1ea44af484895930b902df7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Inspector.Validation.cs b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Inspector.Validation.cs new file mode 100644 index 000000000..f56859f06 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Inspector.Validation.cs @@ -0,0 +1,158 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using System.Text.RegularExpressions; +using UnityEditor; +using UnityEngine; + +namespace WaveHarmonic.Crest.Editor +{ + partial class Inspector + { + static readonly bool s_GroupMessages = false; + static GUIContent s_JumpButtonContent = null; + static GUIContent s_FixButtonContent = null; + + protected virtual void RenderValidationMessages() + { + // Enable rich text in help boxes. Store original so we can revert since this might be a "hack". + var styleRichText = GUI.skin.GetStyle("HelpBox").richText; + GUI.skin.GetStyle("HelpBox").richText = true; + + // This is a static list so we need to clear it before use. Not sure if this will ever be a threaded + // operation which would be an issue. + foreach (var messages in ValidatedHelper.s_Messages) + { + messages.Clear(); + } + + ValidatedHelper.ExecuteValidators(target, ValidatedHelper.HelpBox); + + // We only want space before and after the list of help boxes. We don't want space between. + var needsSpaceAbove = true; + var needsSpaceBelow = false; + + // We loop through in reverse order so errors appears at the top. + for (var messageTypeIndex = 0; messageTypeIndex < ValidatedHelper.s_Messages.Length; messageTypeIndex++) + { + var messages = ValidatedHelper.s_Messages[messageTypeIndex]; + + if (messages.Count > 0) + { + if (needsSpaceAbove) + { + // Double space looks good at top. + EditorGUILayout.Space(); + // EditorGUILayout.Space(); + needsSpaceAbove = false; + } + + needsSpaceBelow = true; + + // Map Validated.MessageType to HelpBox.MessageType. + var messageType = (MessageType)ValidatedHelper.s_Messages.Length - messageTypeIndex; + + if (s_GroupMessages) + { + // We join the messages together to reduce vertical space since HelpBox has padding, borders etc. + var joinedMessage = messages[0]._Message; + // Format as list if we have more than one message. + if (messages.Count > 1) joinedMessage = $"- {joinedMessage}"; + + for (var messageIndex = 1; messageIndex < messages.Count; messageIndex++) + { + joinedMessage += $"\n- {messages[messageIndex]}"; + } + + EditorGUILayout.HelpBox(joinedMessage, messageType); + } + else + { + foreach (var message in messages) + { + EditorGUILayout.BeginHorizontal(); + + var fixDescription = message._FixDescription; + var originalGUIEnabled = GUI.enabled; + + if (message._Action != null) + { + fixDescription += " Click the fix/repair button on the right to fix."; + + if ((message._Action == ValidatedHelper.FixAddMissingMathPackage || message._Action == ValidatedHelper.FixAddMissingBurstPackage) && PackageManagerHelpers.IsBusy) + { + GUI.enabled = false; + } + } + + EditorGUILayout.HelpBox($"{message._Message} {fixDescription}", messageType); + + // Jump to object button. + if (message._Object != null) + { + // Selection.activeObject can be message._object.gameObject instead of the component + // itself. We soft cast to MonoBehaviour to get the gameObject for comparison. + // Alternatively, we could always pass gameObject instead of "this". + var casted = message._Object as MonoBehaviour; + + if (Selection.activeObject != message._Object && (casted == null || casted.gameObject != Selection.activeObject)) + { + s_JumpButtonContent ??= new(EditorGUIUtility.FindTexture("scenepicking_pickable_hover@2x"), "Jump to object to resolve issue"); + + if (GUILayout.Button(s_JumpButtonContent, GUILayout.ExpandWidth(false), GUILayout.ExpandHeight(true))) + { + Selection.activeObject = message._Object; + } + } + } + + // Fix the issue button. + if (message._Action != null) + { + s_FixButtonContent ??= new(EditorGUIUtility.FindTexture("SceneViewTools")); + + if (message._FixDescription != null) + { + var sanitisedFixDescr = Regex.Replace(message._FixDescription, @"<[^<>]*>", "'"); + s_FixButtonContent.tooltip = $"Apply fix: {sanitisedFixDescr}"; + } + else + { + s_FixButtonContent.tooltip = "Fix issue"; + } + + if (GUILayout.Button(s_FixButtonContent, GUILayout.ExpandWidth(false), GUILayout.ExpandHeight(true))) + { + // Run fix function + var serializedObject = new SerializedObject(message._Object); + // Property is optional. + var property = message._PropertyPath != null ? serializedObject?.FindProperty(message._PropertyPath) : null; + var oldValue = property?.boxedValue; + message._Action.Invoke(serializedObject, property); + if (serializedObject.ApplyModifiedProperties()) + { + // SerializedObject does this for us, but gives the history item a nicer label. + Undo.RecordObject(message._Object, s_FixButtonContent.tooltip); + DecoratedDrawer.OnChange(property, oldValue); + } + } + } + + GUI.enabled = originalGUIEnabled; + + EditorGUILayout.EndHorizontal(); + } + } + } + } + + if (needsSpaceBelow) + { + // EditorGUILayout.Space(); + } + + // Revert skin since it persists. + GUI.skin.GetStyle("HelpBox").richText = styleRichText; + } + } +} diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Inspector.Validation.cs.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Inspector.Validation.cs.meta new file mode 100644 index 000000000..925df2e30 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Inspector.Validation.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a2125841df4154bd89cf5af6847a0d40 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Inspector.cs b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Inspector.cs new file mode 100644 index 000000000..508ff883b --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Inspector.cs @@ -0,0 +1,218 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using System; +using System.Collections.Generic; +using System.Reflection; +using UnityEditor; +using UnityEngine; +using WaveHarmonic.Crest.Internal; + +namespace WaveHarmonic.Crest.Editor +{ + /// + /// Base editor. Needed as custom drawers require a custom editor to work. + /// + [CustomEditor(typeof(EditorBehaviour), editorForChildClasses: true)] + partial class Inspector : UnityEditor.Editor + { + public const int k_FieldGroupOrder = 1000; + const string k_NoPrefabModeSupportWarning = "Prefab mode is not supported. Changes made in prefab mode will not be reflected in the scene view. Save this prefab to see changes."; + + internal static Inspector Current { get; private set; } + + readonly Dictionary _MaterialEditors = new(); + + public override bool RequiresConstantRepaint() => TexturePreview.AnyActivePreviews; + + // Set this from a decorator to enable the material editor. + internal List _Materials = new(); + + readonly Utility.SortedList _Properties = new(Helpers.DuplicateComparison); + + public override void OnInspectorGUI() + { + // Reset foldout values. + DecoratedDrawer.s_IsFoldout = false; + DecoratedDrawer.s_IsFoldoutOpen = false; + + // Make sure we adhere to flags. + var enabled = GUI.enabled; + GUI.enabled = (target.hideFlags & HideFlags.NotEditable) == 0; + + RenderBeforeInspectorGUI(); + RenderInspectorGUI(); + RenderValidationMessages(); + + EditorGUI.BeginDisabledGroup(target is Behaviour component && !component.isActiveAndEnabled); + RenderBottomButtons(); + EditorGUI.EndDisabledGroup(); + + RenderAfterInspectorGUI(); + + GUI.enabled = enabled; + } + + protected virtual void OnDisable() + { + foreach (var (_, editor) in _MaterialEditors) + { + Helpers.Destroy(editor); + } + } + + protected void RenderBeforeInspectorGUI() + { + if (this.target is EditorBehaviour target && target._IsPrefabStageInstance) + { + EditorGUILayout.Space(); + EditorGUILayout.HelpBox(k_NoPrefabModeSupportWarning, MessageType.Warning); + EditorGUILayout.Space(); + } + } + + protected virtual void RenderInspectorGUI() + { + var previous = Current; + Current = this; + + _Properties.Clear(); + + serializedObject.Update(); + + using var iterator = serializedObject.GetIterator(); + if (iterator.NextVisible(true)) + { + var index = 0; + var group = 0; + Type type = null; + + do + { + var property = serializedObject.FindProperty(iterator.name); + if (iterator.name == "m_Script") + { +#if CREST_DEBUG + _Properties.Add(index++, property); +#endif + continue; + } + + var field = property.GetFieldInfo(out _); + + // If field is on a new type (inheritance) then reset the group to prevent group leakage. + if (field.DeclaringType != type) + { + group = 0; + type = field.DeclaringType; + } + + // Null checking but there should always be one DecoratedProperty. + var order = field.GetCustomAttribute()?.order ?? 0; + group = field.GetCustomAttribute()?.order * k_FieldGroupOrder ?? group; + _Properties.Add(order + group + index++, property); + } + while (iterator.NextVisible(false)); + } + + foreach (var (_, property) in _Properties) + { +#if CREST_DEBUG + using (new EditorGUI.DisabledGroupScope(property.name == "m_Script")) +#endif + { + // Only support top level ordering for now. + EditorGUILayout.PropertyField(property, includeChildren: true); + } + } + + // Need to call just in case there is no decorated property. + serializedObject.ApplyModifiedProperties(); + + // Restore previous in case this is a nested editor. + Current = previous; + + // Fixes indented validation etc. + EditorGUI.indentLevel = 0; + } + + protected virtual void RenderBottomButtons() + { + + } + + protected virtual void RenderAfterInspectorGUI() + { + foreach (var material in _Materials) + { + if (material == null) continue; + DrawMaterialEditor(material); + } + + _Materials.Clear(); + } + + // Adapted from: http://answers.unity.com/answers/975894/view.html + void DrawMaterialEditor(Material material) + { + MaterialEditor editor; + if (!_MaterialEditors.ContainsKey(material)) + { + editor = (MaterialEditor)CreateEditor(material); + _MaterialEditors[material] = editor; + } + else + { + editor = _MaterialEditors[material]; + } + + // Check material again as sometimes null. + if (editor != null && material != null) + { + EditorGUILayout.Space(); + + // Draw the material's foldout and the material shader field. Required to call OnInspectorGUI. + editor.DrawHeader(); + + var path = AssetDatabase.GetAssetPath(material); + + // We need to prevent the user from editing Unity's default materials. + // Check Editor.IsEnabled in Editor.cs for further filtering. + var isEditable = (material.hideFlags & HideFlags.NotEditable) == 0; + +#if !CREST_DEBUG + // Do not allow editing of our assets. + isEditable &= !path.StartsWithNoAlloc("Packages/com.waveharmonic"); +#endif + + using (new EditorGUI.DisabledGroupScope(!isEditable)) + { + // Draw the material properties. Works only if the foldout of DrawHeader is open. + editor.OnInspectorGUI(); + } + } + } + } + + // Adapted from: + // https://gist.github.com/thebeardphantom/1ad9aee0ef8de6271fff39f1a6a3d66d + static partial class Extensions + { + static readonly MethodInfo s_GetFieldInfoFromProperty; + + static Extensions() + { + var utility = typeof(UnityEditor.Editor).Assembly.GetType("UnityEditor.ScriptAttributeUtility"); + Debug.Assert(utility != null, "Crest: ScriptAttributeUtility not found!"); + + s_GetFieldInfoFromProperty = utility.GetMethod("GetFieldInfoFromProperty", BindingFlags.NonPublic | BindingFlags.Static); + Debug.Assert(s_GetFieldInfoFromProperty != null, "Crest: GetFieldInfoFromProperty not found!"); + } + + public static FieldInfo GetFieldInfo(this SerializedProperty property, out Type type) + { + type = null; + return (FieldInfo)s_GetFieldInfoFromProperty.Invoke(null, new object[] { property, type }); + } + } +} diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Inspector.cs.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Inspector.cs.meta new file mode 100644 index 000000000..9e3362cd3 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Inspector.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: db8aed30f95c447c3b9491865a600372 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/MaterialEditors.cs b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/MaterialEditors.cs new file mode 100644 index 000000000..b3dc848b6 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/MaterialEditors.cs @@ -0,0 +1,54 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEditor; +using UnityEngine; + +namespace WaveHarmonic.Crest.Editor +{ + /// + /// Adds a deprecated message to shaders. + /// + /// USAGE + /// Add to bottom of Shader block: + /// CustomEditor "Crest.ObsoleteShaderGUI" + /// Optionally add to Properties block: + /// [HideInInspector] _ObsoleteMessage("The additional message.", Float) = 0 + /// + sealed class ObsoleteShaderGUI : ShaderGUI + { + public override void OnGUI(MaterialEditor editor, MaterialProperty[] properties) + { + // Enable rich text in help boxes. Store original so we can revert since this might be a "hack". + var styleRichText = GUI.skin.GetStyle("HelpBox").richText; + GUI.skin.GetStyle("HelpBox").richText = true; + + var message = ""; + + { + var property = FindProperty("_Message", properties, propertyIsMandatory: false); + if (property != null) + { + message += property.displayName; + } + } + + { + var property = FindProperty("_ObsoleteMessage", properties, propertyIsMandatory: false); + if (property != null) + { + message += "This shader is deprecated and will be removed in a future version. " + property.displayName; + } + } + + EditorGUILayout.HelpBox(message, MessageType.Warning); + EditorGUILayout.Space(3f); + + // Revert skin since it persists. + GUI.skin.GetStyle("HelpBox").richText = styleRichText; + + // Render the default GUI. + base.OnGUI(editor, properties); + } + } +} diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/MaterialEditors.cs.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/MaterialEditors.cs.meta new file mode 100644 index 000000000..f9e6b2a99 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/MaterialEditors.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3a7b7bf49879b47f5b5e4fe887760848 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/PackageManagerHelpers.cs b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/PackageManagerHelpers.cs new file mode 100644 index 000000000..f47386b3b --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/PackageManagerHelpers.cs @@ -0,0 +1,41 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// Helpers for using the Unity Package Manager. + +using UnityEditor; +using UnityEditor.PackageManager; +using UnityEditor.PackageManager.Requests; +using UnityEngine; + +namespace WaveHarmonic.Crest.Editor +{ + static class PackageManagerHelpers + { + static AddRequest s_Request; + public static bool IsBusy => s_Request?.IsCompleted == false; + + public static void AddMissingPackage(string packageName) + { + s_Request = Client.Add(packageName); + EditorApplication.update += AddMissingPackageProgress; + } + + static void AddMissingPackageProgress() + { + if (s_Request.IsCompleted) + { + if (s_Request.Status == StatusCode.Success) + { + Debug.Log("Installed: " + s_Request.Result.packageId); + } + else if (s_Request.Status >= StatusCode.Failure) + { + Debug.Log(s_Request.Error.message); + } + + EditorApplication.update -= AddMissingPackageProgress; + } + } + } +} diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/PackageManagerHelpers.cs.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/PackageManagerHelpers.cs.meta new file mode 100644 index 000000000..ea56a932a --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/PackageManagerHelpers.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f5138ba66b6604da09f58ac99ee035f8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/ShaderGeneratorUtility.cs b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/ShaderGeneratorUtility.cs new file mode 100644 index 000000000..9ea0dc537 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/ShaderGeneratorUtility.cs @@ -0,0 +1,79 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// Exposes a customized version of Unity's shader generator task to only generate +// our source files. + +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Threading.Tasks; +using UnityEditor; +using UnityEditor.Rendering; +using UnityEngine.Rendering; + +namespace WaveHarmonic.Crest.Editor +{ + static class ShaderGeneratorUtility + { + static MethodInfo s_GenerateAsync; + static MethodInfo GenerateAsync => s_GenerateAsync ??= typeof(CSharpToHLSL) + .GetMethod("GenerateAsync", BindingFlags.Static | BindingFlags.NonPublic); + + static async Task InvokeAsync(this MethodInfo methodInfo, object obj, params object[] parameters) + { + dynamic awaitable = methodInfo.Invoke(obj, parameters); + await awaitable; + } + + // Adapted from: + // https://github.com/Unity-Technologies/Graphics/blob/96ba978a240e96adcb2abceb21e90b24caa484a3/Packages/com.unity.render-pipelines.core/Editor/ShaderGenerator/CSharpToHLSL.cs#L18L53 + internal static async Task GenerateAll() + { + Dictionary> sourceGenerators = null; + try + { + // Store per source file path the generator definitions + sourceGenerators = DictionaryPool>.Get(); + + // Extract all types with the GenerateHLSL tag + foreach (var type in TypeCache.GetTypesWithAttribute()) + { + // Only generate our sources as Unity's will trigger a package refresh. + if (!type.FullName.StartsWith("WaveHarmonic.Crest")) continue; + + var attr = type.GetCustomAttributes(typeof(GenerateHLSL), false).First() as GenerateHLSL; + if (!sourceGenerators.TryGetValue(attr.sourcePath, out var generators)) + { + generators = ListPool.Get(); + sourceGenerators.Add(attr.sourcePath, generators); + } + + generators.Add(new(type, attr)); + } + + // We need to force the culture to invariant, otherwise generated code can replace characters. + // For example, Turkish will replace "I" with "İ". This is a bug with GenerateAsync. + var culture = System.Globalization.CultureInfo.CurrentCulture; + System.Globalization.CultureInfo.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; + + // Generate all files + await Task.WhenAll(sourceGenerators.Select(async it => await GenerateAsync + .InvokeAsync(null, new object[] { $"{it.Key}.hlsl", $"{Path.ChangeExtension(it.Key, "custom")}.hlsl", it.Value }))); + + System.Globalization.CultureInfo.CurrentCulture = culture; + } + finally + { + // Make sure we always release pooled resources + if (sourceGenerators != null) + { + foreach (var pair in sourceGenerators) + ListPool.Release(pair.Value); + DictionaryPool>.Release(sourceGenerators); + } + } + } + } +} diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/ShaderGeneratorUtility.cs.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/ShaderGeneratorUtility.cs.meta new file mode 100644 index 000000000..2fc060a35 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/ShaderGeneratorUtility.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2bf974bd66ba04a1aa65908c4308b1b3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/ShaderGraphUtility.cs b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/ShaderGraphUtility.cs new file mode 100644 index 000000000..4eabc771e --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/ShaderGraphUtility.cs @@ -0,0 +1,199 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#pragma warning disable + +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using UnityEditor; +using UnityEditor.ShaderGraph; +using UnityEditor.ShaderGraph.Internal; +using UnityEngine; + +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Editor")] + +namespace WaveHarmonic.Crest.Editor +{ + internal static class ShaderGraphPropertyDrawers + { + static Dictionary s_CompoundPropertyFoldoutStates = new(); + static Dictionary s_Tooltips; + static readonly GUIContent s_Label = new(); + + public static void DrawShaderGraphGUI(MaterialEditor materialEditor, IEnumerable properties, Dictionary tooltips) + { + s_Tooltips = tooltips; + Material m = materialEditor.target as Material; + Shader s = m.shader; + string path = AssetDatabase.GetAssetPath(s); + ShaderGraphMetadata metadata = null; + foreach (var obj in AssetDatabase.LoadAllAssetsAtPath(path)) + { + if (obj is ShaderGraphMetadata meta) + { + metadata = meta; + break; + } + } + + if (metadata != null) + DrawShaderGraphGUI(materialEditor, properties, metadata.categoryDatas); + else + PropertiesDefaultGUI(materialEditor, properties); + } + + static void PropertiesDefaultGUI(MaterialEditor materialEditor, IEnumerable properties) + { + foreach (var property in properties) + { + if ((property.flags & (MaterialProperty.PropFlags.HideInInspector | MaterialProperty.PropFlags.PerRendererData)) != 0) + continue; + + float h = materialEditor.GetPropertyHeight(property, property.displayName); + Rect r = EditorGUILayout.GetControlRect(true, h, EditorStyles.layerMaskField); + + s_Label.text = property.displayName; + s_Label.tooltip = s_Tooltips.GetValueOrDefault(property.name, null); + materialEditor.ShaderProperty(r, property, s_Label); + } + } + + static Rect GetRect(MaterialProperty prop) + { + return EditorGUILayout.GetControlRect(true, MaterialEditor.GetDefaultPropertyHeight(prop)); + } + + static MaterialProperty FindProperty(string propertyName, IEnumerable properties) + { + foreach (var prop in properties) + { + if (prop.name == propertyName) + { + return prop; + } + } + + return null; + } + + public static void DrawShaderGraphGUI(MaterialEditor materialEditor, IEnumerable properties, IEnumerable categoryDatas) + { + foreach (MinimalCategoryData mcd in categoryDatas) + { + DrawCategory(materialEditor, properties, mcd); + } + } + + static void DrawCategory(MaterialEditor materialEditor, IEnumerable properties, MinimalCategoryData minimalCategoryData) + { + if (minimalCategoryData.categoryName.Length > 0) + { + minimalCategoryData.expanded = EditorGUILayout.BeginFoldoutHeaderGroup(minimalCategoryData.expanded, minimalCategoryData.categoryName); + } + else + { + // force draw if no category name to do foldout on + minimalCategoryData.expanded = true; + } + + if (minimalCategoryData.expanded) + { + foreach (var propData in minimalCategoryData.propertyDatas) + { + if (propData.isCompoundProperty == false) + { + MaterialProperty prop = FindProperty(propData.referenceName, properties); + if (prop == null) continue; + DrawMaterialProperty(materialEditor, prop, propData.propertyType, propData.isKeyword, propData.keywordType); + } + else + { + DrawCompoundProperty(materialEditor, properties, propData); + } + } + } + + EditorGUILayout.EndFoldoutHeaderGroup(); + } + + static void DrawCompoundProperty(MaterialEditor materialEditor, IEnumerable properties, GraphInputData compoundPropertyData) + { + EditorGUI.indentLevel++; + + bool foldoutState = true; + var exists = s_CompoundPropertyFoldoutStates.ContainsKey(compoundPropertyData); + if (!exists) + s_CompoundPropertyFoldoutStates.Add(compoundPropertyData, true); + else + foldoutState = s_CompoundPropertyFoldoutStates[compoundPropertyData]; + + foldoutState = EditorGUILayout.Foldout(foldoutState, compoundPropertyData.referenceName); + if (foldoutState) + { + EditorGUI.indentLevel++; + foreach (var subProperty in compoundPropertyData.subProperties) + { + var property = FindProperty(subProperty.referenceName, properties); + if (property == null) continue; + DrawMaterialProperty(materialEditor, property, subProperty.propertyType); + } + EditorGUI.indentLevel--; + } + + if (exists) + s_CompoundPropertyFoldoutStates[compoundPropertyData] = foldoutState; + EditorGUI.indentLevel--; + } + + static void DrawMaterialProperty(MaterialEditor materialEditor, MaterialProperty property, PropertyType propertyType, bool isKeyword = false, KeywordType keywordType = KeywordType.Boolean) + { + if (!isKeyword) + { + switch (propertyType) + { + case PropertyType.SamplerState: + case PropertyType.Matrix4: + case PropertyType.Matrix3: + case PropertyType.Matrix2: + case PropertyType.VirtualTexture: + case PropertyType.Gradient: + return; + case PropertyType.Vector3: + DrawVector3Property(materialEditor, property); + return; + case PropertyType.Vector2: + DrawVector2Property(materialEditor, property); + return; + } + } + + s_Label.text = property.displayName; + s_Label.tooltip = s_Tooltips.GetValueOrDefault(property.name, null); + materialEditor.ShaderProperty(property, s_Label); + } + + static void DrawVector2Property(MaterialEditor materialEditor, MaterialProperty property) + { + EditorGUI.BeginChangeCheck(); + EditorGUI.showMixedValue = property.hasMixedValue; + Vector2 newValue = EditorGUI.Vector2Field(GetRect(property), property.displayName, new Vector2(property.vectorValue.x, property.vectorValue.y)); + EditorGUI.showMixedValue = false; + if (EditorGUI.EndChangeCheck()) + { + property.vectorValue = newValue; + } + } + + static void DrawVector3Property(MaterialEditor materialEditor, MaterialProperty property) + { + EditorGUI.BeginChangeCheck(); + EditorGUI.showMixedValue = property.hasMixedValue; + Vector3 newValue = EditorGUI.Vector3Field(GetRect(property), property.displayName, new Vector3(property.vectorValue.x, property.vectorValue.y, property.vectorValue.z)); + EditorGUI.showMixedValue = false; + if (EditorGUI.EndChangeCheck()) + { + property.vectorValue = newValue; + } + } + } +} diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/ShaderGraphUtility.cs.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/ShaderGraphUtility.cs.meta new file mode 100644 index 000000000..4d4602b32 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/ShaderGraphUtility.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8ee5c95ce93114c1c909f5b1346d8bb0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/TexturePreview.cs b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/TexturePreview.cs new file mode 100644 index 000000000..0c425d3ad --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/TexturePreview.cs @@ -0,0 +1,131 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEditor; +using UnityEngine; +using UnityEngine.Experimental.Rendering; +using WaveHarmonic.Crest.Internal; + +namespace WaveHarmonic.Crest.Editor +{ + abstract class TexturePreview : ObjectPreview + { + public static bool AnyActivePreviews { get; private set; } + + UnityEditor.Editor _Editor; + RenderTexture _RenderTexture; + RenderTextureDescriptor _OriginalDescriptor = new(); + Texture _Current; + protected int _Slice; + bool _First = true; + + protected abstract Texture OriginalTexture { get; } + protected virtual Texture ModifiedTexture { get; } + + Texture Texture => ModifiedTexture != null ? ModifiedTexture : OriginalTexture; + + protected virtual bool Flipped => false; + + // Preview complains if not a certain set of formats. + bool Incompatible => !(GraphicsFormatUtility.IsIEEE754Format(Texture.graphicsFormat) + || GraphicsFormatUtility.IsNormFormat(Texture.graphicsFormat)); + + public TexturePreview() { } + + public override bool HasPreviewGUI() + { + AnyActivePreviews = false; + return OriginalTexture; + } + + public override void Cleanup() + { + base.Cleanup(); + Object.DestroyImmediate(_Editor); + if (_RenderTexture != null) _RenderTexture.Release(); + Object.DestroyImmediate(_RenderTexture); + } + + public override void OnPreviewSettings() + { + if (_First && Event.current.type == EventType.Repaint && !Application.isPlaying) + { + // Solves on enter edit mode: + // ArgumentException: Getting control 2's position in a group with only 2 controls when doing repaint + _First = false; + return; + } + + if (_Editor != null) _Editor.OnPreviewSettings(); + } + + public override void OnPreviewGUI(Rect rect, GUIStyle background) + { + AnyActivePreviews = true; + + // This check is in original. + if (Event.current.type == EventType.Repaint) + { + background.Draw(rect, false, false, false, false); + } + + var descriptor = Texture.GetDescriptor(); + + if (Helpers.RenderTextureNeedsUpdating(descriptor, _OriginalDescriptor)) + { + _OriginalDescriptor = descriptor; + + if (Incompatible) + { + descriptor.graphicsFormat = GraphicsFormat.R32G32B32A32_SFloat; + } + + Helpers.SafeCreateRenderTexture(ref _RenderTexture, descriptor); + _RenderTexture.Create(); + Object.DestroyImmediate(_Editor); + _Editor = UnityEditor.Editor.CreateEditor(_RenderTexture); + // Reset for incompatible copy. + descriptor = _OriginalDescriptor; + } + + // Name may change without texture changing (see SWS). + _RenderTexture.name = Texture.name + " (Preview)"; + + if (Incompatible) + { + var temporary = RenderTexture.GetTemporary(descriptor); + Graphics.CopyTexture(Texture, temporary); + Helpers.Blit(temporary, _RenderTexture); + RenderTexture.ReleaseTemporary(temporary); + } + else + { + Graphics.CopyTexture(Texture, _RenderTexture); + } + + _Editor.DrawPreview(rect); + } + +#if CREST_DEBUG + public override void OnInteractivePreviewGUI(Rect rect, GUIStyle background) + { + OnPreviewGUI(rect, background); + + // Show pixel value in preview. + _Slice = Development.Utility.GetPreviewSlice(_Editor, Texture); + var color = Development.Utility.InspectPixel(rect, OriginalTexture, Flipped, _Slice); + var text = Development.Utility.GetInspectPixelString(color, OriginalTexture); + EditorGUI.DropShadowLabel(new Rect(rect.x, rect.y, rect.width, 40), text); + } +#endif + + void Allocate(Texture texture) + { + // LOD with buffered data like foam will recreate every frame freezing controls. + if (_Editor != null && _Current == Texture) return; + _Current = texture; + Object.DestroyImmediate(_Editor); + _Editor = UnityEditor.Editor.CreateEditor(texture); + } + } +} diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/TexturePreview.cs.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/TexturePreview.cs.meta new file mode 100644 index 000000000..9d5f70da8 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/TexturePreview.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1c817389e2ce240f69487a0e78fc7091 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Validation.cs b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Validation.cs new file mode 100644 index 000000000..7d3c1c95b --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Validation.cs @@ -0,0 +1,302 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// How to use: +// Use or inherit from Crest.Editor.Inspector to support validation messages. +// Then create a static method with Validator attribute. + +using System.Collections.Generic; +using System.Reflection; +using UnityEditor; +using UnityEngine; +using WaveHarmonic.Crest.Internal; + +namespace WaveHarmonic.Crest.Editor +{ + using FixValidation = System.Action; + + [System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple = true, Inherited = true)] + sealed class Validator : System.Attribute + { + public readonly System.Type _Type; + + public Validator(System.Type type) + { + _Type = type; + } + } + + // Holds the shared list for messages + static class ValidatedHelper + { + public enum MessageType + { + Error, + Warning, + Info, + } + + public struct HelpBoxMessage + { + public string _Message; + public string _FixDescription; + public Object _Object; + public FixValidation _Action; + public string _PropertyPath; + } + + // This is a shared resource. It will be cleared before use. It is only used by the HelpBox delegate since we + // want to group them by severity (MessageType). Make sure length matches MessageType length. + public static readonly List[] s_Messages = new List[] + { + new(), + new(), + new(), + }; + + public delegate void ShowMessage(string message, string fixDescription, MessageType type, Object @object = null, FixValidation action = null, string property = null); + + public static void DebugLog(string message, string fixDescription, MessageType type, Object @object = null, FixValidation action = null, string property = null) + { + // Never log info validation to console. + if (type == MessageType.Info) + { + return; + } + + message = $"Crest Validation: {message} {fixDescription} Click this message to highlight the problem object."; + + switch (type) + { + case MessageType.Error: Debug.LogError(message, @object); break; + case MessageType.Warning: Debug.LogWarning(message, @object); break; + default: Debug.Log(message, @object); break; + } + } + + public static void HelpBox(string message, string fixDescription, MessageType type, Object @object = null, FixValidation action = null, string property = null) + { + s_Messages[(int)type].Add(new() { _Message = message, _FixDescription = fixDescription, _Object = @object, _Action = action, _PropertyPath = property }); + } + + public static void Suppressed(string message, string fixDescription, MessageType type, Object @object = null, FixValidation action = null, string property = null) + { + } + + public static T FixAttachComponent(SerializedObject componentOrGameObject) + where T : Component + { + return Undo.AddComponent(EditorHelpers.GetGameObject(componentOrGameObject)); + } + + internal static void FixSetMaterialOptionEnabled(SerializedObject material, string keyword, string floatParam, bool enabled) + { + var mat = material.targetObject as Material; + Undo.RecordObject(mat, $"Enable keyword {keyword}"); + mat.SetBoolean(Shader.PropertyToID(floatParam), enabled); + if (ArrayUtility.Contains(mat.shader.keywordSpace.keywordNames, keyword)) + { + mat.SetKeyword(keyword, enabled); + } + } + + internal static void FixSetMaterialIntProperty(SerializedObject material, string label, string intParam, int value) + { + var mat = material.targetObject as Material; + Undo.RecordObject(mat, $"change {label}"); + mat.SetInteger(intParam, value); + } + + public static void FixAddMissingMathPackage(SerializedObject _0, SerializedProperty _1) + { + PackageManagerHelpers.AddMissingPackage("com.unity.mathematics"); + } + + public static void FixAddMissingBurstPackage(SerializedObject _0, SerializedProperty _1) + { + PackageManagerHelpers.AddMissingPackage("com.unity.burst"); + } + + public static bool ValidateNoScale(Object @object, Transform transform, ShowMessage showMessage) + { + if (transform.lossyScale != Vector3.one) + { + showMessage + ( + $"There must be no scale on the {@object.GetType().Name} Transform or any of its parents." + + $"The current scale is {transform.lossyScale}.", + "Reset the scale on this Transform and all parents to one.", + MessageType.Error, @object + ); + + return false; + } + + return true; + } + + public static bool ValidateNoRotation(Object @object, Transform transform, ShowMessage showMessage) + { + if (transform.eulerAngles.magnitude > 0.0001f) + { + showMessage + ( + $"There must be no rotation on the {@object.GetType().Name} Transform or any of its parents." + + $"The current rotation is {transform.eulerAngles}.", + "Reset the rotation on this Transform and all parents to zero.", + MessageType.Error, @object + ); + + return false; + } + + return true; + } + + + + public static bool ValidateRenderer + ( + Component component, + Renderer renderer, + ShowMessage showMessage, + bool checkShaderPasses, + string shaderPrefix = null + ) + where T : Renderer + { + if (renderer == null) + { + var type = typeof(T); + var name = type.Name; + + // Give users a hint as to what "Renderer" really means. + if (type == typeof(Renderer)) + { + name += " (Mesh, Trail etc)"; + } + + showMessage + ( + $"A {name} component is required but none is assigned.", + "Provide a renderer.", + MessageType.Error, component + ); + + return false; + } + + var materials = renderer.sharedMaterials; + for (var i = 0; i < materials.Length; i++) + { + // Empty material slots is a user error. Unity complains about it so we should too. + if (materials[i] == null) + { + showMessage + ( + $"{renderer.GetType().Name} used by this input ({component.GetType().Name}) has empty material slots.", + "Remove these slots or fill them with a material.", + MessageType.Error, renderer + ); + } + } + + if (renderer is MeshRenderer) + { + renderer.gameObject.TryGetComponent(out var mf); + if (mf == null) + { + showMessage + ( + $"A MeshRenderer component is being used by this input but no MeshFilter component was found so there may not be any valid geometry to render.", + "Attach a MeshFilter component.", + MessageType.Error, renderer.gameObject, + (_, _) => Undo.AddComponent(renderer.gameObject) + ); + + return false; + } + else if (mf.sharedMesh == null) + { + showMessage + ( + $"A MeshRenderer component is being used by this input but no mesh is assigned to the MeshFilter component.", + "Assign the geometry to be rendered to the MeshFilter component.", + MessageType.Error, renderer.gameObject + ); + + return false; + } + } + + if (!ValidateMaterial(renderer.gameObject, showMessage, renderer.sharedMaterial, shaderPrefix, checkShaderPasses)) + { + return false; + } + + return true; + } + + public static bool ValidateMaterial(GameObject gameObject, ShowMessage showMessage, Material material, string shaderPrefix, bool checkShaderPasses) + { + if (shaderPrefix == null && material == null) + { + showMessage + ( + $"Mesh Renderer requires a material.", + "Assign a material.", + MessageType.Error, gameObject + ); + + return false; + } + + if (!material || material.shader && (!material.shader.name.StartsWithNoAlloc(shaderPrefix) && !material.shader.name.StartsWithNoAlloc($"Hidden/{shaderPrefix}") && !material.shader.name.Contains("/All/"))) + { + showMessage + ( + $"Shader assigned to water input expected to be of type {shaderPrefix}.", + "Assign a material that uses a shader of this type.", + MessageType.Error, gameObject + ); + + return false; + } + + if (checkShaderPasses && material.passCount > 1) + { + showMessage + ( + $"The shader {material.shader.name} for material {material.name} has multiple passes which might not work as expected as only the first pass is executed. " + + "This can be ignored in most cases, like Shader Graph, as only one pass is often required.", + "To have all passes execute then set Shader Pass Index to -1.", + MessageType.Info, gameObject + ); + } + + return true; + } + + public static bool ExecuteValidators(object target, ShowMessage messenger) + { + var isValid = true; + var type = target.GetType(); + var validators = TypeCache.GetMethodsWithAttribute(); + foreach (var validator in validators) + { + var attribute = validator.GetCustomAttribute(); + if (attribute._Type.IsAssignableFrom(type)) + { + isValid = (bool)validator.Invoke(null, new object[] { target, messenger }) && isValid; + } + } + + return isValid; + } + + public static bool ExecuteValidators(Object target) + { + return ExecuteValidators(target, DebugLog); + } + } +} diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Validation.cs.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Validation.cs.meta new file mode 100644 index 000000000..e57643517 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/Validation.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8e9a7f4ffb1bb41999902cd4310bf2d7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/WaveHarmonic.Crest.Shared.Editor.asmdef b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/WaveHarmonic.Crest.Shared.Editor.asmdef new file mode 100644 index 000000000..7cdcae75a --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/WaveHarmonic.Crest.Shared.Editor.asmdef @@ -0,0 +1,23 @@ +{ + "name": "WaveHarmonic.Crest.Shared.Editor", + "rootNamespace": "", + "references": [ + "GUID:056ff2a5b2f124d468c6655552acdca5", + "GUID:3eae0364be2026648bf74846acb8a731", + "GUID:df380645f10b7bc4b97d4f5eb6303d95", + "GUID:be0903cd8e1546f498710afdc59db5eb" + ], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": false, + "defineConstraints": [ + "UNITY_2022_3_OR_NEWER" + ], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/WaveHarmonic.Crest.Shared.Editor.asmdef.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/WaveHarmonic.Crest.Shared.Editor.asmdef.meta new file mode 100644 index 000000000..9f096bbcb --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Utility/Shared/WaveHarmonic.Crest.Shared.Editor.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 1ab2a6c2a51cd4b43867788dbaee1a55 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Validators.cs b/Packages/com.waveharmonic.crest/Editor/Scripts/Validators.cs new file mode 100644 index 000000000..ed45d2deb --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Validators.cs @@ -0,0 +1,1544 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using System.Linq; +using System.Reflection; +using UnityEditor; +using UnityEngine; +using UnityEngine.Rendering; +using UnityEngine.Rendering.Universal; +using WaveHarmonic.Crest.Internal; +using WaveHarmonic.Crest.Watercraft; + +using static WaveHarmonic.Crest.Editor.ValidatedHelper; +using MessageType = WaveHarmonic.Crest.Editor.ValidatedHelper.MessageType; + +namespace WaveHarmonic.Crest.Editor +{ + static class Validators + { + internal static WaterRenderer Water => Utility.Water; + + [Validator(typeof(LodInput))] + static bool ValidateTextureInput(LodInput target, ShowMessage messenger) + { + if (target.Data is not TextureLodInputData data) return true; + + var isValid = true; + + if (data._Texture == null) + { + messenger + ( + "Texture mode requires a texture.", + "Assign a texture.", + MessageType.Error, + target + ); + } + + return isValid; + } + + [Validator(typeof(LodInput))] + static bool ValidateGeometryInput(LodInput target, ShowMessage messenger) + { + if (target.Data is not GeometryLodInputData data) return true; + + var isValid = true; + + if (data._Geometry == null) + { + messenger + ( + "Geometry mode requires geometry (ie mesh).", + "Assign geometry.", + MessageType.Error, + target + ); + } + + return isValid; + } + + [Validator(typeof(LodInput))] + static bool ValidateRendererInput(LodInput target, ShowMessage messenger) + { + if (target.Data is not RendererLodInputData data) return true; + + // Check if Renderer component is attached. + var isValid = ValidateRenderer + ( + target, + data._Renderer, + messenger, + data._CheckShaderPasses && (!data._OverrideShaderPass || data._ShaderPassIndex != -1), + data._CheckShaderName ? data.ShaderPrefix : string.Empty + ); + + if (data._Renderer == null) + { + return isValid; + } + + // Can cause problems if culling masks are used. + if (!data._DisableRenderer) + { + isValid = ValidateRendererLayer(target.gameObject, messenger, Water) && isValid; + } + + var isPersistent = target is FoamLodInput or DynamicWavesLodInput or ShadowLodInput; + + var materials = data._Renderer.sharedMaterials; + for (var i = 0; i < materials.Length; i++) + { + var material = materials[i]; + if (material == null) continue; + + if (data._OverrideShaderPass && data._ShaderPassIndex > material.shader.passCount - 1) + { + messenger + ( + $"The shader {material.shader.name} used by this input has opted for the shader pass " + + $"index {data._ShaderPassIndex}, but there is only {material.shader.passCount} passes on the shader.", + "Choose a valid shader pass.", + MessageType.Error, target + ); + } + + if (isPersistent) + { + if (material.shader.name is "Crest/Inputs/All/Utility" or "Crest/Inputs/All/Scale") + { + messenger + ( + $"The shader {material.shader.name} currently is not supported by this simulation " + + "(Foam, Dynamic Waves or Shadow) as the shader does not support time steps.", + "Choose a valid shader (not Crest/Inputs/All/Utility or Crest/Inputs/All/Scale).", + MessageType.Error, target + ); + } + } + } + + return isValid; + } + + static bool ValidateRendererLayer(GameObject gameObject, ShowMessage messenger, WaterRenderer water) + { + if (water != null && gameObject.layer != water.Layer) + { + var layerName = LayerMask.LayerToName(water.Layer); + messenger + ( + $"The layer is not the same as the {nameof(WaterRenderer)}.{nameof(WaterRenderer.Layer)} ({layerName}) which can cause problems if the {layerName} layer is excluded from any culling masks.", + $"Set layer to {layerName}.", + MessageType.Warning, gameObject, + (_, _) => + { + Undo.RecordObject(gameObject, $"Change Layer to {layerName}"); + gameObject.layer = water.Layer; + } + ); + } + + // Is valid as not outright invalid but could be. + return true; + } + + static bool Validate(WaterReflections target, ShowMessage messenger, WaterRenderer water) + { + var isValid = true; + + if (!target._Enabled) + { + return isValid; + } + + var material = water.Material; + + if (material != null) + { + if (material.HasProperty(WaterRenderer.ShaderIDs.s_PlanarReflectionsEnabled) && material.GetFloat(WaterRenderer.ShaderIDs.s_PlanarReflectionsEnabled) == 0) + { + messenger + ( + $"Planar Reflections are not enabled on the {material.name} material and will not be visible.", + $"Enable Planar Reflections on the material ({material.name}) currently assigned to the {nameof(WaterRenderer)} component.", + MessageType.Warning, material + ); + } + + if (material.HasProperty(WaterRenderer.ShaderIDs.s_Occlusion) && target._Mode != WaterReflectionSide.Below && material.GetFloat(WaterRenderer.ShaderIDs.s_Occlusion) == 0) + { + messenger + ( + $"Occlusion is set to zero on the {material.name} material. Planar reflections will not be visible.", + $"Increase Occlusion on the material ({material.name}) currently assigned to the {nameof(WaterRenderer)} component.", + MessageType.Warning, material + ); + } + + if (material.HasProperty(WaterRenderer.ShaderIDs.s_OcclusionUnderwater) && target._Mode != WaterReflectionSide.Above && material.GetFloat(WaterRenderer.ShaderIDs.s_OcclusionUnderwater) == 0) + { + messenger + ( + $"Occlusion (U) is set to zero on the {material.name} material. Planar reflections will not be visible.", + $"Increase Occlusion (U) on the material ({material.name}) currently assigned to the {nameof(WaterRenderer)} component.", + MessageType.Warning, material + ); + } + } + + if (!target._Sky) + { + messenger + ( + $"Sky on Reflections is not enabled. " + + "Any custom shaders which do not write alpha (eg some tree leaves) will not appear in the final reflections.", + "Enable Sky.", + MessageType.Info, target._Water, + (_, y) => y.boolValue = true, + $"{nameof(WaterRenderer._Reflections)}.{nameof(WaterReflections._Sky)}" + + ); + } + +#if !UNITY_6000_0_OR_NEWER +#if d_UnityHDRP + if (!target._RenderOnlySingleCamera && RenderPipelineHelper.IsHighDefinition) + { + messenger + ( + $"Please note that Reflections > Render Only Single Camera has no effect for Unity 2022.3 HDRP. " + + "It is forced to enabled, as HDRP cannot render to multiple cameras, as it requires recursive rendering.", + "Upgrade to Unity 6 if you need this feature.", + MessageType.Info, target._Water + ); + } +#endif +#endif + + return isValid; + } + + static bool Validate(UnderwaterRenderer target, ShowMessage messenger, WaterRenderer water) + { + var isValid = true; + + if (!target._Enabled) + { + return isValid; + } + + if (water != null && water.Material != null) + { + var material = water.Material; + + var cullModeName = +#if d_UnityURP + RenderPipelineHelper.IsUniversal ? "_Cull" : +#endif +#if d_UnityHDRP + RenderPipelineHelper.IsHighDefinition ? "_CullMode" : +#endif + "_BUILTIN_CullMode"; + + if (material.HasFloat(cullModeName) && material.GetFloat(cullModeName) == (int)CullMode.Back) + { + messenger + ( + $"Cull Mode is set to Back on material {material.name}. " + + "The underside of the water surface will not be rendered.", + $"Set Cull Mode to Off (or Front) on {material.name}.", + MessageType.Warning, material, + (material, _) => + { + FixSetMaterialIntProperty(material, "Cull Mode", cullModeName, (int)CullMode.Off); + if (RenderPipelineHelper.IsHighDefinition) + { + // HDRP material will not update without viewing it... + Selection.activeObject = material.targetObject; + } + } + ); + } + +#if d_UnityHDRP + if (RenderPipelineHelper.IsHighDefinition) + { + if (material.GetFloat(cullModeName) == (int)CullMode.Off && !material.IsKeywordEnabled("_DOUBLESIDED_ON")) + { + messenger + ( + $"Double-Sided is not enabled on material {material.name}. " + + "The underside of the water surface will not be rendered correctly.", + $"Enable Double-Sided on {material.name}.", + MessageType.Warning, material, + (material, _) => + { + FixSetMaterialOptionEnabled(material, "_DOUBLESIDED_ON", "_DoubleSidedEnable", enabled: true); + // HDRP material will not update without viewing it... + Selection.activeObject = material.targetObject; + } + ); + } + } +#endif + } + + return isValid; + } + + [Validator(typeof(WaterRenderer))] + static bool Validate(WaterRenderer target, ShowMessage messenger) + { + var isValid = true; + + var water = target; + + isValid = isValid && Validate(target._Underwater, messenger, target); + isValid = isValid && Validate(target._Reflections, messenger, target); + isValid = isValid && ValidateNoRotation(target, target.transform, messenger); + isValid = isValid && ValidateNoScale(target, target.transform, messenger); + +#if CREST_OCEAN + messenger + ( + "The CREST_OCEAN scripting symbol is present from Crest 4. " + + "This enables migration mode. Please read the documentation for the migration guide.", + "Remove CREST_OCEAN from Project Settings > Player > Other Settings > Scripting Define Symbols once finished migrating.", + MessageType.Info, target + ); +#endif + + if (target._Resources == null) + { + messenger + ( + "The Water Renderer is missing required internal data.", + "Populate required internal data.", + MessageType.Error, target, + (_, y) => y.objectReferenceValue = WaterResources.Instance, + nameof(target._Resources) + ); + + isValid = false; + } + + if (target.Material == null) + { + messenger + ( + "No water material specified.", + $"Assign a valid water material to the Material property of the {nameof(WaterRenderer)} component.", + MessageType.Error, target + ); + + isValid = false; + } + else + { + isValid = ValidateWaterMaterial(target, messenger, water, target.Material) && isValid; + + if (RenderPipelineHelper.IsHighDefinition && target.Material.GetFloat("_RefractionModel") > 0) + { + messenger + ( + $"Refraction Model is not None for {target.Material}. " + + "This is set by default so it is available in the inspector, " + + "but it incurs an overhead and will produce a dark edge at the edge of the viewport (see Screen Space Refraction > Screen Weight Distance). " + + "Enabling the refraction model is only useful to allow volumetric clouds to render over the water surface when view from above. " + + "The refraction model has no effect on refractions.", + $"Set Refraction Model to None.", + MessageType.Info, target.Material + ); + } + + if (RenderPipelineHelper.IsHighDefinition && target.Material.HasFloat("_TransparentWritingMotionVec") && target.WriteMotionVectors != (target.Material.GetFloat("_TransparentWritingMotionVec") == 1f)) + { + messenger + ( + $"Water Renderer > Surface Renderer > Motion Vectors and Transparent Writes Motion Vectors on {target.Material} do not match. ", + $"Either disable or enable both Water Renderer > Surface Renderer > Motion Vectors and Transparent Writes Motion Vectors", + MessageType.Info, target.Material + ); + } + + ValidateMaterialParent(target._VolumeMaterial, target.Material, messenger); + } + + if (Object.FindObjectsByType(FindObjectsInactive.Exclude, FindObjectsSortMode.None).Length > 1) + { + messenger + ( + $"Multiple {nameof(WaterRenderer)} components detected in open scenes, this is not typical - usually only one {nameof(WaterRenderer)} is expected to be present.", + $"Remove extra {nameof(WaterRenderer)} components.", + MessageType.Warning, target + ); + + isValid = false; + } + + // Water Detail Parameters + var baseMeshDensity = target.LodResolution * 0.25f / target._GeometryDownSampleFactor; + + if (baseMeshDensity < 8) + { + messenger + ( + "Base mesh density is lower than 8. There will be visible gaps in the water surface.", + "Increase the LOD Data Resolution or decrease the Geometry Down Sample Factor.", + MessageType.Error, target + ); + } + else if (baseMeshDensity < 16) + { + messenger + ( + "Base mesh density is lower than 16. There will be visible transitions when traversing the water surface. ", + "Increase the LOD Data Resolution or decrease the Geometry Down Sample Factor.", + MessageType.Warning, target + ); + } + + // We need to find hidden probes too, but do not include assets. + if (Resources.FindObjectsOfTypeAll().Where(x => !EditorUtility.IsPersistent(x)).Count() > 0) + { + messenger + ( + "There are reflection probes in the scene. These can cause tiling to appear on the water surface if not set up correctly.", + "For reflections probes that affect the water, they will either need to cover the visible water tiles or water tiles need to ignore reflection probes (can done done with Water Tile Prefab field). " + + $"For all reflection probles that include the {LayerMask.LayerToName(target.Layer)} layer, make sure they are above the water surface as underwater reflections are not supported.", + MessageType.Info, target + ); + } + + // Validate scene view effects options. + if (SceneView.lastActiveSceneView != null && !Application.isPlaying) + { + var sceneView = SceneView.lastActiveSceneView; + + // Validate "Animated Materials". + if (target != null && !target._ShowWaterProxyPlane && !sceneView.sceneViewState.alwaysRefresh) + { + messenger + ( + "Animated Materials is not enabled on the scene view. The water's framerate will appear low as updates are not real-time.", + "Enable Animated Materials on the scene view.", + MessageType.Info, target, + (_, _) => + { + SceneView.lastActiveSceneView.sceneViewState.alwaysRefresh = true; + // Required after changing sceneViewState according to: + // https://docs.unity3d.com/ScriptReference/SceneView.SceneViewState.html + SceneView.RepaintAll(); + } + ); + } + +#if d_UnityPostProcessingBroken + // Validate "Post-Processing". + // Only check built-in renderer and Camera.main with enabled PostProcessLayer component. + if (GraphicsSettings.currentRenderPipeline == null && Camera.main != null && + Camera.main.TryGetComponent(out var ppLayer) + && ppLayer.enabled && sceneView.sceneViewState.showImageEffects) + { + messenger + ( + "Post Processing is enabled on the scene view. " + + "There is a Unity bug where gizmos and grid lines will render over opaque objects. " + + "This has been resolved in Post Processing version 3.4.0.", + "Disable Post Processing on the scene view or upgrade to version 3.4.0.", + MessageType.Warning, target, + _ => + { + sceneView.sceneViewState.showImageEffects = false; + // Required after changing sceneViewState according to: + // https://docs.unity3d.com/ScriptReference/SceneView.SceneViewState.html + SceneView.RepaintAll(); + } + ); + } +#endif + } + + // Validate simulation settings. + foreach (var simulation in target.Simulations) + { + ExecuteValidators(simulation, messenger); + } + + // For safety. + if (target != null && target.Material != null) + { + foreach (var simulation in target.Simulations) + { + ValidateSimulationAndMaterial(OptionalLod.Get(simulation.GetType()), messenger, water); + } + } + + if (target.PrimaryLight == null) + { + messenger + ( + "Crest needs to know which light to use as the sun light.", + "Please add a Directional Light to the scene.", + MessageType.Warning, target + ); + } + + if (target.Viewer == null) + { + messenger + ( + "Crest needs to know which camera to use as the main camera.", + $"Either tag a camera as Main Camera or assign the camera to the {nameof(WaterRenderer)}.", + MessageType.Error, target + ); + + isValid = false; + } + +#if d_UnityHDRP + if (RenderPipelineHelper.IsHighDefinition) + { + var hdAsset = GraphicsSettings.currentRenderPipeline as UnityEngine.Rendering.HighDefinition.HDRenderPipelineAsset; + var mvs = hdAsset.currentPlatformRenderPipelineSettings.supportMotionVectors; + + // Only check the RP asset for now. + if (mvs != water.WriteMotionVectors) + { + messenger + ( + $"Motion Vectors are{(mvs ? "" : " not")} enabled in the HD render pipeline asset, but Water Renderer > Surface Renderer > Motion Vectors is{(mvs ? " not" : "")}. " + + "Both need to be enabled for motion vectors to work, or both should be disabled to save resources. " + + "This can safely be ignored if the setup is intentional.", + "Enable or disable both.", + MessageType.Info, target + ); + } + } +#endif // d_UnityHDRP + +#if d_UnityURP + if (RenderPipelineHelper.IsUniversal && target.Viewer != null) + { + var data = target.Viewer.GetUniversalAdditionalCameraData(); + + // Type is internal. + if (data != null && data.scriptableRenderer.GetType().Name == "Renderer2D") + { + messenger + ( + "Crest does not support 2D rendering.", + "Please choose a 3D template.", + MessageType.Error, target + ); + + isValid = false; + } + } +#endif // d_UnityURP + + if (!RenderPipelineHelper.IsHighDefinition && target.Material != null) + { + if (!target.AllowRenderQueueSorting && !System.Enum.IsDefined(typeof(RenderQueue), target.Material.renderQueue)) + { + var field = nameof(WaterRenderer.AllowRenderQueueSorting).Pretty().Italic(); + messenger + ( + $"The render queue has a sub-sort applied, but {field} is not enabled. Sub-sorting will not work.", + $"Enable {field}.", + MessageType.Warning, target + ); + } + } + + return isValid; + } + + [Validator(typeof(WaterBody))] + static bool Validate(WaterBody target, ShowMessage messenger) + { + var isValid = true; + + if (Object.FindObjectsByType(FindObjectsInactive.Include, FindObjectsSortMode.None).Length == 0) + { + messenger + ( + $"Water body {target.gameObject.name} requires an water renderer component to be present.", + $"Create a separate GameObject and add an {nameof(WaterRenderer)} component to it.", + MessageType.Error, target + ); + + isValid = false; + } + + if (Mathf.Abs(target.transform.lossyScale.x) < 2f && Mathf.Abs(target.transform.lossyScale.z) < 2f) + { + messenger + ( + $"Water body {target.gameObject.name} has a very small size (the size is set by the X & Z scale of its transform), and will be a very small body of water.", + "Increase X & Z scale on water body transform (or parents).", + MessageType.Error, target + ); + + isValid = false; + } + + if (target._Material != null) + { + isValid = ValidateWaterMaterial(target, messenger, Water, target._Material) && isValid; + ValidateMaterialParent(target._BelowSurfaceMaterial, target._Material, messenger); + } + + isValid = isValid && ValidateNoRotation(target, target.transform, messenger); + + return isValid; + } + + + /// + /// Does validation for a feature on the water component and on the material + /// + internal static bool ValidateLod(OptionalLod target, ShowMessage messenger, WaterRenderer water, string dependent = null) + { + var isValid = true; + + if (target == null || water == null) + { + return isValid; + } + + var simulation = target.GetLod(water); + + var dependentClause = "."; + + if (dependent != null) + { + dependentClause = $", as {dependent} needs it."; + } + + if (!simulation._Enabled) + { + messenger + ( + $"{target.PropertyLabel} must be enabled on the {nameof(WaterRenderer)} component{dependentClause}", + $"Enable Simulations > {target.PropertyLabel} > Enabled on the {nameof(WaterRenderer)} component.", + MessageType.Error, water, + (_, y) => + { + y.boolValue = true; + if (Water.Active) + { + // ApplyModifiedProperties is called outside of this method but need it for next + // call. Then restore so ApplyModifiedProperties check works to add undo entry. + simulation._Enabled = true; + simulation.Initialize(); + simulation._Enabled = false; + } + }, + $"{target.PropertyName}.{nameof(Lod._Enabled)}" + ); + + isValid = false; + } + + var material = water.Material; + + if (target.HasMaterialToggle && material != null) + { + if (material.HasProperty(target.MaterialProperty) && material.GetFloat(target.MaterialProperty) != 1f) + { + ShowMaterialValidationMessage(target, material, messenger); + isValid = false; + } + } + + if (target.Dependency != null) + { + ValidateLod(OptionalLod.Get(target.Dependency), messenger, water, dependent); + } + + return isValid; + } + + static bool ValidateSignedDistanceFieldsLod(ShowMessage messenger, WaterRenderer water, string feature) + { + var isValid = true; + + if (water != null && !water.DepthLod.EnableSignedDistanceFields) + { + messenger + ( + $"{feature} requires Signed Distance Fields to be enabled on the Water Depth Simulation.", + "Enable Signed Distance Fields", + MessageType.Error, water, + (_, y) => y.boolValue = true, + $"{nameof(WaterRenderer._DepthLod)}.{nameof(DepthLod._EnableSignedDistanceFields)}" + ); + + isValid = false; + } + + return isValid; + } + + static void ShowMaterialValidationMessage(OptionalLod target, Material material, ShowMessage messenger) + { + messenger + ( + $"{target.PropertyLabel} is not enabled ({target.MaterialPropertyPath}) on the water material and will not be visible.", + $"Enable {target.PropertyLabel} on the material currently assigned to the {nameof(WaterRenderer)} component.", + MessageType.Error, material, + (material, _) => FixSetMaterialOptionEnabled(material, target.MaterialKeyword, target.MaterialProperty, true) + ); + } + + static bool ValidateSimulationAndMaterial(OptionalLod target, ShowMessage messenger, WaterRenderer water) + { + if (target == null) + { + return true; + } + + if (!target.HasMaterialToggle) + { + return true; + } + + // These checks are not necessary for our material but there may be custom materials. + if (!water.Material.HasProperty(target.MaterialProperty)) + { + return true; + } + + var feature = target.GetLod(water); + + // There is only a problem if there is a mismatch. + if (feature.Enabled == (water.Material.GetFloat(target.MaterialProperty) == 1f)) + { + return true; + } + + if (feature.Enabled) + { + ShowMaterialValidationMessage(target, water.Material, messenger); + } + else if (messenger != DebugLog) + { + messenger + ( + $"The {target.PropertyLabel} feature is disabled on the {nameof(WaterRenderer)} but is enabled on the water material.", + $"If this is not intentional, either enable {target.PropertyLabel} on the {nameof(WaterRenderer)} to turn it on, or disable {target.MaterialPropertyPath} on the water material to save performance.", + MessageType.Warning, water + ); + } + + return false; + } + + [Validator(typeof(ShapeWaves))] + static bool Validate(ShapeWaves target, ShowMessage messenger) + { + var isValid = true; + + var water = Object.FindAnyObjectByType(FindObjectsInactive.Include); + + if (!target.OverrideGlobalWindSpeed && water != null && water.WindSpeedKPH < WaterRenderer.k_MaximumWindSpeedKPH) + { + messenger + ( + $"The wave spectrum is limited by the Global Wind Speed on the Water Renderer to {water.WindSpeedKPH} KPH.", + $"If you want fully developed waves, either override the wind speed on this component or increase the Global Wind Speed.", + MessageType.Info + ); + } + + if (target.Blend == LodInputBlend.AlphaClip && target.Mode is not LodInputMode.Texture or LodInputMode.Paint) + { + messenger + ( + $"Only {LodInputMode.Texture} mode supports {nameof(LodInputBlend.AlphaClip)}.", + $"Change Blend to {nameof(LodInputBlend.Alpha)}.", + MessageType.Error, target, + (_, y) => y.enumValueIndex = (int)LodInputBlend.Alpha, + nameof(ShapeWaves._Blend) + ); + } + + if (Water != null) + { + isValid &= ValidateLod(OptionalLod.Get(typeof(AnimatedWavesLod)), messenger, Water); + } + + return isValid; + } + + [Validator(typeof(SphereWaterInteraction))] + static bool Validate(SphereWaterInteraction target, ShowMessage messenger) + { + var isValid = true; + + // Validate require water feature. + if (Water != null) + { + isValid &= ValidateLod(OptionalLod.Get(typeof(DynamicWavesLod)), messenger, Water); + } + + return isValid; + } + + [Validator(typeof(WatertightHull))] + static bool Validate(WatertightHull target, ShowMessage messenger) + { + var isValid = true; + + // Validate require water feature. + if (Water != null) + { + isValid &= !target.UsesClip || ValidateLod(OptionalLod.Get(typeof(ClipLod)), messenger, Water); + isValid &= !target.UsesDisplacement || ValidateLod(OptionalLod.Get(typeof(AnimatedWavesLod)), messenger, Water); + isValid &= !target.UsesDisplacement || ValidateCollisionLayer(CollisionLayer.AfterDynamicWaves, target, messenger, "mode", target.Mode, required: true); + } + + return isValid; + } + + internal static void FixSetCollisionSourceToCompute(SerializedObject _, SerializedProperty property) + { + if (Water != null) + { + property.enumValueIndex = (int)CollisionSource.GPU; + } + } + + [Validator(typeof(FloatingObject))] + static bool Validate(FloatingObject target, ShowMessage messenger) + { + var isValid = true; + + isValid &= ValidateComponent(target, messenger, target.RigidBody); + + if (Water == null) + { + return isValid; + } + + isValid &= ValidateCollisionLayer(target.Layer, target, messenger, "layer", target.Layer, required: false); + isValid &= ValidateCollisionSource(target, messenger); + + return isValid; + } + + [Validator(typeof(CollisionAreaVisualizer))] + static bool Validate(CollisionAreaVisualizer target, ShowMessage messenger) + { + var isValid = true; + + if (Water == null) + { + return isValid; + } + + isValid &= ValidateCollisionLayer(target._Layer, target, messenger, "layer", target._Layer, required: false); + isValid &= ValidateCollisionSource(target, messenger); + + return isValid; + } + + [Validator(typeof(Controller))] + static bool Validate(Controller target, ShowMessage messenger) + { + var isValid = true; + + isValid &= ValidateComponent(target, messenger, target.Control); + isValid &= ValidateComponent(target, messenger, target.FloatingObject); + + isValid &= isValid && target.TryGetComponent(out FloatingObject fo) && fo.RigidBody != null; + + return isValid; + } + + [Validator(typeof(LodInput))] + static bool Validate(LodInput target, ShowMessage messenger) + { + var isValid = true; + + var isDataInput = target.Mode is LodInputMode.Spline or LodInputMode.Texture or LodInputMode.Renderer or LodInputMode.Paint; + + if (isDataInput) + { + // Find the type associated with the input type and mode. + var self = target.GetType(); + var types = TypeCache.GetTypesWithAttribute(); + System.Type type = null; + foreach (var t in types) + { + var attributes = t.GetCustomAttributes(); + foreach (var attribute in attributes) + { + if (!attribute._Type.IsAssignableFrom(self)) continue; + if (attribute._Mode != target.Mode) continue; + type = t; + goto exit; + } + } + + exit: + isValid = type != null; + +#if !d_CrestPaint + if (!isValid && target.Mode == LodInputMode.Paint) + { + messenger + ( + "Missing the Crest: Paint package.", + $"Install the missing package or select a valid Input Mode such as {target.DefaultMode} to use this input.", + MessageType.Error, + target, + (_, y) => y.enumValueIndex = (int)target.DefaultMode, + nameof(target.Mode) + ); + + return isValid; + } +#endif + +#if !d_CrestSpline + if (!isValid && target.Mode == LodInputMode.Spline) + { + messenger + ( + "Missing the Crest: Spline package.", + $"Install the missing package or select a valid Input Mode such as {target.DefaultMode} to use this input.", + MessageType.Error, + target, + (_, y) => y.enumValueIndex = (int)target.DefaultMode, + nameof(target.Mode) + ); + + return isValid; + } +#endif + + if (!isValid) + { + messenger + ( + "Invalid or unset Input Mode setting.", + $"Select a valid Input Mode such as {target.DefaultMode} to use this input.", + MessageType.Error, + target, + (_, y) => y.enumValueIndex = (int)target.DefaultMode, + nameof(target._Mode) + ); + + return isValid; + } + + isValid = target.Data != null; + + if (!isValid) + { + var isPrefabInstance = PrefabUtility.IsPartOfPrefabInstance(target); + messenger + ( + "Missing internal data or data type was renamed.", + isPrefabInstance ? "Repair the component in the prefab." : "Repair component.", + MessageType.Error, + target, + isPrefabInstance ? null : (_, _) => + { + Undo.RecordObject(target, "Repair"); + target.ChangeMode(target.Mode); + EditorUtility.SetDirty(target); + } + ); + + return isValid; + } + + isValid = target.Data.GetType() == type; + + // This might happen if scripting is used. + if (!isValid) + { + messenger + ( + $"Instance set to {nameof(LodInput.Data)} as incorrect type.", + "Set the correct instance type.", + MessageType.Error, + target, + (_, _) => + { + Undo.RecordObject(target, "Repair"); + target.ChangeMode(target.Mode); + EditorUtility.SetDirty(target); + } + ); + + return isValid; + } + } + + isValid &= ValidateFilteredChoice((int)target.Blend, "_Blend", target, messenger); + + // Validate that any water feature required for this input is enabled, if any + if (Water != null) + { + isValid &= ValidateLod(OptionalLod.Get(target.GetType()), messenger, Water); + } + + return isValid; + } + + [Validator(typeof(DepthProbe))] + static bool Validate(DepthProbe target, ShowMessage messenger) + { + var isValid = true; + + var camera = target._Camera; + if (camera != null && camera.targetTexture != null && target.RealtimeTexture != null) + { + if (target.Outdated) + { + messenger + ( + "Depth Probe is outdated.", + "Click Populate or re-bake the probe to bring the probe up-to-date with component changes.", + MessageType.Warning, target, + (_, _) => target.Populate() + ); + } + } + + if (target.Type == DepthProbeMode.Baked) + { + messenger + ( + "To change any read-only settings, switch back to real-time, adjust settings, and re-bake.", + "", + MessageType.Info, target + ); + + if (target.SavedTexture == null) + { + messenger + ( + "Depth probe type is Baked but no saved probe data is provided.", + "Assign a saved probe asset.", + MessageType.Error, target + ); + + isValid = false; + } + } + else + { + if (target._Layers == 0) + { + messenger + ( + "No layers specified for rendering into depth probe.", + "Specify one or may layers using the Layers field.", + MessageType.Error, target + ); + + isValid = false; + } + + if (target._Debug._ForceAlwaysUpdateDebug) + { + messenger + ( + $"Force Always Update Debug option is enabled on depth probe {target.gameObject.name}, which means it will render every frame instead of running from the probe.", + "Disable the Force Always Update Debug option.", + MessageType.Warning, target, + (_, y) => y.boolValue = false, + $"{nameof(DepthProbe._Debug)}.{nameof(DepthProbe._Debug._ForceAlwaysUpdateDebug)}" + ); + } + + if (target._Resolution < 4) + { + messenger + ( + $"Probe resolution {target._Resolution} is very low, which may not be intentional.", + "Increase the probe resolution.", + MessageType.Error, target + ); + + isValid = false; + } + + if (!Mathf.Approximately(target.Scale.x, target.Scale.y)) + { + messenger + ( + $"The {nameof(DepthProbe)} in real-time only supports a uniform scale for X and Z. " + + "These values currently do not match. " + + $"Its current scale in the hierarchy is: X = {target.Scale.x} Z = {target.Scale.y}.", + "Ensure the X & Z scale values are equal on this object and all parents in the hierarchy.", + MessageType.Error, target + ); + + isValid = false; + } + + // We used to test if nothing is present that would render into the probe, but these could probably come from other scenes. + } + + if (!target.Managed && target.transform.lossyScale.XZ().magnitude < 5f) + { + messenger + ( + $"{nameof(DepthProbe)} transform scale is small and will capture a small area of the world. The scale sets the size of the area that will be probed, and this probe is set to render a very small area.", + "Increase the X & Z scale to increase the size of the probe.", + MessageType.Warning, target + ); + + isValid = false; + } + + if (!target.Managed && target.transform.lossyScale.y <= 0f) + { + messenger + ( + $"{nameof(DepthProbe)} scale is zero or negative. Y should be set to 1.0, but can be other values providing it is greater than zero. Its current scale in the hierarchy is {target.transform.lossyScale.y}.", + "Set the Y scale to 1.0.", + MessageType.Error, target + ); + + isValid = false; + } + +#if d_UnityURP +#if !UNITY_6000_0_OR_NEWER +#if UNITY_2022_3_OR_NEWER + if (int.Parse(Application.unityVersion.Substring(7, 2)) < 23) + { + // Asset based validation. + foreach (var asset in GraphicsSettings.allConfiguredRenderPipelines) + { + if (asset is UniversalRenderPipelineAsset urpAsset) + { + var urpRenderers = Helpers.UniversalRendererData(urpAsset); + + foreach (var renderer in urpRenderers) + { + var urpRenderer = (UniversalRendererData)renderer; + + if (urpRenderer.depthPrimingMode != DepthPrimingMode.Disabled) + { + messenger + ( + $"{nameof(DepthPrimingMode)} is not set to {nameof(DepthPrimingMode.Disabled)}. " + + $"This can cause the {nameof(DepthProbe)} not to work. " + + $"Unity fixed this in 2022.3.23f1.", + $"If you are experiencing problems, disable depth priming or upgrade Unity.", + MessageType.Info, urpRenderer + ); + } + + foreach (var feature in renderer.rendererFeatures) + { + if (feature.GetType().Name == "ScreenSpaceAmbientOcclusion" && feature.isActive) + { + messenger + ( + $"ScreenSpaceAmbientOcclusion is is active. " + + $"This can cause the {nameof(DepthProbe)} not to work. " + + $"Unity fixed this in 2022.3.23f1.", + $"If you are experiencing problems, disable SSAO or upgrade Unity.", + MessageType.Info, urpRenderer + ); + } + } + } + } + } + } +#endif +#endif +#endif + + // Check that there are no renderers in descendants. + var renderers = target.GetComponentsInChildren(); + if (renderers.Length > 0) + { + foreach (var renderer in renderers) + { + messenger + ( + "It is not expected that a depth probe object has a Renderer component in its hierarchy." + + "The probe is typically attached to an empty GameObject. Please refer to the example content.", + "Remove the Renderer component from this object or its children.", + MessageType.Warning, renderer + ); + + // Reporting only one renderer at a time will be enough to avoid overwhelming user and UI. + break; + } + + isValid = false; + } + + var water = Water; + + // Validate require water feature. + if (water != null) + { + isValid = isValid && ValidateLod(OptionalLod.Get(typeof(DepthLod)), messenger, water); + + if (!water._DepthLod._EnableSignedDistanceFields && target._GenerateSignedDistanceField) + { + isValid = isValid && ValidateSignedDistanceFieldsLod(messenger, water, "Generate Signed Distance Field"); + } + } + + + return isValid; + } + + [Validator(typeof(QueryEvents))] + static bool Validate(QueryEvents target, ShowMessage messenger) + { + var isValid = true; + var water = Water; + + if (!target._DistanceFromEdge.IsEmpty()) + { + isValid = isValid && ValidateLod(OptionalLod.Get(typeof(DepthLod)), messenger, water); + isValid = isValid && ValidateSignedDistanceFieldsLod(messenger, water, "Distance From Edge"); + } + + if (!target._DistanceFromSurface.IsEmpty()) + { + isValid &= ValidateCollisionLayer(target._Layer, target, messenger, "layer", target._Layer, required: false); + isValid &= ValidateCollisionSource(target, messenger); + } + + return isValid; + } + + [Validator(typeof(FoamLodSettings))] + static bool Validate(FoamLodSettings target, ShowMessage messenger) + { + var isValid = true; + + if (Water == null) + { + return isValid; + } + + if (target.FilterWaves > Water.LodLevels - 2) + { + messenger + ( + "Filter Waves is higher than the recommended maximum (LOD count - 2). There will be no whitecaps.", + "Reduce Filter Waves.", + MessageType.Warning, target + ); + } + + return isValid; + } + + [Validator(typeof(Lod))] + static bool Validate(Lod target, ShowMessage messenger) + { + var isValid = true; + + if (!target._Enabled) + { + return isValid; + } + + var optional = OptionalLod.Get(target.GetType()); + + if (Water != null && optional.Dependency != null) + { + isValid &= ValidateLod(OptionalLod.Get(optional.Dependency), messenger, Water, target.Name); + } + + return isValid; + } + + [Validator(typeof(AnimatedWavesLod))] + static bool Validate(AnimatedWavesLod target, ShowMessage messenger) + { + var isValid = true; + +#if !d_CrestCPUQueries + if (target.CollisionSource == CollisionSource.CPU) + { + messenger + ( + "Collision Source is set to CPU but the CPU Queries package is not installed.", + "Install the CPU Queries package or switch to GPU queries.", + MessageType.Warning, target.Water, + FixSetCollisionSourceToCompute + ); + } +#endif + + if (target.CollisionSource == CollisionSource.None) + { + messenger + ( + "Collision Source in Water Renderer is set to None. The floating objects in the scene will use a flat horizontal plane.", + "Set collision source to GPU.", + MessageType.Warning, target.Water, + FixSetCollisionSourceToCompute, + $"{nameof(WaterRenderer._AnimatedWavesLod)}.{nameof(AnimatedWavesLod._CollisionSource)}" + + ); + } + + return isValid; + } + + [Validator(typeof(ScatteringLod))] + static bool Validate(ScatteringLod target, ShowMessage messenger) + { + var isValid = true; + + var water = Water; + + if (!target.Enabled) + { + return isValid; + } + + if (target._ShorelineColorSource != ShorelineVolumeColorSource.None) + { + if (!water._DepthLod._Enabled) + { + ShowDependentPropertyMessage + ( + "Shoreline Scattering", + "Water Depth", + $"{nameof(WaterRenderer._DepthLod)}.{nameof(Lod._Enabled)}", + messenger, + water + ); + } + else if (target._ShorelineColorSource == ShorelineVolumeColorSource.Distance && !water._DepthLod._EnableSignedDistanceFields) + { + ShowDependentPropertyMessage + ( + "Shoreline Distance Scattering", + "Signed Distance Fields", + $"{nameof(WaterRenderer._DepthLod)}.{nameof(WaterRenderer._DepthLod._EnableSignedDistanceFields)}", + messenger, + water + ); + } + } + + return isValid; + } + + [Validator(typeof(CutsceneTimeProvider))] + static bool Validate(CutsceneTimeProvider target, ShowMessage messenger) + { + var isValid = true; + + var water = Water; + if (water == null) + { + messenger + ( + $"No water present. {nameof(CutsceneTimeProvider)} will have no effect.", + "", MessageType.Warning + ); + + isValid = false; + } + +#if d_ModuleUnityDirector + if (target._PlayableDirector == null) + { + messenger + ( + $"No {nameof(UnityEngine.Playables.PlayableDirector)} component assigned. {nameof(CutsceneTimeProvider)} will have no effect.", + $"Add a {nameof(UnityEngine.Playables.PlayableDirector)}", + MessageType.Error + ); + + isValid = false; + } +#else + messenger + ( + $"This component requires the com.unity.modules.director built-in module to function.", + $"Enable the com.unity.modules.director built-in module.", + MessageType.Error + ); + + isValid = false; +#endif + + return isValid; + } + + static bool ValidateWaterMaterial(Object target, ShowMessage messenger, WaterRenderer water, Material material) + { + var isValid = true; + + // TODO: We could be even more granular with what needs this property. + if (water._Underwater._Enabled && !material.HasVector(WaterRenderer.ShaderIDs.s_Absorption)) + { + messenger + ( + $"Material {material.name} does not have Crest Absorption property. " + + "Several features require absorption like underwater culling and lighting.", + $"Assign a valid water material.", + MessageType.Warning, target + ); + } + + return isValid; + } + + static bool ValidateMaterialParent(Material child, Material parent, ShowMessage messenger) + { + var isValid = true; + + if (child != null && child.parent != parent) + { + messenger + ( + $"The {child} does not have {parent} as a parent. " + + "Linking these materials is typically how these are used to avoid trying to keep properties in sync.", + $"Parent {parent} to {child}.", + MessageType.Info, parent, + (_, _) => + { + Undo.RecordObject(child, "Assign parent"); + child.parent = parent; + } + ); + } + + return isValid; + } + + static bool ValidateComponent(T target, ShowMessage messenger, C @object) + where T : Component + where C : Component + { + var isValid = true; + + if (@object == null && !target.gameObject.TryGetComponent(out _)) + { + messenger + ( + $"{typeof(T).Name} requires a {typeof(C).Name} to be set or present on same object.", + $"Set the {typeof(C).Name} property or add a {typeof(C).Name}.", + MessageType.Error + ); + + isValid = false; + } + + return isValid; + } + + static bool ValidateCollisionLayer(CollisionLayer layer, Object target, ShowMessage messenger, string label, object value, bool required) + { + if (Water == null) + { + return true; + } + + var layers = Water.AnimatedWavesLod._CollisionLayers; + + if (layer == CollisionLayer.Everything) + { + return true; + } + + var flag = (CollisionLayers)((int)layer << 1); + + if (!layers.HasFlag(flag)) + { + var fix = $"Enable the {flag} layer on the {nameof(WaterRenderer)}."; + if (!required) fix += " You can safely ignore this warning."; + + messenger + ( + $"The {value} {label} requires the {flag} layer which is not enabled.", + fix, + required ? MessageType.Error : MessageType.Warning, messenger == DebugLog ? target : Water, + (_, y) => y.intValue = (int)(layers | flag), + $"{nameof(WaterRenderer._AnimatedWavesLod)}.{nameof(WaterRenderer._AnimatedWavesLod._CollisionLayers)}" + ); + + return !required; + } + + return true; + } + + static bool ValidateCollisionSource(Object target, ShowMessage messenger) + { + if (Water == null) + { + return true; + } + + if (Water._AnimatedWavesLod.CollisionSource == CollisionSource.None) + { + messenger + ( + "Collision Source on the Water Renderer is set to None. The floating objects in the scene will use a flat horizontal plane.", + "Set the Collision Source to GPU to incorporate waves into physics.", + MessageType.Warning, Water, + FixSetCollisionSourceToCompute + ); + } + + return true; + } + + static bool ValidateFilteredChoice(int choice, string property, Object target, ShowMessage messenger) + { + var filter = target + .GetType() + .GetCustomAttributes(inherit: true) + .FirstOrDefault(x => x._Property == property); + + if (filter?._Values.Contains(choice) == false) + { + var label = property[1..]; + + messenger + ( + $"The {label} property is invalid.", + $"Choose a correct {label} property.", + MessageType.Error, + target + ); + + return false; + } + + return true; + } + + static void ShowDependentPropertyMessage(string dependentLabel, string dependencyLabel, string dependencyPropertyPath, ShowMessage messenger, Object dependencyContext) + { + messenger + ( + $"{dependencyLabel} is not enabled, but {dependentLabel} requires it.", + $"Enable {dependencyLabel}.", + MessageType.Warning, dependencyContext, + (_, y) => y.boolValue = true, + dependencyPropertyPath + ); + } + } +} diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/Validators.cs.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/Validators.cs.meta new file mode 100644 index 000000000..ae77b6679 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/Validators.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a336ee1d263304acd96f8fe1e4bdae7c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/WaveHarmonic.Crest.Editor.asmdef b/Packages/com.waveharmonic.crest/Editor/Scripts/WaveHarmonic.Crest.Editor.asmdef new file mode 100644 index 000000000..86b226451 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/WaveHarmonic.Crest.Editor.asmdef @@ -0,0 +1,86 @@ +{ + "name": "WaveHarmonic.Crest.Editor", + "rootNamespace": "", + "references": [ + "GUID:d60799ab2a985554ea1a39cd38695018", + "GUID:3eae0364be2026648bf74846acb8a731", + "GUID:df380645f10b7bc4b97d4f5eb6303d95", + "GUID:78bd2ddd6e276394a9615c203e574844", + "GUID:457756d89b35d2941b3e7b37b4ece6f1", + "GUID:c579267770062bf448e75eb160330b7f", + "GUID:15fc0a57446b3144c949da3e2b9737a9", + "GUID:be0903cd8e1546f498710afdc59db5eb", + "GUID:7c347618730f5467f86a58f333ce21df", + "GUID:056ff2a5b2f124d468c6655552acdca5", + "GUID:1ab2a6c2a51cd4b43867788dbaee1a55" + ], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": false, + "defineConstraints": [ + "UNITY_2022_3_OR_NEWER" + ], + "versionDefines": [ + { + "name": "com.unity.modules.director", + "expression": "", + "define": "d_ModuleUnityDirector" + }, + { + "name": "com.unity.postprocessing", + "expression": "", + "define": "d_UnityPostProcessing" + }, + { + "name": "com.unity.postprocessing", + "expression": "(,3.4.0)", + "define": "d_UnityPostProcessingBroken" + }, + { + "name": "com.unity.render-pipelines.high-definition", + "expression": "", + "define": "d_UnityHDRP" + }, + { + "name": "com.unity.render-pipelines.universal", + "expression": "", + "define": "d_UnityURP" + }, + { + "name": "com.unity.shadergraph", + "expression": "", + "define": "d_UnityShaderGraph" + }, + { + "name": "com.waveharmonic.crest.cpu-queries", + "expression": "", + "define": "d_CrestCPUQueries" + }, + { + "name": "com.waveharmonic.crest.paint", + "expression": "", + "define": "d_CrestPaint" + }, + { + "name": "com.waveharmonic.crest.splines", + "expression": "", + "define": "d_CrestSpline" + }, + { + "name": "com.waveharmonic.crest.portals", + "expression": "", + "define": "d_CrestPortals" + }, + { + "name": "com.waveharmonic.crest.shifting-origin", + "expression": "", + "define": "d_WaveHarmonic_Crest_ShiftingOrigin" + } + ], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Packages/com.waveharmonic.crest/Editor/Scripts/WaveHarmonic.Crest.Editor.asmdef.meta b/Packages/com.waveharmonic.crest/Editor/Scripts/WaveHarmonic.Crest.Editor.asmdef.meta new file mode 100644 index 000000000..e4bf3d5db --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Scripts/WaveHarmonic.Crest.Editor.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 125c216bac85c4443bfd4de6bc7eda99 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Shaders.meta b/Packages/com.waveharmonic.crest/Editor/Shaders.meta new file mode 100644 index 000000000..7849c817f --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Shaders.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 525c62df3abb1431ca553a741ad010ff +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Shaders/VisualizeNegativeValues.compute b/Packages/com.waveharmonic.crest/Editor/Shaders/VisualizeNegativeValues.compute new file mode 100644 index 000000000..9f23f4a92 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Shaders/VisualizeNegativeValues.compute @@ -0,0 +1,34 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#pragma kernel CrestVisualizeNegativeValues_Scalar +#pragma kernel CrestVisualizeNegativeValues_Array _ARRAY + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Macros.hlsl" + +#ifdef _ARRAY +#define d_RWTexture RWTexture2DArray +#else +#define d_RWTexture RWTexture2D +#endif + +#ifdef _ARRAY +#define d_RWTextureCoordinates(id) id +#else +#define d_RWTextureCoordinates(id) id.xy +#endif + +d_RWTexture _Crest_Target; + +m_UtilityNameSpace + +void VisualizeNegativeValues(uint3 id) +{ + _Crest_Target[d_RWTextureCoordinates(id)] += 1.0; + _Crest_Target[d_RWTextureCoordinates(id)] *= 0.5; +} + +m_UtilityNameSpaceEnd + +m_UtilityKernelDefaultVariant(VisualizeNegativeValues, _Scalar) +m_UtilityKernelDefaultVariant(VisualizeNegativeValues, _Array) diff --git a/Assets/Obi/Resources/Compute/BendTwistConstraints.compute.meta b/Packages/com.waveharmonic.crest/Editor/Shaders/VisualizeNegativeValues.compute.meta similarity index 65% rename from Assets/Obi/Resources/Compute/BendTwistConstraints.compute.meta rename to Packages/com.waveharmonic.crest/Editor/Shaders/VisualizeNegativeValues.compute.meta index ab675e5e9..5fdbe69fe 100644 --- a/Assets/Obi/Resources/Compute/BendTwistConstraints.compute.meta +++ b/Packages/com.waveharmonic.crest/Editor/Shaders/VisualizeNegativeValues.compute.meta @@ -1,8 +1,7 @@ fileFormatVersion: 2 -guid: e5ad8a2b8563941539b7551b0a93b911 +guid: 29e0431627e624337b14d8521dc77485 ComputeShaderImporter: externalObjects: {} - currentAPIMask: 65536 userData: assetBundleName: assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Editor/Shaders/WaterLevel.hlsl b/Packages/com.waveharmonic.crest/Editor/Shaders/WaterLevel.hlsl new file mode 100644 index 000000000..9df01d96a --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Shaders/WaterLevel.hlsl @@ -0,0 +1,85 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#ifndef d_WaterLevelDepth +#define d_WaterLevelDepth + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/InputsDriven.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Cascade.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Geometry.hlsl" + +m_CrestNameSpace + +struct Attributes +{ + float3 positionOS : POSITION; +}; + +struct Varyings +{ + float4 positionCS : SV_POSITION; +}; + +Varyings Vertex(Attributes attributes) +{ + // This will work for all pipelines. + Varyings varyings = (Varyings)0; + + const Cascade cascade0 = Cascade::Make(_Crest_LodIndex); + const Cascade cascade1 = Cascade::Make(_Crest_LodIndex + 1); + + float3 positionWS = mul(UNITY_MATRIX_M, float4(attributes.positionOS.xyz, 1.0)).xyz; + +#if (SHADEROPTIONS_CAMERA_RELATIVE_RENDERING != 0) + positionWS.xz += _WorldSpaceCameraPos.xz; +#endif + + float alpha; + SnapAndTransitionVertLayout(_Crest_ChunkMeshScaleAlpha, cascade0, _Crest_ChunkGeometryGridWidth, positionWS, alpha); + + { + // :WaterGridPrecisionErrors + float2 center = UNITY_MATRIX_M._m03_m23; +#if (SHADEROPTIONS_CAMERA_RELATIVE_RENDERING != 0) + center += _WorldSpaceCameraPos.xz; +#endif + const float2 camera = abs(_WorldSpaceCameraPos.xz); + positionWS.xz = lerp(center, positionWS.xz, lerp(1.0, 1.01, max(camera.x, camera.y) * 0.00001)); + } + + const float weight0 = (1.0 - alpha) * cascade0._Weight; + const float weight1 = (1.0 - weight0) * cascade1._Weight; + + half offset = 0.0; + if (weight0 > m_CrestSampleLodThreshold) + { + Cascade::MakeLevel(_Crest_LodIndex).SampleLevel(positionWS.xz, weight0, offset); + } + if (weight1 > m_CrestSampleLodThreshold) + { + Cascade::MakeLevel(_Crest_LodIndex + 1).SampleLevel(positionWS.xz, weight1, offset); + } + + positionWS.y += offset; + +#if (SHADEROPTIONS_CAMERA_RELATIVE_RENDERING != 0) + positionWS.xz -= _WorldSpaceCameraPos.xz; +#endif + + varyings.positionCS = mul(UNITY_MATRIX_VP, float4(positionWS, 1.0)); + + return varyings; +} + +half4 Fragment(Varyings varyings) +{ + return half4(0.0, 0.0, 0.0, 1.0); +} + +m_CrestNameSpaceEnd + +m_CrestVertex +m_CrestFragment(half4) + +#endif // d_WaterLevelDepth diff --git a/Assets/Obi/Resources/ObiMaterials/Common/Instanced/Compute/ProceduralInstancing.cginc.meta b/Packages/com.waveharmonic.crest/Editor/Shaders/WaterLevel.hlsl.meta similarity index 75% rename from Assets/Obi/Resources/ObiMaterials/Common/Instanced/Compute/ProceduralInstancing.cginc.meta rename to Packages/com.waveharmonic.crest/Editor/Shaders/WaterLevel.hlsl.meta index 68b2e76df..2dfe9ab71 100644 --- a/Assets/Obi/Resources/ObiMaterials/Common/Instanced/Compute/ProceduralInstancing.cginc.meta +++ b/Packages/com.waveharmonic.crest/Editor/Shaders/WaterLevel.hlsl.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 9d77a2f1bd0624d4aa045916cb0955c9 +guid: b63597e54ae1f4f3f849a64b9c1ddb88 ShaderIncludeImporter: externalObjects: {} userData: diff --git a/Packages/com.waveharmonic.crest/Editor/Shaders/WaterLevel.shader b/Packages/com.waveharmonic.crest/Editor/Shaders/WaterLevel.shader new file mode 100644 index 000000000..dcf0708b1 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Shaders/WaterLevel.shader @@ -0,0 +1,74 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +Shader "Hidden/Crest/Editor/Water Level (Depth)" +{ + SubShader + { + PackageRequirements + { + "com.unity.render-pipelines.high-definition" + } + + Tags { "RenderPipeline"="HDRenderPipeline" } + + Pass + { + Cull Back + + HLSLPROGRAM + #pragma vertex Vertex + #pragma fragment Fragment + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" + #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" + + #include "Packages/com.waveharmonic.crest/Editor/Shaders/WaterLevel.hlsl" + ENDHLSL + } + } + + SubShader + { + PackageRequirements + { + "com.unity.render-pipelines.universal" + } + + Tags { "RenderPipeline"="UniversalPipeline" } + + Pass + { + Cull Back + + HLSLPROGRAM + #pragma vertex Vertex + #pragma fragment Fragment + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + + #include "Packages/com.waveharmonic.crest/Editor/Shaders/WaterLevel.hlsl" + ENDHLSL + } + } + + SubShader + { + Pass + { + Cull Back + + HLSLPROGRAM + #pragma vertex Vertex + #pragma fragment Fragment + + #include "UnityCG.cginc" + + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/Core.hlsl" + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/InputsDriven.hlsl" + + #include "Packages/com.waveharmonic.crest/Editor/Shaders/WaterLevel.hlsl" + ENDHLSL + } + } +} diff --git a/Assets/Obi/Resources/Compute/CollisionMaterial.cginc.meta b/Packages/com.waveharmonic.crest/Editor/Shaders/WaterLevel.shader.meta similarity index 80% rename from Assets/Obi/Resources/Compute/CollisionMaterial.cginc.meta rename to Packages/com.waveharmonic.crest/Editor/Shaders/WaterLevel.shader.meta index adab542ae..0ad6ba5e2 100644 --- a/Assets/Obi/Resources/Compute/CollisionMaterial.cginc.meta +++ b/Packages/com.waveharmonic.crest/Editor/Shaders/WaterLevel.shader.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 034a508161c9948969266fd0cbf21988 +guid: cbfa79cd4adf840128ddd9c3be065074 ShaderImporter: externalObjects: {} defaultTextures: [] diff --git a/Packages/com.waveharmonic.crest/Editor/Shaders/WaterProxy.shader b/Packages/com.waveharmonic.crest/Editor/Shaders/WaterProxy.shader new file mode 100644 index 000000000..ffa242f57 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Editor/Shaders/WaterProxy.shader @@ -0,0 +1,54 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +Shader "Hidden/Crest/Editor/WaterProxy" +{ + SubShader + { + Tags { "RenderType"="Transparent" "Queue"="Transparent"} + Blend SrcAlpha OneMinusSrcAlpha + ZWrite Off + + Pass + { + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + // make fog work + #pragma multi_compile_fog + + #include "UnityCG.cginc" + + struct appdata + { + float4 vertex : POSITION; + float2 uv : TEXCOORD0; + }; + + struct v2f + { + UNITY_FOG_COORDS(1) + float4 vertex : SV_POSITION; + }; + + v2f vert (appdata v) + { + v2f o; + o.vertex = UnityObjectToClipPos(v.vertex); + UNITY_TRANSFER_FOG(o, o.vertex); + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + fixed4 col = fixed4(0.0, 0.3, 1.0, 0.5); + + // apply fog + UNITY_APPLY_FOG(i.fogCoord, col); + + return col; + } + ENDCG + } + } +} diff --git a/Assets/Obi/Resources/Compute/AtomicDeltas.cginc.meta b/Packages/com.waveharmonic.crest/Editor/Shaders/WaterProxy.shader.meta similarity index 80% rename from Assets/Obi/Resources/Compute/AtomicDeltas.cginc.meta rename to Packages/com.waveharmonic.crest/Editor/Shaders/WaterProxy.shader.meta index 8f9c197c2..fa36275e3 100644 --- a/Assets/Obi/Resources/Compute/AtomicDeltas.cginc.meta +++ b/Packages/com.waveharmonic.crest/Editor/Shaders/WaterProxy.shader.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 1a767b30eef4240859cf6158473bd06a +guid: 64f548899ca4e4bfab9b53303d8b9c84 ShaderImporter: externalObjects: {} defaultTextures: [] diff --git a/Packages/com.waveharmonic.crest/ReadMe.txt b/Packages/com.waveharmonic.crest/ReadMe.txt new file mode 100644 index 000000000..ce224dc68 --- /dev/null +++ b/Packages/com.waveharmonic.crest/ReadMe.txt @@ -0,0 +1,3 @@ +Thank you for purchasing! + +Offline manual is located in the Documentation~ folder in this package directory (viewable from OS file browser). diff --git a/Packages/com.waveharmonic.crest/ReadMe.txt.meta b/Packages/com.waveharmonic.crest/ReadMe.txt.meta new file mode 100644 index 000000000..257154c30 --- /dev/null +++ b/Packages/com.waveharmonic.crest/ReadMe.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5e5cf69a2769d4e3881aa0e323a67c5e +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime.meta b/Packages/com.waveharmonic.crest/Runtime.meta new file mode 100644 index 000000000..726f617cb --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d405539da856b4becb9c8639d503b753 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Data.meta b/Packages/com.waveharmonic.crest/Runtime/Data.meta new file mode 100644 index 000000000..bc0bd5434 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Data.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1dfc7e28d58b14deaa99d95b6ccd0cc5 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Data/WaveSpectra.meta b/Packages/com.waveharmonic.crest/Runtime/Data/WaveSpectra.meta new file mode 100644 index 000000000..f25d8bef8 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Data/WaveSpectra.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 59056ec4af44c42dd8f36c6a25eece46 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Data/WaveSpectra/WavesCalm.asset b/Packages/com.waveharmonic.crest/Runtime/Data/WaveSpectra/WavesCalm.asset new file mode 100644 index 000000000..718b22dd0 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Data/WaveSpectra/WavesCalm.asset @@ -0,0 +1,67 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 382a5d8b1147b4e78a31353c022b8e15, type: 3} + m_Name: WavesCalm + m_EditorClassIdentifier: + _Version: 0 + _WaveDirectionVariance: 56 + _GravityScale: 1 + _Multiplier: 1 + _PowerLogarithmicScales: + - -7.39794 + - -7.39794 + - -7.39794 + - -5.526391 + - -4.8159227 + - -4.413246 + - -4.081862 + - -3.7773297 + - -3.8762438 + - -3.824092 + - -3.4170768 + - -3.2395759 + - -3.2135434 + - -7.39794 + _PowerDisabled: 0000000000000000000000000000 + _ChopScales: + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + _GravityScales: + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + _Chop: 1 + _ShowAdvancedControls: 0 + _Model: 0 diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/CableCarRope.asset.meta b/Packages/com.waveharmonic.crest/Runtime/Data/WaveSpectra/WavesCalm.asset.meta similarity index 79% rename from Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/CableCarRope.asset.meta rename to Packages/com.waveharmonic.crest/Runtime/Data/WaveSpectra/WavesCalm.asset.meta index a2d87e356..c3e2d8693 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/CableCarRope.asset.meta +++ b/Packages/com.waveharmonic.crest/Runtime/Data/WaveSpectra/WavesCalm.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: e016b4df5bfaf488f91ab99ebca81d83 +guid: 2985cdff827b8472bafc9e2da18fbf06 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Packages/com.waveharmonic.crest/Runtime/Data/WaveSpectra/WavesDead.asset b/Packages/com.waveharmonic.crest/Runtime/Data/WaveSpectra/WavesDead.asset new file mode 100644 index 000000000..c2d01be7c --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Data/WaveSpectra/WavesDead.asset @@ -0,0 +1,67 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 382a5d8b1147b4e78a31353c022b8e15, type: 3} + m_Name: WavesDead + m_EditorClassIdentifier: + _Version: 0 + _WaveDirectionVariance: 56 + _GravityScale: 1 + _Multiplier: 1 + _PowerLogarithmicScales: + - -7.39794 + - -7.39794 + - -7.39794 + - -5.526391 + - -4.8159227 + - -4.413246 + - -4.081862 + - -3.7773297 + - -3.8762438 + - -3.824092 + - -3.4170768 + - -3.2395759 + - -3.2135434 + - -7.39794 + _PowerDisabled: 0000010101010101010101010101 + _ChopScales: + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + _GravityScales: + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + _Chop: 1 + _ShowAdvancedControls: 0 + _Model: 0 diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/TangledRopeA.asset.meta b/Packages/com.waveharmonic.crest/Runtime/Data/WaveSpectra/WavesDead.asset.meta similarity index 79% rename from Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/TangledRopeA.asset.meta rename to Packages/com.waveharmonic.crest/Runtime/Data/WaveSpectra/WavesDead.asset.meta index 3dd9abe0b..68824f9d7 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/TangledRopeA.asset.meta +++ b/Packages/com.waveharmonic.crest/Runtime/Data/WaveSpectra/WavesDead.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 4d31372b30ca34527b534f09a803ab15 +guid: 1c2709c536afb4bf6b90d29d03758f0d NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Packages/com.waveharmonic.crest/Runtime/Data/WaveSpectra/WavesModerate.asset b/Packages/com.waveharmonic.crest/Runtime/Data/WaveSpectra/WavesModerate.asset new file mode 100644 index 000000000..8f7537767 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Data/WaveSpectra/WavesModerate.asset @@ -0,0 +1,67 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 382a5d8b1147b4e78a31353c022b8e15, type: 3} + m_Name: WavesModerate + m_EditorClassIdentifier: + _Version: 0 + _WaveDirectionVariance: 90 + _GravityScale: 1 + _Multiplier: 1 + _PowerLogarithmicScales: + - -7.1418724 + - -6.539813 + - -5.937754 + - -5.3357 + - -4.733663 + - -4.1316957 + - -3.5300062 + - -2.929428 + - -2.3332953 + - -1.7549441 + - -1.2477198 + - -1.0250019 + - -1.9403106 + - -7.39794 + _PowerDisabled: 0000000000000000000000000000 + _ChopScales: + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + _GravityScales: + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + _Chop: 1.54 + _ShowAdvancedControls: 0 + _Model: 0 diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/TangledRopeB.asset.meta b/Packages/com.waveharmonic.crest/Runtime/Data/WaveSpectra/WavesModerate.asset.meta similarity index 79% rename from Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/TangledRopeB.asset.meta rename to Packages/com.waveharmonic.crest/Runtime/Data/WaveSpectra/WavesModerate.asset.meta index 90cb00382..d3dac8b5f 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/TangledRopeB.asset.meta +++ b/Packages/com.waveharmonic.crest/Runtime/Data/WaveSpectra/WavesModerate.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 04076b9483b7f4ab0a01666d8b2c24cc +guid: ce5a3f1aff978418c90b45d58f574528 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Packages/com.waveharmonic.crest/Runtime/Data/WaveSpectra/WavesModerateSmooth.asset b/Packages/com.waveharmonic.crest/Runtime/Data/WaveSpectra/WavesModerateSmooth.asset new file mode 100644 index 000000000..b05874399 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Data/WaveSpectra/WavesModerateSmooth.asset @@ -0,0 +1,67 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 382a5d8b1147b4e78a31353c022b8e15, type: 3} + m_Name: WavesModerateSmooth + m_EditorClassIdentifier: + _Version: 0 + _WaveDirectionVariance: 90 + _GravityScale: 1 + _Multiplier: 1 + _PowerLogarithmicScales: + - -7.39794 + - -7.39794 + - -7.39794 + - -6.302198 + - -5.9911127 + - -4.7409434 + - -4.5640044 + - -4.4886622 + - -2.9012794 + - -1.1004922 + - -0.86166644 + - -0.36967784 + - 1.3923892 + - 1.60206 + _PowerDisabled: 0000000000000000000000000000 + _ChopScales: + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + _GravityScales: + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + _Chop: 1.6 + _ShowAdvancedControls: 0 + _Model: 0 diff --git a/Packages/com.waveharmonic.crest/Runtime/Data/WaveSpectra/WavesModerateSmooth.asset.meta b/Packages/com.waveharmonic.crest/Runtime/Data/WaveSpectra/WavesModerateSmooth.asset.meta new file mode 100644 index 000000000..5c7167406 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Data/WaveSpectra/WavesModerateSmooth.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8c508e8f723e64d21a5219d1530e6ffd +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Data/WaveSpectra/WavesShoreline.asset b/Packages/com.waveharmonic.crest/Runtime/Data/WaveSpectra/WavesShoreline.asset new file mode 100644 index 000000000..3b51127d1 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Data/WaveSpectra/WavesShoreline.asset @@ -0,0 +1,67 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 382a5d8b1147b4e78a31353c022b8e15, type: 3} + m_Name: WavesShoreline + m_EditorClassIdentifier: + _Version: 0 + _WaveDirectionVariance: 20 + _GravityScale: 1 + _Multiplier: 1 + _PowerLogarithmicScales: + - -7.1418724 + - -6.539813 + - -5.937754 + - -5.3357 + - -4.733663 + - -3.2727537 + - -2.97585 + - -2.4583952 + - -1.6128922 + - -1.7549441 + - -1.2477198 + - -1.0250019 + - -1.9403106 + - -7.39794 + _PowerDisabled: 0101010101000100000001010101 + _ChopScales: + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + _GravityScales: + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + - 1 + _Chop: 1.54 + _ShowAdvancedControls: 0 + _Model: 0 diff --git a/Packages/com.waveharmonic.crest/Runtime/Data/WaveSpectra/WavesShoreline.asset.meta b/Packages/com.waveharmonic.crest/Runtime/Data/WaveSpectra/WavesShoreline.asset.meta new file mode 100644 index 000000000..536b54035 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Data/WaveSpectra/WavesShoreline.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 120e704899e8944e9baf31404179e7ce +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Materials.meta b/Packages/com.waveharmonic.crest/Runtime/Materials.meta new file mode 100644 index 000000000..fd47cc303 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Materials.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 05822262553744bae9714920130c0899 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Materials/Inputs.meta b/Packages/com.waveharmonic.crest/Runtime/Materials/Inputs.meta new file mode 100644 index 000000000..77cf3c061 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Materials/Inputs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2a214bb0d815f498aaee2e050a73697f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Materials/Shark.mat b/Packages/com.waveharmonic.crest/Runtime/Materials/Inputs/ClipExcludeArea.mat similarity index 84% rename from Assets/Obi/Samples/RopeAndRod/SampleResources/Materials/Shark.mat rename to Packages/com.waveharmonic.crest/Runtime/Materials/Inputs/ClipExcludeArea.mat index 29da8f0eb..0fed55f43 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Materials/Shark.mat +++ b/Packages/com.waveharmonic.crest/Runtime/Materials/Inputs/ClipExcludeArea.mat @@ -7,12 +7,11 @@ Material: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: Shark - m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_Name: ClipExcludeArea + m_Shader: {fileID: 4800000, guid: 288a089f90e714983b8a760dd49e5a5c, type: 3} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 - m_ValidKeywords: - - _NORMALMAP + m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 m_EnableInstancingVariants: 0 @@ -25,7 +24,7 @@ Material: serializedVersion: 3 m_TexEnvs: - _BumpMap: - m_Texture: {fileID: 2800000, guid: e4a9139c969c3419a813c9513127f817, type: 3} + m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _DetailAlbedoMap: @@ -45,7 +44,7 @@ Material: m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _MainTex: - m_Texture: {fileID: 2800000, guid: 9c47de74aec0642928f43bb91a7346b7, type: 3} + m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _MetallicGlossMap: @@ -60,14 +59,17 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - m_Ints: [] + m_Ints: + - _Crest_Version: 0 m_Floats: - _BumpScale: 1 + - _ColorWriteMask: 4 + - _Crest_ColorMask: 15 - _Cutoff: 0.5 - _DetailNormalMapScale: 1 - _DstBlend: 0 - _GlossMapScale: 1 - - _Glossiness: 0.75 + - _Glossiness: 0.5 - _GlossyReflections: 1 - _Metallic: 0 - _Mode: 0 @@ -80,6 +82,6 @@ Material: - _ZWrite: 1 m_Colors: - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Crest_Value: {r: 1, g: 1, b: 1, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] - m_AllowLocking: 1 diff --git a/Assets/Obi/Resources/ObiMaterials/Common/Instanced/Burst/Instanced.mat.meta b/Packages/com.waveharmonic.crest/Runtime/Materials/Inputs/ClipExcludeArea.mat.meta similarity index 79% rename from Assets/Obi/Resources/ObiMaterials/Common/Instanced/Burst/Instanced.mat.meta rename to Packages/com.waveharmonic.crest/Runtime/Materials/Inputs/ClipExcludeArea.mat.meta index dd8a2a104..9a4e00d55 100644 --- a/Assets/Obi/Resources/ObiMaterials/Common/Instanced/Burst/Instanced.mat.meta +++ b/Packages/com.waveharmonic.crest/Runtime/Materials/Inputs/ClipExcludeArea.mat.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 6380c47a989d54146bef5f3bac933a56 +guid: 1131dd19089574b28a35a17f1ea28f32 NativeFormatImporter: externalObjects: {} mainObjectFileID: 2100000 diff --git a/Assets/Obi/Resources/ObiMaterials/Common/Instanced/Burst/Instanced.mat b/Packages/com.waveharmonic.crest/Runtime/Materials/Inputs/ClipIncludeArea.mat similarity index 55% rename from Assets/Obi/Resources/ObiMaterials/Common/Instanced/Burst/Instanced.mat rename to Packages/com.waveharmonic.crest/Runtime/Materials/Inputs/ClipIncludeArea.mat index 8187ff606..bf972f19f 100644 --- a/Assets/Obi/Resources/ObiMaterials/Common/Instanced/Burst/Instanced.mat +++ b/Packages/com.waveharmonic.crest/Runtime/Materials/Inputs/ClipIncludeArea.mat @@ -7,14 +7,14 @@ Material: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: Instanced - m_Shader: {fileID: 4800000, guid: 301c97d7892714ada9887f712bed2d53, type: 3} + m_Name: ClipIncludeArea + m_Shader: {fileID: 4800000, guid: 288a089f90e714983b8a760dd49e5a5c, type: 3} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 - m_EnableInstancingVariants: 1 + m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} @@ -51,14 +51,6 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - _Normal: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _Occlusion: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - _OcclusionMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} @@ -67,36 +59,12 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - - unity_Lightmaps: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_LightmapsInd: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_ShadowMasks: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] + m_Ints: + - _Crest_Version: 0 m_Floats: - - _AlphaClip: 0 - - _BUILTIN_AlphaClip: 0 - - _BUILTIN_Blend: 0 - - _BUILTIN_CullMode: 2 - - _BUILTIN_DstBlend: 0 - - _BUILTIN_QueueControl: 0 - - _BUILTIN_QueueOffset: 0 - - _BUILTIN_SrcBlend: 1 - - _BUILTIN_Surface: 0 - - _BUILTIN_ZTest: 4 - - _BUILTIN_ZWrite: 1 - - _BUILTIN_ZWriteControl: 0 - - _Blend: 0 - _BumpScale: 1 - - _CastShadows: 1 - - _Cull: 2 + - _ColorWriteMask: 4 + - _Crest_ColorMask: 15 - _Cutoff: 0.5 - _DetailNormalMapScale: 1 - _DstBlend: 0 @@ -106,35 +74,14 @@ Material: - _Metallic: 0 - _Mode: 0 - _OcclusionStrength: 1 - - _PROCEDURAL_INSTANCING: 1 - _Parallax: 0.02 - - _QueueControl: 0 - - _QueueOffset: 0 - - _ReceiveShadows: 1 - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 - _SrcBlend: 1 - - _Surface: 0 - _UVSec: 0 - - _WorkflowMode: 1 - - _ZTest: 4 - _ZWrite: 1 - - _ZWriteControl: 0 m_Colors: - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Crest_Value: {r: 0, g: 0, b: 0, a: 0} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] - m_AllowLocking: 1 ---- !u!114 &3510638688362179069 -MonoBehaviour: - m_ObjectHideFlags: 11 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 639247ca83abc874e893eb93af2b5e44, type: 3} - m_Name: - m_EditorClassIdentifier: - version: 0 diff --git a/Assets/Obi/Resources/ObiMaterials/Common/Particles.mat.meta b/Packages/com.waveharmonic.crest/Runtime/Materials/Inputs/ClipIncludeArea.mat.meta similarity index 79% rename from Assets/Obi/Resources/ObiMaterials/Common/Particles.mat.meta rename to Packages/com.waveharmonic.crest/Runtime/Materials/Inputs/ClipIncludeArea.mat.meta index c30f265c0..6429ba2f0 100644 --- a/Assets/Obi/Resources/ObiMaterials/Common/Particles.mat.meta +++ b/Packages/com.waveharmonic.crest/Runtime/Materials/Inputs/ClipIncludeArea.mat.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: fb88690dea2394644849cde5abd037f9 +guid: 2a561aef740e74d45a7db7b9dc255dd7 NativeFormatImporter: externalObjects: {} mainObjectFileID: 2100000 diff --git a/Packages/com.waveharmonic.crest/Runtime/Materials/Inputs/PushWaterUnderConvexHull.mat b/Packages/com.waveharmonic.crest/Runtime/Materials/Inputs/PushWaterUnderConvexHull.mat new file mode 100644 index 000000000..32e5389d5 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Materials/Inputs/PushWaterUnderConvexHull.mat @@ -0,0 +1,30 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: PushWaterUnderConvexHull + m_Shader: {fileID: 4800000, guid: 170672f06b4574545ba8305cb7d11091, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: [] + m_Ints: + - _Crest_Version: 0 + m_Floats: [] + m_Colors: [] + m_BuildTextureStacks: [] diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Materials/Shark.mat.meta b/Packages/com.waveharmonic.crest/Runtime/Materials/Inputs/PushWaterUnderConvexHull.mat.meta similarity index 79% rename from Assets/Obi/Samples/RopeAndRod/SampleResources/Materials/Shark.mat.meta rename to Packages/com.waveharmonic.crest/Runtime/Materials/Inputs/PushWaterUnderConvexHull.mat.meta index f72c06f54..03ae03b2c 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Materials/Shark.mat.meta +++ b/Packages/com.waveharmonic.crest/Runtime/Materials/Inputs/PushWaterUnderConvexHull.mat.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: ad417cd62ee7d4209afa3e3d86bee647 +guid: fbe311c1027b04a3d8401654d4a9d72f NativeFormatImporter: externalObjects: {} mainObjectFileID: 2100000 diff --git a/Packages/com.waveharmonic.crest/Runtime/Materials/Inputs/WaterLevelFromGeometry.mat b/Packages/com.waveharmonic.crest/Runtime/Materials/Inputs/WaterLevelFromGeometry.mat new file mode 100644 index 000000000..8f18bda46 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Materials/Inputs/WaterLevelFromGeometry.mat @@ -0,0 +1,30 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: WaterLevelFromGeometry + m_Shader: {fileID: 4800000, guid: 06402bee7075b4b9fafef2b1ddf3b5cc, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: [] + m_Ints: + - _Crest_Version: 0 + m_Floats: [] + m_Colors: [] + m_BuildTextureStacks: [] diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Materials/TanglePeg.mat.meta b/Packages/com.waveharmonic.crest/Runtime/Materials/Inputs/WaterLevelFromGeometry.mat.meta similarity index 79% rename from Assets/Obi/Samples/RopeAndRod/SampleResources/Materials/TanglePeg.mat.meta rename to Packages/com.waveharmonic.crest/Runtime/Materials/Inputs/WaterLevelFromGeometry.mat.meta index d4d9026a4..ea28a43e0 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Materials/TanglePeg.mat.meta +++ b/Packages/com.waveharmonic.crest/Runtime/Materials/Inputs/WaterLevelFromGeometry.mat.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: bcdcc68772c3b42ca94abeffddf3eb19 +guid: 0f5eb7d739bac4dcf97596cc6b192494 NativeFormatImporter: externalObjects: {} mainObjectFileID: 2100000 diff --git a/Packages/com.waveharmonic.crest/Runtime/Materials/Water Volume.mat b/Packages/com.waveharmonic.crest/Runtime/Materials/Water Volume.mat new file mode 100644 index 000000000..81df789dc --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Materials/Water Volume.mat @@ -0,0 +1,75 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Water Volume + m_Shader: {fileID: 4800000, guid: 034b985bd9c344992af148e26d2cdb24, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: + - d_Dithering + - d_Meniscus + m_InvalidKeywords: + - _ALPHATEST_ON + - _BUILTIN_ALPHATEST_ON + - _BUILTIN_AlphaClip + - _BUILTIN_SURFACE_TYPE_TRANSPARENT + - _DOUBLESIDED_ON + - _ENABLE_FOG_ON_TRANSPARENT + - _SPECULAR_SETUP + - _SURFACE_TYPE_TRANSPARENT + - _TRANSPARENT_WRITES_MOTION_VEC + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _Crest_CausticsDistortionTexture: + m_Texture: {fileID: 2800000, guid: 7aa3f69cfb40b429a865c45a7271c5f5, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Crest_CausticsTexture: + m_Texture: {fileID: 2800000, guid: 1407209016967410da2ae6fdd4d97fc6, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: + - _Crest_DataSliceOffset: 13 + - _Crest_DitheringEnabled: 1 + - _Crest_MeniscusEnabled: 1 + - _Crest_Version: 0 + m_Floats: + - CREST_FLOW: 0 + - _Crest_AmbientTerm: 1 + - _Crest_Anisotropy: 0.5 + - _Crest_CausticsDepthOfField: 6 + - _Crest_CausticsDistortionScale: 250 + - _Crest_CausticsDistortionStrength: 0.16 + - _Crest_CausticsEnabled: 1 + - _Crest_CausticsFocalDepth: 2 + - _Crest_CausticsMotionBlur: 1 + - _Crest_CausticsScrollSpeed: 1 + - _Crest_CausticsStrength: 3.2 + - _Crest_CausticsTextureAverage: 0.07 + - _Crest_CausticsTextureScale: 50 + - _Crest_DirectTerm: 1 + - _Crest_DitheringIntensity: 1 + - _Crest_ExtinctionMultiplier: 1 + - _Crest_OutScatteringExtinctionFactor: 0.2 + - _Crest_OutScatteringFactor: 0.2 + - _Crest_ShadowsAffectsAmbientFactor: 0.5 + - _Crest_SunBoost: 2 + m_Colors: + - _Crest_AbsorptionColor: {r: 0.34162676, g: 0.6954546, b: 0.85, a: 0.1019608} + - _Crest_Scattering: {r: 0, g: 0.09803919, b: 0.19999996, a: 1} + m_BuildTextureStacks: [] + m_AllowLocking: 1 diff --git a/Packages/com.waveharmonic.crest/Runtime/Materials/Water Volume.mat.meta b/Packages/com.waveharmonic.crest/Runtime/Materials/Water Volume.mat.meta new file mode 100644 index 000000000..648a6e94a --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Materials/Water Volume.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f2b096e4d95e646c49d48ece0afa0547 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Materials/Water.mat b/Packages/com.waveharmonic.crest/Runtime/Materials/Water.mat new file mode 100644 index 000000000..dcea19e1a --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Materials/Water.mat @@ -0,0 +1,102 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-5994654682710206810 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: da692e001514ec24dbc4cca1949ff7e8, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 13 + hdPluginSubTargetMaterialVersions: + m_Keys: [] + m_Values: +--- !u!114 &-4042563326011365698 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 10 +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Water + m_Shader: {fileID: -6465566751694194690, guid: 00ffe7d0b7161420897069dc6e12822c, type: 3} + m_Parent: {fileID: -876546973899608171, guid: 00ffe7d0b7161420897069dc6e12822c, type: 3} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: + - _ALPHATEST_ON + - _BUILTIN_ALPHATEST_ON + - _BUILTIN_AlphaClip + - _BUILTIN_SURFACE_TYPE_TRANSPARENT + - _DOUBLESIDED_ON + - _ENABLE_FOG_ON_TRANSPARENT + - _SPECULAR_SETUP + - _SURFACE_TYPE_TRANSPARENT + - _TRANSPARENT_WRITES_MOTION_VEC + m_InvalidKeywords: [] + m_LightmapFlags: 2 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 1 + m_CustomRenderQueue: 3000 + stringTagMap: + MotionVector: User + RenderType: Transparent + disabledShaderPasses: + - TransparentDepthPostpass + - TransparentBackface + - RayTracingPrepass + - MOTIONVECTORS + - SHADOWCASTER + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: [] + m_Ints: [] + m_Floats: + - _AlphaDstBlend: 10 + - _BUILTIN_DstBlend: 10 + - _BUILTIN_QueueControl: 0 + - _BUILTIN_SrcBlend: 5 + - _BUILTIN_ZWrite: 1 + - _Crest_PlanarReflectionsEnabled: 1 + - _CullMode: 0 + - _CullModeForward: 0 + - _DstBlend: 10 + - _QueueControl: 0 + - _RefractionModel: 0 + - _SrcBlend: 5 + - _ZTestGBuffer: 3 + m_Colors: + - _DoubleSidedConstants: {r: 1, g: 1, b: 1, a: 0} + m_BuildTextureStacks: [] + m_AllowLocking: 1 +--- !u!114 &4748330692745026848 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 639247ca83abc874e893eb93af2b5e44, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 0 diff --git a/Packages/com.waveharmonic.crest/Runtime/Materials/Water.mat.meta b/Packages/com.waveharmonic.crest/Runtime/Materials/Water.mat.meta new file mode 100644 index 000000000..e4329a3b7 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Materials/Water.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8ab064b6606504a55b489af2787350c2 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Prefabs.meta b/Packages/com.waveharmonic.crest/Runtime/Prefabs.meta new file mode 100644 index 000000000..82340dfd1 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Prefabs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 77ee3d78b64074b2cba27c3b39c6084a +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Prefabs/Chunk.prefab b/Packages/com.waveharmonic.crest/Runtime/Prefabs/Chunk.prefab new file mode 100644 index 000000000..79a692e5e --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Prefabs/Chunk.prefab @@ -0,0 +1,75 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &1516456258233481520 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5573293823876610619} + - component: {fileID: 6121422689720352427} + m_Layer: 4 + m_Name: Chunk + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &5573293823876610619 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1516456258233481520} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 1 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!23 &6121422689720352427 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1516456258233481520} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 2 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: [] + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Prefabs/TanglePeg.prefab.meta b/Packages/com.waveharmonic.crest/Runtime/Prefabs/Chunk.prefab.meta similarity index 74% rename from Assets/Obi/Samples/RopeAndRod/SampleResources/Prefabs/TanglePeg.prefab.meta rename to Packages/com.waveharmonic.crest/Runtime/Prefabs/Chunk.prefab.meta index 2b57782d2..98e032c9c 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Prefabs/TanglePeg.prefab.meta +++ b/Packages/com.waveharmonic.crest/Runtime/Prefabs/Chunk.prefab.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: fd76f3270d8cf4fe3bc7a9f2f3cb6b4a +guid: 17840562212c147d6bdb5144d35bc442 PrefabImporter: externalObjects: {} userData: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts.meta new file mode 100644 index 000000000..cdeb84ae3 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cfeba4e421ad54be597d83f0638a0c55 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Assembly.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Assembly.cs new file mode 100644 index 000000000..7b51a8998 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Assembly.cs @@ -0,0 +1,33 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// Define empty namespaces for when assemblies are not present. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Editor")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Samples")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Samples.Editor")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Samples.Ripples")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.CPUQueries")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.CPUQueries.Editor")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Paint")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Paint.Editor")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Scripting")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.ShallowWater")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.ShallowWater.Editor")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Splines")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Splines.Editor")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Watercraft")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Watercraft.Editor")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Whirlpool")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Whirlpool.Editor")] + +namespace UnityEngine.InputSystem { } +namespace UnityEngine.Rendering.HighDefinition { } +namespace UnityEngine.Rendering.RenderGraphModule { } +namespace UnityEngine.Rendering.Universal { } +namespace WaveHarmonic.Crest.Editor { } +namespace WaveHarmonic.Crest.Paint { } +namespace WaveHarmonic.Crest.Splines { } +namespace WaveHarmonic.Crest.RelativeSpace { } diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Assembly.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Assembly.cs.meta new file mode 100644 index 000000000..540a6b629 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Assembly.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: bc511f9846b8c404091aace6915510df +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Constants.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Constants.cs new file mode 100644 index 000000000..479a118e3 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Constants.cs @@ -0,0 +1,33 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +namespace WaveHarmonic.Crest +{ + static class Constants + { +#if CREST_OCEAN + const string k_Prefix = "Crest 5 "; +#else + const string k_Prefix = "Crest "; +#endif + const string k_MenuScripts = "Crest/"; + public const string k_MenuPrefixScripts = k_MenuScripts + k_Prefix; + public const string k_MenuPrefixInternal = k_MenuScripts + "Internal/"; + public const string k_MenuPrefixDebug = k_MenuScripts + "Debug/" + k_Prefix; + public const string k_MenuPrefixInputs = k_MenuScripts + "Inputs/" + k_Prefix; + public const string k_MenuPrefixTime = k_MenuScripts + "Time/" + k_Prefix; + public const string k_MenuPrefixSpline = k_MenuScripts + "Spline/" + k_Prefix; + public const string k_MenuPrefixPhysics = k_MenuScripts + "Physics/" + k_Prefix; + public const string k_MenuPrefixSample = k_MenuScripts + "Sample/" + k_Prefix; + +#if UNITY_EDITOR + public const int k_FieldGroupOrder = Editor.Inspector.k_FieldGroupOrder; +#else + public const int k_FieldGroupOrder = 0; +#endif + + // Unity only supports textures up to a size of 16384, even if maxTextureSize returns a larger size. + // https://docs.unity3d.com/ScriptReference/SystemInfo-maxTextureSize.html + public const int k_MaximumTextureResolution = 16384; + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Constants.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Constants.cs.meta new file mode 100644 index 000000000..67ff0388c --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Constants.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5b3ea5ad983894f72b6478985b8238d3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data.meta new file mode 100644 index 000000000..4625e3126 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 055e56f78a8f84633baaceee3f56970f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/AbsorptionLod.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/AbsorptionLod.cs new file mode 100644 index 000000000..51690a7ee --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/AbsorptionLod.cs @@ -0,0 +1,68 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using WaveHarmonic.Crest.Internal; +using WaveHarmonic.Crest.Utility; + +namespace WaveHarmonic.Crest +{ + /// + /// Overrides the absorption color. + /// + public sealed partial class AbsorptionLod : ColorLod + { + // Orange + internal static readonly Color s_GizmoColor = new(1f, 165f / 255f, 0f, 0.5f); + internal static readonly Color s_DefaultColor = new(0.342f, 0.695f, 0.85f, 0.102f); + + static new class ShaderIDs + { + public static readonly int s_SampleAbsorptionSimulation = Shader.PropertyToID("g_Crest_SampleAbsorptionSimulation"); + } + + internal override string ID => "Absorption"; + internal override string Name => "Absorption"; + internal override Color GizmoColor => s_GizmoColor; + private protected override bool NeedToReadWriteTextureData => true; + private protected override bool RequiresClearBorder => true; + private protected override bool AlwaysClear => true; + private protected override Color ClearColor + { + get + { + var color = Color.clear; + + if (_Water.Material != null) + { + color = _Water.Material.GetVector(WaterRenderer.ShaderIDs.s_Absorption); + color.a = 0f; + } + + return color; + } + } + + private protected override int GlobalShaderID => ShaderIDs.s_SampleAbsorptionSimulation; + + internal AbsorptionLod() + { + _ShorelineColor = (s_DefaultColor * 1.5f).Clamped01(); + } + + private protected override void SetShorelineColor(Color previous, Color current) + { + if (previous == current) return; + _ShorelineColorValue = WaterRenderer.CalculateAbsorptionValueFromColor(current); + } + + internal static readonly SortedList s_Inputs = new(Helpers.DuplicateComparison); + private protected override SortedList Inputs => s_Inputs; + + [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)] + static void OnLoad() + { + s_Inputs.Clear(); + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/AbsorptionLod.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/AbsorptionLod.cs.meta new file mode 100644 index 000000000..6e425d514 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/AbsorptionLod.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a6548e15197394afb8759ec50e918937 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/AlbedoLod.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/AlbedoLod.cs new file mode 100644 index 000000000..65fcbee1a --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/AlbedoLod.cs @@ -0,0 +1,44 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using UnityEngine.Experimental.Rendering; +using WaveHarmonic.Crest.Utility; + +namespace WaveHarmonic.Crest +{ + /// + /// A color layer that can be composited onto the water surface. + /// + [FilterEnum(nameof(_TextureFormatMode), Filtered.Mode.Include, (int)LodTextureFormatMode.Performance, (int)LodTextureFormatMode.Manual)] + public sealed partial class AlbedoLod : Lod + { + internal static readonly Color s_GizmoColor = new(1f, 0f, 1f, 0.5f); + + internal override string ID => "Albedo"; + internal override Color GizmoColor => s_GizmoColor; + private protected override Color ClearColor => Color.clear; + private protected override bool NeedToReadWriteTextureData => false; + + private protected override GraphicsFormat RequestedTextureFormat => _TextureFormatMode switch + { + LodTextureFormatMode.Manual => _TextureFormat, + _ => GraphicsFormat.R8G8B8A8_UNorm, + }; + + internal AlbedoLod() + { + _Resolution = 768; + _TextureFormat = GraphicsFormat.R8G8B8A8_UNorm; + } + + internal static readonly SortedList s_Inputs = new(Helpers.DuplicateComparison); + private protected override SortedList Inputs => s_Inputs; + + [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)] + static void OnLoad() + { + s_Inputs.Clear(); + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/AlbedoLod.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/AlbedoLod.cs.meta new file mode 100644 index 000000000..00fda2388 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/AlbedoLod.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e6e1410b6b6b14d1db0a242b6d4efef5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/AnimatedWavesLod.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/AnimatedWavesLod.cs new file mode 100644 index 000000000..49b9c082c --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/AnimatedWavesLod.cs @@ -0,0 +1,581 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using UnityEngine.Experimental.Rendering; +using UnityEngine.Rendering; + +namespace WaveHarmonic.Crest +{ + abstract class BakedWaveData : ScriptableObject + { + public abstract ICollisionProvider CreateCollisionProvider(); + public abstract float WindSpeed { get; } + } + + // + // Collision + // + + /// + /// The source of collisions (ie water shape). + /// + public enum CollisionSource + { + /// + /// No collision source. Flat water. + /// + None = 0, + + // GerstnerWavesCPU = 1, + + /// + /// Uses AsyncGPUReadback to retrieve data from GPU to CPU. + /// + /// + /// This is the most optimal approach. + /// + GPU = 2, + + /// + /// Computes data entirely on the CPU. + /// + CPU = 3, + } + + /// + /// The pass to render displacement into. + /// + public enum DisplacementPass + { + /// + /// Displacement that is dependent on an LOD (eg waves). + /// + /// + /// Uses filtering to determine which LOD to write to. + /// + [Tooltip("Displacement that is dependent on an LOD (eg waves).\n\nUses filtering to determine which LOD to write to.")] + LodDependent, + + /// + /// Renders to all LODs. + /// + [Tooltip("Renders to all LODs.")] + LodIndependent, + + /// + /// Renders to all LODs, but as a separate pass. + /// + /// + /// Typically used to render visual displacement which does not affect collisions. + /// + [Tooltip("Renders to all LODs, but as a separate pass.\n\nTypically used to render visual displacement which does not affect collisions.")] + [InspectorName("Lod Independent (Last)")] + LodIndependentLast, + } + + /// + /// Flags to enable extra collsion layers. + /// + [System.Flags] + public enum CollisionLayers + { + // NOTE: numbers must be in order for defaults to work (everything first). + + /// + /// All layers. + /// + [Tooltip("All layers.")] + Everything = -1, + + /// + /// No extra layers (ie single layer). + /// + [Tooltip("No extra layers (ie single layer).")] + Nothing, + + /// + /// Separate layer for dynamic waves. + /// + /// + /// Dynamic waves are normally combined together for efficiency. By enabling this + /// layer, dynamic waves are combined and added in a separate pass. + /// + [Tooltip("Separate layer for dynamic waves.\n\nDynamic waves are normally combined together for efficiency. By enabling this layer, dynamic waves are combined and added in a separate pass.")] + DynamicWaves = 1 << 1, + + /// + /// Extra displacement layer for visual displacement. + /// + [Tooltip("Extra displacement layer for visual displacement.")] + Displacement = 1 << 2, + } + + /// + /// Captures waves/shape that is drawn kinematically - there is no frame-to-frame + /// state. + /// + /// + /// + /// + /// A combine pass is done which combines downwards from low detail LODs into + /// the high detail LODs. + /// + /// + /// The LOD data is passed to the water material when the surface is drawn. + /// + /// + /// adds its results into this data. They piggy back + /// off the combine pass and subsequent assignment to the water material. + /// + /// + /// The RGB channels are the XYZ displacement from a rest plane at water level to + /// the corresponding displaced position on the surface. + /// + [@FilterEnum(nameof(_TextureFormatMode), Filtered.Mode.Exclude, (int)LodTextureFormatMode.Automatic)] + public sealed partial class AnimatedWavesLod : Lod + { + [@Space(10)] + + [Tooltip("Shifts wavelengths to maintain quality for higher resolutions.\n\nSet this to 2 to improve wave quality. In some cases like flowing rivers, this can make a substantial difference to visual stability. We recommend doubling the Resolution on the WaterRenderer component to preserve detail after making this change.")] + [@Range(1f, 4f)] + [@GenerateAPI] + [SerializeField] + float _WaveResolutionMultiplier = 1f; + + [Tooltip("How much waves are dampened in shallow water.")] + [@Range(0f, 1f)] + [@GenerateAPI] + [SerializeField] + float _AttenuationInShallows = 0.95f; + + [Tooltip("Any water deeper than this will receive full wave strength.\n\nThe lower the value, the less effective the depth cache will be at attenuating very large waves. Set to the maximum value (1,000) to disable.")] + [@Range(1f, 1000f)] + [@GenerateAPI] + [SerializeField] + float _ShallowsMaximumDepth = 1000f; + + + [@Heading("Collisions")] + + [Tooltip("Where to obtain water shape on CPU for physics / gameplay.")] + [@GenerateAPI(Setter.Internal)] + [@DecoratedField, SerializeField] + internal CollisionSource _CollisionSource = CollisionSource.GPU; + + [Tooltip("Collision layers to enable.\n\nSome layers will have overhead with CPU, GPU and memory.")] + [@Predicated(nameof(_CollisionSource), inverted: true, nameof(CollisionSource.GPU))] + [@GenerateAPI] + [@DecoratedField, SerializeField] + internal CollisionLayers _CollisionLayers = CollisionLayers.Everything; + + [Tooltip("Maximum number of wave queries that can be performed when using GPU queries.")] + [@Predicated(nameof(_CollisionSource), true, nameof(CollisionSource.GPU))] + [@GenerateAPI(Setter.None)] + [@DecoratedField, SerializeField] + int _MaximumQueryCount = QueryBase.k_DefaultMaximumQueryCount; + + [@Predicated(nameof(_CollisionSource), true, nameof(CollisionSource.CPU))] + [@DecoratedField, SerializeField] + internal BakedWaveData _BakedWaveData; + + + internal static new partial class ShaderIDs + { + public static readonly int s_WaveBuffer = Shader.PropertyToID("_Crest_WaveBuffer"); + public static readonly int s_DynamicWavesTarget = Shader.PropertyToID("_Crest_DynamicWavesTarget"); + public static readonly int s_AnimatedWavesTarget = Shader.PropertyToID("_Crest_AnimatedWavesTarget"); + public static readonly int s_AttenuationInShallows = Shader.PropertyToID("_Crest_AttenuationInShallows"); + } + + internal static readonly Color s_GizmoColor = new(0f, 1f, 0f, 0.5f); + + /// + /// Turn shape combine pass on/off. Debug only - stripped in builds. + /// + internal static bool s_Combine = true; + + internal override string ID => "AnimatedWaves"; + internal override string Name => "Animated Waves"; + internal override Color GizmoColor => s_GizmoColor; + private protected override bool NeedToReadWriteTextureData => true; + private protected override Color ClearColor => Color.black; + internal override int BufferCount => _Water.WriteMotionVectors ? 2 : 1; + internal override bool RunsInHeadless => true; + + // NOTE: Tried RGB111110Float but errors becomes visible. One option would be to use a UNORM setup. + private protected override GraphicsFormat RequestedTextureFormat => _TextureFormatMode switch + { + LodTextureFormatMode.Performance => GraphicsFormat.R16G16B16A16_SFloat, + LodTextureFormatMode.Precision => GraphicsFormat.R32G32B32A32_SFloat, + LodTextureFormatMode.Manual => _TextureFormat, + _ => throw new System.NotImplementedException(), + }; + + ComputeShader _CombineShader; + + int _KernalShapeCombine = -1; + int _KernalShapeCombine_DISABLE_COMBINE = -1; + int _KernalShapeCombine_FLOW_ON = -1; + int _KernalShapeCombine_FLOW_ON_DISABLE_COMBINE = -1; + int _KernalShapeCombine_DYNAMIC_WAVE_SIM_ON = -1; + int _KernalShapeCombine_DYNAMIC_WAVE_SIM_ON_DISABLE_COMBINE = -1; + int _KernalShapeCombine_FLOW_ON_DYNAMIC_WAVE_SIM_ON = -1; + int _KernalShapeCombine_FLOW_ON_DYNAMIC_WAVE_SIM_ON_DISABLE_COMBINE = -1; + + + internal AnimatedWavesLod() + { + _Enabled = true; + _OverrideResolution = false; + _TextureFormat = GraphicsFormat.R16G16B16A16_SFloat; + } + + internal override void Initialize() + { + _CombineShader = WaterResources.Instance.Compute._ShapeCombine; + if (_CombineShader == null) + { + _Valid = false; + return; + } + + base.Initialize(); + } + + private protected override void Allocate() + { + base.Allocate(); + + _KernalShapeCombine = _CombineShader.FindKernel("ShapeCombine"); + _KernalShapeCombine_DISABLE_COMBINE = _CombineShader.FindKernel("ShapeCombine_DISABLE_COMBINE"); + _KernalShapeCombine_FLOW_ON = _CombineShader.FindKernel("ShapeCombine_FLOW_ON"); + _KernalShapeCombine_FLOW_ON_DISABLE_COMBINE = _CombineShader.FindKernel("ShapeCombine_FLOW_ON_DISABLE_COMBINE"); + _KernalShapeCombine_DYNAMIC_WAVE_SIM_ON = _CombineShader.FindKernel("ShapeCombine_DYNAMIC_WAVE_SIM_ON"); + _KernalShapeCombine_DYNAMIC_WAVE_SIM_ON_DISABLE_COMBINE = _CombineShader.FindKernel("ShapeCombine_DYNAMIC_WAVE_SIM_ON_DISABLE_COMBINE"); + _KernalShapeCombine_FLOW_ON_DYNAMIC_WAVE_SIM_ON = _CombineShader.FindKernel("ShapeCombine_FLOW_ON_DYNAMIC_WAVE_SIM_ON"); + _KernalShapeCombine_FLOW_ON_DYNAMIC_WAVE_SIM_ON_DISABLE_COMBINE = _CombineShader.FindKernel("ShapeCombine_FLOW_ON_DYNAMIC_WAVE_SIM_ON_DISABLE_COMBINE"); + } + + internal override void BuildCommandBuffer(WaterRenderer water, CommandBuffer buffer) + { + buffer.BeginSample(Name); + + FlipBuffers(); + + Shader.SetGlobalFloat(ShaderIDs.s_AttenuationInShallows, _AttenuationInShallows); + + // Get temporary buffer to store waves. They will be copied in the combine pass. + buffer.GetTemporaryRT(ShaderIDs.s_WaveBuffer, DataTexture.descriptor); + buffer.SetRenderTarget(ShaderIDs.s_WaveBuffer, 0, CubemapFace.Unknown, -1); + buffer.ClearRenderTarget(false, true, ClearColor); + + // LOD dependent data. + // Write to per-octave _WaveBuffers. Not the same as _AnimatedWaves. + // Draw any data with lod preference. + SubmitDraws(buffer, s_Inputs, ShaderIDs.s_WaveBuffer, (int)DisplacementPass.LodDependent, filter: true); + + var lastSlice = Slices - 1; + var threadSize = Resolution / k_ThreadGroupSize; + + // Combine the LODs - copy results from biggest LOD down to LOD 0 + { + var combineShaderKernel = _KernalShapeCombine; + var combineShaderKernel_lastLOD = _KernalShapeCombine_DISABLE_COMBINE; + { + var isFlowOn = _Water._FlowLod.Enabled; + var isDynamicWavesOn = _Water._DynamicWavesLod.Enabled && !_CollisionLayers.HasFlag(CollisionLayers.DynamicWaves); + + // Set the shader kernels that we will use. + if (isFlowOn && isDynamicWavesOn) + { + combineShaderKernel = _KernalShapeCombine_FLOW_ON_DYNAMIC_WAVE_SIM_ON; + combineShaderKernel_lastLOD = _KernalShapeCombine_FLOW_ON_DYNAMIC_WAVE_SIM_ON_DISABLE_COMBINE; + } + else if (isFlowOn) + { + combineShaderKernel = _KernalShapeCombine_FLOW_ON; + combineShaderKernel_lastLOD = _KernalShapeCombine_FLOW_ON_DISABLE_COMBINE; + } + else if (isDynamicWavesOn) + { + combineShaderKernel = _KernalShapeCombine_DYNAMIC_WAVE_SIM_ON; + combineShaderKernel_lastLOD = _KernalShapeCombine_DYNAMIC_WAVE_SIM_ON_DISABLE_COMBINE; + } + } + + buffer.BeginSample("Combine"); + + // Combine waves. + for (var slice = lastSlice; slice >= 0; slice--) + { + var kernel = slice < lastSlice && s_Combine + ? combineShaderKernel : combineShaderKernel_lastLOD; + + var wrapper = new PropertyWrapperCompute(buffer, _CombineShader, kernel); + + // The per-octave wave buffers we read from. + wrapper.SetTexture(ShaderIDs.s_WaveBuffer, ShaderIDs.s_WaveBuffer); + + if (_Water._DynamicWavesLod.Enabled) _Water._DynamicWavesLod.Bind(wrapper); + + // Set the animated waves texture where we read/write to combine the results. Use + // compute suffix to avoid collision as a file already uses the normal name. + wrapper.SetTexture(Crest.ShaderIDs.s_Target, DataTexture); + wrapper.SetInteger(Lod.ShaderIDs.s_LodIndex, slice); + + wrapper.Dispatch(threadSize, threadSize, 1); + } + + buffer.EndSample("Combine"); + } + + buffer.ReleaseTemporaryRT(ShaderIDs.s_WaveBuffer); + + // LOD independent data. + // Draw any data that did not express a preference for one lod or another. + var drawn = SubmitDraws(buffer, s_Inputs, DataTexture, (int)DisplacementPass.LodIndependent); + + // Alpha channel is cleared in combine step, but if any inputs draw in post-combine + // step then alpha may have data. + var clear = WaterResources.Instance.Compute._Clear; + if (drawn && clear != null) + { + buffer.SetComputeTextureParam(clear, 0, Crest.ShaderIDs.s_Target, DataTexture); + buffer.SetComputeVectorParam(clear, Crest.ShaderIDs.s_ClearMask, Color.black); + buffer.SetComputeVectorParam(clear, Crest.ShaderIDs.s_ClearColor, Color.clear); + buffer.DispatchCompute + ( + clear, + 0, + Resolution / k_ThreadGroupSizeX, + Resolution / k_ThreadGroupSizeY, + Slices + ); + } + + // Pack height data into alpha channel. + // We do not add height to displacement directly for better precision and layering. + var heightShader = WaterResources.Instance.Compute._PackLevel; + if (_Water._LevelLod.Enabled && heightShader != null) + { + buffer.SetComputeTextureParam(heightShader, 0, Crest.ShaderIDs.s_Target, DataTexture); + buffer.DispatchCompute + ( + heightShader, + 0, + Resolution / k_ThreadGroupSizeX, + Resolution / k_ThreadGroupSizeY, + Slices + ); + } + + // Query collisions including only Animated Waves. + // Requires copying the water level. + Provider.UpdateQueries(_Water, CollisionLayer.AfterAnimatedWaves); + + // Transfer Dynamic Waves to Animated Waves. + if (_CollisionLayers.HasFlag(CollisionLayers.DynamicWaves) && _Water._DynamicWavesLod.Enabled) + { + buffer.BeginSample("Combine"); + // Clearing not required as we overwrite enter texture. + buffer.GetTemporaryRT(ShaderIDs.s_DynamicWavesTarget, DataTexture.descriptor); + + var wrapper = new PropertyWrapperCompute(buffer, _CombineShader, 8); + + wrapper.SetTexture(ShaderIDs.s_DynamicWavesTarget, ShaderIDs.s_DynamicWavesTarget); + + _Water._DynamicWavesLod.Bind(wrapper); + + // Compute displacement from Dynamic Waves. + for (var slice = lastSlice; slice >= 0; slice--) + { + wrapper.SetInteger(Lod.ShaderIDs.s_LodIndex, slice); + wrapper.Dispatch(threadSize, threadSize, 1); + } + + // Copy Dynamic Waves displacement into Animated Waves. + { + wrapper = new PropertyWrapperCompute(buffer, _CombineShader, 9); + wrapper.SetTexture(ShaderIDs.s_AnimatedWavesTarget, DataTexture); + wrapper.SetTexture(ShaderIDs.s_DynamicWavesTarget, ShaderIDs.s_DynamicWavesTarget); + wrapper.Dispatch(threadSize, threadSize, Slices); + } + + buffer.ReleaseTemporaryRT(ShaderIDs.s_DynamicWavesTarget); + buffer.EndSample("Combine"); + + // Query collisions including Dynamic Waves. + // Does not require copying the water level as they are added with zero alpha. + _Water.CollisionProvider.UpdateQueries(_Water, CollisionLayer.AfterDynamicWaves); + } + + if (_CollisionLayers.HasFlag(CollisionLayers.Displacement)) + { + // LOD independent data. + // Draw any data that did not express a preference for one lod or another. + drawn = SubmitDraws(buffer, s_Inputs, DataTexture, (int)DisplacementPass.LodIndependentLast); + } + + if (_CollisionLayers == CollisionLayers.Nothing || _CollisionLayers.HasFlag(CollisionLayers.Displacement)) + { + Queryable?.UpdateQueries(_Water); + } + + if (BufferCount > 1) + { + // Update current and previous. Latter for MVs and/or VFX. + Shader.SetGlobalTexture(_TextureSourceShaderID, _Targets.Previous(1)); + Shader.SetGlobalTexture(_TextureShaderID, DataTexture); + } + + buffer.EndSample(Name); + } + + /// + /// Provides water shape to CPU. + /// + private protected override ICollisionProvider CreateProvider(bool enable) + { + ICollisionProvider result = null; + + Queryable?.CleanUp(); + + if (!enable) + { + return ICollisionProvider.None; + } + + switch (_CollisionSource) + { + case CollisionSource.None: + result = ICollisionProvider.None; + break; + case CollisionSource.GPU: + if (_Valid && !_Water.IsRunningWithoutGraphics) + { + result = new CollisionQueryWithPasses(_Water); + } + + if (_Water.IsRunningWithoutGraphics) + { + Debug.LogError($"Crest: GPU queries not supported in headless/batch mode. To resolve, assign an Animated Wave Settings asset to the {nameof(WaterRenderer)} component and set the Collision Source to be a CPU option."); + } + break; + case CollisionSource.CPU: + if (_BakedWaveData != null) + { + result = _BakedWaveData.CreateCollisionProvider(); + } + break; + } + + if (result == null) + { + // This should not be hit, but can be if compute shaders aren't loaded correctly. + // They will print out appropriate errors. Don't just return null and have null reference + // exceptions spamming the logs. + return ICollisionProvider.None; + } + + return result; + } + + // + // DrawFilter + // + + internal readonly struct WavelengthFilter + { + public readonly float _Minimum; + public readonly float _Maximum; + public readonly float _TransitionThreshold; + public readonly float _ViewerAltitudeLevelAlpha; + public readonly int _Slice; + public readonly int _Slices; + + public WavelengthFilter(WaterRenderer water, int slice) + { + _Slice = slice; + _Slices = water.LodLevels; + _Maximum = water.MaximumWavelength(slice); + _Minimum = _Maximum * 0.5f; + _TransitionThreshold = water.MaximumWavelength(_Slices - 1) * 0.5f; + _ViewerAltitudeLevelAlpha = water.ViewerAltitudeLevelAlpha; + } + } + + internal static float FilterByWavelength(WavelengthFilter filter, float wavelength) + { + // No wavelength preference - don't draw per-lod + if (wavelength == 0f) + { + return 0f; + } + + // Too small for this lod + if (wavelength < filter._Minimum) + { + return 0f; + } + + // If approaching end of lod chain, start smoothly transitioning any large wavelengths across last two lods + if (wavelength >= filter._TransitionThreshold) + { + if (filter._Slice == filter._Slices - 2) + { + return 1f - filter._ViewerAltitudeLevelAlpha; + } + + if (filter._Slice == filter._Slices - 1) + { + return filter._ViewerAltitudeLevelAlpha; + } + } + else if (wavelength < filter._Maximum) + { + // Fits in this lod + return 1f; + } + + return 0f; + } + + internal static float FilterByWavelength(WaterRenderer water, int slice, float wavelength) + { + return FilterByWavelength(new(water, slice), wavelength); + } + + + // + // Inputs + // + + internal static readonly Utility.SortedList s_Inputs = new(Helpers.DuplicateComparison); + private protected override Utility.SortedList Inputs => s_Inputs; + + [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)] + static void OnLoad() + { + s_Inputs.Clear(); + } + +#if UNITY_EDITOR + [@OnChange] + private protected override void OnChange(string propertyPath, object previousValue) + { + base.OnChange(propertyPath, previousValue); + + switch (propertyPath) + { + case nameof(_CollisionLayers): + case nameof(_CollisionSource): + if (_Water == null || !_Water.isActiveAndEnabled || !Enabled) return; + Queryable?.CleanUp(); + InitializeProvider(true); + break; + } + } +#endif + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/AnimatedWavesLod.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/AnimatedWavesLod.cs.meta new file mode 100644 index 000000000..620871510 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/AnimatedWavesLod.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 71b85abdc5e234fe8a685d3be0b95443 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Cascade.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Cascade.cs new file mode 100644 index 000000000..51a8b30c8 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Cascade.cs @@ -0,0 +1,31 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; + +namespace WaveHarmonic.Crest +{ + readonly struct Cascade + { + public readonly Vector2 _SnappedPosition; + public readonly float _Texel; + public readonly int _Resolution; + public readonly Vector4 Packed => new(_SnappedPosition.x, _SnappedPosition.y, _Texel, 0f); + + public Cascade(Vector2 snapped, float texel, int resolution) + { + _SnappedPosition = snapped; + _Texel = texel; + _Resolution = resolution; + } + + public readonly Rect TexelRect + { + get + { + var w = _Texel * _Resolution; + return new(_SnappedPosition.x - w / 2f, _SnappedPosition.y - w / 2f, w, w); + } + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Cascade.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Cascade.cs.meta new file mode 100644 index 000000000..862160253 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Cascade.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3a52c8c04f6c749d7a2bc6e5a4fbe9ae +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/ClipLod.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/ClipLod.cs new file mode 100644 index 000000000..1b1ebcb53 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/ClipLod.cs @@ -0,0 +1,120 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using UnityEngine.Experimental.Rendering; +using UnityEngine.Rendering; +using WaveHarmonic.Crest.Utility; + +namespace WaveHarmonic.Crest +{ + /// + /// The default state for clipping. + /// + public enum DefaultClippingState + { + /// + /// By default, nothing is clipped. Use clip inputs to remove water. + /// + NothingClipped, + + /// + /// By default, everything is clipped. Use clip inputs to add water. + /// + EverythingClipped, + } + + /// + /// Drives water surface clipping (carving holes). + /// + /// + /// 0-1 values, surface clipped when > 0.5. + /// + [FilterEnum(nameof(_TextureFormatMode), Filtered.Mode.Exclude, (int)LodTextureFormatMode.Automatic)] + public sealed partial class ClipLod : Lod + { + [Tooltip("The default clipping behaviour.\n\nWhether to clip nothing by default (and clip inputs remove patches of surface), or to clip everything by default (and clip inputs add patches of surface).")] + [@GenerateAPI(Setter.Custom)] + [@DecoratedField, SerializeField] + internal DefaultClippingState _DefaultClippingState = DefaultClippingState.NothingClipped; + + static new class ShaderIDs + { + public static readonly int s_ClipByDefault = Shader.PropertyToID("g_Crest_ClipByDefault"); + } + + internal static readonly Color s_GizmoColor = new(0f, 1f, 1f, 0.5f); + + internal override string ID => "Clip"; + internal override string Name => "Clip Surface"; + internal override Color GizmoColor => s_GizmoColor; + private protected override Color ClearColor => _DefaultClippingState == DefaultClippingState.EverythingClipped ? Color.white : Color.black; + private protected override bool NeedToReadWriteTextureData => true; + private protected override bool RequiresClearBorder => true; + + private protected override GraphicsFormat RequestedTextureFormat => _TextureFormatMode switch + { + // The clip values only really need 8bits (unless using signed distance). + LodTextureFormatMode.Performance => GraphicsFormat.R8_UNorm, + LodTextureFormatMode.Precision => GraphicsFormat.R16_UNorm, + LodTextureFormatMode.Manual => _TextureFormat, + _ => throw new System.NotImplementedException(), + }; + + internal ClipLod() + { + _TextureFormat = GraphicsFormat.R8_UNorm; + } + + internal override void SetGlobals(bool enable) + { + base.SetGlobals(enable); + Shader.SetGlobalFloat(ShaderIDs.s_ClipByDefault, enable && Enabled ? (float)_DefaultClippingState : (float)DefaultClippingState.NothingClipped); + } + + internal override void Disable() + { + base.Disable(); + Shader.SetGlobalFloat(ShaderIDs.s_ClipByDefault, (float)DefaultClippingState.NothingClipped); + } + + internal override void BuildCommandBuffer(WaterRenderer water, CommandBuffer buffer) + { + base.BuildCommandBuffer(water, buffer); + Shader.SetGlobalFloat(ShaderIDs.s_ClipByDefault, (float)_DefaultClippingState); + } + + internal static readonly SortedList s_Inputs = new(Helpers.DuplicateComparison); + private protected override SortedList Inputs => s_Inputs; + + [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)] + static void OnLoad() + { + s_Inputs.Clear(); + } + + void SetDefaultClippingState(DefaultClippingState previous, DefaultClippingState current) + { + if (previous == current) return; + if (_Water == null || !_Water.isActiveAndEnabled || !Enabled) return; + + // Change default clipping state. + _TargetsToClear = Mathf.Max(1, _TargetsToClear); + } + +#if UNITY_EDITOR + [@OnChange] + private protected override void OnChange(string path, object previous) + { + base.OnChange(path, previous); + + switch (path) + { + case nameof(_DefaultClippingState): + SetDefaultClippingState((DefaultClippingState)previous, _DefaultClippingState); + break; + } + } +#endif + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/ClipLod.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/ClipLod.cs.meta new file mode 100644 index 000000000..f3f7096c0 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/ClipLod.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ed87ea342278349c4885adef619f19cb +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/ColorLod.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/ColorLod.cs new file mode 100644 index 000000000..399df336c --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/ColorLod.cs @@ -0,0 +1,169 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using UnityEngine.Experimental.Rendering; +using UnityEngine.Rendering; + +namespace WaveHarmonic.Crest +{ + /// + /// The source of depth color. + /// + public enum ShorelineVolumeColorSource + { + /// + /// No depth color. + /// + None, + + /// + /// Depth color based on water depth. + /// + Depth, + + /// + /// Depth color based on shoreline distance. + /// + Distance, + } + + /// + /// Contains shared functionality for and . + /// + [FilterEnum(nameof(_TextureFormatMode), Filtered.Mode.Exclude, (int)LodTextureFormatMode.Automatic)] + public abstract partial class ColorLod : Lod + { + [@Space(10f)] + + [Tooltip("Source of the shoreline color.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + internal ShorelineVolumeColorSource _ShorelineColorSource; + + [Tooltip("Color of the shoreline color.")] + [@Predicated(nameof(_ShorelineColorSource), inverted: false, nameof(ShorelineVolumeColorSource.None), hide: true)] + [@GenerateAPI(Setter.Custom)] + [@DecoratedField, SerializeField] + private protected Color _ShorelineColor; + + [Tooltip("The maximum distance of the shoreline color.\n\nIf using Depth, then it is maximum depth.")] + [@Predicated(nameof(_ShorelineColorSource), inverted: false, nameof(ShorelineVolumeColorSource.None), hide: true)] + [@GenerateAPI] + [@DecoratedField, SerializeField] + float _ShorelineColorMaximumDistance = 10f; + + [Tooltip("Shoreline color falloff value.")] + [@Predicated(nameof(_ShorelineColorSource), inverted: false, nameof(ShorelineVolumeColorSource.None), hide: true)] + [@GenerateAPI] + [@DecoratedField, SerializeField] + float _ShorelineColorFalloff = 2f; + + static new class ShaderIDs + { + public static readonly int s_ShorelineColor = Shader.PropertyToID("_Crest_ShorelineColor"); + public static readonly int s_ShorelineColorMaximumDistance = Shader.PropertyToID("_Crest_ShorelineColorMaximumDistance"); + public static readonly int s_ShorelineColorFalloff = Shader.PropertyToID("_Crest_ShorelineColorFalloff"); + } + + private protected abstract int GlobalShaderID { get; } + private protected abstract void SetShorelineColor(Color previous, Color current); + private protected Vector4 _ShorelineColorValue; + ShorelineColorInput _ShorelineColorInput; + + private protected override GraphicsFormat RequestedTextureFormat => _TextureFormatMode switch + { + LodTextureFormatMode.Manual => _TextureFormat, + LodTextureFormatMode.Performance => GraphicsFormat.R8G8B8_UNorm, + LodTextureFormatMode.Precision => GraphicsFormat.R16G16B16_UNorm, + _ => throw new System.NotImplementedException($"Crest: {_TextureFormatMode} not implemented for {Name}."), + }; + + internal ColorLod() + { + // Interpolation banding with lower precision. + _TextureFormat = GraphicsFormat.R16G16B16_UNorm; + _TextureFormatMode = LodTextureFormatMode.Precision; + } + + internal override void Enable() + { + base.Enable(); + + if (Enabled) + { + _ShorelineColorInput ??= new(this); + // Convert color to value. + SetShorelineColor(Color.clear, _ShorelineColor); + Inputs.Add(_ShorelineColorInput.Queue, _ShorelineColorInput); + } + } + + internal override void SetGlobals(bool enable) + { + base.SetGlobals(enable); + + Helpers.SetGlobalBoolean(GlobalShaderID, enable && Enabled); + } + + internal override void Disable() + { + base.Disable(); + + Inputs.Remove(_ShorelineColorInput); + } + + sealed class ShorelineColorInput : ILodInput + { + public bool Enabled => _VolumeColorLod._ShorelineColorSource != ShorelineVolumeColorSource.None && + _VolumeColorLod._Water._DepthLod.Enabled; + public bool IsCompute => true; + public int Queue => int.MinValue; + public int Pass => -1; + public Rect Rect => Rect.zero; + public MonoBehaviour Component => null; + public float Filter(WaterRenderer water, int slice) => 1f; + + readonly ColorLod _VolumeColorLod; + + public ShorelineColorInput(ColorLod lod) + { + _VolumeColorLod = lod; + } + + public void Draw(Lod lod, CommandBuffer buffer, RenderTargetIdentifier target, int pass = -1, float weight = 1, int slices = -1) + { + var resources = WaterResources.Instance; + var wrapper = new PropertyWrapperCompute(buffer, resources.Compute._ShorelineColor, 0); + + wrapper.SetVector(ShaderIDs.s_ShorelineColor, _VolumeColorLod._ShorelineColorValue); + wrapper.SetFloat(ShaderIDs.s_ShorelineColorMaximumDistance, _VolumeColorLod._ShorelineColorMaximumDistance); + wrapper.SetFloat(ShaderIDs.s_ShorelineColorFalloff, _VolumeColorLod._ShorelineColorFalloff); + + wrapper.SetKeyword(WaterResources.Instance.Keywords.ShorelineColorScattering, lod.GetType() == typeof(ScatteringLod)); + wrapper.SetKeyword(WaterResources.Instance.Keywords.ShorelineColorSourceDistance, _VolumeColorLod._ShorelineColorSource == ShorelineVolumeColorSource.Distance); + wrapper.SetTexture(Crest.ShaderIDs.s_Target, target); + + var threads = lod.Resolution / k_ThreadGroupSize; + wrapper.Dispatch(threads, threads, slices); + } + } + } + +#if UNITY_EDITOR + abstract partial class ColorLod + { + private protected override void OnChange(string propertyPath, object previousValue) + { + base.OnChange(propertyPath, previousValue); + + switch (propertyPath) + { + case nameof(_ShorelineColor): + SetShorelineColor((Color)previousValue, _ShorelineColor); + break; + } + } + } +#endif +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/ColorLod.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/ColorLod.cs.meta new file mode 100644 index 000000000..a0ada00b2 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/ColorLod.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e1bc55489896941859aa8af34f8c1083 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/DepthLod.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/DepthLod.cs new file mode 100644 index 000000000..da061407d --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/DepthLod.cs @@ -0,0 +1,107 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using UnityEngine.Experimental.Rendering; +using WaveHarmonic.Crest.Utility; + +namespace WaveHarmonic.Crest +{ + /// + /// Data that gives depth of the water (height of sea level above water floor). + /// + [FilterEnum(nameof(_TextureFormatMode), Filtered.Mode.Exclude, (int)LodTextureFormatMode.Automatic)] + public sealed partial class DepthLod : Lod + { + [Tooltip("Support signed distance field data generated from the depth probes.\n\nRequires a two component texture format.")] + [@GenerateAPI(Setter.Custom)] + [@DecoratedField, SerializeField] + internal bool _EnableSignedDistanceFields = true; + + // NOTE: Must match CREST_WATER_DEPTH_BASELINE in Constants.hlsl. + internal const float k_DepthBaseline = Mathf.Infinity; + internal static readonly Color s_GizmoColor = new(1f, 0f, 0f, 0.5f); + // We want the clear color to be the mininimum terrain height (-1000m). + // Mathf.Infinity can cause problems for distance. + static readonly Color s_NullColor = new(-k_DepthBaseline, k_DepthBaseline, 0, 0); + + internal override string ID => "Depth"; + internal override string Name => "Water Depth"; + internal override Color GizmoColor => s_GizmoColor; + private protected override Color ClearColor => s_NullColor; + private protected override bool NeedToReadWriteTextureData => true; + internal override bool RunsInHeadless => true; + + private protected override GraphicsFormat RequestedTextureFormat => _TextureFormatMode switch + { + LodTextureFormatMode.Automatic or + LodTextureFormatMode.Performance => _EnableSignedDistanceFields ? GraphicsFormat.R16G16_SFloat : GraphicsFormat.R16_SFloat, + LodTextureFormatMode.Precision => _EnableSignedDistanceFields ? GraphicsFormat.R32G32_SFloat : GraphicsFormat.R32_SFloat, + LodTextureFormatMode.Manual => _TextureFormat, + _ => throw new System.NotImplementedException(), + }; + + Texture2DArray _NullTexture; + private protected override Texture2DArray NullTexture + { + get + { + if (_NullTexture == null) + { + var texture = TextureArrayHelpers.CreateTexture2D(s_NullColor, UnityEngine.TextureFormat.RFloat); + texture.name = $"_Crest_{ID}LodTemporaryDefaultTexture"; + _NullTexture = TextureArrayHelpers.CreateTexture2DArray(texture, k_MaximumSlices); + _NullTexture.name = $"_Crest_{ID}LodDefaultTexture"; + Helpers.Destroy(texture); + } + + return _NullTexture; + } + } + + internal DepthLod() + { + _Enabled = true; + _TextureFormat = GraphicsFormat.R16G16_SFloat; + } + + private protected override IDepthProvider CreateProvider(bool enable) + { + Queryable?.CleanUp(); + // Depth is GPU only, and can only be queried using the compute path. + return enable && Enabled ? new DepthQuery(_Water) : IDepthProvider.None; + } + + internal static readonly SortedList s_Inputs = new(Helpers.DuplicateComparison); + private protected override SortedList Inputs => s_Inputs; + + [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)] + static void OnLoad() + { + s_Inputs.Clear(); + } + + void SetEnableSignedDistanceFields(bool previous, bool current) + { + if (previous == current) return; + if (_Water == null || !_Water.isActiveAndEnabled || !Enabled) return; + + ReAllocate(); + } + +#if UNITY_EDITOR + [@OnChange] + private protected override void OnChange(string propertyPath, object previousValue) + { + base.OnChange(propertyPath, previousValue); + + switch (propertyPath) + { + case nameof(_EnableSignedDistanceFields): + SetEnableSignedDistanceFields((bool)previousValue, _EnableSignedDistanceFields); + break; + } + } +#endif + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/DepthLod.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/DepthLod.cs.meta new file mode 100644 index 000000000..8f3359f1d --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/DepthLod.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 679dfc1207b124b3fa00496f7b93a5cd +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/DynamicWavesLod.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/DynamicWavesLod.cs new file mode 100644 index 000000000..fb85024e4 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/DynamicWavesLod.cs @@ -0,0 +1,116 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using UnityEngine.Experimental.Rendering; +using WaveHarmonic.Crest.Utility; + +namespace WaveHarmonic.Crest +{ + /// + /// A dynamic shape simulation that moves around with a displacement LOD. + /// + public sealed partial class DynamicWavesLod : PersistentLod + { + [Tooltip("How much waves are dampened in shallow water.")] + [@Range(0f, 1f)] + [@GenerateAPI] + [SerializeField] + float _AttenuationInShallows = 1f; + + [Tooltip("Settings for fine tuning this simulation.")] + [@Embedded] + [@GenerateAPI(Getter.Custom)] + [SerializeField] + DynamicWavesLodSettings _Settings; + + const string k_DynamicWavesKeyword = "CREST_DYNAMIC_WAVE_SIM_ON_INTERNAL"; + + static new class ShaderIDs + { + public static readonly int s_HorizontalDisplace = Shader.PropertyToID("_Crest_HorizontalDisplace"); + public static readonly int s_DisplaceClamp = Shader.PropertyToID("_Crest_DisplaceClamp"); + public static readonly int s_Damping = Shader.PropertyToID("_Crest_Damping"); + public static readonly int s_Gravity = Shader.PropertyToID("_Crest_Gravity"); + public static readonly int s_CourantNumber = Shader.PropertyToID("_Crest_CourantNumber"); + } + + internal static readonly Color s_GizmoColor = new(0f, 1f, 0f, 0.5f); + + internal override string ID => "DynamicWaves"; + internal override string Name => "Dynamic Waves"; + internal override Color GizmoColor => s_GizmoColor; + private protected override Color ClearColor => Color.black; + internal override bool RunsInHeadless => true; + private protected override ComputeShader SimulationShader => WaterResources.Instance.Compute._UpdateDynamicWaves; + private protected override GraphicsFormat RequestedTextureFormat => _TextureFormatMode switch + { + // Try and match Animated Waves format as we copy this simulation into it. + LodTextureFormatMode.Automatic => Water == null ? GraphicsFormat.None : Water.AnimatedWavesLod.TextureFormatMode switch + { + LodTextureFormatMode.Precision => GraphicsFormat.R32G32_SFloat, + _ => GraphicsFormat.R16G16_SFloat, + }, + LodTextureFormatMode.Performance => GraphicsFormat.R16G16_SFloat, + LodTextureFormatMode.Precision => GraphicsFormat.R32G32_SFloat, + LodTextureFormatMode.Manual => _TextureFormat, + _ => throw new System.NotImplementedException(), + }; + + internal float TimeLeftToSimulate => _TimeToSimulate; + + internal DynamicWavesLod() + { + _OverrideResolution = false; + _Resolution = 512; + _TextureFormatMode = LodTextureFormatMode.Automatic; + _TextureFormat = GraphicsFormat.R16G16_SFloat; + } + + internal override void Enable() + { + base.Enable(); + + Shader.EnableKeyword(k_DynamicWavesKeyword); + } + + internal override void Disable() + { + base.Disable(); + + Shader.DisableKeyword(k_DynamicWavesKeyword); + } + + internal override void Bind(T target) + { + base.Bind(target); + target.SetFloat(ShaderIDs.s_HorizontalDisplace, Settings._HorizontalDisplace); + target.SetFloat(ShaderIDs.s_DisplaceClamp, Settings._DisplaceClamp); + } + + private protected override void SetAdditionalSimulationParameters(T simMaterial) + { + base.SetAdditionalSimulationParameters(simMaterial); + + simMaterial.SetFloat(ShaderIDs.s_Damping, Settings._Damping); + simMaterial.SetFloat(ShaderIDs.s_Gravity, _Water.Gravity * Settings._GravityMultiplier); + simMaterial.SetFloat(ShaderIDs.s_CourantNumber, Settings._CourantNumber); + simMaterial.SetFloat(AnimatedWavesLod.ShaderIDs.s_AttenuationInShallows, _AttenuationInShallows); + } + + private protected override void GetSubstepData(float timeToSimulate, out int substeps, out float delta) + { + substeps = Mathf.FloorToInt(timeToSimulate * _SimulationFrequency); + delta = substeps > 0 ? (1f / _SimulationFrequency) : 0f; + } + + internal static readonly SortedList s_Inputs = new(Helpers.DuplicateComparison); + private protected override SortedList Inputs => s_Inputs; + + [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)] + static void OnLoad() + { + s_Inputs.Clear(); + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/DynamicWavesLod.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/DynamicWavesLod.cs.meta new file mode 100644 index 000000000..a07485c94 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/DynamicWavesLod.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9fb0d3abd1aa34af8942b9bab09a8575 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/FlowLod.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/FlowLod.cs new file mode 100644 index 000000000..40b501fde --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/FlowLod.cs @@ -0,0 +1,70 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using UnityEngine.Experimental.Rendering; +using WaveHarmonic.Crest.Utility; + +namespace WaveHarmonic.Crest +{ + /// + /// Simulates horizontal motion of water. + /// + [FilterEnum(nameof(_TextureFormatMode), Filtered.Mode.Exclude, (int)LodTextureFormatMode.Automatic)] + public sealed partial class FlowLod : Lod + { + const string k_FlowKeyword = "CREST_FLOW_ON_INTERNAL"; + + internal static readonly Color s_GizmoColor = new(0f, 0f, 1f, 0.5f); + + internal override string ID => "Flow"; + internal override Color GizmoColor => s_GizmoColor; + private protected override Color ClearColor => Color.black; + private protected override bool NeedToReadWriteTextureData => true; + internal override bool RunsInHeadless => true; + + private protected override GraphicsFormat RequestedTextureFormat => _TextureFormatMode switch + { + LodTextureFormatMode.Performance => GraphicsFormat.R16G16_SFloat, + LodTextureFormatMode.Precision => GraphicsFormat.R32G32_SFloat, + LodTextureFormatMode.Manual => _TextureFormat, + _ => throw new System.NotImplementedException(), + }; + + internal FlowLod() + { + _Resolution = 128; + _TextureFormat = GraphicsFormat.R16G16_SFloat; + } + + internal override void Enable() + { + base.Enable(); + + Shader.EnableKeyword(k_FlowKeyword); + } + + internal override void Disable() + { + base.Disable(); + + Shader.DisableKeyword(k_FlowKeyword); + } + + private protected override IFlowProvider CreateProvider(bool enable) + { + Queryable?.CleanUp(); + // Flow is GPU only, and can only be queried using the compute path. + return enable && Enabled ? new FlowQuery(_Water) : IFlowProvider.None; + } + + internal static readonly SortedList s_Inputs = new(Helpers.DuplicateComparison); + private protected override SortedList Inputs => s_Inputs; + + [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)] + static void OnLoad() + { + s_Inputs.Clear(); + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/FlowLod.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/FlowLod.cs.meta new file mode 100644 index 000000000..95bdf4bd7 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/FlowLod.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 37086036dea5b4927a5cdb3af2d5d869 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/FoamLod.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/FoamLod.cs new file mode 100644 index 000000000..1c71cbd06 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/FoamLod.cs @@ -0,0 +1,95 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using UnityEngine.Experimental.Rendering; +using WaveHarmonic.Crest.Utility; + +namespace WaveHarmonic.Crest +{ + /// + /// A persistent foam simulation that moves around with a displacement LOD. The input is fully combined water surface shape. + /// + [FilterEnum(nameof(_TextureFormatMode), Filtered.Mode.Exclude, (int)LodTextureFormatMode.Automatic)] + public sealed partial class FoamLod : PersistentLod + { + [Tooltip("Prewarms the simulation on load and teleports.\n\nResults are only an approximation.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + bool _Prewarm = true; + + [Tooltip("Settings for fine tuning this simulation.")] + [@Embedded] + [@GenerateAPI(Getter.Custom)] + [SerializeField] + FoamLodSettings _Settings; + + static new class ShaderIDs + { + public static readonly int s_MinimumWavesSlice = Shader.PropertyToID("_Crest_MinimumWavesSlice"); + public static readonly int s_FoamMaximum = Shader.PropertyToID("_Crest_FoamMaximum"); + public static readonly int s_FoamFadeRate = Shader.PropertyToID("_Crest_FoamFadeRate"); + public static readonly int s_WaveFoamStrength = Shader.PropertyToID("_Crest_WaveFoamStrength"); + public static readonly int s_WaveFoamCoverage = Shader.PropertyToID("_Crest_WaveFoamCoverage"); + public static readonly int s_ShorelineFoamMaxDepth = Shader.PropertyToID("_Crest_ShorelineFoamMaxDepth"); + public static readonly int s_ShorelineFoamStrength = Shader.PropertyToID("_Crest_ShorelineFoamStrength"); + public static readonly int s_NeedsPrewarming = Shader.PropertyToID("_Crest_NeedsPrewarming"); + public static readonly int s_FoamNegativeDepthPriming = Shader.PropertyToID("_Crest_FoamNegativeDepthPriming"); + } + + internal static readonly Color s_GizmoColor = new(1f, 1f, 1f, 0.5f); + + internal override string ID => "Foam"; + internal override Color GizmoColor => s_GizmoColor; + private protected override Color ClearColor => Color.black; + private protected override ComputeShader SimulationShader => WaterResources.Instance.Compute._UpdateFoam; + + private protected override GraphicsFormat RequestedTextureFormat => _TextureFormatMode switch + { + LodTextureFormatMode.Performance => GraphicsFormat.R16_SFloat, + LodTextureFormatMode.Precision => GraphicsFormat.R32_SFloat, + LodTextureFormatMode.Manual => _TextureFormat, + _ => throw new System.NotImplementedException(), + }; + + private protected override void SetAdditionalSimulationParameters(T properties) + { + base.SetAdditionalSimulationParameters(properties); + + // Prewarm simulation for first frame or teleporting. It will not be the same results as running the + // simulation for multiple frames - but good enough. + properties.SetBoolean(ShaderIDs.s_NeedsPrewarming, _Prewarm && _NeedsPrewarmingThisStep); + properties.SetFloat(ShaderIDs.s_FoamFadeRate, Settings._FoamFadeRate); + properties.SetFloat(ShaderIDs.s_WaveFoamStrength, Settings._WaveFoamStrength); + properties.SetFloat(ShaderIDs.s_WaveFoamCoverage, Settings._WaveFoamCoverage); + properties.SetFloat(ShaderIDs.s_ShorelineFoamMaxDepth, Settings._ShorelineFoamMaximumDepth); + properties.SetFloat(ShaderIDs.s_ShorelineFoamStrength, Settings._ShorelineFoamStrength); + properties.SetFloat(ShaderIDs.s_FoamMaximum, Settings.Maximum); + properties.SetFloat(ShaderIDs.s_FoamNegativeDepthPriming, -Settings._ShorelineFoamPriming); + properties.SetInteger(ShaderIDs.s_MinimumWavesSlice, Settings.FilterWaves); + } + + private protected override void GetSubstepData(float timeToSimulate, out int substeps, out float delta) + { + substeps = Mathf.FloorToInt(timeToSimulate * _SimulationFrequency); + + delta = substeps > 0 ? (1f / _SimulationFrequency) : 0f; + } + + internal FoamLod() + { + _Enabled = true; + _TextureFormat = GraphicsFormat.R16_SFloat; + _SimulationFrequency = 30; + } + + internal static readonly SortedList s_Inputs = new(Helpers.DuplicateComparison); + private protected override SortedList Inputs => s_Inputs; + + [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)] + static void OnLoad() + { + s_Inputs.Clear(); + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/FoamLod.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/FoamLod.cs.meta new file mode 100644 index 000000000..e4f7e3382 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/FoamLod.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 42f3809132d8b485a822f0bb271f51c5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Generated.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Generated.meta new file mode 100644 index 000000000..1321022f7 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Generated.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1ea9618107d2946a98206ac4c7772029 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Generated/Lod.Generated.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Generated/Lod.Generated.cs new file mode 100644 index 000000000..8470f269c --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Generated/Lod.Generated.cs @@ -0,0 +1,66 @@ +// + +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using WaveHarmonic.Crest.Utility; + +namespace WaveHarmonic.Crest +{ + partial class DynamicWavesLod + { + DynamicWavesLodSettings _DefaultSettings; + + DynamicWavesLodSettings GetSettings() + { + if (_Settings != null) + { + return _Settings; + } + + if (_DefaultSettings == null) + { + _DefaultSettings = ScriptableObject.CreateInstance(); + _DefaultSettings.name = $"Default {Name} (instance)"; + _DefaultSettings.hideFlags = HideFlags.DontSave | HideFlags.NotEditable; + } + + return _DefaultSettings; + } + + internal override void Destroy() + { + base.Destroy(); + Helpers.Destroy(_DefaultSettings); + } + } + + partial class FoamLod + { + FoamLodSettings _DefaultSettings; + + FoamLodSettings GetSettings() + { + if (_Settings != null) + { + return _Settings; + } + + if (_DefaultSettings == null) + { + _DefaultSettings = ScriptableObject.CreateInstance(); + _DefaultSettings.name = $"Default {Name} (instance)"; + _DefaultSettings.hideFlags = HideFlags.DontSave | HideFlags.NotEditable; + } + + return _DefaultSettings; + } + + internal override void Destroy() + { + base.Destroy(); + Helpers.Destroy(_DefaultSettings); + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Generated/Lod.Generated.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Generated/Lod.Generated.cs.meta new file mode 100644 index 000000000..1e894436f --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Generated/Lod.Generated.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4e88db203d9474c568c462518871bb5a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input.meta new file mode 100644 index 000000000..31f57fcfb --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 51ed544a28b134d58a41f55650e368b7 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/AbsorptionLodInput.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/AbsorptionLodInput.cs new file mode 100644 index 000000000..f5947af48 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/AbsorptionLodInput.cs @@ -0,0 +1,37 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; + +namespace WaveHarmonic.Crest +{ + /// + /// Registers a custom input to the . + /// + /// + /// Attach this to objects that you want to influence the scattering color. + /// + [@HelpURL("Manual/WaterAppearance.html#volume-color-inputs")] + public sealed partial class AbsorptionLodInput : LodInput + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + +#if d_CrestPaint + internal override LodInputMode DefaultMode => LodInputMode.Paint; +#else + internal override LodInputMode DefaultMode => LodInputMode.Renderer; +#endif + + internal override void InferBlend() + { + base.InferBlend(); + _Blend = LodInputBlend.Alpha; + } + + // Looks fine moving around. + private protected override bool FollowHorizontalMotion => true; + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/AbsorptionLodInput.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/AbsorptionLodInput.cs.meta new file mode 100644 index 000000000..deeab974f --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/AbsorptionLodInput.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 247a7260095bc49429a7f7cb2a4851d5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/AlbedoLodInput.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/AlbedoLodInput.cs new file mode 100644 index 000000000..85484d7a0 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/AlbedoLodInput.cs @@ -0,0 +1,24 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; + +namespace WaveHarmonic.Crest +{ + /// + /// Registers a custom input to the . + /// + /// + /// Attach this to objects that you want to influence the surface color. + /// + [@HelpURL("Manual/WaterAppearance.html#albedo-inputs")] + public sealed partial class AlbedoLodInput : LodInput + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + + internal override LodInputMode DefaultMode => LodInputMode.Renderer; + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/AlbedoLodInput.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/AlbedoLodInput.cs.meta new file mode 100644 index 000000000..3ff9019e3 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/AlbedoLodInput.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5c972e8f11f2447768dc0314b7bc34a4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/AnimatedWavesLodInput.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/AnimatedWavesLodInput.cs new file mode 100644 index 000000000..2e161871d --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/AnimatedWavesLodInput.cs @@ -0,0 +1,139 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; + +namespace WaveHarmonic.Crest +{ + /// + /// Registers a custom input to the . + /// + /// + /// Attach this to objects that you want to render into the displacment textures to + /// affect the water shape. + /// + [@HelpURL("Manual/Waves.html#animated-waves-inputs")] + public sealed partial class AnimatedWavesLodInput : LodInput + { + [@Space(10)] + + [Tooltip("When to render the input into the displacement data.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + DisplacementPass _DisplacementPass = DisplacementPass.LodIndependent; + + [Tooltip("Whether to filter this input by wavelength.\n\nIf disabled, it will render to all LODs.")] + [@Predicated(nameof(_DisplacementPass), inverted: true, nameof(DisplacementPass.LodDependent))] + [@GenerateAPI] + [DecoratedField, SerializeField] + bool _FilterByWavelength; + + [Tooltip("Which octave to render into.\n\nFor example, set this to 2 to render into the 2m-4m octave. These refer to the same octaves as the wave spectrum editor.")] + [@Predicated(nameof(_DisplacementPass), inverted: true, nameof(DisplacementPass.LodDependent))] + [@Predicated(nameof(_FilterByWavelength))] + [@GenerateAPI] + [@DecoratedField, SerializeField] + float _OctaveWavelength = 512f; + + + [Header("Culling")] + + [Tooltip("Inform the system how much this input will displace the water surface vertically.\n\nThis is used to set bounding box heights for the water chunks.")] + [@GenerateAPI] + [SerializeField] + float _MaximumDisplacementVertical = 0f; + + [Tooltip("Inform the system how much this input will displace the water surface horizontally.\n\nThis is used to set bounding box widths for the water chunks.")] + [@GenerateAPI] + [SerializeField] + float _MaximumDisplacementHorizontal = 0f; + + [Tooltip("Use the bounding box of an attached renderer component to determine the maximum vertical displacement.")] + [@Predicated(nameof(_Mode), inverted: true, nameof(LodInputMode.Renderer))] + [@GenerateAPI] + [@DecoratedField, SerializeField] + bool _ReportRendererBounds = false; + + + internal override LodInputMode DefaultMode => LodInputMode.Renderer; + internal override int Pass => (int)_DisplacementPass; + + internal AnimatedWavesLodInput() : base() + { + _FollowHorizontalWaveMotion = true; + } + + internal override float Filter(WaterRenderer water, int slice) + { + return AnimatedWavesLod.FilterByWavelength(water, slice, _FilterByWavelength ? _OctaveWavelength : 0f); + } + + private protected override void OnUpdate(WaterRenderer water) + { + base.OnUpdate(water); + + if (!Enabled) + { + return; + } + + var maxDispVert = _MaximumDisplacementVertical; + + // let water system know how far from the sea level this shape may displace the surface + if (_ReportRendererBounds) + { + var range = Data.HeightRange; + var minY = range.x; + var maxY = range.y; + var seaLevel = water.SeaLevel; + maxDispVert = Mathf.Max(maxDispVert, Mathf.Abs(seaLevel - minY), Mathf.Abs(seaLevel - maxY)); + } + + if (_MaximumDisplacementHorizontal > 0f || maxDispVert > 0f) + { + water.ReportMaximumDisplacement(_MaximumDisplacementHorizontal, maxDispVert, 0f); + } + } + } + + partial class AnimatedWavesLodInput : ISerializationCallbackReceiver + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 1; +#pragma warning restore 414 + + [System.Obsolete("Please use DisplacementPass instead.")] + [Tooltip("When to render the input into the displacement data.\n\nIf enabled, it renders into all LODs of the simulation after the combine step rather than before with filtering. Furthermore, it will also affect dynamic waves.")] + [@GenerateAPI(Setter.Custom)] + [@DecoratedField, SerializeField] + [HideInInspector] + bool _RenderPostCombine = true; + + void SetRenderPostCombine(bool previous, bool current, bool force = false) + { + if (previous == current && !force) return; + _DisplacementPass = current ? DisplacementPass.LodIndependent : DisplacementPass.LodDependent; + } + +#pragma warning disable CS0618 // Type or member is obsolete + + /// + void ISerializationCallbackReceiver.OnAfterDeserialize() + { + if (_Version < 1) + { + SetRenderPostCombine(_RenderPostCombine, _RenderPostCombine, force: true); + _Version = 1; + } + } + +#pragma warning restore CS0618 // Type or member is obsolete + + /// + void ISerializationCallbackReceiver.OnBeforeSerialize() + { + + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/AnimatedWavesLodInput.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/AnimatedWavesLodInput.cs.meta new file mode 100644 index 000000000..3dc451e1a --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/AnimatedWavesLodInput.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3d64d1f50f3b548bcbe279507f0e78da +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/ClipLodInput.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/ClipLodInput.cs new file mode 100644 index 000000000..3e30ad75c --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/ClipLodInput.cs @@ -0,0 +1,156 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using UnityEngine.Rendering; +using WaveHarmonic.Crest.Internal; + +namespace WaveHarmonic.Crest +{ + /// + /// Registers a custom input to the . + /// + /// + /// Attach this to objects that you want to use to clip the surface of the water. + /// + [@HelpURL("Manual/Clipping.html#clip-inputs")] + public sealed partial class ClipLodInput : LodInput + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + + [@Heading("Primitive")] + + [Tooltip("The primitive to render (signed distance) into the simulation.")] + [@Predicated(nameof(_Mode), inverted: true, nameof(LodInputMode.Primitive), hide: true)] + [@GenerateAPI] + [@DecoratedField, SerializeField] + internal LodInputPrimitive _Primitive = LodInputPrimitive.Cube; + + // Only Mode.Primitive SDF supports inverted. + [Tooltip("Removes clip surface data instead of adding it.")] + [@Predicated(nameof(_Mode), inverted: true, nameof(LodInputMode.Primitive), hide: true)] + [@GenerateAPI] + [@DecoratedField, SerializeField] + bool _Inverted; + + [@Heading("Culling")] + + [Tooltip("Prevents inputs from cancelling each other out when aligned vertically.\n\nIt is imperfect so custom logic might be needed for your use case.")] + [@Predicated(nameof(_Mode), inverted: false, nameof(LodInputMode.Paint), hide: true)] + [@Predicated(nameof(_Mode), inverted: true, nameof(LodInputMode.Renderer))] + [@GenerateAPI] + [@DecoratedField, SerializeField] + bool _WaterHeightDistanceCulling = false; + + internal override LodInputMode DefaultMode => LodInputMode.Primitive; + // The clip surface samples at the displaced position in the water shader, so the displacement correction is not needed. + private protected override bool FollowHorizontalMotion => true; + + readonly SampleCollisionHelper _SampleHeightHelper = new(); + + ComputeShader PrimitiveShader => WaterResources.Instance.Compute._ClipPrimitive; + static LocalKeyword KeywordInverted => WaterResources.Instance.Keywords.ClipPrimitiveInverted; + static LocalKeyword KeywordSphere => WaterResources.Instance.Keywords.ClipPrimitiveSphere; + static LocalKeyword KeywordCube => WaterResources.Instance.Keywords.ClipPrimitiveCube; + static LocalKeyword KeywordRectangle => WaterResources.Instance.Keywords.ClipPrimitiveRectangle; + + bool _Enabled = true; + Rect _Rect; + + internal override void InferBlend() + { + base.InferBlend(); + _Blend = LodInputBlend.Maximum; + } + + internal override bool Enabled => _Enabled && Mode switch + { + LodInputMode.Primitive => enabled && PrimitiveShader != null, + _ => base.Enabled, + }; + + internal override Rect Rect + { + get + { + if (Mode == LodInputMode.Primitive) + { + if (_RecalculateBounds) + { + // This mode has full transform support so need to get rect from bounds. + _Rect = transform.Bounds().RectXZ(); + _RecalculateBounds = false; + } + + return _Rect; + } + + return base.Rect; + } + } + + internal override void Draw(Lod simulation, CommandBuffer buffer, RenderTargetIdentifier target, int pass = -1, float weight = 1f, int slices = -1) + { + if (Mode == LodInputMode.Primitive) + { + var wrapper = new PropertyWrapperCompute(buffer, PrimitiveShader, 0); + + wrapper.SetMatrix(Crest.ShaderIDs.s_Matrix, transform.worldToLocalMatrix); + + // For culling. + wrapper.SetVector(Crest.ShaderIDs.s_Position, transform.position); + wrapper.SetFloat(Crest.ShaderIDs.s_Diameter, transform.lossyScale.Maximum()); + + wrapper.SetKeyword(KeywordInverted, _Inverted); + wrapper.SetKeyword(KeywordSphere, _Primitive == LodInputPrimitive.Sphere); + wrapper.SetKeyword(KeywordCube, _Primitive == LodInputPrimitive.Cube); + wrapper.SetKeyword(KeywordRectangle, _Primitive == LodInputPrimitive.Quad); + + wrapper.SetTexture(Crest.ShaderIDs.s_Target, target); + + var threads = simulation.Resolution / Lod.k_ThreadGroupSize; + wrapper.Dispatch(threads, threads, slices); + } + else + { + base.Draw(simulation, buffer, target, pass, weight, slices); + } + } + + private protected override void OnUpdate(WaterRenderer water) + { + base.OnUpdate(water); + + if (Mode != LodInputMode.Renderer) + { + _Enabled = true; + return; + } + + if (!base.Enabled) + { + return; + } + + if (Data is not RendererLodInputData data || data._Renderer == null) + { + return; + } + + // Prevents possible conflicts since overlapping doesn't work for every case for convex hull. + if (_WaterHeightDistanceCulling) + { + var position = transform.position; + + if (_SampleHeightHelper.SampleHeight(position, out var waterHeight)) + { + position.y = waterHeight; + _Enabled = Mathf.Abs(data._Renderer.bounds.ClosestPoint(position).y - waterHeight) < 1; + } + } + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/ClipLodInput.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/ClipLodInput.cs.meta new file mode 100644 index 000000000..18394b4f5 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/ClipLodInput.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 26623fd0e291a478a9f8b68a3df7e8a6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/DepthLodInput.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/DepthLodInput.cs new file mode 100644 index 000000000..340c0a3af --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/DepthLodInput.cs @@ -0,0 +1,72 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using UnityEngine.Rendering; + +namespace WaveHarmonic.Crest +{ + /// + /// Registers a custom input to the . + /// + /// + /// + /// Attach this to objects that you want to use to add water depth. + /// + /// + /// Renders depth every frame and should only be used for dynamic objects. For + /// static objects, use a + /// + /// + [@HelpURL("Manual/ShallowsAndShorelines.html#sea-floor-depth")] + public sealed partial class DepthLodInput : LodInput + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + + [@Space(10)] + + [@Label("Relative Height")] + [Tooltip("Whether the data is relative to the input height.\n\nUseful for procedural placement.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + internal bool _Relative; + + [@Label("Copy Signed Distance Field")] + [Tooltip("Whether to copy the signed distance field.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + internal bool _CopySignedDistanceField; + + internal static new class ShaderIDs + { + public static readonly int s_HeightOffset = Shader.PropertyToID("_Crest_HeightOffset"); + public static readonly int s_SDF = Shader.PropertyToID("_Crest_SDF"); + } + + internal override LodInputMode DefaultMode => LodInputMode.Geometry; + + internal override void InferBlend() + { + base.InferBlend(); + _Blend = LodInputBlend.Maximum; + } + + internal override void Draw(Lod simulation, CommandBuffer buffer, RenderTargetIdentifier target, int pass = -1, float weight = 1f, int slice = -1) + { + var wrapper = new PropertyWrapperBuffer(buffer); + + wrapper.SetFloat(ShaderIDs.s_HeightOffset, _Relative ? transform.position.y : 0f); + + if (IsCompute) + { + wrapper.SetInteger(ShaderIDs.s_SDF, _CopySignedDistanceField ? 1 : 0); + buffer.SetKeyword(WaterResources.Instance.Compute._DepthTexture, WaterResources.Instance.Keywords.DepthTextureSDF, simulation._Water._DepthLod._EnableSignedDistanceFields); + } + + base.Draw(simulation, buffer, target, pass, weight, slice); + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/DepthLodInput.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/DepthLodInput.cs.meta new file mode 100644 index 000000000..e435a40e4 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/DepthLodInput.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d13f0b872e9454b5daa77afa95b12943 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/DepthProbe.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/DepthProbe.cs new file mode 100644 index 000000000..a5b6a5b16 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/DepthProbe.cs @@ -0,0 +1,1034 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Rendering; +using UnityEngine.Rendering.HighDefinition; +using UnityEngine.Rendering.Universal; +using WaveHarmonic.Crest.Internal; +using WaveHarmonic.Crest.Utility; + +namespace WaveHarmonic.Crest +{ + /// + /// 's update mode. + /// + public enum DepthProbeMode + { + /// + /// is updating in real-time, in accordance to . + /// + RealTime, + + /// + /// is baked in the Editor. + /// + Baked, + } + + /// + /// How the refreshes when using . + /// + public enum DepthProbeRefreshMode + { + /// + /// Populates the in Start. + /// + OnStart = 0, + + // EveryFrame = 1, + + /// + /// Requires manual updating via . + /// + ViaScripting = 2, + } + + /// + /// How a component is placed in the world. + /// + public enum Placement + { + /// + /// The component is in a fixed position. + /// + Fixed, + + /// + /// The component follows the transform. + /// + Transform, + + /// + /// The component follows the viewpoint. + /// + Viewpoint, + } + + /// + /// Captures scene height / water depth, and renders it into the simulation. + /// + /// + /// Caches the operation to avoid rendering it every frame. This should be used for + /// static geometry, dynamic objects should be tagged with the + /// component. + /// + [@ExecuteDuringEditMode] + [@HelpURL("Manual/ShallowsAndShorelines.html")] + [AddComponentMenu(Constants.k_MenuPrefixInputs + "Depth Probe")] + public sealed partial class DepthProbe : ManagedBehaviour + { + [Tooltip("Specifies the setup for this probe.")] + [@GenerateAPI] + [SerializeField] + internal DepthProbeMode _Type = DepthProbeMode.RealTime; + + [Tooltip("Controls how the probe is refreshed in the Player.\n\nCall Populate() if scripting.")] + [@Predicated(nameof(_Type), inverted: true, nameof(DepthProbeMode.RealTime), hide: true)] + [@GenerateAPI] + [@DecoratedField, SerializeField] + internal DepthProbeRefreshMode _RefreshMode = DepthProbeRefreshMode.OnStart; + + + [@Heading("Capture")] + + [Tooltip("The layers to render into the probe.")] + [@Predicated(nameof(_Type), inverted: true, nameof(DepthProbeMode.RealTime))] + [@GenerateAPI(Setter.Dirty)] + [@DecoratedField, SerializeField] + internal LayerMask _Layers = 1; // Default + + [Tooltip("The resolution of the probe.\n\nLower will be more efficient.")] + [@Predicated(nameof(_Type), inverted: true, nameof(DepthProbeMode.RealTime))] + [@GenerateAPI(Setter.Dirty)] + [@DecoratedField, SerializeField] + internal int _Resolution = 512; + + [Tooltip("The far and near plane of the depth probe camera respectively, relative to the transform.\n\nDepth is captured top-down and orthographically. The gizmo will visualize this range as the bottom box.")] + [@Predicated(nameof(_Type), inverted: true, nameof(DepthProbeMode.RealTime))] + [@Range(-100f, 100f, Range.Clamp.None)] + [@GenerateAPI(Setter.Dirty)] + [SerializeField] + internal Vector2 _CaptureRange = new(-1000f, 1000f); + + [Tooltip("Fills holes left by the maximum of the capture range.\n\nSetting the maximum capture range lower than the highest point of geometry can be useful for eliminating depth artifacts from overhangs, but the side effect is there will be a hole in the depth data where geometry is clipped by the near plane. This will only capture where the holes are to fill them in. This height is relative to the maximum capture range. Set to zero to skip.")] + [@Predicated(nameof(_Type), inverted: true, nameof(DepthProbeMode.RealTime))] + [@Range(0f, 100f, Range.Clamp.Minimum)] + [UnityEngine.Serialization.FormerlySerializedAs("_MaximumHeight")] + [@GenerateAPI(Setter.Dirty)] + [SerializeField] + internal float _FillHolesCaptureHeight; + + [@Label("Enable Back-Face Inclusion")] + [Tooltip("Increase coverage by testing mesh back faces within the Fill Holes area.\n\nUses the back-faces to include meshes where the front-face is within the Fill Holes area and the back-face is within the capture area. An example would be an upright cylinder not over a hole but was not captured due to the top being clipped by the near plane.")] + [@Predicated(nameof(_Type), inverted: true, nameof(DepthProbeMode.RealTime))] + [@Predicated(nameof(_FillHolesCaptureHeight), inverted: false, 0f)] + [@GenerateAPI(Setter.Dirty)] + [@DecoratedField, SerializeField] + bool _EnableBackFaceInclusion = true; + + [Tooltip("Overrides global quality settings.")] + [@Predicated(nameof(_Type), inverted: true, nameof(DepthProbeMode.RealTime))] + [GenerateAPI(Setter.None)] + [@DecoratedField, SerializeField] + QualitySettingsOverride _QualitySettingsOverride = new() + { + _OverrideLodBias = true, + _LodBias = Mathf.Infinity, + _OverrideMaximumLodLevel = true, + _MaximumLodLevel = 0, + _OverrideTerrainPixelError = true, + _TerrainPixelError = 0, + }; + + [@Space(10)] + + [Tooltip("Baked probe.\n\nCan only bake in edit mode.")] + [@Disabled] + [@Predicated(nameof(_Type), inverted: true, nameof(DepthProbeMode.Baked), hide: true)] + [@GenerateAPI] + [@DecoratedField, SerializeField] +#pragma warning disable 649 + internal Texture2D _SavedTexture; +#pragma warning restore 649 + + + [@Heading("Signed Distance Field")] + + [@Label("Generate")] + [Tooltip("Generate a signed distance field for the shoreline.")] + [@Predicated(nameof(_Type), inverted: true, nameof(DepthProbeMode.RealTime))] + [@GenerateAPI(Setter.Dirty)] + [@DecoratedField, SerializeField] + internal bool _GenerateSignedDistanceField = true; + + // Additional rounds of JFA, over the standard log2(resolution), can help reduce + // innacuracies from JFA, see paper for details. + [Tooltip("How many additional Jump Flood rounds to use.\n\nThe standard number of rounds is log2(resolution). Additional rounds can reduce innaccuracies.")] + [@Predicated(nameof(_Type), inverted: true, nameof(DepthProbeMode.RealTime))] + [@Predicated(nameof(_GenerateSignedDistanceField))] + [@GenerateAPI(Setter.Dirty)] + [@DecoratedField, SerializeField] + int _AdditionalJumpFloodRounds = 7; + + + [@Space(10)] + + [@DecoratedField, SerializeField] + internal DebugFields _Debug = new(); + + [System.Serializable] + internal sealed class DebugFields + { + [Tooltip("Will render into the probe every frame. Intended for debugging, will generate garbage.")] + [@Predicated(nameof(_Type), inverted: true, nameof(DepthProbeMode.RealTime))] + [@DecoratedField, SerializeField] + public bool _ForceAlwaysUpdateDebug; + + [Tooltip("Shows hidden objects like the camera which renders into the probe.")] + [@DecoratedField, SerializeField] + public bool _ShowHiddenObjects; + +#if !CREST_DEBUG + [HideInInspector] +#endif + [@DecoratedField, SerializeField] + public bool _ShowSimulationDataInScene; + } + + const int k_CopyKernel = 0; + const int k_FillKernel = 1; + + internal Camera _Camera; + Rect _Rect; + bool _RecalculateBounds = true; + CommandBuffer _CommandBuffer; + + Rect Rect + { + get + { + if (_RecalculateBounds) + { + _Rect = Managed ? new(Position.XZ() - Scale * 0.5f, Scale) : transform.RectXZ(); + _RecalculateBounds = false; + } + + return _Rect; + } + } + + internal Texture Texture => _Type == DepthProbeMode.Baked ? SavedTexture : RealtimeTexture; + internal RenderTexture RealtimeTexture { get; set; } + internal RenderTexture TargetTexture { get; set; } + + // Allows another component to take control of the transform. + bool _Managed; + internal bool Managed + { + get => _Managed; + + set + { + if (_Managed != value) _RecalculateBounds = true; + _Managed = value; + } + } + + bool _OverridePosition; + internal bool OverridePosition + { + get => _OverridePosition; + + set + { + if (Managed && _OverridePosition != value) _RecalculateBounds = true; + _OverridePosition = value; + } + } + + Vector3 _Position; + internal Vector3 Position + { + get + { + return Managed && OverridePosition ? _Position.XNZ(transform.position.y) : transform.position; + } + + set + { + if (Managed && OverridePosition && _Position != value) _RecalculateBounds = true; + _Position = value; + } + } + + // Only allow axis-aligned when mananged for now. + internal Quaternion Rotation => Managed ? Quaternion.identity : Quaternion.Euler(transform.rotation.eulerAngles.NYN()); + + Vector2 _Scale; + internal Vector2 Scale + { + get => Managed ? _Scale : transform.lossyScale.XZ(); + + set + { + if (_Scale != value) _RecalculateBounds = true; + _Scale = value; + } + } + + + /// + /// Invoked before the camera renders. + /// + public static System.Action OnBeforeRender { get; set; } + + /// + /// Invoked after the camera renders. + /// + public static System.Action OnAfterRender { get; set; } + + // A background process will listen to this. Allows probe to request a bake with + // needing assembly reference (which it cannot get due to circular reference). + internal static System.Action OnBakeRequest { get; set; } + + + internal static class ShaderIDs + { + public static readonly int s_CamDepthBuffer = Shader.PropertyToID("_CamDepthBuffer"); + public static readonly int s_CustomZBufferParams = Shader.PropertyToID("_CustomZBufferParams"); + public static readonly int s_HeightNearHeightFar = Shader.PropertyToID("_HeightNearHeightFar"); + public static readonly int s_HeightOffset = Shader.PropertyToID("_HeightOffset"); + public static readonly int s_CameraDepthBufferBackfaces = Shader.PropertyToID("_Crest_CameraDepthBufferBackfaces"); + public static readonly int s_PreviousPlane = Shader.PropertyToID("_Crest_PreviousPlane"); + + // Bind + public static readonly int s_DepthProbe = Shader.PropertyToID("_Crest_DepthProbe"); + public static readonly int s_DepthProbeHeightOffset = Shader.PropertyToID("_Crest_DepthProbeHeightOffset"); + public static readonly int s_DepthProbeResolution = Shader.PropertyToID("_Crest_DepthProbeResolution"); + + + // SDF + public static readonly int s_JumpSize = Shader.PropertyToID("_Crest_JumpSize"); + public static readonly int s_WaterLevel = Shader.PropertyToID("_Crest_WaterLevel"); + public static readonly int s_ProjectionToWorld = Shader.PropertyToID("_Crest_ProjectionToWorld"); + public static readonly int s_VoronoiPingPong0 = Shader.PropertyToID("_Crest_VoronoiPingPong0"); + public static readonly int s_VoronoiPingPong1 = Shader.PropertyToID("_Crest_VoronoiPingPong1"); + } + +#if d_UnityHDRP + static readonly List s_FrameSettingsFields = new() + { + FrameSettingsField.OpaqueObjects, + FrameSettingsField.TransparentObjects, + FrameSettingsField.TransparentPrepass, + FrameSettingsField.TransparentPostpass, + FrameSettingsField.AsyncCompute, + }; +#endif + + internal void Bind(T wrapper) where T : IPropertyWrapper + { + wrapper.SetTexture(ShaderIDs.s_DepthProbe, Texture); + wrapper.SetFloat(ShaderIDs.s_DepthProbeHeightOffset, transform.position.y); + wrapper.SetFloat(ShaderIDs.s_DepthProbeResolution, _Resolution); + } + + /// + private protected override void OnStart() + { + base.OnStart(); + + if (_Type == DepthProbeMode.RealTime && _RefreshMode == DepthProbeRefreshMode.OnStart) + { + Populate(); + } + } + + void OnDestroy() + { + if (_Camera != null) Helpers.Destroy(_Camera.gameObject); + + _CommandBuffer?.Release(); + _CommandBuffer = null; + } + + private protected override System.Action OnUpdateMethod => OnUpdate; + void OnUpdate(WaterRenderer water) + { + if (transform.hasChanged) + { + _RecalculateBounds = true; + } + } + + private protected override System.Action OnLateUpdateMethod => OnLateUpdate; + void OnLateUpdate(WaterRenderer water) + { + transform.hasChanged = false; + } + + internal bool Outdated => _CurrentStateHash != _RenderedStateHash; + + bool IsTextureOutdated(RenderTexture texture, bool target) + { + return texture != null && + texture.width != _Resolution || + texture.height != _Resolution || + texture.format != (target ? RenderTextureFormat.Depth : FinalFormat); + } + + RenderTextureFormat FinalFormat => _GenerateSignedDistanceField ? RenderTextureFormat.RGFloat : RenderTextureFormat.RFloat; + + void MakeRT(RenderTexture texture, bool target) + { + var format = target ? RenderTextureFormat.Depth : FinalFormat; + var descriptor = texture.descriptor; + descriptor.colorFormat = format; + descriptor.width = descriptor.height = _Resolution; + descriptor.depthBufferBits = target ? 24 : 0; + descriptor.useMipMap = false; + // Compute always requires this to write. + descriptor.enableRandomWrite = !target; + texture.descriptor = descriptor; + texture.Create(); + Debug.Assert(SystemInfo.SupportsRenderTextureFormat(format), "Crest: The graphics device does not support the render texture format " + format.ToString()); + } + + bool InitObjects() + { + if (RealtimeTexture == null) + { + RealtimeTexture = new RenderTexture(0, 0, 0) + { + name = $"_Crest_WaterDepthCache_{gameObject.name}", + anisoLevel = 0, + }; + } + else if (IsTextureOutdated(RealtimeTexture, target: false)) + { + RealtimeTexture.Release(); + } + + if (!RealtimeTexture.IsCreated()) + { + MakeRT(RealtimeTexture, false); + } + + if (_Layers == 0) + { + Debug.LogError("Crest: No valid layers for populating depth probe, aborting.", this); + return false; + } + + if (_Camera == null) + { + _Camera = new GameObject("_Crest_DepthProbeCamera").AddComponent(); + _Camera.transform.parent = transform; + _Camera.transform.localEulerAngles = 90f * Vector3.right; + _Camera.transform.localPosition = Vector3.zero; + _Camera.transform.localScale = Vector3.one; + _Camera.orthographic = true; + _Camera.clearFlags = CameraClearFlags.Depth; + _Camera.enabled = false; + _Camera.allowMSAA = false; + _Camera.allowDynamicResolution = false; + _Camera.depthTextureMode = DepthTextureMode.Depth; + // Stops behaviour from changing in VR. I tried disabling XR before/after camera render but it makes the editor + // go bonkers with split windows. + _Camera.cameraType = CameraType.Reflection; + // I'd prefer to destroy the camera object, but I found sometimes (on first start of editor) it will fail to render. + _Camera.gameObject.SetActive(false); + + this.Manage(_Camera.gameObject); + + if (RenderPipelineHelper.IsUniversal) + { +#if d_UnityURP + var additionalCameraData = _Camera.GetUniversalAdditionalCameraData(); + additionalCameraData.renderShadows = false; + additionalCameraData.requiresColorTexture = false; + additionalCameraData.requiresDepthTexture = false; + additionalCameraData.renderPostProcessing = false; + additionalCameraData.allowXRRendering = false; +#endif + } + else if (RenderPipelineHelper.IsHighDefinition) + { +#if d_UnityHDRP + var additionalCameraData = _Camera.gameObject.AddComponent(); + + additionalCameraData.clearColorMode = HDAdditionalCameraData.ClearColorMode.Color; + additionalCameraData.volumeLayerMask = 0; + additionalCameraData.probeLayerMask = 0; + additionalCameraData.xrRendering = false; + + // Override camera frame settings to disable most of the expensive rendering for this camera. + // Most importantly, disable custom passes and post-processing as third-party stuff might throw + // errors because of this camera. Even with excluding a lot of HDRP features, it still does a + // lit pass which is not cheap. + additionalCameraData.customRenderingSettings = true; + + foreach (FrameSettingsField frameSetting in System.Enum.GetValues(typeof(FrameSettingsField))) + { + if (!s_FrameSettingsFields.Contains(frameSetting)) + { + // Enable override and then disable the feature. + additionalCameraData.renderingPathCustomFrameSettingsOverrideMask.mask[(uint)frameSetting] = true; + additionalCameraData.renderingPathCustomFrameSettings.SetEnabled(frameSetting, false); + } + } +#endif + } + } + + // Always update. + _Camera.orthographicSize = Mathf.Max(Scale.x * 0.5f, Scale.y * 0.5f); + _Camera.cullingMask = _Layers; + _Camera.gameObject.hideFlags = _Debug._ShowHiddenObjects ? HideFlags.DontSave : HideFlags.HideAndDontSave; + + if (TargetTexture == null) + { + TargetTexture = new RenderTexture(0, 0, 0) + { + name = $"_Crest_WaterDepthTarget_{gameObject.name}", + }; + } + else if (IsTextureOutdated(TargetTexture, target: true)) + { + TargetTexture.Release(); + } + + if (!TargetTexture.IsCreated()) + { + MakeRT(TargetTexture, true); + } + + _Camera.targetTexture = TargetTexture; + + return true; + } + + /// + /// Populates the (including re-baking). + /// + /// + /// Call this method if using , or + /// if needing the probe to be updated re-baked (re-baking editor only). + /// + public void Populate() + { + if (_Type == DepthProbeMode.Baked) + { + OnBakeRequest?.Invoke(this); + } + else + { + ForcePopulate(); + } + } + + internal void ForcePopulate() + { + if (WaterRenderer.RunningWithoutGraphics) + { + // Don't bake in headless mode + Debug.LogWarning("Crest: Depth probe will not be populated at runtime when in batched/headless mode. Please pre-bake the probe in the Editor."); + return; + } + + // Make sure we have required objects. + if (!InitObjects()) + { + return; + } + + var oldShadowDistance = 0f; + + if (RenderPipelineHelper.IsLegacy) + { + // Stop shadow passes from executing. + oldShadowDistance = QualitySettings.shadowDistance; + QualitySettings.shadowDistance = 0f; + } + + _QualitySettingsOverride.Override(); + + OnBeforeRender?.Invoke(this); + +#if UNITY_EDITOR + try +#endif + { + // Capture pass. + RenderDepthIntoProbe(k_CopyKernel, _CaptureRange.y); + + if (_FillHolesCaptureHeight > 0f) + { + // Fill holes pass. + RenderDepthIntoProbe(k_FillKernel, _CaptureRange.y + _FillHolesCaptureHeight); + } + } +#if UNITY_EDITOR + // Ensure that any global settings are restored. + finally +#endif + { + _QualitySettingsOverride.Restore(); + + // Built-in only. + if (RenderPipelineHelper.IsLegacy) + { + QualitySettings.shadowDistance = oldShadowDistance; + } + + OnAfterRender?.Invoke(this); + } + + if (_GenerateSignedDistanceField) + { + RenderSignedDistanceField(inverted: false); + RenderSignedDistanceField(inverted: true); + } + + HashState(ref _RenderedStateHash); + } + + void RenderDepthIntoProbe(int kernel, float height) + { + _Camera.transform.position = Position + Vector3.up * height; + _Camera.farClipPlane = -_CaptureRange.x + height; + + if (Managed) + { + _Camera.transform.forward = Vector3.down; + } + else + { + // Face down maintaining Y rotation. + var transform = _Camera.transform; + var rotation = transform.parent == null ? transform.localEulerAngles.y : transform.parent.eulerAngles.y; + transform.forward = Vector3.down; + transform.eulerAngles = transform.eulerAngles.XNZ(rotation); + } + + RenderTexture backFaces = null; + if (_EnableBackFaceInclusion && kernel == k_FillKernel) + { + var target = _Camera.targetTexture; + // No need to clear as depth is cleared by camera. + backFaces = RenderTexture.GetTemporary(target.descriptor); + _Camera.targetTexture = backFaces; + + var oldInvertCulling = GL.invertCulling; + GL.invertCulling = true; + + // Render scene, saving depths in depth buffer. +#if d_UnityURP + if (RenderPipelineHelper.IsUniversal) + { + Helpers.RenderCameraWithoutCustomPasses(_Camera); + } + else +#endif + { + _Camera.Render(); + } + + _Camera.targetTexture = target; + GL.invertCulling = oldInvertCulling; + } + + // Render scene, saving depths in depth buffer. +#if d_UnityURP + if (RenderPipelineHelper.IsUniversal) + { + Helpers.RenderCameraWithoutCustomPasses(_Camera); + } + else +#endif + { + _Camera.Render(); + } + + var wrapper = new PropertyWrapperComputeStandalone(WaterResources.Instance.Compute._RenderDepthProbe, kernel); + + wrapper.SetFloat(ShaderIDs.s_HeightOffset, transform.position.y); + + // Zbuffer params + //float4 _ZBufferParams; // x: 1-far/near, y: far/near, z: x/far, w: y/far + float near = _Camera.nearClipPlane, far = _Camera.farClipPlane; + wrapper.SetVector(ShaderIDs.s_CustomZBufferParams, new(1f - far / near, far / near, (1f - far / near) / far, (far / near) / far)); + + // Altitudes for near and far planes + var ymax = _Camera.transform.position.y - near; + var ymin = ymax - far; + wrapper.SetVector(ShaderIDs.s_HeightNearHeightFar, new(ymax, ymin)); + + wrapper.SetTexture(ShaderIDs.s_CamDepthBuffer, _Camera.targetTexture); + wrapper.SetTexture(Crest.ShaderIDs.s_Target, RealtimeTexture); + + if (_EnableBackFaceInclusion && kernel == k_FillKernel) + { + near = _Camera.nearClipPlane; + far = _CaptureRange.x + _CaptureRange.y; + + // Altitudes for near and far planes. + ymax = transform.position.y + _CaptureRange.y - near; + wrapper.SetTexture(ShaderIDs.s_CameraDepthBufferBackfaces, backFaces); + wrapper.SetFloat(ShaderIDs.s_PreviousPlane, ymax + _Camera.nearClipPlane); + } + + wrapper.SetKeyword(WaterResources.Instance.Keywords.DepthProbeBackFaceInclusion, _EnableBackFaceInclusion); + + var threads = RealtimeTexture.width / Lod.k_ThreadGroupSize; + wrapper.Dispatch(threads, threads, 1); + + _Camera.transform.localPosition = Vector3.zero; + + RenderTexture.ReleaseTemporary(backFaces); + } + + void RenderSignedDistanceField(bool inverted) + { + var shader = WaterResources.Instance.Compute._JumpFloodSDF; + + if (shader == null) + { + return; + } + + var cameraToWorldMatrix = _Camera.cameraToWorldMatrix; + var projectionMatrix = _Camera.projectionMatrix; + var projectionToWorldMatrix = cameraToWorldMatrix * projectionMatrix.inverse; + + var buffer = _CommandBuffer ??= new(); + buffer.Clear(); + buffer.name = "Jump Flood"; + // Common uniforms. + buffer.SetComputeFloatParam(shader, DepthLodInput.ShaderIDs.s_HeightOffset, transform.position.y); + buffer.SetComputeIntParam(shader, Crest.ShaderIDs.s_TextureSize, _Resolution); + buffer.SetComputeMatrixParam(shader, ShaderIDs.s_ProjectionToWorld, projectionToWorldMatrix); + + // Allow generating without water present. + { + var water = WaterRenderer.Instance; + var height = water != null ? water.SeaLevel : transform.position.y; + buffer.SetComputeFloatParam(shader, ShaderIDs.s_WaterLevel, height); + buffer.SetKeyword(shader, WaterResources.Instance.Keywords.JumpFloodStandalone, water == null); + } + + var descriptor = new RenderTextureDescriptor(_Resolution, _Resolution) + { + autoGenerateMips = false, + colorFormat = RenderTextureFormat.RGHalf, + useMipMap = false, + enableRandomWrite = true, + depthBufferBits = 0, + }; + + var voronoiPingPong0 = ShaderIDs.s_VoronoiPingPong0; + var voronoiPingPong1 = ShaderIDs.s_VoronoiPingPong1; + + // No need to clear both are always overwritten. + buffer.GetTemporaryRT(voronoiPingPong0, descriptor); + buffer.GetTemporaryRT(voronoiPingPong1, descriptor); + + buffer.SetKeyword(shader, WaterResources.Instance.Keywords.JumpFloodInverted, inverted); + + // Initialize. + { + var kernel = shader.FindKernel("CrestInitialize"); + + buffer.SetComputeTextureParam(shader, kernel, Crest.ShaderIDs.s_Source, RealtimeTexture); + buffer.SetComputeTextureParam(shader, kernel, Crest.ShaderIDs.s_Target, voronoiPingPong0); + buffer.DispatchCompute + ( + shader, + kernel, + RealtimeTexture.width / Lod.k_ThreadGroupSize, + RealtimeTexture.height / Lod.k_ThreadGroupSize, + 1 + ); + } + + // Jump Flood. + { + var kernel = shader.FindKernel("CrestExecute"); + + for (var jumpSize = _Resolution / 2; jumpSize > 0; jumpSize /= 2) + { + ApplyJumpFlood + ( + buffer, + shader, + kernel, + jumpSize, + voronoiPingPong0, + voronoiPingPong1 + ); + (voronoiPingPong0, voronoiPingPong1) = (voronoiPingPong1, voronoiPingPong0); + } + + for (var roundNum = 0; roundNum < _AdditionalJumpFloodRounds; roundNum++) + { + var jumpSize = 1 << roundNum; + ApplyJumpFlood + ( + buffer, + shader, + kernel, + jumpSize, + voronoiPingPong0, + voronoiPingPong1 + ); + (voronoiPingPong0, voronoiPingPong1) = (voronoiPingPong1, voronoiPingPong0); + } + } + + // Apply. + { + var kernel = shader.FindKernel("CrestApply"); + buffer.SetComputeTextureParam(shader, kernel, Crest.ShaderIDs.s_Source, voronoiPingPong0); + buffer.SetComputeTextureParam(shader, kernel, Crest.ShaderIDs.s_Target, RealtimeTexture); + buffer.DispatchCompute + ( + shader, + kernel, + _Resolution / Lod.k_ThreadGroupSize, + _Resolution / Lod.k_ThreadGroupSize, + 1 + ); + } + + Graphics.ExecuteCommandBuffer(buffer); + buffer.ReleaseTemporaryRT(voronoiPingPong0); + buffer.ReleaseTemporaryRT(voronoiPingPong1); + } + + void ApplyJumpFlood + ( + CommandBuffer buffer, + ComputeShader shader, + int kernel, + int jumpSize, + RenderTargetIdentifier source, + RenderTargetIdentifier target + ) + { + buffer.SetComputeIntParam(shader, ShaderIDs.s_JumpSize, jumpSize); + buffer.SetComputeTextureParam(shader, kernel, Crest.ShaderIDs.s_Source, source); + buffer.SetComputeTextureParam(shader, kernel, Crest.ShaderIDs.s_Target, target); + buffer.DispatchCompute + ( + shader, + kernel, + _Resolution / Lod.k_ThreadGroupSize, + _Resolution / Lod.k_ThreadGroupSize, + 1 + ); + } + + void SetDirty(I previous, I current) where I : System.IEquatable + { + if (Equals(previous, current)) return; + HashState(ref _CurrentStateHash); + } + + // LayerMask does not implement IEquatable. + void SetDirty(LayerMask previous, LayerMask current) + { + if (previous == current) return; + HashState(ref _CurrentStateHash); + } + } + + // LodInput + partial class DepthProbe + { + Input _Input; + + /// + private protected override void Initialize() + { + base.Initialize(); + _Input ??= new(this); + ILodInput.Attach(_Input, DepthLod.s_Inputs); + HashState(ref _CurrentStateHash); + +#if CREST_DEBUG + if (_Debug._ShowSimulationDataInScene) + { + ILodInput.Attach(_Input, ClipLod.s_Inputs); + } +#endif + } + + /// + private protected override void OnDisable() + { + base.OnDisable(); + ILodInput.Detach(_Input, DepthLod.s_Inputs); + +#if CREST_DEBUG + if (_Debug._ShowSimulationDataInScene) + { + ILodInput.Detach(_Input, ClipLod.s_Inputs); + } +#endif + } + + sealed class Input : ILodInput + { + public bool Enabled => _Probe.enabled && _Probe.Texture != null; + public bool IsCompute => true; + public int Queue => 0; + public int Pass => -1; + public Rect Rect => _Probe.Rect; + public MonoBehaviour Component => _Probe; + public float Filter(WaterRenderer water, int slice) => 1f; + + readonly DepthProbe _Probe; + + public Input(DepthProbe probe) + { + _Probe = probe; + } + + public void Draw(Lod lod, CommandBuffer buffer, RenderTargetIdentifier target, int pass = -1, float weight = 1, int slices = -1) + { +#if CREST_DEBUG + if (lod is ClipLod) + { + var compute = new PropertyWrapperCompute(buffer, WaterResources.Instance.Compute._ClipPrimitive, 0); + + compute.SetMatrix(Crest.ShaderIDs.s_Matrix, Matrix4x4.TRS(_Probe.Position, _Probe.Rotation, _Probe.Scale.XNZ(100f)).inverse); + + // For culling. + compute.SetVector(Crest.ShaderIDs.s_Position, _Probe.Position); + compute.SetFloat(Crest.ShaderIDs.s_Diameter, _Probe.Scale.x); + + compute.SetKeyword(WaterResources.Instance.Keywords.ClipPrimitiveInverted, false); + compute.SetKeyword(WaterResources.Instance.Keywords.ClipPrimitiveSphere, false); + compute.SetKeyword(WaterResources.Instance.Keywords.ClipPrimitiveCube, true); + compute.SetKeyword(WaterResources.Instance.Keywords.ClipPrimitiveRectangle, false); + compute.SetTexture(Crest.ShaderIDs.s_Target, target); + compute.Dispatch(lod.Resolution / Lod.k_ThreadGroupSize, lod.Resolution / Lod.k_ThreadGroupSize, slices); + return; + } +#endif + + var resources = WaterResources.Instance; + var wrapper = new PropertyWrapperCompute(buffer, resources.Compute._DepthTexture, 0); + + var position = _Probe.Position; + var matrix = Matrix4x4.TRS(position, _Probe.Rotation, _Probe.Scale.XNZ(1f)); + + // Texture Input + wrapper.SetVector(Crest.ShaderIDs.s_TextureSize, _Probe.Scale); + wrapper.SetVector(Crest.ShaderIDs.s_TexturePosition, position.XZ()); + wrapper.SetVector(Crest.ShaderIDs.s_TextureRotation, new Vector2(matrix.m20, matrix.m00).normalized); + wrapper.SetInteger(Crest.ShaderIDs.s_Blend, (int)LodInputBlend.Maximum); + wrapper.SetTexture(Crest.ShaderIDs.s_Texture, _Probe.Texture); + wrapper.SetTexture(Crest.ShaderIDs.s_Target, target); + + // Depth Input + wrapper.SetFloat(DepthLodInput.ShaderIDs.s_HeightOffset, position.y); + wrapper.SetInteger(DepthLodInput.ShaderIDs.s_SDF, _Probe._GenerateSignedDistanceField ? 1 : 0); + wrapper.SetKeyword(resources.Keywords.DepthTextureSDF, lod._Water._DepthLod._EnableSignedDistanceFields); + + var threads = lod.Resolution / Lod.k_ThreadGroupSize; + wrapper.Dispatch(threads, threads, slices); + } + } + } + + sealed partial class DepthProbe + { + // Hash is used to notify whether the probe is outdated in the UI. + int _RenderedStateHash; + int _CurrentStateHash; + + [System.Diagnostics.Conditional("UNITY_EDITOR")] + void HashState(ref int hash) + { + hash = Hash.CreateHash(); + Hash.AddInt(_Layers, ref hash); + Hash.AddInt(_Resolution, ref hash); + Hash.AddObject(_CaptureRange, ref hash); + Hash.AddFloat(_FillHolesCaptureHeight, ref hash); + Hash.AddObject(_QualitySettingsOverride, ref hash); + Hash.AddBool(_EnableBackFaceInclusion, ref hash); + Hash.AddInt(_AdditionalJumpFloodRounds, ref hash); + Hash.AddBool(_GenerateSignedDistanceField, ref hash); + Hash.AddObject(Position, ref hash); + Hash.AddObject(Rotation, ref hash); + Hash.AddObject(Scale, ref hash); + } + +#if UNITY_EDITOR + private protected override void OnValidate() + { + base.OnValidate(); + // OnChange has a bug (possibly with Unity) with LayerMask where it cannot detect changes. + HashState(ref _CurrentStateHash); + } + + [@OnChange] + void OnChange(string propertyPath, object oldValue) + { +#if CREST_DEBUG + ILodInput.Detach(_Input, ClipLod.s_Inputs); + if (_Debug._ShowSimulationDataInScene) + { + ILodInput.Attach(_Input, ClipLod.s_Inputs); + } +#endif + + if (_Camera == null) return; + _Camera.gameObject.hideFlags = _Debug._ShowHiddenObjects ? HideFlags.DontSave : HideFlags.HideAndDontSave; + } + + void Update() + { + if (_Debug._ForceAlwaysUpdateDebug) + { + Populate(); + } + + if (transform.hasChanged) + { + HashState(ref _CurrentStateHash); + } + } +#endif + } + + partial class DepthProbe : ISerializationCallbackReceiver + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 1; +#pragma warning restore 414 + + /// + void ISerializationCallbackReceiver.OnAfterDeserialize() + { + // Version 1 (2024.06.04) + // - Added new capture options replacing Maximum Height's behaviour. + if (_Version < 1) + { + _CaptureRange.y = _FillHolesCaptureHeight; + _FillHolesCaptureHeight = 0f; + _Version = 1; + } + } + + /// + void ISerializationCallbackReceiver.OnBeforeSerialize() + { + + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/DepthProbe.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/DepthProbe.cs.meta new file mode 100644 index 000000000..54a516da2 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/DepthProbe.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 70deb49b538e247b9ab1bf7773d16809 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 300 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/DynamicWavesLodInput.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/DynamicWavesLodInput.cs new file mode 100644 index 000000000..f29751aaf --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/DynamicWavesLodInput.cs @@ -0,0 +1,25 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; + +namespace WaveHarmonic.Crest +{ + /// + /// Registers a custom input to the . + /// + /// + /// Attach this to objects that you want to influence the simulation, such as + /// ripples etc. + /// + [@HelpURL("Manual/Waves.html#dynamic-waves-inputs")] + public sealed partial class DynamicWavesLodInput : LodInput + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + + internal override LodInputMode DefaultMode => LodInputMode.Renderer; + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/DynamicWavesLodInput.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/DynamicWavesLodInput.cs.meta new file mode 100644 index 000000000..300956c4d --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/DynamicWavesLodInput.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 82638e366ec3c4f5587d1ff63e01d8b2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/FlowLodInput.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/FlowLodInput.cs new file mode 100644 index 000000000..d04063ddf --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/FlowLodInput.cs @@ -0,0 +1,34 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; + +namespace WaveHarmonic.Crest +{ + /// + /// Registers a custom input to the . + /// + /// + /// Attach this to objects that you want to influence the horizontal flow of the + /// water volume. + /// + [@HelpURL("Manual/TidesAndCurrents.html#flow-inputs")] + [FilterEnum(nameof(_Blend), Filtered.Mode.Include, (int)LodInputBlend.Additive, (int)LodInputBlend.Alpha)] + public sealed partial class FlowLodInput : LodInput + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + + // Countering will incur thrashing. Previously we allowed the option so the + // serialized value could be "false". + private protected override bool FollowHorizontalMotion => true; + +#if d_CrestPaint + internal override LodInputMode DefaultMode => LodInputMode.Paint; +#else + internal override LodInputMode DefaultMode => LodInputMode.Renderer; +#endif + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/FlowLodInput.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/FlowLodInput.cs.meta new file mode 100644 index 000000000..ec52aee8e --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/FlowLodInput.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a0cdc7659b2c244dbbb625ccd8ae65ae +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/FoamLodInput.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/FoamLodInput.cs new file mode 100644 index 000000000..351af4db4 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/FoamLodInput.cs @@ -0,0 +1,40 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; + +namespace WaveHarmonic.Crest +{ + /// + /// Registers a custom input to the . + /// + /// + /// Attach this to objects that you want to influence the foam simulation, such as + /// depositing foam on the surface. + /// + [@HelpURL("Manual/WaterAppearance.html#foam-inputs")] + [@FilterEnum(nameof(_Blend), Filtered.Mode.Include, (int)LodInputBlend.Additive, (int)LodInputBlend.Maximum)] + public sealed partial class FoamLodInput : LodInput + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + +#if d_CrestPaint + internal override LodInputMode DefaultMode => LodInputMode.Paint; +#else + internal override LodInputMode DefaultMode => LodInputMode.Renderer; +#endif + + internal override void InferBlend() + { + base.InferBlend(); + + if (_Mode is LodInputMode.Paint) + { + _Blend = LodInputBlend.Maximum; + } + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/FoamLodInput.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/FoamLodInput.cs.meta new file mode 100644 index 000000000..6d4c57c3c --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/FoamLodInput.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 67bc7f0b9724d44ab9f0ddf0b1b5a773 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/Generated.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/Generated.meta new file mode 100644 index 000000000..88b91df23 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/Generated.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 20184ba74fed44301b1efff21519c308 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/Generated/LodInput.Generated.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/Generated/LodInput.Generated.cs new file mode 100644 index 000000000..5e0ad15b5 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/Generated/LodInput.Generated.cs @@ -0,0 +1,266 @@ +// + +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using WaveHarmonic.Crest.Utility; + +namespace WaveHarmonic.Crest +{ + [AddComponentMenu(Constants.k_MenuPrefixInputs + "Absorption Input")] + [@FilterEnum(nameof(_Mode), Filtered.Mode.Include, (int)LodInputMode.Renderer, (int)LodInputMode.Texture, (int)LodInputMode.Spline, (int)LodInputMode.Paint)] + partial class AbsorptionLodInput + { + internal override Color GizmoColor => AbsorptionLod.s_GizmoColor; + private protected override SortedList Inputs => AbsorptionLod.s_Inputs; + } + + /// + [ForLodInput(typeof(AbsorptionLodInput), LodInputMode.Texture)] + [System.Serializable] + public sealed partial class AbsorptionTextureLodInputData : TextureLodInputData + { + private protected override ComputeShader TextureShader => WaterResources.Instance.Compute._AbsorptionTexture; + } + + /// + [ForLodInput(typeof(AbsorptionLodInput), LodInputMode.Renderer)] + [System.Serializable] + public sealed partial class AbsorptionRendererLodInputData : RendererLodInputData + { + internal override string ShaderPrefix => "Crest/Inputs/Absorption"; + } + + [AddComponentMenu(Constants.k_MenuPrefixInputs + "Albedo Input")] + [@FilterEnum(nameof(_Mode), Filtered.Mode.Include, (int)LodInputMode.Renderer)] + partial class AlbedoLodInput + { + internal override Color GizmoColor => AlbedoLod.s_GizmoColor; + private protected override SortedList Inputs => AlbedoLod.s_Inputs; + } + + /// + [ForLodInput(typeof(AlbedoLodInput), LodInputMode.Renderer)] + [System.Serializable] + public sealed partial class AlbedoRendererLodInputData : RendererLodInputData + { + internal override string ShaderPrefix => "Crest/Inputs/Albedo"; + } + + [AddComponentMenu(Constants.k_MenuPrefixInputs + "Animated Waves Input")] + [@FilterEnum(nameof(_Mode), Filtered.Mode.Include, (int)LodInputMode.Renderer)] + partial class AnimatedWavesLodInput + { + internal override Color GizmoColor => AnimatedWavesLod.s_GizmoColor; + private protected override SortedList Inputs => AnimatedWavesLod.s_Inputs; + } + + /// + [ForLodInput(typeof(AnimatedWavesLodInput), LodInputMode.Renderer)] + [System.Serializable] + public sealed partial class AnimatedWavesRendererLodInputData : RendererLodInputData + { + internal override string ShaderPrefix => "Crest/Inputs/Animated Waves"; + } + + [AddComponentMenu(Constants.k_MenuPrefixInputs + "Clip Input")] + [@FilterEnum(nameof(_Mode), Filtered.Mode.Include, (int)LodInputMode.Renderer, (int)LodInputMode.Texture, (int)LodInputMode.Paint, (int)LodInputMode.Primitive)] + partial class ClipLodInput + { + internal override Color GizmoColor => ClipLod.s_GizmoColor; + private protected override SortedList Inputs => ClipLod.s_Inputs; + } + + /// + [ForLodInput(typeof(ClipLodInput), LodInputMode.Texture)] + [System.Serializable] + public sealed partial class ClipTextureLodInputData : TextureLodInputData + { + private protected override ComputeShader TextureShader => WaterResources.Instance.Compute._ClipTexture; + } + + /// + [ForLodInput(typeof(ClipLodInput), LodInputMode.Renderer)] + [System.Serializable] + public sealed partial class ClipRendererLodInputData : RendererLodInputData + { + internal override string ShaderPrefix => "Crest/Inputs/Clip"; + } + + [AddComponentMenu(Constants.k_MenuPrefixInputs + "Water Depth Input")] + [@FilterEnum(nameof(_Mode), Filtered.Mode.Include, (int)LodInputMode.Renderer, (int)LodInputMode.Texture, (int)LodInputMode.Geometry)] + partial class DepthLodInput + { + internal override Color GizmoColor => DepthLod.s_GizmoColor; + private protected override SortedList Inputs => DepthLod.s_Inputs; + } + + /// + [ForLodInput(typeof(DepthLodInput), LodInputMode.Texture)] + [System.Serializable] + public sealed partial class DepthTextureLodInputData : TextureLodInputData + { + private protected override ComputeShader TextureShader => WaterResources.Instance.Compute._DepthTexture; + } + + /// + [ForLodInput(typeof(DepthLodInput), LodInputMode.Renderer)] + [System.Serializable] + public sealed partial class DepthRendererLodInputData : RendererLodInputData + { + internal override string ShaderPrefix => "Crest/Inputs/Depth"; + } + + [AddComponentMenu(Constants.k_MenuPrefixInputs + "Dynamic Waves Input")] + [@FilterEnum(nameof(_Mode), Filtered.Mode.Include, (int)LodInputMode.Renderer)] + partial class DynamicWavesLodInput + { + internal override Color GizmoColor => DynamicWavesLod.s_GizmoColor; + private protected override SortedList Inputs => DynamicWavesLod.s_Inputs; + } + + /// + [ForLodInput(typeof(DynamicWavesLodInput), LodInputMode.Renderer)] + [System.Serializable] + public sealed partial class DynamicWavesRendererLodInputData : RendererLodInputData + { + internal override string ShaderPrefix => "Crest/Inputs/Dynamic Waves"; + } + + [AddComponentMenu(Constants.k_MenuPrefixInputs + "Flow Input")] + [@FilterEnum(nameof(_Mode), Filtered.Mode.Include, (int)LodInputMode.Renderer, (int)LodInputMode.Texture, (int)LodInputMode.Paint, (int)LodInputMode.Spline)] + partial class FlowLodInput + { + internal override Color GizmoColor => FlowLod.s_GizmoColor; + private protected override SortedList Inputs => FlowLod.s_Inputs; + } + + /// + [ForLodInput(typeof(FlowLodInput), LodInputMode.Texture)] + [System.Serializable] + public sealed partial class FlowTextureLodInputData : DirectionalTextureLodInputData + { + private protected override ComputeShader TextureShader => WaterResources.Instance.Compute._FlowTexture; + } + + /// + [ForLodInput(typeof(FlowLodInput), LodInputMode.Renderer)] + [System.Serializable] + public sealed partial class FlowRendererLodInputData : RendererLodInputData + { + internal override string ShaderPrefix => "Crest/Inputs/Flow"; + } + + [AddComponentMenu(Constants.k_MenuPrefixInputs + "Foam Input")] + [@FilterEnum(nameof(_Mode), Filtered.Mode.Include, (int)LodInputMode.Renderer, (int)LodInputMode.Texture, (int)LodInputMode.Paint, (int)LodInputMode.Spline)] + partial class FoamLodInput + { + internal override Color GizmoColor => FoamLod.s_GizmoColor; + private protected override SortedList Inputs => FoamLod.s_Inputs; + } + + /// + [ForLodInput(typeof(FoamLodInput), LodInputMode.Texture)] + [System.Serializable] + public sealed partial class FoamTextureLodInputData : TextureLodInputData + { + private protected override ComputeShader TextureShader => WaterResources.Instance.Compute._FoamTexture; + } + + /// + [ForLodInput(typeof(FoamLodInput), LodInputMode.Renderer)] + [System.Serializable] + public sealed partial class FoamRendererLodInputData : RendererLodInputData + { + internal override string ShaderPrefix => "Crest/Inputs/Foam"; + } + + [AddComponentMenu(Constants.k_MenuPrefixInputs + "Water Level Input")] + [@FilterEnum(nameof(_Mode), Filtered.Mode.Include, (int)LodInputMode.Renderer, (int)LodInputMode.Texture, (int)LodInputMode.Paint, (int)LodInputMode.Spline, (int)LodInputMode.Geometry)] + partial class LevelLodInput + { + internal override Color GizmoColor => LevelLod.s_GizmoColor; + private protected override SortedList Inputs => LevelLod.s_Inputs; + } + + /// + [ForLodInput(typeof(LevelLodInput), LodInputMode.Texture)] + [System.Serializable] + public sealed partial class LevelTextureLodInputData : TextureLodInputData + { + private protected override ComputeShader TextureShader => WaterResources.Instance.Compute._LevelTexture; + } + + /// + [ForLodInput(typeof(LevelLodInput), LodInputMode.Renderer)] + [System.Serializable] + public sealed partial class LevelRendererLodInputData : RendererLodInputData + { + internal override string ShaderPrefix => "Crest/Inputs/Level"; + } + + [AddComponentMenu(Constants.k_MenuPrefixInputs + "Scattering Input")] + [@FilterEnum(nameof(_Mode), Filtered.Mode.Include, (int)LodInputMode.Renderer, (int)LodInputMode.Texture, (int)LodInputMode.Spline, (int)LodInputMode.Paint)] + partial class ScatteringLodInput + { + internal override Color GizmoColor => ScatteringLod.s_GizmoColor; + private protected override SortedList Inputs => ScatteringLod.s_Inputs; + } + + /// + [ForLodInput(typeof(ScatteringLodInput), LodInputMode.Texture)] + [System.Serializable] + public sealed partial class ScatteringTextureLodInputData : TextureLodInputData + { + private protected override ComputeShader TextureShader => WaterResources.Instance.Compute._ScatteringTexture; + } + + /// + [ForLodInput(typeof(ScatteringLodInput), LodInputMode.Renderer)] + [System.Serializable] + public sealed partial class ScatteringRendererLodInputData : RendererLodInputData + { + internal override string ShaderPrefix => "Crest/Inputs/Scattering"; + } + + [AddComponentMenu(Constants.k_MenuPrefixInputs + "Shadow Input")] + [@FilterEnum(nameof(_Mode), Filtered.Mode.Include, (int)LodInputMode.Renderer)] + partial class ShadowLodInput + { + internal override Color GizmoColor => ShadowLod.s_GizmoColor; + private protected override SortedList Inputs => ShadowLod.s_Inputs; + } + + /// + [ForLodInput(typeof(ShadowLodInput), LodInputMode.Renderer)] + [System.Serializable] + public sealed partial class ShadowRendererLodInputData : RendererLodInputData + { + internal override string ShaderPrefix => "Crest/Inputs/Shadow"; + } + + [AddComponentMenu(Constants.k_MenuPrefixInputs + "Shape Waves Input")] + [@FilterEnum(nameof(_Mode), Filtered.Mode.Include, (int)LodInputMode.Renderer, (int)LodInputMode.Texture, (int)LodInputMode.Paint, (int)LodInputMode.Spline, (int)LodInputMode.Global)] + partial class ShapeWaves + { + internal override Color GizmoColor => AnimatedWavesLod.s_GizmoColor; + private protected override SortedList Inputs => AnimatedWavesLod.s_Inputs; + } + + /// + [ForLodInput(typeof(ShapeWaves), LodInputMode.Texture)] + [System.Serializable] + public sealed partial class ShapeWavesTextureLodInputData : DirectionalTextureLodInputData + { + private protected override ComputeShader TextureShader => WaterResources.Instance.Compute._ShapeWavesTransfer; + } + + /// + [ForLodInput(typeof(ShapeWaves), LodInputMode.Renderer)] + [System.Serializable] + public sealed partial class ShapeWavesRendererLodInputData : RendererLodInputData + { + internal override string ShaderPrefix => "Crest/Inputs/Shape Waves"; + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/Generated/LodInput.Generated.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/Generated/LodInput.Generated.cs.meta new file mode 100644 index 000000000..c17627ace --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/Generated/LodInput.Generated.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 47424a406f7a145f8a8d6c207b7afc60 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/GeometryLodInputData.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/GeometryLodInputData.cs new file mode 100644 index 000000000..67f3bf311 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/GeometryLodInputData.cs @@ -0,0 +1,111 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using UnityEngine.Rendering; +using WaveHarmonic.Crest.Internal; + +namespace WaveHarmonic.Crest +{ + /// + /// Data storage for for the Geometry input mode. + /// + [System.Serializable] + public abstract partial class GeometryLodInputData : LodInputData + { + [Tooltip("Geometry to render into the simulation.")] + [@GenerateAPI(Setter.Custom)] + [@DecoratedField, SerializeField] + internal Mesh _Geometry; + + private protected abstract Shader GeometryShader { get; } + + internal override bool IsEnabled => _Geometry != null; + + Material _Material; + + internal override void Draw(Lod lod, Component component, CommandBuffer buffer, RenderTargetIdentifier target, int slices) + { +#if UNITY_EDITOR + // Weird things happen when hitting save if this is not set here. Hitting save will + // still flicker the input, but without this it nothing renders. + if (!Application.isPlaying) LodInput.SetBlendFromPreset(_Material, _Input.Blend); +#endif + buffer.DrawMesh(_Geometry, component.transform.localToWorldMatrix, _Material); + } + + internal override void OnEnable() + { + if (_Material == null) + { + _Material = new Material(GeometryShader); + } + + LodInput.SetBlendFromPreset(_Material, _Input.Blend); + } + + internal override void OnDisable() + { + // Empty. + } + + internal override void RecalculateBounds() + { + _Bounds = _Input.transform.TransformBounds(_Geometry.bounds); + } + + internal override void RecalculateRect() + { + _Rect = Bounds.RectXZ(); + } + + void SetGeometry(Mesh previous, Mesh current) + { + if (previous == current) return; + RecalculateCulling(); + } + +#if UNITY_EDITOR + internal override void OnChange(string propertyPath, object previousValue) + { + if (_Input == null || !_Input.isActiveAndEnabled) return; + + switch (propertyPath) + { + case nameof(_Geometry): + SetGeometry((Mesh)previousValue, _Geometry); + break; + case "../" + nameof(LodInput._Blend): + LodInput.SetBlendFromPreset(_Material, _Input.Blend); + break; + } + } + + internal override bool InferMode(Component component, ref LodInputMode mode) + { + return false; + } + + internal override void Reset() + { + base.Reset(); + + _Geometry = Helpers.PlaneMesh; + } +#endif + } + + /// + [ForLodInput(typeof(LevelLodInput), LodInputMode.Geometry)] + public sealed class LevelGeometryLodInputData : GeometryLodInputData + { + private protected override Shader GeometryShader => WaterResources.Instance.Shaders._LevelGeometry; + } + + /// + [ForLodInput(typeof(DepthLodInput), LodInputMode.Geometry)] + public sealed class DepthGeometryLodInputData : GeometryLodInputData + { + private protected override Shader GeometryShader => WaterResources.Instance.Shaders._DepthGeometry; + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/GeometryLodInputData.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/GeometryLodInputData.cs.meta new file mode 100644 index 000000000..86a02ca48 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/GeometryLodInputData.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 695da60ea6ccf44ea988e843144969cb +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/IOptionalLod.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/IOptionalLod.cs new file mode 100644 index 000000000..532b6d509 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/IOptionalLod.cs @@ -0,0 +1,4 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// Intentionally empty. diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/IOptionalLod.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/IOptionalLod.cs.meta new file mode 100644 index 000000000..a3020c89c --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/IOptionalLod.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: cc9697a0accb44ec7a0f693182937c94 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/LevelLodInput.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/LevelLodInput.cs new file mode 100644 index 000000000..488f21916 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/LevelLodInput.cs @@ -0,0 +1,132 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; + +namespace WaveHarmonic.Crest +{ + /// + /// Registers a custom input to the . + /// + /// + /// Attach this to objects that you want to influence the water height. + /// + [@HelpURL("Manual/WaterBodies.html#water-bodies")] + [@FilterEnum(nameof(_Blend), Filtered.Mode.Include, (int)LodInputBlend.Off, (int)LodInputBlend.Additive, (int)LodInputBlend.Minimum, (int)LodInputBlend.Maximum)] + public sealed partial class LevelLodInput : LodInput + { + [@Heading("Water Chunk Culling")] + + [Tooltip("Whether to use the manual \"Height Range\" for water chunk culling.\n\nMandatory for non mesh inputs like \"Texture\".")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + bool _OverrideHeight; + + [Tooltip("The minimum and maximum height value to report for water chunk culling.")] + [@Predicated(nameof(_OverrideHeight))] + [@Range(-100, 100, Range.Clamp.None)] + [@GenerateAPI] + [SerializeField] + Vector2 _HeightRange = new(-100, 100); + + LevelLodInput() + { + _FollowHorizontalWaveMotion = true; + } + + // Water level is packed into alpha using the displaced position. + private protected override bool FollowHorizontalMotion => true; + internal override LodInputMode DefaultMode => LodInputMode.Geometry; + + internal Rect _Rect; + + internal override void InferBlend() + { + base.InferBlend(); + + _Blend = LodInputBlend.Off; + + if (_Mode is LodInputMode.Paint or LodInputMode.Texture) + { + _Blend = LodInputBlend.Additive; + } + } + + private protected override void Initialize() + { + base.Initialize(); + _Reporter ??= new(this); + WaterChunkRenderer.HeightReporters.Add(_Reporter); + } + + private protected override void OnDisable() + { + base.OnDisable(); + WaterChunkRenderer.HeightReporters.Remove(_Reporter); + } + + bool ReportHeight(ref Rect bounds, ref float minimum, ref float maximum) + { + if (!Enabled) + { + return false; + } + + _Rect = Data.Rect; + + // These modes do not provide a height yet. + if (!Data.HasHeightRange && !_OverrideHeight) + { + return false; + } + + if (bounds.Overlaps(_Rect, false)) + { + var range = _OverrideHeight ? _HeightRange : Data.HeightRange; + minimum = range.x; + maximum = range.y; + return true; + } + + return false; + } + } + + partial class LevelLodInput + { + Reporter _Reporter; + + sealed class Reporter : IReportsHeight + { + readonly LevelLodInput _Input; + public Reporter(LevelLodInput input) => _Input = input; + public bool ReportHeight(ref Rect bounds, ref float minimum, ref float maximum) => _Input.ReportHeight(ref bounds, ref minimum, ref maximum); + } + } + + partial class LevelLodInput : ISerializationCallbackReceiver + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 1; +#pragma warning restore 414 + + /// + void ISerializationCallbackReceiver.OnAfterDeserialize() + { + // Version 1 + // - Implemented blend mode but default value was serialized as Additive. + if (_Version < 1) + { + if (_Mode is LodInputMode.Spline or LodInputMode.Renderer) _Blend = LodInputBlend.Off; + _Version = 1; + } + } + + /// + void ISerializationCallbackReceiver.OnBeforeSerialize() + { + // Empty. + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/LevelLodInput.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/LevelLodInput.cs.meta new file mode 100644 index 000000000..500b50bdb --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/LevelLodInput.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a4edd034314af4679ba066d79580dc1d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/LodInput.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/LodInput.cs new file mode 100644 index 000000000..09267b46a --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/LodInput.cs @@ -0,0 +1,485 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using System; +using System.Reflection; +using UnityEditor; +using UnityEngine; +using UnityEngine.Rendering; +using WaveHarmonic.Crest.Internal; + +namespace WaveHarmonic.Crest +{ + interface ILodInput + { + const int k_QueueMaximumSubIndex = 1000; + + /// + /// Draw the input (the render target will be bound) + /// + public void Draw(Lod simulation, CommandBuffer buffer, RenderTargetIdentifier target, int pass = -1, float weight = 1f, int slice = -1); + + float Filter(WaterRenderer water, int slice); + + /// + /// Whether to apply this input. + /// + bool Enabled { get; } + + bool IsCompute { get; } + + int Queue { get; } + + int Pass { get; } + + Rect Rect { get; } + + MonoBehaviour Component { get; } + + // Allow sorting within a queue. Callers can pass in things like sibling index to + // get deterministic sorting. + int Order => Queue * k_QueueMaximumSubIndex + Mathf.Min(Component.transform.GetSiblingIndex(), k_QueueMaximumSubIndex - 1); + + internal static void Attach(ILodInput input, Utility.SortedList inputs) + { + inputs.Remove(input); + inputs.Add(input.Order, input); + } + + internal static void Detach(ILodInput input, Utility.SortedList inputs) + { + inputs.Remove(input); + } + } + + /// + /// Base class for scripts that register inputs to the various LOD data types. + /// + [@ExecuteDuringEditMode] + [@HelpURL("Manual/WaterInputs.html")] + public abstract partial class LodInput : ManagedBehaviour + { + [Tooltip("The mode for this input.\n\nSee the manual for more details about input modes. Use AddComponent(LodInputMode) to set the mode via scripting. The mode cannot be changed after creation.")] + [@Filtered((int)LodInputMode.Unset)] + [@GenerateAPI(Setter.None)] + [SerializeField] + internal LodInputMode _Mode = LodInputMode.Unset; + + // NOTE: + // Weight and Feather do not support Depth and Clip as they do not make much sense. + // For others it is a case of only supporting unsupported mode(s). + + [Tooltip("Scales the input.")] + [@Predicated(typeof(AlbedoLodInput), inverted: true, hide: true)] + [@Predicated(typeof(ClipLodInput), inverted: true, hide: true)] + [@Predicated(typeof(DepthLodInput), inverted: true, hide: true)] + [@Range(0f, 1f)] + [@GenerateAPI] + [SerializeField] + float _Weight = 1f; + + [Tooltip("The order this input will render.\n\nOrder is Queue plus SiblingIndex")] + [@GenerateAPI(Setter.Custom)] + [@DecoratedField, SerializeField] + int _Queue; + + [Tooltip("How this input blends into existing data.\n\nSimilar to blend operations in shaders. For inputs which have materials, use the blend functionality on the shader/material.")] + [@Predicated(typeof(AbsorptionLodInput), inverted: true, hide: true)] + [@Predicated(typeof(AlbedoLodInput), inverted: true, hide: true)] + [@Predicated(typeof(AnimatedWavesLodInput), inverted: true, hide: true)] + [@Predicated(typeof(ClipLodInput), inverted: true, hide: true)] + [@Predicated(typeof(DepthLodInput), inverted: true, hide: true)] + [@Predicated(typeof(DynamicWavesLodInput), inverted: true, hide: true)] + [@Predicated(typeof(ScatteringLodInput), inverted: true, hide: true)] + [@Predicated(typeof(ShadowLodInput), inverted: true, hide: true)] + [@Predicated(nameof(_Mode), inverted: false, nameof(LodInputMode.Global))] + [@Predicated(nameof(_Mode), inverted: false, nameof(LodInputMode.Primitive))] + [@Predicated(nameof(_Mode), inverted: false, nameof(LodInputMode.Renderer))] + [@Filtered] + [@GenerateAPI] + [SerializeField] + internal LodInputBlend _Blend = LodInputBlend.Additive; + + [@Label("Feather")] + [Tooltip("The width of the feathering to soften the edges to blend inputs.\n\nInputs that do not support feathering will have this field disabled or hidden in UI.")] + [@Predicated(typeof(AlbedoLodInput), inverted: true, hide: true)] + [@Predicated(typeof(AnimatedWavesLodInput), inverted: true, hide: true)] + [@Predicated(typeof(ClipLodInput), inverted: true, hide: true)] + [@Predicated(typeof(DepthLodInput), inverted: true, hide: true)] + [@Predicated(typeof(DynamicWavesLodInput), inverted: true, hide: true)] + [@Predicated(typeof(LevelLodInput), inverted: true, hide: true)] + [@Predicated(nameof(_Mode), inverted: false, nameof(LodInputMode.Renderer))] + [@Predicated(nameof(_Mode), inverted: false, nameof(LodInputMode.Global))] + [@Predicated(nameof(_Mode), inverted: false, nameof(LodInputMode.Primitive))] + [@GenerateAPI] + [@DecoratedField, SerializeField] + float _FeatherWidth = 0.1f; + + [Tooltip("How this input responds to horizontal displacement.\n\nIf false, data will not move horizontally with the waves. Has a small performance overhead when disabled. Only suitable for inputs of small size.")] + [@Predicated(typeof(ClipLodInput), inverted: true, hide: true)] + [@Predicated(typeof(FlowLodInput), inverted: true, hide: true)] + [@Predicated(typeof(LevelLodInput), inverted: true, hide: true)] + [@Predicated(typeof(ShapeWaves), inverted: true, hide: true)] + [@Predicated(nameof(_Mode), inverted: false, nameof(LodInputMode.Global))] + [@Predicated(nameof(_Mode), inverted: false, nameof(LodInputMode.Spline))] + [@GenerateAPI] + [@DecoratedField, SerializeField] + private protected bool _FollowHorizontalWaveMotion = false; + + [@Heading("Mode")] + + [@Predicated(nameof(_Mode), inverted: false, nameof(LodInputMode.Unset), hide: true)] + [@Predicated(nameof(_Mode), inverted: false, nameof(LodInputMode.Primitive), hide: true)] + [@Predicated(nameof(_Mode), inverted: false, nameof(LodInputMode.Global), hide: true)] + [@Stripped] + [SerializeReference] + internal LodInputData _Data; + + // Need always visble for space to appear before foldout instead of inside. + [@Space(10, isAlwaysVisible: true)] + + [@Group("Debug", order = k_DebugGroupOrder)] + + [@Predicated(nameof(_Mode), inverted: false, nameof(LodInputMode.Global))] + [@DecoratedField, SerializeField] + internal bool _DrawBounds; + + internal const int k_DebugGroupOrder = 10; + + internal static class ShaderIDs + { + public static int s_Weight = Shader.PropertyToID("_Crest_Weight"); + public static int s_DisplacementAtInputPosition = Shader.PropertyToID("_Crest_DisplacementAtInputPosition"); + public static readonly int s_BlendSource = Shader.PropertyToID("_Crest_BlendSource"); + public static readonly int s_BlendTarget = Shader.PropertyToID("_Crest_BlendTarget"); + public static readonly int s_BlendOperation = Shader.PropertyToID("_Crest_BlendOperation"); + } + + + internal abstract Color GizmoColor { get; } + internal abstract LodInputMode DefaultMode { get; } + private protected abstract Utility.SortedList Inputs { get; } + + /// + /// Disables rendering of input into data, but continues most scripting activities. + /// + public bool ForceRenderingOff { get; set; } + + /// + /// Properties specific to . + /// + /// + /// + /// You will need to cast to a more specific type to change + /// certain properties. Types derive from and end with . + /// Consider using which will validate and cast. + /// + /// + /// and will + /// have no associated data and will be null. The rest will have an + /// type which will be prefixed with the input type and + /// then mode (eg mode for + /// will be ). + /// + /// + /// An exception is and . They + /// are derived from and use it as a prefix. (eg ). + /// + /// + public LodInputData Data { get => _Data; internal set => _Data = value; } + + /// + /// Retrieves the typed data and validates the passed type. + /// + /// + /// Validation is stripped from builds. + /// + /// The data type to cast to. + /// The casted data. + public T GetData() where T : LodInputData + { + if (_Mode is LodInputMode.Global or LodInputMode.Primitive or LodInputMode.Unset) + { + Debug.AssertFormat(false, "Crest: {0} has no associated data type.", _Mode); + return null; + } + + Debug.AssertFormat(Data is T, "Crest: Incorrect data type ({1}). The data type is {0}.", Data.GetType().BaseType.Name, typeof(T).Name); + + return Data as T; + } + + internal bool IsCompute => Mode is LodInputMode.Texture or LodInputMode.Paint or LodInputMode.Global or LodInputMode.Primitive; + internal virtual int Pass => -1; + internal virtual Rect Rect + { + get + { + var rect = Rect.zero; + if (_Data != null) + { + rect = _Data.Rect; + rect.center -= _Displacement.XZ(); + } + return rect; + } + } + + readonly SampleCollisionHelper _SampleHeightHelper = new(); + Vector3 _Displacement; + private protected bool _RecalculateBounds = true; + + internal virtual bool Enabled => enabled && !ForceRenderingOff && Mode switch + { + LodInputMode.Unset => false, + _ => Data?.IsEnabled ?? false, + }; + + // By default do not follow horizontal motion of waves. This means that the water input will appear on the surface at its XZ location, instead + // of moving horizontally with the waves. + private protected virtual bool FollowHorizontalMotion => Mode is LodInputMode.Global or LodInputMode.Spline || _FollowHorizontalWaveMotion; + + + // + // Event Methods + // + + private protected override void Initialize() + { + base.Initialize(); + Data?.OnEnable(); + Attach(); + } + + private protected override void OnDisable() + { + base.OnDisable(); + Detach(); + Data?.OnDisable(); + } + + private protected override Action OnUpdateMethod => OnUpdate; + private protected virtual void OnUpdate(WaterRenderer water) + { + if (transform.hasChanged) + { + _RecalculateBounds = true; + } + + // Input culling depends on displacement. + if (!FollowHorizontalMotion) + { + _SampleHeightHelper.SampleDisplacement(transform.position, out _Displacement); + } + else + { + _Displacement = Vector3.zero; + } + + Data?.OnUpdate(); + } + + private protected override Action OnLateUpdateMethod => OnLateUpdate; + private protected virtual void OnLateUpdate(WaterRenderer water) + { + Data?.OnLateUpdate(); + + transform.hasChanged = false; + } + + + // + // ILodInput + // + + private protected virtual void Attach() + { + _Input ??= new(this); + ILodInput.Attach(_Input, Inputs); + } + + private protected virtual void Detach() + { + ILodInput.Detach(_Input, Inputs); + } + + internal virtual void Draw(Lod simulation, CommandBuffer buffer, RenderTargetIdentifier target, int pass = -1, float weight = 1f, int slice = -1) + { + if (weight == 0f) + { + return; + } + + // Must use global as weight can change per slice for ShapeWaves. + var wrapper = new PropertyWrapperBuffer(buffer); + wrapper.SetFloat(ShaderIDs.s_Weight, weight * _Weight); + wrapper.SetVector(ShaderIDs.s_DisplacementAtInputPosition, _Displacement); + + Data?.Draw(simulation, this, buffer, target, slice); + } + + internal virtual float Filter(WaterRenderer water, int slice) + { + return 1f; + } + + /// + /// Sets the Blend render state using Blend present. + /// + internal static void SetBlendFromPreset(Material material, LodInputBlend preset) + { + // Blend.Additive + var source = BlendMode.One; + var target = BlendMode.One; + var operation = BlendOp.Add; + + switch (preset) + { + case LodInputBlend.Off: + source = BlendMode.One; + target = BlendMode.Zero; + break; + case LodInputBlend.Alpha or LodInputBlend.AlphaClip: + source = BlendMode.One; // We apply alpha before blending. + target = BlendMode.OneMinusSrcAlpha; + break; + case LodInputBlend.Maximum: + operation = BlendOp.Max; + break; + case LodInputBlend.Minimum: + operation = BlendOp.Min; + break; + } + + // SetInteger did not appear to work last time. Will need to revisit. + material.SetInt(ShaderIDs.s_BlendSource, (int)source); + material.SetInt(ShaderIDs.s_BlendTarget, (int)target); + material.SetInt(ShaderIDs.s_BlendOperation, (int)operation); + } + + void SetQueue(int previous, int current) + { + if (previous == current) return; + if (!isActiveAndEnabled) return; + Attach(); + } + + internal virtual void InferBlend() + { + // Correct for most cases. + _Blend = LodInputBlend.Additive; + } + + // + // Editor Only Methods + // + +#if UNITY_EDITOR + [@OnChange(skipIfInactive: false)] + void OnChange(string propertyPath, object previousValue) + { + switch (propertyPath) + { + case nameof(_Queue): + SetQueue((int)previousValue, _Queue); + break; + case nameof(_Mode): + if (!isActiveAndEnabled) { ChangeMode(Mode); break; } + OnDisable(); + ChangeMode(Mode); + UnityEditor.EditorTools.ToolManager.RefreshAvailableTools(); + OnEnable(); + break; + case nameof(_Blend): + // TODO: Make compatible with disabled. + if (isActiveAndEnabled) Data.OnChange($"../{propertyPath}", previousValue); + break; + } + } + + internal void ChangeMode(LodInputMode mode) + { + _Data = null; + + // Try to infer the mode. + var types = TypeCache.GetTypesWithAttribute(); + var self = GetType(); + foreach (var type in types) + { + var attributes = type.GetCustomAttributes(); + foreach (var attribute in attributes) + { + if (attribute._Mode != mode) continue; + if (!attribute._Type.IsAssignableFrom(self)) continue; + _Mode = mode; + InferBlend(); + _Data = (LodInputData)Activator.CreateInstance(type); + _Data._Input = this; + _Data.InferMode(this, ref _Mode); + return; + } + } + + _Mode = DefaultMode; + InferBlend(); + } + + /// + /// Called when component attached in edit mode, or when Reset clicked by user. + /// Besides recovering from Unset default value, also does a nice bit of auto-config. + /// + private protected override void Reset() + { + var types = TypeCache.GetTypesWithAttribute(); + var self = GetType(); + + // Use inferred mode. + foreach (var type in types) + { + var attributes = type.GetCustomAttributes(); + foreach (var attribute in attributes) + { + if (!attribute._Type.IsAssignableFrom(self)) continue; + + var instance = (LodInputData)Activator.CreateInstance(type); + instance._Input = this; + + if (instance.InferMode(this, ref _Mode)) + { + _Data = instance; + InferBlend(); + return; + } + } + } + + // Use default mode. + ChangeMode(DefaultMode); + + _Data?.Reset(); + + base.Reset(); + } +#endif + } + + partial class LodInput + { + Input _Input; + + sealed class Input : ILodInput + { + readonly LodInput _Input; + public Input(LodInput input) => _Input = input; + public bool Enabled => _Input.Enabled; + public bool IsCompute => _Input.IsCompute; + public int Queue => _Input.Queue; + public int Pass => _Input.Pass; + public Rect Rect => _Input.Rect; + public MonoBehaviour Component => _Input; + public float Filter(WaterRenderer water, int slice) => _Input.Filter(water, slice); + public void Draw(Lod lod, CommandBuffer buffer, RenderTargetIdentifier target, int pass = -1, float weight = 1, int slice = -1) => _Input.Draw(lod, buffer, target, pass, weight, slice); + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/LodInput.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/LodInput.cs.meta new file mode 100644 index 000000000..29b6392d8 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/LodInput.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 126e7f9b525874cdbb0653a0f1662e18 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/LodInputData.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/LodInputData.cs new file mode 100644 index 000000000..d7395d4fc --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/LodInputData.cs @@ -0,0 +1,212 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using System; +using UnityEngine; +using UnityEngine.Rendering; + +namespace WaveHarmonic.Crest +{ + [AttributeUsage(AttributeTargets.Class)] + sealed class ForLodInput : Attribute + { + public readonly Type _Type; + public readonly LodInputMode _Mode; + + public ForLodInput(Type type, LodInputMode mode) + { + _Type = type; + _Mode = mode; + } + } + + /// + /// Data storage for an input, pertinent to the associated input mode. + /// + public abstract class LodInputData + { + [SerializeField, HideInInspector] + internal LodInput _Input; + + private protected Rect _Rect; + private protected Bounds _Bounds; + private protected bool _RecalculateRect = true; + private protected bool _RecalculateBounds = true; + + internal abstract bool IsEnabled { get; } + internal abstract void OnEnable(); + internal abstract void OnDisable(); + internal abstract void Draw(Lod lod, Component component, CommandBuffer buffer, RenderTargetIdentifier target, int slice); + internal abstract void RecalculateRect(); + internal abstract void RecalculateBounds(); + + internal virtual bool HasHeightRange => true; + + internal Rect Rect + { + get + { + if (_RecalculateRect) + { + RecalculateRect(); + _RecalculateRect = false; + } + + return _Rect; + } + } + + internal Bounds Bounds + { + get + { + if (_RecalculateBounds) + { + RecalculateBounds(); + _RecalculateBounds = false; + } + + return _Bounds; + } + } + + // Warning: NotImplementedException is thrown for paint and texture types. + internal Vector2 HeightRange + { + get + { + if (!HasHeightRange) return Vector2.zero; + var bounds = Bounds; + return new(bounds.min.y, bounds.max.y); + } + } + + private protected void RecalculateCulling() + { + _RecalculateRect = _RecalculateBounds = true; + } + + internal virtual void OnUpdate() + { + if (_Input.transform.hasChanged) + { + RecalculateCulling(); + } + } + + internal virtual void OnLateUpdate() + { + + } + +#if UNITY_EDITOR + internal abstract void OnChange(string propertyPath, object previousValue); + internal abstract bool InferMode(Component component, ref LodInputMode mode); + internal virtual void Reset() { } +#endif + } + + /// + /// Modes that inputs can use. Not all inputs support all modes. Refer to the UI. + /// + public enum LodInputMode + { + /// + /// Unset is the serialization default. + /// + /// + /// This will be replaced with the default mode automatically. Unset can also be + /// used if something is invalid. + /// + Unset = 0, + /// + /// Hand-painted data by the user. Currently unused. + /// + Paint, + /// + /// Driven by a user created spline. + /// + Spline, + /// + /// Attached 'Renderer' (mesh, particle or other) used to drive data. + /// + Renderer, + /// + /// Driven by a mathematical primitive such as a cube or sphere. + /// + Primitive, + /// + /// Covers the entire water area. + /// + Global, + /// + /// Data driven by a user provided texture. + /// + Texture, + /// + /// Renders geometry using a default material. + /// + Geometry, + } + + /// + /// Blend presets for inputs. + /// + public enum LodInputBlend + { + /// + /// No blending. Overwrites. + /// + Off, + + /// + /// Additive blending. + /// + Additive, + + /// + /// Takes the minimum value. + /// + Minimum, + + /// + /// Takes the maximum value. + /// + Maximum, + + /// + /// Applies the inverse weight to the target. + /// + /// + /// Basically overwrites what is already in the simulation. + /// + Alpha, + + /// + /// Same as alpha except anything above zero will overwrite rather than blend. + /// + AlphaClip, + } + + /// + /// Primitive shapes. + /// + // Have this match UnityEngine.PrimitiveType. + public enum LodInputPrimitive + { + /// + /// Spheroid. + /// + Sphere = 0, + + /// + /// Cuboid. + /// + Cube = 3, + + /// + /// Quad. + /// + Quad = 5, + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/LodInputData.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/LodInputData.cs.meta new file mode 100644 index 000000000..47a754911 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/LodInputData.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6a95cc8f7e50c47d8bfdda73f6da338a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/RendererLodInputData.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/RendererLodInputData.cs new file mode 100644 index 000000000..921ee1cfd --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/RendererLodInputData.cs @@ -0,0 +1,272 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Rendering; +using UnityEngine.SceneManagement; + +namespace WaveHarmonic.Crest +{ + /// + /// Data storage for for the Renderer input mode. + /// + public abstract partial class RendererLodInputData : LodInputData + { + [Tooltip("The renderer to use for this input.\n\nCan be anything that inherits from Renderer like MeshRenderer, TrailRenderer etc.")] + [@GenerateAPI(Setter.Custom)] + [@DecoratedField, SerializeField] + internal Renderer _Renderer; + + [Tooltip("Forces the renderer to only render into the LOD data, and not to render in the scene as it normally would.")] + [@GenerateAPI(Setter.Custom)] + [@DecoratedField, SerializeField] + internal bool _DisableRenderer = true; + + [Tooltip("Whether to set the shader pass manually.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + internal bool _OverrideShaderPass; + + [Tooltip("The shader pass to execute.\n\nSet to -1 to execute all passes.")] + [@Predicated(nameof(_OverrideShaderPass))] + [@GenerateAPI] + [@DecoratedField, SerializeField] + internal int _ShaderPassIndex; + +#pragma warning disable 414 + [Tooltip("Check that the shader applied to this object matches the input type.\n\nFor example, an Animated Waves input object has an Animated Waves input shader.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + internal bool _CheckShaderName = true; + + [Tooltip("Check that the shader applied to this object has only a single pass, as only the first pass is executed for most inputs.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + internal bool _CheckShaderPasses = true; +#pragma warning restore 414 + + + static class ShaderIDs + { + public static readonly int s_Time = Shader.PropertyToID("_Time"); + } + + + // Some renderers require multiple materials like particles with trails. + // We pass this to GetSharedMaterials to avoid allocations. + internal List _Materials = new(); + MaterialPropertyBlock _MaterialPropertyBlock; + + internal abstract string ShaderPrefix { get; } + + internal override bool IsEnabled => _Renderer != null && _MaterialPropertyBlock != null; + + internal override void RecalculateRect() + { + _Rect = Rect.MinMaxRect(_Renderer.bounds.min.x, _Renderer.bounds.min.z, _Renderer.bounds.max.x, _Renderer.bounds.max.z); + } + + internal override void RecalculateBounds() + { + _Bounds = _Renderer.bounds; + } + + bool AnyOtherInputsControllingRenderer(Renderer renderer) + { + for (var index = 0; index < SceneManager.sceneCount; index++) + { + var scene = SceneManager.GetSceneAt(index); + + if (!scene.isLoaded) + { + continue; + } + + foreach (var rootGameObject in scene.GetRootGameObjects()) + { + foreach (var component in rootGameObject.GetComponentsInChildren()) + { + if (component == _Input) + { + continue; + } + + if (component.Data is not RendererLodInputData data) + { + continue; + } + + if (component.isActiveAndEnabled && data._DisableRenderer && data._Renderer == renderer) + { + return true; + } + } + } + } + + return false; + } + + internal override void OnEnable() + { + _MaterialPropertyBlock ??= new(); + + if (_Renderer == null) + { + return; + } + + _Renderer.GetSharedMaterials(_Materials); + + if (_DisableRenderer) + { + // If we disable using "enabled" then the renderer might not behave correctly (eg line/trail positions + // will not be updated). This keeps the scripting side of the component running and just disables the + // rendering. Similar to disabling the Renderer module on the Particle System. It also is not serialized. + _Renderer.forceRenderingOff = true; + } + } + + internal override void OnDisable() + { + if (_Renderer != null && _DisableRenderer && !AnyOtherInputsControllingRenderer(_Renderer)) + { + _Renderer.forceRenderingOff = false; + } + } + + internal override void OnUpdate() + { + if (_Renderer == null) + { + return; + } + + // We have to check this every time as the user could change the materials and it is too difficult to track. + // Doing this in LateUpdate could add one frame latency to receiving the change. + _Renderer.GetSharedMaterials(_Materials); + + // Always recalculate, as there are too much to track. + _RecalculateBounds = true; + _RecalculateRect = _Bounds != _Renderer.bounds; + } + + internal override void Draw(Lod lod, Component component, CommandBuffer buffer, RenderTargetIdentifier target, int slice) + { + // NOTE: Inputs will only change the first material (only ShapeWaves at the moment). + + for (var i = 0; i < _Materials.Count; i++) + { + var material = _Materials[i]; + Debug.AssertFormat(material != null, _Renderer, "Crest: Attached renderer has an empty material slot which is not allowed."); + +#if UNITY_EDITOR + // Empty material slots is a user error, but skip so we do not spam errors. + if (material == null) + { + continue; + } +#endif + + var pass = _ShaderPassIndex; + if (ShapeWaves.s_RenderPassOverride > -1) + { + // Needs to use a second pass to disable blending. + pass = ShapeWaves.s_RenderPassOverride; + } + else if (!_OverrideShaderPass) + { + // BIRP/URP SG first pass is the right one. + pass = 0; + + // Support HDRP SG. It will always have more than one pass. + if (RenderPipelineHelper.IsHighDefinition && material.shader.passCount > 1) + { + var sgPass = material.FindPass("ForwardOnly"); + if (sgPass > -1) pass = sgPass; + } + } + else if (_ShaderPassIndex > material.shader.passCount - 1) + { + return; + } + + // Time is not set for us for some reason… Use Time.timeSinceLevelLoad as per: + // https://docs.unity3d.com/Manual/SL-UnityShaderVariables.html + if (RenderPipelineHelper.IsLegacy) + { + _Renderer.GetPropertyBlock(_MaterialPropertyBlock); + _MaterialPropertyBlock.SetVector(ShaderIDs.s_Time, new + ( + Time.timeSinceLevelLoad / 20, + Time.timeSinceLevelLoad, + Time.timeSinceLevelLoad * 2f, + Time.timeSinceLevelLoad * 3f + )); + _Renderer.SetPropertyBlock(_MaterialPropertyBlock); + } + + // By default, shaderPass is -1 which is all passes. Shader Graph will produce multi-pass shaders + // for depth etc so we should only render one pass. Unlit SG will have the unlit pass first. + // Submesh count generally must equal number of materials. + buffer.DrawRenderer(_Renderer, material, submeshIndex: i, pass); + } + } + + void SetRenderer(Renderer previous, Renderer current) + { + if (previous == current) return; + if (_Input == null || !_Input.isActiveAndEnabled) return; + + if (previous != null && _DisableRenderer && !AnyOtherInputsControllingRenderer(previous)) + { + // Turn off if there are no other inputs have set this value. + previous.forceRenderingOff = false; + } + + if (current != null) + { + current.forceRenderingOff = true; + } + } + + void SetDisableRenderer(bool previous, bool current) + { + if (previous == current) return; + if (_Input == null || !_Input.isActiveAndEnabled) return; + + if (_Renderer != null && !AnyOtherInputsControllingRenderer(_Renderer)) + { + _Renderer.forceRenderingOff = _DisableRenderer; + } + } + +#if UNITY_EDITOR + [@OnChange] + internal override void OnChange(string propertyPath, object previousValue) + { + switch (propertyPath) + { + case nameof(_Renderer): + SetRenderer((Renderer)previousValue, _Renderer); + break; + case nameof(_DisableRenderer): + SetDisableRenderer((bool)previousValue, _DisableRenderer); + break; + } + } + + internal override bool InferMode(Component component, ref LodInputMode mode) + { + if (component.TryGetComponent(out _Renderer)) + { + mode = LodInputMode.Renderer; + return true; + } + + return false; + } +#endif + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/RendererLodInputData.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/RendererLodInputData.cs.meta new file mode 100644 index 000000000..06cfaa22f --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/RendererLodInputData.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c0ee0dbacf6784d1a8608ad94109098d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/ScatteringLodInput.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/ScatteringLodInput.cs new file mode 100644 index 000000000..9c2718f7f --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/ScatteringLodInput.cs @@ -0,0 +1,37 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; + +namespace WaveHarmonic.Crest +{ + /// + /// Registers a custom input to the . + /// + /// + /// Attach this to objects that you want to influence the scattering color. + /// + [@HelpURL("Manual/WaterAppearance.html#volume-color-inputs")] + public sealed partial class ScatteringLodInput : LodInput + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + +#if d_CrestPaint + internal override LodInputMode DefaultMode => LodInputMode.Paint; +#else + internal override LodInputMode DefaultMode => LodInputMode.Renderer; +#endif + + internal override void InferBlend() + { + base.InferBlend(); + _Blend = LodInputBlend.Alpha; + } + + // Looks fine moving around. + private protected override bool FollowHorizontalMotion => true; + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/ScatteringLodInput.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/ScatteringLodInput.cs.meta new file mode 100644 index 000000000..772f21624 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/ScatteringLodInput.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c85179d3b43c5467da99463c8a2199ab +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/ShadowLodInput.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/ShadowLodInput.cs new file mode 100644 index 000000000..55e5026d9 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/ShadowLodInput.cs @@ -0,0 +1,24 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; + +namespace WaveHarmonic.Crest +{ + /// + /// Registers a custom input to the . + /// + /// + /// Attach this objects that you want use to override shadows. + /// + [@HelpURL("Manual/WaterAppearance.html#shadows-lod")] + public sealed partial class ShadowLodInput : LodInput + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + + internal override LodInputMode DefaultMode => LodInputMode.Renderer; + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/ShadowLodInput.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/ShadowLodInput.cs.meta new file mode 100644 index 000000000..867612303 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/ShadowLodInput.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fcda6c7640ad44106aa39234017df797 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/Shape.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/Shape.meta new file mode 100644 index 000000000..ec3c16825 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/Shape.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d7eafa182f969495d9e74b145310c516 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/Shape/ShapeFFT.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/Shape/ShapeFFT.cs new file mode 100644 index 000000000..b3cf7abb0 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/Shape/ShapeFFT.cs @@ -0,0 +1,212 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using UnityEngine.Rendering; + +namespace WaveHarmonic.Crest +{ + /// + /// FFT wave shape. + /// + [AddComponentMenu(Constants.k_MenuPrefixInputs + "Shape FFT")] + public sealed partial class ShapeFFT : ShapeWaves + { + // Waves + + [Tooltip("How turbulent/chaotic the waves are.")] + [@Range(0, 1, order = -3)] + [@GenerateAPI] + [SerializeField] + float _WindTurbulence = 0.145f; + + [Tooltip("How aligned the waves are with wind.")] + [@Range(0, 1, order = -4)] + [@GenerateAPI] + [SerializeField] + float _WindAlignment; + + + // Generation + + [Tooltip("FFT waves will loop with a period of this many seconds.")] + [@Range(4f, 128f, Range.Clamp.Minimum)] + [@GenerateAPI] + [SerializeField] + float _TimeLoopLength = Mathf.Infinity; + + + [Header("Culling")] + + [Tooltip("Maximum amount the surface will be displaced vertically from sea level.\n\nIncrease this if gaps appear at bottom of screen.")] + [@GenerateAPI] + [SerializeField] + float _MaximumVerticalDisplacement = 10f; + + [Tooltip("Maximum amount a point on the surface will be displaced horizontally by waves from its rest position.\n\nIncrease this if gaps appear at sides of screen.")] + [@GenerateAPI] + [SerializeField] + float _MaximumHorizontalDisplacement = 15f; + + + [@Heading("Collision Data Baking")] + + [Tooltip("Enable running this FFT with baked data.\n\nThis makes the FFT periodic (repeating in time).")] + [@Predicated(nameof(_Mode), inverted: true, nameof(LodInputMode.Global), hide: true)] + [@DecoratedField, SerializeField] + internal bool _EnableBakedCollision = false; + + [Tooltip("Frames per second of baked data.\n\nLarger values may help the collision track the surface closely at the cost of more frames and increase baked data size.")] + [@Predicated(nameof(_EnableBakedCollision))] + [@Predicated(nameof(_Mode), inverted: true, nameof(LodInputMode.Global), hide: true)] + [@DecoratedField, SerializeField] + internal int _TimeResolution = 4; + + [Tooltip("Smallest wavelength required in collision.\n\nTo preview the effect of this, disable power sliders in spectrum for smaller values than this number. Smaller values require more resolution and increase baked data size.")] + [@Predicated(nameof(_EnableBakedCollision))] + [@Predicated(nameof(_Mode), inverted: true, nameof(LodInputMode.Global), hide: true)] + [@DecoratedField, SerializeField] + internal float _SmallestWavelengthRequired = 2f; + + [Tooltip("FFT waves will loop with a period of this many seconds.\n\nSmaller values decrease data size but can make waves visibly repetitive.")] + [@Predicated(nameof(_EnableBakedCollision))] + [@Predicated(nameof(_Mode), inverted: true, nameof(LodInputMode.Global), hide: true)] + [@Range(4f, 128f)] + [SerializeField] + internal float _BakedTimeLoopLength = 32f; + + internal float LoopPeriod => _EnableBakedCollision ? _BakedTimeLoopLength : _TimeLoopLength; + + private protected override int MinimumResolution => 16; + private protected override int MaximumResolution => int.MaxValue; + + FFTCompute.Parameters _OldFFTParameters; + internal FFTCompute.Parameters FFTParameters => new + ( + _ActiveSpectrum, + Resolution, + _TimeLoopLength, + WindSpeedMPS, + WindDirRadForFFT, + _WindTurbulence, + _WindAlignment + ); + + private protected override void OnUpdate(WaterRenderer water) + { + base.OnUpdate(water); + + // We do not filter FFTs. + _FirstCascade = 0; + _LastCascade = k_CascadeCount - 1; + + ReportMaxDisplacement(water); + + // If geometry is being used, the water input shader will rotate the waves to align to geo + var parameters = FFTParameters; + + // Don't create tons of generators when values are varying. Notify so that existing generators may be adapted. + if (parameters.GetHashCode() != _OldFFTParameters.GetHashCode()) + { + FFTCompute.OnGenerationDataUpdated(_OldFFTParameters, parameters); + } + + _OldFFTParameters = parameters; + } + + internal override void Draw(Lod lod, CommandBuffer buffer, RenderTargetIdentifier target, int pass = -1, float weight = 1, int slice = -1) + { + if (_LastGenerateFrameCount != Time.frameCount) + { + _WaveBuffers = FFTCompute.GenerateDisplacements + ( + buffer, + lod.Water.CurrentTime, + FFTParameters, + UpdateDataEachFrame + ); + + _LastGenerateFrameCount = Time.frameCount; + } + + base.Draw(lod, buffer, target, pass, weight, slice); + } + + private protected override void SetRenderParameters(WaterRenderer water, T wrapper) + { + base.SetRenderParameters(water, wrapper); + + // If using geometry, the primary wave direction is used by the input shader to + // rotate the waves relative to the geo rotation. If not, the wind direction is + // already used in the FFT generation. + var waveDir = (Mode is LodInputMode.Spline or LodInputMode.Paint) ? PrimaryWaveDirection : Vector2.right; + wrapper.SetVector(ShaderIDs.s_AxisX, waveDir); + } + + private protected override void ReportMaxDisplacement(WaterRenderer water) + { + if (!Enabled) return; + + // Apply weight or will cause popping due to scale change. + MaximumReportedHorizontalDisplacement = _MaximumHorizontalDisplacement * Weight; + MaximumReportedVerticalDisplacement = MaximumReportedWavesDisplacement = _MaximumVerticalDisplacement * Weight; + + if (Mode == LodInputMode.Global) + { + water.ReportMaximumDisplacement(MaximumReportedHorizontalDisplacement, MaximumReportedVerticalDisplacement, MaximumReportedVerticalDisplacement); + } + } + + private protected override void DestroySharedResources() + { + FFTCompute.CleanUpAll(); + } + + float WindDirRadForFFT + { + get + { + // These input types use a wave direction provided by geometry or the painted user direction + if (Mode is LodInputMode.Spline or LodInputMode.Paint) + { + return 0f; + } + + return _WaveDirectionHeadingAngle * Mathf.Deg2Rad; + } + } + +#if UNITY_EDITOR + void OnGUI() + { + if (_DrawSlicesInEditor) + { + FFTCompute.GetInstance(FFTParameters)?.OnGUI(); + } + } + + internal FFTCompute GetFFTComputeInstance() + { + return FFTCompute.GetInstance(FFTParameters); + } +#endif + } + + partial class ShapeFFT : ISerializationCallbackReceiver + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 1; +#pragma warning restore 414 + + void ISerializationCallbackReceiver.OnAfterDeserialize() + { + _Version = MigrateV1(_Version); + } + + void ISerializationCallbackReceiver.OnBeforeSerialize() + { + // Empty. + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/Shape/ShapeFFT.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/Shape/ShapeFFT.cs.meta new file mode 100644 index 000000000..edb82fe39 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/Shape/ShapeFFT.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 88bb6e05d83b64105a4d8cbd478f5916 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/Shape/ShapeGerstner.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/Shape/ShapeGerstner.cs new file mode 100644 index 000000000..10e0783a1 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/Shape/ShapeGerstner.cs @@ -0,0 +1,523 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using Unity.Collections.LowLevel.Unsafe; +using UnityEngine; +using UnityEngine.Experimental.Rendering; +using UnityEngine.Rendering; +using WaveHarmonic.Crest.Utility; + +namespace WaveHarmonic.Crest +{ + /// + /// Gerstner wave shape. + /// + [AddComponentMenu(Constants.k_MenuPrefixInputs + "Shape Gerstner")] + public sealed partial class ShapeGerstner : ShapeWaves + { + // Waves + + [Tooltip("The weight of the opposing, second pair of Gerstner waves.\n\nEach Gerstner wave is actually a pair of waves travelling in opposite directions (similar to FFT). This weight is applied to the wave travelling in against-wind direction. Set to zero to obtain simple single waves which are useful for shorelines waves.")] + [@Range(0f, 1f, order = -3)] + [@GenerateAPI] + [SerializeField] + float _ReverseWaveWeight = 0.5f; + + + // Generation Settings + + [Tooltip("How many wave components to generate in each octave.")] + [@Delayed] + [@GenerateAPI] + [SerializeField] + int _ComponentsPerOctave = 8; + + [Tooltip("Change to get a different set of waves.")] + [@GenerateAPI] + [SerializeField] + int _RandomSeed = 0; + + private protected override int MinimumResolution => 8; + private protected override int MaximumResolution => 64; + + float _WindSpeedWhenGenerated = -1f; + + const int k_MaximumWaveComponents = 1024; + + // Data for all components + float[] _Wavelengths; + float[] _Amplitudes; + float[] _Amplitudes2; + float[] _Powers; + float[] _AngleDegrees; + float[] _Phases; + float[] _Phases2; + + struct GerstnerCascadeParams + { + public int _StartIndex; + } + ComputeBuffer _BufferCascadeParameters; + readonly GerstnerCascadeParams[] _CascadeParameters = new GerstnerCascadeParams[k_CascadeCount + 1]; + + // Caution - order here impact performance. Rearranging these to match order + // they're read in the compute shader made it 50% slower.. + struct GerstnerWaveComponent4 + { + public Vector4 _TwoPiOverWavelength; + public Vector4 _Amplitude; + public Vector4 _WaveDirectionX; + public Vector4 _WaveDirectionZ; + public Vector4 _Omega; + public Vector4 _Phase; + public Vector4 _ChopAmplitude; + // Waves are generated in pairs, these values are for the second in the pair + public Vector4 _Amplitude2; + public Vector4 _ChopAmplitude2; + public Vector4 _Phase2; + } + ComputeBuffer _BufferWaveData; + readonly GerstnerWaveComponent4[] _WaveData = new GerstnerWaveComponent4[k_MaximumWaveComponents / 4]; + + ComputeShader _ShaderGerstner; + int _KernelGerstner = -1; + + + static new class ShaderIDs + { + public static readonly int s_FirstCascadeIndex = Shader.PropertyToID("_Crest_FirstCascadeIndex"); + public static readonly int s_TextureRes = Shader.PropertyToID("_Crest_TextureRes"); + public static readonly int s_CascadeParams = Shader.PropertyToID("_Crest_GerstnerCascadeParams"); + public static readonly int s_GerstnerWaveData = Shader.PropertyToID("_Crest_GerstnerWaveData"); + } + + + readonly float _TwoPi = 2f * Mathf.PI; + readonly float _ReciprocalTwoPi = 1f / (2f * Mathf.PI); + + internal static readonly SortedList s_Instances = new(Helpers.SiblingIndexComparison); + + [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)] + static void InitStatics() + { + s_Instances.Clear(); + } + + void InitData() + { + if (_WaveBuffers == null) + { + _WaveBuffers = new(_Resolution, _Resolution, 0, GraphicsFormat.R16G16B16A16_SFloat); + } + else + { + _WaveBuffers.Release(); + } + + { + _WaveBuffers.width = _WaveBuffers.height = _Resolution; + _WaveBuffers.wrapMode = TextureWrapMode.Clamp; + _WaveBuffers.antiAliasing = 1; + _WaveBuffers.filterMode = FilterMode.Bilinear; + _WaveBuffers.anisoLevel = 0; + _WaveBuffers.useMipMap = false; + _WaveBuffers.name = "_Crest_GerstnerCascades"; + _WaveBuffers.dimension = TextureDimension.Tex2DArray; + _WaveBuffers.volumeDepth = k_CascadeCount; + _WaveBuffers.enableRandomWrite = true; + _WaveBuffers.Create(); + } + + _BufferCascadeParameters?.Release(); + _BufferWaveData?.Release(); + + _BufferCascadeParameters = new(k_CascadeCount + 1, UnsafeUtility.SizeOf()); + _BufferWaveData = new(k_MaximumWaveComponents / 4, UnsafeUtility.SizeOf()); + + _ShaderGerstner = WaterResources.Instance.Compute._Gerstner; + _KernelGerstner = _ShaderGerstner.FindKernel("Gerstner"); + } + + private protected override void OnUpdate(WaterRenderer water) + { + var isFirstUpdate = _FirstUpdate; + + base.OnUpdate(water); + + if (_WaveBuffers == null || _Resolution != _WaveBuffers.width || _BufferCascadeParameters == null || _BufferWaveData == null) + { + InitData(); + } + + var windSpeed = WindSpeedMPS; + if (isFirstUpdate || UpdateDataEachFrame || windSpeed != _WindSpeedWhenGenerated) + { + UpdateWaveData(water, windSpeed); + _WindSpeedWhenGenerated = windSpeed; + } + + ReportMaxDisplacement(water); + } + + internal override void Draw(Lod lod, CommandBuffer buffer, RenderTargetIdentifier target, int pass = -1, float weight = 1, int slice = -1) + { + if (_LastGenerateFrameCount != Time.frameCount) + { + if (_FirstCascade >= 0 && _LastCascade >= 0) + { + UpdateGenerateWaves(buffer); + // Above changes the render target. Change it back if necessary. + if (!IsCompute) buffer.SetRenderTarget(target, 0, CubemapFace.Unknown, slice); + } + + _LastGenerateFrameCount = Time.frameCount; + } + + base.Draw(lod, buffer, target, pass, weight, slice); + } + + private protected override void SetRenderParameters(WaterRenderer water, T wrapper) + { + base.SetRenderParameters(water, wrapper); + wrapper.SetVector(ShapeWaves.ShaderIDs.s_AxisX, PrimaryWaveDirection); + } + + void SliceUpWaves(WaterRenderer water, float windSpeed) + { + // Do not filter cascades if blending as the blend operation might be skipped. + // Same for renderer as we do not know the blend operation. + var isFilterable = Blend != LodInputBlend.Alpha && _Mode != LodInputMode.Renderer; + + _FirstCascade = isFilterable ? -1 : 0; + _LastCascade = -2; + + var cascadeIdx = 0; + var componentIdx = 0; + var outputIdx = 0; + _CascadeParameters[0]._StartIndex = 0; + + // Seek forward to first wavelength that is big enough to render into current cascades + var minWl = MinWavelength(cascadeIdx); + while (componentIdx < _Wavelengths.Length && _Wavelengths[componentIdx] < minWl) + { + componentIdx++; + } + //Debug.Log($"Crest: {cascadeIdx}: start {_cascadeParams[cascadeIdx]._startIndex} minWL {minWl}"); + + for (; componentIdx < _Wavelengths.Length; componentIdx++) + { + // Skip small amplitude waves + while (componentIdx < _Wavelengths.Length && _Amplitudes[componentIdx] < 0.001f) + { + componentIdx++; + } + if (componentIdx >= _Wavelengths.Length) break; + + // Check if we need to move to the next cascade + while (cascadeIdx < k_CascadeCount && _Wavelengths[componentIdx] >= 2f * minWl) + { + // Wrap up this cascade and begin next + + // Fill remaining elements of current vector4 with 0s + var vi = outputIdx / 4; + var ei = outputIdx - vi * 4; + + while (ei != 0) + { + _WaveData[vi]._TwoPiOverWavelength[ei] = 1f; + _WaveData[vi]._Amplitude[ei] = 0f; + _WaveData[vi]._WaveDirectionX[ei] = 0f; + _WaveData[vi]._WaveDirectionZ[ei] = 0f; + _WaveData[vi]._Omega[ei] = 0f; + _WaveData[vi]._Phase[ei] = 0f; + _WaveData[vi]._Phase2[ei] = 0f; + _WaveData[vi]._ChopAmplitude[ei] = 0f; + _WaveData[vi]._Amplitude2[ei] = 0f; + _WaveData[vi]._ChopAmplitude2[ei] = 0f; + ei = (ei + 1) % 4; + outputIdx++; + } + + if (outputIdx > 0 && _FirstCascade < 0) _FirstCascade = cascadeIdx; + + cascadeIdx++; + _CascadeParameters[cascadeIdx]._StartIndex = outputIdx / 4; + minWl *= 2f; + + //Debug.Log($"Crest: {cascadeIdx}: start {_cascadeParams[cascadeIdx]._startIndex} minWL {minWl}"); + } + if (cascadeIdx == k_CascadeCount) break; + + { + // Pack into vector elements + var vi = outputIdx / 4; + var ei = outputIdx - vi * 4; + + _WaveData[vi]._Amplitude[ei] = _Amplitudes[componentIdx]; + _WaveData[vi]._Amplitude2[ei] = _Amplitudes2[componentIdx]; + + var chopScale = _ActiveSpectrum._ChopScales[componentIdx / _ComponentsPerOctave]; + _WaveData[vi]._ChopAmplitude[ei] = -chopScale * _ActiveSpectrum._Chop * _Amplitudes[componentIdx]; + _WaveData[vi]._ChopAmplitude2[ei] = -chopScale * _ActiveSpectrum._Chop * _Amplitudes2[componentIdx]; + + var angle = Mathf.Deg2Rad * _AngleDegrees[componentIdx]; + var dx = Mathf.Cos(angle); + var dz = Mathf.Sin(angle); + + var gravityScale = _ActiveSpectrum._GravityScales[componentIdx / _ComponentsPerOctave]; + var gravity = water.Gravity * _ActiveSpectrum._GravityScale; + var c = Mathf.Sqrt(_Wavelengths[componentIdx] * gravity * gravityScale * _ReciprocalTwoPi); + var k = _TwoPi / _Wavelengths[componentIdx]; + + // Constrain wave vector (wavelength and wave direction) to ensure wave tiles across domain + { + var kx = k * dx; + var kz = k * dz; + var diameter = 0.5f * (1 << cascadeIdx); + + // Number of times wave repeats across domain in x and z + var n = kx / (_TwoPi / diameter); + var m = kz / (_TwoPi / diameter); + // Ensure the wave repeats an integral number of times across domain + kx = _TwoPi * Mathf.Round(n) / diameter; + kz = _TwoPi * Mathf.Round(m) / diameter; + + // Compute new wave vector and direction + k = Mathf.Sqrt(kx * kx + kz * kz); + dx = kx / k; + dz = kz / k; + } + + _WaveData[vi]._TwoPiOverWavelength[ei] = k; + _WaveData[vi]._WaveDirectionX[ei] = dx; + _WaveData[vi]._WaveDirectionZ[ei] = dz; + + // Repeat every 2pi to keep angle bounded - helps precision on 16bit platforms + _WaveData[vi]._Omega[ei] = k * c; + _WaveData[vi]._Phase[ei] = Mathf.Repeat(_Phases[componentIdx], Mathf.PI * 2f); + _WaveData[vi]._Phase2[ei] = Mathf.Repeat(_Phases2[componentIdx], Mathf.PI * 2f); + + outputIdx++; + } + } + + _LastCascade = isFilterable ? cascadeIdx : k_CascadeCount - 1; + + { + // Fill remaining elements of current vector4 with 0s + var vi = outputIdx / 4; + var ei = outputIdx - vi * 4; + + while (ei != 0) + { + _WaveData[vi]._TwoPiOverWavelength[ei] = 1f; + _WaveData[vi]._Amplitude[ei] = 0f; + _WaveData[vi]._WaveDirectionX[ei] = 0f; + _WaveData[vi]._WaveDirectionZ[ei] = 0f; + _WaveData[vi]._Omega[ei] = 0f; + _WaveData[vi]._Phase[ei] = 0f; + _WaveData[vi]._Phase2[ei] = 0f; + _WaveData[vi]._ChopAmplitude[ei] = 0f; + _WaveData[vi]._Amplitude2[ei] = 0f; + _WaveData[vi]._ChopAmplitude2[ei] = 0f; + ei = (ei + 1) % 4; + outputIdx++; + } + } + + while (cascadeIdx < k_CascadeCount) + { + cascadeIdx++; + minWl *= 2f; + _CascadeParameters[cascadeIdx]._StartIndex = outputIdx / 4; + //Debug.Log($"Crest: {cascadeIdx}: start {_cascadeParams[cascadeIdx]._startIndex} minWL {minWl}"); + } + + _BufferCascadeParameters.SetData(_CascadeParameters); + _BufferWaveData.SetData(_WaveData); + } + + void UpdateGenerateWaves(CommandBuffer buf) + { + // Clear existing waves or they could get copied. + buf.SetRenderTarget(_WaveBuffers, 0, CubemapFace.Unknown, -1); + buf.ClearRenderTarget(RTClearFlags.Color, Color.black, 0, 0); + buf.SetComputeFloatParam(_ShaderGerstner, ShaderIDs.s_TextureRes, _WaveBuffers.width); + buf.SetComputeIntParam(_ShaderGerstner, ShaderIDs.s_FirstCascadeIndex, _FirstCascade); + buf.SetComputeBufferParam(_ShaderGerstner, _KernelGerstner, ShaderIDs.s_CascadeParams, _BufferCascadeParameters); + buf.SetComputeBufferParam(_ShaderGerstner, _KernelGerstner, ShaderIDs.s_GerstnerWaveData, _BufferWaveData); + buf.SetComputeTextureParam(_ShaderGerstner, _KernelGerstner, ShapeWaves.ShaderIDs.s_WaveBuffer, _WaveBuffers); + + buf.DispatchCompute(_ShaderGerstner, _KernelGerstner, _WaveBuffers.width / Lod.k_ThreadGroupSizeX, _WaveBuffers.height / Lod.k_ThreadGroupSizeY, _LastCascade - _FirstCascade + 1); + } + + /// + /// Resamples wave spectrum + /// + /// The water renderer. + /// Wind speed in m/s + void UpdateWaveData(WaterRenderer water, float windSpeed) + { + // Set random seed to get repeatable results + var randomStateBkp = Random.state; + Random.InitState(_RandomSeed); + + _ActiveSpectrum.GenerateWaveData(_ComponentsPerOctave, ref _Wavelengths, ref _AngleDegrees); + + UpdateAmplitudes(); + + // Won't run every time so put last in the random sequence + if (_Phases == null || _Phases.Length != _Wavelengths.Length || _Phases2 == null || _Phases2.Length != _Wavelengths.Length) + { + InitPhases(); + } + + Random.state = randomStateBkp; + + SliceUpWaves(water, windSpeed); + } + + void UpdateAmplitudes() + { + if (_Amplitudes == null || _Amplitudes.Length != _Wavelengths.Length) + { + _Amplitudes = new float[_Wavelengths.Length]; + } + if (_Amplitudes2 == null || _Amplitudes2.Length != _Wavelengths.Length) + { + _Amplitudes2 = new float[_Wavelengths.Length]; + } + if (_Powers == null || _Powers.Length != _Wavelengths.Length) + { + _Powers = new float[_Wavelengths.Length]; + } + + var windSpeed = WindSpeedMPS; + + for (var i = 0; i < _Wavelengths.Length; i++) + { + var amp = _ActiveSpectrum.GetAmplitude(_Wavelengths[i], _ComponentsPerOctave, windSpeed, out _Powers[i]); + _Amplitudes[i] = Random.value * amp; + _Amplitudes2[i] = Random.value * amp * _ReverseWaveWeight; + } + } + + void InitPhases() + { + // Set random seed to get repeatable results + var randomStateBkp = Random.state; + Random.InitState(_RandomSeed); + + var totalComps = _ComponentsPerOctave * WaveSpectrum.k_NumberOfOctaves; + _Phases = new float[totalComps]; + _Phases2 = new float[totalComps]; + for (var octave = 0; octave < WaveSpectrum.k_NumberOfOctaves; octave++) + { + for (var i = 0; i < _ComponentsPerOctave; i++) + { + var index = octave * _ComponentsPerOctave + i; + var rnd = (i + Random.value) / _ComponentsPerOctave; + _Phases[index] = 2f * Mathf.PI * rnd; + + var rnd2 = (i + Random.value) / _ComponentsPerOctave; + _Phases2[index] = 2f * Mathf.PI * rnd2; + } + } + + Random.state = randomStateBkp; + } + + private protected override void ReportMaxDisplacement(WaterRenderer water) + { + if (!Enabled) return; + + if (_ActiveSpectrum._ChopScales.Length != WaveSpectrum.k_NumberOfOctaves) + { + Debug.LogError($"Crest: {nameof(WaveSpectrum)} {_ActiveSpectrum.name} is out of date, please open this asset and resave in editor.", _ActiveSpectrum); + } + + if (_Wavelengths == null) + { + return; + } + + var ampSum = 0f; + for (var i = 0; i < _Wavelengths.Length; i++) + { + ampSum += _Amplitudes[i] * _ActiveSpectrum._ChopScales[i / _ComponentsPerOctave]; + } + + // Apply weight or will cause popping due to scale change. + ampSum *= Weight; + + MaximumReportedHorizontalDisplacement = ampSum * _ActiveSpectrum._Chop; + MaximumReportedVerticalDisplacement = ampSum; + MaximumReportedWavesDisplacement = ampSum; + + if (Mode == LodInputMode.Global) + { + water.ReportMaximumDisplacement(ampSum * _ActiveSpectrum._Chop, ampSum, ampSum); + } + } + + private protected override void Initialize() + { + base.Initialize(); + s_Instances.Add(transform.GetSiblingIndex(), this); + } + + private protected override void OnDisable() + { + base.OnDisable(); + + s_Instances.Remove(this); + + if (_BufferCascadeParameters != null && _BufferCascadeParameters.IsValid()) + { + _BufferCascadeParameters.Dispose(); + _BufferCascadeParameters = null; + } + if (_BufferWaveData != null && _BufferWaveData.IsValid()) + { + _BufferWaveData.Dispose(); + _BufferWaveData = null; + } + + if (_WaveBuffers != null) + { + Helpers.Destroy(_WaveBuffers); + _WaveBuffers = null; + } + } + + private protected override void DestroySharedResources() { } + +#if UNITY_EDITOR + void OnGUI() + { + if (_DrawSlicesInEditor && _WaveBuffers != null && _WaveBuffers.IsCreated()) + { + DebugGUI.DrawTextureArray(_WaveBuffers, 8, 0.5f); + } + } +#endif + } + + partial class ShapeGerstner : ISerializationCallbackReceiver + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 1; +#pragma warning restore 414 + + void ISerializationCallbackReceiver.OnAfterDeserialize() + { + _Version = MigrateV1(_Version); + } + + void ISerializationCallbackReceiver.OnBeforeSerialize() + { + // Empty. + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/Shape/ShapeGerstner.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/Shape/ShapeGerstner.cs.meta new file mode 100644 index 000000000..c4f1a6a6f --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/Shape/ShapeGerstner.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 002f2642204d348f3a2fab18595c44cd +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: + - _rasterMesh: {instanceID: 0} + - _spectrum: {instanceID: 0} + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/Shape/ShapeWaves.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/Shape/ShapeWaves.cs new file mode 100644 index 000000000..14a131d02 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/Shape/ShapeWaves.cs @@ -0,0 +1,490 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using UnityEngine.Rendering; +using UnityEngine.Serialization; + +namespace WaveHarmonic.Crest +{ + /// + /// Base class for Shape components. + /// + [@ExecuteDuringEditMode(ExecuteDuringEditMode.Include.None)] + [@HelpURL("Manual/Waves.html#wave-conditions")] + [@FilterEnum(nameof(_Blend), Filtered.Mode.Include, (int)LodInputBlend.Off, (int)LodInputBlend.Additive, (int)LodInputBlend.Alpha, (int)LodInputBlend.AlphaClip)] + public abstract partial class ShapeWaves : LodInput + { + [@Heading("Waves")] + + [Tooltip("The spectrum that defines the water surface shape.")] + [@Embedded] + [@GenerateAPI] + [SerializeField] + internal WaveSpectrum _Spectrum; + + [Tooltip("Whether to evaluate the spectrum every frame.\n\nWhen false, the wave spectrum is evaluated once on startup in editor play mode and standalone builds, rather than every frame. This is less flexible, but it reduces the performance cost significantly.")] + [@GenerateAPI] + [FormerlySerializedAs("_SpectrumFixedAtRuntime")] + [SerializeField] + bool _EvaluateSpectrumAtRunTimeEveryFrame; + + [Tooltip("How much these waves respect the shallow water attenuation.\n\nAttenuation is defined on the Animated Waves. Set to zero to ignore attenuation.")] + [@Range(0f, 1f)] + [@GenerateAPI] + [SerializeField] + float _RespectShallowWaterAttenuation = 1f; + + [Tooltip("Primary wave direction heading (degrees).\n\nThis is the angle from x axis in degrees that the waves are oriented towards. If a spline is being used to place the waves, this angle is relative to the spline.")] + [@Predicated(nameof(_Mode), inverted: false, nameof(LodInputMode.Paint))] + [@Range(-180, 180)] + [@GenerateAPI] + [SerializeField] + private protected float _WaveDirectionHeadingAngle = 0f; + + [Tooltip("Whether to use the wind speed on this component rather than the global wind speed.\n\nGlobal wind speed comes from the Water Renderer component.")] + [@GenerateAPI] + [SerializeField] + bool _OverrideGlobalWindSpeed = false; + + [Tooltip("Wind speed in km/h. Controls wave conditions.")] + [@ShowComputedProperty(nameof(WindSpeedKPH))] + [@Predicated(nameof(_OverrideGlobalWindSpeed), hide: true)] + [@Range(0, 150f, scale: 2f)] + [@GenerateAPI] + [SerializeField] + float _WindSpeed = 20f; + + + [Header("Generation Settings")] + + [Tooltip("Resolution to use for wave generation buffers.\n\nLow resolutions are more efficient but can result in noticeable patterns in the shape.")] + [@Stepped(16, 512, step: 2, power: true)] + [@GenerateAPI] + [SerializeField] + private protected int _Resolution = 128; + + + // Debug + + [Tooltip("In Editor, shows the wave generation buffers on screen.")] + [@DecoratedField(order = k_DebugGroupOrder * Constants.k_FieldGroupOrder), SerializeField] + internal bool _DrawSlicesInEditor = false; + + + private protected static new class ShaderIDs + { + public static readonly int s_TransitionalWavelengthThreshold = Shader.PropertyToID("_Crest_TransitionalWavelengthThreshold"); + public static readonly int s_WaveResolutionMultiplier = Shader.PropertyToID("_Crest_WaveResolutionMultiplier"); + public static readonly int s_WaveBufferParameters = Shader.PropertyToID("_Crest_WaveBufferParameters"); + public static readonly int s_AlphaSource = Shader.PropertyToID("_Crest_AlphaSource"); + public static readonly int s_WaveBuffer = Shader.PropertyToID("_Crest_WaveBuffer"); + public static readonly int s_WaveBufferSliceIndex = Shader.PropertyToID("_Crest_WaveBufferSliceIndex"); + public static readonly int s_AverageWavelength = Shader.PropertyToID("_Crest_AverageWavelength"); + public static readonly int s_RespectShallowWaterAttenuation = Shader.PropertyToID("_Crest_RespectShallowWaterAttenuation"); + public static readonly int s_MaximumAttenuationDepth = Shader.PropertyToID("_Crest_MaximumAttenuationDepth"); + public static readonly int s_AxisX = Shader.PropertyToID("_Crest_AxisX"); + } + + static WaveSpectrum s_DefaultSpectrum; + private protected static WaveSpectrum DefaultSpectrum + { + get + { + if (s_DefaultSpectrum == null) + { + s_DefaultSpectrum = ScriptableObject.CreateInstance(); + s_DefaultSpectrum.name = "Default Waves (instance)"; + s_DefaultSpectrum.hideFlags = HideFlags.DontSave | HideFlags.NotEditable; + } + + return s_DefaultSpectrum; + } + } + + private protected abstract int MinimumResolution { get; } + private protected abstract int MaximumResolution { get; } + + static ComputeShader s_TransferWavesComputeShader; + static LocalKeyword s_KeywordTexture; + static LocalKeyword s_KeywordTextureBlend; + readonly Vector4[] _WaveBufferParameters = new Vector4[Lod.k_MaximumSlices]; + + internal static int s_RenderPassOverride = -1; + + private protected WaveSpectrum _ActiveSpectrum = null; + private protected Vector2 PrimaryWaveDirection => new(Mathf.Cos(Mathf.PI * _WaveDirectionHeadingAngle / 180f), Mathf.Sin(Mathf.PI * _WaveDirectionHeadingAngle / 180f)); + + /// + /// The wind speed in kilometers per hour (KPH). + /// + /// + /// Wind speed can come from this component or the . + /// + public float WindSpeedKPH => _OverrideGlobalWindSpeed || WaterRenderer.Instance == null ? _WindSpeed : WaterRenderer.Instance.WindSpeedKPH; + + /// + /// The wind speed in meters per second (MPS). + /// + /// /// + /// Wind speed can come from this component or the . + /// + public float WindSpeedMPS => WindSpeedKPH / 3.6f; + + private protected ShapeWaves() + { + _FollowHorizontalWaveMotion = true; + } + + private protected override void Attach() + { + base.Attach(); + _Reporter ??= new(this); + WaterChunkRenderer.DisplacementReporters.Add(_Reporter); + } + + private protected override void Detach() + { + base.Detach(); + WaterChunkRenderer.DisplacementReporters.Remove(_Reporter); + } + + internal override void Draw(Lod simulation, CommandBuffer buffer, RenderTargetIdentifier target, int pass = -1, float weight = 1f, int slice = -1) + { + if (weight * Weight <= 0f) + { + return; + } + + // Iterating over slices which means this is non compute so pass to graphics draw. + if (!IsCompute) + { + GraphicsDraw(simulation, buffer, target, pass, weight, slice); + return; + } + + var lodCount = simulation.Slices; + + var shape = (AnimatedWavesLod)simulation; + + var wrapper = new PropertyWrapperCompute(buffer, s_TransferWavesComputeShader, 0); + + if (_FirstCascade < 0 || _LastCascade < 0) + { + return; + } + + // Write to per-octave _WaveBuffers (ie pre-combined). Not the same as _AnimatedWaves. + wrapper.SetTexture(Crest.ShaderIDs.s_Target, target); + // Input weight. Weight for each octave calculated in compute. + wrapper.SetFloat(LodInput.ShaderIDs.s_Weight, Weight); + + var water = shape._Water; + + for (var lodIdx = lodCount - 1; lodIdx >= lodCount - slice; lodIdx--) + { + _WaveBufferParameters[lodIdx] = new(-1, -2, 0, 0); + + var found = false; + var filter = new AnimatedWavesLod.WavelengthFilter(water, lodIdx); + + for (var i = _FirstCascade; i <= _LastCascade; i++) + { + _Wavelength = MinWavelength(i) / shape.WaveResolutionMultiplier; + + // Do the weight from scratch because this is the real filter. + var w = AnimatedWavesLod.FilterByWavelength(filter, _Wavelength) * Weight; + + if (w <= 0f) + { + continue; + } + + if (!found) + { + _WaveBufferParameters[lodIdx].x = i; + found = true; + } + + _WaveBufferParameters[lodIdx].y = i; + } + } + + // Set transitional weights. + _WaveBufferParameters[lodCount - 2].w = 1f - water.ViewerAltitudeLevelAlpha; + _WaveBufferParameters[lodCount - 1].w = water.ViewerAltitudeLevelAlpha; + + SetRenderParameters(water, wrapper); + + wrapper.SetFloat(ShaderIDs.s_WaveResolutionMultiplier, shape.WaveResolutionMultiplier); + wrapper.SetFloat(ShaderIDs.s_TransitionalWavelengthThreshold, water.MaximumWavelength(water.LodLevels - 1) * 0.5f); + wrapper.SetVectorArray(ShaderIDs.s_WaveBufferParameters, _WaveBufferParameters); + + var isTexture = Mode is LodInputMode.Paint or LodInputMode.Texture; + var isAlphaBlend = Blend is LodInputBlend.Off or LodInputBlend.Alpha or LodInputBlend.AlphaClip; + + wrapper.SetKeyword(s_KeywordTexture, isTexture && !isAlphaBlend); + wrapper.SetKeyword(s_KeywordTextureBlend, isTexture && isAlphaBlend); + + if (isTexture) + { + wrapper.SetInteger(Crest.ShaderIDs.s_Blend, (int)_Blend); + } + + if (Mode == LodInputMode.Global) + { + var threads = shape.Resolution / Lod.k_ThreadGroupSize; + wrapper.Dispatch(threads, threads, slice); + } + else + { + base.Draw(simulation, buffer, target, pass, weight, slice); + } + } + + void GraphicsDraw(Lod simulation, CommandBuffer buffer, RenderTargetIdentifier target, int pass, float weight, int slice) + { + var lod = simulation as AnimatedWavesLod; + + var wrapper = new PropertyWrapperBuffer(buffer); + SetRenderParameters(simulation._Water, wrapper); + + var isFirst = true; + + for (var i = _FirstCascade; i <= _LastCascade; i++) + { + _Wavelength = MinWavelength(i) / lod.WaveResolutionMultiplier; + + // Do the weight from scratch because this is the real filter. + weight = AnimatedWavesLod.FilterByWavelength(simulation._Water, slice, _Wavelength) * Weight; + if (weight <= 0f) continue; + + var average = _Wavelength * 1.5f * lod.WaveResolutionMultiplier; + // We only have one renderer so we need to use global. + buffer.SetGlobalFloat(ShaderIDs.s_AverageWavelength, average); + buffer.SetGlobalInt(ShaderIDs.s_WaveBufferSliceIndex, i); + + // Only apply blend mode once per component / LOD. Multiple passes can happen to gather all + // wavelengths and is incorrect to apply blend mode to those subsequent passes (ie component + // would be blending against itself). + if (!isFirst) + { + s_RenderPassOverride = 1; + } + + isFirst = false; + + base.Draw(simulation, buffer, target, pass, weight, slice); + } + + // Wavelength must be zero or waves will be filtered beforehand and not be written to every LOD. + _Wavelength = 0; + s_RenderPassOverride = -1; + } + + internal override float Filter(WaterRenderer water, int slice) + { + return 1f; + } + + private protected const int k_CascadeCount = 16; + + // First cascade of wave buffer that has waves and will be rendered. + private protected int _FirstCascade = -1; + // Last cascade of wave buffer that has waves and will be rendered. + // Default to lower than first default to break loops. + private protected int _LastCascade = -2; + + // Used to populate data on first frame. + private protected bool _FirstUpdate = true; + + // Wave generation done in Draw. Keeps track to limit to once per frame. + private protected int _LastGenerateFrameCount = -1; + + internal override bool Enabled => _FirstCascade > -1 && WaterRenderer.Instance.Gravity != 0f && Mode switch + { + LodInputMode.Global => enabled && s_TransferWavesComputeShader != null, + _ => base.Enabled, + }; + + internal override LodInputMode DefaultMode => LodInputMode.Global; + internal override int Pass => (int)DisplacementPass.LodDependent; + + private protected override bool FollowHorizontalMotion => true; + + float _Wavelength; + + private protected RenderTexture _WaveBuffers; + internal RenderTexture WaveBuffer => _WaveBuffers; + + internal Rect _Rect; + + private protected Vector2 _MaximumDisplacement; + private protected float MaximumReportedHorizontalDisplacement { get; set; } + private protected float MaximumReportedVerticalDisplacement { get; set; } + private protected float MaximumReportedWavesDisplacement { get; set; } + + static int s_InstanceCount = 0; + + private protected bool UpdateDataEachFrame + { + get + { + var updateDataEachFrame = _EvaluateSpectrumAtRunTimeEveryFrame; +#if UNITY_EDITOR + if (!Application.isPlaying) updateDataEachFrame = true; +#endif + return updateDataEachFrame; + } + } + + /// + /// Min wavelength for a cascade in the wave buffer. Does not depend on viewpoint. + /// + private protected float MinWavelength(int cascadeIdx) + { + var diameter = 0.5f * (1 << cascadeIdx); + // Matches constant WAVE_SAMPLE_FACTOR in FFTSpectrum.compute + return diameter / 8f; + } + + private protected abstract void ReportMaxDisplacement(WaterRenderer water); + private protected abstract void DestroySharedResources(); + + private protected override void OnUpdate(WaterRenderer water) + { + base.OnUpdate(water); + + _ActiveSpectrum = _Spectrum != null ? _Spectrum : DefaultSpectrum; + + _FirstUpdate = false; + } + + private protected virtual void SetRenderParameters(WaterRenderer water, T wrapper) where T : IPropertyWrapper + { + wrapper.SetTexture(ShaderIDs.s_WaveBuffer, _WaveBuffers); + wrapper.SetFloat(ShaderIDs.s_RespectShallowWaterAttenuation, _RespectShallowWaterAttenuation); + wrapper.SetFloat(ShaderIDs.s_MaximumAttenuationDepth, water._AnimatedWavesLod.ShallowsMaximumDepth); + } + + private protected override void Awake() + { + base.Awake(); + s_InstanceCount++; + } + + private protected void OnDestroy() + { + // Since FFTCompute resources are shared we will clear after last ShapeFFT is destroyed. + if (--s_InstanceCount <= 0) + { + DestroySharedResources(); + + if (s_DefaultSpectrum != null) + { + Helpers.Destroy(s_DefaultSpectrum); + } + } + } + + private protected override void Initialize() + { + base.Initialize(); + + WaterResources.Instance.AfterEnabled -= InitializeResources; + WaterResources.Instance.AfterEnabled += InitializeResources; + InitializeResources(); + + _FirstUpdate = true; + + // Initialise with spectrum + if (_Spectrum != null) + { + _ActiveSpectrum = _Spectrum; + } + + if (_ActiveSpectrum == null) + { + _ActiveSpectrum = DefaultSpectrum; + } + } + + private protected override void OnDisable() + { + base.OnDisable(); + + WaterResources.Instance.AfterEnabled -= InitializeResources; + } + + void InitializeResources() + { + s_TransferWavesComputeShader = WaterResources.Instance.Compute._ShapeWavesTransfer; + s_KeywordTexture = WaterResources.Instance.Keywords.AnimatedWavesTransferWavesTexture; + s_KeywordTextureBlend = WaterResources.Instance.Keywords.AnimatedWavesTransferWavesTextureBlend; + } + + bool ReportDisplacement(ref Rect bounds, ref float horizontal, ref float vertical) + { + if (Mode == LodInputMode.Global || !Enabled) + { + return false; + } + + _Rect = Data.Rect; + + if (bounds.Overlaps(_Rect, false)) + { + horizontal = MaximumReportedHorizontalDisplacement; + vertical = MaximumReportedVerticalDisplacement; + return true; + } + + return false; + } + } + + partial class ShapeWaves + { + Reporter _Reporter; + + sealed class Reporter : IReportsDisplacement + { + readonly ShapeWaves _Input; + public Reporter(ShapeWaves input) => _Input = input; + public bool ReportDisplacement(ref Rect bounds, ref float horizontal, ref float vertical) => _Input.ReportDisplacement(ref bounds, ref horizontal, ref vertical); + } + } + + partial class ShapeWaves + { + [HideInInspector, SerializeField] + AlphaSource _AlphaSource; + enum AlphaSource { AlwaysOne, FromZero, FromZeroNormalized } + + private protected int MigrateV1(int version) + { + // Version 1 + // - Merge Alpha Source into Blend. + // - Rename and invert Spectrum Fixed at Run-Time + if (version < 1) + { + if (_Blend == LodInputBlend.Alpha) + { + _Blend = _AlphaSource switch + { + AlphaSource.AlwaysOne => LodInputBlend.Off, + AlphaSource.FromZero => LodInputBlend.Alpha, + AlphaSource.FromZeroNormalized => LodInputBlend.AlphaClip, + _ => _Blend, // Linter complained (linter has one off error). + }; + } + + _EvaluateSpectrumAtRunTimeEveryFrame = !_EvaluateSpectrumAtRunTimeEveryFrame; + + version = 1; + } + + return version; + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/Shape/ShapeWaves.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/Shape/ShapeWaves.cs.meta new file mode 100644 index 000000000..7effe2a7e --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/Shape/ShapeWaves.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c494780f7140b493695a431be2111449 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/SphereWaterInteraction.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/SphereWaterInteraction.cs new file mode 100644 index 000000000..290608d36 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/SphereWaterInteraction.cs @@ -0,0 +1,293 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using UnityEngine.Rendering; +using WaveHarmonic.Crest.Internal; + +namespace WaveHarmonic.Crest +{ + /// + /// Approximates the interaction between a sphere and the water. + /// + /// + /// Multiple spheres can be used to model the interaction of a non-spherical shape. + /// + [AddComponentMenu(Constants.k_MenuPrefixInputs + "Sphere Water Interaction")] + [@HelpURL("Manual/Waves.html#adding-interaction-forces")] + public sealed partial class SphereWaterInteraction : ManagedBehaviour + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + + [Tooltip("Radius of the sphere that is modelled from which the interaction forces are calculated.")] + [@Range(0.01f, 50f)] + [@GenerateAPI] + [SerializeField] + internal float _Radius = 1f; + + [Tooltip("Intensity of the forces.\n\nCan be set negative to invert.")] + [@Range(-40f, 40f)] + [@GenerateAPI] + [SerializeField] + float _Weight = 1f; + + [Tooltip("Intensity of the forces from vertical motion of the sphere.\n\nScales ripples generated from a sphere moving up or down.")] + [@Range(0f, 2f)] + [@GenerateAPI] + [SerializeField] + float _WeightVerticalMultiplier = 0.5f; + + [Tooltip("Model parameter that can be used to modify the shape of the interaction.\n\nInternally the interaction is modelled by a pair of nested spheres. The forces from the two spheres combine to create the final effect. This parameter scales the effect of the inner sphere and can be tweaked to adjust the shape of the result.")] + [@Range(0f, 10f)] + [@GenerateAPI] + [SerializeField] + float _InnerSphereMultiplier = 1.55f; + + [Tooltip("Model parameter that can be used to modify the shape of the interaction.\n\nThis parameter controls the size of the inner sphere and can be tweaked to give further control over the result.")] + [@Range(0f, 1f)] + [@GenerateAPI] + [SerializeField] + float _InnerSphereOffset = 0.109f; + + [Tooltip("Offset in direction of motion to help ripples appear in front of sphere.\n\nThere is some latency between applying a force to the wave simualtion and the resulting waves appearing. Applying this offset can help to ensure the waves do not lag behind the sphere.")] + [@Range(0f, 2f)] + [@GenerateAPI] + [SerializeField] + internal float _VelocityOffset = 0.04f; + + [Tooltip("How much to correct the position for horizontal wave displacement.\n\nIf set to 0, the input will always be applied at a fixed position before any horizontal displacement from waves. If waves are large then their displacement may cause the interactive waves to drift away from the object. This parameter can be increased to compensate for this displacement and combat this issue. However increasing too far can cause a feedback loop which causes strong 'ring' artifacts to appear in the dynamic waves. This parameter can be tweaked to balance this two effects.")] + [@Range(0f, 1f)] + [@GenerateAPI] + [SerializeField] + float _CompensateForWaveMotion = 0.45f; + + [Tooltip("Whether to improve visibility in larger LODs.\n\nIf the dynamic waves are not visible far enough in the distance from the camera, this can be used to boost the output.")] + [@GenerateAPI] + [SerializeField] + bool _BoostLargeWaves = false; + + + [Header("Limits")] + + [Tooltip("Teleport speed (km/h).\n\nIf the calculated speed is larger than this amount, the object is deemed to have teleported and the computed velocity is discarded.")] + [@GenerateAPI] + [SerializeField] + float _TeleportSpeed = 500f; + + [Tooltip("Outputs a warning to the console on teleport.")] + [@GenerateAPI] + [SerializeField] + bool _WarnOnTeleport = false; + + [Tooltip("Maximum speed clamp (km/h).\n\nUseful for controlling/limiting wake.")] + [@GenerateAPI] + [SerializeField] + float _MaximumSpeed = 100f; + + [Tooltip("Outputs a warning to the console on speed clamp.")] + [@GenerateAPI] + [SerializeField] + bool _WarnOnSpeedClamp = false; + +#pragma warning disable 414 + [Header("Debug")] + + [Tooltip("Draws debug lines at each substep position. Editor only.")] + [SerializeField] + bool _DebugSubsteps = false; +#pragma warning restore 414 + + static class ShaderIDs + { + public static readonly int s_Velocity = Shader.PropertyToID("_Crest_Velocity"); + public static readonly int s_Weight = Shader.PropertyToID("_Crest_Weight"); + public static readonly int s_Radius = Shader.PropertyToID("_Crest_Radius"); + public static readonly int s_InnerSphereOffset = Shader.PropertyToID("_Crest_InnerSphereOffset"); + public static readonly int s_InnerSphereMultiplier = Shader.PropertyToID("_Crest_InnerSphereMultiplier"); + public static readonly int s_LargeWaveMultiplier = Shader.PropertyToID("_Crest_LargeWaveMultiplier"); + } + + internal Vector3 _Velocity; + Vector3 _VelocityClamped; + Vector3 _PreviousPosition; + Vector3 _RelativeVelocity; + Vector3 _Displacement; + + float _WeightThisFrame; + + readonly SampleCollisionHelper _SampleHeightHelper = new(); + readonly SampleFlowHelper _SampleFlowHelper = new(); + + static ComputeShader ComputeShader => WaterResources.Instance.Compute._SphereWaterInteraction; + Rect Rect => new + ( + transform.position.XZ() - _Displacement.XZ() * _CompensateForWaveMotion - Vector2.one * (_Radius * 4f * 0.5f), + Vector2.one * (_Radius * 4f) + ); + + private protected override System.Action OnUpdateMethod => OnUpdate; + void OnUpdate(WaterRenderer water) + { + _SampleHeightHelper.SampleDisplacement(transform.position, out _Displacement, minimumLength: 2f * _Radius); + + LateUpdateComputeVel(water); + + // Velocity relative to water + _RelativeVelocity = _VelocityClamped; + { + _SampleFlowHelper.Sample(transform.position, out var surfaceFlow, minimumLength: 2f * _Radius); + _RelativeVelocity -= new Vector3(surfaceFlow.x, 0, surfaceFlow.y); + + _RelativeVelocity.y *= _WeightVerticalMultiplier; + } + + // Use weight from user with a multiplier to make interactions look plausible + _WeightThisFrame = 3.75f * _Weight; + + var waterHeight = _Displacement.y + water.SeaLevel; + LateUpdateSphereWeight(waterHeight, ref _WeightThisFrame); + + // Weighting with this value helps keep ripples consistent for different gravity values + var gravityMul = Mathf.Sqrt(water._DynamicWavesLod.Settings._GravityMultiplier) / 5f; + _WeightThisFrame *= gravityMul; + + _PreviousPosition = transform.position; + } + + // Velocity of the sphere, relative to the water. Computes on the fly, discards if teleport detected. + void LateUpdateComputeVel(WaterRenderer water) + { + // Compue vel using finite difference + _Velocity = (transform.position - _PreviousPosition) / water.DeltaTime; + if (water.DeltaTime < 0.0001f) + { + _Velocity = Vector3.zero; + } + + var speedKmh = _Velocity.magnitude * 3.6f; + if (speedKmh > _TeleportSpeed) + { + // teleport detected + _Velocity *= 0f; + + if (_WarnOnTeleport) + { + Debug.LogWarning("Crest: Teleport detected (speed = " + speedKmh.ToString() + "), velocity discarded.", this); + } + + speedKmh = _Velocity.magnitude * 3.6f; + } + + if (speedKmh > _MaximumSpeed) + { + // limit speed to max + _VelocityClamped = _Velocity * _MaximumSpeed / speedKmh; + + if (_WarnOnSpeedClamp) + { + Debug.LogWarning("Crest: Speed (" + speedKmh.ToString() + ") exceeded max limited, clamped.", this); + } + } + else + { + _VelocityClamped = _Velocity; + } + } + + // Weight based on submerged-amount of sphere + void LateUpdateSphereWeight(float waterHeight, ref float weight) + { + var centerDepthInWater = waterHeight - transform.position.y; + + if (centerDepthInWater >= 0f) + { + // Center in water - exponential fall off of interaction influence as object gets deeper + var prop = centerDepthInWater / _Radius; + prop *= 0.5f; + weight *= Mathf.Exp(-prop * prop); + } + else + { + // Center out of water - ramp off with square root, weight goes to 0 when sphere is just touching water + var height = -centerDepthInWater; + var heightProp = 1f - Mathf.Clamp01(height / _Radius); + weight *= Mathf.Sqrt(heightProp); + } + } + + private protected override void Initialize() + { + base.Initialize(); + _Input ??= new(this); + ILodInput.Attach(_Input, DynamicWavesLod.s_Inputs); + _PreviousPosition = transform.position; + } + + private protected override void OnDisable() + { + base.OnDisable(); + ILodInput.Detach(_Input, DynamicWavesLod.s_Inputs); + } + + void Draw(Lod simulation, CommandBuffer buffer, RenderTargetIdentifier target, int pass = -1, float weight = 1f, int slices = -1) + { + var waves = simulation as DynamicWavesLod; + var timeBeforeCurrentTime = waves.TimeLeftToSimulate; + + var wrapper = new PropertyWrapperCompute(buffer, ComputeShader, 0); + +#if UNITY_EDITOR + // Draw debug lines at each substep position. Alternate colours each frame so that substeps are clearly visible. + if (_DebugSubsteps) + { + var col = 0.7f * (Time.frameCount % 2 == 1 ? Color.green : Color.red); + var pos = transform.position - _Velocity * (timeBeforeCurrentTime - _VelocityOffset); + var right = Vector3.Cross(Vector3.up, _Velocity.normalized); + Debug.DrawLine(pos - right + transform.up, pos + right + transform.up, col, 0.5f); + } +#endif + + // Reconstruct the position of this input at the current substep time. This produces + // much smoother interaction shapes for moving objects. Increasing sim freq helps further. + var offset = _Velocity * (timeBeforeCurrentTime - _VelocityOffset); + var displacement = _Displacement.XNZ() * _CompensateForWaveMotion; + wrapper.SetVector(Crest.ShaderIDs.s_Position, transform.position - offset - displacement); + + // Enlarge radius slightly - this tends to help waves 'wrap' the sphere slightly better + wrapper.SetFloat(ShaderIDs.s_Radius, _Radius * 1.1f); + + wrapper.SetFloat(ShaderIDs.s_Weight, _WeightThisFrame); + wrapper.SetFloat(ShaderIDs.s_InnerSphereOffset, _InnerSphereOffset); + wrapper.SetFloat(ShaderIDs.s_InnerSphereMultiplier, _InnerSphereMultiplier); + wrapper.SetFloat(ShaderIDs.s_LargeWaveMultiplier, _BoostLargeWaves ? 2f : 1f); + wrapper.SetVector(ShaderIDs.s_Velocity, _RelativeVelocity); + + wrapper.SetTexture(Crest.ShaderIDs.s_Target, target); + + var threads = simulation.Resolution / Lod.k_ThreadGroupSize; + wrapper.Dispatch(threads, threads, slices); + } + } + + partial class SphereWaterInteraction + { + Input _Input; + + sealed class Input : ILodInput + { + readonly SphereWaterInteraction _Input; + public Input(SphereWaterInteraction input) => _Input = input; + public bool Enabled => _Input.enabled; + public bool IsCompute => true; + public int Queue => 0; + public int Pass => -1; + public Rect Rect => _Input.Rect; + public MonoBehaviour Component => _Input; + public float Filter(WaterRenderer water, int slice) => 1f; + public void Draw(Lod lod, CommandBuffer buffer, RenderTargetIdentifier target, int pass = -1, float weight = 1, int slice = -1) => _Input.Draw(lod, buffer, target, pass, weight, slice); + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/SphereWaterInteraction.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/SphereWaterInteraction.cs.meta new file mode 100644 index 000000000..a6fc3c257 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/SphereWaterInteraction.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8958fecc82ae04c7d9128101addbdc3b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/TextureLodInputData.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/TextureLodInputData.cs new file mode 100644 index 000000000..e7238b257 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/TextureLodInputData.cs @@ -0,0 +1,104 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using UnityEngine.Rendering; +using WaveHarmonic.Crest.Internal; + +namespace WaveHarmonic.Crest +{ + /// + /// Data storage for for the Texture input mode. + /// + [System.Serializable] + public abstract partial class TextureLodInputData : LodInputData + { + [Tooltip("Texture to render into the simulation.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + internal Texture _Texture; + + private protected abstract ComputeShader TextureShader { get; } + internal override bool IsEnabled => _Texture != null; + internal override bool HasHeightRange => false; + + internal override void RecalculateRect() + { + _Rect = _Input.transform.RectXZ(); + } + + internal override void RecalculateBounds() + { + throw new System.NotImplementedException(); + } + + internal override void Draw(Lod lod, Component component, CommandBuffer buffer, RenderTargetIdentifier target, int slices) + { + var transform = component.transform; + var wrapper = new PropertyWrapperCompute(buffer, TextureShader, 0); + var rotation = new Vector2(transform.localToWorldMatrix.m20, transform.localToWorldMatrix.m00).normalized; + wrapper.SetVector(ShaderIDs.s_TextureSize, transform.lossyScale.XZ()); + wrapper.SetVector(ShaderIDs.s_TexturePosition, transform.position.XZ()); + wrapper.SetVector(ShaderIDs.s_TextureRotation, rotation); + wrapper.SetVector(ShaderIDs.s_Resolution, new(_Texture.width, _Texture.height)); + wrapper.SetFloat(ShaderIDs.s_FeatherWidth, _Input.FeatherWidth); + wrapper.SetTexture(ShaderIDs.s_Texture, _Texture); + wrapper.SetInteger(ShaderIDs.s_Blend, (int)_Input.Blend); + wrapper.SetTexture(ShaderIDs.s_Target, target); + + if (this is LevelTextureLodInputData height) + { + wrapper.SetKeyword(WaterResources.Instance.Keywords.LevelTextureCatmullRom, height._UseCatmullRomFiltering); + } + + if (this is DirectionalTextureLodInputData data) + { + wrapper.SetBoolean(ShaderIDs.s_NegativeValues, data._NegativeValues); + } + + var threads = lod.Resolution / Lod.k_ThreadGroupSize; + wrapper.Dispatch(threads, threads, slices); + } + + internal override void OnEnable() + { + // Empty. + } + + internal override void OnDisable() + { + // Empty. + } + +#if UNITY_EDITOR + internal override void OnChange(string propertyPath, object previousValue) + { + + } + + internal override bool InferMode(Component component, ref LodInputMode mode) + { + return false; + } +#endif + } + + /// + [System.Serializable] + public abstract partial class DirectionalTextureLodInputData : TextureLodInputData + { + [Tooltip("Whether the texture supports negative values.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + internal bool _NegativeValues; + } + + /// + partial class LevelTextureLodInputData + { + [Label("Filtering (High Quality)")] + [Tooltip("Helps with staircase aliasing.")] + [@DecoratedField, SerializeField] + internal bool _UseCatmullRomFiltering; + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/TextureLodInputData.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/TextureLodInputData.cs.meta new file mode 100644 index 000000000..833a37c3d --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/TextureLodInputData.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ba0f2ab8138ec440c970acf0e1cd3d38 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/WatertightHull.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/WatertightHull.cs new file mode 100644 index 000000000..350568d83 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/WatertightHull.cs @@ -0,0 +1,278 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using UnityEngine.Rendering; +using WaveHarmonic.Crest.Internal; + +namespace WaveHarmonic.Crest +{ + /// + /// The mode for . + /// + /// + /// Each mode has its strengths and weaknesses. + /// + public enum WatertightHullMode + { + /// + /// Uses to remove water. + /// + [Tooltip("Use displacement to remove water.\n\nUsing displacement will also affect the underwater and can nest bouyant objects. Requires the displacement layer to be enabled.")] + Displacement, + + /// + /// Uses to remove water. + /// + [Tooltip("Clips the surface to remove water.\n\nThis option is more precise and can be submerged.")] + Clip, + } + + /// + /// Removes water from a provided hull using the clip simulation. + /// + [@ExecuteDuringEditMode] + [AddComponentMenu(Constants.k_MenuPrefixInputs + "Watertight Hull")] + [@HelpURL("Manual/Clipping.html#watertight-hull")] + public sealed partial class WatertightHull : ManagedBehaviour + { + [@Label("Convex Hull")] + [Tooltip("The convex hull to keep water out.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + internal Mesh _Mesh; + + [Tooltip("Order this input will render.\n\nQueue is 'Queue + SiblingIndex'")] + [@GenerateAPI(Setter.Custom)] + [@DecoratedField, SerializeField] + int _Queue; + + [@Space(10)] + + [Tooltip("Which mode to use.")] + [@GenerateAPI(Setter.Custom)] + [@DecoratedField, SerializeField] + WatertightHullMode _Mode = WatertightHullMode.Displacement; + + [Tooltip("Inverts the effect to remove clipping (ie add water).")] + [@Predicated(nameof(_Mode), inverted: true, nameof(WatertightHullMode.Clip), hide: true)] + [@GenerateAPI] + [@DecoratedField, SerializeField] + bool _Inverted; + + [@Label("Use Clip")] + [Tooltip("Whether to also to clip the surface when using displacement mode.\n\nDisplacement mode can have a leaky hull by allowing chop top push waves across the hull boundaries slightly. Clipping the surface will remove these interior leaks.")] + [@Predicated(nameof(_Mode), inverted: true, nameof(WatertightHullMode.Displacement), hide: true)] + [@GenerateAPI(Setter.Custom)] + [@DecoratedField, SerializeField] + bool _UseClipWithDisplacement = true; + + [@Space(10)] + + [@DecoratedField, SerializeField] + internal DebugFields _Debug = new(); + + [System.Serializable] + internal sealed class DebugFields + { + [@DecoratedField, SerializeField] + public bool _DrawBounds; + } + + Material _ClipMaterial; + Material _AnimatedWavesMaterial; + + internal bool Enabled => enabled && _Mesh != null; + + bool _RecalculateBounds = true; + Rect _Rect; + + internal Rect Rect + { + get + { + if (_RecalculateBounds) + { + _Rect = transform.TransformBounds(_Mesh.bounds).RectXZ(); + _RecalculateBounds = false; + } + + return _Rect; + } + } + + readonly SampleCollisionHelper _SampleCollisionHelper = new(); + Vector3 _Displacement; + + internal bool UsesClip => _Mode == WatertightHullMode.Clip || _UseClipWithDisplacement; + internal bool UsesDisplacement => _Mode == WatertightHullMode.Displacement; + + static class ShaderIDs + { + public static int s_Inverted = Shader.PropertyToID("_Crest_Inverted"); + } + + private protected override void Initialize() + { + base.Initialize(); + + if (UsesClip) + { + _ClipInput ??= new(this); + _ClipMaterial = new(WaterResources.Instance.Shaders._ClipConvexHull); + ILodInput.Attach(_ClipInput, ClipLod.s_Inputs); + } + + if (UsesDisplacement) + { + _AnimatedWavesInput ??= new(this); + _AnimatedWavesMaterial = new(Shader.Find("Crest/Inputs/Animated Waves/Push Water Under Convex Hull")); + _AnimatedWavesMaterial.SetFloat(LodInput.ShaderIDs.s_Weight, 1f); + ILodInput.Attach(_AnimatedWavesInput, AnimatedWavesLod.s_Inputs); + } + } + + private protected override void OnDisable() + { + base.OnDisable(); + Helpers.Destroy(_ClipMaterial); + ILodInput.Detach(_ClipInput, ClipLod.s_Inputs); + Helpers.Destroy(_AnimatedWavesMaterial); + ILodInput.Detach(_AnimatedWavesInput, AnimatedWavesLod.s_Inputs); + } + + private protected override System.Action OnUpdateMethod => OnUpdate; + void OnUpdate(WaterRenderer water) + { + if (_Mode == WatertightHullMode.Displacement) + { + _SampleCollisionHelper.SampleDisplacement(transform.position, out _Displacement); + } + + if (transform.hasChanged) + { + _RecalculateBounds = true; + } + } + + private protected override System.Action OnLateUpdateMethod => OnLateUpdate; + void OnLateUpdate(WaterRenderer water) + { + transform.hasChanged = false; + } + + void DrawClip(Lod simulation, CommandBuffer buffer, RenderTargetIdentifier target, int pass = -1, float weight = 1, int slice = -1) + { + _ClipMaterial.SetBoolean(ShaderIDs.s_Inverted, _Inverted); + buffer.DrawMesh(_Mesh, transform.localToWorldMatrix, _ClipMaterial); + } + + void DrawDisplacement(Lod simulation, CommandBuffer buffer, RenderTargetIdentifier target, int pass = -1, float weight = 1, int slice = -1) + { + _AnimatedWavesMaterial.SetVector(LodInput.ShaderIDs.s_DisplacementAtInputPosition, _Displacement); + buffer.DrawMesh(_Mesh, transform.localToWorldMatrix, _AnimatedWavesMaterial); + } + + void SetQueue(int previous, int current) + { + if (previous == current) return; + if (_ClipInput == null || !isActiveAndEnabled) return; + if (UsesClip) ILodInput.Attach(_ClipInput, ClipLod.s_Inputs); + if (UsesDisplacement) ILodInput.Attach(_AnimatedWavesInput, AnimatedWavesLod.s_Inputs); + } + + void SetMode(WatertightHullMode previous, WatertightHullMode current) + { + if (previous == current) return; + OnDisable(); OnEnable(); + } + + void SetUseClipWithDisplacement(bool previous, bool current) + { + if (previous == current) return; + OnDisable(); OnEnable(); + } + +#if UNITY_EDITOR + [@OnChange] + void OnChange(string propertyPath, object previousValue) + { + switch (propertyPath) + { + case nameof(_Queue): + SetQueue((int)previousValue, _Queue); + break; + case nameof(_Mode): + SetMode((WatertightHullMode)previousValue, _Mode); + break; + case nameof(_UseClipWithDisplacement): + SetUseClipWithDisplacement((bool)previousValue, _UseClipWithDisplacement); + break; + } + } +#endif + } + + partial class WatertightHull + { + ClipInput _ClipInput; + + sealed class ClipInput : ILodInput + { + readonly WatertightHull _Input; + public ClipInput(WatertightHull input) => _Input = input; + public bool Enabled => _Input.Enabled; + public bool IsCompute => false; + public int Queue => _Input.Queue; + public int Pass => -1; + public Rect Rect => _Input.Rect; + public MonoBehaviour Component => _Input; + public float Filter(WaterRenderer water, int slice) => 1f; + public void Draw(Lod lod, CommandBuffer buffer, RenderTargetIdentifier target, int pass = -1, float weight = 1, int slice = -1) => _Input.DrawClip(lod, buffer, target, pass, weight, slice); + } + } + + partial class WatertightHull + { + DisplacementInput _AnimatedWavesInput; + + sealed class DisplacementInput : ILodInput + { + readonly WatertightHull _Input; + public DisplacementInput(WatertightHull input) => _Input = input; + public bool Enabled => _Input.Enabled; + public bool IsCompute => false; + public int Queue => _Input.Queue; + public int Pass => (int)DisplacementPass.LodIndependentLast; + public Rect Rect => _Input.Rect; + public MonoBehaviour Component => _Input; + public float Filter(WaterRenderer water, int slice) => 1f; + public void Draw(Lod lod, CommandBuffer buffer, RenderTargetIdentifier target, int pass = -1, float weight = 1, int slice = -1) => _Input.DrawDisplacement(lod, buffer, target, pass, weight, slice); + } + } + + partial class WatertightHull : ISerializationCallbackReceiver + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 1; +#pragma warning restore 414 + + /// + void ISerializationCallbackReceiver.OnAfterDeserialize() + { + if (_Version < 1) + { + // Keep clip for existing. + _Mode = WatertightHullMode.Clip; + _Version = 1; + } + } + + /// + void ISerializationCallbackReceiver.OnBeforeSerialize() + { + + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/WatertightHull.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/WatertightHull.cs.meta new file mode 100644 index 000000000..802901f31 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Input/WatertightHull.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5ba152b967dd345829964814e3b3a4e6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/LevelLod.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/LevelLod.cs new file mode 100644 index 000000000..f90e4967d --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/LevelLod.cs @@ -0,0 +1,56 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// We do not add height to displacement directly for better precision and layering. + +using UnityEngine; +using UnityEngine.Experimental.Rendering; +using WaveHarmonic.Crest.Utility; + +namespace WaveHarmonic.Crest +{ + /// + /// Data that gives the water level (water height at rest and gradients). + /// + public sealed partial class LevelLod : Lod + { + // Purple/Indigo + internal static readonly Color s_GizmoColor = new(75f / 255f, 0f, 130f / 255f, 0.5f); + + internal override string ID => "Level"; + internal override Color GizmoColor => s_GizmoColor; + private protected override Color ClearColor => Color.black; + private protected override bool NeedToReadWriteTextureData => true; + internal override bool RunsInHeadless => true; + + private protected override GraphicsFormat RequestedTextureFormat => _TextureFormatMode switch + { + LodTextureFormatMode.Automatic => Water == null ? GraphicsFormat.None : Water.AnimatedWavesLod.TextureFormatMode switch + { + LodTextureFormatMode.Precision => GraphicsFormat.R32_SFloat, + _ => GraphicsFormat.R16_SFloat, + }, + LodTextureFormatMode.Performance => GraphicsFormat.R16_SFloat, + LodTextureFormatMode.Precision => GraphicsFormat.R32_SFloat, + LodTextureFormatMode.Manual => _TextureFormat, + _ => throw new System.NotImplementedException(), + }; + + internal LevelLod() + { + _Enabled = false; + _OverrideResolution = false; + _TextureFormatMode = LodTextureFormatMode.Automatic; + _TextureFormat = GraphicsFormat.R16_SFloat; + } + + internal static readonly SortedList s_Inputs = new(Helpers.DuplicateComparison); + private protected override SortedList Inputs => s_Inputs; + + [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)] + static void OnLoad() + { + s_Inputs.Clear(); + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/LevelLod.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/LevelLod.cs.meta new file mode 100644 index 000000000..6dccd64ef --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/LevelLod.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0d555bea1d2da4c5c969a1d7775ea781 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Lod.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Lod.cs new file mode 100644 index 000000000..323028631 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Lod.cs @@ -0,0 +1,666 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using UnityEngine.Experimental.Rendering; +using UnityEngine.Rendering; +using WaveHarmonic.Crest.Internal; +using WaveHarmonic.Crest.Utility; + +#if !UNITY_2023_2_OR_NEWER +using GraphicsFormatUsage = UnityEngine.Experimental.Rendering.FormatUsage; +#endif + +namespace WaveHarmonic.Crest +{ + using Inputs = SortedList; + + /// + /// Texture format preset. + /// + public enum LodTextureFormatMode + { + /// + /// Uses . + /// + Manual, + + /// + /// Chooses a texture format for performance. + /// + Performance = 100, + + /// + /// Chooses a texture format for precision. + /// + /// + /// This format can reduce artifacts. + /// + Precision = 200, + + /// + /// Chooses a texture format based on another. + /// + /// + /// For example, Dynamic Waves will match precision of Animated Waves. + /// + Automatic = 300, + } + + /// + /// Base class for data/behaviours created on each LOD. + /// + [System.Serializable] + public abstract partial class Lod + { + [Tooltip("Whether the simulation is enabled.")] + [@GenerateAPI(Getter.Custom, Setter.Custom)] + [@DecoratedField, SerializeField] + internal bool _Enabled; + + [Tooltip("Whether to override the resolution.\n\nIf not enabled, then the simulation will use the resolution defined on the Water Renderer.")] + [@Predicated(typeof(AnimatedWavesLod), inverted: true, hide: true)] + [@GenerateAPI(Setter.Dirty)] + [@DecoratedField, SerializeField] + internal bool _OverrideResolution = true; + + [Tooltip("The resolution of the simulation data.\n\nSet higher for sharper results at the cost of higher memory usage.")] + [@Predicated(typeof(AnimatedWavesLod), inverted: true, hide: true)] + [@Delayed] + [@GenerateAPI(Getter.Custom, Setter.Dirty)] + [SerializeField] + internal int _Resolution = 256; + + [Tooltip("Chooses a texture format based on a preset value.")] + [@Filtered] + [@GenerateAPI(Setter.Dirty)] + [SerializeField] + private protected LodTextureFormatMode _TextureFormatMode = LodTextureFormatMode.Performance; + + [Tooltip("The render texture format used for this simulation data.\n\nIt will be overriden if the format is incompatible with the platform.")] + [@ShowComputedProperty(nameof(RequestedTextureFormat))] + [@Predicated(nameof(_TextureFormatMode), inverted: true, nameof(LodTextureFormatMode.Manual), hide: true)] + [@GenerateAPI(Setter.Dirty)] + [@DecoratedField, SerializeField] + internal GraphicsFormat _TextureFormat; + + // NOTE: This MUST match the value in Constants.hlsl, as it + // determines the size of the texture arrays in the shaders. + internal const int k_MaximumSlices = 15; + + // NOTE: these MUST match the values in Constants.hlsl + // 64 recommended as a good common minimum: https://www.reddit.com/r/GraphicsProgramming/comments/aeyfkh/for_compute_shaders_is_there_an_ideal_numthreads/ + internal const int k_ThreadGroupSize = 8; + internal const int k_ThreadGroupSizeX = k_ThreadGroupSize; + internal const int k_ThreadGroupSizeY = k_ThreadGroupSize; + + internal static class ShaderIDs + { + public static readonly int s_LodIndex = Shader.PropertyToID("_Crest_LodIndex"); + public static readonly int s_LodChange = Shader.PropertyToID("_Crest_LodChange"); + } + + // Used for creating shader property names etc. + internal abstract string ID { get; } + internal virtual string Name => ID; + + /// + /// The requested texture format used for this simulation, either by manual mode or + /// one of the aliases. It will be overriden if the format is incompatible with the + /// platform (). + /// + private protected abstract GraphicsFormat RequestedTextureFormat { get; } + + /// + /// This is the platform compatible texture format that will used. + /// + public GraphicsFormat CompatibleTextureFormat { get; private set; } + + private protected abstract Color ClearColor { get; } + private protected abstract bool NeedToReadWriteTextureData { get; } + private protected abstract Inputs Inputs { get; } + internal abstract Color GizmoColor { get; } + internal virtual int BufferCount => 1; + private protected virtual Texture2DArray NullTexture => BlackTextureArray; + private protected virtual bool RequiresClearBorder => false; + + private protected IQueryable Queryable { get; set; } + + // This is used as alternative to Texture2D.blackTexture, as using that + // is not possible in some shaders. + static Texture2DArray s_BlackTextureArray = null; + static Texture2DArray BlackTextureArray + { + get + { + if (s_BlackTextureArray == null) + { + s_BlackTextureArray = TextureArrayHelpers.CreateTexture2DArray(Texture2D.blackTexture, k_MaximumSlices); + s_BlackTextureArray.name = "_Crest_LodBlackTexture"; + } + + return s_BlackTextureArray; + } + } + + static readonly GraphicsFormatUsage s_GraphicsFormatUsage = + // Ensures a non compressed format is returned. + GraphicsFormatUsage.LoadStore | + // All these textures are sampled at some point. + GraphicsFormatUsage.Sample | + // Always use linear filtering. + GraphicsFormatUsage.Linear; + + internal virtual bool RunsInHeadless => false; + + private protected BufferedData _Targets; + internal RenderTexture DataTexture => _Targets.Current; + internal RenderTexture GetDataTexture(int frameDelta) => _Targets.Previous(frameDelta); + + private protected Matrix4x4[] _ViewMatrices = new Matrix4x4[k_MaximumSlices]; + private protected Cascade[] _Cascades = new Cascade[k_MaximumSlices]; + internal Cascade[] Cascades => _Cascades; + private protected BufferedData _SamplingParameters; + + internal int Slices => _Water.LodLevels; + + // Currently use as a failure flag. + private protected bool _Valid; + + internal WaterRenderer _Water; + internal WaterRenderer Water => _Water; + + private protected int _TargetsToClear; + + private protected readonly int _TextureShaderID; + private protected readonly int _TextureSourceShaderID; + private protected readonly int _SamplingParametersShaderID; + private protected readonly int _SamplingParametersCascadeShaderID; + private protected readonly int _SamplingParametersCascadeSourceShaderID; + + readonly string _TextureName; + + internal Lod() + { + // @Garbage + var name = $"g_Crest_Cascade{ID}"; + _TextureShaderID = Shader.PropertyToID(name); + _TextureSourceShaderID = Shader.PropertyToID($"{name}Source"); + _SamplingParametersShaderID = Shader.PropertyToID($"g_Crest_SamplingParameters{ID}"); + _SamplingParametersCascadeShaderID = Shader.PropertyToID($"g_Crest_SamplingParametersCascade{ID}"); + _SamplingParametersCascadeSourceShaderID = Shader.PropertyToID($"g_Crest_SamplingParametersCascade{ID}Source"); + + _TextureName = $"_Crest_{ID}Lod"; + } + + private protected RenderTexture CreateLodDataTextures() + { + RenderTexture result = new(Resolution, Resolution, 0, CompatibleTextureFormat) + { + wrapMode = TextureWrapMode.Clamp, + antiAliasing = 1, + filterMode = FilterMode.Bilinear, + anisoLevel = 0, + useMipMap = false, + name = _TextureName, + dimension = TextureDimension.Tex2DArray, + volumeDepth = Slices, + enableRandomWrite = NeedToReadWriteTextureData + }; + result.Create(); + return result; + } + + private protected void FlipBuffers() + { + if (_ReAllocateTexture) + { + ReAllocate(); + } + + _Targets.Flip(); + _SamplingParameters.Flip(); + + UpdateSamplingParameters(); + } + + private protected void Clear(RenderTexture target) + { + Helpers.ClearRenderTexture(target, ClearColor, depth: false); + } + + /// + /// Clears persistent LOD data. Some simulations have persistent data which can linger for a little while after + /// being disabled. This will manually clear that data. + /// + internal virtual void ClearLodData() + { + // Empty. + } + + private protected virtual bool AlwaysClear => false; + + // Only works with input-only data (ie no simulation steps). + internal virtual void BuildCommandBuffer(WaterRenderer water, CommandBuffer buffer) + { + FlipBuffers(); + + buffer.BeginSample(Name); + + if (_TargetsToClear > 0 || AlwaysClear) + { + buffer.SetRenderTarget(DataTexture, 0, CubemapFace.Unknown, -1); + buffer.ClearRenderTarget(RTClearFlags.Color, ClearColor, 0, 0); + + _TargetsToClear--; + } + + if (Inputs.Count > 0) + { + SubmitDraws(buffer, Inputs, DataTexture); + + // Ensure all targets clear when there are no inputs. + _TargetsToClear = _Targets.Size; + } + + if (RequiresClearBorder) + { + ClearBorder(buffer); + } + + Queryable?.UpdateQueries(_Water); + + buffer.EndSample(Name); + } + + private protected bool SubmitDraws(CommandBuffer buffer, Inputs draws, RenderTargetIdentifier target, int pass = -1, bool filter = false) + { + var drawn = false; + + foreach (var draw in draws) + { + var input = draw.Value; + if (!input.Enabled) + { + continue; + } + + if (pass != -1) + { + var p = input.Pass; + if (p != -1 && p != pass) continue; + } + + var rect = input.Rect; + + if (input.IsCompute) + { + var smallest = 0; + if (rect != Rect.zero) + { + smallest = -1; + for (var slice = Slices - 1; slice >= 0; slice--) + { + if (rect != Rect.zero && !rect.Overlaps(Cascades[slice].TexelRect)) break; + smallest = slice; + } + + if (smallest < 0) continue; + } + + // Pass the slice count to only draw to valid slices. + input.Draw(this, buffer, target, pass, slice: Slices - smallest); + drawn = true; + continue; + } + + for (var slice = Slices - 1; slice >= 0; slice--) + { + if (rect != Rect.zero && !rect.Overlaps(Cascades[slice].TexelRect)) break; + + var weight = filter ? input.Filter(_Water, slice) : 1f; + if (weight <= 0f) continue; + + // Parameters override RTI values: + // https://docs.unity3d.com/ScriptReference/Rendering.CommandBuffer.SetRenderTarget.html + buffer.SetRenderTarget(target, 0, CubemapFace.Unknown, slice); + buffer.SetGlobalInt(ShaderIDs.s_LodIndex, slice); + + // This will work for CG but not for HDRP hlsl files. + buffer.SetViewProjectionMatrices(_ViewMatrices[slice], _Water.GetProjectionMatrix(slice)); + + input.Draw(this, buffer, target, pass, weight, slice); + drawn = true; + } + } + + return drawn; + } + + /// + /// Set a new origin. This is equivalent to subtracting the new origin position from any world position state. + /// + internal void SetOrigin(Vector3 newOrigin) + { + _SamplingParameters.RunLambda(data => + { + for (var index = 0; index < _Water.LodLevels; index++) + { + // We really only care about the previous states, as the current/next frame will be + // re-calculated. This realigns the snapped position with the now shifted camera. + data[index].x -= newOrigin.x; + data[index].y -= newOrigin.z; + } + }); + } + + void ClearBorder(CommandBuffer buffer) + { + var size = Resolution / 8; + + var wrapper = new PropertyWrapperCompute(buffer, WaterResources.Instance.Compute._Clear, 1); + wrapper.SetTexture(Crest.ShaderIDs.s_Target, DataTexture); + wrapper.SetVector(Crest.ShaderIDs.s_ClearColor, ClearColor); + wrapper.SetInteger(Crest.ShaderIDs.s_Resolution, Resolution); + wrapper.SetInteger(Crest.ShaderIDs.s_TargetSlice, Slices - 1); + wrapper.Dispatch(size, 1, 1); + + wrapper = new PropertyWrapperCompute(buffer, WaterResources.Instance.Compute._Clear, 2); + wrapper.SetTexture(Crest.ShaderIDs.s_Target, DataTexture); + wrapper.SetVector(Crest.ShaderIDs.s_ClearColor, ClearColor); + wrapper.SetInteger(Crest.ShaderIDs.s_Resolution, Resolution); + wrapper.SetInteger(Crest.ShaderIDs.s_TargetSlice, Slices - 1); + wrapper.Dispatch(1, size, 1); + } + + void UpdateSamplingParameters() + { + for (var slice = 0; slice < Slices; slice++) + { + // Find snap period. + var texel = 2f * 2f * _Water.CalcLodScale(slice) / Resolution; + // Snap so that shape texels are stationary. + var snapped = _Water.Root.position - new Vector3(Mathf.Repeat(_Water.Root.position.x, texel), 0, Mathf.Repeat(_Water.Root.position.z, texel)); + + var cascade = new Cascade(snapped.XZ(), texel, Resolution); + _Cascades[slice] = cascade; + _SamplingParameters.Current[slice] = cascade.Packed; + + _ViewMatrices[slice] = WaterRenderer.CalculateViewMatrixFromSnappedPositionRHS(snapped); + } + + Shader.SetGlobalVector(_SamplingParametersShaderID, new(_Water.LodLevels, Resolution, 1f / Resolution, 0)); + Shader.SetGlobalVectorArray(_SamplingParametersCascadeShaderID, _SamplingParameters.Current); + + if (BufferCount > 1) + { + Shader.SetGlobalVectorArray(_SamplingParametersCascadeSourceShaderID, _SamplingParameters.Previous(1)); + } + } + + /// + /// Returns index of lod that completely covers the sample area. If no such lod + /// available, returns -1. + /// + internal int SuggestIndex(Rect sampleArea) + { + for (var slice = 0; slice < Slices; slice++) + { + var cascade = _Cascades[slice]; + + // Shape texture needs to completely contain sample area. + var rect = cascade.TexelRect; + + // Shrink rect by 1 texel border - this is to make finite differences fit as well. + var texel = cascade._Texel; + rect.x += texel; rect.y += texel; + rect.width -= 2f * texel; rect.height -= 2f * texel; + + if (!rect.Contains(sampleArea.min) || !rect.Contains(sampleArea.max)) + { + continue; + } + + return slice; + } + + return -1; + } + + /// + /// Returns index of lod that completely covers the sample area, and contains + /// wavelengths that repeat no more than twice across the smaller spatial length. If + /// no such lod available, returns -1. This means high frequency wavelengths are + /// filtered out, and the lod index can be used for each sample in the sample area. + /// + internal int SuggestIndexForWaves(Rect sampleArea) + { + return SuggestIndexForWaves(sampleArea, Mathf.Min(sampleArea.width, sampleArea.height)); + } + + internal int SuggestIndexForWaves(Rect sampleArea, float minimumSpatialLength) + { + var count = Slices; + + for (var index = 0; index < count; index++) + { + var cascade = _Cascades[index]; + + // Shape texture needs to completely contain sample area. + var rect = cascade.TexelRect; + + // Shrink rect by 1 texel border - this is to make finite differences fit as well. + var texel = cascade._Texel; + rect.x += texel; rect.y += texel; + rect.width -= 2f * texel; rect.height -= 2f * texel; + + if (!rect.Contains(sampleArea.min) || !rect.Contains(sampleArea.max)) + { + continue; + } + + // The smallest wavelengths should repeat no more than twice across the smaller + // spatial length. Unless we're in the last LOD - then this is the best we can do. + var minimumWavelength = _Water.MaximumWavelength(index) / 2f; + if (minimumWavelength < minimumSpatialLength / 2f && index < count - 1) + { + continue; + } + + return index; + } + + return -1; + } + + /// + /// Bind data needed to load or compute from this simulation. + /// + internal virtual void Bind(T target) where T : IPropertyWrapper + { + + } + + internal virtual void Initialize() + { + // All simulations require a GPU so do not proceed any further. + if (_Water.IsRunningWithoutGraphics) + { + _Valid = false; + return; + } + + // Some simulations are pointless in non-interactive mode. + if (_Water.IsRunningHeadless && !RunsInHeadless) + { + _Valid = false; + return; + } + + // Validate textures. + { + // Find a compatible texture format. + CompatibleTextureFormat = Helpers.GetCompatibleTextureFormat(RequestedTextureFormat, s_GraphicsFormatUsage, Name, NeedToReadWriteTextureData); + + if (CompatibleTextureFormat == GraphicsFormat.None) + { + Debug.Log($"Crest: Disabling {Name} simulation due to no valid available texture format."); + _Valid = false; + return; + } + + Debug.Assert(Slices <= k_MaximumSlices); + } + + _Valid = true; + + Allocate(); + } + + internal virtual void SetGlobals(bool enable) + { + if (_Water.IsRunningWithoutGraphics) return; + // Bind/unbind data texture for all shaders. + Shader.SetGlobalTexture(_TextureShaderID, enable && Enabled ? DataTexture : NullTexture); + } + + internal virtual void Enable() + { + // Blank + } + + internal virtual void Disable() + { + // Always clean up provider (CPU may be running). + Queryable?.CleanUp(); + } + + internal virtual void Destroy() + { + // Release resources and destroy object to avoid reference leak. + _Targets?.RunLambda(x => + { + if (x != null) x.Release(); + Helpers.Destroy(x); + }); + } + + private protected virtual void Allocate() + { + _Targets = new(BufferCount, CreateLodDataTextures); + _Targets.RunLambda(Clear); + + _SamplingParameters = new(BufferCount, () => new Vector4[k_MaximumSlices]); + + // Bind globally once here on init, which will bind to all graphics shaders (not compute) + Shader.SetGlobalTexture(_TextureShaderID, DataTexture); + + _ReAllocateTexture = false; + } + + bool GetEnabled() => _Enabled && _Valid; + + // NOTE: This could be called by the user due to API. + void SetEnabled(bool previous, bool current) + { + if (previous == current) return; + if (_Water == null || !_Water.isActiveAndEnabled) return; + + if (current) + { + Initialize(); + Enable(); + } + else + { + Disable(); + Destroy(); + } + + SetGlobals(current); + } + + int GetResolution() => _OverrideResolution ? _Resolution : Water.LodResolution; + + private protected void ReAllocate() + { + if (!Enabled) return; + CompatibleTextureFormat = Helpers.GetCompatibleTextureFormat(RequestedTextureFormat, s_GraphicsFormatUsage, Name, NeedToReadWriteTextureData); + var descriptor = _Targets.Current.descriptor; + descriptor.height = descriptor.width = Resolution; + descriptor.graphicsFormat = CompatibleTextureFormat; + _Targets.RunLambda(texture => + { + texture.Release(); + texture.descriptor = descriptor; + texture.Create(); + }); + + _ReAllocateTexture = false; + } + +#if UNITY_EDITOR + [@OnChange] + private protected virtual void OnChange(string propertyPath, object previousValue) + { + switch (propertyPath) + { + case nameof(_Enabled): + SetEnabled((bool)previousValue, _Enabled); + break; + case nameof(_Resolution): + case nameof(_OverrideResolution): + case nameof(_TextureFormat): + case nameof(_TextureFormatMode): + ReAllocate(); + break; + } + } +#endif + } + + // API + partial class Lod + { + bool _ReAllocateTexture; + + void SetDirty(I previous, I current) where I : System.IEquatable + { + if (Equals(previous, current)) return; + _ReAllocateTexture = true; + } + + void SetDirty(System.Enum previous, System.Enum current) + { + if (previous == current) return; + _ReAllocateTexture = true; + } + } + + /// + /// Base type for simulations with a provider. + /// + /// The query provider. + public abstract class Lod : Lod where T : IQueryProvider + { + /// + /// Provides data from the GPU to CPU. + /// + public T Provider { get; set; } + private protected abstract T CreateProvider(bool enable); + + internal override void SetGlobals(bool enable) + { + base.SetGlobals(enable); + // We should always have a provider (null provider if disabled). + InitializeProvider(enable); + } + + private protected void InitializeProvider(bool enable) + { + Provider = CreateProvider(enable); + // None providers are not IQueryable. + Queryable = Provider as IQueryable; + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Lod.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Lod.cs.meta new file mode 100644 index 000000000..46d3e6229 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Lod.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d523fdd33748548f0a78d6412c5420ce +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/PersistentLod.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/PersistentLod.cs new file mode 100644 index 000000000..a9765c356 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/PersistentLod.cs @@ -0,0 +1,181 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using UnityEngine.Rendering; + +namespace WaveHarmonic.Crest +{ + /// + /// A persistent simulation that moves around with a displacement LOD. + /// + public abstract partial class PersistentLod : Lod + { + [Tooltip("Frequency to run the simulation, in updates per second.\n\nLower frequencies are more efficient but may lead to visible jitter or slowness.")] + [@Range(15, 200, order = -1000)] + [@GenerateAPI] + [SerializeField] + private protected int _SimulationFrequency = 60; + + static new class ShaderIDs + { + public static readonly int s_SimDeltaTime = Shader.PropertyToID("_Crest_SimDeltaTime"); + public static readonly int s_SimDeltaTimePrev = Shader.PropertyToID("_Crest_SimDeltaTimePrev"); + public static readonly int s_TemporaryPersistentTarget = Shader.PropertyToID("_Crest_TemporaryPersistentTarget"); + } + + private protected override bool NeedToReadWriteTextureData => true; + internal override int BufferCount => 2; + + float _PreviousSubstepDeltaTime = 1f / 60f; + + // Is this the first step since being enabled? + private protected bool _NeedsPrewarmingThisStep = true; + + // This is how far the simulation time is behind Unity's time. + private protected float _TimeToSimulate = 0f; + + internal int LastUpdateSubstepCount { get; private set; } + + private protected abstract ComputeShader SimulationShader { get; } + private protected abstract void GetSubstepData(float timeToSimulate, out int substeps, out float delta); + + internal override void Initialize() + { + if (SimulationShader == null) + { + _Valid = false; + return; + } + + base.Initialize(); + + _NeedsPrewarmingThisStep = true; + } + + internal override void ClearLodData() + { + base.ClearLodData(); + _Targets.RunLambda(x => Clear(x)); + } + + internal override void BuildCommandBuffer(WaterRenderer water, CommandBuffer buffer) + { + buffer.BeginSample(Name); + + FlipBuffers(); + + var slices = water.LodLevels; + + // How far are we behind. + _TimeToSimulate += water.DeltaTime; + + // Do a set of substeps to catch up. + GetSubstepData(_TimeToSimulate, out var substeps, out var delta); + + LastUpdateSubstepCount = substeps; + + // Even if no steps were needed this frame, the simulation still needs to advect to + // compensate for camera motion / water scale changes, so do a trivial substep. + // This could be a specialised kernel that only advects, or the simulation shader + // could have a branch for 0 delta time. + if (substeps == 0) + { + substeps = 1; + delta = 0f; + } + + if (substeps > 1) + { + // No need to clear, as the update dispatch overwrites every pixel, but finding + // artifacts if not and there is a renderer input. Happens for foam and dynamic + // waves. Confusing/concerning. + buffer.GetTemporaryRT(ShaderIDs.s_TemporaryPersistentTarget, DataTexture.descriptor); + buffer.SetRenderTarget(ShaderIDs.s_TemporaryPersistentTarget, 0, CubemapFace.Unknown, -1); + buffer.ClearRenderTarget(RTClearFlags.Color, ClearColor, 0, 0); + } + + var target = new RenderTargetIdentifier(DataTexture); + var source = new RenderTargetIdentifier(ShaderIDs.s_TemporaryPersistentTarget); + var current = target; + + for (var substep = 0; substep < substeps; substep++) + { + var isFirstStep = substep == 0; + var frame = isFirstStep ? 1 : 0; + var wrapper = new PropertyWrapperCompute(buffer, SimulationShader, 0); + + // Record how much we caught up + _TimeToSimulate -= delta; + + // Buffers are already flipped, but we need to ping-pong for subsequent substeps. + if (!isFirstStep) + { + // Use temporary target for ping-pong instead of flipping buffer. We do not want + // to buffer substeps as they will not match buffered cascade data etc. Each buffer + // entry must be for a single frame and substeps are "sub-frame". + (source, target) = (target, source); + } + else + { + // We only want to handle teleports for the first step. + _NeedsPrewarmingThisStep = _NeedsPrewarmingThisStep || _Water._HasTeleportedThisFrame; + } + + // Both simulation update and input draws need delta time. + buffer.SetGlobalFloat(ShaderIDs.s_SimDeltaTime, delta); + buffer.SetGlobalFloat(ShaderIDs.s_SimDeltaTimePrev, _PreviousSubstepDeltaTime); + + wrapper.SetTexture(Crest.ShaderIDs.s_Target, target); + wrapper.SetTexture(_TextureSourceShaderID, isFirstStep ? _Targets.Previous(1) : source); + + // Compute which LOD data we are sampling source data from. if a scale change has + // happened this can be any LOD up or down the chain. This is only valid on the + // first update step, after that the scale source/target data are in the right + // places. + wrapper.SetFloat(Lod.ShaderIDs.s_LodChange, isFirstStep ? _Water.ScaleDifferencePower2 : 0); + + wrapper.SetVectorArray(WaterRenderer.ShaderIDs.s_CascadeDataSource, _Water._CascadeData.Previous(frame)); + wrapper.SetVectorArray(_SamplingParametersCascadeSourceShaderID, _SamplingParameters.Previous(frame)); + + SetAdditionalSimulationParameters(wrapper); + + var threads = Resolution / k_ThreadGroupSize; + wrapper.Dispatch(threads, threads, Slices); + + // Only add forces if we did a step. + if (delta > 0f) + { + SubmitDraws(buffer, Inputs, target); + } + + // The very first step since being enabled. + _NeedsPrewarmingThisStep = false; + _PreviousSubstepDeltaTime = delta; + } + + // Swap textures if needed. + if (target != current) + { + buffer.CopyTexture(target, DataTexture); + } + + if (substeps > 1) + { + buffer.ReleaseTemporaryRT(ShaderIDs.s_TemporaryPersistentTarget); + } + + // Set the target texture as to make sure we catch the 'pong' each frame. + Shader.SetGlobalTexture(_TextureShaderID, DataTexture); + + buffer.EndSample(Name); + } + + /// + /// Set any simulation specific shader parameters. + /// + private protected virtual void SetAdditionalSimulationParameters(T properties) where T : IPropertyWrapper + { + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/PersistentLod.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/PersistentLod.cs.meta new file mode 100644 index 000000000..b70f03b94 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/PersistentLod.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a33890a171f8e4118b7bdcd3776449d3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query.meta new file mode 100644 index 000000000..2a78ae9a8 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ebdcedc44819444f581a6345b643e8b3 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Collision.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Collision.meta new file mode 100644 index 000000000..4c79139c0 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Collision.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 53c547efc6e8b4d068d60adf2aae4695 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Collision/CollisionAreaVisualizer.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Collision/CollisionAreaVisualizer.cs new file mode 100644 index 000000000..dfd3b922c --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Collision/CollisionAreaVisualizer.cs @@ -0,0 +1,143 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using WaveHarmonic.Crest.Internal; + +namespace WaveHarmonic.Crest +{ + /// + /// Debug draw crosses in an area around the GameObject on the water surface. + /// + [@ExecuteDuringEditMode] + [AddComponentMenu(Constants.k_MenuPrefixDebug + "Collision Area Visualizer")] + sealed class CollisionAreaVisualizer : ManagedBehaviour + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + + [Tooltip(ICollisionProvider.k_LayerTooltip)] + [SerializeField] + internal CollisionLayer _Layer; + + [SerializeField] + float _ObjectWidth = 0f; + + [SerializeField] + float _StepSize = 5f; + + [SerializeField] + int _Steps = 10; + + [SerializeField] + bool _UseDisplacements; + + [SerializeField] + bool _UseNormals; + + float[] _ResultHeights; + Vector3[] _ResultDisplacements; + Vector3[] _ResultNormals; + Vector3[] _SamplePositions; + + private protected override System.Action OnUpdateMethod => OnUpdate; + void OnUpdate(WaterRenderer water) + { + if (water.AnimatedWavesLod.Provider == null) + { + return; + } + + if (_ResultHeights == null || _ResultHeights.Length != _Steps * _Steps) + { + _ResultHeights = new float[_Steps * _Steps]; + } + if (_ResultDisplacements == null || _ResultDisplacements.Length != _Steps * _Steps) + { + _ResultDisplacements = new Vector3[_Steps * _Steps]; + } + if (_ResultNormals == null || _ResultNormals.Length != _Steps * _Steps) + { + _ResultNormals = new Vector3[_Steps * _Steps]; + + for (var i = 0; i < _ResultNormals.Length; i++) + { + _ResultNormals[i] = Vector3.up; + } + } + if (_SamplePositions == null || _SamplePositions.Length != _Steps * _Steps) + { + _SamplePositions = new Vector3[_Steps * _Steps]; + } + + var collProvider = water.AnimatedWavesLod.Provider; + + for (var i = 0; i < _Steps; i++) + { + for (var j = 0; j < _Steps; j++) + { + _SamplePositions[j * _Steps + i] = new(((i + 0.5f) - _Steps / 2f) * _StepSize, 0f, ((j + 0.5f) - _Steps / 2f) * _StepSize); + _SamplePositions[j * _Steps + i].x += transform.position.x; + _SamplePositions[j * _Steps + i].z += transform.position.z; + } + } + + if (_UseDisplacements) + { + if (collProvider.RetrieveSucceeded(collProvider.Query(GetHashCode(), _ObjectWidth, _SamplePositions, _ResultDisplacements, _UseNormals ? _ResultNormals : null, null, _Layer))) + { + for (var i = 0; i < _Steps; i++) + { + for (var j = 0; j < _Steps; j++) + { + var result = _SamplePositions[j * _Steps + i]; + result.y = water.SeaLevel; + result += _ResultDisplacements[j * _Steps + i]; + + var norm = _UseNormals ? _ResultNormals[j * _Steps + i] : Vector3.up; + + DebugDrawCross(result, norm, Mathf.Min(_StepSize / 4f, 1f), Color.green); + } + } + } + } + else + { + if (collProvider.RetrieveSucceeded(collProvider.Query(GetHashCode(), _ObjectWidth, _SamplePositions, _ResultHeights, _UseNormals ? _ResultNormals : null, null, _Layer))) + { + for (var i = 0; i < _Steps; i++) + { + for (var j = 0; j < _Steps; j++) + { + var result = _SamplePositions[j * _Steps + i]; + result.y = _ResultHeights[j * _Steps + i]; + + var norm = _UseNormals ? _ResultNormals[j * _Steps + i] : Vector3.up; + + DebugDrawCross(result, norm, Mathf.Min(_StepSize / 4f, 1f), Color.green); + } + } + } + } + } + + public static void DebugDrawCross(Vector3 pos, float r, Color col, float duration = 0f) + { + Debug.DrawLine(pos - Vector3.up * r, pos + Vector3.up * r, col, duration); + Debug.DrawLine(pos - Vector3.right * r, pos + Vector3.right * r, col, duration); + Debug.DrawLine(pos - Vector3.forward * r, pos + Vector3.forward * r, col, duration); + } + + public static void DebugDrawCross(Vector3 pos, Vector3 up, float r, Color col, float duration = 0f) + { + up.Normalize(); + var right = Vector3.Normalize(Vector3.Cross(up, Vector3.forward)); + var forward = Vector3.Cross(up, right); + Debug.DrawLine(pos - up * r, pos + up * r, col, duration); + Debug.DrawLine(pos - right * r, pos + right * r, col, duration); + Debug.DrawLine(pos - forward * r, pos + forward * r, col, duration); + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Collision/CollisionAreaVisualizer.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Collision/CollisionAreaVisualizer.cs.meta new file mode 100644 index 000000000..d6668dc89 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Collision/CollisionAreaVisualizer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 02e47243a77e64c84b8a2d351386a074 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Collision/CollisionProvider.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Collision/CollisionProvider.cs new file mode 100644 index 000000000..2bc43cc94 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Collision/CollisionProvider.cs @@ -0,0 +1,82 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// NOTE: DWP2 depends on this file. Any API changes need to be communicated to the DWP2 authors in advance. + +using UnityEngine; + +// Linter does not support mixing inheritdoc plus defining own parameters. +#pragma warning disable CS1573 // Parameter has no matching param tag in the XML comment (but other parameters do) + +namespace WaveHarmonic.Crest +{ + /// + /// A layer/event where queries are executed. + /// + public enum CollisionLayer + { + /// + /// Include all displacement. + /// + [Tooltip("Include all displacement.")] + Everything, + + /// + /// Only include Animated Waves. + /// + [Tooltip("Only include Animated Waves.")] + AfterAnimatedWaves, + + /// + /// Include Animated Waves and Dynamic Waves. + /// + [Tooltip("Include Animated Waves and Dynamic Waves.")] + AfterDynamicWaves, + } + + /// + /// Interface for an object that returns water surface displacement and height. + /// + public interface ICollisionProvider : IQueryProvider + { + internal const string k_LayerTooltip = "Which water collision layer to target."; + + internal static NoneProvider None { get; } = new(); + + /// + /// Gives a flat, still water. + /// + internal sealed class NoneProvider : ICollisionProvider + { + public int Query(int _0, float _1, Vector3[] _2, Vector3[] result0, Vector3[] result1, Vector3[] result2, CollisionLayer _3 = CollisionLayer.Everything) + { + if (result0 != null) System.Array.Fill(result0, Vector3.zero); + if (result1 != null) System.Array.Fill(result1, Vector3.up); + if (result2 != null) System.Array.Fill(result2, Vector3.zero); + return 0; + } + + public int Query(int _0, float _1, Vector3[] _2, float[] result0, Vector3[] result1, Vector3[] result2, CollisionLayer _3 = CollisionLayer.Everything) + { + if (result0 != null) System.Array.Fill(result0, WaterRenderer.Instance.SeaLevel); + if (result1 != null) System.Array.Fill(result1, Vector3.up); + if (result2 != null) System.Array.Fill(result2, Vector3.zero); + return 0; + } + } + + /// + /// Query water physical data at a set of points. Pass in null to any out parameters that are not required. + /// + /// Resulting heights (displacement Y + sea level) at the query positions. Pass null if this information is not required. + /// Resulting normals at the query positions. Pass null if this information is not required. + /// Resulting velocities at the query positions. Pass null if this information is not required. + /// + int Query(int hash, float minimumLength, Vector3[] points, float[] heights, Vector3[] normals, Vector3[] velocities, CollisionLayer layer = CollisionLayer.Everything); + + /// Resulting displacement vectors at the query positions. Add sea level to Y to get world space height. + /// + /// + int Query(int hash, float minimumLength, Vector3[] points, Vector3[] displacements, Vector3[] normals, Vector3[] velocities, CollisionLayer layer = CollisionLayer.Everything); + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Collision/CollisionProvider.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Collision/CollisionProvider.cs.meta new file mode 100644 index 000000000..621117cdd --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Collision/CollisionProvider.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 55075bf334a1445828a0ad179248fe9c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Collision/CollisionQuery.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Collision/CollisionQuery.cs new file mode 100644 index 000000000..5bddbf916 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Collision/CollisionQuery.cs @@ -0,0 +1,148 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; + +namespace WaveHarmonic.Crest +{ + /// + /// Samples water surface shape - displacement, height, normal, velocity. + /// + sealed class CollisionQuery : QueryBase, ICollisionProvider + { + public CollisionQuery(WaterRenderer water) : base(water) { } + protected override int Kernel => 0; + + public int Query(int ownerHash, float minSpatialLength, Vector3[] queryPoints, Vector3[] resultDisplacements, Vector3[] resultNormals, Vector3[] resultVelocities, CollisionLayer layer = CollisionLayer.Everything) + { + var result = (int)QueryStatus.OK; + + if (!UpdateQueryPoints(ownerHash, minSpatialLength, queryPoints, resultNormals != null ? queryPoints : null)) + { + result |= (int)QueryStatus.PostFailed; + } + + if (!RetrieveResults(ownerHash, resultDisplacements, null, resultNormals)) + { + result |= (int)QueryStatus.RetrieveFailed; + } + + if (resultVelocities != null) + { + result |= CalculateVelocities(ownerHash, resultVelocities); + } + + return result; + } + + public int Query(int ownerHash, float minimumSpatialLength, Vector3[] queryPoints, float[] resultHeights, Vector3[] resultNormals, Vector3[] resultVelocities, CollisionLayer layer = CollisionLayer.Everything) + { + var result = (int)QueryStatus.OK; + + if (!UpdateQueryPoints(ownerHash, minimumSpatialLength, queryPoints, resultNormals != null ? queryPoints : null)) + { + result |= (int)QueryStatus.PostFailed; + } + + if (!RetrieveResults(ownerHash, null, resultHeights, resultNormals)) + { + result |= (int)QueryStatus.RetrieveFailed; + } + + if (resultVelocities != null) + { + result |= CalculateVelocities(ownerHash, resultVelocities); + } + + return result; + } + } + + sealed class CollisionQueryWithPasses : ICollisionProvider, IQueryable + { + readonly CollisionQuery _AnimatedWaves; + readonly CollisionQuery _DynamicWaves; + readonly CollisionQuery _Displacement; + readonly WaterRenderer _Water; + + public int ResultGuidCount => _AnimatedWaves.ResultGuidCount + _DynamicWaves.ResultGuidCount + _Displacement.ResultGuidCount; + public int RequestCount => _AnimatedWaves.RequestCount + _DynamicWaves.RequestCount + _Displacement.RequestCount; + public int QueryCount => _AnimatedWaves.QueryCount + _DynamicWaves.QueryCount + _Displacement.QueryCount; + + public CollisionQueryWithPasses(WaterRenderer water) + { + _Water = water; + _AnimatedWaves = new(water); + _DynamicWaves = new(water); + _Displacement = new(water); + } + + // Gets the provider for the given layer, falling back to previous layer when needed. + CollisionQuery GetProvider(CollisionLayer layer) + { + var layers = _Water.AnimatedWavesLod._CollisionLayers; + + if (layers == CollisionLayers.Nothing) + { + return _Displacement; + } + + if (layer == CollisionLayer.Everything) + { + if (layers.HasFlag(CollisionLayers.Displacement)) + { + return _Displacement; + } + } + + if (layer >= CollisionLayer.AfterDynamicWaves) + { + if (layers.HasFlag(CollisionLayers.DynamicWaves) && _Water.DynamicWavesLod.Enabled) + { + return _DynamicWaves; + } + } + + return _AnimatedWaves; + } + + public int Query(int hash, float minimumLength, Vector3[] points, float[] heights, Vector3[] normals, Vector3[] velocities, CollisionLayer layer = CollisionLayer.Everything) + { + return GetProvider(layer).Query(hash, minimumLength, points, heights, normals, velocities); + } + + public int Query(int hash, float minimumLength, Vector3[] points, Vector3[] displacements, Vector3[] normals, Vector3[] velocities, CollisionLayer layer = CollisionLayer.Everything) + { + return GetProvider(layer).Query(hash, minimumLength, points, displacements, normals, velocities); + } + + public void UpdateQueries(WaterRenderer water, CollisionLayer layer) + { + switch (layer) + { + case CollisionLayer.Everything: _Displacement.UpdateQueries(water); break; + case CollisionLayer.AfterAnimatedWaves: _AnimatedWaves.UpdateQueries(water); break; + case CollisionLayer.AfterDynamicWaves: _DynamicWaves.UpdateQueries(water); break; + } + } + + public void UpdateQueries(WaterRenderer water) + { + _Displacement.UpdateQueries(water); + } + + public void CleanUp() + { + _AnimatedWaves.CleanUp(); + _DynamicWaves.CleanUp(); + _Displacement.CleanUp(); + } + } + + static partial class Extensions + { + public static void UpdateQueries(this ICollisionProvider self, WaterRenderer water, CollisionLayer layer) => (self as CollisionQueryWithPasses)?.UpdateQueries(water, layer); + public static void UpdateQueries(this ICollisionProvider self, WaterRenderer water) => (self as IQueryable)?.UpdateQueries(water); + public static void CleanUp(this ICollisionProvider self) => (self as IQueryable)?.CleanUp(); + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Collision/CollisionQuery.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Collision/CollisionQuery.cs.meta new file mode 100644 index 000000000..b447e606a --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Collision/CollisionQuery.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3cddd187674954ce1a0e2e19017a744a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Collision/RayTraceHelper.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Collision/RayTraceHelper.cs new file mode 100644 index 000000000..db8ace44f --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Collision/RayTraceHelper.cs @@ -0,0 +1,98 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; + +namespace WaveHarmonic.Crest +{ + /// + /// Helper to trace a ray against the water surface. + /// + /// + /// Works by sampling at a set of points along the ray and interpolating the + /// intersection location. + /// + public sealed class RayCastHelper : Internal.SampleHelper + { + readonly float _RayStepSize; + readonly float _MinimumLength; + + /// + /// The length of the ray and the step size must be given here. The smaller the step size, the greater the accuracy. + /// + /// Length of the ray. + /// Size of the step. With length the number of steps is computed. + public RayCastHelper(float rayLength, float rayStepSize = 2f) : base(ComputeQueryCount(rayLength, ref rayStepSize)) + { + _RayStepSize = rayStepSize; + // Waves go max double along min length. Thats too much - only allow half of a wave per step. + _MinimumLength = _RayStepSize * 4f; + } + + static int ComputeQueryCount(float rayLength, ref float rayStepSize) + { + Debug.Assert(rayLength > 0f); + Debug.Assert(rayStepSize > 0f); + + var stepCount = Mathf.CeilToInt(rayLength / rayStepSize) + 1; + + var maxStepCount = 128; + if (stepCount > maxStepCount) + { + stepCount = maxStepCount; + rayStepSize = rayLength / (stepCount - 1f); + Debug.LogWarning($"Crest: RayTraceHelper: ray steps exceed maximum ({maxStepCount}), step size increased to {rayStepSize} to reduce step count."); + } + + return stepCount; + } + + /// + /// Call this once each frame to do the query. + /// + /// World space position of ray origin + /// World space ray direction + /// The distance along the ray to the first intersection with the water surface. + /// The layer this ray targets. + /// True if the results have come back from the GPU, and if the ray intersects the water surface. + public bool RayCast(Vector3 origin, Vector3 direction, out float distance, CollisionLayer layer = CollisionLayer.Everything) + { + distance = -1f; + + Validate(allowMultipleCallsPerFrame: false); + + var water = WaterRenderer.Instance; + var provider = water == null ? null : water.AnimatedWavesLod.Provider; + if (provider == null) return false; + + for (var i = 0; i < _QueryPosition.Length; i++) + { + _QueryPosition[i] = origin + i * _RayStepSize * direction; + } + + var status = provider.Query(GetHashCode(), _MinimumLength, _QueryPosition, _QueryResult, null, null, layer); + + if (!provider.RetrieveSucceeded(status)) + { + return false; + } + + // Now that data is available, compare the height of the water to the height of each point of the ray. If + // the ray crosses the surface, the distance to the intersection is interpolated from the heights. + for (var i = 1; i < _QueryPosition.Length; i++) + { + var height0 = _QueryResult[i - 1].y + water.SeaLevel - _QueryPosition[i - 1].y; + var height1 = _QueryResult[i].y + water.SeaLevel - _QueryPosition[i].y; + + if (Mathf.Sign(height0) != Mathf.Sign(height1)) + { + var prop = Mathf.Abs(height0) / (Mathf.Abs(height0) + Mathf.Abs(height1)); + distance = (i - 1 + prop) * _RayStepSize; + break; + } + } + + return distance >= 0f; + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Collision/RayTraceHelper.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Collision/RayTraceHelper.cs.meta new file mode 100644 index 000000000..77172df50 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Collision/RayTraceHelper.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f1f458d6962ed46be8f00bdff45b2725 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Collision/RayTraceVisualizer.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Collision/RayTraceVisualizer.cs new file mode 100644 index 000000000..629bc1023 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Collision/RayTraceVisualizer.cs @@ -0,0 +1,44 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using WaveHarmonic.Crest.Internal; + +namespace WaveHarmonic.Crest +{ + /// + /// Debug draw a line trace from this gameobjects position, in this gameobjects forward direction. + /// + [@ExecuteDuringEditMode] + [AddComponentMenu(Constants.k_MenuPrefixDebug + "Ray Cast Visualizer")] + sealed class RayTraceVisualizer : ManagedBehaviour + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + + readonly RayCastHelper _RayCast = new(50f, 2f); + + private protected override System.Action OnUpdateMethod => OnUpdate; + void OnUpdate(WaterRenderer water) + { + if (water.AnimatedWavesLod.Provider == null) + { + return; + } + + // Even if only a single ray trace is desired, this still must be called every frame until it returns true + if (_RayCast.RayCast(transform.position, transform.forward, out var dist)) + { + var endPos = transform.position + transform.forward * dist; + Debug.DrawLine(transform.position, endPos, Color.green); + CollisionAreaVisualizer.DebugDrawCross(endPos, 2f, Color.green, 0f); + } + else + { + Debug.DrawLine(transform.position, transform.position + transform.forward * 50f, Color.red); + } + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Collision/RayTraceVisualizer.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Collision/RayTraceVisualizer.cs.meta new file mode 100644 index 000000000..9bb58c4bd --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Collision/RayTraceVisualizer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 159faa53a32b34aff9d79e974c14d100 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Depth.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Depth.meta new file mode 100644 index 000000000..2c012b27f --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Depth.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a9f84066852dc4c839cf39679aa347db +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Depth/DepthProvider.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Depth/DepthProvider.cs new file mode 100644 index 000000000..9df5c3458 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Depth/DepthProvider.cs @@ -0,0 +1,34 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; + +// Linter does not support mixing inheritdoc plus defining own parameters. +#pragma warning disable CS1573 // Parameter has no matching param tag in the XML comment (but other parameters do) + +namespace WaveHarmonic.Crest +{ + /// + /// Interface for an object that returns water depth and distance to water edge. + /// + public interface IDepthProvider : IQueryProvider + { + internal static NoneProvider None { get; } = new(); + + internal sealed class NoneProvider : IDepthProvider + { + public int Query(int _0, float _1, Vector3[] _2, Vector3[] result) + { + if (result != null) System.Array.Clear(result, 0, result.Length); + return 0; + } + } + + /// + /// Query water depth data at a set of points. + /// + /// Water depth and distance to shoreline (XY respectively). Both are signed. + /// + int Query(int hash, float minimumLength, Vector3[] points, Vector3[] results); + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Depth/DepthProvider.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Depth/DepthProvider.cs.meta new file mode 100644 index 000000000..eaa0bf20a --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Depth/DepthProvider.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8c8c76a0ab417499bb25ecea61560108 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Depth/DepthQuery.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Depth/DepthQuery.cs new file mode 100644 index 000000000..7f62dbae1 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Depth/DepthQuery.cs @@ -0,0 +1,30 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; + +namespace WaveHarmonic.Crest +{ + sealed class DepthQuery : QueryBase, IDepthProvider + { + public DepthQuery(WaterRenderer water) : base(water) { } + protected override int Kernel => 2; + + public override int Query(int hash, float minimumSpatialLength, Vector3[] queries, Vector3[] results) + { + var id = base.Query(hash, minimumSpatialLength, queries, results); + + // Infinity will become NaN. Convert back to infinity. + // Negative infinity should not happen. + for (var i = 0; i < results.Length; i++) + { + var value = results[i]; + if (float.IsNaN(value.x)) value.x = float.PositiveInfinity; + if (float.IsNaN(value.y)) value.y = float.PositiveInfinity; + results[i] = value; + } + + return id; + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Depth/DepthQuery.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Depth/DepthQuery.cs.meta new file mode 100644 index 000000000..a21e0fcf6 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Depth/DepthQuery.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 92350636082384718babd120eff1cbf0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Flow.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Flow.meta new file mode 100644 index 000000000..6c44f993c --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Flow.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cacd27cd27186443ba5376920b9fd300 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Flow/FlowProvider.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Flow/FlowProvider.cs new file mode 100644 index 000000000..7a23be980 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Flow/FlowProvider.cs @@ -0,0 +1,37 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; + +// Linter does not support mixing inheritdoc + defining own parameters. +#pragma warning disable CS1573 // Parameter has no matching param tag in the XML comment (but other parameters do) + +namespace WaveHarmonic.Crest +{ + /// + /// Interface for an object that returns water surface displacement and height. + /// + public interface IFlowProvider : IQueryProvider + { + internal static NoneProvider None { get; } = new(); + + /// + /// Gives a stationary water (no horizontal flow). + /// + internal sealed class NoneProvider : IFlowProvider + { + public int Query(int _0, float _1, Vector3[] _2, Vector3[] result) + { + if (result != null) System.Array.Clear(result, 0, result.Length); + return 0; + } + } + + /// + /// Query water flow data (horizontal motion) at a set of points. + /// + /// Water surface flow velocities at the query positions. + /// + int Query(int hash, float minimumLength, Vector3[] points, Vector3[] results); + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Flow/FlowProvider.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Flow/FlowProvider.cs.meta new file mode 100644 index 000000000..4fce3e25b --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Flow/FlowProvider.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c710a5a446bea43bdbd39db4be198f98 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Flow/FlowQuery.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Flow/FlowQuery.cs new file mode 100644 index 000000000..67a95b7bf --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Flow/FlowQuery.cs @@ -0,0 +1,14 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +namespace WaveHarmonic.Crest +{ + /// + /// Samples horizontal motion of water volume + /// + sealed class FlowQuery : QueryBase, IFlowProvider + { + public FlowQuery(WaterRenderer water) : base(water) { } + protected override int Kernel => 1; + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Flow/FlowQuery.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Flow/FlowQuery.cs.meta new file mode 100644 index 000000000..09c3816eb --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Flow/FlowQuery.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a646106f5d35b4abea362416da973f83 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Query.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Query.cs new file mode 100644 index 000000000..618abda01 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Query.cs @@ -0,0 +1,636 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// Potential improvements +// - Half return values +// - Half minGridSize + +using System.Collections.Generic; +using Unity.Collections; +using UnityEngine; +using UnityEngine.Rendering; + +namespace WaveHarmonic.Crest +{ + /// + /// Base interface for providers. + /// + public interface IQueryProvider + { + // NOTE: Here for documentation reuse. + /// Unique ID for calling code. Typically acquired by calling GetHashCode. + /// The minimum spatial length of the object, such as the width of a boat. Useful for filtering out detail when not needed. Set to zero to get full available detail. + /// The world space points that will be queried. + /// The layer this query targets. + /// The status of the query. + internal static int Query(int hash, float minimumLength, Vector3[] points, int layer) => 0; + + /// + /// Check if the query results could be retrieved successfully using the return code + /// from Query method. + /// + /// The query status returned from Query. + /// Whether the retrieve was successful. + bool RetrieveSucceeded(int status) + { + return (status & (int)QueryBase.QueryStatus.RetrieveFailed) == 0; + } + } + + interface IQueryable + { + int ResultGuidCount { get; } + int RequestCount { get; } + int QueryCount { get; } + void UpdateQueries(WaterRenderer water); + void CleanUp(); + } + + /// + /// Provides heights and other physical data about the water surface. Works by uploading query positions to GPU and computing + /// the data and then transferring back the results asynchronously. An exception to this is water surface velocities - these can + /// not be computed on the GPU and are instead computed on the CPU by retaining last frames' query results and computing finite diffs. + /// + abstract class QueryBase : IQueryable + { + protected abstract int Kernel { get; } + + // 4 was enough for a long time, but Linux setups seems to demand 7 + const int k_MaximumRequests = 7; + const int k_MaximumGuids = 1024; + + // We need only two additional queries to compute normals. + const int k_NormalAdditionalQueryCount = 2; + + readonly WaterRenderer _Water; + + readonly PropertyWrapperCompute _Wrapper; + + readonly System.Action _DataArrivedAction; + + // Must match value in compute shader + const int k_ComputeGroupSize = 64; + + static class ShaderIDs + { + public static readonly int s_QueryPositions_MinimumGridSizes = Shader.PropertyToID("_Crest_QueryPositions_MinimumGridSizes"); + } + + + const float k_FiniteDifferenceDx = 0.1f; + + readonly ComputeBuffer _ComputeBufferQueries; + readonly ComputeBuffer _ComputeBufferResults; + + internal const int k_DefaultMaximumQueryCount = 4096; + + readonly int _MaximumQueryCount = k_DefaultMaximumQueryCount; + readonly Vector3[] _QueryPositionXZ_MinimumGridSize = new Vector3[k_DefaultMaximumQueryCount]; + + /// + /// Holds information about all query points. Maps from unique hash code to position in point array. + /// + sealed class SegmentRegistrar + { + // Map from guids to (segment start index, segment end index, frame number when query was made) + public Dictionary _Segments = new(); + public int _QueryCount = 0; + } + + /// + /// Since query results return asynchronously and may not return at all (in theory), we keep a ringbuffer + /// of the registrars of the last frames so that when data does come back it can be interpreted correctly. + /// + sealed class SegmentRegistrarRingBuffer + { + // Requests in flight plus 2 held values, plus one current + static readonly int s_PoolSize = k_MaximumRequests + 2 + 1; + + readonly SegmentRegistrar[] _Segments = new SegmentRegistrar[s_PoolSize]; + + public int _SegmentRelease = 0; + public int _SegmentAcquire = 0; + + public SegmentRegistrar Current => _Segments[_SegmentAcquire]; + + public SegmentRegistrarRingBuffer() + { + for (var i = 0; i < _Segments.Length; i++) + { + _Segments[i] = new(); + } + } + + public void AcquireNew() + { + var lastIndex = _SegmentAcquire; + + { + var newSegmentAcquire = (_SegmentAcquire + 1) % _Segments.Length; + + if (newSegmentAcquire == _SegmentRelease) + { + // The last index has incremented and landed on the first index. This shouldn't happen normally, but + // can happen if the Scene and Game view are not visible, in which case async readbacks dont get processed + // and the pipeline blocks up. +#if !UNITY_EDITOR + Debug.LogError("Crest: Query ring buffer exhausted. Please report this to developers."); +#endif + return; + } + + _SegmentAcquire = newSegmentAcquire; + } + + // Copy the registrations across from the previous frame. This makes queries persistent. This is needed because + // queries are often made from FixedUpdate(), and at high framerates this may not be called, which would mean + // the query would get lost and this leads to stuttering and other artifacts. + { + _Segments[_SegmentAcquire]._QueryCount = 0; + _Segments[_SegmentAcquire]._Segments.Clear(); + + foreach (var segment in _Segments[lastIndex]._Segments) + { + var age = Time.frameCount - segment.Value.z; + + // Don't keep queries around if they have not be active in the last 10 frames + if (age < 10) + { + // Compute a new segment range - we may have removed some segments that were too old, so this ensures + // we have a nice compact array of queries each frame rather than accumulating persistent air bubbles + var newSegment = segment.Value; + newSegment.x = _Segments[_SegmentAcquire]._QueryCount; + newSegment.y = newSegment.x + (segment.Value.y - segment.Value.x); + _Segments[_SegmentAcquire]._QueryCount = newSegment.y + 1; + + _Segments[_SegmentAcquire]._Segments.Add(segment.Key, newSegment); + } + } + } + } + + public void ReleaseLast() + { + _SegmentRelease = (_SegmentRelease + 1) % _Segments.Length; + } + + public void RemoveRegistrations(int key) + { + // Remove the guid for all of the next spare segment registrars. However, don't touch the ones that are being + // used for active requests. + var i = _SegmentAcquire; + while (true) + { + if (_Segments[i]._Segments.ContainsKey(key)) + { + _Segments[i]._Segments.Remove(key); + } + + i = (i + 1) % _Segments.Length; + + if (i == _SegmentRelease) + { + break; + } + } + } + + public void ClearAvailable() + { + // Extreme approach - flush all segments for next spare registrars (but don't touch ones being used for active requests) + var i = _SegmentAcquire; + while (true) + { + _Segments[i]._Segments.Clear(); + _Segments[i]._QueryCount = 0; + + i = (i + 1) % _Segments.Length; + + if (i == _SegmentRelease) + { + break; + } + } + } + + public void ClearAll() + { + for (var i = 0; i < _Segments.Length; i++) + { + _Segments[i]._QueryCount = 0; + _Segments[i]._Segments.Clear(); + } + } + } + + readonly SegmentRegistrarRingBuffer _SegmentRegistrarRingBuffer = new(); + + NativeArray _QueryResults; + float _QueryResultsTime = -1f; + Dictionary _ResultSegments; + + NativeArray _QueryResultsLast; + float _QueryResultsTimeLast = -1f; + Dictionary _ResultSegmentsLast; + + struct ReadbackRequest + { + public AsyncGPUReadbackRequest _Request; + public float _DataTimestamp; + public Dictionary _Segments; + } + + readonly List _Requests = new(); + + public enum QueryStatus + { + OK = 0, + RetrieveFailed = 1, + PostFailed = 2, + NotEnoughDataForVels = 4, + VelocityDataInvalidated = 8, + InvalidDtForVelocity = 16, + } + + public QueryBase(WaterRenderer water) + { + _Water = water; + + _DataArrivedAction = new(DataArrived); + + if (_MaximumQueryCount != water._AnimatedWavesLod.MaximumQueryCount) + { + _MaximumQueryCount = water._AnimatedWavesLod.MaximumQueryCount; + _QueryPositionXZ_MinimumGridSize = new Vector3[_MaximumQueryCount]; + } + + _ComputeBufferQueries = new(_MaximumQueryCount, 12, ComputeBufferType.Default); + _ComputeBufferResults = new(_MaximumQueryCount, 12, ComputeBufferType.Default); + + _QueryResults = new(_MaximumQueryCount, Allocator.Persistent, NativeArrayOptions.ClearMemory); + _QueryResultsLast = new(_MaximumQueryCount, Allocator.Persistent, NativeArrayOptions.ClearMemory); + + var shader = WaterResources.Instance.Compute._Query; + if (shader == null) + { + Debug.LogError($"Crest: Could not load Query compute shader"); + return; + } + _Wrapper = new(water.SimulationBuffer, shader, Kernel); + } + + /// + /// Takes a unique request ID and some world space XZ positions, and computes the displacement vector that lands at this position, + /// to a good approximation. The world space height of the water at that position is then SeaLevel + displacement.y. + /// + protected bool UpdateQueryPoints(int ownerHash, float minSpatialLength, Vector3[] queryPoints, Vector3[] queryNormals) + { + if (queryPoints.Length + _SegmentRegistrarRingBuffer.Current._QueryCount > _MaximumQueryCount) + { + Debug.LogError($"Crest: Max query count ({_MaximumQueryCount}) exceeded, increase the max query count in the Animated Waves Settings to support a higher number of queries."); + return false; + } + + var segmentRetrieved = false; + + // We'll send in 2 points to get normals + var countPts = queryPoints != null ? queryPoints.Length : 0; + var countNorms = queryNormals != null ? queryNormals.Length : 0; + var countTotal = countPts + countNorms * k_NormalAdditionalQueryCount; + + if (_SegmentRegistrarRingBuffer.Current._Segments.TryGetValue(ownerHash, out var segment)) + { + var segmentSize = segment.y - segment.x + 1; + if (segmentSize == countTotal) + { + // Update frame count + segment.z = Time.frameCount; + _SegmentRegistrarRingBuffer.Current._Segments[ownerHash] = segment; + + segmentRetrieved = true; + } + else + { + _SegmentRegistrarRingBuffer.Current._Segments.Remove(ownerHash); + } + } + + if (countTotal == 0) + { + // No query data + return false; + } + + if (!segmentRetrieved) + { + if (_SegmentRegistrarRingBuffer.Current._Segments.Count >= k_MaximumGuids) + { + Debug.LogError("Crest: Too many guids registered with CollProviderCompute. Increase s_maxGuids."); + return false; + } + + segment.x = _SegmentRegistrarRingBuffer.Current._QueryCount; + segment.y = segment.x + countTotal - 1; + segment.z = Time.frameCount; + _SegmentRegistrarRingBuffer.Current._Segments.Add(ownerHash, segment); + + _SegmentRegistrarRingBuffer.Current._QueryCount += countTotal; + + //Debug.Log("Crest: Added points for " + guid); + } + + // The smallest wavelengths should repeat no more than twice across the smaller spatial length. Unless we're + // in the last LOD - then this is the best we can do. + var minWavelength = minSpatialLength / 2f; + var samplesPerWave = 2f; + var minGridSize = minWavelength / samplesPerWave; + + if (countPts + segment.x > _QueryPositionXZ_MinimumGridSize.Length) + { + Debug.LogError("Crest: Too many wave height queries. Increase Max Query Count in the Animated Waves Settings."); + return false; + } + + for (var pointi = 0; pointi < countPts; pointi++) + { + _QueryPositionXZ_MinimumGridSize[pointi + segment.x].x = queryPoints[pointi].x; + _QueryPositionXZ_MinimumGridSize[pointi + segment.x].y = queryPoints[pointi].z; + _QueryPositionXZ_MinimumGridSize[pointi + segment.x].z = minGridSize; + } + + // To compute each normal, post 2 query points (reuse point above) + for (var normi = 0; normi < countNorms; normi++) + { + var arrIdx = segment.x + countPts + k_NormalAdditionalQueryCount * normi; + + _QueryPositionXZ_MinimumGridSize[arrIdx].x = queryNormals[normi].x + k_FiniteDifferenceDx; + _QueryPositionXZ_MinimumGridSize[arrIdx].y = queryNormals[normi].z; + _QueryPositionXZ_MinimumGridSize[arrIdx].z = minGridSize; + + arrIdx += 1; + + _QueryPositionXZ_MinimumGridSize[arrIdx].x = queryNormals[normi].x; + _QueryPositionXZ_MinimumGridSize[arrIdx].y = queryNormals[normi].z + k_FiniteDifferenceDx; + _QueryPositionXZ_MinimumGridSize[arrIdx].z = minGridSize; + } + + return true; + } + + /// + /// Signal that we're no longer servicing queries. Note this leaves an air bubble in the query buffer. + /// + void RemoveQueryPoints(int guid) + { + _SegmentRegistrarRingBuffer.RemoveRegistrations(guid); + } + + /// + /// Remove air bubbles from the query array. Currently this lazily just nukes all the registered + /// query IDs so they'll be recreated next time (generating garbage). + /// + void CompactQueryStorage() + { + _SegmentRegistrarRingBuffer.ClearAvailable(); + } + + /// + /// Copy out displacements, heights, normals. Pass null if info is not required. + /// + protected bool RetrieveResults(int guid, Vector3[] displacements, float[] heights, Vector3[] normals) + { + if (_ResultSegments == null) + { + return false; + } + + // Check if there are results that came back for this guid + if (!_ResultSegments.TryGetValue(guid, out var segment)) + { + // Guid not found - no result + return false; + } + + var countPoints = 0; + if (displacements != null) countPoints = displacements.Length; + if (heights != null) countPoints = heights.Length; + if (displacements != null && heights != null) Debug.Assert(displacements.Length == heights.Length); + var countNorms = normals != null ? normals.Length : 0; + + if (countPoints > 0) + { + // Retrieve Results + if (displacements != null) _QueryResults.Slice(segment.x, countPoints).CopyTo(displacements); + + // Retrieve Result heights + if (heights != null) + { + var seaLevel = _Water.SeaLevel; + for (var i = 0; i < countPoints; i++) + { + heights[i] = seaLevel + _QueryResults[i + segment.x].y; + } + } + } + + if (countNorms > 0) + { + var firstNorm = segment.x + countPoints; + + var dx = -Vector3.right * k_FiniteDifferenceDx; + var dz = -Vector3.forward * k_FiniteDifferenceDx; + for (var i = 0; i < countNorms; i++) + { + var p = _QueryResults[i + segment.x]; + var px = dx + _QueryResults[firstNorm + k_NormalAdditionalQueryCount * i]; + var pz = dz + _QueryResults[firstNorm + k_NormalAdditionalQueryCount * i + 1]; + + normals[i] = Vector3.Cross(p - px, p - pz).normalized; + normals[i].y *= -1f; + } + } + + return true; + } + + /// + /// Compute time derivative of the displacements by calculating difference from last query. More complicated than it would seem - results + /// may not be available in one or both of the results, or the query locations in the array may change. + /// + protected int CalculateVelocities(int ownerHash, Vector3[] results) + { + // Need at least 2 returned results to do finite difference + if (_QueryResultsTime < 0f || _QueryResultsTimeLast < 0f) + { + return 1; + } + + if (!_ResultSegments.TryGetValue(ownerHash, out var segment)) + { + return (int)QueryStatus.RetrieveFailed; + } + + if (!_ResultSegmentsLast.TryGetValue(ownerHash, out var segmentLast)) + { + return (int)QueryStatus.NotEnoughDataForVels; + } + + if ((segment.y - segment.x) != (segmentLast.y - segmentLast.x)) + { + // Number of queries changed - can't handle that + return (int)QueryStatus.VelocityDataInvalidated; + } + + var dt = _QueryResultsTime - _QueryResultsTimeLast; + if (dt < 0.0001f) + { + return (int)QueryStatus.InvalidDtForVelocity; + } + + var count = results.Length; + for (var i = 0; i < count; i++) + { + results[i] = (_QueryResults[i + segment.x] - _QueryResultsLast[i + segmentLast.x]) / dt; + } + + return 0; + } + + /// + /// Per-frame update callback. + /// + /// The current . + public void UpdateQueries(WaterRenderer water) + { +#if UNITY_EDITOR + // Seems to be a terrible memory leak coming from creating async GPU readbacks. + // This was marked as resolved by Unity and confirmed fixed by forum posts. + // May be worth keeping. See issue #630 for more details. + if (!water._HeightQueries && !Application.isPlaying) return; +#endif + + if (_SegmentRegistrarRingBuffer.Current._QueryCount > 0) + { + ExecuteQueries(); + + // Remove oldest requests if we have hit the limit + while (_Requests.Count >= k_MaximumRequests) + { + _Requests.RemoveAt(0); + } + + ReadbackRequest request; + request._DataTimestamp = Time.time - Time.deltaTime; + request._Request = AsyncGPUReadback.Request(_ComputeBufferResults, _DataArrivedAction); + request._Segments = _SegmentRegistrarRingBuffer.Current._Segments; + _Requests.Add(request); + + _SegmentRegistrarRingBuffer.AcquireNew(); + } + } + + void ExecuteQueries() + { + _ComputeBufferQueries.SetData(_QueryPositionXZ_MinimumGridSize, 0, 0, _SegmentRegistrarRingBuffer.Current._QueryCount); + _Wrapper.SetBuffer(ShaderIDs.s_QueryPositions_MinimumGridSizes, _ComputeBufferQueries); + _Wrapper.SetBuffer(Crest.ShaderIDs.s_Target, _ComputeBufferResults); + + var numGroups = (_SegmentRegistrarRingBuffer.Current._QueryCount + k_ComputeGroupSize - 1) / k_ComputeGroupSize; + _Wrapper.Dispatch(numGroups, 1, 1); + } + + /// + /// Called when a compute buffer has been read back from the GPU to the CPU. + /// + void DataArrived(AsyncGPUReadbackRequest req) + { + // Can get callbacks after disable, so detect this. + if (!_QueryResults.IsCreated) + { + _Requests.Clear(); + return; + } + + // Remove any error requests + for (var i = _Requests.Count - 1; i >= 0; --i) + { + if (_Requests[i]._Request.hasError) + { + _Requests.RemoveAt(i); + _SegmentRegistrarRingBuffer.ReleaseLast(); + } + } + + // Find the last request that was completed + var lastDoneIndex = _Requests.Count - 1; + while (lastDoneIndex >= 0 && !_Requests[lastDoneIndex]._Request.done) + { + --lastDoneIndex; + } + + // If there is a completed request, process it + if (lastDoneIndex >= 0) + { + // Update "last" results + (_QueryResults, _QueryResultsLast) = (_QueryResultsLast, _QueryResults); + _QueryResultsTimeLast = _QueryResultsTime; + _ResultSegmentsLast = _ResultSegments; + + var data = _Requests[lastDoneIndex]._Request.GetData(); + data.CopyTo(_QueryResults); + _QueryResultsTime = _Requests[lastDoneIndex]._DataTimestamp; + _ResultSegments = _Requests[lastDoneIndex]._Segments; + } + + // Remove all the requests up to the last completed one + for (var i = lastDoneIndex; i >= 0; --i) + { + _Requests.RemoveAt(i); + _SegmentRegistrarRingBuffer.ReleaseLast(); + } + } + + /// + /// On destroy, to clean up resources. + /// + public void CleanUp() + { + _ComputeBufferQueries.Dispose(); + _ComputeBufferResults.Dispose(); + + if (_QueryResults.IsCreated) _QueryResults.Dispose(); + if (_QueryResultsLast.IsCreated) _QueryResultsLast.Dispose(); + + _SegmentRegistrarRingBuffer.ClearAll(); + } + + public virtual int Query(int ownerHash, float minSpatialLength, Vector3[] queryPoints, Vector3[] results) + { + var result = (int)QueryStatus.OK; + + if (!UpdateQueryPoints(ownerHash, minSpatialLength, queryPoints, null)) + { + result |= (int)QueryStatus.PostFailed; + } + + if (!RetrieveResults(ownerHash, results, null, null)) + { + result |= (int)QueryStatus.RetrieveFailed; + } + + return result; + } + + public int ResultGuidCount => _ResultSegments != null ? _ResultSegments.Count : 0; + + public int RequestCount => _Requests != null ? _Requests.Count : 0; + + public int QueryCount => _SegmentRegistrarRingBuffer != null ? _SegmentRegistrarRingBuffer.Current._QueryCount : 0; + } + + static partial class Extensions + { + public static void UpdateQueries(this IQueryProvider self, WaterRenderer water) => (self as IQueryable)?.UpdateQueries(water); + public static void CleanUp(this IQueryProvider self) => (self as IQueryable)?.CleanUp(); + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Query.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Query.cs.meta new file mode 100644 index 000000000..eea3ffe58 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/Query.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b047926acd1d644acb5797a1d2b7b7b4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/QueryEvents.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/QueryEvents.cs new file mode 100644 index 000000000..b05134751 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/QueryEvents.cs @@ -0,0 +1,267 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using UnityEngine.Events; +using WaveHarmonic.Crest.Internal; + +namespace WaveHarmonic.Crest +{ + /// + /// What transform to use for queries. + /// + public enum QuerySource + { + /// + /// This game object's transform. + /// + Transform, + + /// + /// The viewer's transform. + /// + /// + /// The viewer is the main camera the system uses. + /// + Viewer + } + + /// + /// Emits events (UnityEvents) based on the sampled water data. + /// + [AddComponentMenu(Constants.k_MenuPrefixScripts + "Query Events")] + [@HelpURL("Manual/Events.html#query-events")] + public sealed partial class QueryEvents : ManagedBehaviour + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + + + [Tooltip("What transform should the queries be based on.\n\n\"Viewer\" will reuse queries already performed by the Water Renderer")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + QuerySource _Source; + + [Tooltip(ICollisionProvider.k_LayerTooltip)] + [@GenerateAPI] + [@DecoratedField, SerializeField] + internal CollisionLayer _Layer; + + + [Header("Distance From Water Surface")] + + [Tooltip("The minimum wavelength for queries.\n\nThe higher the value, the more smaller waves will be ignored when sampling the water surface.")] + [@Predicated(nameof(_Source), inverted: true, nameof(QuerySource.Transform))] + [@GenerateAPI] + [@DecoratedField, SerializeField] + float _MinimumWavelength = 1f; + + [@Label("Signed")] + [Tooltip("Whether to keep the sign of the value (ie positive/negative).\n\nA positive value means the query point is above the surface, while a negative means it below the surface.")] + [@Predicated(nameof(_DistanceFromSurfaceUseCurve), inverted: true)] + [@GenerateAPI] + [@DecoratedField, SerializeField] + bool _DistanceFromSurfaceSigned; + + [@Label("Maximum Distance")] + [Tooltip("The maximum distance.\n\nAlways use a real distance in real units (ie not normalized).")] + [@GenerateAPI] + [UnityEngine.Serialization.FormerlySerializedAs("_MaximumDistance")] + [@DecoratedField, SerializeField] + float _DistanceFromSurfaceMaximum = 100f; + + [@Label("Use Curve")] + [Tooltip("Whether to apply a curve to the distance.\n\nNormalizes and inverts the distance to be between zero and one, then applies a curve.")] + [@GenerateAPI] + [UnityEngine.Serialization.FormerlySerializedAs("_NormaliseDistance")] + [@DecoratedField, SerializeField] + bool _DistanceFromSurfaceUseCurve = true; + + [@Label("Curve")] + [Tooltip("Apply a curve to the distance.\n\nValues towards \"one\" means closer to the water surface.")] + [@Predicated(nameof(_DistanceFromSurfaceUseCurve))] + [@GenerateAPI] + [UnityEngine.Serialization.FormerlySerializedAs("_DistanceCurve")] + [@DecoratedField, SerializeField] + AnimationCurve _DistanceFromSurfaceCurve = AnimationCurve.Linear(0f, 0f, 1f, 1f); + + + [Header("Distance From Water Edge")] + + [@Label("Signed")] + [Tooltip("Whether to keep the sign of the value (ie positive/negative).\n\nA positive value means the query point is over water, while a negative means it is over land.")] + [@Predicated(nameof(_DistanceFromEdgeUseCurve), inverted: true)] + [@GenerateAPI] + [@DecoratedField, SerializeField] + bool _DistanceFromEdgeSigned; + + [@Label("Maximum Distance")] + [Tooltip("The maximum distance.\n\nAlways use a real distance in real units (ie not normalized).")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + float _DistanceFromEdgeMaximum = 100f; + + [@Label("Use Curve")] + [Tooltip("Apply a curve to the distance.\n\nNormalizes and inverts the distance to be between zero and one, then applies a curve.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + bool _DistanceFromEdgeUseCurve = true; + + [@Label("Curve")] + [Tooltip("Apply a curve to the distance.\n\nValues towards \"one\" means closer to the water's edge.")] + [@Predicated(nameof(_DistanceFromEdgeUseCurve))] + [@GenerateAPI] + [@DecoratedField, SerializeField] + AnimationCurve _DistanceFromEdgeCurve = AnimationCurve.Linear(0f, 0f, 1f, 1f); + + + [Header("Events")] + + [Tooltip("Triggers when game object goes below water surface.\n\nTriggers once per state change.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + UnityEvent _OnBelowWater = new(); + + [Tooltip("Triggers when game object goes above water surface.\n\nTriggers once per state change.")] + [@GenerateAPI] + [SerializeField] + UnityEvent _OnAboveWater = new(); + + [Tooltip("Sends the distance from the water surface.")] + [@GenerateAPI] + [UnityEngine.Serialization.FormerlySerializedAs("_DistanceFromWater")] + [SerializeField] + internal UnityEvent _DistanceFromSurface = new(); + + [Tooltip("Sends the distance from the water's edge.")] + [@GenerateAPI] + [SerializeField] + internal UnityEvent _DistanceFromEdge = new(); + + bool HasOnBelowWater => OnBelowWater != null || !_OnBelowWater.IsEmpty(); + bool HasOnAboveWater => OnAboveWater != null || !_OnAboveWater.IsEmpty(); + bool HasDistanceFromSurface => DistanceFromSurface != null || !_DistanceFromSurface.IsEmpty(); + bool HasDistanceFromEdge => DistanceFromEdge != null || !_DistanceFromEdge.IsEmpty(); + + // Store state + bool _IsAboveSurface = false; + bool _IsFirstUpdate = true; + readonly SampleCollisionHelper _SampleHeightHelper = new(); + readonly SampleDepthHelper _SampleDepthHelper = new(); + + private protected override System.Action OnUpdateMethod => OnUpdate; + void OnUpdate(WaterRenderer water) + { + // Transform requires queries which need to be in Update. + if (_Source != QuerySource.Transform) return; + SendDistanceFromSurface(water); + SendDistanceFromEdge(water); + } + + private protected override System.Action OnLateUpdateMethod => OnLateUpdate; + void OnLateUpdate(WaterRenderer water) + { + // Viewer is set between Update and LateUpdate. + if (_Source != QuerySource.Viewer) return; + SendDistanceFromSurface(water); + SendDistanceFromEdge(water); + } + + void SendDistanceFromSurface(WaterRenderer water) + { + if (!HasDistanceFromSurface && !HasOnAboveWater && !HasOnBelowWater) + { + return; + } + + var distance = water.ViewerHeightAboveWater; + + if (_Source == QuerySource.Transform) + { + if (!_SampleHeightHelper.SampleHeight(transform.position, out var height, minimumLength: 2f * _MinimumWavelength, _Layer)) return; + distance = transform.position.y - height; + } + + var isAboveSurface = distance > 0; + + // Has the below/above water surface state changed? + if (_IsAboveSurface != isAboveSurface || _IsFirstUpdate) + { + _IsAboveSurface = isAboveSurface; + _IsFirstUpdate = false; + + if (_IsAboveSurface) + { + _OnAboveWater?.Invoke(); + OnAboveWater?.Invoke(); + } + else + { + _OnBelowWater?.Invoke(); + OnBelowWater?.Invoke(); + } + } + + // Save some processing when not being used. + if (HasDistanceFromSurface) + { + distance = Mathf.Clamp(distance, -_DistanceFromSurfaceMaximum, _DistanceFromSurfaceMaximum); + + // Throw away sign when using a curve. Cannot think of a use case for negative + // normalized numbers. + if (!_DistanceFromSurfaceSigned || _DistanceFromSurfaceUseCurve) + { + distance = Mathf.Abs(distance); + } + + if (_DistanceFromSurfaceUseCurve) + { + // Normalize for the curve. Invert so towards one is closer to target. + distance = _DistanceFromSurfaceCurve.Evaluate(1f - distance / _DistanceFromSurfaceMaximum); + } + + _DistanceFromSurface?.Invoke(distance); + DistanceFromSurface?.Invoke(distance); + } + } + + void SendDistanceFromEdge(WaterRenderer water) + { + // No events to process. + if (!HasDistanceFromEdge) + { + return; + } + + var distance = water.ViewerDistanceToShoreline; + + if (_Source == QuerySource.Transform) + { + if (!_SampleDepthHelper.SampleDistanceToWaterEdge(transform.position, out distance)) + { + return; + } + } + + distance = Mathf.Clamp(distance, -_DistanceFromEdgeMaximum, _DistanceFromEdgeMaximum); + + // Throw away sign when using a curve. Cannot think of a use case for negative + // normalized numbers. + if (!_DistanceFromEdgeSigned || _DistanceFromEdgeUseCurve) + { + distance = Mathf.Abs(distance); + } + + if (_DistanceFromEdgeUseCurve) + { + // Normalize for the curve. Invert so towards one is closer to target. + distance = _DistanceFromEdgeCurve.Evaluate(1f - distance / _DistanceFromEdgeMaximum); + } + + _DistanceFromEdge?.Invoke(distance); + DistanceFromEdge?.Invoke(distance); + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/QueryEvents.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/QueryEvents.cs.meta new file mode 100644 index 000000000..05aa07aa1 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/QueryEvents.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 555f01a6f203a4b6db9ec558f7451e4c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/SamplingHelpers.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/SamplingHelpers.cs new file mode 100644 index 000000000..bc1930725 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/SamplingHelpers.cs @@ -0,0 +1,320 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; + +// Linter does not support mixing inheritdoc plus defining own parameters. +#pragma warning disable CS1573 // Parameter has no matching param tag in the XML comment (but other parameters do) + +namespace WaveHarmonic.Crest.Internal +{ + /// + /// Base class for sample helpers which sample a single point. + /// + /// + /// It is not particularly efficient to sample a single point, but is a fairly + /// common case. + /// + public abstract class SampleHelper + { + private protected readonly Vector3[] _QueryPosition; + private protected readonly Vector3[] _QueryResult; + + int _LastFrame = -1; + + private protected SampleHelper(int queryCount = 1) + { + _QueryPosition = new Vector3[queryCount]; + _QueryResult = new Vector3[queryCount]; + } + + [System.Diagnostics.Conditional("UNITY_EDITOR")] + private protected void Validate(bool allowMultipleCallsPerFrame) + { + if (Application.isPlaying && !Time.inFixedTimeStep && !allowMultipleCallsPerFrame && _LastFrame == Time.frameCount) + { + var type = GetType().Name; + Debug.LogWarning($"Crest: {type} sample called multiple times in one frame which is not expected. Each {type} object services a single sample per frame. To perform multiple queries, create multiple {type} objects or use the query provider API directly."); + } + + _LastFrame = Time.frameCount; + } + + // The first method is there just to get inheritdoc to work as it does not like + // inheriting params plus adding additional params. + + /// + /// Only call once per frame. + /// + /// World space position to sample. + /// + /// The smallest length scale you are interested in. If you are sampling data for boat physics, + /// pass in the boats width. Larger objects will ignore smaller details in the data. + /// + /// The collision layer to target. + /// Whether the query was successful. + bool Sample(Vector3 position, float minimumLength, CollisionLayer layer) => false; + } +} + +namespace WaveHarmonic.Crest +{ + /// + /// Helper to obtain the water surface collision at a single point per frame. + /// + /// + public sealed class SampleCollisionHelper : Internal.SampleHelper + { + readonly Vector3[] _QueryResultNormal = new Vector3[1]; + readonly Vector3[] _QueryResultVelocity = new Vector3[1]; + + enum QueryType + { + Displacement, + Height, + } + + [System.Flags] + enum QueryOptions + { + None, + Velocity, + Normal, + All = Velocity | Normal, + } + + bool Sample(int id, Vector3 position, out Vector3 displacement, out float height, out Vector3 velocity, out Vector3 normal, QueryType type, QueryOptions options, CollisionLayer layer = CollisionLayer.Everything, float minimumLength = 0f, bool allowMultipleCallsPerFrame = false) + { + var water = WaterRenderer.Instance; + var provider = water == null ? null : water.AnimatedWavesLod.Provider; + + height = 0f; + displacement = Vector3.zero; + velocity = Vector3.zero; + normal = Vector3.up; + + if (provider == null) + { + return false; + } + + var isHeight = type == QueryType.Height; + var isDisplacement = type == QueryType.Displacement; + var isVelocity = (options & QueryOptions.Velocity) == QueryOptions.Velocity; + var isNormal = (options & QueryOptions.Normal) == QueryOptions.Normal; + + Validate(allowMultipleCallsPerFrame); + + _QueryPosition[0] = position; + + var status = provider.Query + ( + id, + minimumLength, + _QueryPosition, + _QueryResult, + isNormal ? _QueryResultNormal : null, + isVelocity ? _QueryResultVelocity : null, + layer + ); + + if (!provider.RetrieveSucceeded(status)) + { + height = water.SeaLevel; + return false; + } + + if (isHeight) height = _QueryResult[0].y + water.SeaLevel; + if (isDisplacement) displacement = _QueryResult[0]; + if (isVelocity) velocity = _QueryResultVelocity[0]; + if (isNormal) normal = _QueryResultNormal[0]; + + return true; + } + + internal bool SampleHeight(int id, Vector3 position, out float height, CollisionLayer layer = CollisionLayer.Everything, float minimumLength = 0f, bool allowMultipleCallsPerFrame = false) + { + return Sample(id, position, out _, out height, out _, out _, QueryType.Height, QueryOptions.None, layer, minimumLength, allowMultipleCallsPerFrame); + } + + internal bool SampleHeight(int id, Vector3 position, out float height, out Vector3 velocity, CollisionLayer layer = CollisionLayer.Everything, float minimumLength = 0f, bool allowMultipleCallsPerFrame = false) + { + return Sample(id, position, out _, out height, out velocity, out _, QueryType.Height, QueryOptions.Velocity, layer, minimumLength, allowMultipleCallsPerFrame); + } + + internal bool SampleHeight(int id, Vector3 position, out float height, out Vector3 velocity, out Vector3 normal, CollisionLayer layer = CollisionLayer.Everything, float minimumLength = 0f, bool allowMultipleCallsPerFrame = false) + { + return Sample(id, position, out _, out height, out velocity, out normal, QueryType.Height, QueryOptions.All, layer, minimumLength, allowMultipleCallsPerFrame); + } + + internal bool SampleDisplacement(int id, Vector3 position, out Vector3 displacement, out Vector3 velocity, out Vector3 normal, CollisionLayer layer = CollisionLayer.Everything, float minimumLength = 0f, bool allowMultipleCallsPerFrame = false) + { + return Sample(id, position, out displacement, out _, out velocity, out normal, QueryType.Displacement, QueryOptions.All, layer, minimumLength, allowMultipleCallsPerFrame); + } + + internal bool SampleDisplacement(int id, Vector3 position, out Vector3 displacement, out Vector3 velocity, CollisionLayer layer = CollisionLayer.Everything, float minimumLength = 0f, bool allowMultipleCallsPerFrame = false) + { + return Sample(id, position, out displacement, out _, out velocity, out _, QueryType.Displacement, QueryOptions.Velocity, layer, minimumLength, allowMultipleCallsPerFrame); + } + + internal bool SampleDisplacement(int id, Vector3 position, out Vector3 displacement, CollisionLayer layer = CollisionLayer.Everything, float minimumLength = 0f, bool allowMultipleCallsPerFrame = false) + { + return Sample(id, position, out displacement, out _, out _, out _, QueryType.Displacement, QueryOptions.None, layer, minimumLength, allowMultipleCallsPerFrame); + } + + // The first method is there just to get inheritdoc to work as it does not like + // inheriting params plus adding additional params. + + /// + /// Sample displacement data. + /// + /// The water surface displacement to point. + /// The water surface height. + /// The velocity of the water surface excluding flow velocity. + /// The water surface normal. + /// + bool Sample(Vector3 position, float height, Vector3 displacement, Vector3 normal, Vector3 velocity, float minimumLength = 0f, CollisionLayer layer = CollisionLayer.Everything) => false; + + /// + [System.Obsolete("Please use SampleDisplacement instead. Be wary that the new API has switch the normal parameter with velocity.")] + public bool Sample(Vector3 position, out Vector3 displacement, out Vector3 normal, out Vector3 velocity, float minimumLength = 0f, CollisionLayer layer = CollisionLayer.Everything) => SampleDisplacement(GetHashCode(), position, out displacement, out velocity, out normal, layer, minimumLength); + + /// + [System.Obsolete("Please use SampleHeight instead. Be wary that the new API has switch the normal parameter with velocity.")] + public bool Sample(Vector3 position, out float height, out Vector3 normal, out Vector3 velocity, float minimumLength = 0f, CollisionLayer layer = CollisionLayer.Everything) => SampleHeight(GetHashCode(), position, out height, out velocity, out normal, layer, minimumLength); + + /// + [System.Obsolete("Please use SampleHeight instead. Be wary that the new API has switch the normal parameter with velocity.")] + public bool Sample(Vector3 position, out float height, out Vector3 normal, float minimumLength = 0f, CollisionLayer layer = CollisionLayer.Everything) => SampleHeight(GetHashCode(), position, out height, out _, out normal, layer, minimumLength); + + /// + [System.Obsolete("Please use SampleHeight instead. Be wary that the new API has switch the normal parameter with velocity.")] + public bool Sample(Vector3 position, out float height, float minimumLength = 0f, CollisionLayer layer = CollisionLayer.Everything) => SampleHeight(GetHashCode(), position, out height, layer, minimumLength); + + + /// + public bool SampleDisplacement(Vector3 position, out Vector3 displacement, out Vector3 velocity, out Vector3 normal, float minimumLength = 0f, CollisionLayer layer = CollisionLayer.Everything) => SampleDisplacement(GetHashCode(), position, out displacement, out velocity, out normal, layer, minimumLength); + + /// + public bool SampleDisplacement(Vector3 position, out Vector3 displacement, out Vector3 velocity, float minimumLength = 0f, CollisionLayer layer = CollisionLayer.Everything) => SampleDisplacement(GetHashCode(), position, out displacement, out velocity, layer, minimumLength); + + /// + public bool SampleDisplacement(Vector3 position, out Vector3 displacement, float minimumLength = 0f, CollisionLayer layer = CollisionLayer.Everything) => SampleDisplacement(GetHashCode(), position, out displacement, layer, minimumLength); + + /// + public bool SampleHeight(Vector3 position, out float height, out Vector3 velocity, out Vector3 normal, float minimumLength = 0f, CollisionLayer layer = CollisionLayer.Everything) => SampleHeight(GetHashCode(), position, out height, out velocity, out normal, layer, minimumLength); + + /// + public bool SampleHeight(Vector3 position, out float height, out Vector3 velocity, float minimumLength = 0f, CollisionLayer layer = CollisionLayer.Everything) => SampleHeight(GetHashCode(), position, out height, out velocity, layer, minimumLength); + + /// + public bool SampleHeight(Vector3 position, out float height, float minimumLength = 0f, CollisionLayer layer = CollisionLayer.Everything) => SampleHeight(GetHashCode(), position, out height, layer, minimumLength); + } + + /// + /// Helper to obtain the flow data (horizontal water motion) at a single point. + /// + /// + public sealed class SampleFlowHelper : Internal.SampleHelper + { + /// + /// Sample flow data. + /// + /// Filled with resulting flow. + /// Whether the query was successful. + /// + public bool Sample(Vector3 position, out Vector2 flow, float minimumLength = 0f) + { + var water = WaterRenderer.Instance; + var flowProvider = WaterRenderer.Instance == null ? null : water.FlowLod.Provider; + + if (flowProvider == null) + { + flow = Vector2.zero; + return false; + } + + Validate(false); + + _QueryPosition[0] = position; + + var status = flowProvider.Query(GetHashCode(), minimumLength, _QueryPosition, _QueryResult); + + if (!flowProvider.RetrieveSucceeded(status)) + { + flow = Vector2.zero; + return false; + } + + // We don't support float2 queries unfortunately, so unpack from float3 + flow.x = _QueryResult[0].x; + flow.y = _QueryResult[0].z; + + return true; + } + } + + /// + /// Helper to obtain the depth data at a single point. + /// + public sealed class SampleDepthHelper : Internal.SampleHelper + { + bool Sample(Vector3 position, out Vector2 result) + { + var water = WaterRenderer.Instance; + var depthProvider = WaterRenderer.Instance == null ? null : water.DepthLod.Provider; + + if (depthProvider == null) + { + result = Vector2.zero; + return false; + } + + Validate(false); + + _QueryPosition[0] = position; + + var status = depthProvider.Query(GetHashCode(), minimumLength: 0, _QueryPosition, _QueryResult); + if (!depthProvider.RetrieveSucceeded(status)) + { + result = Vector2.zero; + return false; + } + + result = _QueryResult[0]; + return true; + } + + /// + /// Sample both the water depth and water edge distance. + /// + /// Filled by the water depth at the query position. + /// Filled by the distance to water edge at the query position. + /// + bool Sample(Vector3 position, out float depth, out float distance) + { + var success = Sample(position, out var result); + depth = result.x; + distance = result.y; + return success; + } + + /// Sample water depth. + /// + bool SampleWaterDepth(Vector3 position, out float depth) + { + var success = Sample(position, out var result); + depth = result.x; + return success; + } + + /// Sample water edge distance. + /// + public bool SampleDistanceToWaterEdge(Vector3 position, out float distance) + { + var success = Sample(position, out var result); + distance = result.y; + return success; + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/SamplingHelpers.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/SamplingHelpers.cs.meta new file mode 100644 index 000000000..cb6c488f9 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Query/SamplingHelpers.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c4b71f2a526b64377bc96c6e283e4535 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/SampleShadowsHDRP.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/SampleShadowsHDRP.cs new file mode 100644 index 000000000..361e5e395 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/SampleShadowsHDRP.cs @@ -0,0 +1,125 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#if d_UnityHDRP + +using UnityEditor; +using UnityEngine; +using UnityEngine.Rendering.HighDefinition; + +namespace WaveHarmonic.Crest +{ + sealed class SampleShadowsHDRP : CustomPass + { + static SampleShadowsHDRP s_Instance; + static readonly string s_Name = "Sample Shadows"; + + // These values come from unity_MatrxVP value in the frame debugger. unity_MatrxVP is marked as legacy and + // breaks XR SPI. It is defined in: + // "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/EditorShaderVariables.hlsl" + static readonly Matrix4x4 s_Matrix = new + ( + new(2f, 0f, 0f, 0f), + new(0f, -2f, 0f, 0f), + new(0f, 0f, 0.00990099f, 0f), + new(-1f, 1f, 0.990099f, 1f) + ); + + static class ShaderIDs + { + public static readonly int s_ViewProjectionMatrix = Shader.PropertyToID("_Crest_ViewProjectionMatrix"); + } + + GameObject _GameObject; + int _XrTargetEyeIndex = -1; + + protected override void Execute(CustomPassContext context) + { + var water = WaterRenderer.Instance; + + if (water == null || !water._ShadowLod.Enabled) + { + return; + } + +#if UNITY_EDITOR + if (!WaterRenderer.IsWithinEditorUpdate || EditorApplication.isPaused) + { + return; + } +#endif + + var camera = context.hdCamera.camera; + + // Custom passes execute for every camera. We only support one camera for now. + if (!ReferenceEquals(camera, water.Viewer)) return; + // TODO: bail when not executing for main light or when no main light exists? + // if (renderingData.lightData.mainLightIndex == -1) return; + + camera.TryGetComponent(out var cameraData); + + if (cameraData != null && cameraData.xrRendering) + { + XRHelpers.UpdatePassIndex(ref _XrTargetEyeIndex); + + // Skip the right eye as data is not stereo. + if (_XrTargetEyeIndex == 1) + { + return; + } + } + + // Disable for XR SPI otherwise input will not have correct world position. + if (cameraData != null && cameraData.xrRendering && XRHelpers.IsSinglePass) + { + context.cmd.DisableShaderKeyword("STEREO_INSTANCING_ON"); + } + + // We cannot seem to override this matrix so a reference manually. + context.cmd.SetGlobalMatrix(ShaderIDs.s_ViewProjectionMatrix, s_Matrix); + water._ShadowLod.BuildCommandBuffer(water, context.cmd); + + // Restore matrices otherwise remaining render will have incorrect matrices. Each pass is responsible for + // restoring matrices if required. + context.cmd.SetViewProjectionMatrices(camera.worldToCameraMatrix, camera.projectionMatrix); + + // Restore XR SPI as we cannot rely on remaining pipeline to do it for us. + if (cameraData != null && cameraData.xrRendering && XRHelpers.IsSinglePass) + { + context.cmd.EnableShaderKeyword("STEREO_INSTANCING_ON"); + } + } + + internal static void Enable(WaterRenderer water) + { + var gameObject = CustomPassHelpers.CreateOrUpdate + ( + parent: water.Container.transform, + s_Name, + hide: !water._Debug._ShowHiddenObjects + ); + + CustomPassHelpers.CreateOrUpdate + ( + gameObject, + ref s_Instance, + s_Name, + CustomPassInjectionPoint.BeforeTransparent + ); + + s_Instance._GameObject = gameObject; + } + + internal static void Disable() + { + // It should be safe to rely on this reference for this reference to fail. + if (s_Instance != null && s_Instance._GameObject != null) + { + // Will also trigger Cleanup below. + s_Instance._GameObject.SetActive(false); + } + } + } +} + +#endif // d_UnityHDRP diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/SampleShadowsHDRP.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/SampleShadowsHDRP.cs.meta new file mode 100644 index 000000000..25953f406 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/SampleShadowsHDRP.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7615ccf335b7f4009b603ea10c9da3b2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/SampleShadowsURP.RenderGraph.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/SampleShadowsURP.RenderGraph.cs new file mode 100644 index 000000000..b3cfeb8db --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/SampleShadowsURP.RenderGraph.cs @@ -0,0 +1,61 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#if d_UnityURP +#if UNITY_6000_0_OR_NEWER + +using UnityEngine.Rendering; +using UnityEngine.Rendering.RenderGraphModule; +using UnityEngine.Rendering.Universal; + +namespace WaveHarmonic.Crest +{ + partial class SampleShadowsURP : ScriptableRenderPass + { + class PassData + { +#pragma warning disable IDE1006 // Naming Styles + public UniversalCameraData cameraData; + public UniversalLightData lightData; + public CullingResults cullResults; +#pragma warning restore IDE1006 // Naming Styles + + public void Init(ContextContainer frameData, IUnsafeRenderGraphBuilder builder = null) + { + cameraData = frameData.Get(); + lightData = frameData.Get(); + cullResults = frameData.Get().cullResults; + } + } + + readonly PassData _PassData = new(); + + public override void RecordRenderGraph(RenderGraph graph, ContextContainer frame) + { + using (var builder = graph.AddUnsafePass(k_Name, out var data)) + { + data.Init(frame, builder); + builder.AllowPassCulling(false); + + builder.SetRenderFunc((data, context) => + { + var buffer = CommandBufferHelpers.GetNativeCommandBuffer(context.cmd); + Execute(context.GetRenderContext(), buffer, data); + }); + } + } + + [System.Obsolete] + public override void Execute(ScriptableRenderContext context, ref RenderingData data) + { + _PassData.Init(data.GetFrameData()); + var buffer = CommandBufferPool.Get(k_Name); + Execute(context, buffer, _PassData); + context.ExecuteCommandBuffer(buffer); + CommandBufferPool.Release(buffer); + } + } +} + +#endif // UNITY_6000_0_OR_NEWER +#endif // d_UnityURP diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/SampleShadowsURP.RenderGraph.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/SampleShadowsURP.RenderGraph.cs.meta new file mode 100644 index 000000000..3ce86fc7a --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/SampleShadowsURP.RenderGraph.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7fa132cd90fd84d65bfdbdeaa68b9ff4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/SampleShadowsURP.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/SampleShadowsURP.cs new file mode 100644 index 000000000..aaa8a0f33 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/SampleShadowsURP.cs @@ -0,0 +1,139 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#if d_UnityURP + +using UnityEditor; +using UnityEngine; +using UnityEngine.Rendering; +using UnityEngine.Rendering.Universal; + +namespace WaveHarmonic.Crest +{ + sealed partial class SampleShadowsURP : ScriptableRenderPass + { + const string k_Name = "Crest Shadow Data"; + + static SampleShadowsURP s_Instance; + internal static bool Created => s_Instance != null; + + SampleShadowsURP(RenderPassEvent renderPassEvent) + { + this.renderPassEvent = renderPassEvent; + } + + internal static void Enable() + { + s_Instance ??= new(RenderPassEvent.AfterRenderingSkybox); + + RenderPipelineManager.beginCameraRendering -= EnqueuePass; + RenderPipelineManager.beginCameraRendering += EnqueuePass; + + RenderPipelineManager.activeRenderPipelineTypeChanged -= s_Instance.OnActiveRenderPipelineTypeChanged; + RenderPipelineManager.activeRenderPipelineTypeChanged += s_Instance.OnActiveRenderPipelineTypeChanged; + } + + internal static void Disable() + { + // TODO: Currently on RP change this method can be called with Enable ever being called leading to null + // exceptions. It can be removed once those problems are sorted. + if (s_Instance != null) + { + RenderPipelineManager.activeRenderPipelineTypeChanged -= s_Instance.OnActiveRenderPipelineTypeChanged; + } + + RenderPipelineManager.beginCameraRendering -= EnqueuePass; + } + + void OnActiveRenderPipelineTypeChanged() + { + Disable(); + } + + static void EnqueuePass(ScriptableRenderContext context, Camera camera) + { + var water = WaterRenderer.Instance; + + if (water == null || !water._ShadowLod.Enabled) + { + return; + } + +#if UNITY_EDITOR + if (!WaterRenderer.IsWithinEditorUpdate || EditorApplication.isPaused) + { + return; + } +#endif + + // Only sample shadows for the main camera. + if (!ReferenceEquals(water.Viewer, camera)) + { + return; + } + + if (camera.TryGetComponent(out var cameraData)) + { + cameraData.scriptableRenderer.EnqueuePass(s_Instance); + } + } + +#if UNITY_6000_0_OR_NEWER + void Execute(ScriptableRenderContext context, CommandBuffer buffer, PassData renderingData) +#else + public override void Execute(ScriptableRenderContext context, ref RenderingData renderingData) +#endif + { + var water = WaterRenderer.Instance; + + if (water == null || !water._ShadowLod.Enabled) + { + return; + } + + // TODO: This may not be the same as WaterRenderer._primaryLight. Not certain how to support overriding the + // main light for shadows yet. + var mainLightIndex = renderingData.lightData.mainLightIndex; + + if (mainLightIndex == -1) + { + return; + } + + var camera = renderingData.cameraData.camera; + +#if !UNITY_6000_0_OR_NEWER + var buffer = CommandBufferPool.Get(k_Name); +#endif + + // We need to check the mask or it will cause entire pipeline to output black. Appears to only affect URP. + var isStereoRendering = renderingData.cameraData.xrRendering && XRHelpers.IsSinglePass && + camera.stereoTargetEye == StereoTargetEyeMask.Both; + + // Disable for XR SPI otherwise input will not have correct world position. + if (isStereoRendering) + { + buffer.DisableShaderKeyword("STEREO_INSTANCING_ON"); + } + + water._ShadowLod.BuildCommandBuffer(water, buffer); + + // Restore matrices otherwise remaining render will have incorrect matrices. Each pass is responsible for + // restoring matrices if required. + buffer.SetViewProjectionMatrices(camera.worldToCameraMatrix, camera.projectionMatrix); + + // Restore XR SPI as we cannot rely on remaining pipeline to do it for us. + if (isStereoRendering) + { + buffer.EnableShaderKeyword("STEREO_INSTANCING_ON"); + } + +#if !UNITY_6000_0_OR_NEWER + context.ExecuteCommandBuffer(buffer); + CommandBufferPool.Release(buffer); +#endif + } + } +} + +#endif // d_UnityURP diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/SampleShadowsURP.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/SampleShadowsURP.cs.meta new file mode 100644 index 000000000..31cc90978 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/SampleShadowsURP.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a4a20bc0762fc450da9b6532d131c32a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/ScatteringLod.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/ScatteringLod.cs new file mode 100644 index 000000000..264e15d68 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/ScatteringLod.cs @@ -0,0 +1,68 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using WaveHarmonic.Crest.Internal; +using WaveHarmonic.Crest.Utility; + +namespace WaveHarmonic.Crest +{ + /// + /// Overrides the main scattering color. + /// + public sealed partial class ScatteringLod : ColorLod + { + // Orange + internal static readonly Color s_GizmoColor = new(1f, 165f / 255f, 0f, 0.5f); + internal static readonly Color s_DefaultColor = new(0f, 0.098f, 0.2f, 1f); + + static new class ShaderIDs + { + public static readonly int s_SampleScatteringSimulation = Shader.PropertyToID("g_Crest_SampleScatteringSimulation"); + } + + internal override string ID => "Scattering"; + internal override string Name => "Scattering"; + internal override Color GizmoColor => s_GizmoColor; + private protected override bool NeedToReadWriteTextureData => true; + private protected override bool RequiresClearBorder => true; + private protected override bool AlwaysClear => true; + private protected override Color ClearColor + { + get + { + var color = Color.clear; + + if (_Water.Material != null) + { + color = _Water.Material.GetColor(WaterRenderer.ShaderIDs.s_Scattering).MaybeLinear(); + color.a = 0f; + } + + return color; + } + } + + private protected override int GlobalShaderID => ShaderIDs.s_SampleScatteringSimulation; + + internal ScatteringLod() + { + _ShorelineColor = (s_DefaultColor * 6f).Clamped01(); + } + + private protected override void SetShorelineColor(Color previous, Color current) + { + if (previous == current) return; + _ShorelineColorValue = current.MaybeLinear(); + } + + internal static readonly SortedList s_Inputs = new(Helpers.DuplicateComparison); + private protected override SortedList Inputs => s_Inputs; + + [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)] + static void OnLoad() + { + s_Inputs.Clear(); + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/ScatteringLod.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/ScatteringLod.cs.meta new file mode 100644 index 000000000..8d63d360d --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/ScatteringLod.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: deecfdb8a1d08431388635f0e1c8914f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Settings.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Settings.meta new file mode 100644 index 000000000..b36ea00d8 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Settings.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 93bf0c7e03d72494b9ec5ff10d2f178f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Settings/DynamicWavesLodSettings.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Settings/DynamicWavesLodSettings.cs new file mode 100644 index 000000000..3232c99d5 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Settings/DynamicWavesLodSettings.cs @@ -0,0 +1,56 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; + +namespace WaveHarmonic.Crest +{ + /// + /// Settings for fine tuning the . + /// + [CreateAssetMenu(fileName = "DynamicWavesSettings", menuName = "Crest/Simulation Settings/Dynamic Waves")] + [@HelpURL("Manual/Waves.html#dynamic-waves-settings")] + public sealed partial class DynamicWavesLodSettings : LodSettings + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + + [Header("Simulation")] + + [Tooltip("How much energy is dissipated each frame.\n\nHelps simulation stability, but limits how far ripples will propagate. Set this as large as possible/acceptable. Default is 0.05.")] + [@Range(0f, 1f)] + [@GenerateAPI] + [SerializeField] + internal float _Damping = 0.05f; + + [Tooltip("Stability control.\n\nLower values means more stable simulation, but may slow down some dynamic waves. This value should be set as large as possible until simulation instabilities/flickering begin to appear. Default is 0.7.")] + [@Range(0.1f, 1f)] + [@GenerateAPI] + [SerializeField] + internal float _CourantNumber = 0.7f; + + + [Header("Displacement Generation")] + + [Tooltip("Induce horizontal displacements to sharpen simulated waves.")] + [@Range(0f, 20f)] + [@GenerateAPI] + [SerializeField] + internal float _HorizontalDisplace = 3f; + + [Tooltip("Clamp displacement to help prevent self-intersection in steep waves.\n\nZero means unclamped.")] + [@Range(0f, 1f)] + [@GenerateAPI] + [SerializeField] + internal float _DisplaceClamp = 0.3f; + + + [Tooltip("Multiplier for gravity.\n\nMore gravity means dynamic waves will travel faster. Higher values can be a source of instability.")] + [@Range(0f, 64f)] + [@GenerateAPI] + [SerializeField] + internal float _GravityMultiplier = 1f; + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Settings/DynamicWavesLodSettings.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Settings/DynamicWavesLodSettings.cs.meta new file mode 100644 index 000000000..0347cf1de --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Settings/DynamicWavesLodSettings.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7df05608a083e4ad4bc4758f1df0ee29 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 72a325a76c6624c768822a08fe625d55, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Settings/FoamLodSettings.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Settings/FoamLodSettings.cs new file mode 100644 index 000000000..a16908872 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Settings/FoamLodSettings.cs @@ -0,0 +1,76 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; + +namespace WaveHarmonic.Crest +{ + /// + /// Settings for fine tuning the . + /// + [CreateAssetMenu(fileName = "FoamSettings", menuName = "Crest/Simulation Settings/Foam")] + [@HelpURL("Manual/WaterAppearance.html#foam-settings")] + public sealed partial class FoamLodSettings : LodSettings + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + + + [Header("General settings")] + + [Tooltip("Foam will not exceed this value in the simulation which can be used to prevent foam from accumulating too much.")] + [Min(0f)] + [@GenerateAPI] + [SerializeField] + float _Maximum = 10f; + + [Tooltip("How quickly foam dissipates.\n\nLow values mean foam remains on surface for longer. This setting should be balanced with the generation *strength* parameters below.")] + [@Range(0f, 20f)] + [@GenerateAPI] + [SerializeField] + internal float _FoamFadeRate = 0.8f; + + [Header("Whitecaps")] + + [Tooltip("Scales intensity of foam generated from waves.\n\nThis setting should be balanced with the Foam Fade Rate setting.")] + [@Range(0f, 5f)] + [@GenerateAPI] + [SerializeField] + internal float _WaveFoamStrength = 1f; + + [Tooltip("How much of the waves generate foam.\n\nHigher values will lower the threshold for foam generation, giving a larger area.")] + [@Range(0f, 1f)] + [@GenerateAPI] + [SerializeField] + internal float _WaveFoamCoverage = 0.55f; + + [Tooltip("The minimum LOD to sample waves from.\n\nZero means all waves and increasing will exclude lower wavelengths which can help with too much foam near the camera.")] + [@Range(0, Lod.k_MaximumSlices - 2)] + [@GenerateAPI] + [SerializeField] + internal int _FilterWaves = 2; + + + [Header("Shoreline")] + + [Tooltip("Foam will be generated in water shallower than this depth.\n\nControls how wide the band of foam at the shoreline will be. Note that this is not a distance to shoreline, but a threshold on water depth, so the width of the foam band can vary based on terrain slope. To address this limitation we allow foam to be manually added from geometry or from a texture, see the next section.")] + [@Range(0.01f, 3f)] + [@GenerateAPI] + [SerializeField] + internal float _ShorelineFoamMaximumDepth = 0.65f; + + [Tooltip("Scales intensity of foam generated in shallow water.\n\nThis setting should be balanced with the Foam Fade Rate setting.")] + [@Range(0f, 5f)] + [@GenerateAPI] + [SerializeField] + internal float _ShorelineFoamStrength = 2f; + + [Tooltip("Primes foam when terrain height is this value above water.\n\nThis ignores other foam settings and writes a constant foam value.")] + [@Range(0f, 5f, Range.Clamp.Minimum)] + [@GenerateAPI] + [SerializeField] + internal float _ShorelineFoamPriming = 5f; + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Settings/FoamLodSettings.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Settings/FoamLodSettings.cs.meta new file mode 100644 index 000000000..9dacae773 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Settings/FoamLodSettings.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 03aa24b56404b45a190a2cfc0c7cc100 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 72a325a76c6624c768822a08fe625d55, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Settings/LodSettings.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Settings/LodSettings.cs new file mode 100644 index 000000000..c1b9bbed7 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Settings/LodSettings.cs @@ -0,0 +1,15 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; + +namespace WaveHarmonic.Crest +{ + /// + /// Base class for simulation settings. + /// + public abstract partial class LodSettings : ScriptableObject + { + + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Settings/LodSettings.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Settings/LodSettings.cs.meta new file mode 100644 index 000000000..015661965 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/Settings/LodSettings.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 21a1aacea74a443d0a2a6b4ee75e2c25 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/ShadowLod.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/ShadowLod.cs new file mode 100644 index 000000000..10e1b528d --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/ShadowLod.cs @@ -0,0 +1,645 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// BIRP fallback not really tested yet - shaders need fixing up. + +using UnityEngine; +using UnityEngine.Experimental.Rendering; +using UnityEngine.Rendering; +using UnityEngine.Rendering.Universal; +using WaveHarmonic.Crest.Internal; +using WaveHarmonic.Crest.Utility; + +namespace WaveHarmonic.Crest +{ + /// + /// Stores shadowing data to use during water shading. + /// + /// + /// Shadowing is persistent and supports sampling across many frames and jittered + /// sampling for (very) soft shadows. Soft shadows is red, hard shadows is green. + /// + [FilterEnum(nameof(_TextureFormatMode), Filtered.Mode.Exclude, (int)LodTextureFormatMode.Automatic)] + public sealed partial class ShadowLod : Lod + { + [@Space(10)] + + [Tooltip("Whether to vary soft shadow jitter by scattering/absorption density.")] + [@DecoratedField, SerializeField] + bool _DynamicSoftShadows = true; + + [Tooltip("Factor control for dynamic soft jitter.")] + [@Predicated(nameof(_DynamicSoftShadows), hide: true)] + [@Range(0f, 1f, Range.Clamp.Minimum)] + [SerializeField] + float _SoftJitterExtinctionFactor = 0.75f; + + [Tooltip("Jitter diameter for soft shadows, controls softness of this shadowing component.")] + [@Predicated(nameof(_DynamicSoftShadows), hide: true, inverted: true)] + [@Range(0f, k_MaximumJitter)] + [@GenerateAPI] + [SerializeField] + internal float _JitterDiameterSoft = 15f; + + [Tooltip("Current frame weight for accumulation over frames for soft shadows.\n\nRoughly means 'responsiveness' for soft shadows.")] + [@Range(0f, 1f)] + [@GenerateAPI] + [SerializeField] + internal float _CurrentFrameWeightSoft = 0.03f; + + [Tooltip("Jitter diameter for hard shadows, controls softness of this shadowing component.")] + [@Range(0f, k_MaximumJitter)] + [@GenerateAPI] + [SerializeField] + internal float _JitterDiameterHard = 0.6f; + + [Tooltip("Current frame weight for accumulation over frames for hard shadows.\n\nRoughly means 'responsiveness' for hard shadows.")] + [@Range(0f, 1f)] + [@GenerateAPI] + [SerializeField] + internal float _CurrentFrameWeightHard = 0.15f; + + [@Space(10)] + + [Tooltip("Whether to disable the null light warning, use this if you assign it dynamically and expect it to be null at points")] + [@DecoratedField, SerializeField] + internal bool _AllowNullLight = false; + + [Tooltip("Whether to disable the no shadows warning. Use this if you toggle the shadows on the primary light dynamically.")] + [@DecoratedField, SerializeField] + internal bool _AllowNoShadows = false; + + static new class ShaderIDs + { + public static readonly int s_DynamicSoftShadowsFactor = Shader.PropertyToID("g_Crest_DynamicSoftShadowsFactor"); + public static readonly int s_SampleColorMap = Shader.PropertyToID("_Crest_SampleColorMap"); + public static readonly int s_CenterPos = Shader.PropertyToID("_Crest_CenterPos"); + public static readonly int s_Scale = Shader.PropertyToID("_Crest_Scale"); + public static readonly int s_JitterDiameters_CurrentFrameWeights = Shader.PropertyToID("_Crest_JitterDiameters_CurrentFrameWeights"); + public static readonly int s_MainCameraProjectionMatrix = Shader.PropertyToID("_Crest_MainCameraProjectionMatrix"); + public static readonly int s_SimDeltaTime = Shader.PropertyToID("_Crest_SimDeltaTime"); + + // BIRP only. + public static readonly int s_ShadowCastersPresent = Shader.PropertyToID("_Crest_ShadowCastersPresent"); + public static readonly int s_ClearShadows = Shader.PropertyToID("_Crest_ClearShadows"); + } + + const float k_MaximumJitter = 32f; + + internal static readonly Color s_GizmoColor = new(0f, 0f, 0f, 0.5f); + internal static bool s_ProcessData = true; + + internal override string ID => "Shadow"; + internal override string Name => "Shadows"; + internal override Color GizmoColor => s_GizmoColor; + private protected override Color ClearColor => Color.black; + private protected override bool NeedToReadWriteTextureData => true; + internal override int BufferCount => 2; + + private protected override GraphicsFormat RequestedTextureFormat => _TextureFormatMode switch + { + LodTextureFormatMode.Performance => GraphicsFormat.R8G8_UNorm, + LodTextureFormatMode.Precision => GraphicsFormat.R16G16_UNorm, + LodTextureFormatMode.Manual => _TextureFormat, + _ => throw new System.NotImplementedException(), + }; + + Light _Light; + + // SRP version needs access to this externally, hence internal get. + internal CommandBuffer CopyShadowMapBuffer { get; private set; } + PropertyWrapperMaterial[] _RenderMaterial; + + enum Error + { + None, + NoLight, + NoShadows, + IncorrectLightType, + } + + Error _Error; + + internal override void Initialize() + { + if (WaterResources.Instance.Shaders._UpdateShadow == null) + { + _Valid = false; + return; + } + + var isShadowsDisabled = false; + + if (RenderPipelineHelper.IsLegacy) + { + if (QualitySettings.shadows == UnityEngine.ShadowQuality.Disable) + { + isShadowsDisabled = true; + } + } + else if (RenderPipelineHelper.IsUniversal) + { +#if d_UnityURP + var asset = GraphicsSettings.currentRenderPipeline as UniversalRenderPipelineAsset; + + // TODO: Support single casacades as it is possible. + if (asset && asset.shadowCascadeCount < 2) + { + Debug.LogError("Crest shadowing requires shadow cascades to be enabled on the pipeline asset.", asset); + _Valid = false; + return; + } + + if (asset.mainLightRenderingMode == LightRenderingMode.Disabled) + { + Debug.LogError("Crest: Main Light must be enabled to enable water shadowing.", _Water); + _Valid = false; + return; + } + + isShadowsDisabled = !asset.supportsMainLightShadows; +#endif + } + + if (isShadowsDisabled) + { + Debug.LogError("Crest: Shadows must be enabled in the quality settings to enable water shadowing.", _Water); + _Valid = false; + return; + } + + base.Initialize(); + } + + internal override void SetGlobals(bool enable) + { + base.SetGlobals(enable); + Shader.SetGlobalFloat(ShaderIDs.s_DynamicSoftShadowsFactor, 1f); + + if (RenderPipelineHelper.IsLegacy) + { + Helpers.SetGlobalBoolean(ShaderIDs.s_ShadowCastersPresent, true); + } + } + + internal override void Enable() + { + base.Enable(); + + if (RenderPipelineHelper.IsLegacy) + { + Camera.onPreCull -= OnPreCullCamera; + Camera.onPreCull += OnPreCullCamera; + Camera.onPostRender -= OnPostRenderCamera; + Camera.onPostRender += OnPostRenderCamera; + } + + CleanUpShadowCommandBuffers(); + + if (RenderPipelineHelper.IsHighDefinition) + { +#if d_UnityHDRP + SampleShadowsHDRP.Enable(_Water); +#endif + } + else if (RenderPipelineHelper.IsUniversal) + { +#if d_UnityURP + SampleShadowsURP.Enable(); +#endif + } + } + + internal override void Disable() + { + base.Disable(); + + CleanUpShadowCommandBuffers(); + Shader.SetGlobalFloat(ShaderIDs.s_DynamicSoftShadowsFactor, 1f); + + Camera.onPreCull -= OnPreCullCamera; + Camera.onPostRender -= OnPostRenderCamera; + +#if d_UnityHDRP + SampleShadowsHDRP.Disable(); +#endif + +#if d_UnityURP + SampleShadowsURP.Disable(); +#endif + } + + internal override void Destroy() + { + base.Destroy(); + + for (var index = 0; index < _RenderMaterial.Length; index++) + { + Helpers.Destroy(_RenderMaterial[index].Material); + } + } + + private protected override void Allocate() + { + base.Allocate(); + + _Targets.RunLambda(buffer => Clear(buffer)); + + { + _RenderMaterial = new PropertyWrapperMaterial[Slices]; + var shader = WaterResources.Instance.Shaders._UpdateShadow; + for (var i = 0; i < _RenderMaterial.Length; i++) + { + _RenderMaterial[i] = new(shader); + _RenderMaterial[i].SetInteger(Lod.ShaderIDs.s_LodIndex, i); + } + } + + // Enable sample shadows custom pass. + if (RenderPipelineHelper.IsHighDefinition) + { +#if d_UnityHDRP + SampleShadowsHDRP.Enable(_Water); +#endif + } + else if (RenderPipelineHelper.IsUniversal) + { +#if d_UnityURP + SampleShadowsURP.Enable(); +#endif + } + } + + internal override void ClearLodData() + { + base.ClearLodData(); + _Targets.RunLambda(buffer => Clear(buffer)); + } + + void OnPreCullCamera(Camera camera) + { +#if UNITY_EDITOR + // Do not execute when editor is not active to conserve power and prevent possible leaks. + if (!UnityEditorInternal.InternalEditorUtility.isApplicationActive) + { + CopyShadowMapBuffer?.Clear(); + return; + } + + if (!WaterRenderer.IsWithinEditorUpdate) + { + CopyShadowMapBuffer?.Clear(); + return; + } +#endif + + var water = _Water; + + if (water == null) + { + return; + } + + if (!Helpers.MaskIncludesLayer(camera.cullingMask, water.Layer)) + { + return; + } + + if (camera == water.Viewer && CopyShadowMapBuffer != null) + { + // Calling this in OnPreRender was too late to be executed in the same frame. + AddCommandBufferToPrimaryLight(); + + // Disable for XR SPI otherwise input will not have correct world position. + if (camera.stereoEnabled && XRHelpers.IsSinglePass) + { + CopyShadowMapBuffer.DisableShaderKeyword("STEREO_INSTANCING_ON"); + } + + BuildCommandBuffer(water, CopyShadowMapBuffer); + + // Restore XR SPI as we cannot rely on remaining pipeline to do it for us. + if (camera.stereoEnabled && XRHelpers.IsSinglePass) + { + CopyShadowMapBuffer.EnableShaderKeyword("STEREO_INSTANCING_ON"); + } + } + } + + void OnPostRenderCamera(Camera camera) + { +#if UNITY_EDITOR + // Do not execute when editor is not active to conserve power and prevent possible leaks. + if (!UnityEditorInternal.InternalEditorUtility.isApplicationActive) + { + CopyShadowMapBuffer?.Clear(); + return; + } + + if (!WaterRenderer.IsWithinEditorUpdate) + { + CopyShadowMapBuffer?.Clear(); + return; + } +#endif + + var water = _Water; + + if (water == null) + { + return; + } + + if (!Helpers.MaskIncludesLayer(camera.cullingMask, water.Layer)) + { + return; + } + + if (camera == water.Viewer) + { + // CBs added to a light are executed for every camera, but the LOD data is only supports a single + // camera. Removing the CB after the camera renders restricts the CB to one camera. + RemoveCommandBufferFromPrimaryLight(); + } + } + + internal void AddCommandBufferToPrimaryLight() + { + if (_Light == null || CopyShadowMapBuffer == null) return; + _Light.RemoveCommandBuffer(LightEvent.BeforeScreenspaceMask, CopyShadowMapBuffer); + _Light.AddCommandBuffer(LightEvent.BeforeScreenspaceMask, CopyShadowMapBuffer); + } + + internal void RemoveCommandBufferFromPrimaryLight() + { + if (_Light == null || CopyShadowMapBuffer == null) return; + _Light.RemoveCommandBuffer(LightEvent.BeforeScreenspaceMask, CopyShadowMapBuffer); + } + + /// + /// Validates the primary light. + /// + /// + /// Whether the light is valid. An invalid light should be treated as a developer error and not recoverable. + /// + bool ValidateLight() + { + if (_Light == null) + { + if (!_AllowNullLight) + { + if (_Error != Error.NoLight) + { + Debug.LogWarning($"Crest: Primary light must be specified on {nameof(WaterRenderer)} script to enable shadows.", _Water); + _Error = Error.NoLight; + } + return false; + } + + return true; + } + + if (_Light.shadows == LightShadows.None) + { + if (!_AllowNoShadows) + { + if (_Error != Error.NoShadows) + { + Debug.LogWarning("Crest: Shadows must be enabled on primary light to enable water shadowing (types Hard and Soft are equivalent for the water system).", _Light); + _Error = Error.NoShadows; + } + return false; + } + } + + if (_Light.type != LightType.Directional) + { + if (_Error != Error.IncorrectLightType) + { + Debug.LogError("Crest: Primary light must be of type Directional.", _Light); + _Error = Error.IncorrectLightType; + } + return false; + } + + _Error = Error.None; + return true; + } + + /// + /// Stores the primary light. + /// + /// + /// Whether there is a light that casts shadows. + /// + bool SetUpLight() + { + if (_Light == null) + { + _Light = _Water.PrimaryLight; + + if (_Light == null) + { + return false; + } + } + + if (_Light.shadows == LightShadows.None) + { + return false; + } + + return true; + } + + /// + /// May happen if scenes change etc + /// + void ClearBufferIfLightChanged() + { + if (_Light != _Water.PrimaryLight) + { + _Targets.RunLambda(buffer => Clear(buffer)); + CleanUpShadowCommandBuffers(); + _Light = null; + } + } + + void CleanUpShadowCommandBuffers() + { + if (!RenderPipelineHelper.IsLegacy) + { + return; + } + + CopyShadowMapBuffer?.Release(); + CopyShadowMapBuffer = null; + } + + void Update() + { + // If disabled then we hit a failure state. Try and recover in edit mode by proceeding. + if (!_Valid && Application.isPlaying) + { + return; + } + + ClearBufferIfLightChanged(); + + var hasShadowCastingLight = SetUpLight(); + // If in play mode, and this becomes false, then we hit a failed state and will not recover. + _Valid = ValidateLight(); + + if (!s_ProcessData || !_Valid || !hasShadowCastingLight) + { + if (CopyShadowMapBuffer != null) + { + // If we have a command buffer, then there is likely shadow data so we need to clear it. + _Targets.RunLambda(buffer => Clear(buffer)); + CleanUpShadowCommandBuffers(); + } + + return; + } + + CopyShadowMapBuffer ??= new() { name = "Crest Shadow Data" }; + CopyShadowMapBuffer.Clear(); + + FlipBuffers(); + + // clear the shadow collection. it will be overwritten with shadow values IF the shadows render, + // which only happens if there are (nontransparent) shadow receivers around. this is only reliable + // in play mode, so don't do it in edit mode. +#if UNITY_EDITOR + if (Application.isPlaying) +#endif + { + Clear(DataTexture); + } + } + + internal override void BuildCommandBuffer(WaterRenderer water, CommandBuffer buffer) + { + var isSimulationBuffer = buffer == _Water.SimulationBuffer; + + if (isSimulationBuffer) + { + var skip = true; + if (RenderPipelineHelper.IsLegacy) + { + // If no shadow casters are present, BIRP will not execute the command buffer + // leaving outdated shadows in data. We set a flag to determine if the command + // buffer was executed. + skip = Helpers.GetGlobalBoolean(ShaderIDs.s_ShadowCastersPresent); + Helpers.SetGlobalBoolean(ShaderIDs.s_ShadowCastersPresent, false); + } + + Update(); + + // Only do a partial update when called by WaterRenderer as we want to execute + // with the camera's command buffer (in frame). + if (skip) return; + } + + // NOTE: FlipBuffers called elsewhere. + + // Cache the camera for further down. + var camera = water.Viewer; + +#pragma warning disable 618 + using (new ProfilingSample(buffer, isSimulationBuffer ? "Shadows" : "Crest.Shadows")) +#pragma warning restore 618 + { + var jitter = new Vector4 + ( + _JitterDiameterSoft, + _JitterDiameterHard, + _CurrentFrameWeightSoft, + _CurrentFrameWeightHard + ); + + var waterMaterial = _Water.Material; + var hasColor = waterMaterial.HasVector(WaterRenderer.ShaderIDs.s_Absorption) && waterMaterial.HasProperty(WaterRenderer.ShaderIDs.s_Scattering); + var absorption = hasColor ? waterMaterial.GetVector(WaterRenderer.ShaderIDs.s_Absorption).XYZ() : Vector3.zero; + var scattering = hasColor ? ((Vector4)waterMaterial.GetColor(WaterRenderer.ShaderIDs.s_Scattering).MaybeLinear()).XYZ() : Vector3.zero; + var sampleAbsorption = _Water.AbsorptionLod.Enabled; + var sampleScattering = _Water.ScatteringLod.Enabled; + var sampleColor = sampleAbsorption || sampleScattering; + + if (_DynamicSoftShadows && hasColor && !sampleColor) + { + // This approximates varying of soft shadowing by volume scattering/absorption density. + var extinction = absorption + scattering; + var factor = Mathf.Clamp01(Mathf.Min(Mathf.Min(extinction.x, extinction.y), extinction.z) * _SoftJitterExtinctionFactor); + jitter.x = (1f - factor) * k_MaximumJitter; + } + + Shader.SetGlobalFloat(ShaderIDs.s_DynamicSoftShadowsFactor, _DynamicSoftShadows ? _SoftJitterExtinctionFactor : 1f); + + buffer.BeginSample("Sample"); + + for (var slice = Slices - 1; slice >= 0; slice--) + { + _RenderMaterial[slice].SetVector(ShaderIDs.s_CenterPos, _Cascades[slice]._SnappedPosition.XNZ(_Water.SeaLevel)); + var scale = water.CalcLodScale(slice); + _RenderMaterial[slice].SetVector(ShaderIDs.s_Scale, new(scale, 1f, scale)); + _RenderMaterial[slice].SetVector(ShaderIDs.s_JitterDiameters_CurrentFrameWeights, jitter); + _RenderMaterial[slice].SetMatrix(ShaderIDs.s_MainCameraProjectionMatrix, GL.GetGPUProjectionMatrix(camera.projectionMatrix, renderIntoTexture: true) * camera.worldToCameraMatrix); + _RenderMaterial[slice].SetFloat(ShaderIDs.s_SimDeltaTime, Time.deltaTime); + + // Dynamic Soft Shadows. + _RenderMaterial[slice].SetBoolean(ShaderIDs.s_SampleColorMap, _DynamicSoftShadows && sampleColor); + if (_DynamicSoftShadows && sampleColor) + { + _RenderMaterial[slice].SetVector(WaterRenderer.ShaderIDs.s_Absorption, absorption); + _RenderMaterial[slice].SetVector(WaterRenderer.ShaderIDs.s_Scattering, scattering); + } + + _RenderMaterial[slice].SetTexture(_TextureSourceShaderID, _Targets.Previous(1)); + +#if UNITY_EDITOR + // On recompiles this becomes unset even though we run over the code path to set it again... + _RenderMaterial[slice].SetInteger(Lod.ShaderIDs.s_LodIndex, slice); +#endif + + if (RenderPipelineHelper.IsLegacy) + { + // If we are executing the simulation buffer, then we are clearing. + _RenderMaterial[slice].SetBoolean(ShaderIDs.s_ClearShadows, isSimulationBuffer); + } + + Helpers.Blit(buffer, DataTexture, _RenderMaterial[slice].Material, depthSlice: slice); + } + + buffer.EndSample("Sample"); + + // BUG: These draw calls will "leak" and be duplicated before the above blit. They are executed at + // the beginning of this CB before any commands are applied. + SubmitDraws(buffer, s_Inputs, DataTexture); + + // Set the target texture as to make sure we catch the 'pong' each frame + Shader.SetGlobalTexture(_TextureShaderID, DataTexture); + + if (RenderPipelineHelper.IsLegacy && !isSimulationBuffer) + { + buffer.SetGlobalBoolean(ShaderIDs.s_ShadowCastersPresent, true); + } + } + } + + internal ShadowLod() + { + _Enabled = true; + _TextureFormat = GraphicsFormat.R8G8_UNorm; + } + + internal static SortedList s_Inputs = new(Helpers.DuplicateComparison); + private protected override SortedList Inputs => s_Inputs; + + [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)] + static void OnLoad() + { + s_Inputs.Clear(); + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/ShadowLod.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/ShadowLod.cs.meta new file mode 100644 index 000000000..ac9f503a8 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Data/ShadowLod.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 18a4c9a716729461c93494dbfc77c80e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Debug.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Debug.meta new file mode 100644 index 000000000..d5366730a --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Debug.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7bf87413682064486955955cc36a07e1 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Debug/DebugGUI.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Debug/DebugGUI.cs new file mode 100644 index 000000000..fe18658a4 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Debug/DebugGUI.cs @@ -0,0 +1,485 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#if d_UnityInputSystem && ENABLE_INPUT_SYSTEM +#define INPUT_SYSTEM_ENABLED +#endif + +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.InputSystem; +using UnityEngine.SceneManagement; +using WaveHarmonic.Crest.Internal; + +namespace WaveHarmonic.Crest +{ + [@ExecuteDuringEditMode] + [AddComponentMenu(Constants.k_MenuPrefixDebug + "Debug GUI")] + sealed class DebugGUI : ManagedBehaviour + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + + [SerializeField] + bool _ShowWaterData = true; + + [SerializeField] + bool _GuiVisible = true; + + [SerializeField] + bool _DrawLodDatasActualSize = false; + + [UnityEngine.Range(0f, 1f)] + [SerializeField] + float _PausedScroll; + + + [Header("Simulations")] + + [SerializeField] + bool _DrawAnimatedWaves = true; + + [SerializeField] + bool _DrawDynamicWaves = false; + + [SerializeField] + bool _DrawFoam = false; + + [SerializeField] + bool _DrawFlow = false; + + [SerializeField] + bool _DrawShadow = false; + + [SerializeField] + bool _DrawDepth = false; + + [SerializeField] + bool _DrawClip = false; + + + const float k_ScrollBarWidth = 20f; + float _Scroll; + + static readonly float s_LeftPanelWidth = 180f; + static readonly float s_BottomPanelHeight = 25f; + static readonly Color s_GuiColor = Color.black * 0.7f; + + WaterRenderer _Water; + + static class ShaderIDs + { + public static readonly int s_Depth = Shader.PropertyToID("_Depth"); + public static readonly int s_Scale = Shader.PropertyToID("_Scale"); + public static readonly int s_Bias = Shader.PropertyToID("_Bias"); + } + + static readonly Dictionary s_SimulationNames = new(); + + static Material s_DebugArrayMaterial; + static Material DebugArrayMaterial + { + get + { + if (s_DebugArrayMaterial == null) s_DebugArrayMaterial = new(WaterResources.Instance.Shaders._DebugTextureArray); + return s_DebugArrayMaterial; + } + } + + static DebugGUI s_Instance; + + private protected override System.Action OnUpdateMethod => OnUpdate; + + public static bool OverGUI(Vector2 screenPosition) + { + if (s_Instance == null) + { + return false; + } + + // Over left panel. + if (s_Instance._GuiVisible && screenPosition.x < s_LeftPanelWidth) + { + return true; + } + + // Over bottom panel. + if (s_Instance._ShowWaterData && screenPosition.y < s_BottomPanelHeight) + { + return true; + } + + // Over scroll bar. + if (s_Instance._ShowWaterData && screenPosition.x > Screen.width - k_ScrollBarWidth) + { + return true; + } + + return false; + } + + private protected override void Initialize() + { + base.Initialize(); + s_Instance = this; + } + + private protected override void OnDisable() + { + base.OnDisable(); + s_Instance = null; + } + + void OnDestroy() + { + // Safe as there should only be one instance at a time. + Helpers.Destroy(s_DebugArrayMaterial); + } + + Vector3 _ViewerPositionLastFrame; + Vector3 _ViewerVelocity; + + void OnUpdate(WaterRenderer water) + { + _Water = water; + + if (_Water.Viewpoint != null) + { + _ViewerVelocity = (_Water.Viewpoint.position - _ViewerPositionLastFrame) / Time.deltaTime; + _ViewerPositionLastFrame = _Water != null ? _Water.Viewpoint.position : Vector3.zero; + } + + // New input system works even when game view is not focused. + if (!Application.isFocused) + { + return; + } + +#if INPUT_SYSTEM_ENABLED + if (Keyboard.current.gKey.wasPressedThisFrame) +#else + if (Input.GetKeyDown(KeyCode.G)) +#endif + { + ToggleGUI(); + } +#if INPUT_SYSTEM_ENABLED + if (Keyboard.current.fKey.wasPressedThisFrame) +#else + if (Input.GetKeyDown(KeyCode.F)) +#endif + { + Time.timeScale = Time.timeScale == 0f ? 1f : 0f; + } +#if INPUT_SYSTEM_ENABLED + if (Keyboard.current.rKey.wasPressedThisFrame) +#else + if (Input.GetKeyDown(KeyCode.R)) +#endif + { + SceneManager.LoadScene(SceneManager.GetSceneAt(0).buildIndex); + } + } + + void OnGUI() + { + _Water = WaterRenderer.Instance; + + var bkp = GUI.color; + + if (_GuiVisible) + { + GUI.skin.toggle.normal.textColor = Color.white; + GUI.skin.label.normal.textColor = Color.white; + + float x = 5f, y = 0f; + float w = s_LeftPanelWidth - 2f * x, h = 25f; + + GUI.color = s_GuiColor; + GUI.DrawTexture(new(0, 0, w + 2f * x, Screen.height), Texture2D.whiteTexture); + GUI.color = Color.white; + + GUI.changed = false; + var freeze = GUI.Toggle(new(x, y, w, h), Time.timeScale == 0f, "Freeze time (F)"); y += h; + if (GUI.changed) + { + Time.timeScale = freeze ? 0f : 1f; + } + + // Time scale + if (_Water) + { + GUI.Label(new(x, y, w, h), $"Time Scale: {Time.timeScale}"); y += h; + Time.timeScale = GUI.HorizontalSlider(new(x, y, w, h), Time.timeScale, 1f, 30f); y += h; + } + + // Global wind speed + if (_Water) + { + GUI.Label(new(x, y, w, h), "Global Wind Speed"); y += h; + _Water._WindSpeed = GUI.HorizontalSlider(new(x, y, w, h), _Water._WindSpeed, 0f, 150f); y += h; + } + + OnGUIGerstnerSection(x, ref y, w, h); + + _ShowWaterData = GUI.Toggle(new(x, y, w, h), _ShowWaterData, "Show sim data"); y += h; + + AnimatedWavesLod.s_Combine = GUI.Toggle(new(x, y, w, h), AnimatedWavesLod.s_Combine, "Shape combine pass"); y += h; + + ShadowLod.s_ProcessData = GUI.Toggle(new(x, y, w, h), ShadowLod.s_ProcessData, "Process Shadows"); y += h; + + if (_Water) + { + if (_Water._DynamicWavesLod.Enabled) + { + var dt = 1f / _Water._DynamicWavesLod.SimulationFrequency; + var steps = _Water._DynamicWavesLod.LastUpdateSubstepCount; + GUI.Label(new(x, y, w, h), string.Format("Sim steps: {0:0.00000} x {1}", dt, steps)); y += h; + } + + if (_Water.AnimatedWavesLod.Provider is IQueryable querySystem) + { + GUI.Label(new(x, y, w, h), $"Query result GUIDs: {querySystem.ResultGuidCount}"); y += h; + GUI.Label(new(x, y, w, h), $"Queries in flight: {querySystem.RequestCount}"); y += h; + GUI.Label(new(x, y, w, h), $"Query Count: {querySystem.QueryCount}"); y += h; + } + +#if UNITY_EDITOR + if (GUI.Button(new(x, y, w, h), "Select Water Material")) + { + var path = UnityEditor.AssetDatabase.GetAssetPath(_Water.Material); + var asset = UnityEditor.AssetDatabase.LoadMainAssetAtPath(path); + UnityEditor.Selection.activeObject = asset; + } + y += h; +#endif + } + + if (GUI.Button(new(x, y, w, h), "Hide GUI (G)")) + { + ToggleGUI(); + } + y += h; + } + + // draw source textures to screen + if (_ShowWaterData && _Water != null) + { + DrawShapeTargets(); + } + + GUI.color = bkp; + } + + void OnGUIGerstnerSection(float x, ref float y, float w, float h) + { + GUI.Label(new(x, y, w, h), "Gerstner weight(s)"); y += h; + + foreach (var gerstner in ShapeGerstner.s_Instances) + { + var specW = 75f; + gerstner.Value.Weight = GUI.HorizontalSlider(new(x, y, w - specW - 5f, h), gerstner.Value.Weight, 0f, 1f); + +#if UNITY_EDITOR + if (GUI.Button(new(x + w - specW, y, specW, h), "Spectrum")) + { + var path = UnityEditor.AssetDatabase.GetAssetPath(gerstner.Value._Spectrum); + var asset = UnityEditor.AssetDatabase.LoadMainAssetAtPath(path); + UnityEditor.Selection.activeObject = asset; + } +#endif + y += h; + } + + GUI.Label(new(x, y, w, h), $"FFT generator(s): {FFTCompute.GeneratorCount}"); y += h; + } + + void DrawShapeTargets() + { + // Draw bottom panel for toggles + var bottomBar = new Rect(_GuiVisible ? s_LeftPanelWidth : 0, + Screen.height - s_BottomPanelHeight, Screen.width, s_BottomPanelHeight); + GUI.color = s_GuiColor; + GUI.DrawTexture(bottomBar, Texture2D.whiteTexture); + GUI.color = Color.white; + + // Show viewer height above water in bottom panel + bottomBar.x += 10; + GUI.Label(bottomBar, "Viewer Height Above Water: " + _Water.ViewerHeightAboveWater); + + // Viewer speed + { + bottomBar.x += 250; + GUI.Label(bottomBar, "Speed: " + (3.6f * _ViewerVelocity.magnitude) + "km/h"); + } + + // Draw sim data + DrawSims(); + } + + void DrawSims() + { + var column = 1f; + + DrawVerticalScrollBar(); + + DrawSim(_Water._AnimatedWavesLod, ref _DrawAnimatedWaves, ref column, 0.5f); + DrawSim(_Water._DynamicWavesLod, ref _DrawDynamicWaves, ref column, 0.5f, 2f); + DrawSim(_Water._FoamLod, ref _DrawFoam, ref column); + DrawSim(_Water._FlowLod, ref _DrawFlow, ref column, 0.5f, 2f); + DrawSim(_Water._ShadowLod, ref _DrawShadow, ref column); + DrawSim(_Water._DepthLod, ref _DrawDepth, ref column); + DrawSim(_Water._ClipLod, ref _DrawClip, ref column); + } + + void DrawVerticalScrollBar() + { + if (!_DrawLodDatasActualSize) + { + return; + } + + // Data is uniform so use animated waves since it should always be there. + var lodData = _Water._AnimatedWavesLod; + + // Make scroll bar wider as resizable window hover area covers part of it. + var style = GUI.skin.verticalScrollbar; + style.fixedWidth = k_ScrollBarWidth; + + var height = Screen.height - s_BottomPanelHeight; + var rect = new Rect(Screen.width - style.fixedWidth, 0f, style.fixedWidth, height); + + // Background. + GUI.color = s_GuiColor; + GUI.DrawTexture(rect, Texture2D.whiteTexture); + GUI.color = Color.white; + + var scrollSize = lodData.DataTexture.height * lodData.DataTexture.volumeDepth - height; + +#if UNITY_EDITOR + if (UnityEditor.EditorApplication.isPaused) + { + _Scroll = _PausedScroll * scrollSize; + } +#endif + + _Scroll = GUI.VerticalScrollbar + ( + rect, + _Scroll, + size: height, + topValue: 0f, + bottomValue: lodData.DataTexture.height * lodData.DataTexture.volumeDepth, + style + ); + +#if UNITY_EDITOR + if (!UnityEditor.EditorApplication.isPaused) + { + _PausedScroll = Mathf.Clamp01(_Scroll / scrollSize); + } +#endif + } + + void DrawSim(Lod lodData, ref bool doDraw, ref float offset, float bias = 0f, float scale = 1f) + { + if (lodData == null) return; + if (!lodData.Enabled) return; + + // Compute short names that will fit in UI and cache them. + var type = lodData.GetType(); + if (!s_SimulationNames.ContainsKey(type)) + { + s_SimulationNames.Add(type, lodData.ID); + } + + var isRightmost = offset == 1f; + + // Zero out here so we maintain scroll when switching back to actual size. + var scroll = _DrawLodDatasActualSize ? _Scroll : 0f; + + var togglesBegin = Screen.height - s_BottomPanelHeight; + var b = 7f; + var h = _DrawLodDatasActualSize ? lodData.DataTexture.height : togglesBegin / lodData.DataTexture.volumeDepth; + var w = h + b; + var x = Screen.width - w * offset + b * (offset - 1f); + if (_DrawLodDatasActualSize) x -= k_ScrollBarWidth; + + if (doDraw) + { + // Background behind slices + GUI.color = s_GuiColor; + GUI.DrawTexture(new(x, 0, isRightmost ? w : w - b, Screen.height - s_BottomPanelHeight), Texture2D.whiteTexture); + GUI.color = Color.white; + + // Only use Graphics.DrawTexture in EventType.Repaint events if called in OnGUI + if (Event.current.type.Equals(EventType.Repaint)) + { + for (var idx = 0; idx < lodData.DataTexture.volumeDepth; idx++) + { + var y = idx * h; + if (isRightmost) w += b; + + // Render specific slice of 2D texture array + DebugArrayMaterial.SetInteger(ShaderIDs.s_Depth, idx); + DebugArrayMaterial.SetFloat(ShaderIDs.s_Scale, scale); + DebugArrayMaterial.SetFloat(ShaderIDs.s_Bias, bias); + Graphics.DrawTexture(new(x + b, (y + b / 2f) - scroll, h - b, h - b), lodData.DataTexture, DebugArrayMaterial); + } + } + } + + doDraw = GUI.Toggle(new(x + b, togglesBegin, w - 2f * b, s_BottomPanelHeight), doDraw, s_SimulationNames[type]); + + offset++; + } + + public static void DrawTextureArray(RenderTexture data, int columnOffsetFromRightSide, float bias = 0f, float scale = 1f) + { + var offset = columnOffsetFromRightSide; + + var togglesBegin = Screen.height - s_BottomPanelHeight; + var b = 1f; + var h = togglesBegin / data.volumeDepth; + var w = h + b; + var x = Screen.width - w * offset + b * (offset - 1f); + + { + // Background behind slices + GUI.color = s_GuiColor; + GUI.DrawTexture(new(x, 0, offset == 1f ? w : w - b, Screen.height - s_BottomPanelHeight), Texture2D.whiteTexture); + GUI.color = Color.white; + + // Only use Graphics.DrawTexture in EventType.Repaint events if called in OnGUI + if (Event.current.type.Equals(EventType.Repaint)) + { + for (var idx = 0; idx < data.volumeDepth; idx++) + { + var y = idx * h; + if (offset == 1f) w += b; + + // Render specific slice of 2D texture array + DebugArrayMaterial.SetInteger(ShaderIDs.s_Depth, idx); + DebugArrayMaterial.SetFloat(ShaderIDs.s_Scale, scale); + DebugArrayMaterial.SetFloat(ShaderIDs.s_Bias, bias); + Graphics.DrawTexture(new(x + b, y + b / 2f, h - b, h - b), data, DebugArrayMaterial); + } + } + } + } + + void ToggleGUI() + { + _GuiVisible = !_GuiVisible; + } + + [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)] + static void InitStatics() + { + // Init here from 2019.3 onwards + s_SimulationNames.Clear(); + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Debug/DebugGUI.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Debug/DebugGUI.cs.meta new file mode 100644 index 000000000..bde764c0f --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Debug/DebugGUI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4a99f334f87d2427296c00a43de30529 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Generated.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Generated.meta new file mode 100644 index 000000000..66319c513 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Generated.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a07c6d3c380ca4b3190a8f93a15b6acf +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Generated/API.Generated.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Generated/API.Generated.cs new file mode 100644 index 000000000..3a10b657c --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Generated/API.Generated.cs @@ -0,0 +1,1795 @@ +// + +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +namespace WaveHarmonic.Crest +{ + partial class AnimatedWavesLod + { + /// + /// How much waves are dampened in shallow water. + /// + public float AttenuationInShallows { get => _AttenuationInShallows; set => _AttenuationInShallows = value; } + + /// + /// Collision layers to enable. + /// + /// + /// Some layers will have overhead with CPU, GPU and memory. + /// + public CollisionLayers CollisionLayers { get => _CollisionLayers; set => _CollisionLayers = value; } + + /// + /// Where to obtain water shape on CPU for physics / gameplay. + /// + public CollisionSource CollisionSource { get => _CollisionSource; internal set => _CollisionSource = value; } + + /// + /// Maximum number of wave queries that can be performed when using GPU queries. + /// + public int MaximumQueryCount => _MaximumQueryCount; + + /// + /// Any water deeper than this will receive full wave strength. + /// + /// + /// The lower the value, the less effective the depth cache will be at attenuating very large waves. Set to the maximum value (1,000) to disable. + /// + public float ShallowsMaximumDepth { get => _ShallowsMaximumDepth; set => _ShallowsMaximumDepth = value; } + + /// + /// Shifts wavelengths to maintain quality for higher resolutions. + /// + /// + /// Set this to 2 to improve wave quality. In some cases like flowing rivers, this can make a substantial difference to visual stability. We recommend doubling the Resolution on the WaterRenderer component to preserve detail after making this change. + /// + public float WaveResolutionMultiplier { get => _WaveResolutionMultiplier; set => _WaveResolutionMultiplier = value; } + } +} + +namespace WaveHarmonic.Crest +{ + partial class AnimatedWavesLodInput + { + /// + /// When to render the input into the displacement data. + /// + public DisplacementPass DisplacementPass { get => _DisplacementPass; set => _DisplacementPass = value; } + + /// + /// Whether to filter this input by wavelength. + /// + /// + /// If disabled, it will render to all LODs. + /// + public bool FilterByWavelength { get => _FilterByWavelength; set => _FilterByWavelength = value; } + + /// + /// Inform the system how much this input will displace the water surface horizontally. + /// + /// + /// This is used to set bounding box widths for the water chunks. + /// + public float MaximumDisplacementHorizontal { get => _MaximumDisplacementHorizontal; set => _MaximumDisplacementHorizontal = value; } + + /// + /// Inform the system how much this input will displace the water surface vertically. + /// + /// + /// This is used to set bounding box heights for the water chunks. + /// + public float MaximumDisplacementVertical { get => _MaximumDisplacementVertical; set => _MaximumDisplacementVertical = value; } + + /// + /// Which octave to render into. + /// + /// + /// For example, set this to 2 to render into the 2m-4m octave. These refer to the same octaves as the wave spectrum editor. + /// + public float OctaveWavelength { get => _OctaveWavelength; set => _OctaveWavelength = value; } + + /// + /// When to render the input into the displacement data. + /// + /// + /// If enabled, it renders into all LODs of the simulation after the combine step rather than before with filtering. Furthermore, it will also affect dynamic waves. + /// + [System.Obsolete("Please use DisplacementPass instead.")] + public bool RenderPostCombine { get => _RenderPostCombine; set => SetRenderPostCombine(_RenderPostCombine, _RenderPostCombine = value); } + + /// + /// Use the bounding box of an attached renderer component to determine the maximum vertical displacement. + /// + public bool ReportRendererBounds { get => _ReportRendererBounds; set => _ReportRendererBounds = value; } + } +} + +namespace WaveHarmonic.Crest +{ + partial class ClipLod + { + /// + /// The default clipping behaviour. + /// + /// + /// Whether to clip nothing by default (and clip inputs remove patches of surface), or to clip everything by default (and clip inputs add patches of surface). + /// + public DefaultClippingState DefaultClippingState { get => _DefaultClippingState; set => SetDefaultClippingState(_DefaultClippingState, _DefaultClippingState = value); } + } +} + +namespace WaveHarmonic.Crest +{ + partial class ClipLodInput + { + /// + /// Removes clip surface data instead of adding it. + /// + public bool Inverted { get => _Inverted; set => _Inverted = value; } + + /// + /// The primitive to render (signed distance) into the simulation. + /// + public LodInputPrimitive Primitive { get => _Primitive; set => _Primitive = value; } + + /// + /// Prevents inputs from cancelling each other out when aligned vertically. + /// + /// + /// It is imperfect so custom logic might be needed for your use case. + /// + public bool WaterHeightDistanceCulling { get => _WaterHeightDistanceCulling; set => _WaterHeightDistanceCulling = value; } + } +} + +namespace WaveHarmonic.Crest +{ + partial class ColorLod + { + /// + /// Color of the shoreline color. + /// + public UnityEngine.Color ShorelineColor { get => _ShorelineColor; set => SetShorelineColor(_ShorelineColor, _ShorelineColor = value); } + + /// + /// Shoreline color falloff value. + /// + public float ShorelineColorFalloff { get => _ShorelineColorFalloff; set => _ShorelineColorFalloff = value; } + + /// + /// The maximum distance of the shoreline color. + /// + /// + /// If using Depth, then it is maximum depth. + /// + public float ShorelineColorMaximumDistance { get => _ShorelineColorMaximumDistance; set => _ShorelineColorMaximumDistance = value; } + + /// + /// Source of the shoreline color. + /// + public ShorelineVolumeColorSource ShorelineColorSource { get => _ShorelineColorSource; set => _ShorelineColorSource = value; } + } +} + +namespace WaveHarmonic.Crest +{ + partial class CustomTimeProvider + { + /// + /// The delta time override value. + /// + public float DeltaTime { get => _DeltaTime; set => _DeltaTime = value; } + + /// + /// Whether to override the water simulation time. + /// + /// + /// This in particular affects dynamic elements of the simulation like the foam simulation and the ripple simulation. + /// + public bool OverrideDeltaTime { get => _OverrideDeltaTime; set => _OverrideDeltaTime = value; } + + /// + /// Whether to override the water simulation time. + /// + public bool OverrideTime { get => _OverrideTime; set => _OverrideTime = value; } + + /// + /// Freeze progression of time. Only works properly in Play mode. + /// + public bool Paused { get => _Paused; set => _Paused = value; } + + /// + /// The time override value. + /// + public float TimeOverride { get => _Time; set => _Time = value; } + } +} + +namespace WaveHarmonic.Crest +{ + partial class CutsceneTimeProvider + { + /// + /// Assign this time provider to the water system when this component becomes active. + /// + public bool AssignToWaterComponentOnEnable { get => _AssignToWaterComponentOnEnable; set => _AssignToWaterComponentOnEnable = value; } + +#if d_ModuleUnityDirector + /// + /// Playable Director to take time from. + /// + public UnityEngine.Playables.PlayableDirector PlayableDirector { get => _PlayableDirector; set => _PlayableDirector = value; } +#endif + + /// + /// Restore the time provider that was previously assigned to water system when this component disables. + /// + public bool RestorePreviousTimeProviderOnDisable { get => _RestorePreviousTimeProviderOnDisable; set => _RestorePreviousTimeProviderOnDisable = value; } + + /// + /// Time offset which will be added to the Timeline time. + /// + public float TimeOffset { get => _TimeOffset; set => _TimeOffset = value; } + } +} + +namespace WaveHarmonic.Crest +{ + partial class DepthLod + { + /// + /// Support signed distance field data generated from the depth probes. + /// + /// + /// Requires a two component texture format. + /// + public bool EnableSignedDistanceFields { get => _EnableSignedDistanceFields; set => SetEnableSignedDistanceFields(_EnableSignedDistanceFields, _EnableSignedDistanceFields = value); } + } +} + +namespace WaveHarmonic.Crest +{ + partial class DepthLodInput + { + /// + /// Whether to copy the signed distance field. + /// + public bool CopySignedDistanceField { get => _CopySignedDistanceField; set => _CopySignedDistanceField = value; } + + /// + /// Whether the data is relative to the input height. + /// + /// + /// Useful for procedural placement. + /// + public bool Relative { get => _Relative; set => _Relative = value; } + } +} + +namespace WaveHarmonic.Crest +{ + partial class DepthProbe + { + /// + /// How many additional Jump Flood rounds to use. + /// + /// + /// The standard number of rounds is log2(resolution). Additional rounds can reduce innaccuracies. + /// + public int AdditionalJumpFloodRounds { get => _AdditionalJumpFloodRounds; set => SetDirty(_AdditionalJumpFloodRounds, _AdditionalJumpFloodRounds = value); } + + /// + /// The far and near plane of the depth probe camera respectively, relative to the transform. + /// + /// + /// Depth is captured top-down and orthographically. The gizmo will visualize this range as the bottom box. + /// + public UnityEngine.Vector2 CaptureRange { get => _CaptureRange; set => SetDirty(_CaptureRange, _CaptureRange = value); } + + /// + /// Increase coverage by testing mesh back faces within the Fill Holes area. + /// + /// + /// Uses the back-faces to include meshes where the front-face is within the Fill Holes area and the back-face is within the capture area. An example would be an upright cylinder not over a hole but was not captured due to the top being clipped by the near plane. + /// + public bool EnableBackFaceInclusion { get => _EnableBackFaceInclusion; set => SetDirty(_EnableBackFaceInclusion, _EnableBackFaceInclusion = value); } + + /// + /// Fills holes left by the maximum of the capture range. + /// + /// + /// Setting the maximum capture range lower than the highest point of geometry can be useful for eliminating depth artifacts from overhangs, but the side effect is there will be a hole in the depth data where geometry is clipped by the near plane. This will only capture where the holes are to fill them in. This height is relative to the maximum capture range. Set to zero to skip. + /// + public float FillHolesCaptureHeight { get => _FillHolesCaptureHeight; set => SetDirty(_FillHolesCaptureHeight, _FillHolesCaptureHeight = value); } + + /// + /// Generate a signed distance field for the shoreline. + /// + public bool GenerateSignedDistanceField { get => _GenerateSignedDistanceField; set => SetDirty(_GenerateSignedDistanceField, _GenerateSignedDistanceField = value); } + + /// + /// The layers to render into the probe. + /// + public UnityEngine.LayerMask Layers { get => _Layers; set => SetDirty(_Layers, _Layers = value); } + + /// + /// Overrides global quality settings. + /// + public QualitySettingsOverride QualitySettingsOverride => _QualitySettingsOverride; + + /// + /// Controls how the probe is refreshed in the Player. + /// + /// + /// Call Populate() if scripting. + /// + public DepthProbeRefreshMode RefreshMode { get => _RefreshMode; set => _RefreshMode = value; } + + /// + /// The resolution of the probe. + /// + /// + /// Lower will be more efficient. + /// + public int Resolution { get => _Resolution; set => SetDirty(_Resolution, _Resolution = value); } + + /// + /// Baked probe. + /// + /// + /// Can only bake in edit mode. + /// + public UnityEngine.Texture2D SavedTexture { get => _SavedTexture; set => _SavedTexture = value; } + + /// + /// Specifies the setup for this probe. + /// + public DepthProbeMode Type { get => _Type; set => _Type = value; } + } +} + +namespace WaveHarmonic.Crest +{ + partial class DirectionalTextureLodInputData + { + /// + /// Whether the texture supports negative values. + /// + public bool NegativeValues { get => _NegativeValues; set => _NegativeValues = value; } + } +} + +namespace WaveHarmonic.Crest +{ + partial class DynamicWavesLod + { + /// + /// How much waves are dampened in shallow water. + /// + public float AttenuationInShallows { get => _AttenuationInShallows; set => _AttenuationInShallows = value; } + + /// + /// Settings for fine tuning this simulation. + /// + public DynamicWavesLodSettings Settings { get => GetSettings(); set => _Settings = value; } + } +} + +namespace WaveHarmonic.Crest +{ + partial class DynamicWavesLodSettings + { + /// + /// Stability control. + /// + /// + /// Lower values means more stable simulation, but may slow down some dynamic waves. This value should be set as large as possible until simulation instabilities/flickering begin to appear. Default is 0.7. + /// + public float CourantNumber { get => _CourantNumber; set => _CourantNumber = value; } + + /// + /// How much energy is dissipated each frame. + /// + /// + /// Helps simulation stability, but limits how far ripples will propagate. Set this as large as possible/acceptable. Default is 0.05. + /// + public float Damping { get => _Damping; set => _Damping = value; } + + /// + /// Clamp displacement to help prevent self-intersection in steep waves. + /// + /// + /// Zero means unclamped. + /// + public float DisplaceClamp { get => _DisplaceClamp; set => _DisplaceClamp = value; } + + /// + /// Multiplier for gravity. + /// + /// + /// More gravity means dynamic waves will travel faster. Higher values can be a source of instability. + /// + public float GravityMultiplier { get => _GravityMultiplier; set => _GravityMultiplier = value; } + + /// + /// Induce horizontal displacements to sharpen simulated waves. + /// + public float HorizontalDisplace { get => _HorizontalDisplace; set => _HorizontalDisplace = value; } + } +} + +namespace WaveHarmonic.Crest +{ + partial class FloatingObject + { + /// + /// Approximate hydrodynamics of 'surfing' down waves. + /// + public float AccelerateDownhill { get => _AccelerateDownhill; set => _AccelerateDownhill = value; } + + /// + /// Angular drag when in water. + /// + /// + /// Additive to the angular drag declared on the rigid body. + /// + public float AngularDrag { get => _AngularDrag; set => _AngularDrag = value; } + + /// + /// Strength of buoyancy force. + /// + /// + /// For probes, roughly a mass to force ratio of 100 to 1 to keep the center of mass near the surface. For Align Normal, default value is for a default sphere with a default rigidbody. + /// + public float BuoyancyForceStrength { get => _BuoyancyForceStrength; set => _BuoyancyForceStrength = value; } + + /// + /// Strength of torque applied to match boat orientation to water normal. + /// + public float BuoyancyTorqueStrength { get => _BuoyancyTorqueStrength; set => _BuoyancyTorqueStrength = value; } + + /// + /// Height offset from transform center to bottom of boat (if any). + /// + /// + /// Default value is for a default sphere. Having this value be an accurate measurement from center to bottom is not necessary. + /// + public float CenterToBottomOffset { get => _CenterToBottomOffset; set => _CenterToBottomOffset = value; } + + /// + /// Drag when in water. + /// + /// + /// Additive to the drag declared on the rigid body. + /// + public UnityEngine.Vector3 Drag { get => _Drag; set => _Drag = value; } + + /// + /// Vertical offset for where drag force should be applied. + /// + public float ForceHeightOffset { get => _ForceHeightOffset; set => _ForceHeightOffset = value; } + + /// + /// Which water collision layer to target. + /// + public CollisionLayer Layer { get => _Layer; set => _Layer = value; } + + /// + /// Clamps the buoyancy force to this value. + /// + /// + /// Useful for handling fully submerged objects. + /// + public float MaximumBuoyancyForce { get => _MaximumBuoyancyForce; set => _MaximumBuoyancyForce = value; } + + /// + /// The model to use for buoyancy. + /// + /// + /// Align Normal is simple and only uses a few queries whilst Probes is more advanced and uses a few queries per probe. Cannot be changed at runtime after Start. + /// + public FloatingObjectModel Model { get => _Model; set => _Model = value; } + + /// + /// Length dimension of boat. + /// + /// + /// Only used if Use Boat Length is enabled. + /// + public float ObjectLength { get => _ObjectLength; set => _ObjectLength = value; } + + /// + /// Width of object for physics purposes. + /// + /// + /// The larger this value, the more filtered/smooth the wave response will be. If larger wavelengths cannot be filtered, increase the LOD Levels + /// + public float ObjectWidth { get => _ObjectWidth; set => _ObjectWidth = value; } + + /// + /// Query points for buoyancy. + /// + /// + /// Only applicable to Probes model. + /// + public FloatingObjectProbe[] Probes { get => _Probes; set => _Probes = value; } + + /// + /// The rigid body to affect. + /// + /// + /// It will automatically get the sibling rigid body if not set. + /// + public UnityEngine.Rigidbody RigidBody { get => _RigidBody; set => _RigidBody = value; } + + /// + /// Computes a separate normal based on boat length to get more accurate orientations. + /// + /// + /// Requires the cost of an extra collision sample. + /// + public bool UseObjectLength { get => _UseObjectLength; set => _UseObjectLength = value; } + } +} + +namespace WaveHarmonic.Crest +{ + partial class FoamLod + { + /// + /// Prewarms the simulation on load and teleports. + /// + /// + /// Results are only an approximation. + /// + public bool Prewarm { get => _Prewarm; set => _Prewarm = value; } + + /// + /// Settings for fine tuning this simulation. + /// + public FoamLodSettings Settings { get => GetSettings(); set => _Settings = value; } + } +} + +namespace WaveHarmonic.Crest +{ + partial class FoamLodSettings + { + /// + /// The minimum LOD to sample waves from. + /// + /// + /// Zero means all waves and increasing will exclude lower wavelengths which can help with too much foam near the camera. + /// + public int FilterWaves { get => _FilterWaves; set => _FilterWaves = value; } + + /// + /// How quickly foam dissipates. + /// + /// + /// Low values mean foam remains on surface for longer. This setting should be balanced with the generation *strength* parameters below. + /// + public float FoamFadeRate { get => _FoamFadeRate; set => _FoamFadeRate = value; } + + /// + /// Foam will not exceed this value in the simulation which can be used to prevent foam from accumulating too much. + /// + public float Maximum { get => _Maximum; set => _Maximum = value; } + + /// + /// Foam will be generated in water shallower than this depth. + /// + /// + /// Controls how wide the band of foam at the shoreline will be. Note that this is not a distance to shoreline, but a threshold on water depth, so the width of the foam band can vary based on terrain slope. To address this limitation we allow foam to be manually added from geometry or from a texture, see the next section. + /// + public float ShorelineFoamMaximumDepth { get => _ShorelineFoamMaximumDepth; set => _ShorelineFoamMaximumDepth = value; } + + /// + /// Primes foam when terrain height is this value above water. + /// + /// + /// This ignores other foam settings and writes a constant foam value. + /// + public float ShorelineFoamPriming { get => _ShorelineFoamPriming; set => _ShorelineFoamPriming = value; } + + /// + /// Scales intensity of foam generated in shallow water. + /// + /// + /// This setting should be balanced with the Foam Fade Rate setting. + /// + public float ShorelineFoamStrength { get => _ShorelineFoamStrength; set => _ShorelineFoamStrength = value; } + + /// + /// How much of the waves generate foam. + /// + /// + /// Higher values will lower the threshold for foam generation, giving a larger area. + /// + public float WaveFoamCoverage { get => _WaveFoamCoverage; set => _WaveFoamCoverage = value; } + + /// + /// Scales intensity of foam generated from waves. + /// + /// + /// This setting should be balanced with the Foam Fade Rate setting. + /// + public float WaveFoamStrength { get => _WaveFoamStrength; set => _WaveFoamStrength = value; } + } +} + +namespace WaveHarmonic.Crest +{ + partial class GeometryLodInputData + { + /// + /// Geometry to render into the simulation. + /// + public UnityEngine.Mesh Geometry { get => _Geometry; set => SetGeometry(_Geometry, _Geometry = value); } + } +} + +namespace WaveHarmonic.Crest +{ + partial class LevelLodInput + { + /// + /// The minimum and maximum height value to report for water chunk culling. + /// + public UnityEngine.Vector2 HeightRange { get => _HeightRange; set => _HeightRange = value; } + + /// + /// Whether to use the manual "Height Range" for water chunk culling. + /// + /// + /// Mandatory for non mesh inputs like "Texture". + /// + public bool OverrideHeight { get => _OverrideHeight; set => _OverrideHeight = value; } + } +} + +namespace WaveHarmonic.Crest +{ + partial class Lod + { + /// + /// Whether the simulation is enabled. + /// + public bool Enabled { get => GetEnabled(); set => SetEnabled(_Enabled, _Enabled = value); } + + /// + /// Whether to override the resolution. + /// + /// + /// If not enabled, then the simulation will use the resolution defined on the Water Renderer. + /// + public bool OverrideResolution { get => _OverrideResolution; set => SetDirty(_OverrideResolution, _OverrideResolution = value); } + + /// + /// The resolution of the simulation data. + /// + /// + /// Set higher for sharper results at the cost of higher memory usage. + /// + public int Resolution { get => GetResolution(); set => SetDirty(_Resolution, _Resolution = value); } + + /// + /// The render texture format used for this simulation data. + /// + /// + /// It will be overriden if the format is incompatible with the platform. + /// + public UnityEngine.Experimental.Rendering.GraphicsFormat TextureFormat { get => _TextureFormat; set => SetDirty(_TextureFormat, _TextureFormat = value); } + + /// + /// Chooses a texture format based on a preset value. + /// + public LodTextureFormatMode TextureFormatMode { get => _TextureFormatMode; set => SetDirty(_TextureFormatMode, _TextureFormatMode = value); } + } +} + +namespace WaveHarmonic.Crest +{ + partial class LodInput + { + /// + /// How this input blends into existing data. + /// + /// + /// Similar to blend operations in shaders. For inputs which have materials, use the blend functionality on the shader/material. + /// + public LodInputBlend Blend { get => _Blend; set => _Blend = value; } + + /// + /// The width of the feathering to soften the edges to blend inputs. + /// + /// + /// Inputs that do not support feathering will have this field disabled or hidden in UI. + /// + public float FeatherWidth { get => _FeatherWidth; set => _FeatherWidth = value; } + + /// + /// How this input responds to horizontal displacement. + /// + /// + /// If false, data will not move horizontally with the waves. Has a small performance overhead when disabled. Only suitable for inputs of small size. + /// + public bool FollowHorizontalWaveMotion { get => _FollowHorizontalWaveMotion; set => _FollowHorizontalWaveMotion = value; } + + /// + /// The mode for this input. + /// + /// + /// See the manual for more details about input modes. Use AddComponent(LodInputMode) to set the mode via scripting. The mode cannot be changed after creation. + /// + public LodInputMode Mode => _Mode; + + /// + /// The order this input will render. + /// + /// + /// Order is Queue plus SiblingIndex + /// + public int Queue { get => _Queue; set => SetQueue(_Queue, _Queue = value); } + + /// + /// Scales the input. + /// + public float Weight { get => _Weight; set => _Weight = value; } + } +} + +namespace WaveHarmonic.Crest +{ + partial class PersistentLod + { + /// + /// Frequency to run the simulation, in updates per second. + /// + /// + /// Lower frequencies are more efficient but may lead to visible jitter or slowness. + /// + public int SimulationFrequency { get => _SimulationFrequency; set => _SimulationFrequency = value; } + } +} + +namespace WaveHarmonic.Crest +{ + partial class QualitySettingsOverride + { + /// + /// Overrides the LOD bias for meshes. + /// + /// + /// Highest quality is infinity. + /// + public float LodBias { get => _LodBias; set => _LodBias = value; } + + /// + /// Overrides the maximum LOD level. + /// + /// + /// Highest quality is zero. + /// + public int MaximumLodLevel { get => _MaximumLodLevel; set => _MaximumLodLevel = value; } + + /// + /// Whether to override the LOD bias. + /// + public bool OverrideLodBias { get => _OverrideLodBias; set => _OverrideLodBias = value; } + + /// + /// Whether to override the maximum LOD level. + /// + public bool OverrideMaximumLodLevel { get => _OverrideMaximumLodLevel; set => _OverrideMaximumLodLevel = value; } + + /// + /// Whether to override the terrain pixel error. + /// + public bool OverrideTerrainPixelError { get => _OverrideTerrainPixelError; set => _OverrideTerrainPixelError = value; } + + /// + /// Overrides the pixel error value for terrains. + /// + /// + /// Highest quality is zero. + /// + public float TerrainPixelError { get => _TerrainPixelError; set => _TerrainPixelError = value; } + } +} + +namespace WaveHarmonic.Crest +{ + partial class QueryEvents + { + /// + /// Sends the distance from the water's edge. + /// + public System.Action DistanceFromEdge { get; set; } + + /// + /// Apply a curve to the distance. + /// + /// + /// Values towards "one" means closer to the water's edge. + /// + public UnityEngine.AnimationCurve DistanceFromEdgeCurve { get => _DistanceFromEdgeCurve; set => _DistanceFromEdgeCurve = value; } + + /// + /// The maximum distance. + /// + /// + /// Always use a real distance in real units (ie not normalized). + /// + public float DistanceFromEdgeMaximum { get => _DistanceFromEdgeMaximum; set => _DistanceFromEdgeMaximum = value; } + + /// + /// Whether to keep the sign of the value (ie positive/negative). + /// + /// + /// A positive value means the query point is over water, while a negative means it is over land. + /// + public bool DistanceFromEdgeSigned { get => _DistanceFromEdgeSigned; set => _DistanceFromEdgeSigned = value; } + + /// + /// Apply a curve to the distance. + /// + /// + /// Normalizes and inverts the distance to be between zero and one, then applies a curve. + /// + public bool DistanceFromEdgeUseCurve { get => _DistanceFromEdgeUseCurve; set => _DistanceFromEdgeUseCurve = value; } + + /// + /// Sends the distance from the water surface. + /// + public System.Action DistanceFromSurface { get; set; } + + /// + /// Apply a curve to the distance. + /// + /// + /// Values towards "one" means closer to the water surface. + /// + public UnityEngine.AnimationCurve DistanceFromSurfaceCurve { get => _DistanceFromSurfaceCurve; set => _DistanceFromSurfaceCurve = value; } + + /// + /// The maximum distance. + /// + /// + /// Always use a real distance in real units (ie not normalized). + /// + public float DistanceFromSurfaceMaximum { get => _DistanceFromSurfaceMaximum; set => _DistanceFromSurfaceMaximum = value; } + + /// + /// Whether to keep the sign of the value (ie positive/negative). + /// + /// + /// A positive value means the query point is above the surface, while a negative means it below the surface. + /// + public bool DistanceFromSurfaceSigned { get => _DistanceFromSurfaceSigned; set => _DistanceFromSurfaceSigned = value; } + + /// + /// Whether to apply a curve to the distance. + /// + /// + /// Normalizes and inverts the distance to be between zero and one, then applies a curve. + /// + public bool DistanceFromSurfaceUseCurve { get => _DistanceFromSurfaceUseCurve; set => _DistanceFromSurfaceUseCurve = value; } + + /// + /// Which water collision layer to target. + /// + public CollisionLayer Layer { get => _Layer; set => _Layer = value; } + + /// + /// The minimum wavelength for queries. + /// + /// + /// The higher the value, the more smaller waves will be ignored when sampling the water surface. + /// + public float MinimumWavelength { get => _MinimumWavelength; set => _MinimumWavelength = value; } + + /// + /// Triggers when game object goes above water surface. + /// + /// + /// Triggers once per state change. + /// + public System.Action OnAboveWater { get; set; } + + /// + /// Triggers when game object goes below water surface. + /// + /// + /// Triggers once per state change. + /// + public System.Action OnBelowWater { get; set; } + + /// + /// What transform should the queries be based on. + /// + /// + /// "Viewer" will reuse queries already performed by the Water Renderer + /// + public QuerySource Source { get => _Source; set => _Source = value; } + } +} + +namespace WaveHarmonic.Crest +{ + partial class RendererLodInputData + { + /// + /// Check that the shader applied to this object matches the input type. + /// + /// + /// For example, an Animated Waves input object has an Animated Waves input shader. + /// + public bool CheckShaderName { get => _CheckShaderName; set => _CheckShaderName = value; } + + /// + /// Check that the shader applied to this object has only a single pass, as only the first pass is executed for most inputs. + /// + public bool CheckShaderPasses { get => _CheckShaderPasses; set => _CheckShaderPasses = value; } + + /// + /// Forces the renderer to only render into the LOD data, and not to render in the scene as it normally would. + /// + public bool DisableRenderer { get => _DisableRenderer; set => SetDisableRenderer(_DisableRenderer, _DisableRenderer = value); } + + /// + /// Whether to set the shader pass manually. + /// + public bool OverrideShaderPass { get => _OverrideShaderPass; set => _OverrideShaderPass = value; } + + /// + /// The renderer to use for this input. + /// + /// + /// Can be anything that inherits from Renderer like MeshRenderer, TrailRenderer etc. + /// + public UnityEngine.Renderer Renderer { get => _Renderer; set => SetRenderer(_Renderer, _Renderer = value); } + + /// + /// The shader pass to execute. + /// + /// + /// Set to -1 to execute all passes. + /// + public int ShaderPassIndex { get => _ShaderPassIndex; set => _ShaderPassIndex = value; } + } +} + +namespace WaveHarmonic.Crest +{ + partial class ShadowLod + { + /// + /// Current frame weight for accumulation over frames for hard shadows. + /// + /// + /// Roughly means 'responsiveness' for hard shadows. + /// + public float CurrentFrameWeightHard { get => _CurrentFrameWeightHard; set => _CurrentFrameWeightHard = value; } + + /// + /// Current frame weight for accumulation over frames for soft shadows. + /// + /// + /// Roughly means 'responsiveness' for soft shadows. + /// + public float CurrentFrameWeightSoft { get => _CurrentFrameWeightSoft; set => _CurrentFrameWeightSoft = value; } + + /// + /// Jitter diameter for hard shadows, controls softness of this shadowing component. + /// + public float JitterDiameterHard { get => _JitterDiameterHard; set => _JitterDiameterHard = value; } + + /// + /// Jitter diameter for soft shadows, controls softness of this shadowing component. + /// + public float JitterDiameterSoft { get => _JitterDiameterSoft; set => _JitterDiameterSoft = value; } + } +} + +namespace WaveHarmonic.Crest +{ + partial class ShapeFFT + { + /// + /// Maximum amount a point on the surface will be displaced horizontally by waves from its rest position. + /// + /// + /// Increase this if gaps appear at sides of screen. + /// + public float MaximumHorizontalDisplacement { get => _MaximumHorizontalDisplacement; set => _MaximumHorizontalDisplacement = value; } + + /// + /// Maximum amount the surface will be displaced vertically from sea level. + /// + /// + /// Increase this if gaps appear at bottom of screen. + /// + public float MaximumVerticalDisplacement { get => _MaximumVerticalDisplacement; set => _MaximumVerticalDisplacement = value; } + + /// + /// FFT waves will loop with a period of this many seconds. + /// + public float TimeLoopLength { get => _TimeLoopLength; set => _TimeLoopLength = value; } + + /// + /// How aligned the waves are with wind. + /// + public float WindAlignment { get => _WindAlignment; set => _WindAlignment = value; } + + /// + /// How turbulent/chaotic the waves are. + /// + public float WindTurbulence { get => _WindTurbulence; set => _WindTurbulence = value; } + } +} + +namespace WaveHarmonic.Crest +{ + partial class ShapeGerstner + { + /// + /// How many wave components to generate in each octave. + /// + public int ComponentsPerOctave { get => _ComponentsPerOctave; set => _ComponentsPerOctave = value; } + + /// + /// Change to get a different set of waves. + /// + public int RandomSeed { get => _RandomSeed; set => _RandomSeed = value; } + + /// + /// The weight of the opposing, second pair of Gerstner waves. + /// + /// + /// Each Gerstner wave is actually a pair of waves travelling in opposite directions (similar to FFT). This weight is applied to the wave travelling in against-wind direction. Set to zero to obtain simple single waves which are useful for shorelines waves. + /// + public float ReverseWaveWeight { get => _ReverseWaveWeight; set => _ReverseWaveWeight = value; } + } +} + +namespace WaveHarmonic.Crest +{ + partial class ShapeWaves + { + /// + /// Whether to evaluate the spectrum every frame. + /// + /// + /// When false, the wave spectrum is evaluated once on startup in editor play mode and standalone builds, rather than every frame. This is less flexible, but it reduces the performance cost significantly. + /// + public bool EvaluateSpectrumAtRunTimeEveryFrame { get => _EvaluateSpectrumAtRunTimeEveryFrame; set => _EvaluateSpectrumAtRunTimeEveryFrame = value; } + + /// + /// Whether to use the wind speed on this component rather than the global wind speed. + /// + /// + /// Global wind speed comes from the Water Renderer component. + /// + public bool OverrideGlobalWindSpeed { get => _OverrideGlobalWindSpeed; set => _OverrideGlobalWindSpeed = value; } + + /// + /// Resolution to use for wave generation buffers. + /// + /// + /// Low resolutions are more efficient but can result in noticeable patterns in the shape. + /// + public int Resolution { get => _Resolution; set => _Resolution = value; } + + /// + /// How much these waves respect the shallow water attenuation. + /// + /// + /// Attenuation is defined on the Animated Waves. Set to zero to ignore attenuation. + /// + public float RespectShallowWaterAttenuation { get => _RespectShallowWaterAttenuation; set => _RespectShallowWaterAttenuation = value; } + + /// + /// The spectrum that defines the water surface shape. + /// + public WaveSpectrum Spectrum { get => _Spectrum; set => _Spectrum = value; } + + /// + /// Primary wave direction heading (degrees). + /// + /// + /// This is the angle from x axis in degrees that the waves are oriented towards. If a spline is being used to place the waves, this angle is relative to the spline. + /// + public float WaveDirectionHeadingAngle { get => _WaveDirectionHeadingAngle; set => _WaveDirectionHeadingAngle = value; } + + /// + /// Wind speed in km/h. Controls wave conditions. + /// + public float WindSpeed { get => _WindSpeed; set => _WindSpeed = value; } + } +} + +namespace WaveHarmonic.Crest +{ + partial class SphereWaterInteraction + { + /// + /// Whether to improve visibility in larger LODs. + /// + /// + /// If the dynamic waves are not visible far enough in the distance from the camera, this can be used to boost the output. + /// + public bool BoostLargeWaves { get => _BoostLargeWaves; set => _BoostLargeWaves = value; } + + /// + /// How much to correct the position for horizontal wave displacement. + /// + /// + /// If set to 0, the input will always be applied at a fixed position before any horizontal displacement from waves. If waves are large then their displacement may cause the interactive waves to drift away from the object. This parameter can be increased to compensate for this displacement and combat this issue. However increasing too far can cause a feedback loop which causes strong 'ring' artifacts to appear in the dynamic waves. This parameter can be tweaked to balance this two effects. + /// + public float CompensateForWaveMotion { get => _CompensateForWaveMotion; set => _CompensateForWaveMotion = value; } + + /// + /// Model parameter that can be used to modify the shape of the interaction. + /// + /// + /// Internally the interaction is modelled by a pair of nested spheres. The forces from the two spheres combine to create the final effect. This parameter scales the effect of the inner sphere and can be tweaked to adjust the shape of the result. + /// + public float InnerSphereMultiplier { get => _InnerSphereMultiplier; set => _InnerSphereMultiplier = value; } + + /// + /// Model parameter that can be used to modify the shape of the interaction. + /// + /// + /// This parameter controls the size of the inner sphere and can be tweaked to give further control over the result. + /// + public float InnerSphereOffset { get => _InnerSphereOffset; set => _InnerSphereOffset = value; } + + /// + /// Maximum speed clamp (km/h). + /// + /// + /// Useful for controlling/limiting wake. + /// + public float MaximumSpeed { get => _MaximumSpeed; set => _MaximumSpeed = value; } + + /// + /// Radius of the sphere that is modelled from which the interaction forces are calculated. + /// + public float Radius { get => _Radius; set => _Radius = value; } + + /// + /// Teleport speed (km/h). + /// + /// + /// If the calculated speed is larger than this amount, the object is deemed to have teleported and the computed velocity is discarded. + /// + public float TeleportSpeed { get => _TeleportSpeed; set => _TeleportSpeed = value; } + + /// + /// Offset in direction of motion to help ripples appear in front of sphere. + /// + /// + /// There is some latency between applying a force to the wave simualtion and the resulting waves appearing. Applying this offset can help to ensure the waves do not lag behind the sphere. + /// + public float VelocityOffset { get => _VelocityOffset; set => _VelocityOffset = value; } + + /// + /// Outputs a warning to the console on speed clamp. + /// + public bool WarnOnSpeedClamp { get => _WarnOnSpeedClamp; set => _WarnOnSpeedClamp = value; } + + /// + /// Outputs a warning to the console on teleport. + /// + public bool WarnOnTeleport { get => _WarnOnTeleport; set => _WarnOnTeleport = value; } + + /// + /// Intensity of the forces. + /// + /// + /// Can be set negative to invert. + /// + public float Weight { get => _Weight; set => _Weight = value; } + + /// + /// Intensity of the forces from vertical motion of the sphere. + /// + /// + /// Scales ripples generated from a sphere moving up or down. + /// + public float WeightVerticalMultiplier { get => _WeightVerticalMultiplier; set => _WeightVerticalMultiplier = value; } + } +} + +namespace WaveHarmonic.Crest +{ + partial class TextureLodInputData + { + /// + /// Texture to render into the simulation. + /// + public UnityEngine.Texture Texture { get => _Texture; set => _Texture = value; } + } +} + +namespace WaveHarmonic.Crest +{ + partial class UnderwaterRenderer + { + /// + /// Whether to execute for all cameras. + /// + /// + /// If disabled, then additionally ignore any camera that is not the view camera or our reflection camera. It will require managing culling masks of all cameras. + /// + public bool AllCameras { get => _AllCameras; set => _AllCameras = value; } + + /// + /// Copying parameters each frame ensures underwater appearance stays consistent with the water surface. + /// + /// + /// Has a small overhead so should be disabled if not needed. + /// + public bool CopyWaterMaterialParametersEachFrame { get => _CopyWaterMaterialParametersEachFrame; set => _CopyWaterMaterialParametersEachFrame = value; } + + /// + /// Proportion of visibility below which the water surface will be culled when underwater. + /// + /// + /// The larger the number, the closer to the camera the water tiles will be culled. + /// + public float CullLimit { get => _CullLimit; set => _CullLimit = value; } + + /// + /// Whether the underwater effect is enabled. + /// + /// + /// Allocates/releases resources if state has changed. + /// + public bool Enabled { get => _Enabled; set => SetEnabled(_Enabled, _Enabled = value); } + + /// + /// Provides out-scattering based on the camera's underwater depth. + /// + /// + /// It scales down environmental lighting (sun, reflections, ambient etc) with the underwater depth. This works with vanilla lighting, but uncommon or custom lighting will require a custom solution (use this for reference) + /// + public bool AffectsEnvironmentalLighting { get => _EnvironmentalLightingEnable; set => SetAffectsEnvironmentalLighting(_EnvironmentalLightingEnable, _EnvironmentalLightingEnable = value); } + + /// + /// How much this effect applies. + /// + /// + /// Values less than 1 attenuate light less underwater. Value of 1 is physically based. + /// + public float EnvironmentalLightingWeight { get => _EnvironmentalLightingWeight; set => _EnvironmentalLightingWeight = value; } + + /// + /// Adjusts the far plane for horizon line calculation. Helps with horizon line issue. + /// + public float FarPlaneMultiplier { get => _FarPlaneMultiplier; set => _FarPlaneMultiplier = value; } + + /// + /// Any camera or probe with this layer in its culling mask will render underwater. + /// + public int Layer { get => _Layer; set => _Layer = value; } + + /// + /// The underwater material. The water surface material is copied into this material. + /// + public UnityEngine.Material Material { get => _Material; set => _Material = value; } + } +} + +namespace WaveHarmonic.Crest +{ + partial class WaterBody + { + /// + /// Overrides the property on the Water Renderer with the same name when the camera is inside the bounds. + /// + public UnityEngine.Material BelowSurfaceMaterial { get => _BelowSurfaceMaterial; set => _BelowSurfaceMaterial = value; } + + /// + /// Makes sure this water body is not clipped. + /// + /// + /// If clipping is enabled and set to clip everywhere by default, this option will register this water body to ensure its area does not get clipped. + /// + public bool Clipped { get => _Clip; set => _Clip = value; } + + /// + /// Water chunks that overlap this waterbody area will be assigned this material. + /// + /// + /// This is useful for varying water appearance across different water bodies. If no override material is specified, the default material assigned to the WaterRenderer component will be used. + /// + public UnityEngine.Material AboveSurfaceMaterial { get => _Material; set => _Material = value; } + + /// + /// Overrides the Water Renderer's volume material when the camera is inside the bounds. + /// + public UnityEngine.Material VolumeMaterial { get => _VolumeMaterial; set => _VolumeMaterial = value; } + } +} + +namespace WaveHarmonic.Crest.Watercraft +{ + partial class Controller + { + /// + /// Applies a curve to buoyancy changes. + /// + public UnityEngine.AnimationCurve BuoyancyCurveFactor { get => _BuoyancyCurveFactor; set => _BuoyancyCurveFactor = value; } + + /// + /// The accompanied control script to take input from. + /// + public Control Control { get => _Control; set => _Control = value; } + + /// + /// The accompanied buoyancy script. + /// + public WaveHarmonic.Crest.FloatingObject FloatingObject { get => _FloatingObject; set => _FloatingObject = value; } + + /// + /// Vertical offset from the center of mass for where move force should be applied. + /// + public float ForceHeightOffset { get => _ForceHeightOffset; set => _ForceHeightOffset = value; } + + /// + /// How quickly the watercraft turns from steering. + /// + public float SteerPower { get => _SteerPower; set => _SteerPower = value; } + + /// + /// How quickly the watercraft moves from thrust. + /// + public float ThrustPower { get => _ThrustPower; set => _ThrustPower = value; } + + /// + /// Rolls the watercraft when turning. + /// + public float TurningHeel { get => _TurningHeel; set => _TurningHeel = value; } + } +} + +namespace WaveHarmonic.Crest.Watercraft +{ + partial class FixedControl + { + /// + /// Constantly move. + /// + public float Move { get => _Move; set => _Move = value; } + + /// + /// Constantly turn. + /// + public float Turn { get => _Turn; set => _Turn = value; } + } +} + +namespace WaveHarmonic.Crest +{ + partial class WaterReflections + { + /// + /// Whether to allow MSAA. + /// + public bool AllowMSAA { get => _AllowMSAA; set => _AllowMSAA = value; } + + /// + /// The near clip plane clips any geometry before it, removing it from reflections. + /// + /// + /// Can be used to reduce reflection leaks and support varied water level. + /// + public float ClipPlaneOffset { get => _ClipPlaneOffset; set => _ClipPlaneOffset = value; } + + /// + /// Disables occlusion culling. + /// + public bool DisableOcclusionCulling { get => _DisableOcclusionCulling; set => _DisableOcclusionCulling = value; } + + /// + /// Disables pixel lights (BIRP only). + /// + public bool DisablePixelLights { get => _DisablePixelLights; set => _DisablePixelLights = value; } + + /// + /// Disables shadows. + /// + public bool DisableShadows { get => _DisableShadows; set => _DisableShadows = value; } + + /// + /// Whether planar reflections are enabled. + /// + /// + /// Allocates/releases resources if state has changed. + /// + public bool Enabled { get => _Enabled; set => SetEnabled(_Enabled, _Enabled = value); } + + /// + /// Anything beyond the far clip plane is not rendered. + /// + public float FarClipPlane { get => _FarClipPlane; set => _FarClipPlane = value; } + + /// + /// Whether to allow HDR. + /// + public bool HDR { get => _HDR; set => _HDR = value; } + + /// + /// The layers to rendering into reflections. + /// + public UnityEngine.LayerMask Layers { get => _Layers; set => _Layers = value; } + + /// + /// What side of the water surface to render planar reflections for. + /// + public WaterReflectionSide ReflectionSide { get => _Mode; set => _Mode = value; } + + /// + /// Planar relfections using an oblique frustum for better performance. + /// + /// + /// This can cause depth issues for TIRs, especially near the surface. + /// + public bool NonObliqueNearSurface { get => _NonObliqueNearSurface; set => _NonObliqueNearSurface = value; } + + /// + /// If within this distance from the surface, disable the oblique matrix. + /// + public float NonObliqueNearSurfaceThreshold { get => _NonObliqueNearSurfaceThreshold; set => _NonObliqueNearSurfaceThreshold = value; } + + /// + /// Overrides global quality settings. + /// + public QualitySettingsOverride QualitySettingsOverride { get => _QualitySettingsOverride; set => _QualitySettingsOverride = value; } + + /// + /// Whether to render to the viewer camera only. + /// + /// + /// When disabled, reflections will render for all cameras rendering the water layer, which currently this prevents Refresh Rate from working. Enabling will unlock the Refresh Rate heading. + /// + public bool RenderOnlySingleCamera { get => _RenderOnlySingleCamera; set => _RenderOnlySingleCamera = value; } + + /// + /// Resolution of the reflection texture. + /// + public int Resolution { get => _Resolution; set => _Resolution = value; } + + /// + /// Whether to render the sky or fallback to default reflections. + /// + /// + /// Not rendering the sky can prevent other custom shaders (like tree leaves) from being in the final output. Enable for best compatibility. + /// + public bool Sky { get => _Sky; set => _Sky = value; } + + /// + /// Whether to allow stencil operations. + /// + public bool Stencil { get => _Stencil; set => _Stencil = value; } + + /// + /// An oblique matrix will clip anything below the surface for free. + /// + /// + /// Disable if you have problems with certain effects. Disabling can cause other artifacts like objects below the surface to appear in reflections. + /// + public bool UseObliqueMatrix { get => _UseObliqueMatrix; set => _UseObliqueMatrix = value; } + } +} + +namespace WaveHarmonic.Crest +{ + partial class WaterRenderer + { + /// + /// Absorption information - gives color to water. + /// + public AbsorptionLod AbsorptionLod => _AbsorptionLod; + + /// + /// Albedo - a colour layer composited onto the water surface. + /// + public AlbedoLod AlbedoLod => _AlbedoLod; + + /// + /// Whether to allow sorting using the render queue. + /// + /// + /// If you need to change the minor part of the render queue (eg +100), then enable this option. As a side effect, it will also disable the front-to-back rendering optimization for Crest. This option does not affect changing the major part of the render queue (eg AlphaTest, Transparent), as that is always allowed. + /// + public bool AllowRenderQueueSorting { get => _AllowRenderQueueSorting; set => _AllowRenderQueueSorting = value; } + + /// + /// All waves (including Dynamic Waves) are written to this simulation. + /// + public AnimatedWavesLod AnimatedWavesLod => _AnimatedWavesLod; + + /// + /// The camera which drives the water data. + /// + /// + /// Setting this is optional. Defaults to the main camera. + /// + public UnityEngine.Camera Viewer { get => GetViewer(); set => _Camera = value; } + + /// + /// Have the water surface cast shadows for albedo (both foam and custom). + /// + public bool CastShadows { get => GetCastShadows(); set => _CastShadows = value; } + + /// + /// Clip surface information for clipping the water surface. + /// + public ClipLod ClipLod => _ClipLod; + + /// + /// Water depth information used for shallow water, shoreline foam, wave attenuation, among others. + /// + public DepthLod DepthLod => _DepthLod; + + /// + /// Drops the height for maximum water detail based on waves. + /// + /// + /// This means if there are big waves, max detail level is reached at a lower height, which can help visual range when there are very large waves and camera is at sea level. + /// + public float DropDetailHeightBasedOnWaves { get => _DropDetailHeightBasedOnWaves; set => _DropDetailHeightBasedOnWaves = value; } + + /// + /// Dynamic waves generated from interactions with objects such as boats. + /// + public DynamicWavesLod DynamicWavesLod => _DynamicWavesLod; + + /// + /// Applied to the extents' far vertices to make them larger. + /// + /// + /// Increase if the extents do not reach the horizon or you see the underwater effect at the horizon. + /// + public float ExtentsSizeMultiplier { get => _ExtentsSizeMultiplier; set => _ExtentsSizeMultiplier = value; } + + /// + /// Horizontal motion of water body, akin to water currents. + /// + public FlowLod FlowLod => _FlowLod; + + /// + /// Simulation of foam created in choppy water and dissipating over time. + /// + public FoamLod FoamLod => _FoamLod; + + /// + /// Forces smoothing for scale changes. + /// + /// + /// When water level varies, smoothing scale change can prevent pops when the viewer's height above water sharply changes. Smoothing is disabled when terrain sampling is enabled or the water level simulation is disabled. + /// + public bool ForceScaleChangeSmoothing { get => _ForceScaleChangeSmoothing; set => _ForceScaleChangeSmoothing = value; } + + /// + /// How much of the water shape gets tessellated by geometry. + /// + /// + /// For example, if set to four, every geometry quad will span 4x4 LOD data texels. a value of 2 will generate one vert per 2x2 LOD data texels. A value of 1 means a vert is generated for every LOD data texel. Larger values give lower fidelity surface shape with higher performance. + /// + public int GeometryDownSampleFactor { get => _GeometryDownSampleFactor; set => _GeometryDownSampleFactor = value; } + + /// + /// Multiplier for physics gravity. + /// + public float GravityMultiplier { get => _GravityMultiplier; set => _GravityMultiplier = value; } + + /// + /// Gravity for all wave calculations. + /// + public float GravityOverride { get => _GravityOverride; set => _GravityOverride = value; } + + /// + /// The water chunk renderers will have this layer. + /// + public int Layer { get => _Layer; set => _Layer = value; } + + /// + /// Varying water level to support water bodies at different heights and rivers to run down slopes. + /// + public LevelLod LevelLod => _LevelLod; + + /// + /// Material to use for the water surface. + /// + public UnityEngine.Material Material { get => _Material; set => _Material = value; } + + /// + /// Provide your own gravity value instead of Physics.gravity. + /// + public bool OverrideGravity { get => _OverrideGravity; set => _OverrideGravity = value; } + + /// + /// Whether to override the automatic detection of framebuffer HDR rendering (BIRP only). + /// + /// + /// Rendering using HDR formats is optional, but there is no way for us to determine if HDR rendering is enabled in the Graphics Settings. We make an educated based on which platform is the target. If you see rendering issues, try disabling this. + /// + public bool OverrideRenderHDR { get => _OverrideRenderHDR; set => _OverrideRenderHDR = value; } + + /// + /// The portal renderer. + /// + public Portals.PortalRenderer Portals => _Portals; + + /// + /// The primary light that affects the water. + /// + /// + /// Setting this is optional. This should be a directional light. Defaults to RenderSettings.sun. + /// + public UnityEngine.Light PrimaryLight { get => GetPrimaryLight(); set => _PrimaryLight = value; } + + /// + /// The reflection renderer. + /// + public WaterReflections Reflections => _Reflections; + + /// + /// Force HDR format usage (BIRP only). + /// + /// + /// If enabled, we assume the framebuffer is an HDR format, otherwise an LDR format. + /// + public bool RenderHDR { get => _RenderHDR; set => _RenderHDR = value; } + + /// + /// The resolution of the various water LOD data. + /// + /// + /// This includes mesh density, displacement textures, foam data, dynamic wave simulation, etc. Sets the 'detail' present in the water - larger values give more detail at increased run-time expense. This value can be overriden per LOD in their respective settings except for Animated Waves which is tied to this value. + /// + public int LodResolution { get => _Resolution; set => _Resolution = value; } + + /// + /// Also checks terrain height when determining the scale. + /// + /// + /// The scale is changed based on the viewer's height above the water surface. This can be a problem with varied water level, as the viewer may not be directly over the higher water level leading to a height difference, and thus incorrect scale. + /// + public bool SampleTerrainHeightForScale { get => _SampleTerrainHeightForScale; set => _SampleTerrainHeightForScale = value; } + + /// + /// The scale the water can be (infinity for no maximum). + /// + /// + /// Water is scaled horizontally with viewer height, to keep the meshing suitable for elevated viewpoints. This sets the minimum and maximum the water will be scaled. Low minimum values give lots of detail, but will limit the horizontal extents of the water detail. Increasing the minimum value can be a great performance saving for mobile as it will reduce draw calls. + /// + public UnityEngine.Vector2 ScaleRange { get => _ScaleRange; set => _ScaleRange = value; } + + /// + /// Scattering information - gives color to water. + /// + public ScatteringLod ScatteringLod => _ScatteringLod; + + /// + /// Shadow information used for lighting water. + /// + public ShadowLod ShadowLod => _ShadowLod; + + /// + /// Number of levels of details (chunks, scales etc) to generate. + /// + /// + /// The horizontal range of the water surface doubles for each added LOD, while GPU processing time increases linearly. The higher the number, the further out detail will be. Furthermore, the higher the count, the more larger wavelengths can be filtering in queries. + /// + public int LodLevels { get => _Slices; set => _Slices = value; } + + /// + /// The distance threshold for when the viewer has considered to have teleported. + /// + /// + /// This is used to prevent popping, and for prewarming simulations. Threshold is in Unity units. + /// + public float TeleportThreshold { get => _TeleportThreshold; set => _TeleportThreshold = value; } + + /// + /// How many frames to distribute the chunk bounds calculation. + /// + /// + /// The chunk bounds are calculated per frame to ensure culling is correct when using inputs that affect displacement. Some performance can be saved by distributing the load over several frames. The higher the frames, the longer it will take - lowest being instant. + /// + public int TimeSliceBoundsUpdateFrameCount { get => _TimeSliceBoundsUpdateFrameCount; set => _TimeSliceBoundsUpdateFrameCount = value; } + + /// + /// The underwater renderer. + /// + public UnderwaterRenderer Underwater => _Underwater; + + /// + /// The viewpoint which drives the water detail - the center of the LOD system. + /// + /// + /// Setting this is optional. Defaults to the camera. + /// + public UnityEngine.Transform Viewpoint { get => GetViewpoint(); set => _Viewpoint = value; } + + /// + /// Underwater will copy from this material if set. + /// + /// + /// Useful for overriding properties for the underwater effect. To see what properties can be overriden, see the disabled properties on the underwater material. This does not affect the surface. + /// + public UnityEngine.Material VolumeMaterial { get => _VolumeMaterial; set => _VolumeMaterial = value; } + + /// + /// Whether 'Water Body' components will cull the water tiles. + /// + /// + /// Disable if you want to use the 'Material Override' feature and still have an ocean. + /// + public bool WaterBodyCulling { get => _WaterBodyCulling; set => _WaterBodyCulling = value; } + + /// + /// Base wind speed in km/h. + /// + /// + /// Controls wave conditions. Can be overridden on Shape* components. + /// + public float WindSpeed { get => _WindSpeed; set => _WindSpeed = value; } + + /// + /// Whether to enable motion vector support. + /// + public bool WriteMotionVectors { get => GetWriteMotionVectors(); set => _WriteMotionVectors = value; } + + /// + /// Whether to write the water surface depth to the depth texture (URP only). + /// + /// + /// The water surface writes to the depth buffer, but Unity does not copy it to the depth texture for post-processing effects like Depth of Field. This will copy the depth buffer to the depth texture. + /// + public bool WriteToDepthTexture { get => _WriteToDepthTexture; set => _WriteToDepthTexture = value; } + } +} + +namespace WaveHarmonic.Crest +{ + partial class WatertightHull + { + /// + /// Inverts the effect to remove clipping (ie add water). + /// + public bool Inverted { get => _Inverted; set => _Inverted = value; } + + /// + /// The convex hull to keep water out. + /// + public UnityEngine.Mesh Mesh { get => _Mesh; set => _Mesh = value; } + + /// + /// Which mode to use. + /// + public WatertightHullMode Mode { get => _Mode; set => SetMode(_Mode, _Mode = value); } + + /// + /// Order this input will render. + /// + /// + /// Queue is 'Queue + SiblingIndex' + /// + public int Queue { get => _Queue; set => SetQueue(_Queue, _Queue = value); } + + /// + /// Whether to also to clip the surface when using displacement mode. + /// + /// + /// Displacement mode can have a leaky hull by allowing chop top push waves across the hull boundaries slightly. Clipping the surface will remove these interior leaks. + /// + public bool UseClipWithDisplacement { get => _UseClipWithDisplacement; set => SetUseClipWithDisplacement(_UseClipWithDisplacement, _UseClipWithDisplacement = value); } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Generated/API.Generated.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Generated/API.Generated.cs.meta new file mode 100644 index 000000000..fa835c01b --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Generated/API.Generated.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 72ab8f86c06904e6dac398cb493f96b9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Interaction.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Interaction.meta new file mode 100644 index 000000000..beda451b8 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Interaction.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9916067faf7834d31ab306b56819c799 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Interaction/FloatingObject.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Interaction/FloatingObject.cs new file mode 100644 index 000000000..c611f63e4 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Interaction/FloatingObject.cs @@ -0,0 +1,372 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using WaveHarmonic.Crest.Internal; + +namespace WaveHarmonic.Crest +{ + /// + /// Different physics models for + /// + public enum FloatingObjectModel + { + /// + /// A simple model which aligns the object with the wave normal. + /// + AlignNormal, + + /// + /// A more advanced model which samples water at the probes positions. + /// + Probes, + } + + /// + /// Probes for the model. + /// + [System.Serializable] + public struct FloatingObjectProbe + { + /// + /// How much this probe affects the outcome (not a physical weight). + /// + [SerializeField] + public float _Weight; + + /// + /// The position of the probe. + /// + [SerializeField] + public Vector3 _Position; + } + + /// + /// Physics including buoyancy and drag. + /// + [@HelpURL("Manual/FloatingObjects.html#physics")] + [AddComponentMenu(Constants.k_MenuPrefixPhysics + "Floating Object")] + public sealed partial class FloatingObject : ManagedBehaviour + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + + + [Tooltip("The rigid body to affect.\n\nIt will automatically get the sibling rigid body if not set.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + Rigidbody _RigidBody; + + [Tooltip("The model to use for buoyancy.\n\nAlign Normal is simple and only uses a few queries whilst Probes is more advanced and uses a few queries per probe. Cannot be changed at runtime after Start.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + FloatingObjectModel _Model = FloatingObjectModel.AlignNormal; + + [Tooltip(ICollisionProvider.k_LayerTooltip)] + [@GenerateAPI] + [@DecoratedField, SerializeField] + CollisionLayer _Layer = CollisionLayer.AfterAnimatedWaves; + + + [Header("Buoyancy")] + + [@Label("Force Strength")] + [Tooltip("Strength of buoyancy force.\n\nFor probes, roughly a mass to force ratio of 100 to 1 to keep the center of mass near the surface. For Align Normal, default value is for a default sphere with a default rigidbody.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + float _BuoyancyForceStrength = 10f; + + [@Label("Torque Strength")] + [Tooltip("Strength of torque applied to match boat orientation to water normal.")] + [@Predicated(nameof(_Model), inverted: true, nameof(FloatingObjectModel.AlignNormal), hide: true)] + [@GenerateAPI] + [@DecoratedField, SerializeField] + float _BuoyancyTorqueStrength = 8f; + + [@Label("Maximum Force")] + [Tooltip("Clamps the buoyancy force to this value.\n\nUseful for handling fully submerged objects.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + float _MaximumBuoyancyForce = 100f; + + [@Label("Height Offset")] + [Tooltip("Height offset from transform center to bottom of boat (if any).\n\nDefault value is for a default sphere. Having this value be an accurate measurement from center to bottom is not necessary.")] + [@Predicated(nameof(_Model), true, nameof(FloatingObjectModel.AlignNormal), hide: true)] + [@GenerateAPI] + [@DecoratedField, SerializeField] + float _CenterToBottomOffset = -1f; + + [Tooltip("Approximate hydrodynamics of 'surfing' down waves.")] + [@Predicated(nameof(_Model), true, nameof(FloatingObjectModel.AlignNormal))] + [@Range(0, 1)] + [@GenerateAPI] + [SerializeField] + float _AccelerateDownhill; + + [UnityEngine.Space(10)] + + [Tooltip("Query points for buoyancy.\n\nOnly applicable to Probes model.")] + [@GenerateAPI] + [SerializeField] + internal FloatingObjectProbe[] _Probes = new FloatingObjectProbe[] { }; + + + [Header("Drag")] + + [Tooltip("Drag when in water.\n\nAdditive to the drag declared on the rigid body.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + Vector3 _Drag = new(2f, 3f, 1f); + + [Tooltip("Angular drag when in water.\n\nAdditive to the angular drag declared on the rigid body.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + float _AngularDrag = 0.2f; + + [Tooltip("Vertical offset for where drag force should be applied.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + float _ForceHeightOffset; + + + [Header("Wave Response")] + + [Tooltip("Width of object for physics purposes.\n\nThe larger this value, the more filtered/smooth the wave response will be. If larger wavelengths cannot be filtered, increase the LOD Levels")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + float _ObjectWidth = 3f; + + [Tooltip("Computes a separate normal based on boat length to get more accurate orientations.\n\nRequires the cost of an extra collision sample.")] + [@Predicated(nameof(_Model), true, nameof(FloatingObjectModel.AlignNormal), hide: true)] + [@GenerateAPI] + [@DecoratedField, SerializeField] + bool _UseObjectLength; + + [Tooltip("Length dimension of boat.\n\nOnly used if Use Boat Length is enabled.")] + [@Predicated(nameof(_Model), true, nameof(FloatingObjectModel.AlignNormal), hide: true)] + [@Predicated(nameof(_UseObjectLength))] + [@GenerateAPI] + [@DecoratedField, SerializeField] + float _ObjectLength = 3f; + + // Debug + [UnityEngine.Space(10)] + + [@DecoratedField, SerializeField] + DebugFields _Debug = new(); + + [System.Serializable] + sealed class DebugFields + { + [Tooltip("Draw queries for each force point as gizmos.")] + [@DecoratedField, SerializeField] + internal bool _DrawQueries = false; + } + + /// + /// Is any part of this object in water. + /// + public bool InWater { get; private set; } + + readonly SampleCollisionHelper _SampleHeightHelper = new(); + readonly SampleFlowHelper _SampleFlowHelper = new(); + + Vector3[] _QueryPoints; + Vector3[] _QueryResultDisplacements; + Vector3[] _QueryResultVelocities; + Vector3[] _QueryResultNormal; + + internal FloatingObjectProbe[] _Probe = new FloatingObjectProbe[] { new() { _Weight = 1f } }; + + const float k_WaterDensity = 1000; + + float _TotalWeight; + + bool Advanced => _Model == FloatingObjectModel.Probes; + + private protected override void OnStart() + { + base.OnStart(); + + if (_RigidBody == null) TryGetComponent(out _RigidBody); + + var points = Advanced ? _Probes : _Probe; + // Advanced needs an extra spot for the center. + var length = Advanced ? points.Length + 1 : points.Length; + _QueryPoints = new Vector3[length]; + _QueryResultDisplacements = new Vector3[length]; + _QueryResultVelocities = new Vector3[length]; + if (!Advanced) _QueryResultNormal = new Vector3[length]; + } + + private protected override System.Action OnFixedUpdateMethod => OnFixedUpdate; + void OnFixedUpdate(WaterRenderer water) + { + UnityEngine.Profiling.Profiler.BeginSample("Buoyancy.FixedUpdate"); + + var points = Advanced ? _Probes : _Probe; + + // Queries + { + var collisions = water.AnimatedWavesLod.Provider; + + _TotalWeight = 0; + + // Update query points. + for (var i = 0; i < points.Length; i++) + { + var point = points[i]; + _TotalWeight += point._Weight; + _QueryPoints[i] = transform.TransformPoint(point._Position + new Vector3(0, _RigidBody.centerOfMass.y, 0)); + } + + _QueryPoints[^1] = transform.position + new Vector3(0, _RigidBody.centerOfMass.y, 0); + + collisions.Query(GetHashCode(), _ObjectWidth, _QueryPoints, _QueryResultDisplacements, _QueryResultNormal, _QueryResultVelocities, _Layer); + + if (Advanced && _Debug._DrawQueries) + { + for (var i = 0; i < points.Length; i++) + { + var query = _QueryPoints[i]; + query.y = water.SeaLevel + _QueryResultDisplacements[i].y; + CollisionAreaVisualizer.DebugDrawCross(query, 1f, Color.magenta); + } + } + } + + // We could filter the surface velocity as the minimum of the last 2 frames. There + // is a hard case where a wavelength is turned on/off which generates single frame + // velocity spikes - because the surface legitimately moves very fast. + var surfaceVelocity = _QueryResultVelocities[^1]; + _SampleFlowHelper.Sample(transform.position, out var surfaceFlow, minimumLength: _ObjectWidth); + surfaceVelocity += new Vector3(surfaceFlow.x, 0, surfaceFlow.y); + + if (_Debug._DrawQueries) + { + Debug.DrawLine(transform.position + 5f * Vector3.up, transform.position + 5f * Vector3.up + surfaceVelocity, new(1, 1, 1, 0.6f)); + } + + // Buoyancy + if (Advanced) + { + var archimedesForceMagnitude = k_WaterDensity * Mathf.Abs(Physics.gravity.y); + InWater = false; + + for (var i = 0; i < points.Length; i++) + { + var height = water.SeaLevel + _QueryResultDisplacements[i].y; + var difference = height - _QueryPoints[i].y; + if (difference > 0) + { + InWater = true; + if (_TotalWeight > 0f) + { + var force = _BuoyancyForceStrength * points[i]._Weight * archimedesForceMagnitude * difference * Vector3.up / _TotalWeight; + if (_MaximumBuoyancyForce < Mathf.Infinity) + { + force = Vector3.ClampMagnitude(force, _MaximumBuoyancyForce); + } + _RigidBody.AddForceAtPosition(force, _QueryPoints[i]); + } + } + } + + if (!InWater) + { + UnityEngine.Profiling.Profiler.EndSample(); + return; + } + } + else + { + var height = _QueryResultDisplacements[0].y + water.SeaLevel; + var bottomDepth = height - transform.position.y - _CenterToBottomOffset; + var normal = _QueryResultNormal[0]; + + if (_Debug._DrawQueries) + { + var surfPos = transform.position; + surfPos.y = height; + CollisionAreaVisualizer.DebugDrawCross(surfPos, normal, 1f, Color.red); + } + + InWater = bottomDepth > 0f; + if (!InWater) + { + UnityEngine.Profiling.Profiler.EndSample(); + return; + } + + var buoyancy = _BuoyancyForceStrength * bottomDepth * bottomDepth * bottomDepth * -Physics.gravity.normalized; + if (_MaximumBuoyancyForce < Mathf.Infinity) + { + buoyancy = Vector3.ClampMagnitude(buoyancy, _MaximumBuoyancyForce); + } + _RigidBody.AddForce(buoyancy, ForceMode.Acceleration); + + // Approximate hydrodynamics of sliding along water + if (_AccelerateDownhill > 0f) + { + _RigidBody.AddForce(_AccelerateDownhill * -Physics.gravity.y * new Vector3(normal.x, 0f, normal.z), ForceMode.Acceleration); + } + + // Orientation + // Align to water normal. One normal by default, but can use a separate normal + // based on boat length vs width. This gives varying rotations based on boat + // dimensions. + { + var normalLatitudinal = normal; + var normalLongitudinal = Vector3.up; + + if (_UseObjectLength) + { + if (_SampleHeightHelper.SampleHeight(transform.position, out _, out _, out normalLongitudinal, minimumLength: _ObjectLength, _Layer)) + { + var f = transform.forward; + f.y = 0f; + f.Normalize(); + normalLatitudinal -= Vector3.Dot(f, normalLatitudinal) * f; + + var r = transform.right; + r.y = 0f; + r.Normalize(); + normalLongitudinal -= Vector3.Dot(r, normalLongitudinal) * r; + } + } + + if (_Debug._DrawQueries) Debug.DrawLine(transform.position, transform.position + 5f * normalLatitudinal, Color.green); + if (_Debug._DrawQueries && _UseObjectLength) Debug.DrawLine(transform.position, transform.position + 5f * normalLongitudinal, Color.yellow); + + var torqueWidth = Vector3.Cross(transform.up, normalLatitudinal); + _RigidBody.AddTorque(torqueWidth * _BuoyancyTorqueStrength, ForceMode.Acceleration); + if (_UseObjectLength) + { + var torqueLength = Vector3.Cross(transform.up, normalLongitudinal); + _RigidBody.AddTorque(torqueLength * _BuoyancyTorqueStrength, ForceMode.Acceleration); + } + + _RigidBody.AddTorque(-_AngularDrag * _RigidBody.angularVelocity); + } + } + + // Apply drag relative to water + if (_Drag != Vector3.zero) + { +#if UNITY_6000_0_OR_NEWER + var velocityRelativeToWater = _RigidBody.linearVelocity - surfaceVelocity; +#else + var velocityRelativeToWater = _RigidBody.velocity - surfaceVelocity; +#endif + var forcePosition = _RigidBody.worldCenterOfMass + _ForceHeightOffset * Vector3.up; + _RigidBody.AddForceAtPosition(_Drag.x * Vector3.Dot(transform.right, -velocityRelativeToWater) * transform.right, forcePosition, ForceMode.Acceleration); + _RigidBody.AddForceAtPosition(_Drag.y * Vector3.Dot(Vector3.up, -velocityRelativeToWater) * Vector3.up, forcePosition, ForceMode.Acceleration); + _RigidBody.AddForceAtPosition(_Drag.z * Vector3.Dot(transform.forward, -velocityRelativeToWater) * transform.forward, forcePosition, ForceMode.Acceleration); + } + + UnityEngine.Profiling.Profiler.EndSample(); + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Interaction/FloatingObject.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Interaction/FloatingObject.cs.meta new file mode 100644 index 000000000..5c9de4052 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Interaction/FloatingObject.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: eba37e6f7ba7a4a488c7831f45a078b2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Scripting.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Scripting.meta new file mode 100644 index 000000000..d64a8f08e --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Scripting.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 30b2c63e0d0a548f7ae93a8c7587fd83 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Scripting/Assembly.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Scripting/Assembly.cs new file mode 100644 index 000000000..8e969af47 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Scripting/Assembly.cs @@ -0,0 +1,7 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// Define empty namespaces for when assemblies are not present. + +namespace WaveHarmonic.Crest.Paint { } +namespace WaveHarmonic.Crest.Splines { } diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Scripting/Assembly.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Scripting/Assembly.cs.meta new file mode 100644 index 000000000..945ff3612 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Scripting/Assembly.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c6ce853c937064f0bb6379473815d4df +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Scripting/Extensions.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Scripting/Extensions.cs new file mode 100644 index 000000000..6913cab19 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Scripting/Extensions.cs @@ -0,0 +1,37 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; + +namespace WaveHarmonic.Crest +{ + /// + /// Contains extensions to support scripting. + /// + public static partial class _Extensions + { + /// + /// AddComponent that is compatible with Crest inputs. + /// + /// The input type. + /// The game object to add the input to. + /// The input mode. Not all inputs support all modes. Refer to the UI as to what input supports what mode. + /// The newly created input component setup with the provided mode. + public static T AddComponent(this GameObject gameObject, LodInputMode mode) + where T : LodInput + { + var input = gameObject.AddComponent(); + input._Mode = mode; + // Not all modes have associated data. + if (mode is not LodInputMode.Global or LodInputMode.Primitive or LodInputMode.Unset) AddData(input, mode); + input.InferBlend(); + return input; + } + + static void AddData(this LodInput input, LodInputMode mode) where T : LodInputData, new() + { + input.Data = new T(); + input.Data._Input = input; + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Scripting/Extensions.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Scripting/Extensions.cs.meta new file mode 100644 index 000000000..1db055818 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Scripting/Extensions.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: bf4a91d347c104b8b9f5faa060b121ef +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Scripting/Generated.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Scripting/Generated.meta new file mode 100644 index 000000000..80769ed01 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Scripting/Generated.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7ee439ee99fb8490fbe84c3ea930a98c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Scripting/Generated/Extensions.Generated.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Scripting/Generated/Extensions.Generated.cs new file mode 100644 index 000000000..a6f28322d --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Scripting/Generated/Extensions.Generated.cs @@ -0,0 +1,81 @@ +// + +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using WaveHarmonic.Crest.Splines; +using WaveHarmonic.Crest.Paint; + +namespace WaveHarmonic.Crest +{ + static partial class _Extensions + { + static void AddData(LodInput input, LodInputMode mode) + { + switch (mode) + { + case LodInputMode.Renderer when input is AbsorptionLodInput: AddData(input, mode); break; + case LodInputMode.Texture when input is AbsorptionLodInput: AddData(input, mode); break; +#if d_CrestSplines + case LodInputMode.Spline when input is AbsorptionLodInput: AddData(input, mode); break; +#endif +#if d_CrestPaint + case LodInputMode.Paint when input is AbsorptionLodInput: AddData(input, mode); break; +#endif + case LodInputMode.Renderer when input is AlbedoLodInput: AddData(input, mode); break; + case LodInputMode.Renderer when input is AnimatedWavesLodInput: AddData(input, mode); break; + case LodInputMode.Renderer when input is ClipLodInput: AddData(input, mode); break; + case LodInputMode.Texture when input is ClipLodInput: AddData(input, mode); break; +#if d_CrestPaint + case LodInputMode.Paint when input is ClipLodInput: AddData(input, mode); break; +#endif + case LodInputMode.Renderer when input is DepthLodInput: AddData(input, mode); break; + case LodInputMode.Texture when input is DepthLodInput: AddData(input, mode); break; + case LodInputMode.Geometry when input is DepthLodInput: AddData(input, mode); break; + case LodInputMode.Renderer when input is DynamicWavesLodInput: AddData(input, mode); break; + case LodInputMode.Renderer when input is FlowLodInput: AddData(input, mode); break; + case LodInputMode.Texture when input is FlowLodInput: AddData(input, mode); break; +#if d_CrestPaint + case LodInputMode.Paint when input is FlowLodInput: AddData(input, mode); break; +#endif +#if d_CrestSplines + case LodInputMode.Spline when input is FlowLodInput: AddData(input, mode); break; +#endif + case LodInputMode.Renderer when input is FoamLodInput: AddData(input, mode); break; + case LodInputMode.Texture when input is FoamLodInput: AddData(input, mode); break; +#if d_CrestPaint + case LodInputMode.Paint when input is FoamLodInput: AddData(input, mode); break; +#endif +#if d_CrestSplines + case LodInputMode.Spline when input is FoamLodInput: AddData(input, mode); break; +#endif + case LodInputMode.Renderer when input is LevelLodInput: AddData(input, mode); break; + case LodInputMode.Texture when input is LevelLodInput: AddData(input, mode); break; +#if d_CrestPaint + case LodInputMode.Paint when input is LevelLodInput: AddData(input, mode); break; +#endif +#if d_CrestSplines + case LodInputMode.Spline when input is LevelLodInput: AddData(input, mode); break; +#endif + case LodInputMode.Geometry when input is LevelLodInput: AddData(input, mode); break; + case LodInputMode.Renderer when input is ScatteringLodInput: AddData(input, mode); break; + case LodInputMode.Texture when input is ScatteringLodInput: AddData(input, mode); break; +#if d_CrestSplines + case LodInputMode.Spline when input is ScatteringLodInput: AddData(input, mode); break; +#endif +#if d_CrestPaint + case LodInputMode.Paint when input is ScatteringLodInput: AddData(input, mode); break; +#endif + case LodInputMode.Renderer when input is ShadowLodInput: AddData(input, mode); break; + case LodInputMode.Renderer when input is ShapeWaves: AddData(input, mode); break; + case LodInputMode.Texture when input is ShapeWaves: AddData(input, mode); break; +#if d_CrestPaint + case LodInputMode.Paint when input is ShapeWaves: AddData(input, mode); break; +#endif +#if d_CrestSplines + case LodInputMode.Spline when input is ShapeWaves: AddData(input, mode); break; +#endif + } + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Scripting/Generated/Extensions.Generated.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Scripting/Generated/Extensions.Generated.cs.meta new file mode 100644 index 000000000..a87fe3df8 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Scripting/Generated/Extensions.Generated.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9fe46e95241264fffb8a0455642f04f0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Scripting/WaveHarmonic.Crest.Scripting.asmdef b/Packages/com.waveharmonic.crest/Runtime/Scripts/Scripting/WaveHarmonic.Crest.Scripting.asmdef new file mode 100644 index 000000000..cdfac0dab --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Scripting/WaveHarmonic.Crest.Scripting.asmdef @@ -0,0 +1,30 @@ +{ + "name": "WaveHarmonic.Crest.Scripting", + "rootNamespace": "", + "references": [ + "GUID:7c347618730f5467f86a58f333ce21df", + "GUID:14c30fdc5e1c1403a8ae14a752f3df85", + "GUID:056ff2a5b2f124d468c6655552acdca5", + "GUID:1a8679b518d374790a83a275d183e377" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [ + { + "name": "com.waveharmonic.crest.splines", + "expression": "", + "define": "d_CrestSplines" + }, + { + "name": "com.waveharmonic.crest.paint", + "expression": "", + "define": "d_CrestPaint" + } + ], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Scripting/WaveHarmonic.Crest.Scripting.asmdef.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Scripting/WaveHarmonic.Crest.Scripting.asmdef.meta new file mode 100644 index 000000000..669afa370 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Scripting/WaveHarmonic.Crest.Scripting.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5747197954513495eaaf62d07a48b094 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Surface.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Surface.meta new file mode 100644 index 000000000..dbc5ab41c --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Surface.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b8e9190017c0245c9b456f589f7ae1cf +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Surface/WaterBody.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Surface/WaterBody.cs new file mode 100644 index 000000000..a3c9e665c --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Surface/WaterBody.cs @@ -0,0 +1,214 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Rendering; +using WaveHarmonic.Crest.Internal; + +namespace WaveHarmonic.Crest +{ + /// + /// Demarcates an AABB area where water is present in the world. + /// + /// + /// If present, water tiles will be culled if they don't overlap any WaterBody. + /// + [@ExecuteDuringEditMode] + [AddComponentMenu(Constants.k_MenuPrefixScripts + "Water Body")] + [@HelpURL("Manual/WaterBodies.html")] + public sealed partial class WaterBody : ManagedBehaviour + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + + [Tooltip("Makes sure this water body is not clipped.\n\nIf clipping is enabled and set to clip everywhere by default, this option will register this water body to ensure its area does not get clipped.")] + [@GenerateAPI(name: "Clipped")] + [SerializeField] + bool _Clip = true; + + [Tooltip("Water chunks that overlap this waterbody area will be assigned this material.\n\nThis is useful for varying water appearance across different water bodies. If no override material is specified, the default material assigned to the WaterRenderer component will be used.")] + [@AttachMaterialEditor] + [@GenerateAPI(name: "AboveSurfaceMaterial")] + [@MaterialField("Crest/Water", name: "Water", title: "Create Water Material"), SerializeField] + internal Material _Material = null; + + [Tooltip("Overrides the property on the Water Renderer with the same name when the camera is inside the bounds.")] + [@AttachMaterialEditor] + [@GenerateAPI] + [@MaterialField("Crest/Water", name: "Water (Below)", title: "Create Water Material", parent: nameof(_Material)), SerializeField] + internal Material _BelowSurfaceMaterial; + + [Tooltip("Overrides the Water Renderer's volume material when the camera is inside the bounds.")] + [@MaterialField("Crest/Underwater", name: "Underwater", title: "Create Underwater Material")] + [@AttachMaterialEditor] + [@GenerateAPI] + [SerializeField] + internal Material _VolumeMaterial; + + + bool _RecalculateRect = true; + bool _RecalculateBounds = true; + + + sealed class ClipInput : ILodInput + { + readonly WaterBody _Owner; + readonly Transform _Transform; + + public bool Enabled => WaterRenderer.Instance._ClipLod._DefaultClippingState == DefaultClippingState.EverythingClipped; + public bool IsCompute => true; + public int Pass => -1; + + // TODO: Expose serialized queue. + public int Queue => 0; + public MonoBehaviour Component => _Owner; + + public Rect Rect => _Owner.Rect; + + public ClipInput(WaterBody owner) + { + _Owner = owner; + _Transform = owner.transform; + } + + public void Draw(Lod simulation, CommandBuffer buffer, RenderTargetIdentifier target, int pass = -1, float weight = 1f, int slices = -1) + { + var wrapper = new PropertyWrapperCompute(buffer, WaterResources.Instance.Compute._ClipPrimitive, 0); + + wrapper.SetMatrix(ShaderIDs.s_Matrix, _Transform.worldToLocalMatrix); + + // For culling. + wrapper.SetVector(ShaderIDs.s_Position, _Transform.position); + wrapper.SetFloat(ShaderIDs.s_Diameter, _Transform.lossyScale.Maximum()); + + wrapper.SetKeyword(WaterResources.Instance.Keywords.ClipPrimitiveInverted, true); + wrapper.SetKeyword(WaterResources.Instance.Keywords.ClipPrimitiveSphere, false); + wrapper.SetKeyword(WaterResources.Instance.Keywords.ClipPrimitiveCube, false); + wrapper.SetKeyword(WaterResources.Instance.Keywords.ClipPrimitiveRectangle, true); + + wrapper.SetTexture(ShaderIDs.s_Target, target); + + var threads = simulation.Resolution / Lod.k_ThreadGroupSize; + wrapper.Dispatch(threads, threads, slices); + } + + public float Filter(WaterRenderer water, int slice) + { + return 1f; + } + } + + internal static List WaterBodies { get; } = new(); + + Bounds _Bounds; + internal Bounds AABB + { + get + { + if (_RecalculateBounds) + { + CalculateBounds(); + _RecalculateBounds = false; + } + + return _Bounds; + } + } + + Rect _Rect; + Rect Rect + { + get + { + if (_RecalculateRect) + { + _Rect = AABB.RectXZ(); + _RecalculateRect = false; + } + + return _Rect; + } + } + + internal Material AboveOrBelowSurfaceMaterial => _BelowSurfaceMaterial == null ? _Material : _BelowSurfaceMaterial; + + ClipInput _ClipInput; + + private protected override void Initialize() + { + base.Initialize(); + + CalculateBounds(); + + WaterBodies.Add(this); + + HandleClipInputRegistration(); + } + + private protected override void OnDisable() + { + base.OnDisable(); + + WaterBodies.Remove(this); + + if (_ClipInput != null) + { + ILodInput.Detach(_ClipInput, ClipLod.s_Inputs); + + _ClipInput = null; + } + } + + internal void CalculateBounds() + { + var bounds = new Bounds(); + bounds.center = transform.position; + bounds.Encapsulate(transform.TransformPoint(Vector3.right / 2f + Vector3.forward / 2f)); + bounds.Encapsulate(transform.TransformPoint(Vector3.right / 2f - Vector3.forward / 2f)); + bounds.Encapsulate(transform.TransformPoint(-Vector3.right / 2f + Vector3.forward / 2f)); + bounds.Encapsulate(transform.TransformPoint(-Vector3.right / 2f - Vector3.forward / 2f)); + + _Bounds = bounds; + } + + void HandleClipInputRegistration() + { + var registered = _ClipInput != null; + var shouldBeRegistered = _Clip; + + if (registered != shouldBeRegistered) + { + if (shouldBeRegistered) + { + _ClipInput = new(this); + + ILodInput.Attach(_ClipInput, ClipLod.s_Inputs); + } + else + { + ILodInput.Detach(_ClipInput, ClipLod.s_Inputs); + + _ClipInput = null; + } + } + } + + private protected override System.Action OnUpdateMethod => OnUpdate; + void OnUpdate(WaterRenderer water) + { + if (transform.hasChanged) + { + _RecalculateRect = _RecalculateBounds = true; + } + } + + private protected override System.Action OnLateUpdateMethod => OnLateUpdate; + void OnLateUpdate(WaterRenderer water) + { + transform.hasChanged = false; + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Surface/WaterBody.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Surface/WaterBody.cs.meta new file mode 100644 index 000000000..521afe291 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Surface/WaterBody.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 12fa5fcd0e5ac436b8581c4441a2683e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Surface/WaterBuilder.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Surface/WaterBuilder.cs new file mode 100644 index 000000000..af6c598b5 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Surface/WaterBuilder.cs @@ -0,0 +1,539 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +//#define PROFILE_CONSTRUCTION + +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Rendering; + +namespace WaveHarmonic.Crest +{ + /// + /// Instantiates all the water geometry, as a set of tiles. + /// + static class WaterBuilder + { + // The comments below illustrate case when BASE_VERT_DENSITY = 2. The water mesh is built up from these patches. Rotational symmetry + // is used where possible to eliminate combinations. The slim variants are used to eliminate overlap between patches. + enum PatchType + { + /// + /// Adds no skirt. Used in interior of highest detail LOD (0) + /// + /// 1 ------- + /// | | | + /// z ------- + /// | | | + /// 0 ------- + /// 0 1 + /// x + /// + /// + Interior, + + /// + /// Adds a full skirt all of the way around a patch + /// + /// ------------- + /// | | | | | + /// 1 ------------- + /// | | | | | + /// z ------------- + /// | | | | | + /// 0 ------------- + /// | | | | | + /// ------------- + /// 0 1 + /// x + /// + /// + Fat, + + /// + /// Adds a skirt on the right hand side of the patch + /// + /// 1 ---------- + /// | | | | + /// z ---------- + /// | | | | + /// 0 ---------- + /// 0 1 + /// x + /// + /// + FatX, + + /// + /// Adds a skirt on the right hand side of the patch, removes skirt from top + /// + FatXSlimZ, + + /// + /// Outer most side - this adds an extra skirt on the left hand side of the patch, + /// which will point outwards and be extended to Zfar + /// + /// 1 -------------------------------------------------------------------------------------- + /// | | | | + /// z -------------------------------------------------------------------------------------- + /// | | | | + /// 0 -------------------------------------------------------------------------------------- + /// 0 1 + /// x + /// + /// + FatXOuter, + + /// + /// Adds skirts at the top and right sides of the patch + /// + FatXZ, + + /// + /// Adds skirts at the top and right sides of the patch and pushes them to horizon + /// + FatXZOuter, + + /// + /// One less set of verts in x direction + /// + SlimX, + + /// + /// One less set of verts in both x and z directions + /// + SlimXZ, + + /// + /// One less set of verts in x direction, extra verts at start of z direction + /// + /// ---- + /// | | + /// 1 ---- + /// | | + /// z ---- + /// | | + /// 0 ---- + /// 0 1 + /// x + /// + /// + SlimXFatZ, + + /// + /// Number of patch types + /// + Count, + } + + // Keep references to meshes so they can be cleaned up later. + static Mesh[] s_Meshes; + + /// + /// Destroy tiles and any resources. + /// + public static void CleanUp(WaterRenderer water) + { + // Not every mesh is assigned to a chunk thus we should destroy all of them here. + for (var i = 0; i < s_Meshes?.Length; i++) + { + Helpers.Destroy(s_Meshes[i]); + } + + water.Chunks.Clear(); + + // May not be present when entering play mode. + if (water.Root) + { + Helpers.Destroy(water.Root.gameObject); + } + } + + public static Transform GenerateMesh(WaterRenderer water, List tiles, int lodDataResolution, int geoDownSampleFactor, int lodCount) + { + if (lodCount < 1) + { + Debug.LogError("Crest: Invalid LOD count: " + lodCount.ToString(), water); + return null; + } + +#if PROFILE_CONSTRUCTION + var sw = new System.Diagnostics.Stopwatch(); + sw.Start(); +#endif + + var root = new GameObject("Root"); + Debug.Assert(root != null, "Crest: The water Root transform could not be immediately constructed. Please report this issue to the Crest developers via our support email or GitHub at https://github.com/wave-harmonic/crest/issues ."); + + root.hideFlags = water._Debug._ShowHiddenObjects ? HideFlags.DontSave : HideFlags.HideAndDontSave; + root.transform.parent = water.transform; + root.transform.SetLocalPositionAndRotation(Vector3.zero, Quaternion.identity); + root.transform.localScale = Vector3.one; + + if (!water.IsRunningHeadless && !water.IsRunningWithoutGraphics) + { + // create mesh data + s_Meshes = new Mesh[(int)PatchType.Count]; + var meshBounds = new Bounds[(int)PatchType.Count]; + // 4 tiles across a LOD, and support lowering density by a factor + var tileResolution = Mathf.Round(0.25f * lodDataResolution / geoDownSampleFactor); + for (var i = 0; i < (int)PatchType.Count; i++) + { + s_Meshes[i] = BuildPatch(water, (PatchType)i, tileResolution, out meshBounds[i]); + } + + for (var i = 0; i < lodCount; i++) + { + CreateLOD(water, tiles, root.transform, i, lodCount, s_Meshes, meshBounds, lodDataResolution, geoDownSampleFactor, water.Layer); + } + } + +#if PROFILE_CONSTRUCTION + sw.Stop(); + Debug.Log( "Crest: Finished generating " + lodCount.ToString() + " LODs, time: " + (1000.0*sw.Elapsed.TotalSeconds).ToString(".000") + "ms" ); +#endif + + return root.transform; + } + + static Mesh BuildPatch(WaterRenderer water, PatchType pt, float vertDensity, out Bounds bounds) + { + var verts = new List(); + var indices = new List(); + + // stick a bunch of verts into a 1m x 1m patch (scaling happens later) + var dx = 1f / vertDensity; + + + ////////////////////////////////////////////////////////////////////////////////// + // verts + + // see comments within PatchType for diagrams of each patch mesh + + // skirt widths on left, right, bottom and top (in order) + float skirtXminus = 0f, skirtXplus = 0f; + float skirtZminus = 0f, skirtZplus = 0f; + // set the patch size + if (pt == PatchType.Fat) { skirtXminus = skirtXplus = skirtZminus = skirtZplus = 1f; } + else if (pt is PatchType.FatX or PatchType.FatXOuter) { skirtXplus = 1f; } + else if (pt is PatchType.FatXZ or PatchType.FatXZOuter) { skirtXplus = skirtZplus = 1f; } + else if (pt == PatchType.FatXSlimZ) { skirtXplus = 1f; skirtZplus = -1f; } + else if (pt == PatchType.SlimX) { skirtXplus = -1f; } + else if (pt == PatchType.SlimXZ) { skirtXplus = skirtZplus = -1f; } + else if (pt == PatchType.SlimXFatZ) { skirtXplus = -1f; skirtZplus = 1f; } + + var sideLength_verts_x = 1f + vertDensity + skirtXminus + skirtXplus; + var sideLength_verts_z = 1f + vertDensity + skirtZminus + skirtZplus; + + var start_x = -0.5f - skirtXminus * dx; + var start_z = -0.5f - skirtZminus * dx; + var end_x = 0.5f + skirtXplus * dx; + var end_z = 0.5f + skirtZplus * dx; + + // With a default value of 100, this will reach the horizon at all levels at + // a far plane of 200k. + var extentsMultiplier = water._ExtentsSizeMultiplier * (Lod.k_MaximumSlices + 1 - water.LodLevels); + + for (float j = 0; j < sideLength_verts_z; j++) + { + // interpolate z across patch + var z = Mathf.Lerp(start_z, end_z, j / (sideLength_verts_z - 1f)); + + // push outermost edge out to horizon + if (pt == PatchType.FatXZOuter && j == sideLength_verts_z - 1f) + z *= extentsMultiplier; + + for (float i = 0; i < sideLength_verts_x; i++) + { + // interpolate x across patch + var x = Mathf.Lerp(start_x, end_x, i / (sideLength_verts_x - 1f)); + + // push outermost edge out to horizon + if (i == sideLength_verts_x - 1f && (pt == PatchType.FatXOuter || pt == PatchType.FatXZOuter)) + x *= extentsMultiplier; + + // could store something in y, although keep in mind this is a shared mesh that is shared across multiple lods + verts.Add(new(x, 0f, z)); + } + } + + + ////////////////////////////////////////////////////////////////////////////////// + // indices + + var sideLength_squares_x = (int)sideLength_verts_x - 1; + var sideLength_squares_z = (int)sideLength_verts_z - 1; + + for (var j = 0; j < sideLength_squares_z; j++) + { + for (var i = 0; i < sideLength_squares_x; i++) + { + var flipEdge = false; + + if (i % 2 == 1) flipEdge = !flipEdge; + if (j % 2 == 1) flipEdge = !flipEdge; + + var i0 = i + j * (sideLength_squares_x + 1); + var i1 = i0 + 1; + var i2 = i0 + (sideLength_squares_x + 1); + var i3 = i2 + 1; + + if (!flipEdge) + { + // tri 1 + indices.Add(i3); + indices.Add(i1); + indices.Add(i0); + + // tri 2 + indices.Add(i0); + indices.Add(i2); + indices.Add(i3); + } + else + { + // tri 1 + indices.Add(i3); + indices.Add(i1); + indices.Add(i2); + + // tri 2 + indices.Add(i0); + indices.Add(i2); + indices.Add(i1); + } + } + } + + + ////////////////////////////////////////////////////////////////////////////////// + // create mesh + + var mesh = new Mesh(); + if (verts != null && verts.Count > 0) + { + var arrV = new Vector3[verts.Count]; + verts.CopyTo(arrV); + + var arrI = new int[indices.Count]; + indices.CopyTo(arrI); + + mesh.SetIndices(null, MeshTopology.Triangles, 0); + mesh.vertices = arrV; + + // HDRP needs full data. Do this on a define to keep door open to runtime changing of RP. +#if d_UnityHDRP + var norms = new Vector3[verts.Count]; + for (var i = 0; i < norms.Length; i++) norms[i] = Vector3.up; + var tans = new Vector4[verts.Count]; + for (var i = 0; i < tans.Length; i++) tans[i] = new(1, 0, 0, 1); + + mesh.normals = norms; + mesh.tangents = tans; +#else + mesh.normals = null; +#endif + + mesh.SetIndices(arrI, MeshTopology.Triangles, 0); + + // recalculate bounds. add a little allowance for snapping. in the chunk renderer script, the bounds will be expanded further + // to allow for horizontal displacement + mesh.RecalculateBounds(); + bounds = mesh.bounds; + // Increase snapping allowance (see #1148). Value was chosen by observation with a + // custom debug mode to show pixels that were out of bounds. + dx *= 3f; + bounds.extents = new(bounds.extents.x + dx, bounds.extents.y, bounds.extents.z + dx); + mesh.bounds = bounds; + mesh.name = pt.ToString(); + } + else + { + bounds = new(); + } + + return mesh; + } + + static void CreateLOD(WaterRenderer water, List tiles, Transform parent, int lodIndex, int lodCount, Mesh[] meshData, Bounds[] meshBounds, int lodDataResolution, int geoDownSampleFactor, int layer) + { + var horizScale = Mathf.Pow(2f, lodIndex); + + var isBiggestLOD = lodIndex == lodCount - 1; + var generateSkirt = isBiggestLOD; + +#if CREST_DEBUG + generateSkirt = generateSkirt && !water._Debug._DisableSkirt; +#endif + + Vector2[] offsets; + PatchType[] patchTypes; + + var leadSideType = generateSkirt ? PatchType.FatXOuter : PatchType.SlimX; + var trailSideType = generateSkirt ? PatchType.FatXOuter : PatchType.FatX; + var leadCornerType = generateSkirt ? PatchType.FatXZOuter : PatchType.SlimXZ; + var trailCornerType = generateSkirt ? PatchType.FatXZOuter : PatchType.FatXZ; + var tlCornerType = generateSkirt ? PatchType.FatXZOuter : PatchType.SlimXFatZ; + var brCornerType = generateSkirt ? PatchType.FatXZOuter : PatchType.FatXSlimZ; + + if (lodIndex != 0) + { + // instance indices: + // 0 1 2 3 + // 4 5 + // 6 7 + // 8 9 10 11 + offsets = new Vector2[] { + new(-1.5f,1.5f), new(-0.5f,1.5f), new(0.5f,1.5f), new(1.5f,1.5f), + new(-1.5f,0.5f), new(1.5f,0.5f), + new(-1.5f,-0.5f), new(1.5f,-0.5f), + new(-1.5f,-1.5f), new(-0.5f,-1.5f), new(0.5f,-1.5f), new(1.5f,-1.5f), + }; + + // usually rings have an extra side of verts that point inwards. the outermost ring has both the inward + // verts and also and additional outwards set of verts that go to the horizon + patchTypes = new PatchType[] { + tlCornerType, leadSideType, leadSideType, leadCornerType, + trailSideType, leadSideType, + trailSideType, leadSideType, + trailCornerType, trailSideType, trailSideType, brCornerType, + }; + } + else + { + // first LOD has inside bit as well: + // 0 1 2 3 + // 4 5 6 7 + // 8 9 10 11 + // 12 13 14 15 + offsets = new Vector2[] { + new(-1.5f,1.5f), new(-0.5f,1.5f), new(0.5f,1.5f), new(1.5f,1.5f), + new(-1.5f,0.5f), new(-0.5f,0.5f), new(0.5f,0.5f), new(1.5f,0.5f), + new(-1.5f,-0.5f), new(-0.5f,-0.5f), new(0.5f,-0.5f), new(1.5f,-0.5f), + new(-1.5f,-1.5f), new(-0.5f,-1.5f), new(0.5f,-1.5f), new(1.5f,-1.5f), + }; + + + // all interior - the "side" types have an extra skirt that points inwards - this means that this inner most + // section doesn't need any skirting. this is good - this is the highest density part of the mesh. + patchTypes = new PatchType[] { + tlCornerType, leadSideType, leadSideType, leadCornerType, + trailSideType, PatchType.Interior, PatchType.Interior, leadSideType, + trailSideType, PatchType.Interior, PatchType.Interior, leadSideType, + trailCornerType, trailSideType, trailSideType, brCornerType, + }; + } + +#if CREST_DEBUG + // debug toggle to force all patches to be the same. they'll be made with a surrounding skirt to make sure patches + // overlap + if (water._Debug._UniformTiles) + { + for (var i = 0; i < patchTypes.Length; i++) + { + patchTypes[i] = PatchType.Fat; + } + } +#endif + + // create the water patches + for (var i = 0; i < offsets.Length; i++) + { + // instantiate and place patch + var patch = water._ChunkTemplate + ? Helpers.InstantiatePrefab(water._ChunkTemplate) + : new(); + // Also applying the hide flags to the chunk will prevent it from being pickable in the editor. + patch.hideFlags = water._Debug._ShowHiddenObjects ? HideFlags.DontSave : HideFlags.HideAndDontSave; + patch.name = $"Tile_L{lodIndex}_{patchTypes[i]}"; + patch.layer = layer; + patch.transform.parent = parent; + var pos = offsets[i]; + patch.transform.localPosition = horizScale * new Vector3(pos.x, 0f, pos.y); + // scale only horizontally, otherwise culling bounding box will be scaled up in y + patch.transform.localScale = new(horizScale, 1f, horizScale); + + if (!patch.TryGetComponent(out var mr)) + { + mr = patch.AddComponent(); + // I don't think one would use light probes for a purely specular water surface? (although diffuse + // foam shading would benefit). + mr.lightProbeUsage = LightProbeUsage.Off; + } + + { + var mesh = Object.Instantiate(meshData[(int)patchTypes[i]]); + mesh.name = meshData[(int)patchTypes[i]].name; + patch.AddComponent().sharedMesh = mesh; + + var chunk = patch.AddComponent(); + chunk._Water = water; + chunk._BoundsLocal = meshBounds[(int)patchTypes[i]]; + + chunk.SetInstanceData(lodIndex); + tiles.Add(chunk); + } + + // Sorting order to stop unity drawing it back to front. Make the innermost four tiles draw first, + // followed by the rest of the tiles by LOD index. + if (RenderPipelineHelper.IsHighDefinition) + { + // HDRP has a different rendering priority system: + // https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@10.10/manual/Renderer-And-Material-Priority.html#sorting-by-renderer + mr.rendererPriority = -lodCount + (patchTypes[i] == PatchType.Interior ? -1 : lodIndex); + } + else if (!water.AllowRenderQueueSorting) + { + // Sorting order to stop unity drawing it back to front. make the innermost 4 tiles draw first, followed by + // the rest of the tiles by LOD index. all this happens before layer 0 - the sorting layer takes priority over the + // render queue it seems! ( https://cdry.wordpress.com/2017/04/28/unity-render-queues-vs-sorting-layers/ ). This pushes + // water rendering way early, so transparent objects will by default render afterwards, which is typical for water rendering. + mr.sortingOrder = -lodCount + (patchTypes[i] == PatchType.Interior ? -1 : lodIndex); + } + + mr.shadowCastingMode = water.CastShadows ? ShadowCastingMode.On : ShadowCastingMode.Off; + + // This setting is ignored by Unity for the transparent water shader. + mr.receiveShadows = false; + + // BIRP needs further investigation. + mr.motionVectorGenerationMode = !water.WriteMotionVectors + ? MotionVectorGenerationMode.ForceNoMotion + : MotionVectorGenerationMode.Object; + + mr.material = water.Material; + + // rotate side patches to point the +x side outwards + var rotateXOutwards = patchTypes[i] is PatchType.FatX or PatchType.FatXOuter or PatchType.SlimX or PatchType.SlimXFatZ; + if (rotateXOutwards) + { + if (Mathf.Abs(pos.y) >= Mathf.Abs(pos.x)) + patch.transform.localEulerAngles = 90f * Mathf.Sign(pos.y) * -Vector3.up; + else + patch.transform.localEulerAngles = pos.x < 0f ? Vector3.up * 180f : Vector3.zero; + } + + // rotate the corner patches so the +x and +z sides point outwards + var rotateXZOutwards = patchTypes[i] is PatchType.FatXZ or PatchType.SlimXZ or PatchType.FatXSlimZ or PatchType.FatXZOuter; + if (rotateXZOutwards) + { + // xz direction before rotation + var from = new Vector3(1f, 0f, 1f).normalized; + // target xz direction is outwards vector given by local patch position - assumes this patch is a corner (checked below) + var to = patch.transform.localPosition.normalized; + if (Mathf.Abs(patch.transform.localPosition.x) < 0.0001f || Mathf.Abs(Mathf.Abs(patch.transform.localPosition.x) - Mathf.Abs(patch.transform.localPosition.z)) > 0.001f) + { + Debug.LogWarning("Crest: Skipped rotating a patch because it isn't a corner, click here to highlight.", patch); + continue; + } + + // Detect 180 degree rotations as it doesn't always rotate around Y + if (Vector3.Dot(from, to) < -0.99f) + patch.transform.localEulerAngles = Vector3.up * 180f; + else + patch.transform.localRotation = Quaternion.FromToRotation(from, to); + } + } + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Surface/WaterBuilder.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Surface/WaterBuilder.cs.meta new file mode 100644 index 000000000..9495afcfc --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Surface/WaterBuilder.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 74a58ee5c012f4e38be0d38da61de24a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Surface/WaterChunkRenderer.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Surface/WaterChunkRenderer.cs new file mode 100644 index 000000000..b251b814d --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Surface/WaterChunkRenderer.cs @@ -0,0 +1,403 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Rendering; +using WaveHarmonic.Crest.Internal; + +namespace WaveHarmonic.Crest +{ + interface IReportsHeight + { + bool ReportHeight(ref Rect bounds, ref float minimum, ref float maximum); + } + + interface IReportsDisplacement + { + bool ReportDisplacement(ref Rect bounds, ref float horizontal, ref float vertical); + } + + /// + /// Sets shader parameters for each geometry tile/chunk. + /// +#if !CREST_DEBUG + [AddComponentMenu("")] +#endif + [@ExecuteDuringEditMode] + sealed class WaterChunkRenderer : ManagedBehaviour + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + + [SerializeField] + internal bool _DrawRenderBounds = false; + + static class ShaderIDs + { + public static readonly int s_ChunkMeshScaleAlpha = Shader.PropertyToID("_Crest_ChunkMeshScaleAlpha"); + public static readonly int s_ChunkGeometryGridWidth = Shader.PropertyToID("_Crest_ChunkGeometryGridWidth"); + public static readonly int s_ChunkFarNormalsWeight = Shader.PropertyToID("_Crest_ChunkFarNormalsWeight"); + public static readonly int s_ChunkNormalScrollSpeed = Shader.PropertyToID("_Crest_ChunkNormalScrollSpeed"); + public static readonly int s_ChunkMeshScaleAlphaSource = Shader.PropertyToID("_Crest_ChunkMeshScaleAlphaSource"); + public static readonly int s_ChunkGeometryGridWidthSource = Shader.PropertyToID("_Crest_ChunkGeometryGridWidthSource"); + } + + internal Bounds _BoundsLocal; + Mesh _Mesh; + public Renderer Rend { get; private set; } + internal MaterialPropertyBlock _MaterialPropertyBlock; + Matrix4x4 _PreviousObjectToWorld; + + internal Rect _UnexpandedBoundsXZ = new(); + public Rect UnexpandedBoundsXZ => _UnexpandedBoundsXZ; + + internal bool _Culled; + internal bool _Visible; + + internal WaterRenderer _Water; + + public bool MaterialOverridden { get; set; } + + // We need to ensure that all water data has been bound for the mask to + // render properly - this is something that needs to happen irrespective + // of occlusion culling because we need the mask to render as a + // contiguous surface. + internal bool _WaterDataHasBeenBound = true; + + int _LodIndex = -1; + + public static List HeightReporters { get; } = new(); + public static List DisplacementReporters { get; } = new(); + + private protected override System.Action OnLateUpdateMethod => OnLateUpdate; + + private protected override void Initialize() + { + base.Initialize(); + + _MaterialPropertyBlock ??= new(); + + if (Rend == null) + { + Rend = GetComponent(); + } + + if (_Mesh == null) + { + // Meshes are cloned so it is safe to use sharedMesh in play mode. We need clones to modify the render bounds. + _Mesh = GetComponent().sharedMesh; + } + } + + private protected override void OnStart() + { + base.OnStart(); + + UpdateMeshBounds(); + } + + void OnLateUpdate(WaterRenderer water) + { + // Time slice update to distribute the load. + if (!(transform.GetSiblingIndex() % water.TimeSliceBoundsUpdateFrameCount != Time.frameCount % water.Chunks.Count % water.TimeSliceBoundsUpdateFrameCount)) + { + // This needs to be called on Update because the bounds depend on transform scale which can change. Also OnWillRenderObject depends on + // the bounds being correct. This could however be called on scale change events, but would add slightly more complexity. + UpdateMeshBounds(); + } + + // Update chunk shader data. + _MaterialPropertyBlock ??= new(); + + // FIXME: Sometimes thrown. + // NullReferenceException: Object reference not set to an instance of an object + // WaveHarmonic.Crest.WaterChunkRenderer.OnLateUpdate(WaveHarmonic.Crest.WaterRenderer water)(at Packages/com.waveharmonic.crest/Runtime/Scripts/Surface/WaterChunkRenderer.cs:119) + // WaveHarmonic.Crest.WaterRenderer.LateUpdate()(at Packages/com.waveharmonic.crest/Runtime/Scripts/WaterRenderer.cs:733) + if (Rend == null) + { + Rend = GetComponent(); + } + + Rend.GetPropertyBlock(_MaterialPropertyBlock); + _MaterialPropertyBlock.SetInteger(Lod.ShaderIDs.s_LodIndex, _LodIndex); + var data = water._PerCascadeInstanceData.Current[_LodIndex]; + _MaterialPropertyBlock.SetFloat(ShaderIDs.s_ChunkMeshScaleAlpha, data._MeshScaleLerp); + _MaterialPropertyBlock.SetFloat(ShaderIDs.s_ChunkGeometryGridWidth, data._GeometryGridWidth); + _MaterialPropertyBlock.SetFloat(ShaderIDs.s_ChunkFarNormalsWeight, data._FarNormalsWeight); + _MaterialPropertyBlock.SetVector(ShaderIDs.s_ChunkNormalScrollSpeed, data._NormalScrollSpeeds); + data = water._PerCascadeInstanceData.Previous(1)[_LodIndex]; + _MaterialPropertyBlock.SetFloat(ShaderIDs.s_ChunkMeshScaleAlphaSource, data._MeshScaleLerp); + _MaterialPropertyBlock.SetFloat(ShaderIDs.s_ChunkGeometryGridWidthSource, data._GeometryGridWidth); + Rend.SetPropertyBlock(_MaterialPropertyBlock); + +#if UNITY_6000_0_OR_NEWER + if (Application.isPlaying && RenderPipelineHelper.IsUniversal && water.WriteMotionVectors) + { + var material = water._MotionVectorsMaterial; + + var parameters = new RenderParams(material) + { + motionVectorMode = MotionVectorGenerationMode.Object, + material = material, + matProps = _MaterialPropertyBlock, + worldBounds = Rend.bounds, + layer = water.Layer, + receiveShadows = false, + shadowCastingMode = ShadowCastingMode.Off, + lightProbeUsage = LightProbeUsage.Off, + reflectionProbeUsage = ReflectionProbeUsage.Off, + }; + + if (_Mesh == null) + { + _Mesh = GetComponent().sharedMesh; + } + + Graphics.RenderMesh(parameters, _Mesh, 0, transform.localToWorldMatrix, _PreviousObjectToWorld); + _PreviousObjectToWorld = transform.localToWorldMatrix; + } +#endif + } + + void UpdateMeshBounds() + { + UnityEngine.Profiling.Profiler.BeginSample("Crest.WaterChunkRenderer.UpdateMeshBounds"); + + if (WaterBody.WaterBodies.Count > 0) + { + _UnexpandedBoundsXZ = ComputeBoundsXZ(transform, ref _BoundsLocal); + } + + var newBounds = _BoundsLocal; + ExpandBoundsForDisplacements(transform, ref newBounds); + + // FIXME: Fixes a crash which was reported twice. Could not reproduce. + // NullReferenceException: Object reference not set to an instance of an object. + // at WaveHarmonic.Crest.WaterChunkRenderer.UpdateMeshBounds()[0x00000] in < 00000000000000000000000000000000 >:0 + // at WaveHarmonic.Crest.WaterChunkRenderer.OnUpdate(WaveHarmonic.Crest.WaterRenderer water)[0x00000] in < 00000000000000000000000000000000 >:0 + // at WaveHarmonic.Crest.WaterRenderer.Update()[0x00000] in < 00000000000000000000000000000000 >:0 + if (_Mesh == null) + { + _Mesh = GetComponent().sharedMesh; + } + + _Mesh.bounds = newBounds; + + UnityEngine.Profiling.Profiler.EndSample(); + } + + public static Rect ComputeBoundsXZ(Transform transform, ref Bounds bounds) + { + // Since chunks are axis-aligned it is safe to rotate the bounds. + var center = transform.rotation * bounds.center * transform.lossyScale.x + transform.position; + var size = transform.rotation * bounds.size * transform.lossyScale.x; + // Rotation can make size negative. + return new(0, 0, Mathf.Abs(size.x), Mathf.Abs(size.z)) + { + center = center.XZ(), + }; + } + + static Camera s_CurrentCamera = null; + + static void BeginCameraRendering(ScriptableRenderContext context, Camera camera) + { + // Camera.current is only supported in the built-in pipeline. This provides the current camera for + // OnWillRenderObject for SRPs. BeginCameraRendering is called for each active camera in every frame. + // OnWillRenderObject is called after BeginCameraRendering for the current camera so this works. + s_CurrentCamera = camera; + } + + // Used by the water mask system if we need to render the water mask in situations + // where the water itself doesn't need to be rendered or has otherwise been disabled + internal void Bind(Camera camera) + { + _WaterDataHasBeenBound = true; + + if (Rend == null) + { + return; + } + + if (!MaterialOverridden && Rend.sharedMaterial != _Water.Material) + { + Rend.sharedMaterial = _Water.Material; + } + } + + void OnDestroy() + { + Helpers.Destroy(_Mesh); + } + + // Called when visible to a camera + void OnWillRenderObject() + { + // Camera.current is only supported in built-in pipeline. + if (RenderPipelineHelper.IsLegacy && Camera.current != null) + { + s_CurrentCamera = Camera.current; + } + + // If only the game view is visible, this reference will be dropped for SRP on recompile. + if (s_CurrentCamera == null) + { + return; + } + + // Depth texture is used by water shader for transparency/depth fog, and for fading out foam at shoreline. + s_CurrentCamera.depthTextureMode |= DepthTextureMode.Depth; + + Bind(s_CurrentCamera); + + if (_DrawRenderBounds) + { + Rend.bounds.DebugDraw(); + } + } + + // this is called every frame because the bounds are given in world space and depend on the transform scale, which + // can change depending on view altitude + public void ExpandBoundsForDisplacements(Transform transform, ref Bounds bounds) + { + var scale = transform.lossyScale; + var rotation = transform.rotation; + + var boundsPadding = _Water.MaximumHorizontalDisplacement; + var expandXZ = boundsPadding / scale.x; + var boundsY = _Water.MaximumVerticalDisplacement; + + // Extend the kinematic bounds slightly to give room for dynamic waves. + if (_Water._DynamicWavesLod.Enabled) + { + boundsY += 5f; + } + + var extents = bounds.extents; + + // Extend bounds by global waves. + bounds.extents = new(extents.x + expandXZ, boundsY, extents.z + expandXZ); + + extents = bounds.extents; + var center = bounds.center; + var size = bounds.size; + + // Get XZ bounds. Doing this manually bypasses updating render bounds call. + Rect rect; + { + var p1 = transform.position; + var p2 = rotation * new Vector3(center.x, 0f, center.z); + var s1 = scale; + var s2 = rotation * new Vector3(size.x, 0f, size.z); + + rect = new(0, 0, Mathf.Abs(s1.x * s2.x), Mathf.Abs(s1.z * s2.z)) + { + center = new(p1.x + p2.x, p1.z + p2.z) + }; + } + + // Extend bounds by local waves. + { + var totalHorizontal = 0f; + var totalVertical = 0f; + + foreach (var reporter in DisplacementReporters) + { + var horizontal = 0f; + var vertical = 0f; + if (reporter.ReportDisplacement(ref rect, ref horizontal, ref vertical)) + { + totalHorizontal += horizontal; + totalVertical += vertical; + } + } + + boundsPadding = totalHorizontal; + expandXZ = boundsPadding / scale.x; + boundsY = totalVertical; + + bounds.extents = new(extents.x + expandXZ, extents.y + boundsY, extents.z + expandXZ); + } + + // Expand and offset bounds by height. + { + var minimumWaterLevelBounds = 0f; + var maximumWaterLevelBounds = 0f; + + foreach (var reporter in HeightReporters) + { + var minimum = 0f; + var maximum = 0f; + if (reporter.ReportHeight(ref rect, ref minimum, ref maximum)) + { + minimumWaterLevelBounds = Mathf.Max(minimumWaterLevelBounds, Mathf.Abs(Mathf.Min(minimum, _Water.SeaLevel) - _Water.SeaLevel)); + maximumWaterLevelBounds = Mathf.Max(maximumWaterLevelBounds, Mathf.Abs(Mathf.Max(maximum, _Water.SeaLevel) - _Water.SeaLevel)); + } + } + + minimumWaterLevelBounds *= 0.5f; + maximumWaterLevelBounds *= 0.5f; + + boundsY = minimumWaterLevelBounds + maximumWaterLevelBounds; + extents = bounds.extents; + bounds.extents = new(extents.x, extents.y + boundsY, extents.z); + + var offset = maximumWaterLevelBounds - minimumWaterLevelBounds; + center = bounds.center; + bounds.center = new(center.x, center.y + offset, center.z); + } + } + + public void SetInstanceData(int lodIndex) + { + _LodIndex = lodIndex; + } + + [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)] + static void InitStatics() + { + // Init here from 2019.3 onwards + s_CurrentCamera = null; + HeightReporters.Clear(); + DisplacementReporters.Clear(); + } + + [RuntimeInitializeOnLoadMethod] + static void RunOnStart() + { + RenderPipelineManager.beginCameraRendering -= BeginCameraRendering; + RenderPipelineManager.beginCameraRendering += BeginCameraRendering; + } + } + + static class BoundsHelper + { + internal static void DebugDraw(this Bounds b) + { + var xmin = b.min.x; + var ymin = b.min.y; + var zmin = b.min.z; + var xmax = b.max.x; + var ymax = b.max.y; + var zmax = b.max.z; + + Debug.DrawLine(new(xmin, ymin, zmin), new(xmin, ymin, zmax)); + Debug.DrawLine(new(xmin, ymin, zmin), new(xmax, ymin, zmin)); + Debug.DrawLine(new(xmax, ymin, zmax), new(xmin, ymin, zmax)); + Debug.DrawLine(new(xmax, ymin, zmax), new(xmax, ymin, zmin)); + + Debug.DrawLine(new(xmin, ymax, zmin), new(xmin, ymax, zmax)); + Debug.DrawLine(new(xmin, ymax, zmin), new(xmax, ymax, zmin)); + Debug.DrawLine(new(xmax, ymax, zmax), new(xmin, ymax, zmax)); + Debug.DrawLine(new(xmax, ymax, zmax), new(xmax, ymax, zmin)); + + Debug.DrawLine(new(xmax, ymax, zmax), new(xmax, ymin, zmax)); + Debug.DrawLine(new(xmin, ymin, zmin), new(xmin, ymax, zmin)); + Debug.DrawLine(new(xmax, ymin, zmin), new(xmax, ymax, zmin)); + Debug.DrawLine(new(xmin, ymax, zmax), new(xmin, ymin, zmax)); + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Surface/WaterChunkRenderer.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Surface/WaterChunkRenderer.cs.meta new file mode 100644 index 000000000..3f3c332a6 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Surface/WaterChunkRenderer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 391e7ec2ec9194dbeb14b0b0af03a29f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Surface/WaterReflections.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Surface/WaterReflections.cs new file mode 100644 index 000000000..51785dcd8 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Surface/WaterReflections.cs @@ -0,0 +1,853 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// This script originated from the unity standard assets. It has been modified heavily to be camera-centric (as opposed to +// geometry-centric) and assumes a single main camera which simplifies the code. + +using System; +using Unity.Collections; +using UnityEngine; +using UnityEngine.Rendering; +using UnityEngine.Rendering.HighDefinition; +using UnityEngine.Rendering.Universal; + +namespace WaveHarmonic.Crest +{ + /// + /// What side of the water surface to render planar reflections for. + /// + public enum WaterReflectionSide + { + /// + /// Both sides. Most expensive. + /// + Both, + + /// + /// Above only. Typical for planar reflections. + /// + Above, + + /// + /// Below only. For total internal reflections. + /// + Below, + } + + /// + /// Renders reflections for water. Currently on planar reflections. + /// + [Serializable] + public sealed partial class WaterReflections + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + + [@Space(10)] + + [@Label("Enable")] + [Tooltip("Whether planar reflections are enabled.\n\nAllocates/releases resources if state has changed.")] + [@GenerateAPI(Setter.Custom)] + [@DecoratedField, SerializeField] + internal bool _Enabled; + + + [@Heading("Capture")] + + [Tooltip("What side of the water surface to render planar reflections for.")] + [@GenerateAPI(name: "ReflectionSide")] + [@DecoratedField, SerializeField] + internal WaterReflectionSide _Mode = WaterReflectionSide.Above; + + [Tooltip("The layers to rendering into reflections.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + LayerMask _Layers = 1; // Default + + [Tooltip("Resolution of the reflection texture.")] + [@GenerateAPI] + [@Delayed, SerializeField] + int _Resolution = 256; + + [Tooltip("Whether to render to the viewer camera only.\n\nWhen disabled, reflections will render for all cameras rendering the water layer, which currently this prevents Refresh Rate from working. Enabling will unlock the Refresh Rate heading.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + internal bool _RenderOnlySingleCamera; + + [@Space(10)] + + [Tooltip("Whether to render the sky or fallback to default reflections.\n\nNot rendering the sky can prevent other custom shaders (like tree leaves) from being in the final output. Enable for best compatibility.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + internal bool _Sky = true; + + [Tooltip("Disables pixel lights (BIRP only).")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + bool _DisablePixelLights = true; + +#pragma warning disable 414 + [Tooltip("Disables shadows.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + bool _DisableShadows = true; +#pragma warning restore 414 + + [Tooltip("Whether to allow HDR.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + bool _HDR = true; + + [Tooltip("Whether to allow stencil operations.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + bool _Stencil = false; + + [Tooltip("Whether to allow MSAA.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + bool _AllowMSAA = false; + + [@Space(10)] + + [Tooltip("Overrides global quality settings.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + QualitySettingsOverride _QualitySettingsOverride = new() + { + _OverrideLodBias = false, + _LodBias = 0.5f, + _OverrideMaximumLodLevel = false, + _MaximumLodLevel = 1, + _OverrideTerrainPixelError = false, + _TerrainPixelError = 10, + }; + + [@Heading("Culling")] + + [Tooltip("The near clip plane clips any geometry before it, removing it from reflections.\n\nCan be used to reduce reflection leaks and support varied water level.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + float _ClipPlaneOffset; + + [Tooltip("Anything beyond the far clip plane is not rendered.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + float _FarClipPlane = 1000; + + [Tooltip("Disables occlusion culling.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + bool _DisableOcclusionCulling = true; + + + [@Heading("Refresh Rate")] + + [Tooltip("Refresh reflection every x frames (one is every frame)")] + [@Predicated(nameof(_RenderOnlySingleCamera))] + [@DecoratedField, SerializeField] + int _RefreshPerFrames = 1; + + [@Predicated(nameof(_RenderOnlySingleCamera))] + [@DecoratedField, SerializeField] + int _FrameRefreshOffset = 0; + + + [@Heading("Oblique Matrix")] + + [@Label("Enable")] + [Tooltip("An oblique matrix will clip anything below the surface for free.\n\nDisable if you have problems with certain effects. Disabling can cause other artifacts like objects below the surface to appear in reflections.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + bool _UseObliqueMatrix = true; + + [Tooltip("Planar relfections using an oblique frustum for better performance.\n\nThis can cause depth issues for TIRs, especially near the surface.")] + [@Predicated(nameof(_UseObliqueMatrix))] + [@GenerateAPI] + [@DecoratedField, SerializeField] + bool _NonObliqueNearSurface; + + [Tooltip("If within this distance from the surface, disable the oblique matrix.")] + [@Predicated(nameof(_NonObliqueNearSurface))] + [@Predicated(nameof(_UseObliqueMatrix))] + [@GenerateAPI] + [@DecoratedField, SerializeField] + float _NonObliqueNearSurfaceThreshold = 0.05f; + + + [@Space(10)] + + [@DecoratedField, SerializeField] + DebugFields _Debug = new(); + + [Serializable] + sealed class DebugFields + { + [@DecoratedField, SerializeField] + internal bool _ShowHiddenObjects; + + [Tooltip("Rendering reflections per-camera requires recursive rendering. Check this toggle if experiencing issues. The other downside without it is a one-frame delay.")] + [@DecoratedField, SerializeField] + internal bool _DisableRecursiveRendering; + } + + + /// + /// What side of the water surface to render planar reflections for. + /// + public WaterReflectionSide Mode { get => _Mode; set => _Mode = value; } + + + static class ShaderIDs + { + public static int s_ReflectionTexture = Shader.PropertyToID("_Crest_ReflectionTexture"); + public static int s_ReflectionPositionNormal = Shader.PropertyToID("_Crest_ReflectionPositionNormal"); + } + + // Checked in underwater to filter cameras. + internal static Camera CurrentCamera { get; private set; } + + internal WaterRenderer _Water; + internal UnderwaterRenderer _UnderWater; + + RenderTexture _ReflectionTexture; + internal RenderTexture ReflectionTexture => _ReflectionTexture; + readonly Vector4[] _ReflectionPositionNormal = new Vector4[2]; + + Camera _CameraViewpoint; + Skybox _CameraViewpointSkybox; + Camera _CameraReflections; + Skybox _CameraReflectionsSkybox; + + int RefreshPerFrames => _RenderOnlySingleCamera ? _RefreshPerFrames : 1; + long _LastRefreshOnFrame = -1; + + internal bool SupportsRecursiveRendering => +#if !UNITY_6000_0_OR_NEWER + // HDRP cannot recursive render for 2022. + !RenderPipelineHelper.IsHighDefinition && +#endif + !_Debug._DisableRecursiveRendering; + + readonly float[] _CullDistances = new float[32]; + + /// + /// Invoked when the reflection camera is created. + /// + public static Action OnCameraAdded { get; set; } + + internal void OnEnable() + { + _CameraViewpoint = _Water.Viewer; + _CameraViewpointSkybox = _CameraViewpoint.GetComponent(); + + // This is called also called every frame, but was required here as there was a + // black reflection for a frame without this earlier setup call. + CreateWaterObjects(_CameraViewpoint); + } + + internal void OnDisable() + { + Shader.SetGlobalTexture(ShaderIDs.s_ReflectionTexture, Texture2D.blackTexture); + } + + internal void OnDestroy() + { + if (_CameraReflections) + { + Helpers.Destroy(_CameraReflections.gameObject); + _CameraReflections = null; + } + + if (_ReflectionTexture) + { + _ReflectionTexture.Release(); + Helpers.Destroy(_ReflectionTexture); + _ReflectionTexture = null; + } + } + + internal void OnPreRenderCamera(Camera camera) + { + if (SupportsRecursiveRendering) + { + if (camera.cameraType is CameraType.Preview or CameraType.Reflection) + { + return; + } + + if (!Helpers.MaskIncludesLayer(camera.cullingMask, _Water.Layer)) + { + return; + } + + if (_RenderOnlySingleCamera && camera != _Water.Viewer) + { + return; + } + + _CameraViewpoint = camera; + LateUpdate(); + } + + if (camera == _CameraViewpoint) + { + // TODO: Emit an event instead so WBs can listen. + Shader.SetGlobalTexture(ShaderIDs.s_ReflectionTexture, _ReflectionTexture); + } + } + + internal void OnAfterCameraRender(Camera camera) + { + if (SupportsRecursiveRendering && !_RenderOnlySingleCamera) return; + Shader.SetGlobalTexture(ShaderIDs.s_ReflectionTexture, Texture2D.blackTexture); + } + + internal void LateUpdate() + { + // Frame rate limiter. + if (_LastRefreshOnFrame > 0 && RefreshPerFrames > 1) + { + // Check whether we need to refresh the frame. + if (Math.Abs(_FrameRefreshOffset) % _RefreshPerFrames != Time.renderedFrameCount % _RefreshPerFrames) + { + return; + } + } + + if (_Water == null) + { + return; + } + + if (!SupportsRecursiveRendering) + { + _CameraViewpoint = _Water.Viewer; + } + + if (_CameraViewpoint == null) + { + return; + } + +#if UNITY_EDITOR + // Fix "Screen position out of view frustum" when 2D view activated. + { + var sceneView = UnityEditor.SceneView.lastActiveSceneView; + if (sceneView != null && sceneView.in2DMode && sceneView.camera == _CameraViewpoint) + { + return; + } + } +#endif + + CreateWaterObjects(_CameraViewpoint); + + if (!_CameraReflections) + { + return; + } + + UpdateCameraModes(); + ForceDistanceCulling(_FarClipPlane); + + _CameraReflections.targetTexture = _ReflectionTexture; + + // TODO: Do not do this every frame. + if (_Mode != WaterReflectionSide.Both) + { + Helpers.ClearRenderTexture(_ReflectionTexture, Color.clear, depth: false); + } + + // We do not want the water plane when rendering planar reflections. + _Water.Root.gameObject.SetActive(false); + + CurrentCamera = _CameraReflections; + + // Optionally disable pixel lights for reflection/refraction + var oldPixelLightCount = QualitySettings.pixelLightCount; + if (_DisablePixelLights) + { + QualitySettings.pixelLightCount = 0; + } + + // Optionally disable shadows. + var oldShadowQuality = QualitySettings.shadows; + if (_DisableShadows) + { + QualitySettings.shadows = UnityEngine.ShadowQuality.Disable; + } + + _QualitySettingsOverride.Override(); + + // Invert culling because view is mirrored. Does not work for HDRP (handled elsewhere). + var oldCulling = GL.invertCulling; + GL.invertCulling = !oldCulling; + +#if UNITY_EDITOR + try +#endif + { + Render(); + } +#if UNITY_EDITOR + // Ensure that any global settings are restored. + finally +#endif + { + GL.invertCulling = oldCulling; + + // Restore shadows. + if (_DisableShadows) + { + QualitySettings.shadows = oldShadowQuality; + } + + // Restore pixel light count + if (_DisablePixelLights) + { + QualitySettings.pixelLightCount = oldPixelLightCount; + } + + _QualitySettingsOverride.Restore(); + + CurrentCamera = null; + _Water.Root.gameObject.SetActive(true); + + // Remember this frame as last refreshed. + _LastRefreshOnFrame = Time.renderedFrameCount; + } + } + + void Render() + { + var descriptor = _ReflectionTexture.descriptor; + descriptor.dimension = TextureDimension.Tex2D; + descriptor.volumeDepth = 1; + descriptor.useMipMap = false; + // No need to clear, as camera clears using the skybox. + var target = RenderTexture.GetTemporary(descriptor); + _CameraReflections.targetTexture = target; + + if (_Mode != WaterReflectionSide.Below) + { + _ReflectionPositionNormal[0] = ComputeHorizonPositionAndNormal(_CameraReflections, _Water.SeaLevel, 0.05f, false); + + if (_UnderWater._Enabled) + { + // Disable underwater layer. It is the only way to exclude probes. + _CameraReflections.cullingMask = _Layers & ~(1 << _UnderWater.Layer); + } + + RenderCamera(_CameraReflections, Vector3.up, false); + Graphics.CopyTexture(target, 0, 0, _ReflectionTexture, 0, 0); + + _CameraReflections.ResetProjectionMatrix(); + } + + if (_Mode != WaterReflectionSide.Above) + { + _ReflectionPositionNormal[1] = ComputeHorizonPositionAndNormal(_CameraReflections, _Water.SeaLevel, -0.05f, true); + + if (_UnderWater._Enabled) + { + // Enable underwater layer. + _CameraReflections.cullingMask = _Layers | (1 << _UnderWater.Layer); + // We need the depth texture for underwater. + _CameraReflections.depthTextureMode = DepthTextureMode.Depth; + } + + RenderCamera(_CameraReflections, Vector3.down, _NonObliqueNearSurface); + Graphics.CopyTexture(target, 0, 0, _ReflectionTexture, 1, 0); + + _CameraReflections.ResetProjectionMatrix(); + } + + + RenderTexture.ReleaseTemporary(target); + + _ReflectionTexture.GenerateMips(); + + Shader.SetGlobalVectorArray(ShaderIDs.s_ReflectionPositionNormal, _ReflectionPositionNormal); + } + + void RenderCamera(Camera camera, Vector3 planeNormal, bool nonObliqueNearSurface) + { + // Find out the reflection plane: position and normal in world space + var planePosition = _Water.Root.position; + + var offset = _ClipPlaneOffset; + { + var viewpoint = _CameraViewpoint.transform; + if (offset == 0f && viewpoint.position.y == 0f && viewpoint.rotation.eulerAngles.y == 0f) + { + // Minor offset to prevent "Screen position out of view frustum". Smallest number + // to work with both above and below. Smallest number to work with both above and + // below. Could be BIRP only. + offset = 0.00001f; + } + } + + // Reflect camera around reflection plane + var distance = -Vector3.Dot(planeNormal, planePosition) - offset; + var reflectionPlane = new Vector4(planeNormal.x, planeNormal.y, planeNormal.z, distance); + + var reflection = Matrix4x4.zero; + CalculateReflectionMatrix(ref reflection, reflectionPlane); + + camera.worldToCameraMatrix = _CameraViewpoint.worldToCameraMatrix * reflection; + + // Setup oblique projection matrix so that near plane is our reflection + // plane. This way we clip everything below/above it for free. + var clipPlane = CameraSpacePlane(camera, planePosition, planeNormal, 1.0f); + + if (_UseObliqueMatrix && (!nonObliqueNearSurface || Mathf.Abs(_CameraViewpoint.transform.position.y - planePosition.y) > _NonObliqueNearSurfaceThreshold)) + { + camera.projectionMatrix = _CameraViewpoint.CalculateObliqueMatrix(clipPlane); + } + + // Set custom culling matrix from the current camera + camera.cullingMatrix = _CameraViewpoint.projectionMatrix * _CameraViewpoint.worldToCameraMatrix; + + camera.transform.position = reflection.MultiplyPoint(_CameraViewpoint.transform.position); + var euler = _CameraViewpoint.transform.eulerAngles; + camera.transform.eulerAngles = new(-euler.x, euler.y, euler.z); + camera.cullingMatrix = camera.projectionMatrix * camera.worldToCameraMatrix; + + if (SupportsRecursiveRendering) + { + Helpers.RenderCamera(camera, _Water._Context); + } + else + { + camera.Render(); + } + } + + /// + /// Limit render distance for reflection camera for first 32 layers + /// + /// reflection far clip distance + void ForceDistanceCulling(float farClipPlane) + { + // Cannot use spherical culling with SRPs. Will error. + if (!RenderPipelineHelper.IsLegacy) + { + return; + } + + for (var i = 0; i < _CullDistances.Length; i++) + { + // The culling distance + _CullDistances[i] = farClipPlane; + } + _CameraReflections.layerCullDistances = _CullDistances; + _CameraReflections.layerCullSpherical = true; + } + + void UpdateCameraModes() + { +#if d_UnityHDRP + if (RenderPipelineHelper.IsHighDefinition) + { + if (_CameraReflections.TryGetComponent(out HDAdditionalCameraData additionalCameraData)) + { + additionalCameraData.clearColorMode = _Sky ? HDAdditionalCameraData.ClearColorMode.Sky : + HDAdditionalCameraData.ClearColorMode.Color; + } + } + else +#endif + { + _CameraReflections.clearFlags = _Sky ? CameraClearFlags.Skybox : CameraClearFlags.Color; + + if (_Sky && _CameraViewpoint.TryGetComponent(out _CameraViewpointSkybox)) + { + if (_CameraReflectionsSkybox == null) + { + _CameraReflectionsSkybox = _CameraReflections.gameObject.AddComponent(); + } + + _CameraReflectionsSkybox.enabled = _CameraViewpointSkybox.enabled; + _CameraReflectionsSkybox.material = _CameraViewpointSkybox.material; + } + else + { + // Destroy otherwise skybox will not render if empty. + Helpers.Destroy(_CameraViewpointSkybox); + } + } + + // Update other values to match current camera. + // Even if we are supplying custom camera&projection matrices, + // some of values are used elsewhere (e.g. skybox uses far plane). + + _CameraReflections.farClipPlane = _CameraViewpoint.farClipPlane; + _CameraReflections.nearClipPlane = _CameraViewpoint.nearClipPlane; + _CameraReflections.orthographic = _CameraViewpoint.orthographic; + _CameraReflections.fieldOfView = _CameraViewpoint.fieldOfView; + _CameraReflections.orthographicSize = _CameraViewpoint.orthographicSize; + _CameraReflections.allowMSAA = _AllowMSAA; + _CameraReflections.aspect = _CameraViewpoint.aspect; + _CameraReflections.useOcclusionCulling = !_DisableOcclusionCulling && _CameraViewpoint.useOcclusionCulling; + _CameraReflections.depthTextureMode = _CameraViewpoint.depthTextureMode; + } + + // On-demand create any objects we need for water + void CreateWaterObjects(Camera currentCamera) + { + var format = _HDR ? RenderTextureFormat.ARGBHalf : RenderTextureFormat.ARGB32; + var stencil = _Stencil ? 24 : 16; + + // Reflection render texture + if (!_ReflectionTexture || _ReflectionTexture.width != _Resolution || _ReflectionTexture.format != format || _ReflectionTexture.depth != stencil) + { + if (_ReflectionTexture) + { + Helpers.Destroy(_ReflectionTexture); + } + + Debug.Assert(SystemInfo.SupportsRenderTextureFormat(format), "Crest: The graphics device does not support the render texture format " + format.ToString()); + _ReflectionTexture = new(_Resolution, _Resolution, stencil, format) + { + name = "_Crest_WaterReflection", + isPowerOfTwo = true, + dimension = TextureDimension.Tex2DArray, + volumeDepth = 2, + useMipMap = true, + autoGenerateMips = false, + filterMode = FilterMode.Trilinear, + }; + _ReflectionTexture.Create(); + } + + // Camera for reflection + if (!_CameraReflections) + { + var go = new GameObject("_Crest_WaterReflectionCamera"); + go.transform.SetParent(_Water.Container.transform, worldPositionStays: true); + _CameraReflections = go.AddComponent(); + _CameraReflections.enabled = false; + _CameraReflections.cullingMask = _Layers; + _CameraReflections.cameraType = CameraType.Reflection; + _CameraReflections.backgroundColor = Color.clear; + + if (RenderPipelineHelper.IsLegacy) + { + _CameraReflections.gameObject.AddComponent(); + } + +#if d_UnityHDRP + if (RenderPipelineHelper.IsHighDefinition) + { + var additionalCameraData = _CameraReflections.gameObject.AddComponent(); + additionalCameraData.invertFaceCulling = true; + additionalCameraData.defaultFrameSettings = FrameSettingsRenderType.RealtimeReflection; + additionalCameraData.backgroundColorHDR = Color.clear; + additionalCameraData.customRenderingSettings = true; + additionalCameraData.renderingPathCustomFrameSettingsOverrideMask.mask[(uint)FrameSettingsField.CustomPass] = true; + additionalCameraData.renderingPathCustomFrameSettings.SetEnabled(FrameSettingsField.CustomPass, true); + } +#endif + +#if d_UnityURP + if (RenderPipelineHelper.IsUniversal) + { + var additionalCameraData = _CameraReflections.gameObject.AddComponent(); + additionalCameraData.renderShadows = !_DisableShadows; + additionalCameraData.requiresColorTexture = false; + additionalCameraData.requiresDepthTexture = false; + } +#endif + OnCameraAdded?.Invoke(_CameraReflections); + } + + _CameraReflections.gameObject.hideFlags = _Debug._ShowHiddenObjects ? HideFlags.DontSave : HideFlags.HideAndDontSave; + } + + // Given position/normal of the plane, calculates plane in camera space. + Vector4 CameraSpacePlane(Camera cam, Vector3 pos, Vector3 normal, float sideSign) + { + var offset = _ClipPlaneOffset; + { + var viewpoint = _CameraViewpoint.transform; + if (offset == 0f && viewpoint.position.y == 0f && viewpoint.rotation.eulerAngles.y == 0f) + { + // Minor offset to prevent "Screen position out of view frustum". Smallest number + // to work with both above and below. Smallest number to work with both above and + // below. Could be BIRP only. + offset = 0.00001f; + } + } + + var offsetPos = pos + normal * offset; + var m = cam.worldToCameraMatrix; + var cpos = m.MultiplyPoint(offsetPos); + var cnormal = m.MultiplyVector(normal).normalized * sideSign; + return new(cnormal.x, cnormal.y, cnormal.z, -Vector3.Dot(cpos, cnormal)); + } + + // Calculates reflection matrix around the given plane + static void CalculateReflectionMatrix(ref Matrix4x4 reflectionMat, Vector4 plane) + { + reflectionMat.m00 = 1F - 2F * plane[0] * plane[0]; + reflectionMat.m01 = -2F * plane[0] * plane[1]; + reflectionMat.m02 = -2F * plane[0] * plane[2]; + reflectionMat.m03 = -2F * plane[3] * plane[0]; + + reflectionMat.m10 = -2F * plane[1] * plane[0]; + reflectionMat.m11 = 1F - 2F * plane[1] * plane[1]; + reflectionMat.m12 = -2F * plane[1] * plane[2]; + reflectionMat.m13 = -2F * plane[3] * plane[1]; + + reflectionMat.m20 = -2F * plane[2] * plane[0]; + reflectionMat.m21 = -2F * plane[2] * plane[1]; + reflectionMat.m22 = 1F - 2F * plane[2] * plane[2]; + reflectionMat.m23 = -2F * plane[3] * plane[2]; + + reflectionMat.m30 = 0F; + reflectionMat.m31 = 0F; + reflectionMat.m32 = 0F; + reflectionMat.m33 = 1F; + } + + /// + /// Compute intersection between the frustum far plane and given plane, and return view space + /// position and normal for this horizon line. + /// + static Vector4 ComputeHorizonPositionAndNormal(Camera camera, float positionY, float offset, bool flipped) + { + var position = Vector2.zero; + var normal = Vector2.zero; + + // Set up back points of frustum. + var positionNDC = new NativeArray(4, Allocator.Temp); + var positionWS = new NativeArray(4, Allocator.Temp); + try + { + + var farPlane = camera.farClipPlane; + positionNDC[0] = new(0f, 0f, farPlane); + positionNDC[1] = new(0f, 1f, farPlane); + positionNDC[2] = new(1f, 1f, farPlane); + positionNDC[3] = new(1f, 0f, farPlane); + + // Project out to world. + for (var i = 0; i < positionWS.Length; i++) + { + // Eye parameter works for BIRP. With it we could skip setting matrices. + // In HDRP it doesn't work for XR MP. And completely breaks horizon in XR SPI. + positionWS[i] = camera.ViewportToWorldPoint(positionNDC[i]); + } + + var intersectionsScreen = new NativeArray(2, Allocator.Temp); + // This is only used to disambiguate the normal later. Could be removed if we were + // more careful with point order/indices below. + var intersectionsWorld = new NativeArray(2, Allocator.Temp); + try + { + var count = 0; + + // Iterate over each back point + for (var i = 0; i < 4; i++) + { + // Get next back point, to obtain line segment between them. + var next = (i + 1) % 4; + + // See if one point is above and one point is below sea level - then sign of the two differences + // will be different, and multiplying them will give a negative. + if ((positionWS[i].y - positionY) * (positionWS[next].y - positionY) < 0f) + { + // Proportion along line segment where intersection occurs. + var proportion = Mathf.Abs((positionY - positionWS[i].y) / (positionWS[next].y - positionWS[i].y)); + intersectionsScreen[count] = Vector2.Lerp(positionNDC[i], positionNDC[next], proportion); + intersectionsWorld[count] = Vector3.Lerp(positionWS[i], positionWS[next], proportion); + + count++; + } + } + + // Two distinct results - far plane intersects water. + if (count == 2) + { + position = intersectionsScreen[0]; + var tangent = intersectionsScreen[0] - intersectionsScreen[1]; + normal.x = -tangent.y; + normal.y = tangent.x; + + // Disambiguate the normal. The tangent normal might go from left to right or right + // to left since we do not handle ordering of intersection points. + if (Vector3.Dot(intersectionsWorld[0] - intersectionsWorld[1], camera.transform.right) > 0f) + { + normal = -normal; + } + + // Invert the normal if camera is upside down. + if (camera.transform.up.y <= 0f) + { + normal = -normal; + } + + // The above will sometimes produce a normal that is inverted around 90° along the + // Z axis. Here we are using world up to make sure that water is world down. + { + var cameraFacing = Vector3.Dot(camera.transform.right, Vector3.up); + var normalFacing = Vector2.Dot(normal, Vector2.right); + + if (cameraFacing > 0.75f && normalFacing > 0.9f) + { + normal = -normal; + } + else if (cameraFacing < -0.75f && normalFacing < -0.9f) + { + normal = -normal; + } + } + + // Minor offset helps. + position += normal.normalized * offset; + } + } + finally + { + intersectionsScreen.Dispose(); + intersectionsWorld.Dispose(); + } + } + finally + { + positionNDC.Dispose(); + positionWS.Dispose(); + } + + if (flipped) + { + normal = -normal; + } + + return new(position.x, position.y, normal.x, normal.y); + } + + void SetEnabled(bool previous, bool current) + { + if (previous == current) return; + if (_Water == null || !_Water.isActiveAndEnabled) return; + if (_Enabled) OnEnable(); else OnDisable(); + } + +#if UNITY_EDITOR + [@OnChange] + void OnChange(string propertyPath, object previousValue) + { + switch (propertyPath) + { + case nameof(_Enabled): + SetEnabled((bool)previousValue, _Enabled); + break; + } + } +#endif + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Surface/WaterReflections.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Surface/WaterReflections.cs.meta new file mode 100644 index 000000000..8b3c7dc3d --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Surface/WaterReflections.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b8b8696e988b24f1e832400fdd148451 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 205 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Time.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Time.meta new file mode 100644 index 000000000..3dea69b13 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Time.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9756ec4e98fa3457ba3c63c6707c12ca +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Time/CustomTimeProvider.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Time/CustomTimeProvider.cs new file mode 100644 index 000000000..088bc487b --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Time/CustomTimeProvider.cs @@ -0,0 +1,97 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; + +namespace WaveHarmonic.Crest +{ + /// + /// This time provider fixes the water time at a custom value which is usable for testing/debugging. + /// + [AddComponentMenu(Constants.k_MenuPrefixTime + "Custom Time Provider")] + [@HelpURL("Manual/TimeProviders.html#supporting-pause")] + public sealed partial class CustomTimeProvider : TimeProvider + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + + [Tooltip("Freeze progression of time. Only works properly in Play mode.")] + [@GenerateAPI] + [SerializeField] + bool _Paused = false; + + [Tooltip("Whether to override the water simulation time.")] + [@GenerateAPI] + [SerializeField] + bool _OverrideTime = false; + + [Tooltip("The time override value.")] + [@Predicated(nameof(_OverrideTime))] + [@GenerateAPI(name: "TimeOverride")] + [@DecoratedField, SerializeField] + float _Time = 0f; + + [Tooltip("Whether to override the water simulation time.\n\nThis in particular affects dynamic elements of the simulation like the foam simulation and the ripple simulation.")] + [@GenerateAPI] + [SerializeField] + bool _OverrideDeltaTime = false; + + [Tooltip("The delta time override value.")] + [@Predicated(nameof(_OverrideDeltaTime))] + [@GenerateAPI] + [@DecoratedField, SerializeField] + float _DeltaTime = 0f; + + + readonly DefaultTimeProvider _DefaultTimeProvider = new(); + float _TimeInternal = 0f; + + private protected override void OnEnable() + { + base.OnEnable(); + + // May as well start on the same time value as unity + _TimeInternal = UnityEngine.Time.time; + } + + void Update() + { + // Use default TP delta time to update our time, because this dt works + // well in edit mode + if (!_Paused) + { + _TimeInternal += _DefaultTimeProvider.Delta; + } + } + + /// + public override float Time + { + get + { + // Override means override + if (_OverrideTime) + { + return _Time; + } + + // In edit mode, update is seldom called, so rely on the default TP +#if UNITY_EDITOR + if (!Application.isPlaying && !_Paused) + { + return _DefaultTimeProvider.Time; + } +#endif + + // Otherwise use our accumulated time + return _TimeInternal; + } + } + + // Either use override, or the default TP which works in edit mode + /// + public override float Delta => _OverrideDeltaTime ? _DeltaTime : _DefaultTimeProvider.Delta; + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Time/CustomTimeProvider.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Time/CustomTimeProvider.cs.meta new file mode 100644 index 000000000..e510f0513 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Time/CustomTimeProvider.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: bc21fdc0db7e149fdb0391bc461bcd87 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Time/CutsceneTimeProvider.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Time/CutsceneTimeProvider.cs new file mode 100644 index 000000000..c3c2983b7 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Time/CutsceneTimeProvider.cs @@ -0,0 +1,113 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using UnityEngine.Playables; + +namespace WaveHarmonic.Crest +{ + /// + /// This time provider feeds a Timeline time to the water system, using a Playable Director. + /// + [AddComponentMenu(Constants.k_MenuPrefixTime + "Cutscene Time Provider")] + [@HelpURL("Manual/TimeProviders.html#timelines-and-cutscenes")] + public sealed partial class CutsceneTimeProvider : TimeProvider + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + +#if d_ModuleUnityDirector + [Tooltip("Playable Director to take time from.")] + [@GenerateAPI(symbol: "d_ModuleUnityDirector")] + [SerializeField] + internal PlayableDirector _PlayableDirector; +#endif + + [Tooltip("Time offset which will be added to the Timeline time.")] + [@GenerateAPI] + [SerializeField] + float _TimeOffset = 0f; + + [Tooltip("Assign this time provider to the water system when this component becomes active.")] + [@GenerateAPI] + [SerializeField] + bool _AssignToWaterComponentOnEnable = true; + + [Tooltip("Restore the time provider that was previously assigned to water system when this component disables.")] + [@GenerateAPI] + [SerializeField] + bool _RestorePreviousTimeProviderOnDisable = true; + + readonly DefaultTimeProvider _FallbackTimeProvider = new(); + bool _Attached = false; + + private protected override void OnDisable() + { + base.OnDisable(); + + var water = WaterRenderer.Instance; + if (_RestorePreviousTimeProviderOnDisable && _Attached && water != null) + { + water.TimeProviders.Pop(this); + } + + _Attached = false; + } + + private protected override System.Action OnEnableMethod => Attach; + void Attach(WaterRenderer water) + { + if (_Attached) return; + +#if d_ModuleUnityDirector + if (_PlayableDirector == null) return; +#endif + + if (_AssignToWaterComponentOnEnable && water) + { + water.TimeProviders.Push(this); + } + + _Attached = true; + } + + /// + /// If there is a PlayableDirector which is playing, return its time, otherwise use + /// the being used before this component initialised, + /// else fallback to a default . + /// + /// + public override float Time + { + get + { +#if d_ModuleUnityDirector + if (_PlayableDirector != null + && _PlayableDirector.isActiveAndEnabled + && (!Application.isPlaying || _PlayableDirector.state == PlayState.Playing)) + { + return (float)_PlayableDirector.time + _TimeOffset; + } +#endif + + // Use a fallback TP + return _FallbackTimeProvider.Time; + } + } + + /// + public override float Delta => UnityEngine.Time.deltaTime; + +#if UNITY_EDITOR + [@OnChange] + void OnChange(string propertyPath, object previousValue) + { + if (!isActiveAndEnabled) return; + // Try to attach on change. + Attach(WaterRenderer.Instance); + } +#endif + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Time/CutsceneTimeProvider.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Time/CutsceneTimeProvider.cs.meta new file mode 100644 index 000000000..c272cb6ef --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Time/CutsceneTimeProvider.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b6d1a5ea192714d488d3edff0cdfc51f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Time/DefaultTimeProvider.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Time/DefaultTimeProvider.cs new file mode 100644 index 000000000..b5d546026 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Time/DefaultTimeProvider.cs @@ -0,0 +1,51 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +namespace WaveHarmonic.Crest +{ + /// + /// Default time provider - sets the water time to Unity's game time. + /// + sealed class DefaultTimeProvider : ITimeProvider + { + public float Time + { + get + { +#if UNITY_EDITOR + if (UnityEngine.Application.isPlaying) + { + return UnityEngine.Time.time; + } + else + { + return WaterRenderer.LastUpdateEditorTime; + } +#else + return UnityEngine.Time.time; +#endif + } + } + + public float Delta + { + get + { +#if UNITY_EDITOR + if (UnityEngine.Application.isPlaying) + { + return UnityEngine.Time.deltaTime; + } + else + { + return 1f / 20f; + } +#else + return UnityEngine.Time.deltaTime; +#endif + ; + } + + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Time/DefaultTimeProvider.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Time/DefaultTimeProvider.cs.meta new file mode 100644 index 000000000..aae960528 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Time/DefaultTimeProvider.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8182878ea3609401dbda036c252b24da +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Time/NetworkedTimeProvider.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Time/NetworkedTimeProvider.cs new file mode 100644 index 000000000..407c613d5 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Time/NetworkedTimeProvider.cs @@ -0,0 +1,39 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; + +namespace WaveHarmonic.Crest +{ + /// + /// Gives a time to Crest with a custom time offset. + /// + /// + /// Assign this component to the component and set the + /// property of this component to the delta from + /// this client's time to the shared server time. + /// + [AddComponentMenu(Constants.k_MenuPrefixTime + "Networked Time Provider")] + [@HelpURL("Manual/TimeProviders.html#network-synchronisation")] + public sealed class NetworkedTimeProvider : TimeProvider + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + + /// + /// If Time.time on this client is 1.5s ahead of the shared/server Time.time, set + /// this field to -1.5. + /// + public float TimeOffsetToServer { get; set; } + + readonly DefaultTimeProvider _DefaultTimeProvider = new(); + + /// + public override float Time => _DefaultTimeProvider.Time + TimeOffsetToServer; + + /// + public override float Delta => _DefaultTimeProvider.Delta; + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Time/NetworkedTimeProvider.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Time/NetworkedTimeProvider.cs.meta new file mode 100644 index 000000000..003a7d9ca --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Time/NetworkedTimeProvider.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a678a2450d1c34c838e465cc0581d0f6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Time/TimeProvider.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Time/TimeProvider.cs new file mode 100644 index 000000000..6a852a3fa --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Time/TimeProvider.cs @@ -0,0 +1,38 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using WaveHarmonic.Crest.Internal; + +namespace WaveHarmonic.Crest +{ + /// + /// Base class for scripts that provide the time to the water system. + /// + /// + /// See derived classes for examples. + /// + public interface ITimeProvider + { + /// + /// Current time. + /// + float Time { get; } + + /// + /// Delta time. + /// + float Delta { get; } + } + + /// + [@ExecuteDuringEditMode] + [@HelpURL("Manual/TimeProviders.html")] + public abstract class TimeProvider : ManagedBehaviour, ITimeProvider + { + /// + public abstract float Time { get; } + + /// + public abstract float Delta { get; } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Time/TimeProvider.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Time/TimeProvider.cs.meta new file mode 100644 index 000000000..568ef225d --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Time/TimeProvider.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f4dfdc79ebe2543e1a48acb408acec16 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Uniforms.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Uniforms.cs new file mode 100644 index 000000000..f0b6198a6 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Uniforms.cs @@ -0,0 +1,29 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; + +namespace WaveHarmonic.Crest +{ + static class ShaderIDs + { + public static readonly int s_Blend = Shader.PropertyToID("_Crest_Blend"); + public static readonly int s_Texture = Shader.PropertyToID("_Crest_Texture"); + public static readonly int s_Source = Shader.PropertyToID("_Crest_Source"); + public static readonly int s_Target = Shader.PropertyToID("_Crest_Target"); + public static readonly int s_TargetSlice = Shader.PropertyToID("_Crest_TargetSlice"); + public static readonly int s_Resolution = Shader.PropertyToID("_Crest_Resolution"); + public static readonly int s_ClearMask = Shader.PropertyToID("_Crest_ClearMask"); + public static readonly int s_ClearColor = Shader.PropertyToID("_Crest_ClearColor"); + public static readonly int s_Matrix = Shader.PropertyToID("_Crest_Matrix"); + public static readonly int s_Position = Shader.PropertyToID("_Crest_Position"); + public static readonly int s_Diameter = Shader.PropertyToID("_Crest_Diameter"); + public static readonly int s_TextureSize = Shader.PropertyToID("_Crest_TextureSize"); + public static readonly int s_TexturePosition = Shader.PropertyToID("_Crest_TexturePosition"); + public static readonly int s_TextureRotation = Shader.PropertyToID("_Crest_TextureRotation"); + public static readonly int s_FeatherWidth = Shader.PropertyToID("_Crest_FeatherWidth"); + public static readonly int s_NegativeValues = Shader.PropertyToID("_Crest_NegativeValues"); + public static readonly int s_BoundaryXZ = Shader.PropertyToID("_Crest_BoundaryXZ"); + public static readonly int s_DrawBoundaryXZ = Shader.PropertyToID("_Crest_DrawBoundaryXZ"); + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Uniforms.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Uniforms.cs.meta new file mode 100644 index 000000000..bbe56a881 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Uniforms.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b65f1bb757bdd47d987dee81752d8024 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility.meta new file mode 100644 index 000000000..40123a301 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7ccb919066373432cafaa06d177818b0 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Bridges.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Bridges.meta new file mode 100644 index 000000000..e6ba583d0 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Bridges.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9705fd80c227847b1b2c21279a353316 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Bridges/Unity.RenderPipelines.HighDefinition.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Bridges/Unity.RenderPipelines.HighDefinition.meta new file mode 100644 index 000000000..ef56107c8 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Bridges/Unity.RenderPipelines.HighDefinition.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d75412fa9c7c743ddb0bc94b3a5c7622 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Bridges/Unity.RenderPipelines.HighDefinition/Runtime.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Bridges/Unity.RenderPipelines.HighDefinition/Runtime.meta new file mode 100644 index 000000000..53a741574 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Bridges/Unity.RenderPipelines.HighDefinition/Runtime.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5be9f1155ece744ac9b4e52aa05d7ef9 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Bridges/Unity.RenderPipelines.HighDefinition/Runtime/Assembly.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Bridges/Unity.RenderPipelines.HighDefinition/Runtime/Assembly.cs new file mode 100644 index 000000000..62ec8004b --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Bridges/Unity.RenderPipelines.HighDefinition/Runtime/Assembly.cs @@ -0,0 +1,6 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("WaveHarmonic.Crest")] diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Bridges/Unity.RenderPipelines.HighDefinition/Runtime/Assembly.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Bridges/Unity.RenderPipelines.HighDefinition/Runtime/Assembly.cs.meta new file mode 100644 index 000000000..804544c14 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Bridges/Unity.RenderPipelines.HighDefinition/Runtime/Assembly.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8af62055026f246e7a9d675f69b994d6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Bridges/Unity.RenderPipelines.HighDefinition/Runtime/WaveHarmonic.Crest.Bridge.asmref b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Bridges/Unity.RenderPipelines.HighDefinition/Runtime/WaveHarmonic.Crest.Bridge.asmref new file mode 100644 index 000000000..c232c2f85 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Bridges/Unity.RenderPipelines.HighDefinition/Runtime/WaveHarmonic.Crest.Bridge.asmref @@ -0,0 +1,3 @@ +{ + "reference": "GUID:457756d89b35d2941b3e7b37b4ece6f1" +} \ No newline at end of file diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Bridges/Unity.RenderPipelines.HighDefinition/Runtime/WaveHarmonic.Crest.Bridge.asmref.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Bridges/Unity.RenderPipelines.HighDefinition/Runtime/WaveHarmonic.Crest.Bridge.asmref.meta new file mode 100644 index 000000000..19548d76c --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Bridges/Unity.RenderPipelines.HighDefinition/Runtime/WaveHarmonic.Crest.Bridge.asmref.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c358b569712814645b33be93fdc16c4d +AssemblyDefinitionReferenceImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Bridges/Unity.RenderPipelines.Universal.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Bridges/Unity.RenderPipelines.Universal.meta new file mode 100644 index 000000000..81ae1bd96 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Bridges/Unity.RenderPipelines.Universal.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0b91042832cea4543b4c617e5ee9501b +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Bridges/Unity.RenderPipelines.Universal/Runtime.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Bridges/Unity.RenderPipelines.Universal/Runtime.meta new file mode 100644 index 000000000..48929a426 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Bridges/Unity.RenderPipelines.Universal/Runtime.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f9a650914f9e44519ab747c4366060de +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Bridges/Unity.RenderPipelines.Universal/Runtime/Assembly.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Bridges/Unity.RenderPipelines.Universal/Runtime/Assembly.cs new file mode 100644 index 000000000..62ec8004b --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Bridges/Unity.RenderPipelines.Universal/Runtime/Assembly.cs @@ -0,0 +1,6 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("WaveHarmonic.Crest")] diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Bridges/Unity.RenderPipelines.Universal/Runtime/Assembly.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Bridges/Unity.RenderPipelines.Universal/Runtime/Assembly.cs.meta new file mode 100644 index 000000000..7670bf8b4 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Bridges/Unity.RenderPipelines.Universal/Runtime/Assembly.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 46afa615b9e4b409481f591af6c8d671 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Bridges/Unity.RenderPipelines.Universal/Runtime/WaveHarmonic.Crest.Bridge.asmref b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Bridges/Unity.RenderPipelines.Universal/Runtime/WaveHarmonic.Crest.Bridge.asmref new file mode 100644 index 000000000..cb3b0b050 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Bridges/Unity.RenderPipelines.Universal/Runtime/WaveHarmonic.Crest.Bridge.asmref @@ -0,0 +1,3 @@ +{ + "reference": "GUID:15fc0a57446b3144c949da3e2b9737a9" +} \ No newline at end of file diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Bridges/Unity.RenderPipelines.Universal/Runtime/WaveHarmonic.Crest.Bridge.asmref.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Bridges/Unity.RenderPipelines.Universal/Runtime/WaveHarmonic.Crest.Bridge.asmref.meta new file mode 100644 index 000000000..96804bed2 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Bridges/Unity.RenderPipelines.Universal/Runtime/WaveHarmonic.Crest.Bridge.asmref.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6c91763ce81814a8cb7f57f7e18525bb +AssemblyDefinitionReferenceImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/QualitySettingsOverride.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/QualitySettingsOverride.cs new file mode 100644 index 000000000..cc1b1f423 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/QualitySettingsOverride.cs @@ -0,0 +1,109 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using WaveHarmonic.Crest.Utility; + +namespace WaveHarmonic.Crest +{ + /// + /// Overrides global quality settings. + /// + [System.Serializable] + public sealed partial class QualitySettingsOverride + { + [Tooltip("Whether to override the LOD bias.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + internal bool _OverrideLodBias; + + [Tooltip("Overrides the LOD bias for meshes.\n\nHighest quality is infinity.")] + [@Predicated(nameof(_OverrideLodBias))] + [@GenerateAPI] + [@DecoratedField, SerializeField] + internal float _LodBias; + + [Tooltip("Whether to override the maximum LOD level.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + internal bool _OverrideMaximumLodLevel; + + [Tooltip("Overrides the maximum LOD level.\n\nHighest quality is zero.")] + [@Predicated(nameof(_OverrideMaximumLodLevel))] + [@GenerateAPI] + [@DecoratedField, SerializeField] + internal int _MaximumLodLevel; + + + [Tooltip("Whether to override the terrain pixel error.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + internal bool _OverrideTerrainPixelError; + + [Tooltip("Overrides the pixel error value for terrains.\n\nHighest quality is zero.")] + [@Predicated(nameof(_OverrideTerrainPixelError))] + [@GenerateAPI] + [@DecoratedField, SerializeField] + internal float _TerrainPixelError; + + float _OldLodBias; + int _OldMaximumLodLevelOverride; + float _OldTerrainPixelError; + TerrainQualityOverrides _OldTerrainOverrides; + + internal void Override() + { + if (_OverrideLodBias) + { + _OldLodBias = QualitySettings.lodBias; + QualitySettings.lodBias = _LodBias; + } + + if (_OverrideMaximumLodLevel) + { + _OldMaximumLodLevelOverride = QualitySettings.maximumLODLevel; + QualitySettings.maximumLODLevel = _MaximumLodLevel; + } + + if (_OverrideTerrainPixelError) + { + _OldTerrainOverrides = QualitySettings.terrainQualityOverrides; + _OldTerrainPixelError = QualitySettings.terrainPixelError; + QualitySettings.terrainQualityOverrides = TerrainQualityOverrides.PixelError; + QualitySettings.terrainPixelError = _TerrainPixelError; + } + } + + internal void Restore() + { + if (_OverrideLodBias) + { + QualitySettings.lodBias = _OldLodBias; + } + + if (_OverrideMaximumLodLevel) + { + QualitySettings.maximumLODLevel = _OldMaximumLodLevelOverride; + } + + if (_OverrideTerrainPixelError) + { + QualitySettings.terrainQualityOverrides = _OldTerrainOverrides; + QualitySettings.terrainPixelError = _OldTerrainPixelError; + } + } + + /// + public override int GetHashCode() + { + var hash = Hash.CreateHash(); + Hash.AddBool(_OverrideLodBias, ref hash); + Hash.AddFloat(_LodBias, ref hash); + Hash.AddBool(_OverrideMaximumLodLevel, ref hash); + Hash.AddInt(_MaximumLodLevel, ref hash); + Hash.AddBool(_OverrideTerrainPixelError, ref hash); + Hash.AddFloat(_TerrainPixelError, ref hash); + return hash; + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/QualitySettingsOverride.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/QualitySettingsOverride.cs.meta new file mode 100644 index 000000000..5e60c67d9 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/QualitySettingsOverride.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9c534680c2c3c4912bfabb90bfa03574 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared.meta new file mode 100644 index 000000000..96dd0c176 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 37d8168c36cf74fdea3eef047313d378 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Assembly.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Assembly.cs new file mode 100644 index 000000000..17f172bd5 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Assembly.cs @@ -0,0 +1,32 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("WaveHarmonic.Crest")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Editor")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Shared.Editor")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Samples")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Samples.Editor")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Samples.Examples")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Samples.Ripples")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Samples.Submarine")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.CPUQueries")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.CPUQueries.Editor")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Paint")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Paint.Editor")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.ShallowWater")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.ShallowWater.Editor")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.ShiftingOrigin")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.ShiftingOrigin.Editor")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Splines")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Splines.Editor")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Watercraft")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Watercraft.Editor")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Whirlpool")] +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Whirlpool.Editor")] + +// Define empty namespaces for when assemblies are not present. +namespace UnityEditor.SceneManagement { } +namespace UnityEngine.Rendering.HighDefinition { } +namespace UnityEngine.Rendering.Universal { } diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Assembly.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Assembly.cs.meta new file mode 100644 index 000000000..7987a6233 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Assembly.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e4f89cf7fe52246cb883953865c0ae55 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Collections.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Collections.meta new file mode 100644 index 000000000..d7564a756 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Collections.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c01e8ab7829a9475d86ca9975ce640aa +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Collections/BufferedData.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Collections/BufferedData.cs new file mode 100644 index 000000000..2e4a0906a --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Collections/BufferedData.cs @@ -0,0 +1,49 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using System; +using UnityEngine; + +namespace WaveHarmonic.Crest.Utility +{ + /// + /// Circular buffer to store a multiple sets of data. + /// + sealed class BufferedData + { + readonly T[] _Buffers; + int _CurrentFrameIndex; + + public T Current { get => _Buffers[_CurrentFrameIndex]; set => _Buffers[_CurrentFrameIndex] = value; } + public int Size => _Buffers.Length; + + public BufferedData(int size, Func initialize) + { + _Buffers = new T[size]; + + for (var i = 0; i < size; i++) + { + _Buffers[i] = initialize(); + } + } + + public T Previous(int framesBack) + { + Debug.Assert(framesBack >= 0 && framesBack < _Buffers.Length); + return _Buffers[(_CurrentFrameIndex - framesBack + _Buffers.Length) % _Buffers.Length]; + } + + public void Flip() + { + _CurrentFrameIndex = (_CurrentFrameIndex + 1) % _Buffers.Length; + } + + public void RunLambda(Action lambda) + { + foreach (var buffer in _Buffers) + { + lambda(buffer); + } + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Collections/BufferedData.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Collections/BufferedData.cs.meta new file mode 100644 index 000000000..0c090cc97 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Collections/BufferedData.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c5666bcd450914e3e980a32dd866957e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Collections/SortedList.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Collections/SortedList.cs new file mode 100644 index 000000000..d58ae306b --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Collections/SortedList.cs @@ -0,0 +1,109 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using System.Collections; +using System.Collections.Generic; + +namespace WaveHarmonic.Crest.Utility +{ + /// + /// This is a list this is meant to be similar in behaviour to the C# + /// SortedList, but without allocations when used directly in a foreach loop. + /// + /// It works by using a regular list as as backing and ensuring that it is + /// sorted when the enumerator is accessed and used. This is a simple approach + /// that means we avoid sorting each time an element is added, and helps us + /// avoid having to develop our own more complex data structure. + /// + sealed class SortedList : IEnumerable>, IEnumerable + { + public int Count => _BackingList.Count; + + readonly List> _BackingList = new(); + readonly System.Comparison _Comparison; + bool _NeedsSorting = false; + + int Comparison(KeyValuePair x, KeyValuePair y) + { + return _Comparison(x.Key, y.Key); + } + + public SortedList(System.Comparison comparison) + { + // We provide the only constructors that SortedList provides that + // we need. We wrap the input IComparer to ensure that our backing list + // is sorted in the same way a SortedList would be with the same one. + _Comparison = comparison; + } + + public void Add(TKey key, TValue value) + { + _BackingList.Add(new(key, value)); + _NeedsSorting = true; + } + + public bool Remove(TValue value) + { + // This remove function has a fairly high complexity, as we need to search + // the list for a matching Key-Value pair, and then remove it. However, + // for the small lists we work with this is fine, as we don't use this + // function more often. But it's worth bearing in mind if we decide to + // expand where we use this list. At that point we might need to take a + // different approach. + + var removeIndex = -1; + var index = 0; + foreach (var item in _BackingList) + { + if (item.Value.Equals(value)) + { + removeIndex = index; + } + + index++; + } + + if (removeIndex > -1) + { + // Remove method produces garbage. + _BackingList.RemoveAt(removeIndex); + } + + return removeIndex > -1; + } + + public void Clear() + { + _BackingList.Clear(); + _NeedsSorting = false; + } + + #region GetEnumerator + public List>.Enumerator GetEnumerator() + { + ResortArrays(); + return _BackingList.GetEnumerator(); + } + + IEnumerator> IEnumerable>.GetEnumerator() + { + return GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + #endregion + + void ResortArrays() + { + if (_NeedsSorting) + { + // @GC: Allocates 112B. + _BackingList.Sort(Comparison); + } + _NeedsSorting = false; + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Collections/SortedList.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Collections/SortedList.cs.meta new file mode 100644 index 000000000..7eb452a8b --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Collections/SortedList.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f796ed8d9971b4795b28bcb1c4dc3a01 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Collections/Stack.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Collections/Stack.cs new file mode 100644 index 000000000..decdfcc82 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Collections/Stack.cs @@ -0,0 +1,58 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using System.Collections.Generic; +using UnityEngine; + +namespace WaveHarmonic.Crest.Utility.Internal +{ + /// + /// A less rigid stack implementation which is easier to use. Prevents duplicates. + /// + /// Type to store. + public sealed class Stack + { + readonly List _Items = new(); + + internal Stack() { } + + /// + /// Add item to the end of the stack. + /// + /// Item to add. + public void Push(T item) + { + Debug.Assert(item != null, "Null item pushed"); + // Remove any instances of item already in the stack. + Pop(item); + // Add it to the top. + _Items.Add(item); + } + + /// + /// Removes all instances of item. + /// + /// The item to be removed. + public void Pop(T item) + { + Debug.Assert(item != null, "Null item popped"); + _Items.RemoveAll(candidate => candidate.Equals(item)); + } + + /// + /// Returns the object at the top of the Stack without removing it. + /// + /// Object at the top of the Stack. + public T Peek() => _Items[^1]; + + /// + /// Number of items. + /// + public int Count => _Items.Count; + + internal void Clear() + { + _Items.Clear(); + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Collections/Stack.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Collections/Stack.cs.meta new file mode 100644 index 000000000..60b5f25ad --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Collections/Stack.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c0c68f77a1b8b43359f34cb46ce19801 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Component.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Component.meta new file mode 100644 index 000000000..0d7ee12ae --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Component.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b9f06a06d4570449fbc0c55e262f5ea9 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Component/Attributes.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Component/Attributes.cs new file mode 100644 index 000000000..65245785d --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Component/Attributes.cs @@ -0,0 +1,238 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#pragma warning disable IDE0005 // Using directive is unnecessary. + +using System; +using System.Diagnostics; +using UnityEngine; + +namespace WaveHarmonic.Crest +{ + static class Symbols + { + public const string k_UnityEditor = "UNITY_EDITOR"; + } + + [Conditional(Symbols.k_UnityEditor)] + [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)] + sealed class ExecuteDuringEditMode : Attribute + { + [Flags] + public enum Include + { + None, + PrefabStage, + BuildPipeline, + All = PrefabStage | BuildPipeline, + } + + [Flags] + public enum Options + { + None, + Singleton, + } + + public Include _Including; + public Options _Options; + + public ExecuteDuringEditMode(Include including = Include.PrefabStage, Options options = Options.None) + { + _Including = including; + _Options = options; + } + } + + enum Getter + { + Default, + Custom, + } + + enum Setter + { + Default, + Custom, + Internal, + Dirty, + None, + } + + [Conditional(Symbols.k_UnityEditor)] + [AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = false)] + sealed class GenerateAPI : Attribute + { + public readonly Getter _Getter; + public readonly Setter _Setter; + public readonly string _Name; + public readonly string _ScriptingSymbol; + + public GenerateAPI(Getter getter = Getter.Default, Setter setter = Setter.Default, string name = null, string symbol = null) + { + _Getter = getter; + _Setter = setter; + _Name = name; + _ScriptingSymbol = symbol; + } + + public GenerateAPI(Setter setter, string name = null, string symbol = null) + { + _Setter = setter; + _Name = name; + _ScriptingSymbol = symbol; + } + } + +#if !UNITY_EDITOR + + [AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = false)] + abstract class Decorator : PropertyAttribute { } + + [Conditional(Symbols.k_UnityEditor)] + sealed class Layer : Decorator { } + + [Conditional(Symbols.k_UnityEditor)] + sealed class Stripped : Decorator { } + + [Conditional(Symbols.k_UnityEditor)] + sealed class Delayed : Decorator { } + + [Conditional(Symbols.k_UnityEditor)] + sealed class Disabled : Decorator { } + + [Conditional(Symbols.k_UnityEditor)] + sealed class AttachMaterialEditor : Decorator { } + + [Conditional(Symbols.k_UnityEditor)] + sealed class Embedded : Decorator + { + public Embedded(int margin = 0) { } + } + + [Conditional(Symbols.k_UnityEditor)] + sealed class DecoratedField : Decorator + { + public DecoratedField(bool isCustomFoldout = false) { } + } + + [Conditional(Symbols.k_UnityEditor)] + sealed class Group : Decorator + { + public enum Style { None, Foldout, Accordian, } + public Group(string title = null, Style style = Style.Foldout, bool isCustomFoldout = false) { } + } + + [Conditional(Symbols.k_UnityEditor)] + sealed class Stepped : Decorator + { + public Stepped(int minimum, int maximum, int step = 1, bool power = false) { } + } + + [Conditional(Symbols.k_UnityEditor)] + sealed class Range : Decorator + { + [Flags] + public enum Clamp { None = 0, Minimum = 1, Maximum = 2, Both = Minimum | Maximum } + public Range(float minimum, float maximum, Clamp clamp = Clamp.Both, float scale = 1f, bool delayed = false, int step = 0, bool power = false) {} + } + + [Conditional(Symbols.k_UnityEditor)] + sealed class Minimum : Decorator + { + public Minimum(float minimum) {} + } + + [Conditional(Symbols.k_UnityEditor)] + sealed class Maximum : Decorator + { + public Maximum(float maximum) {} + } + + [Conditional(Symbols.k_UnityEditor)] + sealed class WarnIfAbove : Decorator + { + public WarnIfAbove(float maximum) {} + } + + [Conditional(Symbols.k_UnityEditor)] + sealed class Filtered : Decorator + { + public enum Mode { Include, Exclude, } + public Filtered(int unset = 0) { } + } + + [Conditional(Symbols.k_UnityEditor)] + sealed class FilterEnum : Decorator + { + public FilterEnum(string property, Filtered.Mode mode, params int[] values) { } + } + + [Conditional(Symbols.k_UnityEditor)] + sealed class Label : Decorator + { + public Label(string label) { } + } + + [Conditional(Symbols.k_UnityEditor)] + sealed class Heading : Decorator + { + public enum Style { Normal, Settings, } + public Heading(string heading, Style style = Style.Normal, bool alwaysVisible = false, bool alwaysEnabled = false, string helpLink = null) { } + } + + [Conditional(Symbols.k_UnityEditor)] + sealed class Space : Decorator + { + public Space(float height, bool isAlwaysVisible = false) { } + } + + [Conditional(Symbols.k_UnityEditor)] + sealed class Predicated : Decorator + { + public Predicated(Type type, string member, bool inverted = false, bool hide = false) { } + public Predicated(Type type, bool inverted = false, bool hide = false) { } + public Predicated(string property, bool inverted = false, object disableValue = null, bool hide = false) { } + public Predicated(RenderPipeline rp, bool inverted = false, bool hide = false) { } + } + + [Conditional(Symbols.k_UnityEditor)] + sealed class OnChange : Decorator + { + public OnChange(bool skipIfInactive = true) { } + public OnChange(Type type, bool skipIfInactive = true) { } + } + + [Conditional(Symbols.k_UnityEditor)] + sealed class HelpURL : Decorator + { + public HelpURL(string path = "") { } + } + + [Conditional(Symbols.k_UnityEditor)] + sealed class HelpBox : Decorator + { + public enum MessageType { Info, Warning, Error, } + public enum Visibility { Always, PropertyEnabled, PropertyDisabled, } + public HelpBox(string message, MessageType messageType = MessageType.Info, Visibility visibility = Visibility.Always) { } + } + + [Conditional(Symbols.k_UnityEditor)] + sealed class MaterialField : Decorator + { + public MaterialField(string shader, string title = "", string name = "", string parent = null) { } + } + + [Conditional(Symbols.k_UnityEditor)] + sealed class PrefabField : Decorator + { + public PrefabField(string title = "", string name = "") { } + } + + [Conditional(Symbols.k_UnityEditor)] + sealed class ShowComputedProperty : Decorator + { + public ShowComputedProperty(string name) { } + } +#endif +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Component/Attributes.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Component/Attributes.cs.meta new file mode 100644 index 000000000..74cfa5e48 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Component/Attributes.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 10b67a4d95adf4592abe527745be027b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Component/CustomBehaviour.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Component/CustomBehaviour.cs new file mode 100644 index 000000000..d56fea91c --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Component/CustomBehaviour.cs @@ -0,0 +1,81 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#if UNITY_EDITOR +using UnityEditor; +using UnityEngine; +using MonoBehaviour = WaveHarmonic.Crest.Internal.EditorBehaviour; +#else +using MonoBehaviour = UnityEngine.MonoBehaviour; +#endif + +namespace WaveHarmonic.Crest.Internal +{ + /// + /// Implements logic to smooth out Unity's wrinkles. + /// + public abstract class CustomBehaviour : MonoBehaviour + { + bool _AfterStart; + +#pragma warning disable 114 + private protected virtual void Awake() + { +#if UNITY_EDITOR + base.Awake(); +#endif + } + + /// + /// Unity's Start method. Make sure to call base if overriden. + /// + protected void Start() + { + _AfterStart = true; + +#if UNITY_EDITOR + base.Start(); + if (!enabled) return; +#endif + + OnStart(); + } +#pragma warning restore 114 + + /// + /// Called in OnEnable only after Start has ran. + /// + private protected virtual void Initialize() + { + + } + + /// + /// Replaces Start. Only called in the editor if passes validation. + /// + private protected virtual void OnStart() + { + Initialize(); + } + + /// + /// Unity's OnEnable method. Make sure to call base if overriden. + /// + private protected virtual void OnEnable() + { + if (!_AfterStart) return; + Initialize(); + } + +#if UNITY_EDITOR + [InitializeOnEnterPlayMode] + static void OnEnterPlayModeInEditor(EnterPlayModeOptions options) + { + foreach (var @object in FindObjectsByType(FindObjectsInactive.Include, FindObjectsSortMode.None)) + { + @object._AfterStart = false; + } + } +#endif + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Component/CustomBehaviour.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Component/CustomBehaviour.cs.meta new file mode 100644 index 000000000..a893b17a1 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Component/CustomBehaviour.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 636b808a07ad9446c84091c05f393663 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Component/EditorBehaviour.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Component/EditorBehaviour.cs new file mode 100644 index 000000000..8006d5ca2 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Component/EditorBehaviour.cs @@ -0,0 +1,184 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; + +#if UNITY_EDITOR + +using System.Reflection; +using UnityEditor; +using UnityEditor.SceneManagement; + +namespace WaveHarmonic.Crest.Internal +{ + using Include = ExecuteDuringEditMode.Include; + + /// + /// Implements custom behaviours common to all components. + /// + public abstract partial class EditorBehaviour : MonoBehaviour + { + bool _IsFirstOnValidate = true; + internal bool _IsPrefabStageInstance; + + private protected virtual void Awake() + { + // When copy and pasting from one scene to another, destroy instance objects as + // they will have bad state. + foreach (var generated in transform.GetComponentsInChildren(includeInactive: true)) + { + if (generated.Owner == this) + { + Helpers.Destroy(generated.gameObject); + } + } + } + + /// + /// Start method. Must be called if overriden. + /// + protected virtual void Start() + { + if (Application.isPlaying && !(bool)s_ExecuteValidators.Invoke(null, new object[] { this })) + { + enabled = false; + } + } + + // Unity does not call OnDisable/OnEnable on Reset. + private protected virtual void Reset() + { + if (!enabled) return; + enabled = false; + enabled = true; + } + + /// + /// OnValidate method. Must be called if overriden. + /// + private protected virtual void OnValidate() + { + if (Application.isPlaying) + { + return; + } + + if (_IsFirstOnValidate) + { + var attribute = Helpers.GetCustomAttribute(GetType()); + + var enableInEditMode = attribute != null; + + if (enableInEditMode && !attribute._Including.HasFlag(Include.BuildPipeline)) + { + // Do not execute when building the player. + enableInEditMode = !BuildPipeline.isBuildingPlayer; + } + + // Components that use the singleton pattern are candidates for not executing in the prefab stage + // as a new instance will be created which could interfere with the scene stage instance. + if (enableInEditMode && !attribute._Including.HasFlag(Include.PrefabStage)) + { + var stage = PrefabStageUtility.GetCurrentPrefabStage(); + _IsPrefabStageInstance = stage != null && gameObject.scene == stage.scene; + + // Do not execute in prefab stage. + enableInEditMode = !_IsPrefabStageInstance; + } + + // When singleton, destroy instance objects. + if (enableInEditMode && attribute._Options.HasFlag(ExecuteDuringEditMode.Options.Singleton) && + FindObjectsByType(GetType(), FindObjectsSortMode.None).Length > 1) + { + enableInEditMode = false; + EditorApplication.update -= InternalDestroyNonSaveables; + EditorApplication.update += InternalDestroyNonSaveables; + } + + // runInEditMode will immediately call Awake and OnEnable so we must not do this in OnValidate as there + // are many restrictions which Unity will produce warnings for: + // https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnValidate.html + if (enableInEditMode) + { + if (BuildPipeline.isBuildingPlayer) + { + // EditorApplication.update and Invoke are not called when building. + InternalEnableEditMode(); + } + else + { + // Called between OnAwake/OnEnable and Start which makes it seamless. + EditorApplication.update -= InternalEnableEditMode; + EditorApplication.update += InternalEnableEditMode; + } + } + } + + _IsFirstOnValidate = false; + } + + void InternalDestroyNonSaveables() + { + EditorApplication.update -= InternalDestroyNonSaveables; + + // See comment below. + if (this == null) return; + + foreach (Transform transform in transform.GetComponentInChildren(includeInactive: true)) + { + if (transform.gameObject.hideFlags.HasFlag(HideFlags.DontSaveInEditor)) + { + Helpers.Destroy(transform.gameObject); + } + } + } + + void InternalEnableEditMode() + { + EditorApplication.update -= InternalEnableEditMode; + + // If the scene that is being built is already opened then, there can be a rogue instance which registers + // an event but is destroyed by the time it gets here. It has something to do with OnValidate being called + // after the object is destroyed with _isFirstOnValidate being true. + if (this == null) return; + // Workaround to ExecuteAlways also executing during building which is often not what we want. + runInEditMode = true; + } + + static MethodInfo s_ExecuteValidators; + [InitializeOnLoadMethod] + static void Load() + { + var type = System.Type.GetType("WaveHarmonic.Crest.Editor.ValidatedHelper, WaveHarmonic.Crest.Shared.Editor"); + s_ExecuteValidators = type.GetMethod + ( + "ExecuteValidators", + BindingFlags.Public | BindingFlags.Static, + null, + new[] { typeof(Object) }, + null + ); + } + } +} + +#endif + +namespace WaveHarmonic.Crest +{ + // Stores a reference to the owner so the GO can be deleted safely when duplicated/pasted. + sealed class ManagedGameObject : MonoBehaviour + { + [field: SerializeField] + public Component Owner { get; set; } + } + + static class Extentions + { + [System.Diagnostics.Conditional("UNITY_EDITOR")] + public static void Manage(this Component owner, GameObject @object) + { + @object.AddComponent().Owner = owner; + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Component/EditorBehaviour.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Component/EditorBehaviour.cs.meta new file mode 100644 index 000000000..ecc0db02f --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Component/EditorBehaviour.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4f9b0b7f0a05449e4952db2c0e3a5516 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Component/ManagedBehaviour.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Component/ManagedBehaviour.cs new file mode 100644 index 000000000..d9f395761 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Component/ManagedBehaviour.cs @@ -0,0 +1,177 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using System; +using System.Collections.Generic; + +namespace WaveHarmonic.Crest.Internal +{ + /// + /// Manages ManagedBehaviours. Replaces Unity's event system. + /// + /// The manager type. + public abstract class ManagerBehaviour : CustomBehaviour where T : ManagerBehaviour + { + internal static readonly List> s_OnUpdate = new(); + internal static readonly List> s_OnLateUpdate = new(); + internal static readonly List> s_OnFixedUpdate = new(); + internal static readonly List> s_OnEnable = new(); + internal static readonly List> s_OnDisable = new(); + + /// + /// The singleton instance. + /// + public static T Instance { get; private set; } + + void Broadcast(List> listeners, T instance) + { + for (var i = listeners.Count - 1; i >= 0; --i) + { + listeners[i].Invoke(instance); + } + } + + void Broadcast(List> listeners) + { + Broadcast(listeners, Instance); + } + + private protected virtual void Enable() + { + // Setting up instance should be last. + Instance = (T)this; + Broadcast(s_OnEnable); + } + + private protected virtual void Disable() + { + Broadcast(s_OnDisable); + Instance = null; + } + + private protected virtual void FixedUpdate() => Broadcast(s_OnFixedUpdate); + private protected void BroadcastUpdate() => Broadcast(s_OnUpdate); + private protected virtual void LateUpdate() => Broadcast(s_OnLateUpdate); + + // OnLoad etc cannot be used on open generic types. + internal static void AfterRuntimeLoad() + { + Instance = null; + } + + internal static void AfterScriptReload() + { + Instance = FindFirstObjectByType(); + } + } + + /// + /// A behaviour which is driven by a ManagerBehaviour instead of Unity's event system. + /// + /// The manager type. + public abstract class ManagedBehaviour : CustomBehaviour where T : ManagerBehaviour + { + readonly Action _OnUpdate; + readonly Action _OnLateUpdate; + readonly Action _OnFixedUpdate; + readonly Action _OnEnable; + readonly Action _OnDisable; + + /// + /// The Update method called by the manager class. + /// + private protected virtual Action OnUpdateMethod => null; + + /// + /// The LateUpdate method called by the manager class. + /// + private protected virtual Action OnLateUpdateMethod => null; + + /// + /// The FixedUpdated method called by the manager class. + /// + private protected virtual Action OnFixedUpdateMethod => null; + + /// + /// The OnEnable method called by the manager class. + /// + private protected virtual Action OnEnableMethod => null; + + /// + /// The OnDisable method called by the manager class. + /// + private protected virtual Action OnDisableMethod => null; + + /// + /// Constructor which caches Actions to avoid allocations. + /// + public ManagedBehaviour() + { + if (OnUpdateMethod != null) _OnUpdate = new(OnUpdateMethod); + if (OnLateUpdateMethod != null) _OnLateUpdate = new(OnLateUpdateMethod); + if (OnFixedUpdateMethod != null) _OnFixedUpdate = new(OnFixedUpdateMethod); + if (OnEnableMethod != null) _OnEnable = new(OnEnableMethod); + if (OnDisableMethod != null) _OnDisable = new(OnDisableMethod); + } + + /// + private protected override void OnEnable() + { + base.OnEnable(); + + UpdateSubscription(listen: true); + + // Trigger OnEnable as it has already passed. + if (_OnEnable != null && ManagerBehaviour.Instance != null) + { + _OnEnable(ManagerBehaviour.Instance); + } + } + + /// + /// Unity's OnDisable method. Make sure to call base if overriden. + /// + private protected virtual void OnDisable() + { + UpdateSubscription(listen: false); + + if (_OnDisable != null && ManagerBehaviour.Instance != null) + { + _OnDisable(ManagerBehaviour.Instance); + } + } + + void UpdateSubscription(bool listen) + { + if (_OnUpdate != null) + { + ManagerBehaviour.s_OnUpdate.Remove(_OnUpdate); + if (listen) ManagerBehaviour.s_OnUpdate.Add(_OnUpdate); + } + + if (_OnLateUpdate != null) + { + ManagerBehaviour.s_OnLateUpdate.Remove(_OnLateUpdate); + if (listen) ManagerBehaviour.s_OnLateUpdate.Add(_OnLateUpdate); + } + + if (_OnFixedUpdate != null) + { + ManagerBehaviour.s_OnFixedUpdate.Remove(_OnFixedUpdate); + if (listen) ManagerBehaviour.s_OnFixedUpdate.Add(_OnFixedUpdate); + } + + if (_OnEnable != null) + { + ManagerBehaviour.s_OnEnable.Remove(_OnEnable); + if (listen) ManagerBehaviour.s_OnEnable.Add(_OnEnable); + } + + if (_OnDisable != null) + { + ManagerBehaviour.s_OnDisable.Remove(_OnDisable); + if (listen) ManagerBehaviour.s_OnDisable.Add(_OnDisable); + } + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Component/ManagedBehaviour.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Component/ManagedBehaviour.cs.meta new file mode 100644 index 000000000..a4789630c --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Component/ManagedBehaviour.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7b697363737b2425180c036dc593512e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Helpers.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Helpers.cs new file mode 100644 index 000000000..8500c7d33 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Helpers.cs @@ -0,0 +1,1109 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using System.Collections.Generic; +using System.Reflection; +using UnityEngine; +using UnityEngine.Experimental.Rendering; +using UnityEngine.Rendering; +using UnityEngine.Rendering.HighDefinition; +using UnityEngine.Rendering.Universal; +using WaveHarmonic.Crest.Internal; + +#if !UNITY_2023_2_OR_NEWER +using GraphicsFormatUsage = UnityEngine.Experimental.Rendering.FormatUsage; +#endif + +namespace WaveHarmonic.Crest +{ + /// + /// General purpose helpers which, at the moment, do not warrant a seperate file. + /// + static partial class Helpers + { + public static class ShaderIDs + { + public static readonly int s_MainTexture = Shader.PropertyToID("_Utility_MainTexture"); + } + + static Mesh s_Plane; + + /// + /// Plane geometry + /// + public static Mesh PlaneMesh + { + get + { + if (s_Plane) return s_Plane; + return s_Plane = Resources.GetBuiltinResource("New-Plane.fbx"); + } + } + + static Mesh s_Quad; + + /// + /// Quad geometry + /// + public static Mesh QuadMesh + { + get + { + if (s_Quad) return s_Quad; + return s_Quad = Resources.GetBuiltinResource("Quad.fbx"); + } + } + + static Mesh s_SphereMesh; + + /// + /// Sphere geometry + /// + public static Mesh SphereMesh + { + get + { + if (s_SphereMesh) return s_SphereMesh; + return s_SphereMesh = Resources.GetBuiltinResource("New-Sphere.fbx"); + } + } + + internal static int SiblingIndexComparison(int x, int y) => x.CompareTo(y); + + /// + /// Comparer that always returns less or greater, never equal, to get work around unique key constraint + /// + internal static int DuplicateComparison(int x, int y) + { + var result = x.CompareTo(y); + // If non-zero, use result, otherwise return greater (never equal) + return result != 0 ? result : 1; + } + + static Vector2Int CalculateResolution(Vector2 resolution, int maximum) + { + // Enforce maximum and scale to maintain aspect ratio. + var largest = Mathf.Max(resolution.x, resolution.y); + if (largest > maximum) + { + var scale = maximum / largest; + resolution *= scale; + } + + return new(Mathf.CeilToInt(resolution.x), Mathf.CeilToInt(resolution.y)); + } + + internal static Vector2Int CalculateResolutionFromTexelSize(Vector2 worldSize, float texelSize, int maximum) + { + return CalculateResolution(new(worldSize.x / texelSize, worldSize.y / texelSize), maximum); + } + + internal static Vector2Int CalculateResolutionFromTexelDensity(Vector2 worldSize, float texelDensity, int maximum) + { + return CalculateResolution(new(Mathf.RoundToInt(texelDensity * worldSize.x), Mathf.RoundToInt(texelDensity * worldSize.y)), maximum); + } + + /// + /// Rotates an XZ size and returns an XZ size which encapsulates it. + /// + public static Vector2 RotateAndEncapsulateXZ(Vector2 size, float angle) + { + angle = Mathf.PingPong(angle, 90f); + var c = Mathf.Cos(angle * Mathf.Deg2Rad); + var s = Mathf.Sin(angle * Mathf.Deg2Rad); + return new + ( + size.x * c + size.y * s, + size.y * c + size.x * s + ); + } + + public static BindingFlags s_AnyMethod = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | + BindingFlags.Static; + + public static T GetCustomAttribute(System.Type type) where T : System.Attribute + { + return (T)System.Attribute.GetCustomAttribute(type, typeof(T)); + } + + public static WaitForEndOfFrame WaitForEndOfFrame { get; } = new(); + + static Material s_UtilityMaterial; + public static Material UtilityMaterial + { + get + { + if (s_UtilityMaterial == null) + { + s_UtilityMaterial = new(Shader.Find("Hidden/Crest/Utility/Blit")); + } + + return s_UtilityMaterial; + } + } + + // Need to cast to int but no conversion cost. + // https://stackoverflow.com/a/69148528 + internal enum UtilityPass + { + CopyColor, + CopyDepth, + ClearDepth, + ClearStencil, + Copy, + } + + // Taken from: + // https://github.com/Unity-Technologies/Graphics/blob/871df5563d88e1ba778c82a43f39c9afc95368e6/Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl#L1149-L1152 + // Z buffer to linear 0..1 depth (0 at camera position, 1 at far plane). + // Does NOT work with orthographic projections. + // Does NOT correctly handle oblique view frustums. + public static float NonLinearToLinear01Depth(float depth, Vector4 zBufferParameters) + { + return 1.0f / (zBufferParameters.x * depth + zBufferParameters.y); + } + + // Taken from: + // https://github.com/Unity-Technologies/Graphics/blob/871df5563d88e1ba778c82a43f39c9afc95368e6/Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl#L1154-L1161 + // Z buffer to linear depth. + // Does NOT correctly handle oblique view frustums. + // Does NOT work with orthographic projection. + public static float NonLinearToLinearEyeDepth(float depth, Vector4 zBufferParameters) + { + return 1.0f / (zBufferParameters.z * depth + zBufferParameters.w); + } + + // Taken from: + // https://www.cyanilux.com/tutorials/depth/#depth-output + public static float LinearDepthToNonLinear(float depth, Vector4 zBufferParameters) + { + return (1.0f - depth * zBufferParameters.y) / (depth * zBufferParameters.x); + } + + // Taken from: + // https://www.cyanilux.com/tutorials/depth/#depth-output + public static float EyeDepthToNonLinear(float depth, Vector4 zBufferParameters) + { + return (1.0f - depth * zBufferParameters.w) / (depth * zBufferParameters.z); + } + + public static Vector4 GetZBufferParameters(Camera camera) + { + // Taken and modified from: + // https://github.com/Unity-Technologies/Graphics/blob/871df5563d88e1ba778c82a43f39c9afc95368e6/Packages/com.unity.render-pipelines.universal/Runtime/ScriptableRenderer.cs#L303-L327 + var near = camera.nearClipPlane; + var far = camera.farClipPlane; + var inverseNear = Mathf.Approximately(near, 0.0f) ? 0.0f : 1.0f / near; + var inverseFar = Mathf.Approximately(far, 0.0f) ? 0.0f : 1.0f / far; + + // From http://www.humus.name/temp/Linearize%20depth.txt + // But as depth component textures on OpenGL always return in 0..1 range (as in D3D), we have to use + // the same constants for both D3D and OpenGL here. + // OpenGL would be this: + // zc0 = (1.0 - far / near) / 2.0; + // zc1 = (1.0 + far / near) / 2.0; + // D3D is this: + var zc0 = 1.0f - far * inverseNear; + var zc1 = far * inverseNear; + + var zBufferParameters = new Vector4(zc0, zc1, zc0 * inverseFar, zc1 * inverseFar); + + if (SystemInfo.usesReversedZBuffer) + { + zBufferParameters.y += zBufferParameters.x; + zBufferParameters.x = -zBufferParameters.x; + zBufferParameters.w += zBufferParameters.z; + zBufferParameters.z = -zBufferParameters.z; + } + + return zBufferParameters; + } + + /// + /// Uses PrefabUtility.InstantiatePrefab in editor and GameObject.Instantiate in standalone. + /// + public static GameObject InstantiatePrefab(GameObject prefab) + { +#if UNITY_EDITOR + return (GameObject)UnityEditor.PrefabUtility.InstantiatePrefab(prefab); +#else + return GameObject.Instantiate(prefab); +#endif + } + + // Taken from Unity + // https://docs.unity3d.com/2022.2/Documentation/Manual/BestPracticeUnderstandingPerformanceInUnity5.html + public static bool StartsWithNoAlloc(this string a, string b) + { + var aLen = a.Length; + var bLen = b.Length; + + var ap = 0; var bp = 0; + + while (ap < aLen && bp < bLen && a[ap] == b[bp]) + { + ap++; + bp++; + } + + return bp == bLen; + } + + public static void ReadRenderTexturePixels(ref RenderTexture rt, ref Texture2D texture, int slice = -1) + { + var source = rt; + var copy = slice > -1 && rt.volumeDepth > 1; + + if (copy) + { + var descriptor = rt.descriptor; + descriptor.volumeDepth = 1; + source = RenderTexture.GetTemporary(descriptor); + Graphics.CopyTexture(rt, slice, 0, source, 0, 0); + } + + var previous = RenderTexture.active; + RenderTexture.active = source; + texture.ReadPixels(new(0, 0, texture.width, texture.height), 0, 0, false); + texture.Apply(); + RenderTexture.active = previous; + + if (copy) + { + RenderTexture.active = null; + RenderTexture.ReleaseTemporary(source); + } + } + + // Reads a single pixel. + public static void ReadRenderTexturePixel(ref RenderTexture rt, ref Texture2D texture, int x, int y, int slice = 0) + { + var descriptor = rt.descriptor; + descriptor.width = 1; + descriptor.height = 1; + descriptor.volumeDepth = 1; + var source = RenderTexture.GetTemporary(descriptor); + Graphics.CopyTexture(rt, slice, 0, x, y, 1, 1, source, 0, 0, 0, 0); + + var previous = RenderTexture.active; + RenderTexture.active = source; + texture.ReadPixels(new(0, 0, texture.width, texture.height), 0, 0, false); + texture.Apply(); + RenderTexture.active = previous; + + RenderTexture.ReleaseTemporary(source); + } + + public static void Blit(RenderTexture source, RenderTexture target) + { + var active = RenderTexture.active; + Graphics.Blit(source, target); + RenderTexture.active = active; + } + + public static float ConvertDepthBufferValueToDistance(Camera camera, float depth) + { + float zBufferParamsX; float zBufferParamsY; + if (SystemInfo.usesReversedZBuffer) + { + zBufferParamsY = 1f; + zBufferParamsX = camera.farClipPlane / camera.nearClipPlane - 1f; + } + else + { + zBufferParamsY = camera.farClipPlane / camera.nearClipPlane; + zBufferParamsX = 1f - zBufferParamsY; + } + + return 1.0f / (zBufferParamsX / camera.farClipPlane * depth + zBufferParamsY / camera.farClipPlane); + } + +#if UNITY_EDITOR + public static bool IsPreviewOfGameCamera(Camera camera) + { + // StartsWith has GC allocations. It is only used in the editor. + return camera.cameraType == CameraType.Preview && camera.name == "Preview Camera"; + } +#endif + + public static bool IsMSAAEnabled(Camera camera) + { +#if d_UnityHDRP + if (RenderPipelineHelper.IsHighDefinition) + { + var hdCamera = HDCamera.GetOrCreate(camera); + // Scene view camera does appear to support MSAA unlike other RPs. + // Querying frame settings on the camera will give the correct results - overriden or not. + return hdCamera.msaaSamples != MSAASamples.None; + } +#endif + + var isMSAA = camera.allowMSAA; +#if d_UnityURP + if (RenderPipelineHelper.IsUniversal) + { + // MSAA will be the same for every camera if XR rendering. + isMSAA = isMSAA || XRHelpers.IsRunning; + } +#endif + +#if UNITY_EDITOR + // Game View Preview ignores allowMSAA. + isMSAA = isMSAA || IsPreviewOfGameCamera(camera); + // Scene view doesn't support MSAA. + isMSAA = isMSAA && camera.cameraType != CameraType.SceneView; +#endif + +#if d_UnityURP + if (RenderPipelineHelper.IsUniversal) + { + // Keep this check last so it overrides everything else. + isMSAA = isMSAA && camera.GetUniversalAdditionalCameraData().scriptableRenderer.supportedRenderingFeatures.msaa; + } +#endif + + // QualitySettings.antiAliasing can be zero. + return (isMSAA ? QualitySettings.antiAliasing : 1) > 1; + } + + public static bool IsIntelGPU() + { + // Works for Windows and MacOS. Grabbed from Unity Graphics repository: + // https://github.com/Unity-Technologies/Graphics/blob/68b0d42c/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.PostProcess.cs#L198-L199 + return SystemInfo.graphicsDeviceName.ToLowerInvariant().Contains("intel"); + } + + public static bool MaskIncludesLayer(int mask, int layer) + { + // Taken from: + // http://answers.unity.com/answers/1332280/view.html + return mask == (mask | (1 << layer)); + } + + // R16G16B16A16_SFloat appears to be the most compatible format. + // https://docs.unity3d.com/Manual/class-TextureImporterOverride.html#texture-compression-support-platforms + // https://learn.microsoft.com/en-us/windows/win32/direct3d12/typed-unordered-access-view-loads#supported-formats-and-api-calls + static readonly GraphicsFormat s_FallbackGraphicsFormat = GraphicsFormat.R16G16B16A16_SFloat; + + static bool SupportsRandomWriteOnRenderTextureFormat(GraphicsFormat format) + { + var rtFormat = GraphicsFormatUtility.GetRenderTextureFormat(format); + return System.Enum.IsDefined(typeof(RenderTextureFormat), rtFormat) + && SystemInfo.SupportsRandomWriteOnRenderTextureFormat(rtFormat); + } + + internal static GraphicsFormat GetCompatibleTextureFormat(GraphicsFormat format, GraphicsFormatUsage usage, string label, bool randomWrite = false) + { + var result = SystemInfo.GetCompatibleFormat(format, usage); + var useFallback = result == GraphicsFormat.None; + +#if CREST_DEBUG_LOG_FORMAT_CHANGES + if (useFallback) + { + Debug.Log($"Crest: The graphics device does not support the render texture format {format}. Will attempt to use fallback. ({label})"); + } + else if (result != format) + { + Debug.Log($"Crest: Using render texture format {result} instead of {format}. ({label})"); + } +#endif + + // NOTE: Disabling for now. RenderTextureFormat is a subset of GraphicsFormat and + // there is not always an equivalent. + // if (!useFallback && randomWrite && !SupportsRandomWriteOnRenderTextureFormat(result)) + // { + // Debug.Log($"Crest: The graphics device does not support the render texture format {result} with random read/write. Will attempt to use fallback."); + // useFallback = true; + // } + + // Check if fallback is compatible before using it. + if (useFallback && format == s_FallbackGraphicsFormat) + { + Debug.Log($"Crest: Fallback {s_FallbackGraphicsFormat} is not supported on this device. Please inform us. ({label})"); + useFallback = false; + } + + if (useFallback) + { + result = s_FallbackGraphicsFormat; + } + + return result; + } + + public static void SetGlobalKeyword(string keyword, bool enabled) + { + if (enabled) + { + Shader.EnableKeyword(keyword); + } + else + { + Shader.DisableKeyword(keyword); + } + } + + public static void RenderTargetIdentifierXR(ref RenderTexture texture, ref RenderTargetIdentifier target) + { + target = new + ( + texture, + mipLevel: 0, + CubemapFace.Unknown, + depthSlice: -1 // Bind all XR slices. + ); + } + + public static RenderTargetIdentifier RenderTargetIdentifierXR(int id) => new + ( + id, + mipLevel: 0, + CubemapFace.Unknown, + depthSlice: -1 // Bind all XR slices. + ); + + /// + /// Creates an RT reference and adds it to the RTI. Native object behind RT is not created so you can change its + /// properties before being used. + /// + public static void CreateRenderTargetTextureReference(ref RenderTexture texture, ref RenderTargetIdentifier target) + { + // Do not overwrite reference or it will create reference leak. + if (texture == null) + { + // Dummy values. We are only creating an RT reference, not an RT native object. RT should be configured + // properly before using or calling Create. + texture = new(0, 0, 0); + } + + // Always call this in case of recompilation as RTI will lose its reference to the RT. + RenderTargetIdentifierXR(ref texture, ref target); + } + + /// + /// Creates an RT with an RTD if it does not exist or assigns RTD to RT (RT should be released first). This + /// prevents reference leaks. + /// + /// + /// Afterwards call Create if + /// necessary or let Unity handle + /// it. + /// + public static void SafeCreateRenderTexture(ref RenderTexture texture, RenderTextureDescriptor descriptor) + { + // Do not overwrite reference or it will create reference leak. + if (texture == null) + { + texture = new(descriptor); + } + else + { + if (texture.IsCreated()) + { + texture.Release(); + } + + texture.descriptor = descriptor; + } + } + + public static void SafeCreateRenderTexture(string name, ref RenderTexture texture, RenderTextureDescriptor descriptor) + { + // Do not overwrite reference or it will create reference leak. + if (texture == null) + { + texture = new(descriptor); + texture.name = name; + } + else + { + if (texture.IsCreated()) + { + texture.Release(); + } + + texture.descriptor = descriptor; + } + + texture.Create(); + } + + public static void ClearRenderTexture(RenderTexture texture, Color clear, bool depth = true, bool color = true) + { + var active = RenderTexture.active; + + // Using RenderTexture.active will not write to all slices. + Graphics.SetRenderTarget(texture, 0, CubemapFace.Unknown, -1); + // TODO: Do we need to disable GL.sRGBWrite as it is linear to linear. + GL.Clear(depth, color, clear); + + // Graphics.SetRenderTarget can be equivalent to setting RenderTexture.active: + // https://docs.unity3d.com/ScriptReference/Graphics.SetRenderTarget.html + // Restore previous active texture or it can incur a warning when releasing: + // Releasing render texture that is set to be RenderTexture.active! + RenderTexture.active = active; + } + + public static void VerticallyFlipRenderTexture(RenderTexture target, bool force = false) + { + if (!force && !SystemInfo.graphicsUVStartsAtTop) return; + var temporary = RenderTexture.GetTemporary(target.descriptor); + Graphics.Blit(target, temporary, new Vector2(1, -1), new Vector2(0, 1)); + Graphics.Blit(temporary, target); + RenderTexture.ReleaseTemporary(temporary); + } + + public static bool RenderTargetTextureNeedsUpdating(RenderTexture texture, RenderTextureDescriptor descriptor) + { + return + descriptor.width != texture.width || + descriptor.height != texture.height || + descriptor.volumeDepth != texture.volumeDepth || + descriptor.useDynamicScale != texture.useDynamicScale; + } + + public static bool RenderTextureNeedsUpdating(RenderTexture t1, RenderTexture t2) + { + return + t1.width != t2.width || + t1.height != t2.height || + t1.volumeDepth != t2.volumeDepth || + t1.graphicsFormat != t2.graphicsFormat; + } + + public static bool RenderTextureNeedsUpdating(RenderTextureDescriptor t1, RenderTextureDescriptor t2) + { + return + t1.width != t2.width || + t1.height != t2.height || + t1.volumeDepth != t2.volumeDepth || + t1.graphicsFormat != t2.graphicsFormat; + } + + public static int CalculateMipMapCount(int maximumDimension) + { + return Mathf.FloorToInt(Mathf.Log(maximumDimension, 2f)); + } + + /// + /// Uses Destroy in play mode or DestroyImmediate in edit mode. + /// + public static void Destroy(Object @object) + { +#if UNITY_EDITOR + // We must use DestroyImmediate in edit mode. As it apparently has an overhead, use recommended Destroy in + // play mode. DestroyImmediate is generally recommended in edit mode by Unity: + // https://docs.unity3d.com/ScriptReference/Object.DestroyImmediate.html + if (!Application.isPlaying) + { + Object.DestroyImmediate(@object); + } + else +#endif + { + Object.Destroy(@object); + } + } + + // Borrowed from SRP code: + // https://github.com/Unity-Technologies/Graphics/blob/7d292932bec3b4257a4defaf698fc7d77e2027f5/com.unity.render-pipelines.high-definition/Runtime/Core/Utilities/GeometryUtils.cs#L181-L184 + public static Matrix4x4 CalculateWorldToCameraMatrixRHS(Vector3 position, Quaternion rotation) + { + return Matrix4x4.Scale(new(1, 1, -1)) * Matrix4x4.TRS(position, rotation, Vector3.one).inverse; + } + + /// + /// Blit using full screen triangle. Supports more features than CommandBuffer.Blit like the RenderPipeline tag + /// in sub-shaders. Never use for data. + /// + public static void Blit(CommandBuffer buffer, RenderTargetIdentifier target, Material material, int pass = -1, MaterialPropertyBlock properties = null) + { + if (!RenderPipelineHelper.IsLegacy) + { + CoreUtils.SetRenderTarget(buffer, target); + } + else + { + buffer.SetRenderTarget(target); + } + + buffer.DrawProcedural + ( + Matrix4x4.identity, + material, + pass, + MeshTopology.Triangles, + vertexCount: 3, + instanceCount: 1, + properties + ); + } + + /// + /// Blit using full screen triangle. Supports more features than CommandBuffer.Blit like the RenderPipeline tag + /// in sub-shaders. Never use for fullscreen effects. + /// + public static void Blit(CommandBuffer buffer, RenderTexture target, Material material, int pass = -1, int depthSlice = -1, MaterialPropertyBlock properties = null) + { + buffer.SetRenderTarget(target, mipLevel: 0, CubemapFace.Unknown, depthSlice); + buffer.DrawProcedural + ( + Matrix4x4.identity, + material, + pass, + MeshTopology.Triangles, + vertexCount: 3, + instanceCount: 1, + properties + ); + } + + // Fixes a bug with Unity, as we should not have to do this ourselves. + // Only required under the following conditions: + // Camera > URP Dynamic Resolution = checked + // URP Asset > Anti Aliasing (MSAA) = unchecked + // URP Asset > Upscale Filter = Spatial-Temporal Post-Processing + [System.Diagnostics.Conditional("d_UnityURP")] + public static void ScaleViewport(Camera camera, CommandBuffer buffer, RTHandle handle) + { + // Only applies to URP. + if (!RenderPipelineHelper.IsUniversal) return; + + // Causes problems if we continue when this is checked. + if (camera.allowDynamicResolution) return; + + var size = handle.GetScaledSize(handle.rtHandleProperties.currentViewportSize); + if (size == Vector2Int.zero) return; + buffer.SetViewport(new(0f, 0f, size.x, size.y)); + } + + public static void SetShaderVector(Material material, int nameID, Vector4 value, bool global = false) + { + if (global) + { + Shader.SetGlobalVector(nameID, value); + } + else + { + material.SetVector(nameID, value); + } + } + + public static void SetShaderInteger(Material material, int nameID, int value, bool global = false) + { + if (global) + { + Shader.SetGlobalInteger(nameID, value); + } + else + { + material.SetInteger(nameID, value); + } + } + + public static void SetShaderFloat(Material material, int nameID, float value, bool global = false) + { + if (global) + { + Shader.SetGlobalFloat(nameID, value); + } + else + { + material.SetFloat(nameID, value); + } + } + + public static bool GetGlobalBoolean(int id) + { + return Shader.GetGlobalInteger(id) == 1; + } + + public static void SetGlobalBoolean(int id, bool value) + { + Shader.SetGlobalInteger(id, value ? 1 : 0); + } + +#if d_UnityURP + static readonly List s_RenderFeatureActiveStates = new(); + static readonly FieldInfo s_RenderDataListField = typeof(UniversalRenderPipelineAsset) + .GetField("m_RendererDataList", BindingFlags.NonPublic | BindingFlags.Instance); + static readonly FieldInfo s_DefaultRendererIndex = typeof(UniversalRenderPipelineAsset) + .GetField("m_DefaultRendererIndex", BindingFlags.NonPublic | BindingFlags.Instance); + static readonly FieldInfo s_RendererIndex = typeof(UniversalAdditionalCameraData) + .GetField("m_RendererIndex", BindingFlags.NonPublic | BindingFlags.Instance); + + internal static ScriptableRendererData[] UniversalRendererData(UniversalRenderPipelineAsset asset) => + (ScriptableRendererData[])s_RenderDataListField.GetValue(asset); + + internal static int GetRendererIndex(Camera camera) + { + var rendererIndex = (int)s_RendererIndex.GetValue(camera.GetUniversalAdditionalCameraData()); + + if (rendererIndex < 0) + { + rendererIndex = (int)s_DefaultRendererIndex.GetValue(UniversalRenderPipeline.asset); + } + + return rendererIndex; + } + + internal static bool IsSSAOEnabled(Camera camera) + { + // Get this every time as it could change. + var renderers = (ScriptableRendererData[])s_RenderDataListField.GetValue(UniversalRenderPipeline.asset); + var rendererIndex = GetRendererIndex(camera); + + foreach (var feature in renderers[rendererIndex].rendererFeatures) + { + if (feature.GetType().Name == "ScreenSpaceAmbientOcclusion") + { + return feature.isActive; + } + } + + return false; + } + + internal static void RenderCameraWithoutCustomPasses(Camera camera) + { + // Get this every time as it could change. + var renderers = (ScriptableRendererData[])s_RenderDataListField.GetValue(UniversalRenderPipeline.asset); + var rendererIndex = GetRendererIndex(camera); + + foreach (var feature in renderers[rendererIndex].rendererFeatures) + { + // Null exception reported here. Might be null due to missing render features + if (feature == null) continue; + s_RenderFeatureActiveStates.Add(feature.isActive); + feature.SetActive(false); + } + + camera.Render(); + + var index = 0; + foreach (var feature in renderers[rendererIndex].rendererFeatures) + { + if (feature == null) continue; + feature.SetActive(s_RenderFeatureActiveStates[index++]); + } + + s_RenderFeatureActiveStates.Clear(); + } + + static readonly UniversalRenderPipeline.SingleCameraRequest s_RenderSingleCameraRequest = new(); +#endif + + static readonly UnityEngine.Rendering.RenderPipeline.StandardRequest s_RenderStandardRequest = new(); + + public static void RenderCamera(Camera camera, ScriptableRenderContext context) + { +#if d_UnityURP + if (RenderPipelineHelper.IsUniversal) + { +#if UNITY_6000_0_OR_NEWER + // SingleCameraRequest does not render the full camera stack, thus should exclude + // overlays which is likely desirable. Alternative approach worth investigating: + // https://docs.unity3d.com/6000.0/Documentation/Manual/urp/User-Render-Requests.html + // TODO: pass destination texture and slice instead of copying later. + UnityEngine.Rendering.RenderPipeline.SubmitRenderRequest(camera, s_RenderSingleCameraRequest); +#else +#pragma warning disable CS0618 // Type or member is obsolete + UniversalRenderPipeline.RenderSingleCamera(context, camera); +#pragma warning restore CS0618 // Type or member is obsolete +#endif + return; + } +#endif + +#if d_UnityHDRP + if (RenderPipelineHelper.IsHighDefinition) + { + camera.SubmitRenderRequest(s_RenderStandardRequest); + return; + } +#endif + + camera.Render(); + } + + } + + // Terrain + static partial class Helpers + { + static readonly List s_Terrains = new(); + internal static Terrain GetTerrainAtPosition(Vector2 position) + { + Terrain.GetActiveTerrains(s_Terrains); + + foreach (var terrain in s_Terrains) + { + var rect = new Rect(terrain.transform.position.XZ(), terrain.terrainData.size.XZ()); + + // Return the first one. + if (rect.Contains(position)) + { + return terrain; + } + } + + return null; + } + } + + namespace Internal + { + static class Extensions + { + // Swizzle + public static Vector2 XZ(this Vector3 v) => new(v.x, v.z); + public static Vector2 XY(this Vector4 v) => new(v.x, v.y); + public static Vector2 ZW(this Vector4 v) => new(v.z, v.w); + public static Vector3 XYZ(this Vector4 v) => new(v.x, v.y, v.z); + public static Vector3 XNZ(this Vector2 v, float n = 0f) => new(v.x, n, v.y); + public static Vector3 XNZ(this Vector3 v, float n = 0f) => new(v.x, n, v.z); + public static Vector3 XNN(this Vector3 v, float n = 0f) => new(v.x, n, n); + public static Vector3 NNZ(this Vector3 v, float n = 0f) => new(n, n, v.z); + public static Vector3 NYN(this Vector3 v, float n = 0f) => new(n, v.y, n); + public static Vector4 XYZN(this Vector3 v, float n = 0f) => new(v.x, v.y, v.z, n); + public static Vector4 XYNN(this Vector2 v, float n = 0f) => new(v.x, v.y, n, n); + public static Vector4 XYNN(this Vector2 v, Vector2 n) => new(v.x, v.y, n.x, n.y); + public static Vector4 NNZW(this Vector2 v, float n = 0f) => new(n, n, v.x, v.y); + public static float Maximum(this Vector3 v) => Mathf.Max(Mathf.Max(v.x, v.y), v.z); + + public static Vector2 Absolute(this Vector2 v) => new + ( + Mathf.Abs(v.x), + Mathf.Abs(v.y) + ); + + public static Color Clamped01(this Color c) => new + ( + Mathf.Clamp01(c.r), + Mathf.Clamp01(c.g), + Mathf.Clamp01(c.b), + Mathf.Clamp01(c.a) + ); + + public static void SetKeyword(this Material material, string keyword, bool enabled) + { + if (enabled) + { + material.EnableKeyword(keyword); + } + else + { + material.DisableKeyword(keyword); + } + } + + public static void SetKeyword(this ComputeShader shader, string keyword, bool enabled) + { + if (enabled) + { + shader.EnableKeyword(keyword); + } + else + { + shader.DisableKeyword(keyword); + } + } + + public static void SetShaderKeyword(this CommandBuffer buffer, string keyword, bool enabled) + { + if (enabled) + { + buffer.EnableShaderKeyword(keyword); + } + else + { + buffer.DisableShaderKeyword(keyword); + } + } + + static readonly Vector3[] s_BoundsPoints = new Vector3[8]; + + public static Bounds Bounds(this Transform transform) + { + var bounds = new Bounds(); + bounds.center = transform.position; + var f = new Vector3(0.0f, 0.0f, 0.5f); + var u = new Vector3(0.0f, 0.5f, 0.0f); + var r = new Vector3(0.5f, 0.0f, 0.0f); + bounds.Encapsulate(transform.TransformPoint(f + u + r)); + bounds.Encapsulate(transform.TransformPoint(-f + u + r)); + bounds.Encapsulate(transform.TransformPoint(f + -u + r)); + bounds.Encapsulate(transform.TransformPoint(f + u + -r)); + bounds.Encapsulate(transform.TransformPoint(-f + -u + r)); + bounds.Encapsulate(transform.TransformPoint(f + -u + -r)); + bounds.Encapsulate(transform.TransformPoint(-f + u + -r)); + bounds.Encapsulate(transform.TransformPoint(-f + -u + -r)); + return bounds; + } + + /// + /// Applys the transform to local bounds similar to Renderer. + /// + /// The transform to apply to bounds. + /// Local bounds to transform. + /// Bounds with transform applied. + public static Bounds TransformBounds(this Transform transform, Bounds bounds) + { + s_BoundsPoints[0] = bounds.min; + s_BoundsPoints[1] = bounds.max; + s_BoundsPoints[2] = new(bounds.min.x, bounds.min.y, bounds.max.z); + s_BoundsPoints[3] = new(bounds.min.x, bounds.max.y, bounds.min.z); + s_BoundsPoints[4] = new(bounds.max.x, bounds.min.y, bounds.min.z); + s_BoundsPoints[5] = new(bounds.min.x, bounds.max.y, bounds.max.z); + s_BoundsPoints[6] = new(bounds.max.x, bounds.min.y, bounds.max.z); + s_BoundsPoints[7] = new(bounds.max.x, bounds.max.y, bounds.min.z); + + return GeometryUtility.CalculateBounds(s_BoundsPoints, transform.localToWorldMatrix); + } + + public static Rect RectXZ(this Bounds bounds) + { + return Rect.MinMaxRect(bounds.min.x, bounds.min.z, bounds.max.x, bounds.max.z); + } + + public static Rect RectXZ(this Transform transform) + { + var scale = transform.lossyScale.XZ(); + scale = Helpers.RotateAndEncapsulateXZ(scale, transform.rotation.eulerAngles.y); + return new(transform.position.XZ() - scale * 0.5f, scale); + } + + public static Vector2 RotationXZ(this Transform transform) + { + return new Vector2(transform.localToWorldMatrix.m20, transform.localToWorldMatrix.m00).normalized; + } + + public static Color MaybeLinear(this Color color) + { + return QualitySettings.activeColorSpace == ColorSpace.Linear ? color.linear : color; + } + + public static Color MaybeGamma(this Color color) + { + return QualitySettings.activeColorSpace == ColorSpace.Linear ? color : color.gamma; + } + + public static Color FinalColor(this Light light) + { + var linear = GraphicsSettings.lightsUseLinearIntensity; + var color = linear ? light.color.linear : light.color; + color *= light.intensity; + if (linear && light.useColorTemperature) color *= Mathf.CorrelatedColorTemperatureToRGB(light.colorTemperature); + if (!linear) color = color.MaybeLinear(); + return linear ? color.MaybeGamma() : color; + } + + /// + /// Sets the msaaSamples property to the highest supported MSAA level in the settings. + /// + public static void SetMSAASamples(this ref RenderTextureDescriptor descriptor, Camera camera) + { + // QualitySettings.antiAliasing is zero when disabled which is invalid for msaaSamples. + // We need to set this first as GetRenderTextureSupportedMSAASampleCount uses it: + // https://docs.unity3d.com/ScriptReference/SystemInfo.GetRenderTextureSupportedMSAASampleCount.html + descriptor.msaaSamples = Helpers.IsMSAAEnabled(camera) ? Mathf.Max(QualitySettings.antiAliasing, 1) : 1; + descriptor.msaaSamples = SystemInfo.GetRenderTextureSupportedMSAASampleCount(descriptor); + } + + // RT descriptor from texture base class. + internal static RenderTextureDescriptor GetDescriptor(this Texture texture) + { + if (texture is RenderTexture rt) + { + return rt.descriptor; + } + + var descriptor = new RenderTextureDescriptor(0, 0) + { + width = texture.width, + height = texture.height, + graphicsFormat = texture.graphicsFormat, + dimension = texture.dimension, + volumeDepth = 1, + msaaSamples = 1, + useMipMap = false, + enableRandomWrite = true, + }; + + return descriptor; + } + + public static bool GetBoolean(this Material material, int id) + { + return (material.HasInteger(id) ? material.GetInteger(id) : material.GetInt(id)) != 0; + } + + public static void SetBoolean(this Material material, int id, bool value) + { + if (material.HasInteger(id)) + { + material.SetInteger(id, value ? 1 : 0); + } + else + { + material.SetInt(id, value ? 1 : 0); + } + } + + public static void SetGlobalBoolean(this CommandBuffer buffer, int id, bool value) + { + buffer.SetGlobalInteger(id, value ? 1 : 0); + } + + public static bool IsEmpty(this UnityEngine.Events.UnityEvent @event) + { + return @event.GetPersistentEventCount() == 0; + } + + public static bool IsEmpty(this UnityEngine.Events.UnityEvent @event) + { + return @event.GetPersistentEventCount() == 0; + } + } + } + + namespace Utility + { + /// + /// Puts together a hash from given data values. More deterministic than + /// System.HashCode across recompiles. + /// + static class Hash + { + public static int CreateHash() => 0x19384567; + + public static void AddFloat(float value, ref int hash) + { + // Appears to be deterministic across recompiles. + hash ^= value.GetHashCode(); + } + + public static void AddInt(int value, ref int hash) + { + hash ^= value; + } + + public static void AddBool(bool value, ref int hash) + { + hash ^= value ? 0x74659374 : 0x62649035; + } + + public static void AddObject(object value, ref int hash) + { + // Will be the index of this object instance + hash ^= value.GetHashCode(); + } + + public static void AddObject(T value, ref int hash) where T : struct + { + // Will be the index of this object instance + hash ^= value.GetHashCode(); + } + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Helpers.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Helpers.cs.meta new file mode 100644 index 000000000..1d14c9137 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Helpers.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2119ba437f41246979c9c6b448977c10 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Rendering.meta similarity index 77% rename from Assets/Obi/Scripts/Common/Backends/Burst/Rendering.meta rename to Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Rendering.meta index 5085057bd..01b5afda3 100644 --- a/Assets/Obi/Scripts/Common/Backends/Burst/Rendering.meta +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Rendering.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: e6af4953b3f22459ab04c6e64cd948ab +guid: a8125db46507e461ea5334eddf20dc1d folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Rendering/CustomPassHelpers.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Rendering/CustomPassHelpers.cs new file mode 100644 index 000000000..663c0693a --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Rendering/CustomPassHelpers.cs @@ -0,0 +1,107 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#if d_UnityHDRP + +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Rendering.HighDefinition; + +namespace WaveHarmonic.Crest +{ + static class CustomPassHelpers + { + internal static List s_Volumes = new(); + + // Create or update Game Object. + public static GameObject CreateOrUpdate + ( + Transform parent, + string name, + bool hide = true + ) + { + GameObject gameObject = null; + + // Find the existing custom pass volume. + // During recompiles, the reference will be lost so we need to find the game object. It could be limited to + // the editor if it is safe to do so, but there is a potential for leaking game objects. + if (gameObject == null) + { + var transform = parent.Find(name); + if (transform != null) + { + gameObject = transform.gameObject; + } + } + + // Create or update the custom pass volume. + if (gameObject == null) + { + gameObject = new() + { + name = name, + hideFlags = hide ? HideFlags.HideAndDontSave : HideFlags.DontSave, + }; + // Place the custom pass under the water renderer since it is easier to find later. Transform.Find can + // find inactive game objects unlike GameObject.Find. + gameObject.transform.parent = parent; + } + else + { + gameObject.hideFlags = hide ? HideFlags.HideAndDontSave : HideFlags.DontSave; + gameObject.SetActive(true); + } + + return gameObject; + } + + // Create or update Custom Pass Volume. + public static void CreateOrUpdate + ( + GameObject gameObject, + ref T pass, + string name, + CustomPassInjectionPoint injectionPoint + ) + where T : CustomPass, new() + { + CustomPassVolume volume = null; + gameObject.GetComponents(s_Volumes); + + foreach (var v in s_Volumes) + { + if (v.injectionPoint == injectionPoint) + { + volume = v; + break; + } + } + + // Create the custom pass volume if it does not exist. + if (volume == null) + { + // It appears that this is currently the only way to add a custom pass. + volume = gameObject.AddComponent(); + volume.injectionPoint = injectionPoint; + volume.isGlobal = true; + } + + // Create custom pass. + pass ??= new() + { + name = $"Crest {name}", + targetColorBuffer = CustomPass.TargetBuffer.None, + targetDepthBuffer = CustomPass.TargetBuffer.None, + }; + + // Add custom pass. + if (!volume.customPasses.Contains(pass)) + { + volume.customPasses.Add(pass); + } + } + } +} + +#endif diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Rendering/CustomPassHelpers.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Rendering/CustomPassHelpers.cs.meta new file mode 100644 index 000000000..ddde75fff --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Rendering/CustomPassHelpers.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 03b1e50fbb96a49f1ac7de50cc1f30db +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Rendering/PropertyWrapper.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Rendering/PropertyWrapper.cs new file mode 100644 index 000000000..f4fbfc9de --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Rendering/PropertyWrapper.cs @@ -0,0 +1,189 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using UnityEngine.Rendering; + +namespace WaveHarmonic.Crest +{ + /// + /// Unified interface for setting properties on both materials and material property blocks + /// + interface IPropertyWrapper + { + void SetFloat(int param, float value); + void SetFloatArray(int param, float[] value); + void SetVector(int param, Vector4 value); + void SetVectorArray(int param, Vector4[] value); + void SetTexture(int param, Texture value); + void SetMatrix(int param, Matrix4x4 matrix); + void SetInteger(int param, int value); + void SetBoolean(int param, bool value); + void GetBlock(); + void SetBlock(); + } + + static class PropertyWrapperConstants + { + internal const string k_NoShaderMessage = "Cannot create required material because shader {0} could not be found or loaded." + + " Try right clicking the Crest folder in the Project view and selecting Reimport, and checking for errors."; + } + + readonly struct PropertyWrapperBuffer : IPropertyWrapper + { + public CommandBuffer Buffer { get; } + public PropertyWrapperBuffer(CommandBuffer mpb) => Buffer = mpb; + public void SetFloat(int param, float value) => Buffer.SetGlobalFloat(param, value); + public void SetFloatArray(int param, float[] value) => Buffer.SetGlobalFloatArray(param, value); + public void SetTexture(int param, Texture value) => Buffer.SetGlobalTexture(param, value); + public void SetVector(int param, Vector4 value) => Buffer.SetGlobalVector(param, value); + public void SetVectorArray(int param, Vector4[] value) => Buffer.SetGlobalVectorArray(param, value); + public void SetMatrix(int param, Matrix4x4 value) => Buffer.SetGlobalMatrix(param, value); + public void SetInteger(int param, int value) => Buffer.SetGlobalInteger(param, value); + public void SetBoolean(int param, bool value) => Buffer.SetGlobalInteger(param, value ? 1 : 0); + + public void GetBlock() { } + public void SetBlock() { } + } + + readonly struct PropertyWrapperRenderer : IPropertyWrapper + { + public MaterialPropertyBlock PropertyBlock { get; } + public Renderer Renderer { get; } + + public PropertyWrapperRenderer(Renderer renderer, MaterialPropertyBlock block) + { + Renderer = renderer; + PropertyBlock = block; + } + + public void SetFloat(int param, float value) => PropertyBlock.SetFloat(param, value); + public void SetFloatArray(int param, float[] value) => PropertyBlock.SetFloatArray(param, value); + public void SetTexture(int param, Texture value) => PropertyBlock.SetTexture(param, value); + public void SetBuffer(int param, ComputeBuffer value) => PropertyBlock.SetBuffer(param, value); + public void SetVector(int param, Vector4 value) => PropertyBlock.SetVector(param, value); + public void SetVectorArray(int param, Vector4[] value) => PropertyBlock.SetVectorArray(param, value); + public void SetMatrix(int param, Matrix4x4 value) => PropertyBlock.SetMatrix(param, value); + public void SetInteger(int param, int value) => PropertyBlock.SetInteger(param, value); + public void SetBoolean(int param, bool value) => PropertyBlock.SetInteger(param, value ? 1 : 0); + + public void GetBlock() => Renderer.GetPropertyBlock(PropertyBlock); + public void SetBlock() => Renderer.SetPropertyBlock(PropertyBlock); + } + + [System.Serializable] + readonly struct PropertyWrapperMaterial : IPropertyWrapper + { + public Material Material { get; } + + public PropertyWrapperMaterial(Material material) => Material = material; + public PropertyWrapperMaterial(Shader shader) + { + Debug.Assert(shader != null, "Crest: PropertyWrapperMaterial: Cannot create required material because shader is null"); + Material = new(shader); + } + public PropertyWrapperMaterial(string shaderPath) + { + var shader = Shader.Find(shaderPath); + Debug.AssertFormat(shader != null, $"Crest.PropertyWrapperMaterial: {PropertyWrapperConstants.k_NoShaderMessage}", shaderPath); + Material = new(shader); + } + + public void SetFloat(int param, float value) => Material.SetFloat(param, value); + public void SetFloatArray(int param, float[] value) => Material.SetFloatArray(param, value); + public void SetTexture(int param, Texture value) => Material.SetTexture(param, value); + public void SetBuffer(int param, ComputeBuffer value) => Material.SetBuffer(param, value); + public void SetVector(int param, Vector4 value) => Material.SetVector(param, value); + public void SetVectorArray(int param, Vector4[] value) => Material.SetVectorArray(param, value); + public void SetMatrix(int param, Matrix4x4 value) => Material.SetMatrix(param, value); + public void SetInteger(int param, int value) => Material.SetInteger(param, value); + public void SetBoolean(int param, bool value) => Material.SetInteger(param, value ? 1 : 0); + + public void GetBlock() { } + public void SetBlock() { } + + // Non-Interface Methods + public void SetKeyword(in LocalKeyword keyword, bool value) => Material.SetKeyword(keyword, value); + } + + readonly struct PropertyWrapperMPB : IPropertyWrapper + { + public MaterialPropertyBlock MaterialPropertyBlock { get; } + public PropertyWrapperMPB(MaterialPropertyBlock mpb) => MaterialPropertyBlock = mpb; + public void SetFloat(int param, float value) => MaterialPropertyBlock.SetFloat(param, value); + public void SetFloatArray(int param, float[] value) => MaterialPropertyBlock.SetFloatArray(param, value); + public void SetTexture(int param, Texture value) => MaterialPropertyBlock.SetTexture(param, value); + public void SetVector(int param, Vector4 value) => MaterialPropertyBlock.SetVector(param, value); + public void SetVectorArray(int param, Vector4[] value) => MaterialPropertyBlock.SetVectorArray(param, value); + public void SetMatrix(int param, Matrix4x4 value) => MaterialPropertyBlock.SetMatrix(param, value); + public void SetInteger(int param, int value) => MaterialPropertyBlock.SetInteger(param, value); + public void SetBoolean(int param, bool value) => MaterialPropertyBlock.SetInteger(param, value ? 1 : 0); + + public void GetBlock() { } + public void SetBlock() { } + } + + [System.Serializable] + readonly struct PropertyWrapperCompute : IPropertyWrapper + { + readonly CommandBuffer _Buffer; + readonly ComputeShader _Shader; + readonly int _Kernel; + + public PropertyWrapperCompute(CommandBuffer buffer, ComputeShader shader, int kernel) + { + _Buffer = buffer; + _Shader = shader; + _Kernel = kernel; + } + + public void SetFloat(int param, float value) => _Buffer.SetComputeFloatParam(_Shader, param, value); + public void SetFloatArray(int param, float[] value) => _Buffer.SetGlobalFloatArray(param, value); + public void SetInteger(int param, int value) => _Buffer.SetComputeIntParam(_Shader, param, value); + public void SetBoolean(int param, bool value) => _Buffer.SetComputeIntParam(_Shader, param, value ? 1 : 0); + public void SetTexture(int param, Texture value) => _Buffer.SetComputeTextureParam(_Shader, _Kernel, param, value); + public void SetTexture(int param, RenderTargetIdentifier value) => _Buffer.SetComputeTextureParam(_Shader, _Kernel, param, value); + public void SetBuffer(int param, ComputeBuffer value) => _Buffer.SetComputeBufferParam(_Shader, _Kernel, param, value); + public void SetVector(int param, Vector4 value) => _Buffer.SetComputeVectorParam(_Shader, param, value); + public void SetVectorArray(int param, Vector4[] value) => _Buffer.SetComputeVectorArrayParam(_Shader, param, value); + public void SetMatrix(int param, Matrix4x4 value) => _Buffer.SetComputeMatrixParam(_Shader, param, value); + + public void GetBlock() { } + public void SetBlock() { } + + // Non-Interface Methods + public void SetKeyword(in LocalKeyword keyword, bool value) => _Buffer.SetKeyword(_Shader, keyword, value); + public void Dispatch(int x, int y, int z) => _Buffer.DispatchCompute(_Shader, _Kernel, x, y, z); + } + + [System.Serializable] + readonly struct PropertyWrapperComputeStandalone : IPropertyWrapper + { + readonly ComputeShader _Shader; + readonly int _Kernel; + + public PropertyWrapperComputeStandalone(ComputeShader shader, int kernel) + { + _Shader = shader; + _Kernel = kernel; + } + + public void SetFloat(int param, float value) => _Shader.SetFloat(param, value); + public void SetFloatArray(int param, float[] value) => _Shader.SetFloats(param, value); + public void SetInteger(int param, int value) => _Shader.SetInt(param, value); + public void SetBoolean(int param, bool value) => _Shader.SetBool(param, value); + public void SetTexture(int param, Texture value) => _Shader.SetTexture(_Kernel, param, value); + public void SetBuffer(int param, ComputeBuffer value) => _Shader.SetBuffer(_Kernel, param, value); + public void SetConstantBuffer(int param, ComputeBuffer value) => _Shader.SetConstantBuffer(param, value, 0, value.stride); + public void SetVector(int param, Vector4 value) => _Shader.SetVector(param, value); + public void SetVectorArray(int param, Vector4[] value) => _Shader.SetVectorArray(param, value); + public void SetMatrix(int param, Matrix4x4 value) => _Shader.SetMatrix(param, value); + + public void GetBlock() { } + public void SetBlock() { } + + // Non-Interface Methods + public void SetKeyword(in LocalKeyword keyword, bool value) => _Shader.SetKeyword(keyword, value); + public void Dispatch(int x, int y, int z) => _Shader.Dispatch(_Kernel, x, y, z); + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Rendering/PropertyWrapper.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Rendering/PropertyWrapper.cs.meta new file mode 100644 index 000000000..159cdeac2 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Rendering/PropertyWrapper.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b2659ec9b44b34272a21ea388cd354d8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Rendering/RenderGraphUtility.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Rendering/RenderGraphUtility.cs new file mode 100644 index 000000000..f7760fa44 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Rendering/RenderGraphUtility.cs @@ -0,0 +1,54 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#if d_UnityURP +#if UNITY_6000_0_OR_NEWER + +using System.Reflection; +using System.Runtime.CompilerServices; +using UnityEngine.Rendering; +using UnityEngine.Rendering.RenderGraphModule; +using UnityEngine.Rendering.Universal; + +namespace WaveHarmonic.Crest +{ + static class RenderGraphHelper + { + public struct Handle + { + RTHandle _RTHandle; + TextureHandle _TextureHandle; + + public readonly RTHandle Texture { [MethodImpl(MethodImplOptions.AggressiveInlining)] get => _RTHandle ?? _TextureHandle; } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator Handle(RTHandle handle) => new() { _RTHandle = handle }; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator Handle(TextureHandle handle) => new() { _TextureHandle = handle }; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator RTHandle(Handle texture) => texture.Texture; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static implicit operator TextureHandle(Handle texture) => texture._TextureHandle; + } + + static readonly FieldInfo s_RenderContext = typeof(InternalRenderGraphContext).GetField("renderContext", BindingFlags.NonPublic | BindingFlags.Instance); + static readonly FieldInfo s_WrappedContext = typeof(UnsafeGraphContext).GetField("wrappedContext", BindingFlags.NonPublic | BindingFlags.Instance); + static readonly FieldInfo s_FrameData = typeof(RenderingData).GetField("frameData", BindingFlags.NonPublic | BindingFlags.Instance); + + public static ScriptableRenderContext GetRenderContext(this UnsafeGraphContext unsafeContext) + { + return (ScriptableRenderContext)s_RenderContext.GetValue((InternalRenderGraphContext)s_WrappedContext.GetValue(unsafeContext)); + } + + public static ContextContainer GetFrameData(this ref RenderingData renderingData) + { + return (ContextContainer)s_FrameData.GetValue(renderingData); + } + } +} + +#endif // UNITY_6000_0_OR_NEWER +#endif // d_UnityURP diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Rendering/RenderGraphUtility.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Rendering/RenderGraphUtility.cs.meta new file mode 100644 index 000000000..4e0415608 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Rendering/RenderGraphUtility.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ed778baa1b8804c5ca0074af8b68f7e4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Rendering/RenderPipelineCompatibilityHelper.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Rendering/RenderPipelineCompatibilityHelper.cs new file mode 100644 index 000000000..1607bb72a --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Rendering/RenderPipelineCompatibilityHelper.cs @@ -0,0 +1,169 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using UnityEngine.Rendering; + +namespace WaveHarmonic.Crest +{ + static class RenderPipelineCompatibilityHelper + { + // Taken from: + // https://github.com/Unity-Technologies/Graphics/blob/19ec161f3f752db865597374b3ad1b3eaf110097/Packages/com.unity.render-pipelines.universal/Runtime/RenderingUtils.cs#L588-L634 + + /// + /// Return true if handle does not match descriptor + /// + /// RTHandle to check (can be null) + /// Descriptor for the RTHandle to match + /// Filtering mode of the RTHandle. + /// Addressing mode of the RTHandle. + /// Set to true if the depth buffer should be used as a shadow map. + /// Anisotropic filtering level. + /// Bias applied to mipmaps during filtering. + /// Name of the RTHandle. + /// Check if the RTHandle has auto scaling enabled if not, check the widths and heights + /// + internal static bool RTHandleNeedsReAlloc( + RTHandle handle, + in RenderTextureDescriptor descriptor, + FilterMode filterMode, + TextureWrapMode wrapMode, + bool isShadowMap, + int anisoLevel, + float mipMapBias, + string name, + bool scaled) + { + if (handle == null || handle.rt == null) + return true; + if (handle.useScaling != scaled) + return true; + if (!scaled && (handle.rt.width != descriptor.width || handle.rt.height != descriptor.height)) + return true; + return + handle.rt.descriptor.depthBufferBits != descriptor.depthBufferBits || + (handle.rt.descriptor.depthBufferBits == (int)DepthBits.None && !isShadowMap && handle.rt.descriptor.graphicsFormat != descriptor.graphicsFormat) || + handle.rt.descriptor.dimension != descriptor.dimension || + handle.rt.descriptor.enableRandomWrite != descriptor.enableRandomWrite || + handle.rt.descriptor.useMipMap != descriptor.useMipMap || + handle.rt.descriptor.autoGenerateMips != descriptor.autoGenerateMips || + handle.rt.descriptor.msaaSamples != descriptor.msaaSamples || + handle.rt.descriptor.bindMS != descriptor.bindMS || + handle.rt.descriptor.useDynamicScale != descriptor.useDynamicScale || + handle.rt.descriptor.memoryless != descriptor.memoryless || + handle.rt.filterMode != filterMode || + handle.rt.wrapMode != wrapMode || + handle.rt.anisoLevel != anisoLevel || + handle.rt.mipMapBias != mipMapBias || + handle.name != name; + } + + + // https://github.com/Unity-Technologies/Graphics/blob/19ec161f3f752db865597374b3ad1b3eaf110097/Packages/com.unity.render-pipelines.universal/Runtime/RenderingUtils.cs#L666-L695 + + /// + /// Re-allocate fixed-size RTHandle if it is not allocated or doesn't match the descriptor + /// + /// RTHandle to check (can be null) + /// Descriptor for the RTHandle to match + /// Filtering mode of the RTHandle. + /// Addressing mode of the RTHandle. + /// Set to true if the depth buffer should be used as a shadow map. + /// Anisotropic filtering level. + /// Bias applied to mipmaps during filtering. + /// Name of the RTHandle. + /// + public static bool ReAllocateIfNeeded( + ref RTHandle handle, + in RenderTextureDescriptor descriptor, + FilterMode filterMode = FilterMode.Point, + TextureWrapMode wrapMode = TextureWrapMode.Repeat, + bool isShadowMap = false, + int anisoLevel = 1, + float mipMapBias = 0, + string name = "") + { + if (RTHandleNeedsReAlloc(handle, descriptor, filterMode, wrapMode, isShadowMap, anisoLevel, mipMapBias, name, false)) + { + handle?.Release(); + handle = RTHandles.Alloc(descriptor, filterMode, wrapMode, isShadowMap, anisoLevel, mipMapBias, name); + return true; + } + return false; + } + + // https://github.com/Unity-Technologies/Graphics/blob/19ec161f3f752db865597374b3ad1b3eaf110097/Packages/com.unity.render-pipelines.universal/Runtime/RenderingUtils.cs#L697-L729 + + /// + /// Re-allocate dynamically resized RTHandle if it is not allocated or doesn't match the descriptor + /// + /// RTHandle to check (can be null) + /// Constant scale for the RTHandle size computation. + /// Descriptor for the RTHandle to match + /// Filtering mode of the RTHandle. + /// Addressing mode of the RTHandle. + /// Set to true if the depth buffer should be used as a shadow map. + /// Anisotropic filtering level. + /// Bias applied to mipmaps during filtering. + /// Name of the RTHandle. + /// If the RTHandle should be re-allocated + public static bool ReAllocateIfNeeded( + ref RTHandle handle, + Vector2 scaleFactor, + in RenderTextureDescriptor descriptor, + FilterMode filterMode = FilterMode.Point, + TextureWrapMode wrapMode = TextureWrapMode.Repeat, + bool isShadowMap = false, + int anisoLevel = 1, + float mipMapBias = 0, + string name = "") + { + var usingConstantScale = handle != null && handle.useScaling && handle.scaleFactor == scaleFactor; + if (!usingConstantScale || RTHandleNeedsReAlloc(handle, descriptor, filterMode, wrapMode, isShadowMap, anisoLevel, mipMapBias, name, true)) + { + handle?.Release(); + handle = RTHandles.Alloc(scaleFactor, descriptor, filterMode, wrapMode, isShadowMap, anisoLevel, mipMapBias, name); + return true; + } + return false; + } + + // https://github.com/Unity-Technologies/Graphics/blob/19ec161f3f752db865597374b3ad1b3eaf110097/Packages/com.unity.render-pipelines.universal/Runtime/RenderingUtils.cs#L731-L764 + + /// + /// Re-allocate dynamically resized RTHandle if it is not allocated or doesn't match the descriptor + /// + /// RTHandle to check (can be null) + /// Function used for the RTHandle size computation. + /// Descriptor for the RTHandle to match + /// Filtering mode of the RTHandle. + /// Addressing mode of the RTHandle. + /// Set to true if the depth buffer should be used as a shadow map. + /// Anisotropic filtering level. + /// Bias applied to mipmaps during filtering. + /// Name of the RTHandle. + /// If an allocation was done + public static bool ReAllocateIfNeeded( + ref RTHandle handle, + ScaleFunc scaleFunc, + in RenderTextureDescriptor descriptor, + FilterMode filterMode = FilterMode.Point, + TextureWrapMode wrapMode = TextureWrapMode.Repeat, + bool isShadowMap = false, + int anisoLevel = 1, + float mipMapBias = 0, + string name = "") + { + var usingScaleFunction = handle != null && handle.useScaling && handle.scaleFactor == Vector2.zero; + if (!usingScaleFunction || RTHandleNeedsReAlloc(handle, descriptor, filterMode, wrapMode, isShadowMap, anisoLevel, mipMapBias, name, true)) + { + handle?.Release(); + handle = RTHandles.Alloc(scaleFunc, descriptor, filterMode, wrapMode, isShadowMap, anisoLevel, mipMapBias, name); + return true; + } + + return false; + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Rendering/RenderPipelineCompatibilityHelper.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Rendering/RenderPipelineCompatibilityHelper.cs.meta new file mode 100644 index 000000000..c87ea2f1d --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Rendering/RenderPipelineCompatibilityHelper.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 39dff4a7749404569b14b7395adc361a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Rendering/RenderPipelineHelper.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Rendering/RenderPipelineHelper.cs new file mode 100644 index 000000000..4eeaecc85 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Rendering/RenderPipelineHelper.cs @@ -0,0 +1,57 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine.Rendering; +using UnityEngine.Rendering.HighDefinition; +using UnityEngine.Rendering.Universal; + +namespace WaveHarmonic.Crest +{ + enum RenderPipeline + { + Legacy, + HighDefinition, + Universal, + } + + sealed class RenderPipelineHelper + { + public static RenderPipeline RenderPipeline => GraphicsSettings.currentRenderPipeline switch + { +#if d_UnityHDRP + HDRenderPipelineAsset => RenderPipeline.HighDefinition, +#endif +#if d_UnityURP + UniversalRenderPipelineAsset => RenderPipeline.Universal, +#endif + _ => RenderPipeline.Legacy, + }; + + // GraphicsSettings.currentRenderPipeline could be from the graphics setting or current quality level. + public static bool IsLegacy => GraphicsSettings.currentRenderPipeline == null; + + public static bool IsUniversal + { + get + { +#if d_UnityURP + return GraphicsSettings.currentRenderPipeline is UniversalRenderPipelineAsset; +#else + return false; +#endif + } + } + + public static bool IsHighDefinition + { + get + { +#if d_UnityHDRP + return GraphicsSettings.currentRenderPipeline is HDRenderPipelineAsset; +#else + return false; +#endif + } + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Rendering/RenderPipelineHelper.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Rendering/RenderPipelineHelper.cs.meta new file mode 100644 index 000000000..f76ce32ac --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Rendering/RenderPipelineHelper.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 00e1b88667d3544fd875d2f9184fdd78 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Rendering/TextureArrayHelpers.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Rendering/TextureArrayHelpers.cs new file mode 100644 index 000000000..50908399c --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Rendering/TextureArrayHelpers.cs @@ -0,0 +1,45 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; + +namespace WaveHarmonic.Crest +{ + static class TextureArrayHelpers + { + const int k_SmallTextureSize = 4; + + public static Texture2D CreateTexture2D(Color color, TextureFormat format) + { + var texture = new Texture2D(k_SmallTextureSize, k_SmallTextureSize, format, false, false); + var pixels = new Color[texture.height * texture.width]; + for (var i = 0; i < pixels.Length; i++) + { + pixels[i] = color; + } + texture.SetPixels(pixels); + texture.Apply(); + return texture; + } + + public static Texture2DArray CreateTexture2DArray(Texture2D texture, int depth) + { + var array = new Texture2DArray( + k_SmallTextureSize, k_SmallTextureSize, + depth, + texture.format, + false, + false + ); + + for (var textureArrayIndex = 0; textureArrayIndex < array.depth; textureArrayIndex++) + { + Graphics.CopyTexture(texture, 0, 0, array, textureArrayIndex, 0); + } + + array.Apply(); + + return array; + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Rendering/TextureArrayHelpers.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Rendering/TextureArrayHelpers.cs.meta new file mode 100644 index 000000000..8378c9d21 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Rendering/TextureArrayHelpers.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 18d910d25ea794953b63417c1a72d587 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Singleton.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Singleton.cs new file mode 100644 index 000000000..c2271ea30 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Singleton.cs @@ -0,0 +1,65 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// Based on Unity's ScriptableSingleton but works with Assets and Packages +// directory. Works in builds except loading from file so it will need a +// reference in the scene for it to instantiate. + +using System; +using UnityEditor; +using UnityEngine; + +namespace WaveHarmonic.Crest.Utility +{ + [AttributeUsage(AttributeTargets.Class)] + sealed class FilePath : Attribute + { + public readonly string _Path; + + public FilePath(string path) + { + _Path = path; + } + } + + abstract class ScriptableSingleton : ScriptableObject where T : ScriptableObject + { + public static T Instance { get; private set; } + + public ScriptableSingleton() + { + // Constructor will be called during run-time if there is a asset reference saved + // in a scene or preloaded assets. + // BUG: There appears to be a Unity bug where this will not happen which required + // recreating the asset. Perhaps after renaming the script. + Instance = this as T; + } + +#if UNITY_EDITOR + static string GetFilePath() + { + foreach (var attribute in typeof(T).GetCustomAttributes(inherit: true)) + { + if (attribute is FilePath f) + { + return f._Path; + } + } + + return string.Empty; + } + + internal static void LoadFromAsset() + { + if (Instance != null) + { + return; + } + + // This will trigger the constructor and set Instance. But setting it here first + // prevents exceptions when data changes. + Instance = AssetDatabase.LoadAssetAtPath(GetFilePath()); + } +#endif + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Singleton.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Singleton.cs.meta new file mode 100644 index 000000000..4ac8d6920 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/Singleton.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7b7f4d7de990a4a049d9aa9a442fa866 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/WaveHarmonic.Crest.Shared.asmdef b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/WaveHarmonic.Crest.Shared.asmdef new file mode 100644 index 000000000..69ab61993 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/WaveHarmonic.Crest.Shared.asmdef @@ -0,0 +1,36 @@ +{ + "name": "WaveHarmonic.Crest.Shared", + "rootNamespace": "", + "references": [ + "GUID:df380645f10b7bc4b97d4f5eb6303d95", + "GUID:457756d89b35d2941b3e7b37b4ece6f1", + "GUID:15fc0a57446b3144c949da3e2b9737a9" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [ + "UNITY_2022_3_OR_NEWER" + ], + "versionDefines": [ + { + "name": "com.unity.modules.xr", + "expression": "", + "define": "d_UnityModuleVR" + }, + { + "name": "com.unity.render-pipelines.high-definition", + "expression": "", + "define": "d_UnityHDRP" + }, + { + "name": "com.unity.render-pipelines.universal", + "expression": "", + "define": "d_UnityURP" + } + ], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/WaveHarmonic.Crest.Shared.asmdef.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/WaveHarmonic.Crest.Shared.asmdef.meta new file mode 100644 index 000000000..42b35042b --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/WaveHarmonic.Crest.Shared.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 056ff2a5b2f124d468c6655552acdca5 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/XR.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/XR.meta new file mode 100644 index 000000000..77cab1af8 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/XR.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9a1193a5fe7614861bf6312bb57afe80 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/XR/XRHelpers.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/XR/XRHelpers.cs new file mode 100644 index 000000000..f556492d7 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/XR/XRHelpers.cs @@ -0,0 +1,183 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// Adaptor layer for XR module. Could be replaced with the following one day: +// com.unity.render-pipelines.core/Runtime/Common/XRGraphics.cs + +// Currently, only the horizon line uses it. + +// ENABLE_VR is defined if platform support XR. +// d_UnityModuleVR is defined if VR module is installed. +// VR module depends on XR module so we only need to check the VR module. +#if ENABLE_VR && d_UnityModuleVR +#define _XR_ENABLED +#endif + +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.XR; + +namespace WaveHarmonic.Crest +{ + static class XRHelpers + { + // NOTE: This is the same value as Unity, but in the future it could be higher. + const int k_MaximumViews = 2; + +#if _XR_ENABLED + static readonly List s_DisplayList = new(); + + // Unity only supports one display right now. + static XRDisplaySubsystem Display => IsRunning ? s_DisplayList[0] : null; +#endif + + static Matrix4x4 LeftEyeProjectionMatrix { get; set; } + static Matrix4x4 RightEyeProjectionMatrix { get; set; } + static Matrix4x4 LeftEyeViewMatrix { get; set; } + static Matrix4x4 RightEyeViewMatrix { get; set; } + static Matrix4x4 LeftInverseViewProjectionMatrixGPU { get; set; } + static Matrix4x4 RightInverseViewProjectionMatrixGPU { get; set; } + + static class ShaderIDs + { + public static readonly int s_InverseViewProjection = Shader.PropertyToID("_Crest_InverseViewProjection"); + public static readonly int s_InverseViewProjectionRight = Shader.PropertyToID("_Crest_InverseViewProjectionRight"); + } + + internal static bool IsRunning + { + get + { +#if _XR_ENABLED + return XRSettings.enabled; +#else + return false; +#endif + } + } + + public static bool IsSinglePass + { + get + { +#if _XR_ENABLED + return IsRunning && (XRSettings.stereoRenderingMode == XRSettings.StereoRenderingMode.SinglePassInstanced || + XRSettings.stereoRenderingMode == XRSettings.StereoRenderingMode.SinglePassMultiview); +#else + return false; +#endif + } + } + + static Texture2DArray s_WhiteTexture = null; + public static Texture2DArray WhiteTexture + { + get + { + if (s_WhiteTexture == null) + { + s_WhiteTexture = TextureArrayHelpers.CreateTexture2DArray(Texture2D.whiteTexture, k_MaximumViews); + s_WhiteTexture.name = "Crest White Texture XR"; + } + return s_WhiteTexture; + } + } + + public static RenderTextureDescriptor GetRenderTextureDescriptor(Camera camera) + { +#if _XR_ENABLED + if (camera.stereoEnabled) + { + return XRSettings.eyeTextureDesc; + } + else +#endif + { + // As recommended by Unity, in 2021.2 using SystemInfo.GetGraphicsFormat with DefaultFormat.LDR is + // necessary or gamma color space texture is returned: + // https://docs.unity3d.com/ScriptReference/Experimental.Rendering.DefaultFormat.html + return new(camera.pixelWidth, camera.pixelHeight, SystemInfo.GetGraphicsFormat(UnityEngine.Experimental.Rendering.DefaultFormat.LDR), 0); + } + } + + static void SetViewProjectionMatrices(Camera camera, int passIndex) + { +#if _XR_ENABLED + if (!XRSettings.enabled || IsSinglePass) + { + return; + } + // Not going to use cached values here just in case. + Display.GetRenderPass(passIndex, out var xrPass); + xrPass.GetRenderParameter(camera, renderParameterIndex: 0, out var xrEye); + camera.projectionMatrix = xrEye.projection; +#endif + } + + public static void UpdatePassIndex(ref int passIndex) + { + if (IsRunning) + { +#if _XR_ENABLED + if (XRSettings.stereoRenderingMode == XRSettings.StereoRenderingMode.MultiPass) + { + // Alternate between left and right eye. + passIndex += 1; + passIndex %= 2; + } + else + { + passIndex = 0; + } +#endif + } + else + { + passIndex = -1; + } + } + + public static void SetInverseViewProjectionMatrix(Camera camera) + { + // Have to set these explicitly as the built-in transforms aren't in world-space for the blit function. + if (camera.stereoEnabled && IsSinglePass) + { + Shader.SetGlobalMatrix(ShaderIDs.s_InverseViewProjection, LeftInverseViewProjectionMatrixGPU); + Shader.SetGlobalMatrix(ShaderIDs.s_InverseViewProjectionRight, RightInverseViewProjectionMatrixGPU); + } + else + { + Shader.SetGlobalMatrix(ShaderIDs.s_InverseViewProjection, LeftInverseViewProjectionMatrixGPU); + } + } + + public static void Update(Camera camera) + { +#if _XR_ENABLED + SubsystemManager.GetSubsystems(s_DisplayList); +#endif + + if (!camera.stereoEnabled || !IsSinglePass) + { + // Built-in renderer does not provide these matrices. + LeftInverseViewProjectionMatrixGPU = (GL.GetGPUProjectionMatrix(camera.projectionMatrix, false) * camera.worldToCameraMatrix).inverse; + return; + } + +#if _XR_ENABLED + // XR SPI only has one pass by definition. + Display.GetRenderPass(renderPassIndex: 0, out var xrPass); + // Grab left and right eye. + xrPass.GetRenderParameter(camera, renderParameterIndex: 0, out var xrLeftEye); + xrPass.GetRenderParameter(camera, renderParameterIndex: 1, out var xrRightEye); + // Store all the matrices. + LeftEyeViewMatrix = xrLeftEye.view; + RightEyeViewMatrix = xrRightEye.view; + LeftEyeProjectionMatrix = xrLeftEye.projection; + RightEyeProjectionMatrix = xrRightEye.projection; + LeftInverseViewProjectionMatrixGPU = (GL.GetGPUProjectionMatrix(LeftEyeProjectionMatrix, false) * LeftEyeViewMatrix).inverse; + RightInverseViewProjectionMatrixGPU = (GL.GetGPUProjectionMatrix(RightEyeProjectionMatrix, false) * RightEyeViewMatrix).inverse; +#endif + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/XR/XRHelpers.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/XR/XRHelpers.cs.meta new file mode 100644 index 000000000..83171ebd7 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Utility/Shared/XR/XRHelpers.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d3893707ad62c4444985948429b69651 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume.meta new file mode 100644 index 000000000..5f73296b9 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 30ac7884da0be4f7ab600bece6ba46d1 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterEffectPass.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterEffectPass.cs new file mode 100644 index 000000000..beac85437 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterEffectPass.cs @@ -0,0 +1,83 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using UnityEngine.Experimental.Rendering; +using UnityEngine.Rendering; + +namespace WaveHarmonic.Crest +{ + sealed class UnderwaterEffectPass + { + readonly UnderwaterRenderer _Renderer; + + RTHandle _ColorTexture; + + RTHandle _ColorTarget; + RTHandle _DepthTarget; + + bool _FirstRender = true; + + readonly System.Action _CopyColorTexture; + + public UnderwaterEffectPass(UnderwaterRenderer renderer) + { + _Renderer = renderer; + _CopyColorTexture = new(CopyColorTexture); + } + + void CopyColorTexture(CommandBuffer buffer) + { + Blitter.BlitCameraTexture(buffer, _ColorTarget, _ColorTexture); + CoreUtils.SetRenderTarget(buffer, _ColorTarget, _DepthTarget, ClearFlag.None); + } + + public void Allocate(GraphicsFormat format) + { + // TODO: There may other settings we want to set or bring in. Not MSAA since this is a resolved texture. + _ColorTexture = RTHandles.Alloc + ( + Vector2.one, + TextureXR.slices, + dimension: TextureXR.dimension, + colorFormat: format, + depthBufferBits: DepthBits.None, + useDynamicScale: true, + wrapMode: TextureWrapMode.Clamp, + name: "_Crest_UnderwaterCameraColorTexture" + ); + } + + public void ReAllocate(RenderTextureDescriptor descriptor) + { + // Descriptor will not have MSAA bound. + RenderPipelineCompatibilityHelper.ReAllocateIfNeeded(ref _ColorTexture, descriptor, name: "_Crest_UnderwaterCameraColorTexture"); + } + + public void Release() + { + _ColorTexture?.Release(); + _ColorTexture = null; + } + + public void Execute(Camera camera, CommandBuffer buffer, RTHandle color, RTHandle depth, MaterialPropertyBlock mpb = null) + { + _Renderer.UpdateEffectMaterial(camera, _FirstRender); + + _ColorTarget = color; + _DepthTarget = depth; + CopyColorTexture(buffer); + + buffer.SetGlobalTexture(UnderwaterRenderer.ShaderIDs.s_CameraColorTexture, _ColorTexture); + + _Renderer.ExecuteEffect(camera, buffer, _CopyColorTexture, mpb); + + // The last pass (uber post) does not resolve the texture. + // Although, this is wasteful if the pass after this does a resolve. + // Possibly a bug with Unity? + buffer.ResolveAntiAliasedSurface(color); + + _FirstRender = false; + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterEffectPass.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterEffectPass.cs.meta new file mode 100644 index 000000000..e649fcd2e --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterEffectPass.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6c581581e08ff40e689d952358cea7a0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterEffectPassHDRP.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterEffectPassHDRP.cs new file mode 100644 index 000000000..a26516fa8 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterEffectPassHDRP.cs @@ -0,0 +1,186 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#if d_UnityHDRP + +using UnityEngine; +using UnityEngine.Experimental.Rendering; +using UnityEngine.Rendering; +using UnityEngine.Rendering.HighDefinition; +using UnityEngine.Rendering.RendererUtils; + +namespace WaveHarmonic.Crest +{ + sealed class UnderwaterEffectPassHDRP : CustomPass + { + const string k_Name = "Underwater Effect"; + + static UnderwaterRenderer s_Renderer; + static UnderwaterEffectPass s_UnderwaterEffectPass; + static UnderwaterEffectPassHDRP s_Instance; + static CopyDepthBufferPassHDRP s_CopyDepthBufferPassHDRP; + + static ShaderTagId[] s_ForwardShaderTags; + + GameObject _GameObject; + + public static void Enable(UnderwaterRenderer renderer) + { + var gameObject = CustomPassHelpers.CreateOrUpdate + ( + parent: renderer._Water.Container.transform, + k_Name, + hide: !renderer._Water._Debug._ShowHiddenObjects + ); + + CustomPassHelpers.CreateOrUpdate + ( + gameObject, + ref s_CopyDepthBufferPassHDRP, + "Copy Depth Buffer", + CustomPassInjectionPoint.AfterOpaqueDepthAndNormal + ); + + CustomPassHelpers.CreateOrUpdate + ( + gameObject, + ref s_Instance, + k_Name, + CustomPassInjectionPoint.BeforePostProcess + ); + + s_Instance._GameObject = gameObject; + + s_Renderer = renderer; + s_UnderwaterEffectPass = new(renderer); + + RenderPipelineManager.beginCameraRendering -= s_Instance.OnBeginCameraRendering; + RenderPipelineManager.beginCameraRendering += s_Instance.OnBeginCameraRendering; + } + + public static void Disable() + { + // It should be safe to rely on this reference for this reference to fail. + if (s_Instance != null && s_Instance._GameObject != null) + { + // Will also trigger Cleanup below. + s_Instance._GameObject.SetActive(false); + } + } + + void OnBeginCameraRendering(ScriptableRenderContext context, Camera camera) + { + s_CopyDepthBufferPassHDRP.enabled = s_Renderer.UseStencilBuffer; + } + + protected override void Setup(ScriptableRenderContext renderContext, CommandBuffer cmd) + { + var asset = GraphicsSettings.currentRenderPipeline as HDRenderPipelineAsset; + + // Developers have a choice with the color buffer format. There is also a custom buffer buffer format but + // that is not relevant here. This will not cover the format change when scene filtering as Setup/Cleanup is + // not executed for this change. + s_UnderwaterEffectPass.Allocate((GraphicsFormat)asset.currentPlatformRenderPipelineSettings.colorBufferFormat); + + // Taken from: + // https://github.com/Unity-Technologies/Graphics/blob/778ddac6207ade1689999b95380cd835b0669f2d/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/DrawRenderersCustomPass.cs#L136-L142 + s_ForwardShaderTags ??= new[] + { + HDShaderPassNames.s_ForwardName, // HD Lit shader + HDShaderPassNames.s_ForwardOnlyName, // HD Unlit shader + HDShaderPassNames.s_SRPDefaultUnlitName, // Cross SRP Unlit shader + }; + } + + protected override void Cleanup() + { + RenderPipelineManager.beginCameraRendering -= s_Instance.OnBeginCameraRendering; + + s_UnderwaterEffectPass?.Release(); + } + + protected override void Execute(CustomPassContext context) + { + var camera = context.hdCamera.camera; + + if (!s_Renderer.ShouldRender(camera, UnderwaterRenderer.Pass.Effect)) + { + return; + } + + // Create a separate stencil buffer context by using a depth buffer copy if needed. + var depthBuffer = s_Renderer.UseStencilBuffer + ? s_CopyDepthBufferPassHDRP._DepthBufferCopy + : context.cameraDepthBuffer; + + s_UnderwaterEffectPass.Execute(camera, context.cmd, context.cameraColorBuffer, depthBuffer, context.propertyBlock); + + // Renders transparent objects after the underwater effect. Using the correct + // shader, the above water portion of the object is rendered normally (in the + // transparent pass), and the below water portion is rendered here with underwater + // applied. + // See the following for reference: + // https://github.com/Unity-Technologies/Graphics/blob/master/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/DrawRenderersCustomPass.cs + if (s_Renderer.EnableShaderAPI) + { + var renderConfig = HDUtils.GetRendererConfiguration + ( +#if UNITY_6000_0_OR_NEWER + context.hdCamera.frameSettings.IsEnabled(FrameSettingsField.AdaptiveProbeVolume), +#else + context.hdCamera.frameSettings.IsEnabled(FrameSettingsField.ProbeVolume), +#endif + context.hdCamera.frameSettings.IsEnabled(FrameSettingsField.Shadowmask) + ); + + var result = new RendererListDesc(s_ForwardShaderTags, context.cullingResults, context.hdCamera.camera) + { + rendererConfiguration = renderConfig, + renderQueueRange = GetRenderQueueRange(RenderQueueType.AllTransparent), + sortingCriteria = SortingCriteria.CommonTransparent, + excludeObjectMotionVectors = false, + layerMask = s_Renderer._TransparentObjectLayers, + }; + + context.cmd.EnableShaderKeyword(UnderwaterRenderer.k_KeywordUnderwaterObjects); + CoreUtils.DrawRendererList(context.renderContext, context.cmd, context.renderContext.CreateRendererList(result)); + context.cmd.DisableShaderKeyword(UnderwaterRenderer.k_KeywordUnderwaterObjects); + } + } + } + + sealed class CopyDepthBufferPassHDRP : CustomPass + { + public RTHandle _DepthBufferCopy; + + protected override void Execute(CustomPassContext context) + { + // Multiple cameras could have different settings. + RenderPipelineCompatibilityHelper.ReAllocateIfNeeded + ( + ref _DepthBufferCopy, + context.cameraDepthBuffer.rt.descriptor, + FilterMode.Point, + name: "_Crest_UnderwaterCopiedDepthBuffer" + ); + + var buffer = context.cmd; + + buffer.SetRenderTarget(BuiltinRenderTextureType.None, _DepthBufferCopy); + buffer.ClearRenderTarget(RTClearFlags.Depth, Color.black, 1, 0); + + buffer.CopyTexture(context.cameraDepthBuffer.rt, _DepthBufferCopy.rt); + + // Clear the stencil component just in case. + buffer.ClearRenderTarget(RTClearFlags.Stencil, Color.black, 1, 0); + } + + protected override void Cleanup() + { + _DepthBufferCopy?.Release(); + _DepthBufferCopy = null; + } + } +} + +#endif // d_UnityHDRP diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterEffectPassHDRP.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterEffectPassHDRP.cs.meta new file mode 100644 index 000000000..888a56853 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterEffectPassHDRP.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 03d7c1db420e64f7c9894f9c2bdaae4c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterEffectPassURP.RenderGraph.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterEffectPassURP.RenderGraph.cs new file mode 100644 index 000000000..1d664819a --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterEffectPassURP.RenderGraph.cs @@ -0,0 +1,202 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#if d_UnityURP +#if UNITY_6000_0_OR_NEWER + +using UnityEngine.Rendering; +using UnityEngine.Rendering.RenderGraphModule; +using UnityEngine.Rendering.Universal; + +namespace WaveHarmonic.Crest +{ + partial class UnderwaterEffectPassURP + { + class PassData + { +#pragma warning disable IDE1006 // Naming Styles + public UniversalCameraData cameraData; + public RenderGraphHelper.Handle colorTargetHandle; + public RenderGraphHelper.Handle depthTargetHandle; +#pragma warning restore IDE1006 // Naming Styles + + public void Init(ContextContainer frameData, IUnsafeRenderGraphBuilder builder = null) + { + var resources = frameData.Get(); + cameraData = frameData.Get(); + + if (builder == null) + { +#pragma warning disable CS0618 // Type or member is obsolete + colorTargetHandle = cameraData.renderer.cameraColorTargetHandle; + depthTargetHandle = cameraData.renderer.cameraDepthTargetHandle; +#pragma warning restore CS0618 // Type or member is obsolete + } + else + { + colorTargetHandle = resources.activeColorTexture; + depthTargetHandle = resources.activeDepthTexture; + builder.UseTexture(colorTargetHandle, AccessFlags.ReadWrite); + builder.UseTexture(depthTargetHandle, AccessFlags.ReadWrite); + } + } + } + + readonly PassData _PassData = new(); + + public override void RecordRenderGraph(RenderGraph graph, ContextContainer frame) + { + using (var builder = graph.AddUnsafePass(k_Name, out var data)) + { + data.Init(frame, builder); + builder.AllowPassCulling(false); + + builder.SetRenderFunc((data, context) => + { + var buffer = CommandBufferHelpers.GetNativeCommandBuffer(context.cmd); + OnSetup(buffer, data); + Execute(context.GetRenderContext(), buffer, data); + }); + } + } + + [System.Obsolete] + public override void OnCameraSetup(CommandBuffer buffer, ref RenderingData data) + { + _PassData.Init(data.GetFrameData()); + } + + [System.Obsolete] + public override void Execute(ScriptableRenderContext context, ref RenderingData data) + { + _PassData.Init(data.GetFrameData()); + var buffer = CommandBufferPool.Get(k_Name); + OnSetup(buffer, _PassData); + Execute(context, buffer, _PassData); + context.ExecuteCommandBuffer(buffer); + CommandBufferPool.Release(buffer); + } + + partial class RenderObjectsWithoutFogPass + { + class PassData + { +#pragma warning disable IDE1006 // Naming Styles + public UniversalCameraData cameraData; + public UniversalLightData lightData; + public UniversalRenderingData renderingData; + public CullingResults cullResults; +#pragma warning restore IDE1006 // Naming Styles + + public void Init(ContextContainer frameData, IUnsafeRenderGraphBuilder builder = null) + { + cameraData = frameData.Get(); + lightData = frameData.Get(); + renderingData = frameData.Get(); + cullResults = renderingData.cullResults; + } + } + + readonly PassData _PassData = new(); + + public override void RecordRenderGraph(RenderGraph graph, ContextContainer frame) + { + using (var builder = graph.AddUnsafePass(k_Name, out var data)) + { + data.Init(frame, builder); + builder.AllowPassCulling(false); + + builder.SetRenderFunc((data, context) => + { + var buffer = CommandBufferHelpers.GetNativeCommandBuffer(context.cmd); + Execute(context.GetRenderContext(), buffer, data); + }); + } + } + + [System.Obsolete] + public override void OnCameraSetup(CommandBuffer buffer, ref RenderingData data) + { + _PassData.Init(data.GetFrameData()); + } + + [System.Obsolete] + public override void Execute(ScriptableRenderContext context, ref RenderingData data) + { + _PassData.Init(data.GetFrameData()); + var buffer = CommandBufferPool.Get(k_Name); + Execute(context, buffer, _PassData); + context.ExecuteCommandBuffer(buffer); + CommandBufferPool.Release(buffer); + } + } + } + + partial class CopyDepthBufferPassURP + { + class PassData + { +#pragma warning disable IDE1006 // Naming Styles + public UniversalCameraData cameraData; + public RenderGraphHelper.Handle colorTargetHandle; + public RenderGraphHelper.Handle depthTargetHandle; +#pragma warning restore IDE1006 // Naming Styles + + public void Init(ContextContainer frameData, IUnsafeRenderGraphBuilder builder = null) + { + var resources = frameData.Get(); + cameraData = frameData.Get(); + + if (builder == null) + { +#pragma warning disable CS0618 // Type or member is obsolete + depthTargetHandle = cameraData.renderer.cameraDepthTargetHandle; +#pragma warning restore CS0618 // Type or member is obsolete + } + else + { + depthTargetHandle = resources.activeDepthTexture; + builder.UseTexture(depthTargetHandle, AccessFlags.ReadWrite); + } + } + } + + readonly PassData _PassData = new(); + + public override void RecordRenderGraph(RenderGraph graph, ContextContainer frame) + { + using (var builder = graph.AddUnsafePass(k_Name, out var data)) + { + data.Init(frame, builder); + builder.AllowPassCulling(false); + + builder.SetRenderFunc((data, context) => + { + var buffer = CommandBufferHelpers.GetNativeCommandBuffer(context.cmd); + OnSetup(buffer, data); + Execute(context.GetRenderContext(), buffer, data); + }); + } + } + + [System.Obsolete] + public override void OnCameraSetup(CommandBuffer buffer, ref RenderingData data) + { + _PassData.Init(data.GetFrameData()); + } + + [System.Obsolete] + public override void Execute(ScriptableRenderContext context, ref RenderingData data) + { + _PassData.Init(data.GetFrameData()); + var buffer = CommandBufferPool.Get(k_Name); + OnSetup(buffer, _PassData); + Execute(context, buffer, _PassData); + context.ExecuteCommandBuffer(buffer); + CommandBufferPool.Release(buffer); + } + } +} + +#endif // UNITY_6000_0_OR_NEWER +#endif // d_UnityURP diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterEffectPassURP.RenderGraph.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterEffectPassURP.RenderGraph.cs.meta new file mode 100644 index 000000000..02126ade2 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterEffectPassURP.RenderGraph.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7fba7ac72b29f4b12a08eb07d80a2703 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterEffectPassURP.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterEffectPassURP.cs new file mode 100644 index 000000000..dd7a576de --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterEffectPassURP.cs @@ -0,0 +1,308 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#if d_UnityURP + +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Experimental.Rendering; +using UnityEngine.Rendering; +using UnityEngine.Rendering.Universal; + +namespace WaveHarmonic.Crest +{ + sealed partial class UnderwaterEffectPassURP : ScriptableRenderPass + { + const string k_Name = "Crest Underwater Effect"; + + UnderwaterRenderer _Renderer; + + static UnderwaterEffectPassURP s_Instance; + RenderObjectsWithoutFogPass _ApplyFogToTransparentObjects; + UnderwaterEffectPass _UnderwaterEffectPass; + CopyDepthBufferPassURP _CopyDepthBufferPass; + + RTHandle _ColorBuffer; + RTHandle _DepthBuffer; + + public UnderwaterEffectPassURP() + { + renderPassEvent = RenderPassEvent.AfterRenderingTransparents; + ConfigureInput(ScriptableRenderPassInput.Color | ScriptableRenderPassInput.Depth); + } + + public static void Enable(UnderwaterRenderer renderer) + { + if (s_Instance == null) + { + s_Instance = new(); + s_Instance._Renderer = renderer; + s_Instance._CopyDepthBufferPass = new(RenderPassEvent.AfterRenderingOpaques); + s_Instance._ApplyFogToTransparentObjects = new(); + } + + RenderPipelineManager.beginCameraRendering -= s_Instance.EnqueuePass; + RenderPipelineManager.beginCameraRendering += s_Instance.EnqueuePass; + RenderPipelineManager.activeRenderPipelineTypeChanged -= Disable; + RenderPipelineManager.activeRenderPipelineTypeChanged += Disable; + } + + public static void Disable() + { + if (s_Instance != null) RenderPipelineManager.beginCameraRendering -= s_Instance.EnqueuePass; + RenderPipelineManager.activeRenderPipelineTypeChanged -= Disable; + + s_Instance?._UnderwaterEffectPass?.Release(); + s_Instance?._CopyDepthBufferPass?.Release(); + s_Instance = null; + } + + void EnqueuePass(ScriptableRenderContext context, Camera camera) + { + if (!_Renderer.ShouldRender(camera, UnderwaterRenderer.Pass.Effect)) + { + return; + } + + var renderer = camera.GetUniversalAdditionalCameraData().scriptableRenderer; + +#if UNITY_EDITOR + if (renderer == null) return; +#endif + + // Copy the depth buffer to create a new depth/stencil context. + if (_Renderer.UseStencilBuffer) + { + renderer.EnqueuePass(_CopyDepthBufferPass); + } + + // Set up internal pass which houses shared code for SRPs. + _UnderwaterEffectPass ??= new(_Renderer); + + renderer.EnqueuePass(s_Instance); + + if (_Renderer.EnableShaderAPI) + { + renderer.EnqueuePass(_ApplyFogToTransparentObjects); + } + } + +#if UNITY_6000_0_OR_NEWER + void OnSetup(CommandBuffer buffer, PassData data) + { + _ColorBuffer = data.colorTargetHandle.Texture; + _DepthBuffer = data.depthTargetHandle.Texture; + + // TODO: renderingData.cameraData.cameraTargetDescriptor? + _UnderwaterEffectPass.ReAllocate(_ColorBuffer.rt.descriptor); + } + + void Execute(ScriptableRenderContext context, CommandBuffer buffer, PassData data) + { + if (_Renderer.UseStencilBuffer) + { + _DepthBuffer = _CopyDepthBufferPass._DepthBufferCopy; + } + + _UnderwaterEffectPass.Execute(data.cameraData.camera, buffer, _ColorBuffer, _DepthBuffer); + } +#else + public override void OnCameraSetup(CommandBuffer buffer, ref RenderingData data) + { + _ColorBuffer = data.cameraData.renderer.cameraColorTargetHandle; + _DepthBuffer = data.cameraData.renderer.cameraDepthTargetHandle; + + // TODO: renderingData.cameraData.cameraTargetDescriptor? + _UnderwaterEffectPass.ReAllocate(_ColorBuffer.rt.descriptor); + } + + public override void Execute(ScriptableRenderContext context, ref RenderingData data) + { + var buffer = CommandBufferPool.Get(k_Name); + + if (_Renderer.UseStencilBuffer) + { + _DepthBuffer = _CopyDepthBufferPass._DepthBufferCopy; + } + + _UnderwaterEffectPass.Execute(data.cameraData.camera, buffer, _ColorBuffer, _DepthBuffer); + + context.ExecuteCommandBuffer(buffer); + CommandBufferPool.Release(buffer); + } +#endif + + // Renders transparent objects after the underwater effect. Using the correct + // shader, the above water portion of the object is rendered normally (in the + // transparent pass), and the below water portion is rendered here with underwater + // applied. + sealed partial class RenderObjectsWithoutFogPass : ScriptableRenderPass + { + FilteringSettings _FilteringSettings; + + static readonly List s_ShaderTagIdList = new() + { + new("SRPDefaultUnlit"), + new("UniversalForward"), + new("UniversalForwardOnly"), + new("LightweightForward"), + }; + + public RenderObjectsWithoutFogPass() + { + renderPassEvent = RenderPassEvent.BeforeRenderingPostProcessing; + _FilteringSettings = new(RenderQueueRange.transparent, 0); + } + +#if UNITY_6000_0_OR_NEWER + void Execute(ScriptableRenderContext context, CommandBuffer buffer, PassData renderingData) +#else + public override void Execute(ScriptableRenderContext context, ref RenderingData renderingData) +#endif + { + _FilteringSettings.layerMask = s_Instance._Renderer._TransparentObjectLayers; + +#if !UNITY_6000_0_OR_NEWER + var buffer = CommandBufferPool.Get("Crest Underwater Objects"); +#endif + + // Disable Unity's fog keywords as there is no option to ignore fog for the Shader Graph. + if (RenderSettings.fog) + { + switch (RenderSettings.fogMode) + { + case FogMode.Exponential: + buffer.DisableShaderKeyword("FOG_EXP"); + break; + case FogMode.Linear: + buffer.DisableShaderKeyword("FOG_LINEAR"); + break; + case FogMode.ExponentialSquared: + buffer.DisableShaderKeyword("FOG_EXP2"); + break; + } + } + + buffer.EnableShaderKeyword(UnderwaterRenderer.k_KeywordUnderwaterObjects); + // If we want anything to apply to DrawRenderers, it has to be executed before: + // https://docs.unity3d.com/ScriptReference/Rendering.ScriptableRenderContext.DrawRenderers.html + context.ExecuteCommandBuffer(buffer); + buffer.Clear(); + +#if UNITY_6000_0_OR_NEWER + var drawingSettings = RenderingUtils.CreateDrawingSettings + ( + s_ShaderTagIdList, + renderingData.renderingData, + renderingData.cameraData, + renderingData.lightData, + SortingCriteria.CommonTransparent + ); + + var parameters = new RendererListParams(renderingData.cullResults, drawingSettings, _FilteringSettings); + var list = context.CreateRendererList(ref parameters); + + buffer.DrawRendererList(list); +#else + var drawingSettings = CreateDrawingSettings + ( + s_ShaderTagIdList, + ref renderingData, + SortingCriteria.CommonTransparent + ); + + context.DrawRenderers(renderingData.cullResults, ref drawingSettings, ref _FilteringSettings); +#endif + + // Revert fog keywords. + if (RenderSettings.fog) + { + switch (RenderSettings.fogMode) + { + case FogMode.Exponential: + buffer.EnableShaderKeyword("FOG_EXP"); + break; + case FogMode.Linear: + buffer.EnableShaderKeyword("FOG_LINEAR"); + break; + case FogMode.ExponentialSquared: + buffer.EnableShaderKeyword("FOG_EXP2"); + break; + } + } + + buffer.DisableShaderKeyword(UnderwaterRenderer.k_KeywordUnderwaterObjects); + +#if !UNITY_6000_0_OR_NEWER + context.ExecuteCommandBuffer(buffer); + CommandBufferPool.Release(buffer); +#endif + } + } + } + + // Copies the depth buffer to avoid conflicts when using the stencil buffer. + sealed partial class CopyDepthBufferPassURP : ScriptableRenderPass + { + const string k_Name = "Crest Copy Depth Buffer"; + RTHandle _DepthBuffer; + public RTHandle _DepthBufferCopy; + + public CopyDepthBufferPassURP(RenderPassEvent @event) + { + renderPassEvent = @event; + } + +#if UNITY_6000_0_OR_NEWER + void OnSetup(CommandBuffer buffer, PassData data) +#else + public override void OnCameraSetup(CommandBuffer buffer, ref RenderingData data) +#endif + { + var descriptor = data.cameraData.cameraTargetDescriptor; + descriptor.graphicsFormat = GraphicsFormat.None; + descriptor.bindMS = descriptor.msaaSamples > 1; +#if UNITY_6000_0_OR_NEWER + RenderingUtils.ReAllocateHandleIfNeeded(ref _DepthBufferCopy, descriptor, FilterMode.Point, name: "Crest Copied Depth Buffer"); + _DepthBuffer = data.depthTargetHandle; +#else + RenderingUtils.ReAllocateIfNeeded(ref _DepthBufferCopy, descriptor, FilterMode.Point, name: "Crest Copied Depth Buffer"); + _DepthBuffer = data.cameraData.renderer.cameraDepthTargetHandle; +#endif + } + +#if UNITY_6000_0_OR_NEWER + void Execute(ScriptableRenderContext context, CommandBuffer buffer, PassData data) +#else + public override void Execute(ScriptableRenderContext context, ref RenderingData data) +#endif + { +#if !UNITY_6000_0_OR_NEWER + var buffer = CommandBufferPool.Get(k_Name); +#endif + + // Must clear even though we are overwriting or there will be strange artifacts on new writes. + // This could be a Unity bug and may be worth reporting. + buffer.SetRenderTarget(BuiltinRenderTextureType.None, _DepthBufferCopy); + buffer.ClearRenderTarget(RTClearFlags.Depth, Color.black, 1, 0); + + buffer.CopyTexture(_DepthBuffer.rt, _DepthBufferCopy.rt); + + // Clear the stencil component just in case. + buffer.ClearRenderTarget(RTClearFlags.Stencil, Color.black, 1, 0); + +#if !UNITY_6000_0_OR_NEWER + context.ExecuteCommandBuffer(buffer); + CommandBufferPool.Release(buffer); +#endif + } + + public void Release() + { + _DepthBuffer = null; + _DepthBufferCopy?.Release(); + } + } +} + +#endif // d_UnityURP diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterEffectPassURP.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterEffectPassURP.cs.meta new file mode 100644 index 000000000..44c8582ba --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterEffectPassURP.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5ab3e34da699e48eaa28a35fba152510 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterMaskPass.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterMaskPass.cs new file mode 100644 index 000000000..8b5f5c166 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterMaskPass.cs @@ -0,0 +1,140 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using UnityEngine.Rendering; +using UnityEngine.Experimental.Rendering; + +namespace WaveHarmonic.Crest +{ + sealed class UnderwaterMaskPass + { + readonly UnderwaterRenderer _Renderer; +#if d_CrestPortals + readonly Portals.PortalRenderer _Portals; +#endif + + RTHandle _MaskTexture; + RTHandle _DepthTexture; + RenderTargetIdentifier _MaskTarget; + RenderTargetIdentifier _DepthTarget; + + public UnderwaterMaskPass(UnderwaterRenderer renderer) + { + _Renderer = renderer; +#if d_CrestPortals + _Portals = renderer._Portals; +#endif + } + + public void Allocate() + { + _MaskTexture = RTHandles.Alloc + ( + scaleFactor: Vector2.one, + slices: TextureXR.slices, + dimension: TextureXR.dimension, + depthBufferBits: DepthBits.None, + colorFormat: GraphicsFormat.R16_SFloat, + enableRandomWrite: true, + useDynamicScale: true, + name: "_Crest_WaterMask" + ); + + _MaskTarget = new(_MaskTexture, mipLevel: 0, CubemapFace.Unknown, depthSlice: -1); + + _DepthTexture = RTHandles.Alloc + ( + scaleFactor: Vector2.one, + slices: TextureXR.slices, + dimension: TextureXR.dimension, + depthBufferBits: UnderwaterRenderer.k_DepthBits, + colorFormat: GraphicsFormat.None, + enableRandomWrite: false, + useDynamicScale: true, + name: "_Crest_WaterMaskDepth" + ); + +#if d_CrestPortals + // For HDRP we cannot allocate in OnEnable as RTHandle will complain. + if (_Portals.Active) + { + _Portals.Allocate(); + } +#endif + + _DepthTarget = new(_DepthTexture, mipLevel: 0, CubemapFace.Unknown, depthSlice: -1); + + _Renderer.SetUpArtifactsShader(); + } + + // We should not have to reallocate, but URP will raise errors when an option like HDR is changed if we do not. + public void ReAllocate(RenderTextureDescriptor descriptor) + { + // Shared settings. Enabling MSAA might be a good idea except cannot enable random writes. Having a raster + // shader to remove artifacts is a workaround. + descriptor.bindMS = false; + descriptor.msaaSamples = 1; + + descriptor.graphicsFormat = GraphicsFormat.None; + + if (RenderPipelineCompatibilityHelper.ReAllocateIfNeeded(ref _DepthTexture, descriptor, name: "_Crest_WaterMaskDepth")) + { + _DepthTarget = new(_DepthTexture, mipLevel: 0, CubemapFace.Unknown, depthSlice: -1); + } + +#if d_CrestPortals + if (_Portals.Active) + { + _Portals.ReAllocate(descriptor); + } +#endif + + descriptor.graphicsFormat = GraphicsFormat.R16_SFloat; + descriptor.enableRandomWrite = true; + descriptor.depthBufferBits = 0; + + if (RenderPipelineCompatibilityHelper.ReAllocateIfNeeded(ref _MaskTexture, descriptor, name: "_Crest_WaterMask")) + { + _MaskTarget = new(_MaskTexture, mipLevel: 0, CubemapFace.Unknown, depthSlice: -1); + } + } + + public void Release() + { + _MaskTexture?.Release(); + _DepthTexture?.Release(); + +#if d_CrestPortals + if (_Portals.Active) + { + _Portals.Release(); + } +#endif + } + + public void Execute(Camera camera, CommandBuffer buffer) + { +#if d_CrestPortals + // Populate water volume before mask so we can use the stencil. + if (_Portals.Active) + { + _Portals.RenderMask(camera, buffer, _Renderer._MaskMaterial); + _Portals.RenderStencil(buffer, _DepthTexture); + } +#endif + + // For HDRP software dynamic scaling to work. + CoreUtils.SetRenderTarget(buffer, _MaskTexture, _DepthTexture); + Helpers.ScaleViewport(camera, buffer, _MaskTexture); + + _Renderer.SetUpMask(buffer, _MaskTarget, _DepthTarget); + _Renderer.PopulateMask(buffer, camera); + + var size = _MaskTexture.GetScaledSize(_MaskTexture.rtHandleProperties.currentViewportSize); + var descriptor = _MaskTexture.rt.descriptor; + descriptor.width = size.x; descriptor.height = size.y; + _Renderer.FixMaskArtefacts(buffer, descriptor, _MaskTarget); + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterMaskPass.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterMaskPass.cs.meta new file mode 100644 index 000000000..6e7d834a9 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterMaskPass.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 034fbbb00c45d493294db385ff38a629 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterMaskPassHDRP.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterMaskPassHDRP.cs new file mode 100644 index 000000000..fbe2b0235 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterMaskPassHDRP.cs @@ -0,0 +1,78 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#if d_UnityHDRP + +using UnityEngine; +using UnityEngine.Rendering; +using UnityEngine.Rendering.HighDefinition; + +namespace WaveHarmonic.Crest +{ + sealed class UnderwaterMaskPassHDRP : CustomPass + { + const string k_Name = "Underwater Mask"; + + static UnderwaterRenderer s_Renderer; + static UnderwaterMaskPass s_UnderwaterMaskPass; + static UnderwaterMaskPassHDRP s_Instance; + GameObject _GameObject; + + public static void Enable(UnderwaterRenderer renderer) + { + var gameObject = CustomPassHelpers.CreateOrUpdate + ( + parent: renderer._Water.Container.transform, + k_Name, + hide: !renderer._Water._Debug._ShowHiddenObjects + ); + + CustomPassHelpers.CreateOrUpdate + ( + gameObject, + ref s_Instance, + k_Name, + CustomPassInjectionPoint.BeforeRendering + ); + + s_Instance._GameObject = gameObject; + + s_Renderer = renderer; + s_UnderwaterMaskPass = new(renderer); + } + + public static void Disable() + { + // It should be safe to rely on this reference for this reference to fail. + if (s_Instance != null && s_Instance._GameObject != null) + { + // Will also trigger Cleanup below. + s_Instance._GameObject.SetActive(false); + } + } + + protected override void Setup(ScriptableRenderContext renderContext, CommandBuffer cmd) + { + s_UnderwaterMaskPass.Allocate(); + } + + protected override void Cleanup() + { + s_UnderwaterMaskPass?.Release(); + } + + protected override void Execute(CustomPassContext context) + { + var camera = context.hdCamera.camera; + + if (!s_Renderer.ShouldRender(camera, UnderwaterRenderer.Pass.Mask)) + { + return; + } + + s_UnderwaterMaskPass.Execute(camera, context.cmd); + } + } +} + +#endif // d_UnityHDRP diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterMaskPassHDRP.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterMaskPassHDRP.cs.meta new file mode 100644 index 000000000..80c03271c --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterMaskPassHDRP.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3fa78b61faddf4493ae6381f85fb2572 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterMaskPassURP.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterMaskPassURP.cs new file mode 100644 index 000000000..36e5bc50f --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterMaskPassURP.cs @@ -0,0 +1,106 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#if d_UnityURP + +using UnityEngine; +using UnityEngine.Rendering; +using UnityEngine.Rendering.Universal; + +namespace WaveHarmonic.Crest +{ + sealed partial class UnderwaterMaskPassURP : ScriptableRenderPass + { + const string k_Name = "Crest Underwater Mask"; + static UnderwaterMaskPassURP s_Instance; + UnderwaterRenderer _Renderer; + UnderwaterMaskPass _UnderwaterMaskPass; + + public UnderwaterMaskPassURP() + { + // Will always execute and matrices will be ready. + renderPassEvent = RenderPassEvent.BeforeRenderingPrePasses; + } + + public static void Enable(UnderwaterRenderer renderer) + { + s_Instance ??= new(); + s_Instance._Renderer = renderer; + + RenderPipelineManager.beginCameraRendering -= s_Instance.EnqueuePass; + RenderPipelineManager.beginCameraRendering += s_Instance.EnqueuePass; + RenderPipelineManager.activeRenderPipelineTypeChanged -= Disable; + RenderPipelineManager.activeRenderPipelineTypeChanged += Disable; + } + + public static void Disable() + { + if (s_Instance != null) RenderPipelineManager.beginCameraRendering -= s_Instance.EnqueuePass; + RenderPipelineManager.activeRenderPipelineTypeChanged -= Disable; + + s_Instance?._UnderwaterMaskPass?.Release(); + s_Instance = null; + } + + void EnqueuePass(ScriptableRenderContext context, Camera camera) + { + if (!_Renderer.ShouldRender(camera, UnderwaterRenderer.Pass.Mask)) + { + return; + } + + var renderer = camera.GetUniversalAdditionalCameraData().scriptableRenderer; + +#if UNITY_EDITOR + if (renderer == null) return; +#endif + + if (_UnderwaterMaskPass == null) + { + _UnderwaterMaskPass = new(_Renderer); + _UnderwaterMaskPass.Allocate(); + } + + // Enqueue the pass. This happens every frame. + renderer.EnqueuePass(this); + } + +#if UNITY_6000_0_OR_NEWER + class PassData + { + public UniversalCameraData _CameraData; + public UnderwaterMaskPass _UnderwaterMaskPass; + } + + public override void RecordRenderGraph(UnityEngine.Rendering.RenderGraphModule.RenderGraph graph, ContextContainer frame) + { + using (var builder = graph.AddUnsafePass(k_Name, out var data)) + { + builder.AllowPassCulling(false); + + data._CameraData = frame.Get(); + data._UnderwaterMaskPass = _UnderwaterMaskPass; + + builder.SetRenderFunc((data, context) => + { + var buffer = CommandBufferHelpers.GetNativeCommandBuffer(context.cmd); + data._UnderwaterMaskPass.ReAllocate(data._CameraData.cameraTargetDescriptor); + data._UnderwaterMaskPass.Execute(data._CameraData.camera, buffer); + }); + } + } + + [System.Obsolete] +#endif + public override void Execute(ScriptableRenderContext context, ref RenderingData data) + { + var buffer = CommandBufferPool.Get(k_Name); + _UnderwaterMaskPass.ReAllocate(data.cameraData.cameraTargetDescriptor); + _UnderwaterMaskPass.Execute(data.cameraData.camera, buffer); + context.ExecuteCommandBuffer(buffer); + CommandBufferPool.Release(buffer); + } + } +} + +#endif // d_UnityURP diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterMaskPassURP.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterMaskPassURP.cs.meta new file mode 100644 index 000000000..dee4bf51d --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterMaskPassURP.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1ce8d0e0aca6a47a9b0b5a8a7544a064 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterRenderer.Editor.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterRenderer.Editor.cs new file mode 100644 index 000000000..1e481dd74 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterRenderer.Editor.cs @@ -0,0 +1,32 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#if UNITY_EDITOR + +using UnityEngine; +using WaveHarmonic.Crest.Editor; + +namespace WaveHarmonic.Crest +{ + // Edit Mode. + partial class UnderwaterRenderer + { + static bool IsFogEnabledForEditorCamera(Camera camera) + { + // Check if scene view has disabled fog rendering. + if (camera.cameraType == CameraType.SceneView) + { + var sceneView = EditorHelpers.GetSceneViewFromSceneCamera(camera); + // Skip rendering if fog is disabled or for some reason we could not find the scene view. + if (sceneView == null || !sceneView.sceneViewState.fogEnabled) + { + return false; + } + } + + return true; + } + } +} + +#endif diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterRenderer.Editor.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterRenderer.Editor.cs.meta new file mode 100644 index 000000000..1bfd7d378 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterRenderer.Editor.cs.meta @@ -0,0 +1,17 @@ +fileFormatVersion: 2 +guid: 9c58e49fb2a8646388cd64da7f35b182 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: + - _volumeGeometry: {instanceID: 0} + - _EffectMaterial: {instanceID: 0} + - _MaskMaterial: {instanceID: 0} + - _VolumeMaterial: {instanceID: 0} + - _fixMaskComputeShader: {fileID: 7200000, guid: 08549c36146ad4899a07193754b21ea2, + type: 3} + executionOrder: 201 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterRenderer.Effect.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterRenderer.Effect.cs new file mode 100644 index 000000000..d6bb51123 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterRenderer.Effect.cs @@ -0,0 +1,315 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using UnityEngine.Rendering; +using WaveHarmonic.Crest.Internal; + +namespace WaveHarmonic.Crest +{ + partial class UnderwaterRenderer + { + const string k_KeywordFullScreenEffect = "_FULL_SCREEN_EFFECT"; + const string k_KeywordDebugVisualizeMask = "_DEBUG_VISUALIZE_MASK"; + const string k_KeywordDebugVisualizeStencil = "_DEBUG_VISUALIZE_STENCIL"; + internal const string k_KeywordUnderwaterObjects = "CREST_UNDERWATER_OBJECTS_PASS"; + + static partial class ShaderIDs + { + // Local + public static readonly int s_HorizonNormal = Shader.PropertyToID("_Crest_HorizonNormal"); + + // Global + public static readonly int s_CameraColorTexture = Shader.PropertyToID("_Crest_CameraColorTexture"); + public static readonly int s_WaterVolumeStencil = Shader.PropertyToID("_Crest_WaterVolumeStencil"); + public static readonly int s_AmbientLighting = Shader.PropertyToID("_Crest_AmbientLighting"); + public static readonly int s_ExtinctionMultiplier = Shader.PropertyToID("_Crest_ExtinctionMultiplier"); + public static readonly int s_UnderwaterEnvironmentalLightingWeight = Shader.PropertyToID("_Crest_UnderwaterEnvironmentalLightingWeight"); + + // Built-ins + public static readonly int s_WorldSpaceLightPos0 = Shader.PropertyToID("_WorldSpaceLightPos0"); + public static readonly int s_LightColor0 = Shader.PropertyToID("_LightColor0"); + } + + + // These map to passes in the underwater shader. + internal enum EffectPass + { + FullScreen, + Reflections, + } + + CommandBuffer _EffectCommandBuffer; + Material _CurrentWaterMaterial; + readonly UnderwaterSphericalHarmonicsData _SphericalHarmonicsData = new(); + System.Action _CopyColor; + + RenderTargetIdentifier _ColorTarget = new + ( + BuiltinRenderTextureType.CameraTarget, + 0, + CubemapFace.Unknown, + -1 + ); + RenderTargetIdentifier _DepthStencilTarget = new + ( + ShaderIDs.s_WaterVolumeStencil, + 0, + CubemapFace.Unknown, + -1 + ); + RenderTargetIdentifier _ColorCopyTarget = new + ( + ShaderIDs.s_CameraColorTexture, + 0, + CubemapFace.Unknown, + -1 + ); + + sealed class UnderwaterSphericalHarmonicsData + { + internal Color[] _AmbientLighting = new Color[1]; + internal Vector3[] _DirectionsSH = { new(0.0f, 0.0f, 0.0f) }; + } + + void CopyColorTexture(CommandBuffer buffer) + { + // Use blit instead of CopyTexture as it will smooth out issues with format + // differences which is very hard to get right for BIRP. + buffer.Blit(BuiltinRenderTextureType.CameraTarget, _ColorCopyTarget); + + if (UseStencilBuffer) + { + _EffectCommandBuffer.SetRenderTarget(_ColorTarget, _DepthStencilTarget); + } + else + { + _EffectCommandBuffer.SetRenderTarget(_ColorTarget); + } + } + + void SetupUnderwaterEffect() + { + _EffectCommandBuffer ??= new() + { + name = "Underwater Pass", + }; + + _CopyColor ??= new(CopyColorTexture); + } + + void OnPreRenderUnderwaterEffect(Camera camera) + { +#if UNITY_EDITOR + // Do not use this to prevent the mask from rendering due to portals and volumes feature. + if (!IsFogEnabledForEditorCamera(camera)) + { + _EffectCommandBuffer?.Clear(); + return; + } +#endif + + var descriptor = XRHelpers.GetRenderTextureDescriptor(camera); + descriptor.useDynamicScale = camera.allowDynamicResolution; + + // Format must be correct for CopyTexture to work. Hopefully this is good enough. + if (camera.allowHDR && QualitySettings.activeColorSpace == ColorSpace.Linear) + { + descriptor.graphicsFormat = SystemInfo.GetGraphicsFormat(_Water.LikelyFrameBufferFormat); + } + + UpdateEffectMaterial(camera, _FirstRender); + + _EffectCommandBuffer.Clear(); + + // No need to clear as Blit will overwrite everything. + _EffectCommandBuffer.GetTemporaryRT(ShaderIDs.s_CameraColorTexture, descriptor); + + var sun = RenderSettings.sun; + if (sun != null) + { + // Unity does not set up lighting for us so we will get the last value which could incorrect. + // SetGlobalColor is just an alias for SetGlobalVector (no color space conversion like Material.SetColor): + // https://docs.unity3d.com/2017.4/Documentation/ScriptReference/Shader.SetGlobalColor.html + _EffectCommandBuffer.SetGlobalVector(ShaderIDs.s_LightColor0, sun.FinalColor()); + _EffectCommandBuffer.SetGlobalVector(ShaderIDs.s_WorldSpaceLightPos0, -sun.transform.forward); + } + + // Create a separate stencil buffer context by copying the depth texture. + if (UseStencilBuffer) + { + descriptor.colorFormat = RenderTextureFormat.Depth; + descriptor.depthBufferBits = (int)k_DepthBits; + // bindMS is necessary in this case for depth. + descriptor.SetMSAASamples(camera); + descriptor.bindMS = descriptor.msaaSamples > 1; + + // No need to clear as Blit will overwrite everything. + _EffectCommandBuffer.GetTemporaryRT(ShaderIDs.s_WaterVolumeStencil, descriptor); + + // Use blit for MSAA. We should be able to use CopyTexture. Might be the following bug: + // https://issuetracker.unity3d.com/product/unity/issues/guid/1308132 + if (Helpers.IsMSAAEnabled(camera)) + { + // Blit with a depth write shader to populate the depth buffer. + Helpers.Blit(_EffectCommandBuffer, _DepthStencilTarget, Helpers.UtilityMaterial, (int)Helpers.UtilityPass.CopyDepth); + } + else + { + // Copy depth then clear stencil. + _EffectCommandBuffer.CopyTexture(BuiltinRenderTextureType.Depth, _DepthStencilTarget); + Helpers.Blit(_EffectCommandBuffer, _DepthStencilTarget, Helpers.UtilityMaterial, (int)Helpers.UtilityPass.ClearStencil); + } + } + + CopyColorTexture(_EffectCommandBuffer); + + _EffectCommandBuffer.SetGlobalTexture(ShaderIDs.s_CameraColorTexture, _ColorCopyTarget); + + ExecuteEffect(camera, _EffectCommandBuffer, _CopyColor); + + _EffectCommandBuffer.ReleaseTemporaryRT(ShaderIDs.s_CameraColorTexture); + if (UseStencilBuffer) + { + _EffectCommandBuffer.ReleaseTemporaryRT(ShaderIDs.s_WaterVolumeStencil); + } + } + + internal void ExecuteEffect(Camera camera, CommandBuffer buffer, System.Action copyColor, MaterialPropertyBlock properties = null) + { + if (camera.cameraType == CameraType.Reflection) + { + buffer.DrawProcedural + ( + Matrix4x4.identity, + _VolumeMaterial, + shaderPass: (int)EffectPass.Reflections, + MeshTopology.Triangles, + vertexCount: 3, + instanceCount: 1, + properties + ); + } +#if d_CrestPortals + else if (_Portals.Active && _Portals.Mode != Portals.PortalMode.Tunnel) + { + _Portals.RenderEffect(camera, buffer, _VolumeMaterial, copyColor, properties); + } +#endif + else + { + buffer.DrawProcedural + ( + Matrix4x4.identity, + _VolumeMaterial, + shaderPass: (int)EffectPass.FullScreen, + MeshTopology.Triangles, + vertexCount: 3, + instanceCount: 1, + properties + ); + } + } + + internal static void UpdateGlobals(Material waterMaterial) + { + // We will have the wrong color values if we do not use linear: + // https://forum.unity.com/threads/fragment-shader-output-colour-has-incorrect-values-when-hardcoded.377657/ + + // _CrestAbsorption is already set as global in Water Renderer. + Shader.SetGlobalColor(WaterRenderer.ShaderIDs.s_Scattering, waterMaterial.GetColor(WaterRenderer.ShaderIDs.s_Scattering).MaybeLinear()); + Shader.SetGlobalFloat(WaterRenderer.ShaderIDs.s_Anisotropy, waterMaterial.GetFloat(WaterRenderer.ShaderIDs.s_Anisotropy)); + } + + internal void UpdateEffectMaterial(Camera camera, bool isFirstRender) + { + // Copy water material parameters to underwater material. + { + var material = _SurfaceMaterial; + + if (_CopyWaterMaterialParametersEachFrame || isFirstRender || material != _CurrentWaterMaterial) + { + _CurrentWaterMaterial = material; + + if (material != null) + { + _VolumeMaterial.CopyMatchingPropertiesFromMaterial(material); + + if (_EnableShaderAPI) + { + UpdateGlobals(material); + } + } + } + } + + // Enabling/disabling keywords each frame don't seem to have large measurable overhead + _VolumeMaterial.SetKeyword(k_KeywordDebugVisualizeMask, _Debug._VisualizeMask); + _VolumeMaterial.SetKeyword(k_KeywordDebugVisualizeStencil, _Debug._VisualizeStencil); + + // We use this for caustics to get the displacement. + _VolumeMaterial.SetInteger(Lod.ShaderIDs.s_LodIndex, 0); + + if (!Portaled && camera.cameraType != CameraType.Reflection) + { + var seaLevel = _Water.SeaLevel; + + // We don't both setting the horizon value if we know we are going to be having to apply the effect + // full-screen anyway. + var forceFullShader = _Water.ViewerHeightAboveWater < -2f; + if (!forceFullShader) + { + var maxWaterVerticalDisplacement = _Water.MaximumVerticalDisplacement * 0.5f; + var cameraYPosition = camera.transform.position.y; + float nearPlaneFrustumWorldHeight; + { + var current = camera.ViewportToWorldPoint(new(0f, 0f, camera.nearClipPlane)).y; + float maxY = current, minY = current; + + current = camera.ViewportToWorldPoint(new(0f, 1f, camera.nearClipPlane)).y; + maxY = Mathf.Max(maxY, current); + minY = Mathf.Min(minY, current); + + current = camera.ViewportToWorldPoint(new(1f, 0f, camera.nearClipPlane)).y; + maxY = Mathf.Max(maxY, current); + minY = Mathf.Min(minY, current); + + current = camera.ViewportToWorldPoint(new(1f, 1f, camera.nearClipPlane)).y; + maxY = Mathf.Max(maxY, current); + minY = Mathf.Min(minY, current); + + nearPlaneFrustumWorldHeight = maxY - minY; + } + + forceFullShader = (cameraYPosition + nearPlaneFrustumWorldHeight + maxWaterVerticalDisplacement) <= seaLevel; + } + + _VolumeMaterial.SetKeyword(k_KeywordFullScreenEffect, forceFullShader); + } + + // Project water normal onto camera plane. + { + var projectedNormal = new Vector2 + ( + Vector3.Dot(Vector3.up, camera.transform.right), + Vector3.Dot(Vector3.up, camera.transform.up) + ); + + _VolumeMaterial.SetVector(ShaderIDs.s_HorizonNormal, projectedNormal); + } + + // Compute ambient lighting SH. + { + // We could pass in a renderer which would prime this lookup. However it doesnt make sense to use an existing render + // at different position, as this would then thrash it and negate the priming functionality. We could create a dummy invis GO + // with a dummy Renderer which might be enough, but this is hacky enough that we'll wait for it to become a problem + // rather than add a pre-emptive hack. + UnityEngine.Profiling.Profiler.BeginSample("Crest: Underwater Sample Spherical Harmonics"); + LightProbes.GetInterpolatedProbe(camera.transform.position, null, out var sphericalHarmonicsL2); + sphericalHarmonicsL2.Evaluate(_SphericalHarmonicsData._DirectionsSH, _SphericalHarmonicsData._AmbientLighting); + Helpers.SetShaderVector(_VolumeMaterial, ShaderIDs.s_AmbientLighting, _SphericalHarmonicsData._AmbientLighting[0], _EnableShaderAPI); + UnityEngine.Profiling.Profiler.EndSample(); + } + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterRenderer.Effect.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterRenderer.Effect.cs.meta new file mode 100644 index 000000000..0ee81306d --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterRenderer.Effect.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 95fe330fa426a41c0b6379a1a2aae608 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterRenderer.EnvironmentalLighting.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterRenderer.EnvironmentalLighting.cs new file mode 100644 index 000000000..69ae078e7 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterRenderer.EnvironmentalLighting.cs @@ -0,0 +1,120 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using UnityEngine.Rendering; + +namespace WaveHarmonic.Crest +{ + partial class UnderwaterRenderer + { + const float k_DepthOutScattering = 0.25f; + + Light _EnvironmentalLight; + float _EnvironmentalLightIntensity; + float _EnvironmentalAmbientIntensity; + float _EnvironmentalReflectionIntensity; + float _EnvironmentalFogDensity; + float _EnvironmentalAverageDensity = 0f; + bool _EnvironmentalInitialized = false; + bool _EnvironmentalNeedsRestoring; + + void EnableEnvironmentalLighting() + { + if (!_EnvironmentalLightingEnable) + { + return; + } + +#if d_UnitySRP + if (_EnvironmentalLightingVolume == null && !RenderPipelineHelper.IsLegacy) + { + // Create volume to weigh in underwater profile + var go = new GameObject(); + go.transform.parent = _Water.Container.transform; + go.hideFlags = HideFlags.HideAndDontSave; + go.name = "Underwater Lighting Volume"; + _EnvironmentalLightingVolume = go.AddComponent(); + _EnvironmentalLightingVolume.weight = 0; + _EnvironmentalLightingVolume.priority = 1000; + _EnvironmentalLightingVolume.profile = _EnvironmentalLightingVolumeProfile; + } +#endif + + _EnvironmentalInitialized = true; + } + + void DisableEnvironmentalLighting() + { + RestoreEnvironmentalLighting(); + + _EnvironmentalInitialized = false; + } + + void RestoreEnvironmentalLighting() + { + if (!_EnvironmentalInitialized || !_EnvironmentalNeedsRestoring) + { + return; + } + + // Restore lighting settings. + if (_EnvironmentalLight != null) _EnvironmentalLight.intensity = _EnvironmentalLightIntensity; + _EnvironmentalLight = null; + RenderSettings.ambientIntensity = _EnvironmentalAmbientIntensity; + RenderSettings.reflectionIntensity = _EnvironmentalReflectionIntensity; + RenderSettings.fogDensity = _EnvironmentalFogDensity; + Shader.SetGlobalFloat(ShaderIDs.s_UnderwaterEnvironmentalLightingWeight, 0f); + if (_EnvironmentalLightingVolume != null) _EnvironmentalLightingVolume.weight = 0; + + _EnvironmentalNeedsRestoring = false; + } + + void UpdateEnvironmentalLighting(Camera camera, Vector3 extinction, float height) + { + if (!_EnvironmentalInitialized) + { + return; + } + + if (!_Water.Material.HasColor(WaterRenderer.ShaderIDs.s_AbsorptionColor)) + { + return; + } + + // Store lighting settings. + { + _EnvironmentalLight = _Water.PrimaryLight; + if (_EnvironmentalLight) _EnvironmentalLightIntensity = _EnvironmentalLight.intensity; + _EnvironmentalAmbientIntensity = RenderSettings.ambientIntensity; + _EnvironmentalReflectionIntensity = RenderSettings.reflectionIntensity; + _EnvironmentalFogDensity = RenderSettings.fogDensity; + } + + var density = extinction; + _EnvironmentalAverageDensity = (density.x + density.y + density.z) / 3f; + + var multiplier = Mathf.Exp(_EnvironmentalAverageDensity * Mathf.Min(height * k_DepthOutScattering, 0f) * _EnvironmentalLightingWeight); + + // Darken environmental lighting when viewer underwater. + if (_EnvironmentalLight != null) + { + _EnvironmentalLight.intensity = Mathf.Lerp(0, _EnvironmentalLightIntensity, multiplier); + } + + RenderSettings.ambientIntensity = Mathf.Lerp(0, _EnvironmentalAmbientIntensity, multiplier); + RenderSettings.reflectionIntensity = Mathf.Lerp(0, _EnvironmentalReflectionIntensity, multiplier); + RenderSettings.fogDensity = Mathf.Lerp(0, _EnvironmentalFogDensity, multiplier); + + Shader.SetGlobalFloat(ShaderIDs.s_UnderwaterEnvironmentalLightingWeight, 1f - multiplier); + +#if d_UnitySRP + if (_EnvironmentalLightingVolume != null) + { + _EnvironmentalLightingVolume.weight = 1f - multiplier; + } +#endif + _EnvironmentalNeedsRestoring = true; + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterRenderer.EnvironmentalLighting.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterRenderer.EnvironmentalLighting.cs.meta new file mode 100644 index 000000000..95b14ba71 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterRenderer.EnvironmentalLighting.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 42735f62770724c7488928b7e8185c9c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterRenderer.Legacy.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterRenderer.Legacy.cs new file mode 100644 index 000000000..ddcd252b2 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterRenderer.Legacy.cs @@ -0,0 +1,101 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using UnityEngine.Rendering; + +namespace WaveHarmonic.Crest +{ + partial class UnderwaterRenderer + { + bool _HasMaskCommandBuffersBeenRegistered; + bool _HasEffectCommandBuffersBeenRegistered; + + void OnEnableLegacy() + { + SetupMask(); + OnEnableMask(); + SetupUnderwaterEffect(); + + // Handle this internally rather than relying on Water Renderer. + Camera.onPreRender -= OnBeforeLegacyRender; + Camera.onPreRender += OnBeforeLegacyRender; + Camera.onPostRender -= OnAfterLegacyRender; + Camera.onPostRender += OnAfterLegacyRender; + RenderPipelineManager.activeRenderPipelineTypeChanged -= OnDisableLegacy; + RenderPipelineManager.activeRenderPipelineTypeChanged += OnDisableLegacy; + } + + void OnDisableLegacy() + { + Camera.onPreRender -= OnBeforeLegacyRender; + Camera.onPostRender -= OnAfterLegacyRender; + RenderPipelineManager.activeRenderPipelineTypeChanged -= OnDisableLegacy; + + OnDisableMask(); + } + + internal void LateUpdate() + { + if (!Active) + { + return; + } + + if (!RenderPipelineHelper.IsLegacy) + { + return; + } + + Helpers.SetGlobalKeyword("CREST_UNDERWATER_BEFORE_TRANSPARENT", _EnableShaderAPI); + } + + void OnBeforeLegacyRender(Camera camera) + { + XRHelpers.Update(camera); + XRHelpers.SetInverseViewProjectionMatrix(camera); + + if (ShouldRender(camera, Pass.Mask)) + { + // It could be either one event. + camera.AddCommandBuffer(CameraEvent.BeforeGBuffer, _MaskCommandBuffer); + camera.AddCommandBuffer(CameraEvent.BeforeDepthTexture, _MaskCommandBuffer); + OnPreRenderMask(camera); + _HasMaskCommandBuffersBeenRegistered = true; + } + + if (ShouldRender(camera, Pass.Effect)) + { + var @event = _EnableShaderAPI ? CameraEvent.BeforeForwardAlpha : CameraEvent.AfterForwardAlpha; + camera.AddCommandBuffer(@event, _EffectCommandBuffer); + OnPreRenderUnderwaterEffect(camera); + _HasEffectCommandBuffersBeenRegistered = true; + } + + _FirstRender = false; + } + + void OnAfterLegacyRender(Camera camera) + { + if (_HasMaskCommandBuffersBeenRegistered) + { + // It could be either one event. + camera.RemoveCommandBuffer(CameraEvent.BeforeGBuffer, _MaskCommandBuffer); + camera.RemoveCommandBuffer(CameraEvent.BeforeDepthTexture, _MaskCommandBuffer); + _MaskCommandBuffer?.Clear(); + } + + if (_HasEffectCommandBuffersBeenRegistered) + { + var @event = _EnableShaderAPI ? CameraEvent.BeforeForwardAlpha : CameraEvent.AfterForwardAlpha; + camera.RemoveCommandBuffer(@event, _EffectCommandBuffer); + _EffectCommandBuffer?.Clear(); + } + + _HasMaskCommandBuffersBeenRegistered = false; + _HasEffectCommandBuffersBeenRegistered = false; + + OnAfterCameraRender(camera); + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterRenderer.Legacy.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterRenderer.Legacy.cs.meta new file mode 100644 index 000000000..ac53e6bf6 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterRenderer.Legacy.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f72cef5b74e7e43c3bfceff42401fa82 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterRenderer.Mask.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterRenderer.Mask.cs new file mode 100644 index 000000000..da197c38f --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterRenderer.Mask.cs @@ -0,0 +1,253 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using UnityEngine.Experimental.Rendering; +using UnityEngine.Rendering; +using WaveHarmonic.Crest.Internal; + +namespace WaveHarmonic.Crest +{ + partial class UnderwaterRenderer + { + // Adapted from: + // Packages/com.unity.render-pipelines.universal/Runtime/UniversalRenderer.cs +#if UNITY_SWITCH || UNITY_ANDROID || UNITY_EMBEDDED_LINUX || UNITY_QNX + internal const GraphicsFormat k_DepthStencilFormat = GraphicsFormat.D24_UNorm_S8_UInt; + internal const int k_DepthBufferBits = 24; + internal const DepthBits k_DepthBits = DepthBits.Depth24; +#else + internal const GraphicsFormat k_DepthStencilFormat = GraphicsFormat.D32_SFloat_S8_UInt; + internal const int k_DepthBufferBits = 32; + internal const DepthBits k_DepthBits = DepthBits.Depth32; +#endif + + internal const int k_ShaderPassWaterSurfaceMask = 0; + internal const int k_ShaderPassWaterSurfaceDepth = 1; + internal const int k_ShaderPassWaterHorizonMask = 2; + + // NOTE: Must match CREST_MASK_BELOW_SURFACE in Constants.hlsl. + const float k_MaskBelowSurface = -1f; + // NOTE: Must match CREST_MASK_BELOW_SURFACE_CULLED in Constants.hlsl. + const float k_MaskBelowSurfaceCull = -2f; + + internal const string k_ComputeShaderKernelFillMaskArtefacts = "FillMaskArtefacts"; + + static partial class ShaderIDs + { + // Local + public static readonly int s_FarPlaneOffset = Shader.PropertyToID("_Crest_FarPlaneOffset"); + public static readonly int s_MaskBelowSurface = Shader.PropertyToID("_Crest_MaskBelowSurface"); + + // Global + public static readonly int s_WaterMaskTexture = Shader.PropertyToID("_Crest_WaterMaskTexture"); + public static readonly int s_WaterMaskDepthTexture = Shader.PropertyToID("_Crest_WaterMaskDepthTexture"); + + public static readonly int s_StencilRef = Shader.PropertyToID("_StencilRef"); + } + + internal Material _MaskMaterial; + + internal RenderTargetIdentifier _MaskTarget; + internal RenderTargetIdentifier _DepthTarget; + + internal readonly Plane[] _CameraFrustumPlanes = new Plane[6]; + CommandBuffer _MaskCommandBuffer; + + internal RenderTexture _MaskRT; + RenderTexture _DepthRT; + + ComputeShader _ArtifactsShader; + bool _ArtifactsShaderInitialized; + int _ArtifactsKernel; + uint _ArtifactsThreadGroupSizeX; + uint _ArtifactsThreadGroupSizeY; + + void SetupMask() + { + _MaskCommandBuffer ??= new() + { + name = "Crest: Underwater Mask", + }; + } + + internal void OnEnableMask() + { + // Create a reference to handle the RT. The RT properties will be replaced with a descriptor before the + // native object is created, and since it is lazy it is near zero cost. + Helpers.CreateRenderTargetTextureReference(ref _MaskRT, ref _MaskTarget); + _MaskRT.name = "_Crest_WaterMaskTexture"; + Helpers.CreateRenderTargetTextureReference(ref _DepthRT, ref _DepthTarget); + _DepthRT.name = "_Crest_WaterMaskDepthTexture"; + + SetUpArtifactsShader(); + } + + internal void OnDisableMask() + { + if (_MaskRT != null) _MaskRT.Release(); + if (_DepthRT != null) _DepthRT.Release(); + } + + internal void SetUpArtifactsShader() + { + if (_ArtifactsShaderInitialized) + { + return; + } + + _ArtifactsKernel = _ArtifactsShader.FindKernel(k_ComputeShaderKernelFillMaskArtefacts); + _ArtifactsShader.GetKernelThreadGroupSizes + ( + _ArtifactsKernel, + out _ArtifactsThreadGroupSizeX, + out _ArtifactsThreadGroupSizeY, + out _ + ); + + _ArtifactsShaderInitialized = true; + } + + internal void SetUpMaskTextures(RenderTextureDescriptor descriptor) + { + if (!Helpers.RenderTargetTextureNeedsUpdating(_MaskRT, descriptor)) + { + return; + } + + // This will disable MSAA for our textures as MSAA will break sampling later on. This looks safe to do as + // Unity's CopyDepthPass does the same, but a possible better way or supporting MSAA is worth looking into. + descriptor.msaaSamples = 1; + + // @Memory: We could investigate making this an 8-bit texture instead to reduce GPU memory usage. + // @Memory: We could potentially try a half resolution mask as the mensicus could mask resolution issues. + // Intel iGPU for Metal and DirectX both had issues with R16. 2021.11.18 + descriptor.colorFormat = Helpers.IsIntelGPU() ? RenderTextureFormat.RFloat : RenderTextureFormat.RHalf; + descriptor.depthBufferBits = 0; + descriptor.enableRandomWrite = true; + + _MaskRT.Release(); + _MaskRT.descriptor = descriptor; + + descriptor.colorFormat = RenderTextureFormat.Depth; + descriptor.depthBufferBits = (int)k_DepthBits; + descriptor.enableRandomWrite = false; + + _DepthRT.Release(); + _DepthRT.descriptor = descriptor; + } + + void OnPreRenderMask(Camera camera) + { + _MaskCommandBuffer.Clear(); + + var descriptor = XRHelpers.GetRenderTextureDescriptor(camera); + + descriptor.useDynamicScale = camera.allowDynamicResolution; + + // Keywords and other things. + SetUpMaskTextures(descriptor); + +#if d_CrestPortals + // Populate water volume before mask so we can use the stencil. + if (_Portals.Active) + { + _Portals.ReAllocate(descriptor); + _Portals.RenderMask(camera, _MaskCommandBuffer, _MaskMaterial); + _Portals.RenderStencil(_MaskCommandBuffer, _DepthRT, _DepthTarget); + } +#endif + + _MaskCommandBuffer.SetRenderTarget(_MaskTarget, _DepthTarget); + SetUpMask(_MaskCommandBuffer, _MaskTarget, _DepthTarget); + PopulateMask(_MaskCommandBuffer, camera); + + FixMaskArtefacts(_MaskCommandBuffer, descriptor, _MaskTarget); + } + + internal void SetUpMask(CommandBuffer buffer, RenderTargetIdentifier maskTarget, RenderTargetIdentifier depthTarget) + { + // When using the stencil we are already clearing depth and do not want to clear the stencil too. Clear + // color only when using the stencil as the horizon effectively clears it when not using it. + buffer.ClearRenderTarget(!UseStencilBuffer, UseStencilBuffer, Color.black); + buffer.SetGlobalTexture(ShaderIDs.s_WaterMaskTexture, maskTarget); + buffer.SetGlobalTexture(ShaderIDs.s_WaterMaskDepthTexture, depthTarget); + } + + internal void FixMaskArtefacts(CommandBuffer buffer, RenderTextureDescriptor descriptor, RenderTargetIdentifier target) + { + if (_Debug._DisableArtifactCorrection) + { + return; + } + + buffer.SetComputeTextureParam(_ArtifactsShader, _ArtifactsKernel, ShaderIDs.s_WaterMaskTexture, target); + // XR SPI will have a volume depth of two. If using RTHandles, then set manually as will be two for all cameras. + _ArtifactsShader.SetKeyword("STEREO_INSTANCING_ON", descriptor.dimension == TextureDimension.Tex2DArray); + + buffer.DispatchCompute + ( + _ArtifactsShader, + _ArtifactsKernel, + // Viewport sizes are not perfect so round up to cover. + Mathf.CeilToInt((float)descriptor.width / _ArtifactsThreadGroupSizeX), + Mathf.CeilToInt((float)descriptor.height / _ArtifactsThreadGroupSizeY), + descriptor.volumeDepth + ); + } + + // Populates a screen space mask which will inform the underwater postprocess. As a future optimisation we may + // be able to avoid this pass completely if we can reuse the camera depth after transparents are rendered. + internal void PopulateMask(CommandBuffer commandBuffer, Camera camera) + { + // Render horizon into mask using a fullscreen triangle at the far plane. Horizon must be rendered first or + // it will overwrite the mask with incorrect values. + { + var zBufferParameters = Helpers.GetZBufferParameters(camera); + // Take 0-1 linear depth and convert non-linear depth. + _MaskMaterial.SetFloat(ShaderIDs.s_FarPlaneOffset, Helpers.LinearDepthToNonLinear(_FarPlaneMultiplier, zBufferParameters)); + + // Render fullscreen triangle with horizon mask pass. + commandBuffer.DrawProcedural(Matrix4x4.identity, _MaskMaterial, shaderPass: k_ShaderPassWaterHorizonMask, MeshTopology.Triangles, 3, 1); + } + + GeometryUtility.CalculateFrustumPlanes(camera, _CameraFrustumPlanes); + + // Get all water chunks and render them using cmd buffer, but with mask shader. + if (!_Debug._DisableMask) + { + // Spends approx 0.2-0.3ms here on 2018 Dell XPS 15. + foreach (var chunk in _Water.Chunks) + { + var renderer = chunk.Rend; + // Can happen in edit mode. + if (renderer == null) continue; + var bounds = renderer.bounds; + if (GeometryUtility.TestPlanesAABB(_CameraFrustumPlanes, bounds)) + { + if ((!chunk._WaterDataHasBeenBound) && chunk.enabled) + { + chunk.Bind(camera); + } + + // Handle culled tiles for when underwater is rendered before the transparent pass. + chunk._MaterialPropertyBlock.SetFloat(ShaderIDs.s_MaskBelowSurface, !_EnableShaderAPI || renderer.enabled ? k_MaskBelowSurface : k_MaskBelowSurfaceCull); + renderer.SetPropertyBlock(chunk._MaterialPropertyBlock); + + commandBuffer.DrawRenderer(renderer, _MaskMaterial, submeshIndex: 0, shaderPass: k_ShaderPassWaterSurfaceMask); + + chunk._Visible = true; + } + chunk._WaterDataHasBeenBound = false; + } + +#if d_CrestPortals + if (_Portals.Active) + { + _Portals.PopulateMask(commandBuffer, _MaskMaterial); + } +#endif // d_CrestPortals + } + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterRenderer.Mask.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterRenderer.Mask.cs.meta new file mode 100644 index 000000000..df045a60c --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterRenderer.Mask.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f64799bb3430e498a926913b81241f06 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterRenderer.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterRenderer.cs new file mode 100644 index 000000000..6e6996e85 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterRenderer.cs @@ -0,0 +1,475 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using UnityEngine.Rendering; +using WaveHarmonic.Crest.Internal; + +namespace WaveHarmonic.Crest +{ + /// + /// Renders the underwater effect. + /// + [System.Serializable] + public sealed partial class UnderwaterRenderer + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + + internal const float k_CullLimitMinimum = 0.000001f; + internal const float k_CullLimitMaximum = 0.01f; + + [@Space(10)] + + [Tooltip("Whether the underwater effect is enabled.\n\nAllocates/releases resources if state has changed.")] + [@GenerateAPI(Setter.Custom)] + [@DecoratedField, SerializeField] + internal bool _Enabled = true; + + [Tooltip("Any camera or probe with this layer in its culling mask will render underwater.")] + [@Layer] + [@GenerateAPI] + [SerializeField] + int _Layer = 4; // Water + + [Tooltip("The underwater material. The water surface material is copied into this material.")] + [@AttachMaterialEditor] + [@MaterialField("Crest/Underwater", name: "Underwater", title: "Create Underwater Material")] + [@GenerateAPI] + [SerializeField] + internal Material _Material; + + + [@Heading("Environmental Lighting")] + + [@Label("Enable")] + [Tooltip("Provides out-scattering based on the camera's underwater depth.\n\nIt scales down environmental lighting (sun, reflections, ambient etc) with the underwater depth. This works with vanilla lighting, but uncommon or custom lighting will require a custom solution (use this for reference)")] + [@GenerateAPI(Setter.Custom, name: "AffectsEnvironmentalLighting")] + [@DecoratedField, SerializeField] + internal bool _EnvironmentalLightingEnable; + + [@Label("Weight")] + [Tooltip("How much this effect applies.\n\nValues less than 1 attenuate light less underwater. Value of 1 is physically based.")] + [@Range(0, 3)] + [@GenerateAPI] + [SerializeField] + internal float _EnvironmentalLightingWeight = 1f; + +#if d_UnitySRP + [@Label("Volume")] + [Tooltip("This profile will be weighed in the deeper underwater the camera goes.")] + [@Predicated(RenderPipeline.HighDefinition, hide: true)] + [@DecoratedField, SerializeField] + VolumeProfile _EnvironmentalLightingVolumeProfile = null; + + Volume _EnvironmentalLightingVolume; +#endif + + + [@Heading("Shader API")] + + [Tooltip("Renders the underwater effect before the transparent pass (instead of after).\n\nSo one can apply the underwater fog themselves to transparent objects. Cannot be changed at runtime.")] + [@DecoratedField, SerializeField] + [HideInInspector] + bool _EnableShaderAPI = false; + internal bool EnableShaderAPI { get => _EnableShaderAPI; set => _EnableShaderAPI = value; } + + [@Predicated(nameof(_EnableShaderAPI))] + [@Predicated(RenderPipeline.Legacy, inverted: true, hide: true)] + [@DecoratedField, SerializeField] + [HideInInspector] + internal LayerMask _TransparentObjectLayers; + + + [@Heading("Advanced")] + + [Tooltip("Whether to execute for all cameras.\n\nIf disabled, then additionally ignore any camera that is not the view camera or our reflection camera. It will require managing culling masks of all cameras.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + bool _AllCameras; + + [Tooltip("Copying parameters each frame ensures underwater appearance stays consistent with the water surface.\n\nHas a small overhead so should be disabled if not needed.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + bool _CopyWaterMaterialParametersEachFrame = true; + + [Tooltip("Adjusts the far plane for horizon line calculation. Helps with horizon line issue.")] + [@Range(0f, 1f)] + [@GenerateAPI] + [SerializeField] + float _FarPlaneMultiplier = 0.68f; + + [Tooltip("Proportion of visibility below which the water surface will be culled when underwater.\n\nThe larger the number, the closer to the camera the water tiles will be culled.")] + [@Range(k_CullLimitMinimum, k_CullLimitMaximum)] + [@GenerateAPI] + [SerializeField] + internal float _CullLimit = 0.001f; + + [@Space(10)] + + [@DecoratedField, SerializeField] + DebugFields _Debug = new(); + + [System.Serializable] + sealed class DebugFields + { + [SerializeField] + internal bool _VisualizeMask; + + [SerializeField] + internal bool _DisableMask; + + [SerializeField] + internal bool _VisualizeStencil; + + [SerializeField] + internal bool _DisableHeightAboveWaterOptimization; + + [SerializeField] + internal bool _DisableArtifactCorrection; + + [SerializeField] + internal bool _OnlyReflectionCameras; + } + + internal WaterRenderer _Water; + +#if d_CrestPortals + // BUG: NonSerialized as Unity shows a serialization depth warning even though field is internal. + [System.NonSerialized] + internal Portals.PortalRenderer _Portals; + bool Portaled => _Portals.Active; +#else + bool Portaled => false; +#endif + + bool _FirstRender = true; + + internal bool UseStencilBuffer { get; set; } + + internal enum Pass + { + Culling, + Mask, + Effect, + } + + // These are the materials we actually use, overridable by Water Body. + Material _SurfaceMaterial; + Material _VolumeMaterial; + + readonly SampleCollisionHelper _SamplingHeightHelper = new(); + float _ViewerWaterHeight; + + internal static partial class ShaderIDs + { + // Empty. + } + + // Disable underwater effect if height enough above surface. + internal bool Active => _Enabled && _Material != null && _ViewerWaterHeight < 2f || Portaled || _Debug._DisableHeightAboveWaterOptimization; + + internal void OnEnable() + { + _VolumeMaterial = _Material; + + if (_MaskMaterial == null) + { + _MaskMaterial = new(WaterResources.Instance.Shaders._UnderwaterMask); + } + + if (_ArtifactsShader == null) + { + _ArtifactsShader = WaterResources.Instance.Compute._UnderwaterArtifacts; + } + + if (RenderPipelineHelper.IsUniversal) + { +#if d_UnityURP + UnderwaterMaskPassURP.Enable(this); + UnderwaterEffectPassURP.Enable(this); +#endif + } + else if (RenderPipelineHelper.IsHighDefinition) + { +#if d_UnityHDRP + UnderwaterMaskPassHDRP.Enable(this); + UnderwaterEffectPassHDRP.Enable(this); +#endif + } + else + { + OnEnableLegacy(); + } + + EnableEnvironmentalLighting(); + + RenderPipelineManager.activeRenderPipelineTypeChanged -= OnActiveRenderPipelineTypeChanged; + RenderPipelineManager.activeRenderPipelineTypeChanged += OnActiveRenderPipelineTypeChanged; + } + + void OnActiveRenderPipelineTypeChanged() + { + // Disable is handled by another handler so we need to run enabled. + if (_Water.isActiveAndEnabled) + { + OnEnable(); + } + } + + internal void OnDisable() + { + RenderPipelineManager.activeRenderPipelineTypeChanged -= OnActiveRenderPipelineTypeChanged; + +#if d_UnityURP + UnderwaterMaskPassURP.Disable(); + UnderwaterEffectPassURP.Disable(); +#endif + +#if d_UnityHDRP + UnderwaterMaskPassHDRP.Disable(); + UnderwaterEffectPassHDRP.Disable(); +#endif + + OnDisableLegacy(); + + DisableEnvironmentalLighting(); + + _ArtifactsShader = null; + } + + internal void OnDestroy() + { + Helpers.Destroy(_MaskMaterial); + } + + internal bool ShouldRender(Camera camera, Pass pass) + { + if (_Water == null) + { + return false; + } + + if (!Helpers.MaskIncludesLayer(camera.cullingMask, _Layer)) + { + return false; + } + +#if UNITY_EDITOR + // Do not execute when editor is not active to conserve power and prevent possible leaks. + if (!UnityEditorInternal.InternalEditorUtility.isApplicationActive) + { + return false; + } + + if (GL.wireframe) + { + return false; + } + + // Skip camera if fog is disabled. Do not skip if mask pass and a portal or volume as we want it to still + // mask the water surface. + if ((pass != Pass.Mask || !Portaled) && !IsFogEnabledForEditorCamera(camera)) + { + return false; + } + + if (_Water.IsProxyPlaneRendering) + { + return false; + } + + if (camera.cameraType == CameraType.Preview) + { + return false; + } +#endif + + var isReflectionCamera = camera.cameraType == CameraType.Reflection; + + // Mask or culling is not needed for reflections. + if (isReflectionCamera && pass != Pass.Effect) + { + return false; + } + + if (_Debug._OnlyReflectionCameras && !isReflectionCamera) + { + return false; + } + + // Option to exclude cameras that is not the view camera or our reflection camera. + // Otherwise, filtering depends on the camera's culling mask which is not always + // accessible like with the global "Reflection Probes Camera". But whether those + // cameras triggering camera events is a bug is TBD as it is intermittent. + if (!_AllCameras && camera != _Water.Viewer && camera.cameraType != CameraType.SceneView && camera != WaterReflections.CurrentCamera) + { + return false; + } + + if (pass != Pass.Culling && !Active) + { + return false; + } + + return true; + } + + void RevertCulling() + { + foreach (var tile in _Water.Chunks) + { + if (tile.Rend == null || tile._Culled) + { + continue; + } + + tile.Rend.enabled = true; + } + } + + internal void OnBeforeCameraRender(Camera camera) + { + if (!ShouldRender(camera, Pass.Culling)) + { + return; + } + + var viewpoint = camera.transform.position; + _SamplingHeightHelper.SampleHeight(System.HashCode.Combine(GetHashCode(), camera.GetHashCode()), viewpoint, out var height, allowMultipleCallsPerFrame: true); + _ViewerWaterHeight = viewpoint.y - height; + + // ShouldRender has a special case for this pass which skips the Active check so we + // can always continue sampling. + if (!Active) + { + return; + } + + _SurfaceMaterial = _Water.AboveOrBelowSurfaceMaterial; + _VolumeMaterial = _Material; + + // Grab material from a water body if camera is within its XZ bounds. + foreach (var body in WaterBody.WaterBodies) + { + if (body.AboveOrBelowSurfaceMaterial == null && body._VolumeMaterial == null) + { + continue; + } + + var bounds = body.AABB; + var contained = + viewpoint.x >= bounds.min.x && viewpoint.x <= bounds.max.x && + viewpoint.z >= bounds.min.z && viewpoint.z <= bounds.max.z; + + if (contained) + { + if (body.AboveOrBelowSurfaceMaterial != null) _SurfaceMaterial = body.AboveOrBelowSurfaceMaterial; + if (body.VolumeMaterial != null) _VolumeMaterial = body.VolumeMaterial; + // Water bodies should not overlap so grab the first one. + break; + } + } + + var extinction = Vector3.zero; + float minimumFogDensity = 0; + + // Calculate extinction. + if (_SurfaceMaterial != null) + { + var densityFactor = _VolumeMaterial.GetFloat(ShaderIDs.s_ExtinctionMultiplier); + + // Get absorption from current material. + if (_SurfaceMaterial.HasVector(WaterRenderer.ShaderIDs.s_Absorption)) + { + extinction = _SurfaceMaterial.GetVector(WaterRenderer.ShaderIDs.s_Absorption); + Shader.SetGlobalVector(WaterRenderer.ShaderIDs.s_Absorption, extinction); + } + + // Do not use for culling because: + // - Scattering is not uniform due to anisotropy + // - Also need to take sun light into account + if (_SurfaceMaterial.HasProperty(WaterRenderer.ShaderIDs.s_Scattering)) + { + var volumeExtinction = extinction + _SurfaceMaterial.GetVector(WaterRenderer.ShaderIDs.s_Scattering).XYZ(); + volumeExtinction *= densityFactor; + minimumFogDensity = Mathf.Min(Mathf.Min(volumeExtinction.x, volumeExtinction.y), volumeExtinction.z); + Shader.SetGlobalFloat(WaterRenderer.ShaderIDs.s_VolumeExtinctionLength, -Mathf.Log(k_CullLimitMinimum) / minimumFogDensity); + } + + extinction *= densityFactor; + minimumFogDensity = Mathf.Min(Mathf.Min(extinction.x, extinction.y), extinction.z); + // Prevent divide by zero. + minimumFogDensity = Mathf.Max(minimumFogDensity, 0.0001f); + } + + UpdateEnvironmentalLighting(camera, extinction, _ViewerWaterHeight); + + if (Portaled || _ViewerWaterHeight > -5f) + { + RevertCulling(); + return; + } + + var extinctionLength = -Mathf.Log(_CullLimit) / minimumFogDensity; + + foreach (var tile in _Water.Chunks) + { + if (tile.Rend == null || tile._Culled) + { + continue; + } + + // Cull tiles the viewer cannot see through the underwater fog. + // Only run optimisation in play mode due to shared height above water. + if ((viewpoint - tile.Rend.bounds.ClosestPoint(viewpoint)).magnitude >= extinctionLength) + { + tile.Rend.enabled = false; + } + else + { + // Previous camera might have culled in underwater pass. + tile.Rend.enabled = true; + } + } + } + + internal void OnAfterCameraRender(Camera camera) + { + RestoreEnvironmentalLighting(); + RevertCulling(); + } + + void SetEnabled(bool previous, bool current) + { + if (previous == current) return; + if (_Water == null || !_Water.isActiveAndEnabled) return; + if (_Enabled) OnEnable(); else OnDisable(); + } + + void SetAffectsEnvironmentalLighting(bool previous, bool current) + { + if (previous == current) return; + if (_Water == null || !_Water.isActiveAndEnabled || !_Enabled) return; + if (_EnvironmentalLightingEnable) EnableEnvironmentalLighting(); else DisableEnvironmentalLighting(); + } + +#if UNITY_EDITOR + [@OnChange] + void OnChange(string propertyPath, object previousValue) + { + switch (propertyPath) + { + case nameof(_Enabled): + SetEnabled((bool)previousValue, _Enabled); + break; + case nameof(_EnvironmentalLightingEnable): + SetAffectsEnvironmentalLighting((bool)previousValue, _EnvironmentalLightingEnable); + break; + } + } +#endif + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterRenderer.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterRenderer.cs.meta new file mode 100644 index 000000000..297209cc2 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Volume/UnderwaterRenderer.cs.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: f2a407448acc440bab3414c17e06e7ba +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: + - _VolumeGeometry: {instanceID: 0} + - _EffectMaterial: {instanceID: 0} + - _MaskMaterial: {instanceID: 0} + - _VolumeMaterial: {instanceID: 0} + - _ArtifactsShader: {fileID: 7200000, guid: 08549c36146ad4899a07193754b21ea2, type: 3} + executionOrder: 201 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/WaterRenderer.Editor.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/WaterRenderer.Editor.cs new file mode 100644 index 000000000..4c09e47b9 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/WaterRenderer.Editor.cs @@ -0,0 +1,135 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#if UNITY_EDITOR + +using UnityEditor; +using UnityEngine; + +namespace WaveHarmonic.Crest +{ + [@ExecuteDuringEditMode(ExecuteDuringEditMode.Include.None, ExecuteDuringEditMode.Options.Singleton)] + [SelectionBase] + [AddComponentMenu(Constants.k_MenuPrefixScripts + "Water Renderer")] + [@HelpURL("About/Introduction.html")] + sealed partial class WaterRenderer + { + internal const string k_ProxyShader = "Hidden/Crest/Editor/WaterProxy"; + internal GameObject _ProxyPlane; + internal bool IsProxyPlaneRendering => !Application.isPlaying && _ShowWaterProxyPlane; + + internal static float LastUpdateEditorTime { get; set; } = -1f; + static int s_EditorFrames = 0; + + // Useful for rate limiting processes called outside of RunUpdate like camera events. + static int s_EditorFramesSinceUpdate = 0; + static int EditorFramesSinceUpdate => Application.isPlaying ? 0 : s_EditorFramesSinceUpdate; + internal static bool IsWithinEditorUpdate => EditorFramesSinceUpdate == 0; + + internal bool IsSceneViewActive { get; set; } + + int _LastFrameSceneCamera; + + private protected override void Reset() + { + _Underwater._Material = AssetDatabase.LoadAssetAtPath("Packages/com.waveharmonic.crest/Runtime/Materials/Water Volume.mat"); + + base.Reset(); + } + + // Tracks the scene view rendering to determine if a scene camera is active. + void UpdateLastActiveSceneCamera(Camera camera) + { + if (camera.cameraType == CameraType.SceneView) + { + IsSceneViewActive = true; + _LastFrameSceneCamera = Time.frameCount; + } + + if (_LastFrameSceneCamera < Time.frameCount - 1) + { + IsSceneViewActive = false; + } + } + + static void EditorUpdate() + { + // Do not execute when editor is not active to conserve power and prevent possible leaks. + if (!UnityEditorInternal.InternalEditorUtility.isApplicationActive) + { + return; + } + + s_EditorFramesSinceUpdate++; + + if (Instance == null) return; + + if (!Application.isPlaying) + { + if (EditorApplication.timeSinceStartup - LastUpdateEditorTime > 1f / Mathf.Clamp(Instance._EditModeFrameRate, 0.01f, 60f)) + { + s_EditorFrames++; + s_EditorFramesSinceUpdate = 0; + + LastUpdateEditorTime = (float)EditorApplication.timeSinceStartup; + + Instance.RunUpdate(); + } + } + } + + [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)] + static void OnDomainReload() + { + s_EditorFramesSinceUpdate = 0; + AfterRuntimeLoad(); + } + + [UnityEditor.Callbacks.DidReloadScripts] + static void OnReLoadScripts() + { + AfterScriptReload(); + } + } + + partial class WaterRenderer + { + /// + private protected override void OnValidate() + { + base.OnValidate(); + + // Must be at least 0.25, and must be on a power of 2 + _ScaleRange.x = Mathf.Pow(2f, Mathf.Round(Mathf.Log(Mathf.Max(_ScaleRange.x, 0.25f), 2f))); + + if (_ScaleRange.y < Mathf.Infinity) + { + // otherwise must be at least 0.25, and must be on a power of 2 + _ScaleRange.y = Mathf.Pow(2f, Mathf.Round(Mathf.Log(Mathf.Max(_ScaleRange.y, _ScaleRange.x), 2f))); + } + + // Gravity 0 makes waves freeze which is weird but doesn't seem to break anything so allowing this for now + _GravityMultiplier = Mathf.Max(_GravityMultiplier, 0f); + + // LOD data resolution multiple of 2 for general GPU texture reasons (like pixel quads) + _Resolution -= _Resolution % 2; + + _GeometryDownSampleFactor = Mathf.ClosestPowerOfTwo(Mathf.Max(_GeometryDownSampleFactor, 1)); + + var remGeo = _Resolution % _GeometryDownSampleFactor; + if (remGeo > 0) + { + var newLDR = _Resolution - (_Resolution % _GeometryDownSampleFactor); + Debug.LogWarning + ( + $"Crest: Adjusted Lod Data Resolution from {_Resolution} to {newLDR} to ensure the Geometry Down Sample Factor is a factor ({_GeometryDownSampleFactor}).", + this + ); + + _Resolution = newLDR; + } + } + } +} + +#endif diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/WaterRenderer.Editor.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/WaterRenderer.Editor.cs.meta new file mode 100644 index 000000000..12b76ca53 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/WaterRenderer.Editor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f361a0bff37be4412a136b8a846304c9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/WaterRenderer.Legacy.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/WaterRenderer.Legacy.cs new file mode 100644 index 000000000..e457711c4 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/WaterRenderer.Legacy.cs @@ -0,0 +1,175 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using UnityEngine.Rendering; +using UnityEngine.Experimental.Rendering; + +namespace WaveHarmonic.Crest +{ + // Built-in Render Pipeline + partial class WaterRenderer + { + partial class ShaderIDs + { + public static readonly int s_CameraOpaqueTexture = Shader.PropertyToID("_CameraOpaqueTexture"); + public static readonly int s_ShadowMapTexture = Shader.PropertyToID("_ShadowMapTexture"); + public static readonly int s_ScreenSpaceShadowTexture = Shader.PropertyToID("_Crest_ScreenSpaceShadowTexture"); + } + + CommandBuffer _CopyColorTextureBuffer; + RenderTexture _CameraColorTexture; + + CommandBuffer _ScreenSpaceShadowMapBuffer; + CommandBuffer _DeferredShadowMapBuffer; + + internal DefaultFormat LikelyFrameBufferFormat + { + get + { + if (_OverrideRenderHDR) + { + return _RenderHDR ? DefaultFormat.HDR : DefaultFormat.LDR; + } + +#if UNITY_EDITOR + var target = UnityEditor.EditorUserBuildSettings.activeBuildTarget; + if (target is UnityEditor.BuildTarget.Android or UnityEditor.BuildTarget.iOS or UnityEditor.BuildTarget.tvOS) + { + return DefaultFormat.LDR; + } +#endif + +#if UNITY_ANDROID || UNITY_IOS || UNITY_TVOS + return DefaultFormat.LDR; +#else + return DefaultFormat.HDR; +#endif + } + } + + void OnPreRenderCamera(Camera camera) + { +#if UNITY_EDITOR + UpdateLastActiveSceneCamera(camera); + + if (!Application.isPlaying) + { + OnPreRenderWaterLevelDepthTexture(camera); + } +#endif + + OnBeginCameraRendering(camera); + + if (!Helpers.MaskIncludesLayer(camera.cullingMask, Layer)) + { + return; + } + + XRHelpers.Update(camera); + XRHelpers.SetInverseViewProjectionMatrix(camera); + + _CopyColorTextureBuffer ??= new() { name = "Crest Copy Color Texture" }; + _DeferredShadowMapBuffer ??= new() { name = "Crest Deferred Shadow Data" }; + _ScreenSpaceShadowMapBuffer ??= new() { name = "Crest Screen-Space Shadow Data" }; + _CopyColorTextureBuffer.Clear(); + _DeferredShadowMapBuffer.Clear(); + _ScreenSpaceShadowMapBuffer.Clear(); + + // Create or update RT. + { + var descriptor = XRHelpers.GetRenderTextureDescriptor(camera); + + // Format must be correct for CopyTexture to work. Hopefully this is good enough. + if (camera.allowHDR && QualitySettings.activeColorSpace == ColorSpace.Linear) + { + descriptor.graphicsFormat = SystemInfo.GetGraphicsFormat(LikelyFrameBufferFormat); + } + + // Occurred in a build and caused a black screen. + if (descriptor.width <= 0) + { + return; + } + + if (_CameraColorTexture == null) + { + _CameraColorTexture = new(descriptor); + } + else + { + _CameraColorTexture.Release(); + _CameraColorTexture.descriptor = descriptor; + } + + _CameraColorTexture.Create(); + } + + var target = new RenderTargetIdentifier(_CameraColorTexture, 0, CubemapFace.Unknown, -1); + + // Use blit instead of CopyTexture as it will smooth out issues with format + // differences which is very hard to get right for BIRP. + _CopyColorTextureBuffer.Blit(BuiltinRenderTextureType.CameraTarget, target); + _CopyColorTextureBuffer.SetGlobalTexture(ShaderIDs.s_CameraOpaqueTexture, _CameraColorTexture); + + camera.AddCommandBuffer(CameraEvent.BeforeForwardAlpha, _CopyColorTextureBuffer); + + if (QualitySettings.shadows != ShadowQuality.Disable && PrimaryLight != null) + { + // Make the screen-space shadow texture available for the water shader for caustic occlusion. + _ScreenSpaceShadowMapBuffer.SetGlobalTexture(ShaderIDs.s_ScreenSpaceShadowTexture, BuiltinRenderTextureType.CurrentActive); + PrimaryLight.AddCommandBuffer(LightEvent.AfterScreenspaceMask, _ScreenSpaceShadowMapBuffer); + // Call this regardless of rendering path as it has no negative consequences for forward. + _DeferredShadowMapBuffer.SetGlobalTexture(ShaderIDs.s_ShadowMapTexture, BuiltinRenderTextureType.CurrentActive); + PrimaryLight.AddCommandBuffer(LightEvent.AfterShadowMap, _DeferredShadowMapBuffer); + } + + { + // Always set these in case shadow maps are disabled in the graphics settings which + // we cannot check at runtime. + // Black for shadowed. White for unshadowed. + if (camera.stereoEnabled && XRHelpers.IsSinglePass) + { + Shader.SetGlobalTexture(ShaderIDs.s_ScreenSpaceShadowTexture, XRHelpers.WhiteTexture); + } + else + { + Shader.SetGlobalTexture(ShaderIDs.s_ScreenSpaceShadowTexture, Texture2D.whiteTexture); + } + } + } + + void OnPostRenderCamera(Camera camera) + { +#if UNITY_EDITOR + if (!Application.isPlaying) + { + OnPostRenderWaterLevelDepthTexture(camera); + } +#endif + + if (!Helpers.MaskIncludesLayer(camera.cullingMask, Layer)) + { + return; + } + + if (_CopyColorTextureBuffer != null) + { + camera.RemoveCommandBuffer(CameraEvent.BeforeForwardAlpha, _CopyColorTextureBuffer); + } + + if (QualitySettings.shadows != ShadowQuality.Disable && PrimaryLight != null) + { + if (_ScreenSpaceShadowMapBuffer != null) + { + PrimaryLight.RemoveCommandBuffer(LightEvent.AfterScreenspaceMask, _ScreenSpaceShadowMapBuffer); + } + + if (_DeferredShadowMapBuffer != null) + { + PrimaryLight.RemoveCommandBuffer(LightEvent.AfterShadowMap, _DeferredShadowMapBuffer); + } + } + } + } +} diff --git a/Assets/Obi/Scripts/Common/Rendering/DataBatches/MeshDataBatch.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/WaterRenderer.Legacy.cs.meta similarity index 100% rename from Assets/Obi/Scripts/Common/Rendering/DataBatches/MeshDataBatch.cs.meta rename to Packages/com.waveharmonic.crest/Runtime/Scripts/WaterRenderer.Legacy.cs.meta index a116f658a..831169300 100644 --- a/Assets/Obi/Scripts/Common/Rendering/DataBatches/MeshDataBatch.cs.meta +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/WaterRenderer.Legacy.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 51631a4146e8e4501adcbe8ff6f039c9 +guid: 7fc11f7d8705f46bcbce1e516a7686ac MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/WaterRenderer.SerializedFields.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/WaterRenderer.SerializedFields.cs new file mode 100644 index 000000000..b8c983533 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/WaterRenderer.SerializedFields.cs @@ -0,0 +1,431 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; + +namespace WaveHarmonic.Crest +{ +#if !d_CrestPortals + namespace Portals + { + // Dummy script to keep serializer from complaining. + [System.Serializable] + public sealed class PortalRenderer { } + } +#endif + + partial class WaterRenderer + { + internal const float k_MaximumWindSpeedKPH = 150f; + + [@Space(1, isAlwaysVisible: true)] + + [@Group("General", Group.Style.Accordian)] + + [Tooltip("The camera which drives the water data.\n\nSetting this is optional. Defaults to the main camera.")] + [@GenerateAPI(Getter.Custom, name: "Viewer")] + [@DecoratedField, SerializeField] + Camera _Camera; + + [Tooltip("Optional provider for time.\n\nCan be used to hard-code time for automation, or provide server time. Defaults to local Unity time.")] + [@DecoratedField, SerializeField] + internal TimeProvider _TimeProvider; + + [Tooltip("Whether to override the automatic detection of framebuffer HDR rendering (BIRP only).\n\nRendering using HDR formats is optional, but there is no way for us to determine if HDR rendering is enabled in the Graphics Settings. We make an educated based on which platform is the target. If you see rendering issues, try disabling this.\n\n This has nothing to do with having an HDR monitor.")] + [@Predicated(RenderPipeline.Legacy, hide: true)] + [@GenerateAPI] + [@DecoratedField, SerializeField] + bool _OverrideRenderHDR; + + [Tooltip("Force HDR format usage (BIRP only).\n\nIf enabled, we assume the framebuffer is an HDR format, otherwise an LDR format.")] + [@Predicated(RenderPipeline.Legacy, hide: true)] + [@Predicated(nameof(_OverrideRenderHDR))] + [@GenerateAPI] + [@DecoratedField, SerializeField] + bool _RenderHDR = true; + + + [@Group("Environment", Group.Style.Accordian)] + + [Tooltip("Base wind speed in km/h.\n\nControls wave conditions. Can be overridden on Shape* components.")] + [@Range(0, k_MaximumWindSpeedKPH, scale: 2f)] + [@GenerateAPI] + [SerializeField] + internal float _WindSpeed = 10f; + + [Tooltip("Provide your own gravity value instead of Physics.gravity.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + bool _OverrideGravity; + + [@Label("Gravity")] + [Tooltip("Gravity for all wave calculations.")] + [@Predicated(nameof(_OverrideGravity))] + [@GenerateAPI] + [@DecoratedField, SerializeField] + float _GravityOverride = -9.8f; + + [Tooltip("Multiplier for physics gravity.")] + [@Range(0f, 10f)] + [@GenerateAPI] + [SerializeField] + float _GravityMultiplier = 1f; + + [Tooltip("The primary light that affects the water.\n\nSetting this is optional. This should be a directional light. Defaults to RenderSettings.sun.")] + [@GenerateAPI(Getter.Custom)] + [@DecoratedField, SerializeField] + Light _PrimaryLight; + + + [@Group("Surface Renderer", Group.Style.Accordian)] + + [Tooltip("The water chunk renderers will have this layer.")] + [@Layer] + [@GenerateAPI] + [SerializeField] + int _Layer = 4; // Water + + [Tooltip("Material to use for the water surface.")] + [@AttachMaterialEditor] + [@MaterialField("Crest/Water", name: "Water", title: "Create Water Material")] + [@GenerateAPI] + [SerializeField] + internal Material _Material = null; + + [Tooltip("Underwater will copy from this material if set.\n\nUseful for overriding properties for the underwater effect. To see what properties can be overriden, see the disabled properties on the underwater material. This does not affect the surface.")] + [@AttachMaterialEditor] + [@MaterialField("Crest/Water", name: "Water (Below)", title: "Create Water Material", parent: "_Material")] + [@GenerateAPI] + [SerializeField] + internal Material _VolumeMaterial = null; + + [Tooltip("Template for water chunks as a prefab.\n\nThe only requirements are that the prefab must contain a MeshRenderer at the root and not a MeshFilter or WaterChunkRenderer. MR values will be overwritten where necessary and the prefabs are linked in edit mode.")] + [@PrefabField(title: "Create Chunk Prefab", name: "Water Chunk")] + [SerializeField] + internal GameObject _ChunkTemplate; + + [@Space(10)] + + [Tooltip("Have the water surface cast shadows for albedo (both foam and custom).")] + [@Predicated(RenderPipeline.Legacy, inverted: true, hide: true)] + [@GenerateAPI(Getter.Custom)] + [@DecoratedField, SerializeField] + internal bool _CastShadows; + + [@Label("Motion Vectors")] + [Tooltip("Whether to enable motion vector support.")] + [@Predicated(RenderPipeline.Legacy, inverted: true, hide: true)] +#if !UNITY_6000_0_OR_NEWER + [@Predicated(RenderPipeline.Universal, inverted: true, hide: true)] +#endif + [@GenerateAPI(Getter.Custom)] + [@DecoratedField, SerializeField] + internal bool _WriteMotionVectors = true; + + [Tooltip("Whether to write the water surface depth to the depth texture (URP only).\n\nThe water surface writes to the depth buffer, but Unity does not copy it to the depth texture for post-processing effects like Depth of Field. This will copy the depth buffer to the depth texture.\n\nBe wary that it will include all transparent objects that write to depth. Furthermore, other third parties may already be doing this, and we do not check whether it is necessary to copy or not.")] + [@Predicated(RenderPipeline.Universal, hide: true)] + [@GenerateAPI] + [@DecoratedField, SerializeField] + internal bool _WriteToDepthTexture = true; + + [@Heading("Culling")] + + [Tooltip("Whether 'Water Body' components will cull the water tiles.\n\nDisable if you want to use the 'Material Override' feature and still have an ocean.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + bool _WaterBodyCulling = true; + + [Tooltip("How many frames to distribute the chunk bounds calculation.\n\nThe chunk bounds are calculated per frame to ensure culling is correct when using inputs that affect displacement. Some performance can be saved by distributing the load over several frames. The higher the frames, the longer it will take - lowest being instant.")] + [@Range(1, 30, Range.Clamp.Minimum)] + [@GenerateAPI] + [SerializeField] + int _TimeSliceBoundsUpdateFrameCount = 1; + + [@Heading("Advanced")] + + [Tooltip("How to handle self-intersections of the water surface.\n\nThey can be caused by choppy waves which can cause a flipped underwater effect. When not using the portals/volumes, this fix is only applied when within 2 metres of the water surface. Automatic will disable the fix if portals/volumes are used which is the recommend setting.")] + [@DecoratedField, SerializeField] + SurfaceSelfIntersectionFixMode _SurfaceSelfIntersectionFixMode = SurfaceSelfIntersectionFixMode.Automatic; + + [Tooltip("Whether to allow sorting using the render queue.\n\nIf you need to change the minor part of the render queue (eg +100), then enable this option. As a side effect, it will also disable the front-to-back rendering optimization for Crest. This option does not affect changing the major part of the render queue (eg AlphaTest, Transparent), as that is always allowed.\n\nRender queue sorting is required for some third-party integrations.")] + [@Predicated(RenderPipeline.HighDefinition, inverted: true, hide: true)] + [@GenerateAPI] + [@DecoratedField, SerializeField] + bool _AllowRenderQueueSorting; + + + [@Group("Level of Detail", Group.Style.Accordian)] + + [@Label("Scale")] + [Tooltip("The scale the water can be (infinity for no maximum).\n\nWater is scaled horizontally with viewer height, to keep the meshing suitable for elevated viewpoints. This sets the minimum and maximum the water will be scaled. Low minimum values give lots of detail, but will limit the horizontal extents of the water detail. Increasing the minimum value can be a great performance saving for mobile as it will reduce draw calls.")] + [@Range(0.25f, 256f, Range.Clamp.Minimum, delayed: false)] + [@GenerateAPI] + [SerializeField] + Vector2 _ScaleRange = new(4f, 256f); + + [Tooltip("Drops the height for maximum water detail based on waves.\n\nThis means if there are big waves, max detail level is reached at a lower height, which can help visual range when there are very large waves and camera is at sea level.")] + [@Range(0f, 1f)] + [@GenerateAPI] + [SerializeField] + float _DropDetailHeightBasedOnWaves = 0.2f; + + [@Label("Levels")] + [Tooltip("Number of levels of details (chunks, scales etc) to generate.\n\nThe horizontal range of the water surface doubles for each added LOD, while GPU processing time increases linearly. The higher the number, the further out detail will be. Furthermore, the higher the count, the more larger wavelengths can be filtering in queries.")] + [@Range(2, Lod.k_MaximumSlices)] + [@GenerateAPI(name: "LodLevels")] + [SerializeField] + int _Slices = 7; + + [@Label("Resolution")] + [Tooltip("The resolution of the various water LOD data.\n\nThis includes mesh density, displacement textures, foam data, dynamic wave simulation, etc. Sets the 'detail' present in the water - larger values give more detail at increased run-time expense. This value can be overriden per LOD in their respective settings except for Animated Waves which is tied to this value.")] + [@Range(80, 1024, Range.Clamp.Minimum, step: 16, delayed: true)] + [@Maximum(Constants.k_MaximumTextureResolution)] + [@WarnIfAbove(1024)] + [@GenerateAPI(name: "LodResolution")] + [SerializeField] + int _Resolution = 384; + + [Tooltip("How much of the water shape gets tessellated by geometry.\n\nFor example, if set to four, every geometry quad will span 4x4 LOD data texels. a value of 2 will generate one vert per 2x2 LOD data texels. A value of 1 means a vert is generated for every LOD data texel. Larger values give lower fidelity surface shape with higher performance.")] + [@Delayed] + [@GenerateAPI] + [SerializeField] + internal int _GeometryDownSampleFactor = 2; + + [Tooltip("Applied to the extents' far vertices to make them larger.\n\nIncrease if the extents do not reach the horizon or you see the underwater effect at the horizon.")] + [@Delayed] + [@GenerateAPI] + [SerializeField] + internal float _ExtentsSizeMultiplier = 100f; + + [@Heading("Center of Detail")] + + [Tooltip("The viewpoint which drives the water detail - the center of the LOD system.\n\nSetting this is optional. Defaults to the camera.")] + [@GenerateAPI(Getter.Custom)] + [@DecoratedField, SerializeField] + Transform _Viewpoint; + + [Tooltip("Also checks terrain height when determining the scale.\n\nThe scale is changed based on the viewer's height above the water surface. This can be a problem with varied water level, as the viewer may not be directly over the higher water level leading to a height difference, and thus incorrect scale.")] + [Predicated(nameof(_Viewpoint), inverted: true)] + [@GenerateAPI] + [@DecoratedField, SerializeField] + bool _SampleTerrainHeightForScale = true; + + [Tooltip("Forces smoothing for scale changes.\n\nWhen water level varies, smoothing scale change can prevent pops when the viewer's height above water sharply changes. Smoothing is disabled when terrain sampling is enabled or the water level simulation is disabled.")] + [Predicated(nameof(_Viewpoint), inverted: true)] + [@GenerateAPI] + [@DecoratedField, SerializeField] + bool _ForceScaleChangeSmoothing; + + [Tooltip("The distance threshold for when the viewer has considered to have teleported.\n\nThis is used to prevent popping, and for prewarming simulations. Threshold is in Unity units.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + float _TeleportThreshold = 100f; + + + [@Group("Simulations", Group.Style.Accordian)] + + [@Label("Animated Waves")] + [Tooltip("All waves (including Dynamic Waves) are written to this simulation.")] + [@GenerateAPI(Setter.None)] + [@DecoratedField, SerializeReference] + internal AnimatedWavesLod _AnimatedWavesLod = new(); + + [@Label("Water Depth")] + [Tooltip("Water depth information used for shallow water, shoreline foam, wave attenuation, among others.")] + [@GenerateAPI(Setter.None)] + [@DecoratedField, SerializeReference] + internal DepthLod _DepthLod = new(); + + [@Label("Water Level")] + [Tooltip("Varying water level to support water bodies at different heights and rivers to run down slopes.")] + [@GenerateAPI(Setter.None)] + [@DecoratedField, SerializeReference] + internal LevelLod _LevelLod = new(); + + [@Label("Foam")] + [Tooltip("Simulation of foam created in choppy water and dissipating over time.")] + [@GenerateAPI(Setter.None)] + [@DecoratedField, SerializeReference] + internal FoamLod _FoamLod = new(); + + [@Label("Dynamic Waves")] + [Tooltip("Dynamic waves generated from interactions with objects such as boats.")] + [@GenerateAPI(Setter.None)] + [@DecoratedField, SerializeReference] + internal DynamicWavesLod _DynamicWavesLod = new(); + + [@Label("Flow")] + [Tooltip("Horizontal motion of water body, akin to water currents.")] + [@GenerateAPI(Setter.None)] + [@DecoratedField, SerializeReference] + internal FlowLod _FlowLod = new(); + + [@Label("Shadows")] + [Tooltip("Shadow information used for lighting water.")] + [@GenerateAPI(Setter.None)] + [@DecoratedField, SerializeReference] + internal ShadowLod _ShadowLod = new(); + + [@Label("Absorption")] + [Tooltip("Absorption information - gives color to water.")] + [@GenerateAPI(Setter.None)] + [@DecoratedField, SerializeReference] + internal AbsorptionLod _AbsorptionLod = new(); + + [@Label("Scattering")] + [Tooltip("Scattering information - gives color to water.")] + [@GenerateAPI(Setter.None)] + [@DecoratedField, SerializeReference] + internal ScatteringLod _ScatteringLod = new(); + + [@Label("Surface Clipping")] + [Tooltip("Clip surface information for clipping the water surface.")] + [@GenerateAPI(Setter.None)] + [@DecoratedField, SerializeReference] + internal ClipLod _ClipLod = new(); + + [@Label("Albedo / Decals")] + [Tooltip("Albedo - a colour layer composited onto the water surface.")] + [@GenerateAPI(Setter.None)] + [@DecoratedField, SerializeReference] + internal AlbedoLod _AlbedoLod = new(); + + + [@Group(isCustomFoldout: true)] + + [Tooltip("The reflection renderer.")] + [@GenerateAPI(Setter.None)] + [@DecoratedField(isCustomFoldout: true), SerializeReference] + internal WaterReflections _Reflections = new(); + + + [@Group(isCustomFoldout: true)] + + [Tooltip("The underwater renderer.")] + [@GenerateAPI(Setter.None)] + [@DecoratedField(isCustomFoldout: true), SerializeReference] + internal UnderwaterRenderer _Underwater = new(); + + +#if !d_CrestPortals + // Hide if package is not present. Fallback to dummy script. + [HideInInspector] +#endif + + [@Group(isCustomFoldout: true)] + + [Tooltip("The portal renderer.")] + [@GenerateAPI(Setter.None)] + [@DecoratedField(isCustomFoldout: true), SerializeReference] + internal Portals.PortalRenderer _Portals = new(); + + + [@Group("Edit Mode", Group.Style.Accordian)] + +#pragma warning disable 414 + [@DecoratedField, SerializeField] + internal bool _ShowWaterProxyPlane; + + [Tooltip("Sets the update rate of the water system when in edit mode.\n\nCan be reduced to save power.")] + [@Range(0f, 120f, Range.Clamp.Minimum)] + [SerializeField] + float _EditModeFrameRate = 30f; + + [Tooltip("Move water with Scene view camera if Scene window is focused.")] + [@Predicated(nameof(_ShowWaterProxyPlane), true)] + [@DecoratedField, SerializeField] + internal bool _FollowSceneCamera = true; + + [Tooltip("Whether height queries are enabled in edit mode.")] + [@DecoratedField, SerializeField] + internal bool _HeightQueries = true; +#pragma warning restore 414 + + + [@Group("Debug", isCustomFoldout: true)] + + [@DecoratedField(isCustomFoldout: true), SerializeField] + internal DebugFields _Debug = new(); + + [System.Serializable] + internal sealed class DebugFields + { + [@Space(10)] + + [Tooltip("Attach debug GUI that adds some controls and allows to visualize the water data.")] + [@DecoratedField, SerializeField] + public bool _AttachDebugGUI; + + [Tooltip("Show hidden objects like water chunks in the hierarchy.")] + [@DecoratedField, SerializeField] + public bool _ShowHiddenObjects; + +#if !CREST_DEBUG + [HideInInspector] +#endif + [Tooltip("Water will not move with viewpoint.")] + [@DecoratedField, SerializeField] + public bool _DisableFollowViewpoint; + + [Tooltip("Resources are normally released in OnDestroy (except in edit mode) which avoids expensive rebuilds when toggling this component. This option moves it to OnDisable. If you need this active then please report to us.")] + [@DecoratedField, SerializeField] + public bool _DestroyResourcesInOnDisable; + +#if CREST_DEBUG + [Tooltip("Whether to disable chunk generation.")] + [@DecoratedField, SerializeField] + public bool _DisableChunks; + + [Tooltip("Whether to generate water geometry tiles uniformly (with overlaps).")] + [@DecoratedField, SerializeField] + public bool _UniformTiles; + + [Tooltip("Disable generating a wide strip of triangles at the outer edge to extend water to edge of view frustum.")] + [@DecoratedField, SerializeField] + public bool _DisableSkirt; + + [@DecoratedField, SerializeField] + public bool _DrawLodOutline; + + [@DecoratedField, SerializeField] + public bool _ShowDebugInformation; +#endif + + [@Heading("Scale")] + +#if !CREST_DEBUG + [HideInInspector] +#endif + [Tooltip("Water will not move with viewpoint.")] + [@DecoratedField, SerializeField] + public bool _LogScaleChange; + +#if !CREST_DEBUG + [HideInInspector] +#endif + [Tooltip("Water will not move with viewpoint.")] + [@DecoratedField, SerializeField] + public bool _PauseOnScaleChange; + +#if !CREST_DEBUG + [HideInInspector] +#endif + [Tooltip("Water will not move with viewpoint.")] + [@DecoratedField, SerializeField] + public bool _IgnoreWavesForScaleChange; + + [@Heading("Server")] + + [Tooltip("Emulate batch mode which models running without a display (but with a GPU available). Equivalent to running standalone build with -batchmode argument.")] + [@DecoratedField, SerializeField] + public bool _ForceBatchMode; + + [Tooltip("Emulate running on a client without a GPU. Equivalent to running standalone with -nographics argument.")] + [@DecoratedField, SerializeField] + public bool _ForceNoGraphics; + } + + [SerializeField, HideInInspector] + internal WaterResources _Resources; + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/WaterRenderer.SerializedFields.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/WaterRenderer.SerializedFields.cs.meta new file mode 100644 index 000000000..3eaa2c535 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/WaterRenderer.SerializedFields.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5d451a586ee4f40c7be034113ba04983 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/WaterRenderer.Universal.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/WaterRenderer.Universal.cs new file mode 100644 index 000000000..f767fc349 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/WaterRenderer.Universal.cs @@ -0,0 +1,213 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#if d_UnityURP + +using UnityEngine; +using UnityEngine.Rendering; +using UnityEngine.Rendering.Universal; + +namespace WaveHarmonic.Crest +{ + // Universal Render Pipeline + partial class WaterRenderer + { + sealed class ConfigureUniversalRenderer : ScriptableRenderPass + { + readonly WaterRenderer _Water; + public static ConfigureUniversalRenderer Instance { get; set; } + + public ConfigureUniversalRenderer(WaterRenderer water) + { + _Water = water; + renderPassEvent = RenderPassEvent.BeforeRenderingTransparents; + ConfigureInput(ScriptableRenderPassInput.Color | ScriptableRenderPassInput.Depth); + } + + public static void Enable(WaterRenderer water) + { +#if UNITY_EDITOR + var data = water.Viewer != null ? water.Viewer.GetUniversalAdditionalCameraData() : null; + + // Type is internal. + if (data != null && data.scriptableRenderer.GetType().Name == "Renderer2D") + { + UnityEditor.EditorUtility.DisplayDialog + ( + "Crest Error!", + "The project has been detected as a URP 2D project. Crest only supports 3D projects. " + + "You may see errors from Crest in the console, and other issues.", + "Ok" + ); + } +#endif + + Instance = new ConfigureUniversalRenderer(water); + RenderPipelineManager.beginCameraRendering -= OnBeginCameraRendering; + RenderPipelineManager.beginCameraRendering += OnBeginCameraRendering; + } + + public static void Disable() + { + RenderPipelineManager.beginCameraRendering -= OnBeginCameraRendering; + } + + static void OnBeginCameraRendering(ScriptableRenderContext context, Camera camera) + { + // May cause assertions/exceptions for reflection camera. + if (camera.cameraType == CameraType.Reflection) return; + + if (!Helpers.MaskIncludesLayer(camera.cullingMask, Instance._Water.Layer)) + { + return; + } + + // TODO: Could also check RenderType. Which is better? + if (!Instance._Water.Material.IsKeywordEnabled("_SURFACE_TYPE_TRANSPARENT")) + { + return; + } + + camera.GetUniversalAdditionalCameraData().scriptableRenderer.EnqueuePass(Instance); + } + +#if UNITY_6000_0_OR_NEWER + sealed class PassData { } + + public override void RecordRenderGraph(UnityEngine.Rendering.RenderGraphModule.RenderGraph graph, ContextContainer frame) + { + using (var builder = graph.AddUnsafePass("Crest Register Color/Depth Requirements.", out var data)) + { + builder.AllowPassCulling(false); + builder.SetRenderFunc((data, context) => { }); + } + } + + [System.Obsolete] +#endif + public override void Execute(ScriptableRenderContext context, ref RenderingData renderingData) + { + // Blank + } + } + + internal sealed class UniversalCopyWaterSurfaceDepth : ScriptableRenderPass + { + readonly WaterRenderer _Water; + public static UniversalCopyWaterSurfaceDepth Instance { get; set; } + + readonly UnityEngine.Rendering.Universal.Internal.CopyDepthPass _CopyDepthPass; + readonly Shader _CopyDepthShader; + readonly Material _CopyDepthMaterial; + + public UniversalCopyWaterSurfaceDepth(WaterRenderer water) + { + _Water = water; + renderPassEvent = RenderPassEvent.BeforeRenderingPostProcessing; + + _CopyDepthShader = Shader.Find("Hidden/Universal Render Pipeline/CopyDepth"); +#if !UNITY_6000_0_OR_NEWER + _CopyDepthMaterial = new Material(_CopyDepthShader); +#endif + + _CopyDepthPass = new + ( + RenderPassEvent.BeforeRenderingPostProcessing, +#if UNITY_6000_0_OR_NEWER + _CopyDepthShader, +#else + _CopyDepthMaterial, +#endif + // Will not work in U6 without it. + copyToDepth: true, + copyResolvedDepth: RenderingUtils.MultisampleDepthResolveSupported(), + shouldClear: false + ); + } + + public static void Enable(WaterRenderer water) + { + Instance = new UniversalCopyWaterSurfaceDepth(water); + RenderPipelineManager.beginCameraRendering -= OnBeginCameraRendering; + RenderPipelineManager.beginCameraRendering += OnBeginCameraRendering; + } + + public static void Disable() + { + RenderPipelineManager.beginCameraRendering -= OnBeginCameraRendering; + } + + static void OnBeginCameraRendering(ScriptableRenderContext context, Camera camera) + { + // May cause assertions/exceptions for reflection camera. + if (camera.cameraType == CameraType.Reflection) return; + + if (!Instance._Water._WriteToDepthTexture) + { + return; + } + + if (!Helpers.MaskIncludesLayer(camera.cullingMask, Instance._Water.Layer)) + { + return; + } + + // TODO: Could also check RenderType. Which is better? + if (!Instance._Water.Material.IsKeywordEnabled("_SURFACE_TYPE_TRANSPARENT")) + { + return; + } + + var renderer = camera.GetUniversalAdditionalCameraData().scriptableRenderer; + // Needed for OnCameraSetup. + renderer.EnqueuePass(Instance); + +#if UNITY_6000_0_OR_NEWER + // Copy depth pass does not support RG directly. + if (GraphicsSettings.GetRenderPipelineSettings().enableRenderCompatibilityMode) +#endif + { + renderer.EnqueuePass(Instance._CopyDepthPass); + } + } + +#if UNITY_6000_0_OR_NEWER + public override void RecordRenderGraph(UnityEngine.Rendering.RenderGraphModule.RenderGraph graph, ContextContainer frame) + { + var resources = frame.Get(); + var descriptor = resources.cameraDepthTexture.GetDescriptor(graph); + // Whether we a writing to color or depth format. + _CopyDepthPass.CopyToDepth = descriptor.colorFormat == UnityEngine.Experimental.Rendering.GraphicsFormat.None; + _CopyDepthPass.Render(graph, frame, resources.cameraDepthTexture, resources.cameraDepth); + } + + [System.Obsolete] +#endif + public override void OnCameraSetup(CommandBuffer buffer, ref RenderingData data) + { + var renderer = (UniversalRenderer)data.cameraData.renderer; + + + + // Also check internal RT because it can be null on Vulkan for some reason. + if (renderer.cameraDepthTargetHandle?.rt != null && renderer.m_DepthTexture?.rt != null) + { + // Whether we a writing to color or depth format. + _CopyDepthPass.CopyToDepth = renderer.m_DepthTexture.rt.graphicsFormat == UnityEngine.Experimental.Rendering.GraphicsFormat.None; + _CopyDepthPass.m_CopyResolvedDepth = false; + _CopyDepthPass.Setup(renderer.cameraDepthTargetHandle, renderer.m_DepthTexture); + } + } + +#if UNITY_6000_0_OR_NEWER + [System.Obsolete] +#endif + public override void Execute(ScriptableRenderContext context, ref RenderingData data) + { + // Blank + } + } + } +} + +#endif diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/WaterRenderer.Universal.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/WaterRenderer.Universal.cs.meta new file mode 100644 index 000000000..bdee80398 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/WaterRenderer.Universal.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3fadddebc8ed94999856de21b2b9241e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/WaterRenderer.WaterLevelDepth.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/WaterRenderer.WaterLevelDepth.cs new file mode 100644 index 000000000..2d6b5b960 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/WaterRenderer.WaterLevelDepth.cs @@ -0,0 +1,273 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// FIXME: Broken for BIRP on MacOS. Either platform specific problem or bug in Unity. + +using UnityEngine; +using UnityEngine.Rendering; +using UnityEngine.Rendering.HighDefinition; +using UnityEngine.Rendering.Universal; + +namespace WaveHarmonic.Crest +{ + partial class WaterRenderer + { + CommandBuffer _WaterLevelDepthBuffer; + RenderTexture _WaterLevelDepthTexture; + internal RenderTexture WaterLevelDepthTexture => _WaterLevelDepthTexture; + RenderTargetIdentifier _WaterLevelDepthTarget; + Material _WaterLevelDepthMaterial; + internal readonly Plane[] _CameraFrustumPlanes = new Plane[6]; + + const string k_WaterLevelDepthTextureName = "Crest Water Level Depth Texture"; + + void RenderWaterSurface(CommandBuffer buffer, Camera camera, Material material) + { + GeometryUtility.CalculateFrustumPlanes(camera, _CameraFrustumPlanes); + + // Spends approx 0.2-0.3ms here on 2018 Dell XPS 15. + foreach (var chunk in Chunks) + { + var renderer = chunk.Rend; + // Can happen in edit mode. + if (renderer == null) continue; + + var bounds = renderer.bounds; + if (GeometryUtility.TestPlanesAABB(_CameraFrustumPlanes, bounds)) + { + if ((!chunk._WaterDataHasBeenBound) && chunk.enabled) + { + chunk.Bind(camera); + } + + renderer.SetPropertyBlock(chunk._MaterialPropertyBlock); + + // Assume correct pass is zero. Use to be k_ShaderPassWaterSurfaceMask. + buffer.DrawRenderer(renderer, material, submeshIndex: 0, shaderPass: 0); + } + + chunk._WaterDataHasBeenBound = false; + } + } + + void ExecuteWaterLevelDepthTexture(Camera camera, CommandBuffer buffer) + { + Helpers.CreateRenderTargetTextureReference(ref _WaterLevelDepthTexture, ref _WaterLevelDepthTarget); + _WaterLevelDepthTexture.name = k_WaterLevelDepthTextureName; + + if (_WaterLevelDepthMaterial == null) + { + _WaterLevelDepthMaterial = new(Shader.Find("Hidden/Crest/Editor/Water Level (Depth)")); + } + + var descriptor = new RenderTextureDescriptor(camera.pixelWidth, camera.pixelHeight) + { + graphicsFormat = UnityEngine.Experimental.Rendering.GraphicsFormat.None, + depthBufferBits = 32, + }; + + // Depth texture. + // Always release to handle screen size changes. + _WaterLevelDepthTexture.Release(); + descriptor.graphicsFormat = UnityEngine.Experimental.Rendering.GraphicsFormat.R32_SFloat; + descriptor.depthBufferBits = 0; + Helpers.SafeCreateRenderTexture(ref _WaterLevelDepthTexture, descriptor); + _WaterLevelDepthTexture.Create(); + + // Depth buffer. + buffer.GetTemporaryRT(Helpers.ShaderIDs.s_MainTexture, descriptor); + buffer.SetRenderTarget(Helpers.ShaderIDs.s_MainTexture); + buffer.ClearRenderTarget(true, false, Color.clear); + + RenderWaterSurface(buffer, camera, _WaterLevelDepthMaterial); + + // Convert. + Helpers.Blit(buffer, _WaterLevelDepthTarget, Helpers.UtilityMaterial, (int)Helpers.UtilityPass.Copy); + + buffer.ReleaseTemporaryRT(Helpers.ShaderIDs.s_MainTexture); + + } + + void EnableWaterLevelDepthTexture() + { + if (Application.isPlaying) return; + +#if d_UnityURP + if (RenderPipelineHelper.IsUniversal) + { + WaterLevelDepthTextureURP.Enable(); + } +#endif + +#if d_UnityHDRP + if (RenderPipelineHelper.IsHighDefinition) + { + WaterLevelDepthTextureHDRP.Enable(); + } +#endif + } + + void DisableWaterLevelDepthTexture() + { + if (Application.isPlaying) return; + +#if d_UnityURP + WaterLevelDepthTextureURP.Disable(); +#endif + +#if d_UnityHDRP + WaterLevelDepthTextureHDRP.Disable(); +#endif + } + + void OnPreRenderWaterLevelDepthTexture(Camera camera) + { + if (camera.cameraType != CameraType.SceneView || camera != Viewer) + { + return; + } + + _WaterLevelDepthBuffer ??= new() { name = k_WaterLevelDepthTextureName }; + _WaterLevelDepthBuffer.Clear(); + + ExecuteWaterLevelDepthTexture(camera, _WaterLevelDepthBuffer); + + // Both forward and deferred. + camera.AddCommandBuffer(CameraEvent.BeforeDepthTexture, _WaterLevelDepthBuffer); + camera.AddCommandBuffer(CameraEvent.BeforeGBuffer, _WaterLevelDepthBuffer); + } + + void OnPostRenderWaterLevelDepthTexture(Camera camera) + { + if (_WaterLevelDepthBuffer != null) + { + // Both forward and deferred. + camera.RemoveCommandBuffer(CameraEvent.BeforeDepthTexture, _WaterLevelDepthBuffer); + camera.RemoveCommandBuffer(CameraEvent.BeforeGBuffer, _WaterLevelDepthBuffer); + } + } + +#if d_UnityURP + sealed class WaterLevelDepthTextureURP : ScriptableRenderPass + { + static WaterLevelDepthTextureURP s_Instance; + + internal WaterLevelDepthTextureURP() + { + // Will always execute and matrices will be ready. + renderPassEvent = RenderPassEvent.BeforeRenderingPrePasses; + } + + internal static void Enable() + { + s_Instance ??= new(); + + RenderPipelineManager.beginCameraRendering -= s_Instance.EnqueuePass; + RenderPipelineManager.beginCameraRendering += s_Instance.EnqueuePass; + RenderPipelineManager.activeRenderPipelineTypeChanged -= Disable; + RenderPipelineManager.activeRenderPipelineTypeChanged += Disable; + } + + internal static void Disable() + { + // FIXME: Out of range exception when no null check but shouldn't be necessary. + if (s_Instance != null) RenderPipelineManager.beginCameraRendering -= s_Instance.EnqueuePass; + RenderPipelineManager.activeRenderPipelineTypeChanged -= Disable; + } + + void EnqueuePass(ScriptableRenderContext context, Camera camera) + { + if (camera.cameraType != CameraType.SceneView || camera != Instance.Viewer) + { + return; + } + + // Enqueue the pass. This happens every frame. + camera.GetUniversalAdditionalCameraData().scriptableRenderer.EnqueuePass(this); + } + +#if UNITY_6000_0_OR_NEWER + class PassData + { + public UniversalCameraData _CameraData; + } + + public override void RecordRenderGraph(UnityEngine.Rendering.RenderGraphModule.RenderGraph graph, ContextContainer frame) + { + using (var builder = graph.AddUnsafePass(k_WaterLevelDepthTextureName, out var data)) + { + builder.AllowPassCulling(false); + + data._CameraData = frame.Get(); + + builder.SetRenderFunc((data, context) => + { + var buffer = CommandBufferHelpers.GetNativeCommandBuffer(context.cmd); + Instance.ExecuteWaterLevelDepthTexture(data._CameraData.camera, buffer); + }); + } + } + + [System.Obsolete] +#endif + public override void Execute(ScriptableRenderContext context, ref RenderingData data) + { + var buffer = CommandBufferPool.Get(k_WaterLevelDepthTextureName); + Instance.ExecuteWaterLevelDepthTexture(data.cameraData.camera, buffer); + context.ExecuteCommandBuffer(buffer); + CommandBufferPool.Release(buffer); + } + } +#endif + +#if d_UnityHDRP + sealed class WaterLevelDepthTextureHDRP : CustomPass + { + static WaterLevelDepthTextureHDRP s_Instance; + GameObject _GameObject; + + internal static void Enable() + { + var gameObject = CustomPassHelpers.CreateOrUpdate + ( + parent: Instance.Container.transform, + k_WaterLevelDepthTextureName, + hide: !Instance._Debug._ShowHiddenObjects + ); + + CustomPassHelpers.CreateOrUpdate + ( + gameObject, + ref s_Instance, + k_WaterLevelDepthTextureName, + CustomPassInjectionPoint.BeforeRendering + ); + + s_Instance._GameObject = gameObject; + } + + public static void Disable() + { + // It should be safe to rely on this reference for this reference to fail. + if (s_Instance != null && s_Instance._GameObject != null) + { + // Will also trigger Cleanup below. + s_Instance._GameObject.SetActive(false); + } + } + + protected override void Execute(CustomPassContext context) + { + var camera = context.hdCamera.camera; + + if (camera.cameraType != CameraType.SceneView || camera != Instance.Viewer) + { + return; + } + + Instance.ExecuteWaterLevelDepthTexture(camera, context.cmd); + } + } +#endif + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/WaterRenderer.WaterLevelDepth.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/WaterRenderer.WaterLevelDepth.cs.meta new file mode 100644 index 000000000..289bebe9c --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/WaterRenderer.WaterLevelDepth.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fb0a271a9c8434a75a94381cc48d2603 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/WaterRenderer.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/WaterRenderer.cs new file mode 100644 index 000000000..f8e0c5af2 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/WaterRenderer.cs @@ -0,0 +1,1585 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; +using UnityEngine.Rendering; +using UnityEngine.Rendering.HighDefinition; +using WaveHarmonic.Crest.Internal; +using WaveHarmonic.Crest.RelativeSpace; +using WaveHarmonic.Crest.Utility; + +namespace WaveHarmonic.Crest +{ + /// + /// The main script for the water system. + /// + /// + /// Attach this to an object to create water. This script initializes the various + /// data types and systems and moves/scales the water based on the viewpoint. It + /// also hosts a number of global settings that can be tweaked here. + /// + public sealed partial class WaterRenderer : ManagerBehaviour + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + + internal static partial class ShaderIDs + { + public static readonly int s_Center = Shader.PropertyToID("g_Crest_WaterCenter"); + public static readonly int s_Scale = Shader.PropertyToID("g_Crest_WaterScale"); + public static readonly int s_Time = Shader.PropertyToID("g_Crest_Time"); + public static readonly int s_CascadeData = Shader.PropertyToID("g_Crest_CascadeData"); + public static readonly int s_CascadeDataSource = Shader.PropertyToID("g_Crest_CascadeDataSource"); + public static readonly int s_LodChange = Shader.PropertyToID("g_Crest_LodChange"); + public static readonly int s_MeshScaleLerp = Shader.PropertyToID("g_Crest_MeshScaleLerp"); + public static readonly int s_LodCount = Shader.PropertyToID("g_Crest_LodCount"); + public static readonly int s_LodAlphaBlackPointFade = Shader.PropertyToID("g_Crest_LodAlphaBlackPointFade"); + public static readonly int s_LodAlphaBlackPointWhitePointFade = Shader.PropertyToID("g_Crest_LodAlphaBlackPointWhitePointFade"); + public static readonly int s_ForceUnderwater = Shader.PropertyToID("g_Crest_ForceUnderwater"); + + // Shader Properties + public static readonly int s_AbsorptionColor = Shader.PropertyToID("_Crest_AbsorptionColor"); + public static readonly int s_Absorption = Shader.PropertyToID("_Crest_Absorption"); + public static readonly int s_Scattering = Shader.PropertyToID("_Crest_Scattering"); + public static readonly int s_Anisotropy = Shader.PropertyToID("_Crest_Anisotropy"); + public static readonly int s_PlanarReflectionsEnabled = Shader.PropertyToID("_Crest_PlanarReflectionsEnabled"); + public static readonly int s_Occlusion = Shader.PropertyToID("_Crest_Occlusion"); + public static readonly int s_OcclusionUnderwater = Shader.PropertyToID("_Crest_OcclusionUnderwater"); + + // Motion Vectors + public static readonly int s_CenterDelta = Shader.PropertyToID("g_Crest_WaterCenterDelta"); + public static readonly int s_ScaleChange = Shader.PropertyToID("g_Crest_WaterScaleChange"); + + // Underwater + public static readonly int s_VolumeExtinctionLength = Shader.PropertyToID("_Crest_VolumeExtinctionLength"); + + + // High Definition Render Pipeline + public static readonly int s_PrimaryLightDirection = Shader.PropertyToID("g_Crest_PrimaryLightDirection"); + public static readonly int s_PrimaryLightIntensity = Shader.PropertyToID("g_Crest_PrimaryLightIntensity"); + + // URP Motion Vectors + public static readonly int s_Surface = Shader.PropertyToID("_Surface"); + public static readonly int s_SrcBlend = Shader.PropertyToID("_SrcBlend"); + public static readonly int s_DstBlend = Shader.PropertyToID("_DstBlend"); + } + + + // + // Viewer + // + + Transform GetViewpoint() + { +#if UNITY_EDITOR + if (!Application.isPlaying && _FollowSceneCamera && SceneView.lastActiveSceneView != null && IsSceneViewActive) + { + return SceneView.lastActiveSceneView.camera.transform; + } +#endif + if (_Viewpoint != null) + { + return _Viewpoint; + } + + // Even with performance improvements, it is still good to cache whenever possible. + var camera = Viewer; + + if (camera != null) + { + return camera.transform; + } + + return null; + } + + Camera GetViewer() + { +#if UNITY_EDITOR + if (!Application.isPlaying && _FollowSceneCamera && SceneView.lastActiveSceneView != null && IsSceneViewActive) + { + return SceneView.lastActiveSceneView.camera; + } +#endif + + if (_Camera != null) + { + return _Camera; + } + + // Unity has greatly improved performance of this operation in 2019.4.9. + return Camera.main; + } + + // Cache the ViewCamera property for internal use. + Camera _ViewCameraCached; + + + // + // Viewer Height + // + + /// + /// The water changes scale when viewer changes altitude, this gives the interpolation param between scales. + /// + internal float ViewerAltitudeLevelAlpha { get; private set; } + + /// + /// Vertical offset of camera vs water surface. + /// + public float ViewerHeightAboveWater { get; private set; } + + /// + /// Vertical offset of viewpoint vs water surface. + /// + public float ViewpointHeightAboveWater { get; private set; } + + /// + /// Distance of camera to shoreline. Positive if over water and negative if over land. + /// + public float ViewerDistanceToShoreline { get; private set; } + + /// + /// Smoothly varying version of viewpoint height to combat sudden changes in water level that are possible + /// when there are local bodies of water + /// + float _ViewpointHeightAboveWaterSmooth; + + readonly SampleCollisionHelper _SampleHeightHelper = new(); + readonly SampleDepthHelper _SampleDepthHelper = new(); + + float _ViewerHeightAboveWaterPerCamera; + readonly SampleCollisionHelper _SampleHeightHelperPerCamera = new(); + + + // + // Teleport Threshold + // + + float _TeleportTimerForHeightQueries; + bool _IsFirstFrameSinceEnabled = true; + internal bool _HasTeleportedThisFrame; + Vector3 _OldViewpointPosition; + +#if d_WaveHarmonic_Crest_ShiftingOrigin + Vector3 TeleportOriginThisFrame => ShiftingOrigin.ShiftThisFrame; +#else + Vector3 TeleportOriginThisFrame => Vector3.zero; +#endif + + // + // Serialized Fields + // + + internal float WindSpeedKPH => _WindSpeed; + + // + // Transform + // + + internal Transform Root { get; private set; } + internal GameObject Container { get; private set; } + + /// + /// Sea level is given by y coordinate of GameObject with WaterRenderer script. + /// + public float SeaLevel => Root.position.y; + + // Anything higher (minus 1 for near plane) will be clipped. + const float k_RenderAboveSeaLevel = 10000f; + // Anything lower will be clipped. + const float k_RenderBelowSeaLevel = 10000f; + + Matrix4x4[] _ProjectionMatrix; + internal Matrix4x4 GetProjectionMatrix(int slice) => _ProjectionMatrix[slice]; + + internal static Matrix4x4 CalculateViewMatrixFromSnappedPositionRHS(Vector3 snapped) + { + return Helpers.CalculateWorldToCameraMatrixRHS(snapped + Vector3.up * k_RenderAboveSeaLevel, Quaternion.AngleAxis(90f, Vector3.right)); + } + + + // + // Time Provider + // + + /// + /// Loosely a stack for time providers. + /// + /// + /// The last in the list is the active one. When a + /// gets added to the stack, it is bumped to the top of + /// the list. When a is removed, all instances of it are + /// removed from the stack. This is less rigid than a real stack which would be + /// harder to use as users have to keep a close eye on the order that things are + /// pushed/popped. + /// + public Utility.Internal.Stack TimeProviders { get; private set; } = new(); + + /// + /// The current time provider. + /// + public ITimeProvider TimeProvider => TimeProviders.Peek(); + + internal float CurrentTime => TimeProvider.Time; + internal float DeltaTime => TimeProvider.Delta; + + + // + // Environment + // + + /// + /// The primary light that affects the water. This should be a directional light. + /// + Light GetPrimaryLight() => _PrimaryLight == null ? RenderSettings.sun : _PrimaryLight; + + /// + /// Physics gravity applied to water. + /// + public float Gravity => _GravityMultiplier * Mathf.Abs(_OverrideGravity ? _GravityOverride : Physics.gravity.y); + + + // + // Rendering + // + + internal Material AboveOrBelowSurfaceMaterial => _VolumeMaterial == null ? _Material : _VolumeMaterial; + +#if UNITY_6000_0_OR_NEWER + internal Material _MotionVectorsMaterial; +#endif + + enum SurfaceSelfIntersectionFixMode + { + Off, + ForceBelowWater, + ForceAboveWater, + On, + Automatic, + } + +#if d_CrestPortals + bool Portaled => _Portals.Active; +#else + bool Portaled => false; +#endif + + bool GetCastShadows() => _CastShadows && !RenderPipelineHelper.IsLegacy; + bool GetWriteMotionVectors() => _WriteMotionVectors && +#if UNITY_6000_0_OR_NEWER + !RenderPipelineHelper.IsLegacy; +#else + RenderPipelineHelper.IsHighDefinition; +#endif + + // + // Material + // + + /// + /// Calculates the absorption value from the absorption color. + /// + /// The absorption color. + /// The absorption value (XYZ value). + public static Vector4 CalculateAbsorptionValueFromColor(Color color) + { + return UpdateAbsorptionFromColor(color); + } + + internal static Vector4 UpdateAbsorptionFromColor(Color color) + { + var alpha = Vector3.zero; + alpha.x = Mathf.Log(Mathf.Max(color.r, 0.0001f)); + alpha.y = Mathf.Log(Mathf.Max(color.g, 0.0001f)); + alpha.z = Mathf.Log(Mathf.Max(color.b, 0.0001f)); + // Magic numbers that make fog density easy to control using alpha channel + return (-color.a * 32f * alpha / 5f).XYZN(1f); + } + + internal static void UpdateAbsorptionFromColor(Material material) + { + var fogColour = material.GetColor(ShaderIDs.s_AbsorptionColor); + var alpha = Vector3.zero; + alpha.x = Mathf.Log(Mathf.Max(fogColour.r, 0.0001f)); + alpha.y = Mathf.Log(Mathf.Max(fogColour.g, 0.0001f)); + alpha.z = Mathf.Log(Mathf.Max(fogColour.b, 0.0001f)); + // Magic numbers that make fog density easy to control using alpha channel + material.SetVector(ShaderIDs.s_Absorption, UpdateAbsorptionFromColor(fogColour)); + } + + + // + // Simulations + // + + internal List Simulations { get; } = new(); + + + // + // Water Chunks + // + + internal List Chunks { get; } = new(); + + + // + // Water Chunk Culling + // + + bool _CanSkipCulling; + + + // + // Instance + // + + bool _Initialized; + internal bool Active => enabled && this == Instance; + + + // + // Hash + // + + // A hash of the settings used to generate the water, used to regenerate when necessary + int _GeneratedSettingsHash; + + + // + // Runtime Environment + // + + /// + /// Is runtime environment without graphics card + /// + public static bool RunningWithoutGraphics + { + get + { + var noGPU = SystemInfo.graphicsDeviceType == GraphicsDeviceType.Null; + var emulateNoGPU = Instance != null && Instance._Debug._ForceNoGraphics; + return noGPU || emulateNoGPU; + } + } + + // No GPU or emulate no GPU. + internal bool IsRunningWithoutGraphics => SystemInfo.graphicsDeviceType == GraphicsDeviceType.Null || _Debug._ForceNoGraphics; + + /// + /// Is runtime environment non-interactive (not displaying to user). + /// + public static bool RunningHeadless => Application.isBatchMode || (Instance != null && Instance._Debug._ForceBatchMode); + + internal bool IsRunningHeadless => Application.isBatchMode || _Debug._ForceBatchMode; + + + // + // Frame Timing + // + + internal int LastUpdateFrame { get; private set; } = -1; + + /// + /// The frame count for Crest. + /// + public static int FrameCount + { + get + { +#if UNITY_EDITOR + if (!Application.isPlaying) + { + return s_EditorFrames; + } + else +#endif + { + return Time.frameCount; + } + } + } + + + // + // Level of Detail + // + + // We are computing these values to be optimal based on the base mesh vertex density. + float _LodAlphaBlackPointFade; + float _LodAlphaBlackPointWhitePointFade; + + internal CommandBuffer SimulationBuffer { get; private set; } + + internal BufferedData _CascadeData; + + internal struct PerCascadeInstanceData + { + public float _MeshScaleLerp; + public float _FarNormalsWeight; + public float _GeometryGridWidth; + public Vector2 _NormalScrollSpeeds; + } + + internal BufferedData _PerCascadeInstanceData; + internal int BufferSize { get; private set; } + + internal float MaximumWavelength(int slice) + { + var maximumDiameter = 4f * Scale * Mathf.Pow(2f, slice); + // TODO: Do we need to pass in resolution? Could resolution mismatch with animated + // and dynamic waves be an issue? + var maximumTexelSize = maximumDiameter / LodResolution; + var texelsPerWave = 2f; + return 2f * maximumTexelSize * texelsPerWave; + } + + + // + // Scale + // + + /// + /// Current water scale (changes with viewer altitude). + /// + public float Scale { get; private set; } + internal float CalcLodScale(float slice) => Scale * Mathf.Pow(2f, slice); + internal float CalcGridSize(int slice) => CalcLodScale(slice) / LodResolution; + + /// + /// Could the water horizontal scale increase (for e.g. if the viewpoint gains altitude). Will be false if water already at maximum scale. + /// + internal bool ScaleCouldIncrease => _ScaleRange.y < Mathf.Infinity || Root.localScale.x < _ScaleRange.y * 0.99f; + /// + /// Could the water horizontal scale decrease (for e.g. if the viewpoint drops in altitude). Will be false if water already at minimum scale. + /// + internal bool ScaleCouldDecrease => Root.localScale.x > _ScaleRange.x * 1.01f; + + internal int ScaleDifferencePower2 { get; private set; } + + + // + // Displacement Reporting + // + + /// + /// User shape inputs can report in how far they might displace the shape horizontally and vertically. The max value is + /// saved here. Later the bounding boxes for the water tiles will be expanded to account for this potential displacement. + /// + internal void ReportMaximumDisplacement(float horizontal, float vertical, float verticalFromWaves) + { + MaximumHorizontalDisplacement += horizontal; + MaximumVerticalDisplacement += vertical; + _MaximumVerticalDisplacementFromWaves += verticalFromWaves; + } + + float _MaximumVerticalDisplacementFromWaves = 0f; + /// + /// The maximum horizontal distance that the shape scripts are displacing the shape. + /// + internal float MaximumHorizontalDisplacement { get; private set; } + /// + /// The maximum height that the shape scripts are displacing the shape. + /// + internal float MaximumVerticalDisplacement { get; private set; } + + + // + // Query Providers + // + + /// + /// Provides water shape to CPU. + /// + public ICollisionProvider CollisionProvider => AnimatedWavesLod?.Provider; + + /// + /// Provides flow to the CPU. + /// + public IFlowProvider FlowProvider => FlowLod?.Provider; + + /// + /// Provides water depth and distance to water edge to the CPU. + /// + public IDepthProvider DepthProvider => DepthLod?.Provider; + + + // + // Component + // + + // Drive state from OnEnable and OnDisable? OnEnable on RegisterLodDataInput seems to get called on script reload + private protected override void Initialize() + { + base.Initialize(); + + _IsFirstFrameSinceEnabled = true; + _ViewCameraCached = Viewer; + + if (_Initialized) + { + Enable(); + return; + } + + _Reflections._Water = this; + _Reflections._UnderWater = _Underwater; + _Underwater._Water = this; +#if d_CrestPortals + _Underwater._Portals = _Portals; + _Portals._Water = this; + _Portals._UnderWater = _Underwater; +#endif + + _DepthLod._Water = this; + _LevelLod._Water = this; + _FlowLod._Water = this; + _DynamicWavesLod._Water = this; + _AnimatedWavesLod._Water = this; + _FoamLod._Water = this; + _ClipLod._Water = this; + _AbsorptionLod._Water = this; + _ScatteringLod._Water = this; + _AlbedoLod._Water = this; + _ShadowLod._Water = this; + + // Add simulations to a list for common operations. Order is important. + Simulations.Clear(); + Simulations.Add(_DepthLod); + Simulations.Add(_LevelLod); + Simulations.Add(_FlowLod); + Simulations.Add(_DynamicWavesLod); + Simulations.Add(_AnimatedWavesLod); + Simulations.Add(_FoamLod); + Simulations.Add(_AbsorptionLod); + Simulations.Add(_ScatteringLod); + Simulations.Add(_ClipLod); + Simulations.Add(_AlbedoLod); + Simulations.Add(_ShadowLod); + + // Setup a default time provider, and add the override one (from the inspector) + TimeProviders.Clear(); + + // Put a base TP that should always be available as a fallback + TimeProviders.Push(new DefaultTimeProvider()); + + // Add the TP from the inspector + if (_TimeProvider != null) + { + TimeProviders.Push(_TimeProvider); + } + + if (!VerifyRequirements()) + { + enabled = false; + return; + } + + SimulationBuffer ??= new() + { + name = "Crest.LodData", + }; + + Container = new() + { + name = "Container", + hideFlags = _Debug._ShowHiddenObjects ? HideFlags.DontSave : HideFlags.HideAndDontSave + }; + Container.transform.SetParent(transform, worldPositionStays: false); + this.Manage(Container); + + Scale = Mathf.Clamp(Scale, _ScaleRange.x, _ScaleRange.y); + + foreach (var simulation in Simulations) + { + // Bypasses Enabled and has an internal check. + if (!simulation._Enabled) continue; + simulation.Initialize(); + } + + // TODO: Have a BufferCount which will be the run-time buffer size or prune data. + // NOTE: Hardcode minimum (2) to avoid breaking server builds and LodData* toggles. + // Gather the buffer size for shared data. + BufferSize = 2; + foreach (var simulation in Simulations) + { + if (!simulation.Enabled) continue; + BufferSize = Mathf.Max(BufferSize, simulation.BufferCount); + } + + + _PerCascadeInstanceData = new(BufferSize, () => new PerCascadeInstanceData[Lod.k_MaximumSlices]); + + // The extra LOD accounts for reading off the cascade (eg CurrentIndex + LodChange + 1). + _CascadeData = new(BufferSize, () => new Vector4[Lod.k_MaximumSlices + 1]); + + _ProjectionMatrix = new Matrix4x4[LodLevels]; + + // Resolution is 4 tiles across. + var baseMeshDensity = _Resolution * 0.25f / _GeometryDownSampleFactor; + // 0.4f is the "best" value when base mesh density is 8. Scaling down from there produces results similar to + // hand crafted values which looked good when the water is flat. + _LodAlphaBlackPointFade = 0.4f / (baseMeshDensity / 8f); + // We could calculate this in the shader, but we can save two subtractions this way. + _LodAlphaBlackPointWhitePointFade = 1f - _LodAlphaBlackPointFade - _LodAlphaBlackPointFade; + +#if CREST_DEBUG + if (_Debug._DisableChunks) + { + Root = new GameObject("Root").transform; + } + else +#endif + { + Root = WaterBuilder.GenerateMesh(this, Chunks, _Resolution, _GeometryDownSampleFactor, _Slices); + } + + Root.SetParent(Container.transform, worldPositionStays: false); + + if (Application.isPlaying && _Debug._AttachDebugGUI && !TryGetComponent(out _)) + { + gameObject.AddComponent().hideFlags = HideFlags.DontSave; + } + + _CanSkipCulling = false; + + _GeneratedSettingsHash = CalculateSettingsHash(); + + // Prevent MVs from popping on first frame. + if (!_Debug._DisableFollowViewpoint && _ViewCameraCached != null) + { + LateUpdatePosition(); + LateUpdateScale(); + } + +#if UNITY_6000_0_OR_NEWER + // Set up motion vector material. + if (RenderPipelineHelper.IsUniversal && WriteMotionVectors && _Material != null) + { + SetUpMotionVectorsMaterial(); + } +#endif + + Enable(); + _Initialized = true; + } + + void OnDisable() + { + Disable(); + + // Always clean up in OnDisable during edit mode as OnDestroy is not always called. + if (_Debug._DestroyResourcesInOnDisable || !Application.isPlaying) + { + Destroy(); + } + } + + void OnDestroy() + { + // Only clean up in OnDestroy when not in edit mode. + if (_Debug._DestroyResourcesInOnDisable || !Application.isPlaying) + { + return; + } + + Destroy(); + } + + private protected override void LateUpdate() + { +#if CREST_DEBUG +#if UNITY_EDITOR + if (_SkipForTesting) + { + return; + } +#endif +#endif + +#if UNITY_EDITOR + // Don't run immediately if in edit mode - need to count editor frames so this is run through EditorUpdate() + if (Application.isPlaying) +#endif + { + RunUpdate(); + } + } + + + // + // Methods + // + + private protected override void Enable() + { + base.Enable(); + + foreach (var simulation in Simulations) + { + simulation.SetGlobals(enable: true); + if (!simulation.Enabled) continue; + simulation.Enable(); + } + +#if d_WaveHarmonic_Crest_ShiftingOrigin + ShiftingOrigin.OnShift -= OnOriginShift; + ShiftingOrigin.OnShift += OnOriginShift; +#endif + + // Needs to be first or will get assertions etc. Unity bug likely. + RenderPipelineManager.activeRenderPipelineTypeChanged -= OnActiveRenderPipelineTypeChanged; + RenderPipelineManager.activeRenderPipelineTypeChanged += OnActiveRenderPipelineTypeChanged; + RenderPipelineManager.beginCameraRendering -= OnBeginCameraRendering; + RenderPipelineManager.beginCameraRendering += OnBeginCameraRendering; + RenderPipelineManager.endCameraRendering -= OnEndCameraRendering; + RenderPipelineManager.endCameraRendering += OnEndCameraRendering; + + // This event should not when not using the built-in renderer, but in some cases it can in the editor like + // when using scene filtering. + if (RenderPipelineHelper.IsLegacy) + { + Camera.onPreCull -= OnPreRenderCamera; + Camera.onPreCull += OnPreRenderCamera; + Camera.onPostRender -= OnPostRenderCamera; + Camera.onPostRender += OnPostRenderCamera; + } +#if d_UnityURP + else if (RenderPipelineHelper.IsUniversal) + { + ConfigureUniversalRenderer.Enable(this); + UniversalCopyWaterSurfaceDepth.Enable(this); + } +#endif + +#if UNITY_EDITOR + EnableWaterLevelDepthTexture(); +#endif + + Container.SetActive(true); + + if (_Underwater._Enabled) + { + _Underwater.OnEnable(); + } + +#if d_CrestPortals + if (_Portals._Enabled) + { + _Portals.OnEnable(); + } +#endif + + if (_Reflections._Enabled) + { + _Reflections.OnEnable(); + } + +#if UNITY_EDITOR + EditorApplication.update -= EditorUpdate; + EditorApplication.update += EditorUpdate; +#endif + } + + internal ScriptableRenderContext _Context; + + void OnBeginCameraRendering(ScriptableRenderContext context, Camera camera) + { +#if UNITY_EDITOR + UpdateLastActiveSceneCamera(camera); +#endif + + _Context = context; + + OnBeginCameraRendering(camera); + } + + void OnBeginCameraRendering(Camera camera) + { + if (_Underwater._Enabled) + { + _Underwater.OnBeforeCameraRender(camera); + } + +#if d_UnityHDRP + // This use to be in OnBeginContextRendering with comment: + // "Most compatible with lighting options if computed here" + // Cannot remember what that meant… + if (RenderPipelineHelper.IsHighDefinition) + { + var lightDirection = Vector3.zero; + var lightIntensity = Color.black; + var sun = PrimaryLight; + + if (sun != null && sun.isActiveAndEnabled && sun.TryGetComponent(out var data)) + { + lightDirection = -sun.transform.forward; + lightIntensity = Color.clear; + + // It was reported that Light.intensity causes flickering when updated with + // HDAdditionalLightData.SetIntensity, unless we get intensity from there. + { + // Adapted from Helpers.FinalColor. + var light = data; + var linear = GraphicsSettings.lightsUseLinearIntensity; + var color = linear ? light.color.linear : light.color; +#if UNITY_6000_0_OR_NEWER + color *= sun.intensity; +#else + color *= light.intensity; +#endif + if (linear && light.useColorTemperature) color *= Mathf.CorrelatedColorTemperatureToRGB(sun.colorTemperature); + if (!linear) color = color.MaybeLinear(); + lightIntensity = linear ? color.MaybeGamma() : color; + } + + // Transmittance is for Physically Based Sky. + var hdCamera = HDCamera.GetOrCreate(camera); + var settings = SkyManager.GetSkySetting(hdCamera.volumeStack); + var transmittance = settings != null + ? settings.EvaluateAtmosphericAttenuation(lightDirection, hdCamera.camera.transform.position) + : Vector3.one; + + lightIntensity *= transmittance.x; + lightIntensity *= transmittance.y; + lightIntensity *= transmittance.z; + } + + Shader.SetGlobalVector(ShaderIDs.s_PrimaryLightDirection, lightDirection); + Shader.SetGlobalVector(ShaderIDs.s_PrimaryLightIntensity, lightIntensity); + } +#endif + + if (_Reflections._Enabled) + { + _Reflections.OnPreRenderCamera(camera); + } + + if (!Helpers.MaskIncludesLayer(camera.cullingMask, Layer)) + { + return; + } + + var viewpoint = camera.transform.position; + _SampleHeightHelperPerCamera.SampleHeight(System.HashCode.Combine(GetHashCode(), camera.GetHashCode()), viewpoint, out var height, allowMultipleCallsPerFrame: true); + _ViewerHeightAboveWaterPerCamera = viewpoint.y - height; + + WritePerCameraMaterialParameters(); + } + + void OnEndCameraRendering(ScriptableRenderContext context, Camera camera) + { + OnEndCameraRendering(camera); + } + + void OnEndCameraRendering(Camera camera) + { + if (_Underwater._Enabled) + { + _Underwater.OnAfterCameraRender(camera); + } + + if (_Reflections._Enabled) + { + _Reflections.OnAfterCameraRender(camera); + } + } + + void OnActiveRenderPipelineTypeChanged() + { + if (isActiveAndEnabled) + { + Disable(); + Enable(); + } + } + + internal void Rebuild() + { + Disable(); + Destroy(); + OnEnable(); + } + + bool VerifyRequirements() + { + if (!RunningWithoutGraphics) + { + if (Application.platform == RuntimePlatform.WebGLPlayer) + { + Debug.LogError("Crest: Crest does not support WebGL backends.", this); + return false; + } +#if UNITY_EDITOR + if (SystemInfo.graphicsDeviceType is GraphicsDeviceType.OpenGLES3 or GraphicsDeviceType.OpenGLCore) + { + Debug.LogError("Crest: Crest does not support OpenGL backends.", this); + return false; + } +#endif + if (SystemInfo.graphicsShaderLevel < 45) + { + Debug.LogError("Crest: Crest requires graphics devices that support shader level 4.5 or above.", this); + return false; + } + if (!SystemInfo.supportsComputeShaders) + { + Debug.LogError("Crest: Crest requires graphics devices that support compute shaders.", this); + return false; + } + if (!SystemInfo.supports2DArrayTextures) + { + Debug.LogError("Crest: Crest requires graphics devices that support 2D array textures.", this); + return false; + } + } + + return true; + } + + int CalculateSettingsHash() + { + var settingsHash = Hash.CreateHash(); + + // Add all the settings that require rebuilding.. + Hash.AddInt(_Layer, ref settingsHash); + Hash.AddInt(_Resolution, ref settingsHash); + Hash.AddInt(_GeometryDownSampleFactor, ref settingsHash); + Hash.AddInt(_Slices, ref settingsHash); + Hash.AddFloat(_ExtentsSizeMultiplier, ref settingsHash); + Hash.AddBool(AllowRenderQueueSorting, ref settingsHash); + Hash.AddBool(CastShadows, ref settingsHash); + Hash.AddBool(WriteMotionVectors, ref settingsHash); + Hash.AddBool(_Debug._ForceBatchMode, ref settingsHash); + Hash.AddBool(_Debug._ForceNoGraphics, ref settingsHash); + Hash.AddBool(_Debug._ShowHiddenObjects, ref settingsHash); +#if CREST_DEBUG + Hash.AddBool(_Debug._DisableChunks, ref settingsHash); + Hash.AddBool(_Debug._DisableSkirt, ref settingsHash); + Hash.AddBool(_Debug._UniformTiles, ref settingsHash); +#endif + if (_ChunkTemplate != null) + { + Hash.AddObject(_ChunkTemplate, ref settingsHash); + } + + return settingsHash; + } + + void RunUpdate() + { + UnityEngine.Profiling.Profiler.BeginSample("Crest.WaterRenderer.RunUpdate"); + + // Rebuild if needed. Needs to run in builds (for MVs at the very least). + if (CalculateSettingsHash() != _GeneratedSettingsHash) + { + Rebuild(); + } + + _ViewCameraCached = Viewer; + + // Reset displacement reporting values. + // This is written to in Update, and read in LateUpdate (chunk) and LateUpdateScale. + MaximumHorizontalDisplacement = MaximumVerticalDisplacement = _MaximumVerticalDisplacementFromWaves = 0f; + + BroadcastUpdate(); + + if (!_Debug._DisableFollowViewpoint && _ViewCameraCached != null) + { + LateUpdatePosition(); + LateUpdateViewerHeight(); + LateUpdateScale(); + } + + // Set global shader params + Shader.SetGlobalFloat(ShaderIDs.s_Time, CurrentTime); + Shader.SetGlobalFloat(ShaderIDs.s_LodCount, LodLevels); + Shader.SetGlobalFloat(ShaderIDs.s_LodAlphaBlackPointFade, _LodAlphaBlackPointFade); + Shader.SetGlobalFloat(ShaderIDs.s_LodAlphaBlackPointWhitePointFade, _LodAlphaBlackPointWhitePointFade); + + // HDRP will automatically disable this pass for the water shader for unknown reasons. It might be that we + // are sampling from the depth texture does not work with shadow casting. + if (RenderPipelineHelper.IsHighDefinition && Material != null) + { + Material.SetShaderPassEnabled("ShadowCaster", CastShadows); + } + +#if UNITY_6000_0_OR_NEWER + // Motion Vectors (URP). Shader Graph introduced the necessary toggle in U6. + if (Application.isPlaying && RenderPipelineHelper.IsUniversal && WriteMotionVectors && _Material != null) + { + if (_MotionVectorsMaterial.shader != _Material.shader) + { + SetUpMotionVectorsMaterial(); + } + + _MotionVectorsMaterial.CopyMatchingPropertiesFromMaterial(_Material); + _MotionVectorsMaterial.renderQueue = (int)RenderQueue.Geometry; + _MotionVectorsMaterial.SetOverrideTag("RenderType", "Opaque"); + _MotionVectorsMaterial.SetFloat(ShaderIDs.s_Surface, 0); // SurfaceType.Opaque + _MotionVectorsMaterial.SetFloat(ShaderIDs.s_SrcBlend, 1); + _MotionVectorsMaterial.SetFloat(ShaderIDs.s_DstBlend, 0); + } +#endif + + // Needs updated transform values like scale. + WritePerFrameMaterialParams(); + + SimulationBuffer.Clear(); + + // Construct the command buffer and attach it to the camera so that it will be executed in the render. +#if UNITY_EDITOR + if (Application.isPlaying || !_ShowWaterProxyPlane) +#endif + { + foreach (var simulation in Simulations) + { + if (!simulation.Enabled) continue; + simulation.BuildCommandBuffer(this, SimulationBuffer); + } + + // This will execute at the beginning of the frame before the graphics queue. + Graphics.ExecuteCommandBuffer(SimulationBuffer); + + base.LateUpdate(); + + // Call after LateUpdate so chunk bounds are updated. + LateUpdateTiles(); + + if (_Underwater._Enabled) + { + _Underwater.LateUpdate(); + } + + if (_Reflections._Enabled && !_Reflections.SupportsRecursiveRendering) + { + _Reflections.LateUpdate(); + } + + LastUpdateFrame = FrameCount; + } + + // Run queries at end of update. For CollProviderBakedFFT calling this kicks off + // collision processing job, and the next call to Query() will force a complete, and + // we don't want that to happen until they've had a chance to run, so schedule them + // late. + if (AnimatedWavesLod.CollisionSource == CollisionSource.CPU) + { + AnimatedWavesLod.Provider?.UpdateQueries(this); + } + + _IsFirstFrameSinceEnabled = false; + + UnityEngine.Profiling.Profiler.EndSample(); + } + + void WritePerCameraMaterialParameters() + { + if (Material != null) + { + // Override isFrontFace when camera is far enough from the water surface to fix self-intersecting waves. + // Hack - due to SV_IsFrontFace occasionally coming through as true for back faces, + // add a param here that forces water to be in underwater state. I think the root + // cause here might be imprecision or numerical issues at water tile boundaries, although + // i'm not sure why cracks are not visible in this case. + var height = _ViewerHeightAboveWaterPerCamera; + var value = (int)_SurfaceSelfIntersectionFixMode; + + switch (_SurfaceSelfIntersectionFixMode) + { + case SurfaceSelfIntersectionFixMode.On: + value = height < -2f ? 1 : height > 2f ? 2 : 0; + break; + case SurfaceSelfIntersectionFixMode.Automatic: + // Skip for portals as it is possible to see both sides of the surface at any position. + value = Portaled ? 0 : height < -2f ? 1 : height > 2f ? 2 : 0; + break; + } + + Shader.SetGlobalInteger(ShaderIDs.s_ForceUnderwater, value); + } + } + + void WritePerFrameMaterialParams() + { + _CascadeData.Flip(); + + // Update rendering parameters. + { + for (var slice = 0; slice < LodLevels; slice++) + { + var scale = CalcLodScale(slice); + _CascadeData.Current[slice].x = scale; + _CascadeData.Current[slice].y = 1f; + _CascadeData.Current[slice].z = MaximumWavelength(slice); + + _ProjectionMatrix[slice] = Matrix4x4.Ortho(-2f * scale, 2f * scale, -2f * scale, 2f * scale, 1f, k_RenderAboveSeaLevel + k_RenderBelowSeaLevel); + if (slice == 0) Shader.SetGlobalFloat(ShaderIDs.s_Scale, scale); + } + + // Duplicate last element so that things can safely read off the end of the cascades + _CascadeData.Current[LodLevels] = _CascadeData.Current[LodLevels - 1]; + _CascadeData.Current[LodLevels].y = 0f; + } + + Shader.SetGlobalVectorArray(ShaderIDs.s_CascadeData, _CascadeData.Current); + Shader.SetGlobalVectorArray(ShaderIDs.s_CascadeDataSource, _CascadeData.Previous(1)); + + _PerCascadeInstanceData.Flip(); + WritePerCascadeInstanceData(_PerCascadeInstanceData); + } + + void WritePerCascadeInstanceData(BufferedData instanceData) + { + for (var lodIdx = 0; lodIdx < LodLevels; lodIdx++) + { + // blend LOD 0 shape in/out to avoid pop, if the water might scale up later (it is smaller than its maximum scale) + var needToBlendOutShape = lodIdx == 0 && ScaleCouldIncrease; + instanceData.Current[lodIdx]._MeshScaleLerp = needToBlendOutShape ? ViewerAltitudeLevelAlpha : 0f; + + // blend furthest normals scale in/out to avoid pop, if scale could reduce + var needToBlendOutNormals = lodIdx == LodLevels - 1 && ScaleCouldDecrease; + instanceData.Current[lodIdx]._FarNormalsWeight = needToBlendOutNormals ? ViewerAltitudeLevelAlpha : 1f; + + // geometry data + // compute grid size of geometry. take the long way to get there - make sure we land exactly on a power of two + // and not inherit any of the lossy-ness from lossyScale. + var scale = CalcLodScale(lodIdx); + instanceData.Current[lodIdx]._GeometryGridWidth = scale / (0.25f * _Resolution / _GeometryDownSampleFactor); + + var mul = 1.875f; // fudge 1 + var pow = 1.4f; // fudge 2 + var texelWidth = instanceData.Current[lodIdx]._GeometryGridWidth / _GeometryDownSampleFactor; + instanceData.Current[lodIdx]._NormalScrollSpeeds[0] = Mathf.Pow(Mathf.Log(1f + 2f * texelWidth) * mul, pow); + instanceData.Current[lodIdx]._NormalScrollSpeeds[1] = Mathf.Pow(Mathf.Log(1f + 4f * texelWidth) * mul, pow); + } + } + +#if UNITY_6000_0_OR_NEWER + void SetUpMotionVectorsMaterial() + { + if (_MotionVectorsMaterial != null) Helpers.Destroy(_MotionVectorsMaterial); + _MotionVectorsMaterial = CoreUtils.CreateEngineMaterial(_Material.shader); + _MotionVectorsMaterial.SetShaderPassEnabled("UniversalForward", false); + _MotionVectorsMaterial.SetShaderPassEnabled("UniversalGBuffer", false); + _MotionVectorsMaterial.SetShaderPassEnabled("ShadowCaster", false); + _MotionVectorsMaterial.SetShaderPassEnabled("DepthOnly", false); + _MotionVectorsMaterial.SetShaderPassEnabled("DepthNormals", false); + _MotionVectorsMaterial.SetShaderPassEnabled("Meta", false); + _MotionVectorsMaterial.SetShaderPassEnabled("SceneSelectionPass", false); + _MotionVectorsMaterial.SetShaderPassEnabled("Picking", false); + _MotionVectorsMaterial.SetShaderPassEnabled("Universal2D", false); + _MotionVectorsMaterial.SetShaderPassEnabled("MotionVectors", true); + } +#endif + + void LateUpdatePosition() + { + var pos = Viewpoint.position; + + // maintain y coordinate - sea level + pos.y = Root.position.y; + + // Don't land very close to regular positions where things are likely to snap to, because different tiles might + // land on either side of a snap boundary due to numerical error and snap to the wrong positions. Nudge away from + // common by using increments of 1/60 which have lots of factors. + // :WaterGridPrecisionErrors + if (Mathf.Abs(pos.x * 60f - Mathf.Round(pos.x * 60f)) < 0.001f) + { + pos.x += 0.002f; + } + if (Mathf.Abs(pos.z * 60f - Mathf.Round(pos.z * 60f)) < 0.001f) + { + pos.z += 0.002f; + } + + Shader.SetGlobalVector(ShaderIDs.s_CenterDelta, pos - Root.position); + + Root.position = pos; + Shader.SetGlobalVector(ShaderIDs.s_Center, Root.position); + } + + void LateUpdateScale() + { + var viewerHeight = _ViewpointHeightAboveWaterSmooth; + + // Reach maximum detail at slightly below sea level. this should combat cases where visual range can be lost + // when water height is low and camera is suspended in air. i tried a scheme where it was based on difference + // to water height but this does help with the problem of horizontal range getting limited at bad times. + viewerHeight += _MaximumVerticalDisplacementFromWaves * _DropDetailHeightBasedOnWaves; + + var camDistance = Mathf.Abs(viewerHeight); + + // offset level of detail to keep max detail in a band near the surface + camDistance = Mathf.Max(camDistance - 4f, 0f); + + // scale water mesh based on camera distance to sea level, to keep uniform detail. + var level = camDistance; + level = Mathf.Max(level, _ScaleRange.x); + if (_ScaleRange.y < Mathf.Infinity) level = Mathf.Min(level, 1.99f * _ScaleRange.y); + + var l2 = Mathf.Log(level) / Mathf.Log(2f); + var l2f = Mathf.Floor(l2); + + ViewerAltitudeLevelAlpha = l2 - l2f; + + var newScale = Mathf.Pow(2f, l2f); + + if (Scale > 0f) + { + var ratio = newScale / Scale; + var ratioL2 = Mathf.Log(ratio) / Mathf.Log(2f); + ScaleDifferencePower2 = Mathf.RoundToInt(ratioL2); + Shader.SetGlobalFloat(ShaderIDs.s_LodChange, ScaleDifferencePower2); + Shader.SetGlobalFloat(ShaderIDs.s_ScaleChange, ratio); + +#if UNITY_EDITOR +#if CREST_DEBUG + if (ratio != 1f) + { + EditorApplication.isPaused = EditorApplication.isPaused || _Debug._PauseOnScaleChange; + if (_Debug._LogScaleChange) Debug.Log($"Scale Change: {newScale} / {Scale} = {ratio}"); + } +#endif +#endif + } + + Scale = newScale; + + Root.localScale = new(Scale, 1f, Scale); + + // LOD 0 is blended in/out when scale changes, to eliminate pops. Here we set it as + // a global, whereas in WaterChunkRenderer it is applied to LOD0 tiles only through + // instance data. This global can be used in compute, where we only apply this + // factor for slice 0. + Shader.SetGlobalFloat(ShaderIDs.s_MeshScaleLerp, ScaleCouldIncrease ? ViewerAltitudeLevelAlpha : 0f); + } + + void LateUpdateViewerHeight() + { + var viewpoint = Viewpoint; + + _SampleHeightHelper.SampleHeight(viewpoint.position, out var waterHeight); + ViewerHeightAboveWater = ViewpointHeightAboveWater = viewpoint.position.y - waterHeight; + + var viewerHeightAboveWaterOrTerrain = ViewpointHeightAboveWater; + + if (viewpoint != _ViewCameraCached.transform) + { + var viewer = _ViewCameraCached.transform; + // Reuse sampler. Combine hash codes to avoid pontential conflict. + _SampleHeightHelper.SampleHeight(System.HashCode.Combine(GetHashCode(), viewer.GetHashCode()), viewpoint.position, out waterHeight, allowMultipleCallsPerFrame: true); + ViewerHeightAboveWater = viewer.position.y - waterHeight; + } + + // Also use terrain height for scale. Viewpoint is absolute if set. + if (_SampleTerrainHeightForScale && LevelLod.Enabled && _Viewpoint == null) + { + var viewerPosition = viewpoint.position; + var viewerHeight = viewerPosition.y; + + var viewerHeightAboveTerrain = Mathf.Infinity; + var terrain = Helpers.GetTerrainAtPosition(viewerPosition.XZ()); + if (terrain != null) + { + var terrainHeight = terrain.GetPosition().y + terrain.SampleHeight(viewerPosition); + var heightAbove = viewerHeight - terrainHeight; + + // Ignore if viewer is under terrain. + if (heightAbove >= 0f) + { + viewerHeightAboveTerrain = heightAbove; + } + } + + if (viewerHeightAboveTerrain < Mathf.Abs(viewerHeightAboveWaterOrTerrain)) + { + viewerHeightAboveWaterOrTerrain = viewerHeightAboveTerrain; + } + } + + // Calculate teleport distance and create window for height queries to return a height change. + { + if (_TeleportTimerForHeightQueries > 0f) + { + _TeleportTimerForHeightQueries -= Time.deltaTime; + } + + var hasTeleported = _IsFirstFrameSinceEnabled; + if (!_IsFirstFrameSinceEnabled) + { + // Find the distance. Adding the FO offset will exclude FO shifts so we can determine a normal teleport. + // FO shifts are visually the same position and it is incorrect to treat it as a normal teleport. + var teleportDistanceSqr = (_OldViewpointPosition - viewpoint.position - TeleportOriginThisFrame).sqrMagnitude; + // Threshold as sqrMagnitude. + var thresholdSqr = _TeleportThreshold * _TeleportThreshold; + hasTeleported = teleportDistanceSqr > thresholdSqr; + } + + if (hasTeleported) + { + // Height queries can take a few frames so a one second window should be plenty. + _TeleportTimerForHeightQueries = 1f; + } + + _HasTeleportedThisFrame = hasTeleported; + + _OldViewpointPosition = viewpoint.position; + } + + // Smoothly varying version of viewer height to combat sudden changes in water level that are possible + // when there are local bodies of water + _ViewpointHeightAboveWaterSmooth = Mathf.Lerp + ( + _ViewpointHeightAboveWaterSmooth, + viewerHeightAboveWaterOrTerrain, + _TeleportTimerForHeightQueries > 0f || !(_ForceScaleChangeSmoothing || (LevelLod.Enabled && !_SampleTerrainHeightForScale)) ? 1f : 0.05f + ); + +#if CREST_DEBUG + if (_Debug._IgnoreWavesForScaleChange) + { + _ViewpointHeightAboveWaterSmooth = Viewpoint.transform.position.y - SeaLevel; + } +#endif + + _SampleDepthHelper.SampleDistanceToWaterEdge(_ViewCameraCached.transform.position, out var distance); + ViewerDistanceToShoreline = distance; + } + + void LateUpdateTiles() + { + var canSkipCulling = WaterBody.WaterBodies.Count == 0 && _CanSkipCulling; + + foreach (var tile in Chunks) + { + if (tile.Rend == null) + { + continue; + } + + tile._Culled = false; + tile.MaterialOverridden = false; + + // If there are local bodies of water, this will do overlap tests between the water tiles + // and the water bodies and turn off any that don't overlap. + if (!canSkipCulling) + { + var chunkBounds = tile.Rend.bounds; + var chunkUndisplacedBoundsXZ = tile.UnexpandedBoundsXZ; + + var largestOverlap = 0f; + var overlappingOne = false; + foreach (var body in WaterBody.WaterBodies) + { + // If tile has already been excluded from culling, then skip this iteration. But finish this + // iteration if the water body has a material override to work out most influential water body. + if (overlappingOne && body.AboveSurfaceMaterial == null) + { + continue; + } + + var bounds = body.AABB; + + var overlapping = + bounds.max.x > chunkBounds.min.x && bounds.min.x < chunkBounds.max.x && + bounds.max.z > chunkBounds.min.z && bounds.min.z < chunkBounds.max.z; + if (overlapping) + { + overlappingOne = true; + + if (body.AboveSurfaceMaterial != null) + { + var overlap = 0f; + { + // Use the unexpanded bounds to prevent leaking as generally this feature will be + // for an inland body of water where hopefully there is attenuation between it and + // the water to handle the water's displacement. The inland water body will unlikely + // have large displacement but can be mitigated with a decent buffer zone. + var xMin = Mathf.Max(bounds.min.x, chunkUndisplacedBoundsXZ.min.x); + var xMax = Mathf.Min(bounds.max.x, chunkUndisplacedBoundsXZ.max.x); + var zMin = Mathf.Max(bounds.min.z, chunkUndisplacedBoundsXZ.min.y); + var zMax = Mathf.Min(bounds.max.z, chunkUndisplacedBoundsXZ.max.y); + if (xMin < xMax && zMin < zMax) + { + overlap = (xMax - xMin) * (zMax - zMin); + } + } + + // If this water body has the most overlap, then the chunk will get its material. + if (overlap > largestOverlap) + { + tile.Rend.sharedMaterial = body.AboveSurfaceMaterial; + tile.MaterialOverridden = true; + largestOverlap = overlap; + } + } + else + { + tile.MaterialOverridden = false; + } + } + } + + tile._Culled = _WaterBodyCulling && !overlappingOne && WaterBody.WaterBodies.Count > 0; + } + + tile.Rend.enabled = !tile._Culled; + } + + // Can skip culling next time around if water body count stays at 0 + _CanSkipCulling = WaterBody.WaterBodies.Count == 0; + } + + void Destroy() + { + foreach (var simulation in Simulations) + { + if (!simulation.Enabled) continue; + simulation.Destroy(); + } + Simulations.Clear(); + + // Clean up modules. +#if d_CrestPortals + _Portals.OnDestroy(); +#endif + _Underwater.OnDestroy(); + _Reflections.OnDestroy(); + + // Clean up everything created through the Water Builder. + WaterBuilder.CleanUp(this); + Root = null; + + if (Container) + { + Helpers.Destroy(Container); + Container = null; + } + + Chunks.Clear(); + +#if UNITY_6000_0_OR_NEWER + Helpers.Destroy(_MotionVectorsMaterial); +#endif + + _Initialized = false; + } + + private protected override void Disable() + { + foreach (var simulation in Simulations) + { + simulation.SetGlobals(enable: false); + if (!simulation.Enabled) continue; + simulation.Disable(); + } + + if (RenderPipelineHelper.IsLegacy && Viewer != null) + { + // Need to call to prevent crash. + OnPostRenderCamera(Viewer); + } + +#if UNITY_EDITOR + EditorApplication.update -= EditorUpdate; +#endif + + Camera.onPreCull -= OnPreRenderCamera; + Camera.onPostRender -= OnPostRenderCamera; + +#if d_UnityURP + ConfigureUniversalRenderer.Disable(); + UniversalCopyWaterSurfaceDepth.Disable(); +#endif + +#if d_WaveHarmonic_Crest_ShiftingOrigin + ShiftingOrigin.OnShift -= OnOriginShift; +#endif + + RenderPipelineManager.beginCameraRendering -= OnBeginCameraRendering; + RenderPipelineManager.endCameraRendering -= OnEndCameraRendering; + RenderPipelineManager.activeRenderPipelineTypeChanged -= OnActiveRenderPipelineTypeChanged; + +#if d_CrestPortals + if (_Portals._Enabled) _Portals.OnDisable(); +#endif + if (_Underwater._Enabled) _Underwater.OnDisable(); + if (_Reflections._Enabled) _Reflections.OnDisable(); + +#if UNITY_EDITOR + DisableWaterLevelDepthTexture(); +#endif + + if (Container != null) + { + Container.SetActive(false); + } + + base.Disable(); + } + + /// + /// Notify water of origin shift + /// + void OnOriginShift(Vector3 newOrigin) + { + foreach (var simulation in Simulations) + { + if (!simulation.Enabled) continue; + simulation.SetOrigin(newOrigin); + } + } + + /// + /// Clears persistent LOD data. Some simulations have persistent data which can linger for a little while after + /// being disabled. This will manually clear that data. + /// + void ClearLodData() + { + foreach (var simulation in Simulations) + { + if (!simulation.Enabled) continue; + simulation.ClearLodData(); + } + } + } + +#if CREST_DEBUG +#if UNITY_EDITOR + // Tests. + partial class WaterRenderer + { + internal bool _SkipForTesting; + + private protected override void FixedUpdate() + { + if (_SkipForTesting) + { + return; + } + + base.FixedUpdate(); + } + + internal void TestFixedUpdate() + { + _SkipForTesting = false; + FixedUpdate(); + _SkipForTesting = true; + } + + internal void TestLateUpdate() + { + _SkipForTesting = false; + LateUpdate(); + _SkipForTesting = true; + } + } +#endif +#endif +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/WaterRenderer.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/WaterRenderer.cs.meta new file mode 100644 index 000000000..e913a641a --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/WaterRenderer.cs.meta @@ -0,0 +1,19 @@ +fileFormatVersion: 2 +guid: e64c239f69eea46778ded6dcc3427a34 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: + - _Camera: {instanceID: 0} + - _TimeProvider: {instanceID: 0} + - _PrimaryLight: {instanceID: 0} + - _Material: {fileID: 2100000, guid: 8ab064b6606504a55b489af2787350c2, type: 2} + - _ChunkTemplate: {fileID: 1516456258233481520, guid: 17840562212c147d6bdb5144d35bc442, + type: 3} + - _Viewpoint: {instanceID: 0} + - _Resources: {fileID: 11400000, guid: 0817af17dea584e5382e6216db162d4a, type: 2} + executionOrder: 200 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/WaterResources.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/WaterResources.cs new file mode 100644 index 000000000..db46dce27 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/WaterResources.cs @@ -0,0 +1,202 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using System; +using UnityEngine; +using UnityEngine.Rendering; + +namespace WaveHarmonic.Crest +{ +#if CREST_DEBUG + [CreateAssetMenu(menuName = "Crest/Resources")] +#endif + + [ExecuteAlways, Utility.FilePath("Packages/com.waveharmonic.crest/Runtime/Settings/Resources.asset")] + [@HelpURL("Manual/Scripting.html#resources")] + sealed class WaterResources : Utility.ScriptableSingleton + { + [Serializable] + public sealed class ShaderResources + { + // Caches camera depth as water depth. + public Shader _CopyDepthIntoCache; + + public Shader _ColorSpline; + public Shader _FlowSpline; + public Shader _FoamSpline; + public Shader _WaveSpline; + + public Shader _DepthGeometry; + public Shader _LevelGeometry; + + public Shader _UpdateShadow; + + public Shader _UnderwaterEffect; + public Shader _UnderwaterMask; + public Shader _Portals; + + public Shader _ClipConvexHull; + + public Shader _ShallowWaterSimulationVisualizer; + + public Shader _DebugTextureArray; + public Shader _Blit; + } + + [Serializable] + public sealed class ComputeResources + { + public ComputeShader _UnderwaterArtifacts; + public ComputeShader _ShapeWavesTransfer; + + public ComputeShader _Query; + + public ComputeShader _Gerstner; + public ComputeShader _FFT; + public ComputeShader _FFTBake; + public ComputeShader _FFTSpectrum; + + public ComputeShader _ShapeCombine; + public ComputeShader _ShorelineColor; + public ComputeShader _UpdateDynamicWaves; + public ComputeShader _UpdateFoam; + public ComputeShader _PackLevel; + + public ComputeShader _AbsorptionTexture; + public ComputeShader _ClipTexture; + public ComputeShader _FlowTexture; + public ComputeShader _FoamTexture; + public ComputeShader _LevelTexture; + public ComputeShader _DepthTexture; + public ComputeShader _ScatteringTexture; + + public ComputeShader _ClipPrimitive; + public ComputeShader _SphereWaterInteraction; + + public ComputeShader _RenderDepthProbe; + public ComputeShader _JumpFloodSDF; + + public ComputeShader _UpdateSWS; + + public ComputeShader _Whirlpool; + + public ComputeShader _Clear; + } + +#pragma warning disable IDE0032 // Use auto property + + [SerializeField] + ShaderResources _Shaders = new(); + public ShaderResources Shaders => _Shaders; + + [SerializeField] + ComputeResources _Compute = new(); + +#pragma warning restore IDE0032 // Use auto property + + public ComputeResources Compute => _Compute; + + public KeywordResources Keywords { get; } = new(); + + public sealed class KeywordResources + { + public LocalKeyword AnimatedWavesTransferWavesTexture { get; private set; } + public LocalKeyword AnimatedWavesTransferWavesTextureBlend { get; private set; } + public LocalKeyword ClipPrimitiveInverted { get; private set; } + public LocalKeyword ClipPrimitiveSphere { get; private set; } + public LocalKeyword ClipPrimitiveCube { get; private set; } + public LocalKeyword ClipPrimitiveRectangle { get; private set; } + public LocalKeyword DepthTextureSDF { get; private set; } + public LocalKeyword ShorelineColorSourceDistance { get; private set; } + public LocalKeyword ShorelineColorScattering { get; private set; } + public LocalKeyword LevelTextureCatmullRom { get; private set; } + public LocalKeyword DepthProbeBackFaceInclusion { get; private set; } + public LocalKeyword JumpFloodInverted { get; private set; } + public LocalKeyword JumpFloodStandalone { get; private set; } + + internal void Initialize(WaterResources resources) + { + var compute = resources.Compute; + + { + var keywords = compute._ShapeWavesTransfer.keywordSpace; + AnimatedWavesTransferWavesTexture = keywords.FindKeyword("d_Texture"); + AnimatedWavesTransferWavesTextureBlend = keywords.FindKeyword("d_TextureBlend"); + } + + { + var keywords = compute._ClipPrimitive.keywordSpace; + ClipPrimitiveInverted = keywords.FindKeyword("d_Inverted"); + ClipPrimitiveSphere = keywords.FindKeyword("d_Sphere"); + ClipPrimitiveCube = keywords.FindKeyword("d_Cube"); + ClipPrimitiveRectangle = keywords.FindKeyword("d_Rectangle"); + } + + { + var keywords = compute._DepthTexture.keywordSpace; + DepthTextureSDF = keywords.FindKeyword("d_CrestSDF"); + } + + { + var keywords = compute._LevelTexture.keywordSpace; + LevelTextureCatmullRom = keywords.FindKeyword("d_CatmullRom"); + } + + { + var keywords = compute._RenderDepthProbe.keywordSpace; + DepthProbeBackFaceInclusion = keywords.FindKeyword("d_Crest_BackFaceInclusion"); + } + + { + var keywords = compute._JumpFloodSDF.keywordSpace; + JumpFloodInverted = keywords.FindKeyword("d_Crest_Inverted"); + JumpFloodStandalone = keywords.FindKeyword("d_Crest_Standalone"); + } + + { + var keywords = compute._ShorelineColor.keywordSpace; + ShorelineColorSourceDistance = keywords.FindKeyword("d_Crest_ShorelineColorSource_ShorelineDistance"); + ShorelineColorScattering = keywords.FindKeyword("d_Crest_ShorelineScattering"); + } + } + } + + public event Action AfterEnabled; + + void OnEnable() + { +#if !CREST_DEBUG + hideFlags = HideFlags.NotEditable; +#endif + Keywords.Initialize(this); + + AfterEnabled?.Invoke(); + } + +#if UNITY_EDITOR + // AssetPostprocessor cannot be nested in a generic type so this cannot be moved to abstraction. + sealed class AssetPostprocessor : UnityEditor.AssetPostprocessor + { + static void OnPostprocessAllAssets(string[] imported, string[] deleted, string[] movedTo, string[] movedFrom, bool domainReload) + { + // Unused. + _ = imported; _ = deleted; _ = movedTo; _ = movedFrom; + + if (domainReload) + { + LoadFromAsset(); + } + + foreach (var path in imported) + { + if (path.StartsWith("Packages/com.waveharmonic.crest") && path.EndsWith(".compute")) + { + // Unity loses these if the compute shader is recompiled. + Instance.Keywords.Initialize(Instance); + } + } + } + } +#endif + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/WaterResources.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/WaterResources.cs.meta new file mode 100644 index 000000000..db8ff835b --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/WaterResources.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ba9588a2660f342409c82a6ff9e95a88 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Watercraft.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Watercraft.meta new file mode 100644 index 000000000..549d75610 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Watercraft.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2c0bbe6ad1be44d16b7936354667cd99 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Watercraft/Assembly.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Watercraft/Assembly.cs new file mode 100644 index 000000000..78266a06e --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Watercraft/Assembly.cs @@ -0,0 +1,9 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Watercraft.Editor")] + +// Define empty namespaces for when assemblies are not present. +namespace UnityEngine.InputSystem { } diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Watercraft/Assembly.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Watercraft/Assembly.cs.meta new file mode 100644 index 000000000..8f5cca10f --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Watercraft/Assembly.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1bffa516b4213411d9773d8f0213b3fa +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Watercraft/Controller.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Watercraft/Controller.cs new file mode 100644 index 000000000..ef9ad0f66 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Watercraft/Controller.cs @@ -0,0 +1,108 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using WaveHarmonic.Crest.Internal; + +namespace WaveHarmonic.Crest.Watercraft +{ + /// + /// A simple watercraft controlller. + /// + [@HelpURL("Manual/FloatingObjects.html#movement-controller")] + [AddComponentMenu(Constants.k_MenuPrefixPhysics + "Watercraft Controller")] + public sealed partial class Controller : ManagedBehaviour + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + + [Tooltip("The accompanied buoyancy script.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + FloatingObject _FloatingObject; + + [Tooltip("The accompanied control script to take input from.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + Control _Control; + + [Tooltip("Vertical offset from the center of mass for where move force should be applied.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + float _ForceHeightOffset; + + [Tooltip("How quickly the watercraft moves from thrust.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + float _ThrustPower = 10f; + + [Tooltip("How quickly the watercraft turns from steering.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + float _SteerPower = 1f; + + [Tooltip("Rolls the watercraft when turning.")] + [@Range(0, 1)] + [@GenerateAPI] + [SerializeField] + float _TurningHeel = 0.35f; + + [Tooltip("Applies a curve to buoyancy changes.")] + [@GenerateAPI] + [@DecoratedField, SerializeField] + AnimationCurve _BuoyancyCurveFactor = new(new Keyframe[] { new(0, 0, 0.01267637f, 0.01267637f), + new(0.6626424f, 0.1791001f, 0.8680198f, 0.8680198f), new(1, 1, 3.38758f, 3.38758f) }); + + float _BuoyancyFactor = 1f; + + private protected override void OnStart() + { + base.OnStart(); + + if (_Control == null) _Control = GetComponent(); + if (_FloatingObject == null) _FloatingObject = GetComponent(); + } + + private protected override System.Action OnFixedUpdateMethod => OnFixedUpdate; + void OnFixedUpdate(WaterRenderer water) + { + if (!_FloatingObject.InWater) return; + + UnityEngine.Profiling.Profiler.BeginSample("WaveHarmonic.Crest.Watercraft.Controller.FixedUpdate"); + + var input = _Control.Input; + var rb = _FloatingObject.RigidBody; + + // Thrust + var forcePosition = rb.worldCenterOfMass + _ForceHeightOffset * Vector3.up; + rb.AddForceAtPosition(_ThrustPower * input.z * transform.forward, forcePosition, ForceMode.Acceleration); + + // Steer + var rotation = transform.up + _TurningHeel * transform.forward; + rb.AddTorque(_SteerPower * input.x * rotation, ForceMode.Acceleration); + + if (input.y > 0f) + { + if (_BuoyancyFactor < 1f) + { + _BuoyancyFactor += Time.deltaTime * 0.1f; + _BuoyancyFactor = Mathf.Clamp(_BuoyancyFactor, 0f, 1f); + _FloatingObject.BuoyancyForceStrength = _BuoyancyCurveFactor.Evaluate(_BuoyancyFactor); + } + } + else if (input.y < 0f) + { + if (_BuoyancyFactor > 0f) + { + _BuoyancyFactor -= Time.deltaTime * 0.1f; + _BuoyancyFactor = Mathf.Clamp(_BuoyancyFactor, 0f, 1f); + _FloatingObject.BuoyancyForceStrength = _BuoyancyCurveFactor.Evaluate(_BuoyancyFactor); + } + } + + UnityEngine.Profiling.Profiler.EndSample(); + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Watercraft/Controller.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Watercraft/Controller.cs.meta new file mode 100644 index 000000000..0fc39dacf --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Watercraft/Controller.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9310a3e8fdd024e06bb9d6970db822d2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Watercraft/Controls.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Watercraft/Controls.meta new file mode 100644 index 000000000..22090a83a --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Watercraft/Controls.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 71af4d3eb2cd144ac8e2485d50a7a191 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Watercraft/Controls/Control.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Watercraft/Controls/Control.cs new file mode 100644 index 000000000..8494d67e4 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Watercraft/Controls/Control.cs @@ -0,0 +1,19 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; + +namespace WaveHarmonic.Crest.Watercraft +{ + /// + /// Controls provide input whether from the player or otherwise. Extend to + /// implement a control. See derived classes for examples. + /// + public abstract class Control : MonoBehaviour + { + /// + /// Provides input for controllers. XYZ is steer, float and drive respectively. + /// + public abstract Vector3 Input { get; } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Watercraft/Controls/Control.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Watercraft/Controls/Control.cs.meta new file mode 100644 index 000000000..4650b5750 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Watercraft/Controls/Control.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5fd02b3521bc4486ea93e5a060580a53 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Watercraft/Controls/FixedControl.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Watercraft/Controls/FixedControl.cs new file mode 100644 index 000000000..d90ebee5c --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Watercraft/Controls/FixedControl.cs @@ -0,0 +1,35 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; + +namespace WaveHarmonic.Crest.Watercraft +{ + /// + /// Constantly moves/turns. + /// + [AddComponentMenu(Constants.k_MenuPrefixPhysics + "Watercraft Control (Constant)")] + public sealed partial class FixedControl : Control + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + + [@GenerateAPI] + [Tooltip("Constantly move."), SerializeField] + float _Move = 0; + + [@GenerateAPI] + [Tooltip("Constantly turn."), SerializeField] + float _Turn = 0; + +#pragma warning disable UNT0001 + // Here to force the checkbox to show. + void Start() { } +#pragma warning restore UNT0001 + + /// + public override Vector3 Input => isActiveAndEnabled ? new(_Turn, 0f, _Move) : Vector3.zero; + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Watercraft/Controls/FixedControl.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Watercraft/Controls/FixedControl.cs.meta new file mode 100644 index 000000000..6b79660fc --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Watercraft/Controls/FixedControl.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3a0773b7cb9424ddb87749b40d94c1ce +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/WaveHarmonic.Crest.asmdef b/Packages/com.waveharmonic.crest/Runtime/Scripts/WaveHarmonic.Crest.asmdef new file mode 100644 index 000000000..1c2fcf618 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/WaveHarmonic.Crest.asmdef @@ -0,0 +1,76 @@ +{ + "name": "WaveHarmonic.Crest", + "rootNamespace": "", + "references": [ + "GUID:75469ad4d38634e559750d17036d5f7c", + "GUID:df380645f10b7bc4b97d4f5eb6303d95", + "GUID:457756d89b35d2941b3e7b37b4ece6f1", + "GUID:15fc0a57446b3144c949da3e2b9737a9", + "GUID:27619889b8ba8c24980f49ee34dbb44a", + "GUID:056ff2a5b2f124d468c6655552acdca5", + "GUID:1ab2a6c2a51cd4b43867788dbaee1a55", + "GUID:2342e6f66b7fd461bb1346f13f99f4a7" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [ + "UNITY_2022_3_OR_NEWER" + ], + "versionDefines": [ + { + "name": "com.unity.modules.director", + "expression": "", + "define": "d_ModuleUnityDirector" + }, + { + "name": "com.unity.modules.vr", + "expression": "", + "define": "d_UnityModuleVR" + }, + { + "name": "com.unity.inputsystem", + "expression": "", + "define": "d_UnityInputSystem" + }, + { + "name": "com.unity.render-pipelines.core", + "expression": "", + "define": "d_UnitySRP" + }, + { + "name": "com.unity.render-pipelines.high-definition", + "expression": "", + "define": "d_UnityHDRP" + }, + { + "name": "com.unity.render-pipelines.universal", + "expression": "", + "define": "d_UnityURP" + }, + { + "name": "com.waveharmonic.crest.paint", + "expression": "", + "define": "d_CrestPaint" + }, + { + "name": "com.waveharmonic.crest.splines", + "expression": "", + "define": "d_CrestSpline" + }, + { + "name": "com.waveharmonic.crest.portals", + "expression": "", + "define": "d_CrestPortals" + }, + { + "name": "com.waveharmonic.crest.shifting-origin", + "expression": "", + "define": "d_WaveHarmonic_Crest_ShiftingOrigin" + } + ], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/WaveHarmonic.Crest.asmdef.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/WaveHarmonic.Crest.asmdef.meta new file mode 100644 index 000000000..d12a2adba --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/WaveHarmonic.Crest.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 7c347618730f5467f86a58f333ce21df +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Waves.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Waves.meta new file mode 100644 index 000000000..63365e898 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Waves.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 97c17ec5330f147f6bcad489f8e90a97 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Waves/FFTCompute.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Waves/FFTCompute.cs new file mode 100644 index 000000000..a7a950da1 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Waves/FFTCompute.cs @@ -0,0 +1,426 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// Inspired by https://github.com/speps/GX-EncinoWaves + +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Experimental.Rendering; +using UnityEngine.Rendering; + +namespace WaveHarmonic.Crest +{ + /// + /// Runs FFT to generate water surface displacements + /// + sealed class FFTCompute + { + // Must match 'SIZE' param of first kernel in FFTCompute.compute + const int k_Kernel0Resolution = 8; + + // Must match CASCADE_COUNT in FFTCompute.compute + const int k_CascadeCount = 16; + + bool _Initialized = false; + + RenderTexture _SpectrumInitial; + + /// + /// Generated 'raw', uncombined, wave data. Input for putting into AnimWaves data before combine pass. + /// + public RenderTexture WaveBuffers { get; private set; } + + bool _SpectrumInitialized = false; + + ComputeShader _ShaderSpectrum; + ComputeShader _ShaderFFT; + + int _KernelSpectrumInitial; + int _KernelSpectrumUpdate; + + Parameters _Parameters; + + float _GenerationTime = -1f; + + static readonly bool s_SupportsRandomWriteRGFloat = + SystemInfo.SupportsRandomWriteOnRenderTextureFormat(RenderTextureFormat.RGFloat); + + public static class ShaderIDs + { + public static readonly int s_Size = Shader.PropertyToID("_Crest_Size"); + public static readonly int s_WindSpeed = Shader.PropertyToID("_Crest_WindSpeed"); + public static readonly int s_Turbulence = Shader.PropertyToID("_Crest_Turbulence"); + public static readonly int s_Alignment = Shader.PropertyToID("_Crest_Alignment"); + public static readonly int s_Gravity = Shader.PropertyToID("_Crest_Gravity"); + public static readonly int s_Period = Shader.PropertyToID("_Crest_Period"); + public static readonly int s_WindDir = Shader.PropertyToID("_Crest_WindDir"); + public static readonly int s_SpectrumControls = Shader.PropertyToID("_Crest_SpectrumControls"); + public static readonly int s_ResultInit = Shader.PropertyToID("_Crest_ResultInit"); + public static readonly int s_Time = Shader.PropertyToID("_Crest_Time"); + public static readonly int s_Chop = Shader.PropertyToID("_Crest_Chop"); + public static readonly int s_Init0 = Shader.PropertyToID("_Crest_Init0"); + public static readonly int s_ResultHeight = Shader.PropertyToID("_Crest_ResultHeight"); + public static readonly int s_ResultDisplaceX = Shader.PropertyToID("_Crest_ResultDisplaceX"); + public static readonly int s_ResultDisplaceZ = Shader.PropertyToID("_Crest_ResultDisplaceZ"); + public static readonly int s_InputH = Shader.PropertyToID("_Crest_InputH"); + public static readonly int s_InputX = Shader.PropertyToID("_Crest_InputX"); + public static readonly int s_InputZ = Shader.PropertyToID("_Crest_InputZ"); + public static readonly int s_InputButterfly = Shader.PropertyToID("_Crest_InputButterfly"); + public static readonly int s_Output1 = Shader.PropertyToID("_Crest_Output1"); + public static readonly int s_Output2 = Shader.PropertyToID("_Crest_Output2"); + public static readonly int s_Output3 = Shader.PropertyToID("_Crest_Output3"); + public static readonly int s_Output = Shader.PropertyToID("_Crest_Output"); + + public static readonly int s_TemporaryFFT1 = Shader.PropertyToID("_Crest_TemporaryFFT1"); + public static readonly int s_TemporaryFFT2 = Shader.PropertyToID("_Crest_TemporaryFFT2"); + public static readonly int s_TemporaryFFT3 = Shader.PropertyToID("_Crest_TemporaryFFT3"); + } + + internal readonly struct Parameters + { + public readonly WaveSpectrum _Spectrum; + public readonly int _Resolution; + public readonly float _LoopPeriod; + public readonly float _WindSpeed; + public readonly float _WindDirectionRadians; + public readonly float _WindTurbulence; + public readonly float _WindAlignment; + + public Parameters(WaveSpectrum spectrum, int resolution, float period, float speed, float direction, float turbulence, float alignment) + { + _Spectrum = spectrum; + _Resolution = resolution; + _LoopPeriod = period; + _WindSpeed = speed; + _WindDirectionRadians = direction; + _WindTurbulence = turbulence; + _WindAlignment = alignment; + } + + // Implement custom or incur allocations. + public override int GetHashCode() + { + return System.HashCode.Combine(_Spectrum, _LoopPeriod, _WindSpeed, _WindDirectionRadians, _WindTurbulence, _WindAlignment, _Resolution); + } + + public int GetHashCode(int resolution) + { + return System.HashCode.Combine(_Spectrum, _LoopPeriod, _WindSpeed, _WindDirectionRadians, _WindTurbulence, _WindAlignment, resolution); + } + } + + public FFTCompute(Parameters parameters) + { + Debug.Assert(Mathf.NextPowerOfTwo(parameters._Resolution) == parameters._Resolution, "Crest: FFTCompute resolution must be power of 2"); + _Parameters = parameters; + } + + public void Release() + { + if (_SpectrumInitial != null) + { + _SpectrumInitial.Release(); + } + + if (WaveBuffers != null) + { + WaveBuffers.Release(); + } + + Helpers.Destroy(_SpectrumInitial); + Helpers.Destroy(WaveBuffers); + + _SpectrumInitialized = false; + _Initialized = false; + } + + internal static void CleanUpAll() + { + foreach (var generator in s_Generators) + { + generator.Value.Release(); + } + + s_Generators?.Clear(); + + foreach (var texture in s_ButterflyTextures?.Values) + { + Helpers.Destroy(texture); + } + + s_ButterflyTextures?.Clear(); + } + + static readonly Dictionary s_Generators = new(); + static readonly Dictionary s_ButterflyTextures = new(); + + [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)] + static void InitStatics() + { + CleanUpAll(); + } + + /// + /// Computes water surface displacement, with wave components split across slices of the output texture array + /// + public static RenderTexture GenerateDisplacements(CommandBuffer buf, float time, Parameters parameters, bool updateSpectrum) + { + var conditionsHash = parameters.GetHashCode(); + // All static data arguments should be hashed here and passed to the generator constructor + if (!s_Generators.TryGetValue(conditionsHash, out var generator)) + { + // No generator for these params - create one + generator = new(parameters); + s_Generators.Add(conditionsHash, generator); + } + + // The remaining dynamic data arguments should be passed in to the generation here + return generator.GenerateDisplacementsInternal(buf, time, updateSpectrum); + } + + RenderTexture GenerateDisplacementsInternal(CommandBuffer buffer, float time, bool updateSpectrum) + { + // Check if already generated, and we're not being asked to re-update the spectrum + if (_GenerationTime == time && !updateSpectrum) + { + return WaveBuffers; + } + + var resolution = _Parameters._Resolution; + var period = _Parameters._LoopPeriod; + + // Initialize. + if (!_Initialized || _SpectrumInitial == null) + { + Release(); + + _ShaderSpectrum = WaterResources.Instance.Compute._FFTSpectrum; + _KernelSpectrumInitial = _ShaderSpectrum.FindKernel("SpectrumInitalize"); + _KernelSpectrumUpdate = _ShaderSpectrum.FindKernel("SpectrumUpdate"); + _ShaderFFT = WaterResources.Instance.Compute._FFT; + + var rtd = new RenderTextureDescriptor(0, 0); + rtd.width = rtd.height = resolution; + rtd.dimension = TextureDimension.Tex2DArray; + rtd.enableRandomWrite = true; + rtd.depthBufferBits = 0; + rtd.volumeDepth = k_CascadeCount; + rtd.colorFormat = RenderTextureFormat.ARGBFloat; + rtd.msaaSamples = 1; + + Helpers.SafeCreateRenderTexture(ref _SpectrumInitial, rtd); + _SpectrumInitial.name = "_Crest_FFTSpectrumInit"; + _SpectrumInitial.Create(); + + // Raw wave data buffer + WaveBuffers = new(resolution, resolution, 0, GraphicsFormat.R16G16B16A16_SFloat) + { + wrapMode = TextureWrapMode.Repeat, + antiAliasing = 1, + filterMode = FilterMode.Bilinear, + anisoLevel = 0, + useMipMap = false, + name = "_Crest_FFTCascades", + dimension = TextureDimension.Tex2DArray, + volumeDepth = k_CascadeCount, + enableRandomWrite = true, + }; + WaveBuffers.Create(); + + // Initialize bufferfly. Cached per resolution. + if (!s_ButterflyTextures.ContainsKey(resolution)) + { + // Computes the offsets used for the FFT calculation. + var size = Mathf.RoundToInt(Mathf.Log(resolution, 2)); + var colors = new Color[resolution * size]; + + int offset = 1, iterations = resolution >> 1; + for (var index = 0; index < size; index++) + { + var rowOffset = index * resolution; + { + int start = 0, end = 2 * offset; + for (var iteration = 0; iteration < iterations; iteration++) + { + var bigK = 0f; + for (var k = start; k < end; k += 2) + { + var phase = 2.0f * Mathf.PI * bigK * iterations / resolution; + var cos = Mathf.Cos(phase); + var sin = Mathf.Sin(phase); + colors[rowOffset + k / 2] = new(cos, -sin, 0, 1); + colors[rowOffset + k / 2 + offset] = new(-cos, sin, 0, 1); + + bigK += 1f; + } + start += 4 * offset; + end = start + 2 * offset; + } + } + iterations >>= 1; + offset <<= 1; + } + + var texture = new Texture2D(resolution, Mathf.RoundToInt(Mathf.Log(resolution, 2)), TextureFormat.RGBAFloat, false, true); + texture.SetPixels(colors); + texture.Apply(); + s_ButterflyTextures.Add(resolution, texture); + } + + _Initialized = true; + } + + // Initialize spectrum. + // Computes base spectrum values based on wind speed and turbulence and spectrum controls. + if (!_SpectrumInitialized || updateSpectrum) + { + var wrapper = new PropertyWrapperCompute(buffer, _ShaderSpectrum, _KernelSpectrumInitial); + wrapper.SetInteger(ShaderIDs.s_Size, resolution); + wrapper.SetFloat(ShaderIDs.s_WindSpeed, _Parameters._WindSpeed); + wrapper.SetFloat(ShaderIDs.s_Turbulence, _Parameters._WindTurbulence); + wrapper.SetFloat(ShaderIDs.s_Alignment, _Parameters._WindAlignment); + wrapper.SetFloat(ShaderIDs.s_Gravity, WaterRenderer.Instance.Gravity); + wrapper.SetFloat(ShaderIDs.s_Period, period < Mathf.Infinity ? period : -1); + wrapper.SetVector(ShaderIDs.s_WindDir, new(Mathf.Cos(_Parameters._WindDirectionRadians), Mathf.Sin(_Parameters._WindDirectionRadians))); + wrapper.SetTexture(ShaderIDs.s_SpectrumControls, _Parameters._Spectrum.ControlsTexture); + wrapper.SetTexture(ShaderIDs.s_ResultInit, _SpectrumInitial); + wrapper.Dispatch(resolution / 8, resolution / 8, k_CascadeCount); + + _SpectrumInitialized = true; + } + + // Update Spectrum. + // Computes a spectrum for the current time which can be FFT'd into the final surface. + { + var wrapper = new PropertyWrapperCompute(buffer, _ShaderSpectrum, _KernelSpectrumUpdate); + + var descriptor = _SpectrumInitial.descriptor; + + if (s_SupportsRandomWriteRGFloat) + { + descriptor.colorFormat = RenderTextureFormat.RGFloat; + } + + // No need to clear as overwritten. + buffer.GetTemporaryRT(ShaderIDs.s_TemporaryFFT1, descriptor); + buffer.GetTemporaryRT(ShaderIDs.s_TemporaryFFT2, descriptor); + buffer.GetTemporaryRT(ShaderIDs.s_TemporaryFFT3, descriptor); + + wrapper.SetInteger(ShaderIDs.s_Size, resolution); + wrapper.SetFloat(ShaderIDs.s_Time, time * _Parameters._Spectrum._GravityScale); + wrapper.SetFloat(ShaderIDs.s_Chop, _Parameters._Spectrum._Chop); + wrapper.SetFloat(ShaderIDs.s_Period, period < Mathf.Infinity ? period : -1); + wrapper.SetTexture(ShaderIDs.s_Init0, _SpectrumInitial); + wrapper.SetTexture(ShaderIDs.s_ResultHeight, ShaderIDs.s_TemporaryFFT1); + wrapper.SetTexture(ShaderIDs.s_ResultDisplaceX, ShaderIDs.s_TemporaryFFT2); + wrapper.SetTexture(ShaderIDs.s_ResultDisplaceZ, ShaderIDs.s_TemporaryFFT3); + wrapper.Dispatch(resolution / 8, resolution / 8, k_CascadeCount); + } + + // Dispatch FFT. + // FFT the spectrum into surface displacements. + { + var kernel = 2 * Mathf.RoundToInt(Mathf.Log(resolution / k_Kernel0Resolution, 2f)); + var wrapper = new PropertyWrapperCompute(buffer, _ShaderFFT, kernel); + + var butterfly = s_ButterflyTextures[resolution]; + + wrapper.SetTexture(ShaderIDs.s_InputButterfly, butterfly); + wrapper.SetTexture(ShaderIDs.s_Output1, ShaderIDs.s_TemporaryFFT1); + wrapper.SetTexture(ShaderIDs.s_Output2, ShaderIDs.s_TemporaryFFT2); + wrapper.SetTexture(ShaderIDs.s_Output3, ShaderIDs.s_TemporaryFFT3); + wrapper.Dispatch(1, resolution, k_CascadeCount); + + wrapper = new PropertyWrapperCompute(buffer, _ShaderFFT, kernel + 1); + wrapper.SetTexture(ShaderIDs.s_InputH, ShaderIDs.s_TemporaryFFT1); + wrapper.SetTexture(ShaderIDs.s_InputX, ShaderIDs.s_TemporaryFFT2); + wrapper.SetTexture(ShaderIDs.s_InputZ, ShaderIDs.s_TemporaryFFT3); + wrapper.SetTexture(ShaderIDs.s_InputButterfly, butterfly); + wrapper.SetTexture(ShaderIDs.s_Output, WaveBuffers); + wrapper.Dispatch(resolution, 1, k_CascadeCount); + + buffer.ReleaseTemporaryRT(ShaderIDs.s_TemporaryFFT1); + buffer.ReleaseTemporaryRT(ShaderIDs.s_TemporaryFFT2); + buffer.ReleaseTemporaryRT(ShaderIDs.s_TemporaryFFT3); + } + + _GenerationTime = time; + + return WaveBuffers; + } + + /// + /// Changing wave gen data can result in creating lots of new generators. This gives a way to notify + /// that a parameter has changed. If there is no existing generator for the new param values, but there + /// is one for the old param values, this old generator is repurposed. + /// + public static void OnGenerationDataUpdated(Parameters oldParameters, Parameters newParameters) + { + // If multiple wave components share one FFT, then one of them changes its settings, it will + // actually steal the generator from the rest. Then the first from the rest which request the + // old settings will trigger creation of a new generator, and the remaining ones will use this + // new generator. In the end one new generator is created, but it's created for the old settings. + // Generators are requested single threaded so there should not be a race condition. Odd pattern + // but I don't think any other way works without ugly checks to see if old generators are still + // used, or other complicated things. + + // Check if no generator exists for new values + var newHash = newParameters.GetHashCode(); + if (!s_Generators.TryGetValue(newHash, out var oldGenerator)) + { + // Try to adapt an existing generator rather than default to creating a new one + // Adapting requires the resolution to the same. + var oldHash = oldParameters.GetHashCode(newParameters._Resolution); + if (s_Generators.TryGetValue(oldHash, out var generator)) + { + // Hash will change for this generator, so remove the current one + s_Generators.Remove(oldHash); + + // Update params + generator._Parameters = newParameters; + + // Trigger generator to re-init the spectrum + generator._SpectrumInitialized = false; + + // Re-add with new hash + s_Generators.Add(newHash, generator); + } + } + else + { + // There is already a new generator which will be used. Remove the previous one - if it really is needed + // then it will be created later. + oldGenerator.Release(); + s_Generators.Remove(oldParameters.GetHashCode()); + } + } + + /// + /// Number of FFT generators + /// + public static int GeneratorCount => s_Generators != null ? s_Generators.Count : 0; + + public static FFTCompute GetInstance(Parameters parameters) + { + return s_Generators.GetValueOrDefault(parameters.GetHashCode(), null); + } + + public bool HasData() + { + return WaveBuffers != null && WaveBuffers.IsCreated(); + } + + internal void OnGUI() + { + if (WaveBuffers != null && WaveBuffers.IsCreated()) + { + DebugGUI.DrawTextureArray(WaveBuffers, 8, 0.5f, 20f); + } + + if (_Parameters._Spectrum != null && _Parameters._Spectrum.ControlsTexture != null) + { + GUI.DrawTexture(new(0f, 0f, 100f, 10f), _Parameters._Spectrum.ControlsTexture); + } + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Waves/FFTCompute.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Waves/FFTCompute.cs.meta new file mode 100644 index 000000000..16c40b47e --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Waves/FFTCompute.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d7d810630b3004f91923306f6f064752 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Waves/WaveSpectrum.cs b/Packages/com.waveharmonic.crest/Runtime/Scripts/Waves/WaveSpectrum.cs new file mode 100644 index 000000000..067e535e6 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Waves/WaveSpectrum.cs @@ -0,0 +1,304 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; + +namespace WaveHarmonic.Crest +{ + /// + /// Water shape representation - power values for each octave of wave components. + /// + [CreateAssetMenu(fileName = "Waves", menuName = "Crest/Wave Spectrum", order = 10000)] + [@HelpURL("Manual/Waves.html#wave-conditions")] + public sealed partial class WaveSpectrum : ScriptableObject + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + + // These must match corresponding constants in FFTSpectrum.compute + internal const int k_NumberOfOctaves = 14; + internal const float k_SmallestWavelengthPower2 = -4f; + + internal static readonly float s_MinimumPowerLog = -8f; + internal static readonly float s_MaximumPowerLog = 5f; + + [Tooltip("Variance of wave directions, in degrees.")] + [@Range(0f, 180f)] + [SerializeField, HideInInspector] + internal float _WaveDirectionVariance = 90f; + + [Tooltip("More gravity means faster waves.")] + [@Range(0f, 25f)] + [SerializeField, HideInInspector] + internal float _GravityScale = 1f; + + [Tooltip("Multiplier which scales waves")] + [@Range(0f, 10f)] + [SerializeField] + internal float _Multiplier = 1f; + + [SerializeField, HideInInspector] + internal float[] _PowerLogarithmicScales = new float[k_NumberOfOctaves] { -7.10794f, -6.42794f, -5.93794f, -5.27794f, -4.67794f, -3.71794f, -3.17794f, -2.60794f, -1.93794f, -1.11794f, -0.85794f, -0.36794f, 0.04206f, -8f }; + + [SerializeField, HideInInspector] + internal bool[] _PowerDisabled = new bool[k_NumberOfOctaves]; + + [SerializeField, HideInInspector] + internal float[] _ChopScales = new float[k_NumberOfOctaves] { 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f }; + + [SerializeField, HideInInspector] + internal float[] _GravityScales = new float[k_NumberOfOctaves] { 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f, 1f }; + + [Tooltip("Scales horizontal displacement")] + [@Range(0f, 2f)] + [SerializeField] + internal float _Chop = 1.6f; + +#pragma warning disable 414 + [SerializeField, HideInInspector] + internal bool _ShowAdvancedControls = false; +#pragma warning restore 414 + +#pragma warning disable 414 + // We need to serialize if we want undo/redo. + [SerializeField, HideInInspector] + internal SpectrumModel _Model; +#pragma warning restore 414 + + internal enum SpectrumModel + { + None, + PiersonMoskowitz, + } + + internal static float SmallWavelength(float octaveIndex) => Mathf.Pow(2f, k_SmallestWavelengthPower2 + octaveIndex); + + static int GetOctaveIndex(float wavelength) + { + Debug.AssertFormat(wavelength > 0f, "Crest: {0} wavelength must be > 0.", nameof(WaveSpectrum)); + var wl_pow2 = Mathf.Log(wavelength) / Mathf.Log(2f); + return (int)(wl_pow2 - k_SmallestWavelengthPower2); + } + + /// + /// Returns the amplitude of a wave described by wavelength. + /// + /// Wavelength in m + /// How many waves we're sampling, used to conserve energy for different sampling rates + /// Wind speed in m/s + /// The energy of the wave in J + /// The amplitude of the wave in m + internal float GetAmplitude(float wavelength, float componentsPerOctave, float windSpeed, out float power) + { + Debug.AssertFormat(wavelength > 0f, this, "Crest: {0} wavelength must be > 0.", nameof(WaveSpectrum)); + + var wl_pow2 = Mathf.Log(wavelength) / Mathf.Log(2f); + wl_pow2 = Mathf.Clamp(wl_pow2, k_SmallestWavelengthPower2, k_SmallestWavelengthPower2 + k_NumberOfOctaves - 1f); + + var lower = Mathf.Pow(2f, Mathf.Floor(wl_pow2)); + + var index = (int)(wl_pow2 - k_SmallestWavelengthPower2); + + if (_PowerLogarithmicScales.Length < k_NumberOfOctaves || _PowerDisabled.Length < k_NumberOfOctaves) + { + Debug.LogWarning($"Crest: Wave spectrum {name} is out of date, please open this asset and resave in editor.", this); + } + + if (index >= _PowerLogarithmicScales.Length || index >= _PowerDisabled.Length) + { + Debug.AssertFormat(index < _PowerLogarithmicScales.Length && index < _PowerDisabled.Length, this, $"Crest: {0} index {index} is out of range.", nameof(WaveSpectrum)); + power = 0f; + return 0f; + } + + // Get the first power for interpolation if available + var thisPower = !_PowerDisabled[index] ? _PowerLogarithmicScales[index] : s_MinimumPowerLog; + + // Get the next power for interpolation if available + var nextIndex = index + 1; + var hasNextIndex = nextIndex < _PowerLogarithmicScales.Length; + var nextPower = hasNextIndex && !_PowerDisabled[nextIndex] ? _PowerLogarithmicScales[nextIndex] : s_MinimumPowerLog; + + // The amplitude calculation follows this nice paper from Frechot: + // https://hal.archives-ouvertes.fr/file/index/docid/307938/filename/frechot_realistic_simulation_of_ocean_surface_using_wave_spectra.pdf + var wl_lo = Mathf.Pow(2f, Mathf.Floor(wl_pow2)); + var k_lo = 2f * Mathf.PI / wl_lo; + var c_lo = ComputeWaveSpeed(wl_lo); + var omega_lo = k_lo * c_lo; + var wl_hi = 2f * wl_lo; + var k_hi = 2f * Mathf.PI / wl_hi; + var c_hi = ComputeWaveSpeed(wl_hi); + var omega_hi = k_hi * c_hi; + + var domega = (omega_lo - omega_hi) / componentsPerOctave; + + // Alpha used to interpolate between power values + var alpha = (wavelength - lower) / lower; + + // Power + power = hasNextIndex ? Mathf.Lerp(thisPower, nextPower, alpha) : thisPower; + power = Mathf.Pow(10f, power); + + // Empirical wind influence based on alpha-beta spectrum that underlies empirical spectra + var gravity = _GravityScale * WaterRenderer.Instance.Gravity; + + // Zero gravity will cause NaNs, and they have always been flat. + if (gravity <= 0f) return 0f; + + var b = 1.291f; + var wm = 0.87f * gravity / windSpeed; + DeepDispersion(2f * Mathf.PI / wavelength, gravity, out var w); + power *= Mathf.Exp(-b * Mathf.Pow(wm / w, 4.0f)); + + var a2 = 2f * power * domega; + + // Amplitude + var a = Mathf.Sqrt(a2); + + // Gerstner fudge - one hack to get Gerstners looking on par with FFT + a *= 5f; + + return a * _Multiplier; + } + + static float ComputeWaveSpeed(float wavelength, float gravityMultiplier = 1f) + { + // wave speed of deep sea water waves: https://en.wikipedia.org/wiki/Wind_wave + // https://en.wikipedia.org/wiki/Dispersion_(water_waves)#Wave_propagation_and_dispersion + var g = WaterRenderer.Instance.Gravity * gravityMultiplier; + var k = 2f * Mathf.PI / wavelength; + //float h = max(depth, 0.01); + //float cp = sqrt(abs(tanh_clamped(h * k)) * g / k); + var cp = Mathf.Sqrt(g / k); + return cp; + } + + /// + /// Samples spectrum to generate wave data. Wavelengths will be in ascending order. + /// + internal void GenerateWaveData(int componentsPerOctave, ref float[] wavelengths, ref float[] anglesDeg) + { + var totalComponents = k_NumberOfOctaves * componentsPerOctave; + + if (wavelengths == null || wavelengths.Length != totalComponents) wavelengths = new float[totalComponents]; + if (anglesDeg == null || anglesDeg.Length != totalComponents) anglesDeg = new float[totalComponents]; + + var minWavelength = Mathf.Pow(2f, k_SmallestWavelengthPower2); + var invComponentsPerOctave = 1f / componentsPerOctave; + + for (var octave = 0; octave < k_NumberOfOctaves; octave++) + { + for (var i = 0; i < componentsPerOctave; i++) + { + var index = octave * componentsPerOctave + i; + + // Stratified random sampling - should give a better distribution of wavelengths, and also means i can generate + // the wavelengths in ascending order! + var minWavelengthi = minWavelength + invComponentsPerOctave * minWavelength * i; + var maxWavelengthi = Mathf.Min(minWavelengthi + invComponentsPerOctave * minWavelength, 2f * minWavelength); + wavelengths[index] = Mathf.Lerp(minWavelengthi, maxWavelengthi, Random.value); + + var rnd = (i + Random.value) * invComponentsPerOctave; + anglesDeg[index] = (2f * rnd - 1f) * _WaveDirectionVariance; + } + + minWavelength *= 2f; + } + } + + // This applies the correct PM spectrum powers, validated against a separate implementation + internal void ApplyPiersonMoskowitzSpectrum() + { + var gravity = WaterRenderer.Instance != null ? WaterRenderer.Instance.Gravity : Mathf.Abs(Physics.gravity.y); + + for (var octave = 0; octave < k_NumberOfOctaves; octave++) + { + var wl = SmallWavelength(octave); + + var pow = PiersonMoskowitzSpectrum(gravity, wl); + + // we store power on logarithmic scale. this does not include 0, we represent 0 as min value + pow = Mathf.Max(pow, Mathf.Pow(10f, s_MinimumPowerLog)); + + _PowerLogarithmicScales[octave] = Mathf.Log10(pow); + } + } + + // Alpha-beta spectrum without the beta. Beta represents wind influence and is evaluated at runtime + // for 'current' wind conditions + static float AlphaSpectrum(float a, float g, float w) + { + return a * g * g / Mathf.Pow(w, 5.0f); + } + + static void DeepDispersion(float k, float gravity, out float w) + { + w = Mathf.Sqrt(gravity * k); + } + + static float PiersonMoskowitzSpectrum(float gravity, float wavelength) + { + var k = 2f * Mathf.PI / wavelength; + DeepDispersion(k, gravity, out var w); + var phillipsConstant = 8.1e-3f; + return AlphaSpectrum(phillipsConstant, gravity, w); + } + } + + sealed partial class WaveSpectrum + { + [System.NonSerialized] + internal Texture2D _ControlsTexture; + + [System.NonSerialized] + readonly Color[] _ScratchData = new Color[k_NumberOfOctaves]; + + internal Texture2D ControlsTexture + { + get + { + if (_ControlsTexture == null) + { + _ControlsTexture = new(k_NumberOfOctaves, 1, TextureFormat.RFloat, mipChain: false, linear: true); + InitializeHandControls(); + } + + return _ControlsTexture; + } + } + + void OnDestroy() + { + Helpers.Destroy(_ControlsTexture); + } + + internal void InitializeHandControls() + { + for (var i = 0; i < k_NumberOfOctaves; i++) + { + var power = _PowerDisabled[i] ? 0f : Mathf.Pow(10f, _PowerLogarithmicScales[i]); + power *= _Multiplier * _Multiplier; + _ScratchData[i] = power * Color.white; + } + + ControlsTexture.SetPixels(_ScratchData); + ControlsTexture.Apply(); + } + + [@OnChange(skipIfInactive: false)] + internal void OnChange(string path, object previous) + { + InitializeHandControls(); + } + + internal void OnGUI() + { + if (ControlsTexture != null) + { + GUI.DrawTexture(new(0f, 0f, 100f, 10f), ControlsTexture); + } + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Scripts/Waves/WaveSpectrum.cs.meta b/Packages/com.waveharmonic.crest/Runtime/Scripts/Waves/WaveSpectrum.cs.meta new file mode 100644 index 000000000..2193ef613 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Scripts/Waves/WaveSpectrum.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 382a5d8b1147b4e78a31353c022b8e15 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 72a325a76c6624c768822a08fe625d55, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Settings.meta b/Packages/com.waveharmonic.crest/Runtime/Settings.meta new file mode 100644 index 000000000..db15c2bc4 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Settings.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8513e0264bf8548f5b6ee70e099e7e32 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Settings/Resources.asset b/Packages/com.waveharmonic.crest/Runtime/Settings/Resources.asset new file mode 100644 index 000000000..3b2778fd4 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Settings/Resources.asset @@ -0,0 +1,66 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ba9588a2660f342409c82a6ff9e95a88, type: 3} + m_Name: Resources + m_EditorClassIdentifier: + _Shaders: + _CopyDepthIntoCache: {fileID: 4800000, guid: cdf2728920d024e9fb0e708e1dc364bb, + type: 3} + _ColorSpline: {fileID: 4800000, guid: 1e6f7ac69c647420eb778b9c9462c5bb, type: 3} + _FlowSpline: {fileID: 4800000, guid: 230c6e038aecf4f4caccc0051e688389, type: 3} + _FoamSpline: {fileID: 4800000, guid: 640fd8883ed1b4a549626ac524af06ee, type: 3} + _WaveSpline: {fileID: 4800000, guid: 02f1964f0f6a84b73880c00be24ce3f9, type: 3} + _DepthGeometry: {fileID: 4800000, guid: a8aeab41790ee4cb1b72e19aa4a7a1ad, type: 3} + _LevelGeometry: {fileID: 4800000, guid: 06402bee7075b4b9fafef2b1ddf3b5cc, type: 3} + _UpdateShadow: {fileID: 4800000, guid: 6195b173b90b246ac9f5300b7e2aa482, type: 3} + _UnderwaterEffect: {fileID: 4800000, guid: 034b985bd9c344992af148e26d2cdb24, type: 3} + _UnderwaterMask: {fileID: 4800000, guid: edb653e62cc924b99b0a1086ffb39be7, type: 3} + _Portals: {fileID: 4800000, guid: 370ffa403718b4982a8a3e0101263093, type: 3} + _ClipConvexHull: {fileID: 4800000, guid: 1f5d1e029c7564da8855bf97e3b9247a, type: 3} + _ShallowWaterSimulationVisualizer: {fileID: 4800000, guid: 613caf76dccc3ea45b0501b731a55ec2, + type: 3} + _DebugTextureArray: {fileID: 4800000, guid: 9984e3507dd424fd49ce01182989250a, + type: 3} + _Blit: {fileID: 4800000, guid: b9836aaab4b1f45e4bd4fc4e6bcc7e74, type: 3} + _Compute: + _UnderwaterArtifacts: {fileID: 7200000, guid: 08549c36146ad4899a07193754b21ea2, + type: 3} + _ShapeWavesTransfer: {fileID: 7200000, guid: 3a487d04e47a14907809657d5ccf1917, + type: 3} + _Query: {fileID: 7200000, guid: 7089d2ff99e0e4c9a94ef7c4711d5524, type: 3} + _Gerstner: {fileID: 7200000, guid: c7470afd2715c48b89d1e4a2a557d6d7, type: 3} + _FFT: {fileID: 7200000, guid: a5caa5dfb6d2c4632b41493dc2ba74d0, type: 3} + _FFTBake: {fileID: 7200000, guid: 2571926f132e74744ac8563e209947dd, type: 3} + _FFTSpectrum: {fileID: 7200000, guid: d493ec731bb6e43dfac22cc5921d31e3, type: 3} + _ShapeCombine: {fileID: 7200000, guid: 02a2fc6716dfd4730a8c689ce364f132, type: 3} + _ShorelineColor: {fileID: 7200000, guid: 690b406e28d9a4abb842f6e39c9dc582, type: 3} + _UpdateDynamicWaves: {fileID: 7200000, guid: 0ba116507793f45b5ba3f016f0837660, + type: 3} + _UpdateFoam: {fileID: 7200000, guid: 1149a28b1712c464fbc3d96bea0bc34d, type: 3} + _PackLevel: {fileID: 7200000, guid: 62854cc297743429aa087d7708d221c0, type: 3} + _AbsorptionTexture: {fileID: 7200000, guid: 82d4c3f5aac084c2bad20d0a31f1168a, + type: 3} + _ClipTexture: {fileID: 7200000, guid: fb559b0e067b5464792b8e434189347c, type: 3} + _FlowTexture: {fileID: 7200000, guid: 67ee915fe51504dd894c5cbf6f1a7868, type: 3} + _FoamTexture: {fileID: 7200000, guid: 69307e5986e134adc90ee257e7dba1ea, type: 3} + _LevelTexture: {fileID: 7200000, guid: 6bccbd92220dc418cacd3f17096c6b97, type: 3} + _DepthTexture: {fileID: 7200000, guid: 025c29236eb8341f0a2078d93379be6a, type: 3} + _ScatteringTexture: {fileID: 7200000, guid: 78d6b75ecfb664f0cbb70001b1446627, + type: 3} + _ClipPrimitive: {fileID: 7200000, guid: ad943abdbda794e98b8decce3329fcd8, type: 3} + _SphereWaterInteraction: {fileID: 7200000, guid: 98fb0af5d79724a2c945809b974524eb, + type: 3} + _RenderDepthProbe: {fileID: 7200000, guid: 6bb3e13f5a77e489584dd6fe9dd28a4f, type: 3} + _JumpFloodSDF: {fileID: 7200000, guid: 55a9b76c48b7343b2b66ed91a0619c29, type: 3} + _UpdateSWS: {fileID: 7200000, guid: 0af900407c415484e8b1482da8ec3881, type: 3} + _Whirlpool: {fileID: 7200000, guid: db903c2d7a8274434aa5eef6aa5218f2, type: 3} + _Clear: {fileID: 7200000, guid: 2641e78378c244c2e8ac89563a8ec9af, type: 3} diff --git a/Packages/com.waveharmonic.crest/Runtime/Settings/Resources.asset.meta b/Packages/com.waveharmonic.crest/Runtime/Settings/Resources.asset.meta new file mode 100644 index 000000000..015f84f40 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Settings/Resources.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0817af17dea584e5382e6216db162d4a +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders.meta new file mode 100644 index 000000000..a9f8a63c8 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e01bda653e7f54c5c8ac6acd7eb1220d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data.meta new file mode 100644 index 000000000..e435ec0a4 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a90a2ba6d95f94186a1f7b4b227a60a7 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input.meta new file mode 100644 index 000000000..c8c648e28 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f9c719886e7504196818710a8c627eb3 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/AbsorptionColor.shader b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/AbsorptionColor.shader new file mode 100644 index 000000000..9da1693c7 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/AbsorptionColor.shader @@ -0,0 +1,85 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +Shader "Crest/Inputs/Absorption/Color" +{ + Properties + { + _Crest_AbsorptionColor("Absorption", Color) = (0.3416268229484558, 0.6954545974731445, 0.8500000238418579, 0.10196078568696976) + + [HideInInspector] + _Crest_Absorption("Absorption", Vector) = (0.0, 0.09803921729326248, 0.20000000298023225, 0.0) + + [Toggle(d_Feather)] + _Crest_Feather("Feather At UV Extents", Float) = 0 + _Crest_FeatherWidth("Feather Width", Range(0.001, 0.5)) = 0.1 + + [HideInInspector] + _Crest_Version("Version", Integer) = 0 + } + + SubShader + { + Pass + { + Blend SrcAlpha OneMinusSrcAlpha + ZWrite Off + ColorMask RGB + + CGPROGRAM + #pragma vertex Vertex + #pragma fragment Fragment + + #pragma shader_feature_local d_Feather + + #include "UnityCG.cginc" + + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Helpers.hlsl" + + struct Attributes + { + float3 vertex : POSITION; +#if d_Feather + float2 uv : TEXCOORD0; +#endif + }; + + struct Varyings + { + float4 vertex : SV_POSITION; +#if d_Feather + float2 uv : TEXCOORD0; +#endif + }; + + CBUFFER_START(CrestPerWaterInput) + half4 _Crest_Absorption; + half _Crest_FeatherWidth; + CBUFFER_END + + Varyings Vertex(Attributes input) + { + Varyings output; + float3 positionWS = mul(unity_ObjectToWorld, float4(input.vertex, 1.0)).xyz; + output.vertex = mul(UNITY_MATRIX_VP, float4(positionWS, 1.0)); +#if d_Feather + output.uv = input.uv; +#endif + return output; + } + + float4 Fragment(Varyings input) : SV_Target + { + half4 color = _Crest_Absorption; + color.a = 1.0; +#if d_Feather + color.a *= WaveHarmonic::Crest::FeatherWeightFromUV(input.uv, _Crest_FeatherWidth); +#endif + + return color; + } + ENDCG + } + } + CustomEditor "WaveHarmonic.Crest.Editor.CustomShaderGUI" +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/AbsorptionColor.shader.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/AbsorptionColor.shader.meta new file mode 100644 index 000000000..bc3d1848b --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/AbsorptionColor.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 9a866ef153cd246c58ef554043275848 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/AlbedoColor.shader b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/AlbedoColor.shader new file mode 100644 index 000000000..39980c051 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/AlbedoColor.shader @@ -0,0 +1,80 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +Shader "Crest/Inputs/Albedo/Color" +{ + Properties + { + [MainTexture] _Crest_Texture("Albedo", 2D) = "white" {} + _Crest_Color("Color", Color) = (1.0, 1.0, 1.0, 1.0) + _Crest_Cutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5 + + [Enum(UnityEngine.Rendering.BlendMode)] + _Crest_BlendModeSource("Source Blend Mode", Int) = 5 + [Enum(UnityEngine.Rendering.BlendMode)] + _Crest_BlendModeTarget("Target Blend Mode", Int) = 10 + + [HideInInspector] + _Crest_Version("Version", Integer) = 0 + } + SubShader + { + Pass + { + Blend [_Crest_BlendModeSource] [_Crest_BlendModeTarget] + + ZWrite Off + + CGPROGRAM + #pragma vertex Vertex + #pragma fragment Fragment + + #include "UnityCG.cginc" + + struct Attributes + { + float3 vertex : POSITION; + fixed4 color : COLOR; + float2 uv : TEXCOORD0; + }; + + struct Varyings + { + float4 vertex : SV_POSITION; + fixed4 color : COLOR; + float2 uv : TEXCOORD0; + }; + + CBUFFER_START(CrestPerWaterInput) + float3 _Crest_DisplacementAtInputPosition; + CBUFFER_END + + Texture2D _Crest_Texture; + SamplerState sampler_Crest_Texture; + float4 _Crest_Texture_ST; + + half4 _Crest_Color; + half _Crest_Cutoff; + + Varyings Vertex(Attributes input) + { + Varyings output; + float3 positionWS = mul(unity_ObjectToWorld, float4(input.vertex, 1.0)).xyz; + positionWS.xz -= _Crest_DisplacementAtInputPosition.xz; + output.vertex = mul(UNITY_MATRIX_VP, float4(positionWS, 1.0)); + output.uv = input.uv; + output.color = input.color; + return output; + } + + fixed4 Fragment(Varyings i) : SV_Target + { + fixed4 color = _Crest_Texture.Sample(sampler_Crest_Texture, i.uv) * _Crest_Color; + clip(color.a - _Crest_Cutoff + 0.0001); + return color * i.color; + } + ENDCG + } + } + CustomEditor "WaveHarmonic.Crest.Editor.CustomShaderGUI" +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/AlbedoColor.shader.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/AlbedoColor.shader.meta new file mode 100644 index 000000000..b9d6426af --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/AlbedoColor.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: aa7b1bc481cf34f229ffd793be4a01c3 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/AnimatedWavesAddFromTexture.shader b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/AnimatedWavesAddFromTexture.shader new file mode 100644 index 000000000..c30c3db99 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/AnimatedWavesAddFromTexture.shader @@ -0,0 +1,85 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +Shader "Crest/Inputs/Animated Waves/Add From Texture" +{ + Properties + { + [MainTexture] _Crest_Texture("Texture", 2D) = "black" {} + _Crest_Strength( "Strength", float ) = 1 + + [Toggle(d_HeightsOnly)] + _Crest_HeightsOnly("Heights Only", Float) = 1 + + [HideInInspector] + _Crest_Version("Version", Integer) = 0 + } + + SubShader + { + Blend One One + + Pass + { + CGPROGRAM + #pragma vertex Vert + #pragma fragment Frag + + #pragma shader_feature_local d_HeightsOnly + + #include "UnityCG.cginc" + + Texture2D _Crest_Texture; + SamplerState sampler_Crest_Texture; + + CBUFFER_START(CrestPerWaterInput) + float4 _Crest_Texture_ST; + float _Crest_Strength; + float _Crest_Weight; + float3 _Crest_DisplacementAtInputPosition; + CBUFFER_END + + struct Attributes + { + float3 positionOS : POSITION; + float2 uv : TEXCOORD0; + }; + + struct Varyings + { + float4 positionCS : SV_POSITION; + float2 uv : TEXCOORD0; + }; + + Varyings Vert(Attributes input) + { + Varyings o; + + float3 worldPos = mul(unity_ObjectToWorld, float4(input.positionOS, 1.0)).xyz; + // Correct for displacement + worldPos.xz -= _Crest_DisplacementAtInputPosition.xz; + o.positionCS = mul(UNITY_MATRIX_VP, float4(worldPos, 1.0)); + + o.uv = TRANSFORM_TEX(input.uv, _Crest_Texture); + return o; + } + + half4 Frag(Varyings input) : SV_Target + { + half3 texSample = _Crest_Texture.Sample(sampler_Crest_Texture, input.uv).xyz; + + half3 displacement = (half3)0.0; +#if d_HeightsOnly + displacement.y = texSample.x * _Crest_Strength; +#else + displacement.xyz = texSample * _Crest_Strength; +#endif + + return _Crest_Weight * half4(displacement, 0.0); + } + + ENDCG + } + } + CustomEditor "WaveHarmonic.Crest.Editor.CustomShaderGUI" +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/AnimatedWavesAddFromTexture.shader.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/AnimatedWavesAddFromTexture.shader.meta new file mode 100644 index 000000000..d55a1f4c2 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/AnimatedWavesAddFromTexture.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 62ff65b047d684524b06152100f725bb +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/AnimatedWavesRemoveGeometry.shader b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/AnimatedWavesRemoveGeometry.shader new file mode 100644 index 000000000..245b58a0f --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/AnimatedWavesRemoveGeometry.shader @@ -0,0 +1,80 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// Push water under the geometry. Needs to be rendered into all LODs - set Octave Wave length to 0. + +Shader "Crest/Inputs/Animated Waves/Push Water Under Convex Hull" +{ + Properties + { + [HideInInspector] + _Crest_Version("Version", Integer) = 0 + } + + SubShader + { + Pass + { + BlendOp Min + Cull Front + ColorMask G + + CGPROGRAM + #pragma vertex Vertex + #pragma fragment Fragment + + #include "UnityCG.cginc" + + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl" + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/InputsDriven.hlsl" + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Cascade.hlsl" + + CBUFFER_START(CrestPerWaterInput) + float _Crest_Weight; + float3 _Crest_DisplacementAtInputPosition; + CBUFFER_END + + m_CrestNameSpace + + struct Attributes + { + float3 positionOS : POSITION; + }; + + struct Varyings + { + float4 positionCS : SV_POSITION; + float3 worldPos : TEXCOORD0; + }; + + Varyings Vertex(Attributes input) + { + Varyings o; + + o.worldPos = mul(unity_ObjectToWorld, float4(input.positionOS, 1.0)).xyz; + // Correct for displacement + o.worldPos.xz -= _Crest_DisplacementAtInputPosition.xz; + + o.positionCS = mul(UNITY_MATRIX_VP, float4(o.worldPos, 1.0)); + + return o; + } + + half4 Fragment(Varyings input) + { + // Write displacement to get from sea level of water to the y value of this geometry. + half seaLevelOffset = Cascade::MakeLevel(_Crest_LodIndex).SampleLevel(input.worldPos.xz); + return half4(0.0, _Crest_Weight * (input.worldPos.y - g_Crest_WaterCenter.y - seaLevelOffset), 0.0, 0.0); + } + + m_CrestNameSpaceEnd + + m_CrestVertex + m_CrestFragment(half4) + + ENDCG + } + } + CustomEditor "WaveHarmonic.Crest.Editor.CustomShaderGUI" +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/AnimatedWavesRemoveGeometry.shader.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/AnimatedWavesRemoveGeometry.shader.meta new file mode 100644 index 000000000..26b202ba1 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/AnimatedWavesRemoveGeometry.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 170672f06b4574545ba8305cb7d11091 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/AnimatedWavesSetHeightToGeometry.shader b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/AnimatedWavesSetHeightToGeometry.shader new file mode 100644 index 000000000..9b7a2653f --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/AnimatedWavesSetHeightToGeometry.shader @@ -0,0 +1,84 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// This writes straight into the displacement texture and sets the water height to the y value of the geometry. + +Shader "Crest/Inputs/Animated Waves/Set Water Height Using Geometry" +{ + Properties + { + [Enum(ColorWriteMask)] + _Crest_ColorMask("Color Mask", Int) = 15 + + [HideInInspector] + _Crest_Version("Version", Integer) = 0 + } + + SubShader + { + Pass + { + Blend Off + ColorMask [_Crest_ColorMask] + + CGPROGRAM + #pragma vertex Vertex + #pragma fragment Fragment + + #include "UnityCG.cginc" + + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl" + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/InputsDriven.hlsl" + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Cascade.hlsl" + + CBUFFER_START(CrestPerWaterInput) + float _Crest_Weight; + float3 _Crest_DisplacementAtInputPosition; + CBUFFER_END + + m_CrestNameSpace + + struct Attributes + { + float3 positionOS : POSITION; + }; + + struct Varyings + { + float4 positionCS : SV_POSITION; + float3 worldPos : TEXCOORD0; + }; + + Varyings Vertex(Attributes input) + { + Varyings o; + + o.worldPos = mul(unity_ObjectToWorld, float4(input.positionOS, 1.0)).xyz; + // Correct for displacement + o.worldPos.xz -= _Crest_DisplacementAtInputPosition.xz; + + o.positionCS = mul(UNITY_MATRIX_VP, float4(o.worldPos, 1.0)); + + return o; + } + + half4 Fragment(Varyings input) + { + half seaLevelOffset = Cascade::MakeLevel(_Crest_LodIndex).SampleLevel(input.worldPos.xz); + + // Write displacement to get from sea level of water to the y value of this geometry + float height = input.worldPos.y - g_Crest_WaterCenter.y - seaLevelOffset; + return half4(0.0, _Crest_Weight * height, 0.0, 0.0); + } + + m_CrestNameSpaceEnd + + m_CrestVertex + m_CrestFragment(half4) + + ENDCG + } + } + CustomEditor "WaveHarmonic.Crest.Editor.CustomShaderGUI" +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/AnimatedWavesSetHeightToGeometry.shader.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/AnimatedWavesSetHeightToGeometry.shader.meta new file mode 100644 index 000000000..a091001bc --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/AnimatedWavesSetHeightToGeometry.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3acaa68c12f5e435290dbeebd2684241 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/AnimatedWavesWaveParticle.shader b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/AnimatedWavesWaveParticle.shader new file mode 100644 index 000000000..58787b4dd --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/AnimatedWavesWaveParticle.shader @@ -0,0 +1,87 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +Shader "Crest/Inputs/Animated Waves/Wave Particle" +{ + Properties + { + _Crest_Amplitude( "Amplitude", float ) = 1 + _Crest_Radius( "Radius", float) = 3 + + [HideInInspector] + _Crest_Version("Version", Integer) = 0 + } + + SubShader + { + Tags { "DisableBatching" = "True" } + + Pass + { + Blend One One + + CGPROGRAM + #pragma vertex Vert + #pragma fragment Frag + + #include "UnityCG.cginc" + + CBUFFER_START(CrestPerWaterInput) + float _Crest_Radius; + float _Crest_Amplitude; + float _Crest_Weight; + float3 _Crest_DisplacementAtInputPosition; + CBUFFER_END + + struct Attributes + { + float3 positionOS : POSITION; + }; + + struct Varyings + { + float4 positionCS : SV_POSITION; + float2 worldOffsetScaledXZ : TEXCOORD0; + }; + + Varyings Vert(Attributes input) + { + Varyings o; + + float3 worldPos = mul(unity_ObjectToWorld, float4(input.positionOS, 1.0)).xyz; + float3 centerPos = unity_ObjectToWorld._m03_m13_m23; + o.worldOffsetScaledXZ = worldPos.xz - centerPos.xz; + + // shape is symmetric around center with known radius - fix the vert positions to perfectly wrap the shape. + o.worldOffsetScaledXZ = sign(o.worldOffsetScaledXZ); + float4 newWorldPos = float4(centerPos, 1.0); + newWorldPos.xz += o.worldOffsetScaledXZ * _Crest_Radius; + + // Correct for displacement + newWorldPos.xz -= _Crest_DisplacementAtInputPosition.xz; + + o.positionCS = mul(UNITY_MATRIX_VP, newWorldPos); + + return o; + } + + float4 Frag(Varyings input) : SV_Target + { + // power 4 smoothstep - no normalize needed + // credit goes to stubbe's shadertoy: https://www.shadertoy.com/view/4ldSD2 + float r2 = dot( input.worldOffsetScaledXZ, input.worldOffsetScaledXZ); + if( r2 > 1.0 ) + return (float4)0.0; + + r2 = 1.0 - r2; + + float y = r2 * r2 * _Crest_Amplitude; + + return float4(0.0, y * _Crest_Weight, 0.0, 0.0); + } + + ENDCG + } + } + CustomEditor "WaveHarmonic.Crest.Editor.CustomShaderGUI" +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/AnimatedWavesWaveParticle.shader.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/AnimatedWavesWaveParticle.shader.meta new file mode 100644 index 000000000..a718840bf --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/AnimatedWavesWaveParticle.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: c1519a4fd6d8a4a62b59870be79b3857 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/DynamicWavesAddBump.shader b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/DynamicWavesAddBump.shader new file mode 100644 index 000000000..b7db88de3 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/DynamicWavesAddBump.shader @@ -0,0 +1,107 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +Shader "Crest/Inputs/Dynamic Waves/Add Bump" +{ + Properties + { + _Crest_Amplitude( "Amplitude", float ) = 1 + _Crest_Radius( "Radius", float) = 3 + + [HideInInspector] + _Crest_Version("Version", Integer) = 0 + } + + SubShader + { + Pass + { + Blend One One + + CGPROGRAM + #pragma vertex Vertex + #pragma fragment Fragment + + #include "UnityCG.cginc" + + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Cascade.hlsl" + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Helpers.hlsl" + + CBUFFER_START(CrestPerWaterInput) + float _Crest_Radius; + float _Crest_SimDeltaTime; + float _Crest_Amplitude; + float3 _Crest_DisplacementAtInputPosition; + CBUFFER_END + + m_CrestNameSpace + + struct Attributes + { + float3 positionOS : POSITION; + float2 texcoord : TEXCOORD0; + }; + + struct Varyings + { + float4 positionCS : SV_POSITION; + float2 worldOffsetScaled : TEXCOORD0; + float2 uv : TEXCOORD1; + }; + + Varyings Vertex(Attributes input) + { + Varyings o; + o.positionCS = UnityObjectToClipPos(input.positionOS); + + float3 worldPos = mul(unity_ObjectToWorld, float4(input.positionOS, 1.0)); + float3 centerPos = unity_ObjectToWorld._m03_m13_m23; + o.worldOffsetScaled.xy = worldPos.xz - centerPos.xz; + + // shape is symmetric around center with known radius - fix the vert positions to perfectly wrap the shape. + o.worldOffsetScaled.xy = sign(o.worldOffsetScaled.xy); + float4 newWorldPos = float4(centerPos, 1.0); + newWorldPos.xz += o.worldOffsetScaled.xy * _Crest_Radius; + + // Correct for displacement + newWorldPos.xz -= _Crest_DisplacementAtInputPosition.xz; + + o.positionCS = mul(UNITY_MATRIX_VP, newWorldPos); + o.uv = Cascade::MakeDynamicWaves(_Crest_LodIndex).WorldToUV(newWorldPos.xz); + + return o; + } + + float4 Fragment(Varyings input) + { + // power 4 smoothstep - no normalize needed + // credit goes to stubbe's shadertoy: https://www.shadertoy.com/view/4ldSD2 + float r2 = dot(input.worldOffsetScaled.xy, input.worldOffsetScaled.xy); + if (r2 > 1.0) + return (float4)0.0; + + r2 = 1.0 - r2; + + float y = r2 * r2; + y = pow(y, 0.05); + y *= _Crest_Amplitude; + + y /= g_Crest_LodCount; + + // Feather edges to reduce streaking without introducing reflections. + y *= FeatherWeightFromUV(input.uv, 0.1); + + // accelerate velocities + return float4(0.0, _Crest_SimDeltaTime * y, 0.0, 0.0); + } + + m_CrestNameSpaceEnd + + m_CrestVertex + m_CrestFragment(float4) + + ENDCG + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/DynamicWavesAddBump.shader.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/DynamicWavesAddBump.shader.meta new file mode 100644 index 000000000..694df7784 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/DynamicWavesAddBump.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7e8ca175bc339b74880584aa1544100e +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/DynamicWavesDampenCircle.shader b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/DynamicWavesDampenCircle.shader new file mode 100644 index 000000000..e399baa9a --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/DynamicWavesDampenCircle.shader @@ -0,0 +1,84 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +Shader "Crest/Inputs/Dynamic Waves/Dampen Circle" +{ + Properties + { + _Crest_Radius("Radius", float) = 3 + _Crest_Strength("Strength", Range(0, 100)) = 10 + + [HideInInspector] + _Crest_Version("Version", Integer) = 0 + } + + SubShader + { + Pass + { + Blend SrcAlpha OneMinusSrcAlpha + + CGPROGRAM + #pragma vertex Vert + #pragma fragment Frag + + #include "UnityCG.cginc" + + CBUFFER_START(CrestPerWaterInput) + float _Crest_SimDeltaTime; + float _Crest_Radius; + float _Crest_Strength; + float _Crest_Weight; + float3 _Crest_DisplacementAtInputPosition; + CBUFFER_END + + struct Attributes + { + float3 positionOS : POSITION; + }; + + struct Varyings + { + float4 positionCS : SV_POSITION; + float2 worldOffsetScaled : TEXCOORD0; + }; + + Varyings Vert(Attributes input) + { + Varyings o; + o.positionCS = UnityObjectToClipPos(input.positionOS); + + float3 worldPos = mul(unity_ObjectToWorld, float4(input.positionOS, 1.0)).xyz; + float3 centerPos = unity_ObjectToWorld._m03_m13_m23; + o.worldOffsetScaled.xy = worldPos.xz - centerPos.xz; + + // shape is symmetric around center with known radius - fix the vert positions to perfectly wrap the shape. + o.worldOffsetScaled.xy = sign(o.worldOffsetScaled.xy); + float4 newWorldPos = float4(centerPos, 1.0); + newWorldPos.xz += o.worldOffsetScaled.xy * _Crest_Radius; + + // Correct for displacement + newWorldPos.xz -= _Crest_DisplacementAtInputPosition.xz; + + o.positionCS = mul(UNITY_MATRIX_VP, newWorldPos); + + return o; + } + + float4 Frag(Varyings input) : SV_Target + { + // power 4 smoothstep - no normalize needed + // credit goes to stubbe's shadertoy: https://www.shadertoy.com/view/4ldSD2 + float r2 = dot(input.worldOffsetScaled.xy, input.worldOffsetScaled.xy); + if (r2 > 1.0) return (float4)0.0; + r2 = 1.0 - r2; + float val = r2 * r2; + + float weight = val * _Crest_Strength * _Crest_SimDeltaTime * _Crest_Weight; + return float4(0.0, 0.0, 0.0, weight); + } + ENDCG + } + } + CustomEditor "WaveHarmonic.Crest.Editor.CustomShaderGUI" +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/DynamicWavesDampenCircle.shader.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/DynamicWavesDampenCircle.shader.meta new file mode 100644 index 000000000..4d48228d5 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/DynamicWavesDampenCircle.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f7ab71b44865e403cb0a074713fb3ff7 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/FlowAddFromTexture.shader b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/FlowAddFromTexture.shader new file mode 100644 index 000000000..43491ebd7 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/FlowAddFromTexture.shader @@ -0,0 +1,110 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +Shader "Crest/Inputs/Flow/Add From Texture" +{ + Properties + { + [MainTexture] _Crest_Texture("Flow Map", 2D) = "white" {} + _Crest_Strength( "Strength", float ) = 1 + + [Toggle(d_FlipX)] + _Crest_FlipX("Flip X", Float) = 0 + [Toggle(d_FlipZ)] + _Crest_FlipZ("Flip Z", Float) = 0 + [Toggle(d_NegativeValues)] + _Crest_NegativeValues("Has Negative Values", Float) = 0 + + [Toggle(d_Feather)] + _Crest_Feather("Feather At UV Extents", Float) = 0 + _Crest_FeatherWidth("Feather Width", Range(0.001, 0.5)) = 0.1 + + [HideInInspector] + _Crest_Version("Version", Integer) = 0 + } + + SubShader + { + Blend One One + + Pass + { + CGPROGRAM + #pragma vertex Vert + #pragma fragment Frag + + #pragma shader_feature_local d_FlipX + #pragma shader_feature_local d_FlipZ + #pragma shader_feature_local d_Feather + #pragma shader_feature_local d_NegativeValues + + #include "UnityCG.cginc" + + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl" + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/InputsDriven.hlsl" + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Helpers.hlsl" + + Texture2D _Crest_Texture; + SamplerState sampler_Crest_Texture; + + CBUFFER_START(CrestPerWaterInput) + float4 _Crest_Texture_ST; + float _Crest_Strength; + float _Crest_Weight; + float3 _Crest_DisplacementAtInputPosition; + half _Crest_FeatherWidth; + CBUFFER_END + + struct Attributes + { + float3 positionOS : POSITION; + float2 uv : TEXCOORD0; + }; + + struct Varyings + { + float4 positionCS : SV_POSITION; + float2 uv : TEXCOORD0; + }; + + Varyings Vert(Attributes input) + { + Varyings o; + + float3 worldPos = mul(unity_ObjectToWorld, float4(input.positionOS, 1.0)).xyz; + // Correct for displacement + worldPos.xz -= _Crest_DisplacementAtInputPosition.xz; + o.positionCS = mul(UNITY_MATRIX_VP, float4(worldPos, 1.0)); + + o.uv = TRANSFORM_TEX(input.uv, _Crest_Texture); + return o; + } + + float4 Frag(Varyings input) : SV_Target + { + float2 flow = _Crest_Texture.Sample(sampler_Crest_Texture, input.uv).xy; + +#if !d_NegativeValues + // From 0..1 to -1..1. + flow = flow * 2.0 - 1.0; +#endif + +#if d_Feather + flow *= WaveHarmonic::Crest::FeatherWeightFromUV(input.uv, _Crest_FeatherWidth); +#endif + +#if d_FlipX + flow.x *= -1.0; +#endif +#if d_FlipZ + flow.y *= -1.0; +#endif + + return float4(flow * _Crest_Strength * _Crest_Weight, 0.0, 0.0); + } + + ENDCG + } + } + CustomEditor "WaveHarmonic.Crest.Editor.CustomShaderGUI" +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/FlowAddFromTexture.shader.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/FlowAddFromTexture.shader.meta new file mode 100644 index 000000000..cdd9bfc3e --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/FlowAddFromTexture.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 8958e526a8d9b403e878e13b80405796 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/FlowFixedDirection.shader b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/FlowFixedDirection.shader new file mode 100644 index 000000000..a5049ebca --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/FlowFixedDirection.shader @@ -0,0 +1,101 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +Shader "Crest/Inputs/Flow/Fixed Direction" +{ + Properties + { + _Crest_Speed("Speed", Range(0.0, 30.0)) = 1.0 + _Crest_Direction("Direction", Range(0.0, 1.0)) = 0.0 + + [Toggle(d_Feather)] + _Crest_Feather("Feather At UV Extents", Float) = 0 + _Crest_FeatherWidth("Feather Width", Range(0.001, 0.5)) = 0.1 + + [Toggle(d_ApplyRotation)] + _Crest_ApplyRotation("Apply Transform XZ Rotation", Float) = 0 + + [HideInInspector] + _Crest_Version("Version", Integer) = 0 + } + + SubShader + { + Pass + { + CGPROGRAM + #pragma vertex Vert + #pragma fragment Frag + + #pragma shader_feature_local d_Feather + #pragma shader_feature_local d_ApplyRotation + + #include "UnityCG.cginc" + + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl" + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/InputsDriven.hlsl" + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Helpers.hlsl" + + CBUFFER_START(CrestPerWaterInput) + float _Crest_Speed; + float _Crest_Direction; + float3 _Crest_DisplacementAtInputPosition; + half _Crest_FeatherWidth; + half _Crest_Weight; + CBUFFER_END + + struct Attributes + { + float3 positionOS : POSITION; +#if d_Feather + float2 uv : TEXCOORD0; +#endif + }; + + struct Varyings + { + float4 positionCS : SV_POSITION; + float2 vel : TEXCOORD0; +#if d_Feather + float2 uv : TEXCOORD1; +#endif + }; + + Varyings Vert(Attributes input) + { + Varyings o; + + float3 worldPos = mul(unity_ObjectToWorld, float4(input.positionOS, 1.0)).xyz; + // Correct for displacement + worldPos.xz -= _Crest_DisplacementAtInputPosition.xz; + o.positionCS = mul(UNITY_MATRIX_VP, float4(worldPos, 1.0)); + + o.vel = _Crest_Speed * float2(cos(_Crest_Direction * 6.283185), sin(_Crest_Direction * 6.283185)); + +#if d_Feather + o.uv = input.uv; +#endif + + return o; + } + + float4 Frag(Varyings input) : SV_Target + { + float2 flow = input.vel; + +#if d_Feather + flow *= WaveHarmonic::Crest::FeatherWeightFromUV(input.uv, _Crest_FeatherWidth); +#endif + +#if d_ApplyRotation + const float2 rotation = normalize(unity_ObjectToWorld._m00_m20.xy); + flow = flow.x * rotation + flow.y * float2(-rotation.y, rotation.x); +#endif + + return float4(flow * _Crest_Weight, 0.0, 0.0); + } + ENDCG + } + } + CustomEditor "WaveHarmonic.Crest.Editor.CustomShaderGUI" +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/FlowFixedDirection.shader.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/FlowFixedDirection.shader.meta new file mode 100644 index 000000000..a6152195a --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/FlowFixedDirection.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5198aecab500144dbb5ee73bad91640a +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/FoamAddFromTexture.shader b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/FoamAddFromTexture.shader new file mode 100644 index 000000000..d0c888986 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/FoamAddFromTexture.shader @@ -0,0 +1,72 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +Shader "Crest/Inputs/Foam/Add From Texture" +{ + Properties + { + [MainTexture] _Crest_Texture("Texture", 2D) = "white" {} + _Crest_Strength( "Strength", float ) = 1 + + [HideInInspector] + _Crest_Version("Version", Integer) = 0 + } + + SubShader + { + Blend One One + + Pass + { + CGPROGRAM + #pragma vertex Vert + #pragma fragment Frag + + #include "UnityCG.cginc" + + Texture2D _Crest_Texture; + SamplerState sampler_Crest_Texture; + float _Crest_Strength; + + CBUFFER_START(CrestPerWaterInput) + float _Crest_SimDeltaTime; + float4 _Crest_Texture_ST; + float3 _Crest_DisplacementAtInputPosition; + half _Crest_Weight; + CBUFFER_END + + struct Attributes + { + float3 positionOS : POSITION; + float2 uv : TEXCOORD0; + }; + + struct Varyings + { + float4 positionCS : SV_POSITION; + float2 uv : TEXCOORD0; + }; + + Varyings Vert(Attributes input) + { + Varyings o; + + float3 worldPos = mul(unity_ObjectToWorld, float4(input.positionOS, 1.0)).xyz; + // Correct for displacement + worldPos.xz -= _Crest_DisplacementAtInputPosition.xz; + o.positionCS = mul(UNITY_MATRIX_VP, float4(worldPos, 1.0)); + + o.uv = TRANSFORM_TEX(input.uv, _Crest_Texture); + return o; + } + + float4 Frag(Varyings input) : SV_Target + { + return _Crest_Texture.Sample(sampler_Crest_Texture, input.uv) * _Crest_Weight * _Crest_Strength * _Crest_SimDeltaTime; + } + + ENDCG + } + } + CustomEditor "WaveHarmonic.Crest.Editor.CustomShaderGUI" +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/FoamAddFromTexture.shader.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/FoamAddFromTexture.shader.meta new file mode 100644 index 000000000..cca021242 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/FoamAddFromTexture.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 955fe6ade516e42e0ab0b0bbb116170a +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/FoamAddFromVertexColor.shader b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/FoamAddFromVertexColor.shader new file mode 100644 index 000000000..6325f7a5e --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/FoamAddFromVertexColor.shader @@ -0,0 +1,67 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +Shader "Crest/Inputs/Foam/Add From Vertex Colors" +{ + Properties + { + _Crest_Strength("Strength", float) = 1 + + [HideInInspector] + _Crest_Version("Version", Integer) = 0 + } + + SubShader + { + Blend One One + + Pass + { + CGPROGRAM + #pragma vertex Vert + #pragma fragment Frag + + #include "UnityCG.cginc" + + CBUFFER_START(CrestPerWaterInput) + float _Crest_SimDeltaTime; + float _Crest_Strength; + float _Crest_Weight; + float3 _Crest_DisplacementAtInputPosition; + CBUFFER_END + + struct Attributes + { + float3 positionOS : POSITION; + float4 col : COLOR0; + }; + + struct Varyings + { + float4 positionCS : SV_POSITION; + float4 col : COLOR0; + }; + + Varyings Vert(Attributes input) + { + Varyings o; + + float3 worldPos = mul(unity_ObjectToWorld, float4(input.positionOS, 1.0)).xyz; + // Correct for displacement + worldPos.xz -= _Crest_DisplacementAtInputPosition.xz; + o.positionCS = mul(UNITY_MATRIX_VP, float4(worldPos, 1.0)); + + o.col = input.col; + + return o; + } + + half4 Frag(Varyings input) : SV_Target + { + return _Crest_Strength * input.col.x * _Crest_SimDeltaTime * _Crest_Weight; + } + ENDCG + } + } + CustomEditor "WaveHarmonic.Crest.Editor.CustomShaderGUI" +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/FoamAddFromVertexColor.shader.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/FoamAddFromVertexColor.shader.meta new file mode 100644 index 000000000..428de2f2a --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/FoamAddFromVertexColor.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f51a8e7d464dd4fb0a51d0c61b8ca417 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden.meta new file mode 100644 index 000000000..86eddcb2c --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a69be96a1d36c4f8b9f29717e0a95d94 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/AbsorptionTexture.compute b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/AbsorptionTexture.compute new file mode 100644 index 000000000..a0f1ff939 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/AbsorptionTexture.compute @@ -0,0 +1,54 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#pragma kernel CrestExecute + +#include "HLSLSupport.cginc" + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Constants.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Helpers.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/InputsDriven.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Cascade.hlsl" + +Texture2D _Crest_Texture; +RWTexture2DArray _Crest_Target; + +CBUFFER_START(CrestPerMaterial) +int _Crest_Blend; +float _Crest_Weight; +float2 _Crest_TextureSize; +float2 _Crest_TexturePosition; +float2 _Crest_TextureRotation; +float _Crest_FeatherWidth; +CBUFFER_END + +m_CrestNameSpace + +void Execute(uint3 id) +{ + const Cascade cascade = Cascade::MakeAbsorption(id.z); + const float2 uv = DataIDToInputUV(id.xy, cascade, _Crest_TexturePosition, _Crest_TextureRotation, _Crest_TextureSize); + + half weight = _Crest_Weight; + + // Feather boundaries. + weight *= FeatherWeightFromUV(uv, _Crest_FeatherWidth); + + // Check we are within bounds. + if (weight <= 0.0) + { + return; + } + + const half4 source = _Crest_Texture.SampleLevel(LODData_linear_clamp_sampler, uv, 0); + const half3 target = _Crest_Target[id]; + weight *= source.a; + + _Crest_Target[id] = Blend(_Crest_Blend, weight, 1.0, source.xyz, target); +} + +m_CrestNameSpaceEnd + +m_CrestInputKernelDefault(Execute) diff --git a/Assets/Obi/Resources/Compute/AerodynamicConstraints.compute.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/AbsorptionTexture.compute.meta similarity index 65% rename from Assets/Obi/Resources/Compute/AerodynamicConstraints.compute.meta rename to Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/AbsorptionTexture.compute.meta index 229e5ddcf..a459a5416 100644 --- a/Assets/Obi/Resources/Compute/AerodynamicConstraints.compute.meta +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/AbsorptionTexture.compute.meta @@ -1,8 +1,7 @@ fileFormatVersion: 2 -guid: a819ec002d4434b5da29879a26e3211a +guid: 82d4c3f5aac084c2bad20d0a31f1168a ComputeShaderImporter: externalObjects: {} - currentAPIMask: 65536 userData: assetBundleName: assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/AnimatedWavesGenerate.compute b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/AnimatedWavesGenerate.compute new file mode 100644 index 000000000..d966891a2 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/AnimatedWavesGenerate.compute @@ -0,0 +1,248 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#pragma kernel CrestTransferWaves + +#pragma multi_compile_local __ d_Texture d_TextureBlend + +#if defined(d_TextureBlend) +#define d_Texture 1 +#endif + +#include "HLSLSupport.cginc" + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Constants.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Helpers.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/InputsDriven.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Cascade.hlsl" + +Texture2D _Crest_Texture; +Texture2DArray _Crest_WaveBuffer; +RWTexture2DArray _Crest_Target; + +CBUFFER_START(CrestPerMaterial) +float4 _Crest_WaveBufferParameters[MAX_LOD_COUNT]; +float2 _Crest_AxisX; +float _Crest_Weight; +float _Crest_FeatherWidth; +float _Crest_AttenuationInShallows; +float _Crest_RespectShallowWaterAttenuation; +float _Crest_MaximumAttenuationDepth; +float _Crest_WaveResolutionMultiplier; +float _Crest_TransitionalWavelengthThreshold; + +// Texture +#if d_Texture +float2 _Crest_TextureSize; +float2 _Crest_TexturePosition; +float2 _Crest_TextureRotation; +bool _Crest_NegativeValues; +int _Crest_Blend; +#endif +CBUFFER_END + +#if d_Texture +#define m_None 0 +#define m_FromZero 4 +#define m_FromZeroNormalized 5 +#endif // d_Texture + +m_CrestNameSpace + +void TransferWaves(uint3 id) +{ + const uint slice0 = id.z; + + const float4 parameters = _Crest_WaveBufferParameters[slice0]; + const uint first = parameters.x; + const uint last = parameters.y; + const half transition = parameters.w; + +#if !d_TextureBlend + // Additive only. All wavelengths filtered out for this LOD so nothing to do. + if (parameters.x < 0 || parameters.y < 0) + { + return; + } +#endif + + const Cascade cascade = Cascade::MakeAnimatedWaves(slice0); + const float2 positionWS = cascade.IDToWorld(id.xy); + + half _weight = _Crest_Weight; + half alpha = 0.0; + +#if d_Texture + float2 uvPainted = (positionWS - _Crest_TexturePosition) / _Crest_TextureSize; + // Clockwise transform rotation. + uvPainted = uvPainted.x * float2(_Crest_TextureRotation.y, -_Crest_TextureRotation.x) + uvPainted.y * _Crest_TextureRotation; + uvPainted += 0.5; + + // Feather boundaries. + _weight *= FeatherWeightFromUV(uvPainted, _Crest_FeatherWidth); + + // Check we are within bounds. + if (_weight <= 0.0) + { + return; + } + + alpha = _weight; + + // Initialize or "use of potentially uninitialized variable" due to early return. + float2 axis; float axisLength = 0.0; float t = 0.0; + float2 axisX0 = 0.0; float2 axisX1 = 0.0; float2 axisZ0 = 0.0; float2 axisZ1 = 0.0; + { + axis = _Crest_Texture.SampleLevel(LODData_linear_clamp_sampler, uvPainted, 0).xy; + + if (!_Crest_NegativeValues) + { + // -1.0 to 1.0 + axis = axis * 2.0 - 1.0; + } + + float axisLength2 = dot(axis, axis); + + // Zero data so exit early and apply blending if needed. + if (!(axisLength2 > 0.00001)) + { +#if d_TextureBlend + if (_Crest_Blend > m_None) + { + // If zero affects blend weight, then reduce alpha by axis length so that it + // accounts for zero data. + alpha = 0.0; + } + + _Crest_Target[id] *= 1.0 - alpha; +#endif + return; + } + + axisLength = sqrt(axisLength2); + + // Alpha blending based on data. + if (_Crest_Blend == m_FromZeroNormalized) + { + // Normalize so even small amounts fully removes existing waves. + alpha *= length(normalize(axis)); + } + else if (_Crest_Blend == m_FromZero) + { + alpha *= axisLength; + } + + // Rotate axis with transform rotation to keep axis in local space. + axis = axis.x * _Crest_TextureRotation.yx + axis.y * float2(-_Crest_TextureRotation.x, _Crest_TextureRotation.y); + + // Add wind (counterclockwise). + axis = axis.x * _Crest_AxisX + axis.y * float2(-_Crest_AxisX.y, _Crest_AxisX.x); + + // Quantize wave direction. + const float axisHeading = atan2(axis.y, axis.x) + 2.0 * 3.141592654; + const float dTheta = 0.5 * 0.314159265; + const float rem = fmod(axisHeading, dTheta); + const float angle0 = axisHeading - rem; + const float angle1 = angle0 + dTheta; + t = rem / dTheta; + + sincos(angle0, axisX0.y, axisX0.x); + sincos(angle1, axisX1.y, axisX1.x); + axisZ0.x = -axisX0.y; axisZ0.y = axisX0.x; + axisZ1.x = -axisX1.y; axisZ1.y = axisX1.x; + } +#else + const float2 positionWaves = float2(dot(positionWS, _Crest_AxisX), dot(positionWS, float2(-_Crest_AxisX.y, _Crest_AxisX.x))); +#endif // d_Texture + + const half depth = Cascade::MakeDepth(slice0).SampleSignedDepthFromSeaLevel(positionWS) + + Cascade::MakeLevel(slice0).SampleLevel(positionWS); + + half3 _displacement = 0.0; + + // Loop through wave buffer slices. + for (uint i = first; i <= last; i++) + { + const uint waveBufferIndex = i; + const float waveBufferSize = 0.5f * (1 << waveBufferIndex); + + half weight = _weight; + + uint WAVE_SAMPLE_FACTOR = 8; + half minimumWL = waveBufferSize / WAVE_SAMPLE_FACTOR / _Crest_WaveResolutionMultiplier; + half averageWL = minimumWL * 1.5f * _Crest_WaveResolutionMultiplier; + + // If approaching end of lod chain, start smoothly transitioning any large + // wavelengths across last two LODs. + if (minimumWL >= _Crest_TransitionalWavelengthThreshold) + { + // The transition weight must not be applied to the alpha otherwise popping. + weight *= transition; + } + + // Attenuation. + float attenuation; + { + // Attenuate waves based on water depth. If depth is greater than half the + // wavelength, water is considered deep and wave is unaffected. If depth is less + // than this, wave velocity decreases. Waves will then bunch up and grow in + // amplitude and eventually break. Deep water model is approximated by simply + // ramping down waves in non-deep water with a linear multiplier. + // http://hyperphysics.phy-astr.gsu.edu/hbase/Waves/watwav2.html + // http://hyperphysics.phy-astr.gsu.edu/hbase/watwav.html#c1 + half weight = saturate(2.0 * depth / averageWL); + if (_Crest_MaximumAttenuationDepth < k_Crest_MaximumWaveAttenuationDepth) + { + weight = lerp(weight, 1.0, saturate(depth / _Crest_MaximumAttenuationDepth)); + } + + + const float attenuationAmount = _Crest_AttenuationInShallows * _Crest_RespectShallowWaterAttenuation; + attenuation = attenuationAmount * weight + (1.0 - attenuationAmount); + } + + // NOTE: Could not get attenuation applied to alpha to work. Incurred popping. + weight *= attenuation; + + // Sample Wave Buffers. + if (weight > 0.0) + { +#if d_Texture + // Interpolate waves. + float2 positionScaledWS = positionWS / waveBufferSize; + + const float2 uv0 = float2(dot(positionScaledWS, axisX0), dot(positionScaledWS, axisZ0)); + const float2 uv1 = float2(dot(positionScaledWS, axisX1), dot(positionScaledWS, axisZ1)); + + // Sample displacement, rotate into frame. + float3 displacement0 = _Crest_WaveBuffer.SampleLevel(sampler_Crest_linear_repeat, float3(uv0, waveBufferIndex), 0).xyz; + float3 displacement1 = _Crest_WaveBuffer.SampleLevel(sampler_Crest_linear_repeat, float3(uv1, waveBufferIndex), 0).xyz; + + float3 displacement = lerp(displacement0, displacement1, t); + displacement.xz = displacement.x * axis + displacement.z * float2(-axis.y, axis.x); + displacement.y *= axisLength; + _displacement += displacement * weight; + +#else // !d_Texture + // Sample displacement, rotate into frame defined by global wind direction. + half3 displacement = _Crest_WaveBuffer.SampleLevel(sampler_Crest_linear_repeat, float3(positionWaves / waveBufferSize, waveBufferIndex), 0).xyz; + displacement.xz = displacement.x * _Crest_AxisX + displacement.z * float2(-_Crest_AxisX.y, _Crest_AxisX.x); + _displacement += displacement * weight; +#endif // d_Texture + } + } + +#if d_TextureBlend + // Global waves are always additive. + _Crest_Target[id] *= 1.0 - saturate(alpha); +#endif + + // Always write full alpha so textures show up in previews. + _Crest_Target[id] += float4(_displacement, 1.0); +} + +m_CrestNameSpaceEnd + +m_CrestInputKernelDefault(TransferWaves) diff --git a/Assets/Obi/Resources/Compute/BitonicSort.compute.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/AnimatedWavesGenerate.compute.meta similarity index 65% rename from Assets/Obi/Resources/Compute/BitonicSort.compute.meta rename to Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/AnimatedWavesGenerate.compute.meta index 16cb0e090..a9a95f089 100644 --- a/Assets/Obi/Resources/Compute/BitonicSort.compute.meta +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/AnimatedWavesGenerate.compute.meta @@ -1,8 +1,7 @@ fileFormatVersion: 2 -guid: ceefe1197724d4a408783ad72b2c56ab +guid: 3a487d04e47a14907809657d5ccf1917 ComputeShaderImporter: externalObjects: {} - currentAPIMask: 65536 userData: assetBundleName: assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/ClipConvexHull.shader b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/ClipConvexHull.shader new file mode 100644 index 000000000..8e6560bcf --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/ClipConvexHull.shader @@ -0,0 +1,92 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// Renders convex hull to the clip surface texture. + +Shader "Hidden/Crest/Inputs/Clip/Convex Hull" +{ + CGINCLUDE + #pragma vertex Vertex + #pragma fragment Fragment + + // For SV_IsFrontFace. + #pragma target 3.0 + + #include "UnityCG.cginc" + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl" + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/InputsDriven.hlsl" + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Cascade.hlsl" + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Geometry.hlsl" + + CBUFFER_START(CrestPerWaterInput) + bool _Crest_Inverted; + CBUFFER_END + + m_CrestNameSpace + + struct Attributes + { + float3 positionOS : POSITION; + }; + + struct Varyings + { + float4 positionCS : SV_POSITION; + float3 positionWS : TEXCOORD0; + }; + + Varyings Vertex(Attributes input) + { + Varyings o; + o.positionCS = UnityObjectToClipPos(input.positionOS); + o.positionWS = mul(unity_ObjectToWorld, float4(input.positionOS, 1.0)); + return o; + } + + float4 Fragment(Varyings input, const bool isFrontFace) + { + float3 surfacePositionWS = Cascade::MakeAnimatedWaves(_Crest_LodIndex) + .SampleDisplacementFromUndisplaced(input.positionWS.xz); + + // Move to sea level. + surfacePositionWS.y += g_Crest_WaterCenter.y; + + // Clip if above water. + if (input.positionWS.y > surfacePositionWS.y) + { + clip(-1.0); + } + + // To add clipping, back face must write one and front face must write zero. + return float4(isFrontFace == _Crest_Inverted ? 1.0 : 0.0, 0.0, 0.0, 1.0); + } + + m_CrestNameSpaceEnd + + m_CrestVertex + m_CrestFragmentWithFrontFace(float4) + + ENDCG + + SubShader + { + ZWrite Off + ColorMask R + + Pass + { + Cull Front + // Here so CGINCLUDE works. + CGPROGRAM + ENDCG + } + + Pass + { + Cull Back + // Here so CGINCLUDE works. + CGPROGRAM + ENDCG + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/ClipConvexHull.shader.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/ClipConvexHull.shader.meta new file mode 100644 index 000000000..d30ef6c4e --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/ClipConvexHull.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 1f5d1e029c7564da8855bf97e3b9247a +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/ClipPrimitive.compute b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/ClipPrimitive.compute new file mode 100644 index 000000000..a6bb0a490 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/ClipPrimitive.compute @@ -0,0 +1,97 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#pragma kernel CrestExecute + +#pragma multi_compile_local d_Sphere d_Cube d_Rectangle +#pragma multi_compile_local __ d_Inverted + +#include "HLSLSupport.cginc" + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Constants.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Cascade.hlsl" + +RWTexture2DArray _Crest_Target; + +CBUFFER_START(CrestPerMaterial) +float3 _Crest_Position; +float _Crest_Diameter; +float4x4 _Crest_Matrix; +CBUFFER_END + +m_CrestNameSpace + +// Also covers elipsoids etc. +float SphereSDF(float3 position) +{ + // Distance from center. + return length(position); +} + +// Also covers rectangular prisms etc. +float CubeSDF(float3 position) +{ + // Restrict to one quadrant of a box. + position = abs(position); + // Get furthest distance from center. + return max(position.x, max(position.y, position.z)); +} + +float RectangleSDF(float2 position) +{ + // Restrict to one quadrant of a box. + position = abs(position); + // Get furthest distance from center. + return max(position.x, position.y); +} + +void Execute(uint3 id) +{ + const Cascade cascade = Cascade::MakeClip(id.z); + const float2 positionXZ = cascade.IDToWorld(id.xy); + + // TODO: Optimize with something better than spherical culling. + // Spherical culling. Check diameter for buffered area. + if (length(positionXZ - _Crest_Position.xz) > _Crest_Diameter) + { + return; + } + + float3 position = 0.0; + position.xz = positionXZ; + +#if !d_Rectangle + // Only need height as clip surface is sampled at the displaced position. + const float3 surface = Cascade::MakeAnimatedWaves(id.z).SampleDisplacementFromUndisplaced(positionXZ); + position.y = g_Crest_WaterCenter.y + surface.y; +#endif + + // SDF operate in local space. + position = mul(_Crest_Matrix, float4(position, 1.0)).xyz; + + float sdf = 0; + +#if d_Sphere + sdf = SphereSDF(position); +#endif + +#if d_Cube + sdf = CubeSDF(position); +#endif + +#if d_Rectangle + sdf = RectangleSDF(position.xz); +#endif + +#if d_Inverted + _Crest_Target[id.xyz] = min(_Crest_Target[id.xyz], sdf); +#else + sdf = 1.0 - sdf; + _Crest_Target[id.xyz] = max(_Crest_Target[id.xyz], sdf); +#endif +} + +m_CrestNameSpaceEnd + +m_CrestInputKernelDefault(Execute) diff --git a/Assets/Obi/Resources/Compute/BendConstraints.compute.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/ClipPrimitive.compute.meta similarity index 65% rename from Assets/Obi/Resources/Compute/BendConstraints.compute.meta rename to Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/ClipPrimitive.compute.meta index c253612ba..12f0b88df 100644 --- a/Assets/Obi/Resources/Compute/BendConstraints.compute.meta +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/ClipPrimitive.compute.meta @@ -1,8 +1,7 @@ fileFormatVersion: 2 -guid: 92b982b3ba8824f1cb17f9313e0b11ac +guid: ad943abdbda794e98b8decce3329fcd8 ComputeShaderImporter: externalObjects: {} - currentAPIMask: 65536 userData: assetBundleName: assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/ClipTexture.compute b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/ClipTexture.compute new file mode 100644 index 000000000..705ad0a05 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/ClipTexture.compute @@ -0,0 +1,47 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// Adds clipping from a provided texture. Used by Painted and Texture input modes. + +#pragma kernel CrestExecute + +#include "HLSLSupport.cginc" + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Constants.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Helpers.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/InputsDriven.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Cascade.hlsl" + +Texture2D _Crest_Texture; +RWTexture2DArray _Crest_Target; + +CBUFFER_START(CrestPerMaterial) +float2 _Crest_TextureSize; +float2 _Crest_TexturePosition; +float2 _Crest_TextureRotation; +CBUFFER_END + +m_CrestNameSpace + +void Execute(uint3 id) +{ + const Cascade cascade = Cascade::MakeClip(id.z); + const float2 uv = DataIDToInputUV(id.xy, cascade, _Crest_TexturePosition, _Crest_TextureRotation, _Crest_TextureSize); + + // Check we are within bounds. + if (!WithinUV(uv)) + { + return; + } + + const float result = _Crest_Texture.SampleLevel(LODData_linear_clamp_sampler, uv, 0).x; + + // Painted clip defines a minimum value of the clip. + _Crest_Target[id] = max(_Crest_Target[id], result); +} + +m_CrestNameSpaceEnd + +m_CrestInputKernelDefault(Execute) diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/ClipTexture.compute.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/ClipTexture.compute.meta new file mode 100644 index 000000000..bea19e417 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/ClipTexture.compute.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: fb559b0e067b5464792b8e434189347c +ComputeShaderImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/CopyDepthIntoCache.shader b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/CopyDepthIntoCache.shader new file mode 100644 index 000000000..c1a7f341d --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/CopyDepthIntoCache.shader @@ -0,0 +1,4 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +Shader "Hidden/Crest" { } diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/CopyDepthIntoCache.shader.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/CopyDepthIntoCache.shader.meta new file mode 100644 index 000000000..f0cc44c93 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/CopyDepthIntoCache.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: cdf2728920d024e9fb0e708e1dc364bb +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/DepthProbe.compute b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/DepthProbe.compute new file mode 100644 index 000000000..041882bb1 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/DepthProbe.compute @@ -0,0 +1,128 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// Copies the depth buffer into the cache as object-space height. Object-space is +// used instead of world-space to allow relative movement of baked depth caches +// afterwards. It is converted to world-space in another shader before writing into +// the LOD data. + +#pragma kernel CrestCopy +#pragma kernel CrestFill + +#pragma multi_compile_local __ d_Crest_BackFaceInclusion + +#include "HLSLSupport.cginc" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Constants.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl" + +Texture2D _CamDepthBuffer; +RWTexture2D _Crest_Target; + +#if d_Crest_BackFaceInclusion +Texture2D _Crest_CameraDepthBufferBackfaces; +#endif + +CBUFFER_START(CrestPerMaterial) +float4 _HeightNearHeightFar; +float4 _CustomZBufferParams; +float _HeightOffset; +float _Crest_PreviousPlane; +CBUFFER_END + +m_CrestNameSpace + +float CustomLinear01Depth(const float z) +{ + return (1.0 - z * _CustomZBufferParams.x) / _CustomZBufferParams.y; +} + +void Copy(const uint3 id) +{ + const float deviceDepth = _CamDepthBuffer[id.xy].x; + + // If geometry has been clipped by far plane, set the maximum depth. + if (deviceDepth <= 0.0) + { + _Crest_Target[id.xy] = -CREST_WATER_DEPTH_BASELINE; + return; + } + + const float linear01Z = CustomLinear01Depth(deviceDepth); + + const float altitude = +#if UNITY_REVERSED_Z + lerp(_HeightNearHeightFar.y, _HeightNearHeightFar.x, linear01Z); +#else + lerp(_HeightNearHeightFar.x, _HeightNearHeightFar.y, linear01Z); +#endif + + _Crest_Target[id.xy] = altitude - _HeightOffset; +} + +void Fill(const uint3 id) +{ + const float deviceDepth = _CamDepthBuffer[id.xy].x; + +#if d_Crest_BackFaceInclusion + const float deviceBackFaceDepth = _Crest_CameraDepthBufferBackfaces[id.xy].x; +#endif + + // If geometry has been clipped by far plane, set the maximum depth. + if (deviceDepth <= 0.0) + { +#if d_Crest_BackFaceInclusion + if (deviceBackFaceDepth <= 0.0) +#endif + { + return; + } + } + + // If not a hole, do not proceed. + // We must be limiteed by precision on trying to represent depth baseline + if (_Crest_Target[id.xy].x > -CREST_WATER_DEPTH_BASELINE) + { +#if d_Crest_BackFaceInclusion + if (deviceBackFaceDepth <= 0.0) +#endif + { + return; + } + } + + const float linear01Z = CustomLinear01Depth(deviceDepth); + + const float altitude = +#if UNITY_REVERSED_Z + lerp(_HeightNearHeightFar.y, _HeightNearHeightFar.x, linear01Z); +#else + lerp(_HeightNearHeightFar.x, _HeightNearHeightFar.y, linear01Z); +#endif + + +#if d_Crest_BackFaceInclusion + { + const float linear01Z = CustomLinear01Depth(deviceBackFaceDepth); + const float altitude = +#if UNITY_REVERSED_Z + lerp(_HeightNearHeightFar.y, _HeightNearHeightFar.x, linear01Z); +#else + lerp(_HeightNearHeightFar.x, _HeightNearHeightFar.y, linear01Z); +#endif + + // Check backfaces. + if (altitude > (_Crest_PreviousPlane + 0.00001)) + { + return; + } + } +#endif + + _Crest_Target[id.xy] = altitude - _HeightOffset; +} + +m_CrestNameSpaceEnd + +m_CrestKernelDefault(Copy) +m_CrestKernelDefault(Fill) diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/DepthProbe.compute.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/DepthProbe.compute.meta new file mode 100644 index 000000000..430d55384 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/DepthProbe.compute.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6bb3e13f5a77e489584dd6fe9dd28a4f +ComputeShaderImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/DepthTexture.compute b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/DepthTexture.compute new file mode 100644 index 000000000..3abedee1a --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/DepthTexture.compute @@ -0,0 +1,69 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// Draw cached world-space heights into current frame data. If heights are coming +// from an ODC, then they are in object-space and are converted to world-space as +// the LOD data stores world-space height. + +#pragma kernel CrestExecute + +#pragma multi_compile_local __ d_CrestSDF + +#include "HLSLSupport.cginc" + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Constants.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Helpers.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/InputsDriven.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Cascade.hlsl" + +#define m_CrestType float + +#if d_CrestSDF +#undef m_CrestType +#define m_CrestType float2 +#endif + +Texture2D _Crest_Texture; +RWTexture2DArray _Crest_Target; + +CBUFFER_START(CrestInputTexture) +float2 _Crest_TextureSize; +float2 _Crest_TexturePosition; +float2 _Crest_TextureRotation; +float _Crest_HeightOffset; +bool _Crest_SDF; +CBUFFER_END + +m_CrestNameSpace + +void Execute(uint3 id) +{ + const Cascade cascade = Cascade::MakeDepth(id.z); + const float2 uv = DataIDToInputUV(id.xy, cascade, _Crest_TexturePosition, _Crest_TextureRotation, _Crest_TextureSize); + + // Check we are within bounds. + if (!WithinUV(uv)) + { + return; + } + + m_CrestType current = _Crest_Target[id]; + m_CrestType result = _Crest_Texture.SampleLevel(LODData_linear_clamp_sampler, uv, 0); + result.x += _Crest_HeightOffset; + + // Take highest terrain height. + result.x = max(current.x, result.x); + +#if d_CrestSDF + // Take shortest distance. + result.y = _Crest_SDF ? min(current.y, result.y) : current.y; +#endif + + _Crest_Target[id] = result; +} + +m_CrestNameSpaceEnd + +m_CrestInputKernelDefault(Execute) diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/DepthTexture.compute.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/DepthTexture.compute.meta new file mode 100644 index 000000000..1ee36396b --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/DepthTexture.compute.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 025c29236eb8341f0a2078d93379be6a +ComputeShaderImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/FlowTexture.compute b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/FlowTexture.compute new file mode 100644 index 000000000..2df0e9fd2 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/FlowTexture.compute @@ -0,0 +1,67 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// Adds flow from a provided texture. Used by Painted and Texture input modes. + +#pragma kernel CrestExecute + +#include "HLSLSupport.cginc" + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Constants.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Helpers.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/InputsDriven.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Cascade.hlsl" + +Texture2D _Crest_Texture; +RWTexture2DArray _Crest_Target; + +CBUFFER_START(CrestPerMaterial) +int _Crest_Blend; +float _Crest_Weight; +float2 _Crest_TextureSize; +float2 _Crest_TexturePosition; +float2 _Crest_TextureRotation; +float _Crest_FeatherWidth; +bool _Crest_NegativeValues; +CBUFFER_END + +m_CrestNameSpace + +void Execute(uint3 id) +{ + const Cascade cascade = Cascade::MakeFlow(id.z); + const float2 uv = DataIDToInputUV(id.xy, cascade, _Crest_TexturePosition, _Crest_TextureRotation, _Crest_TextureSize); + + half weight = _Crest_Weight; + + // Feather boundaries. + weight *= FeatherWeightFromUV(uv, _Crest_FeatherWidth); + + // Check we are within bounds. + if (weight <= 0.0) + { + return; + } + + float2 source = _Crest_Texture.SampleLevel(LODData_linear_clamp_sampler, uv, 0).xy; + + if (!_Crest_NegativeValues) + { + // From 0..1 to -1..1. + source = source * 2.0 - 1.0; + } + + if (_Crest_Blend == m_CrestBlendAlpha) + { + weight *= saturate(length(source)); + } + + const float2 target = _Crest_Target[id]; + _Crest_Target[id] = Blend(_Crest_Blend, weight, 1.0, source, target); +} + +m_CrestNameSpaceEnd + +m_CrestInputKernelDefault(Execute) diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/FlowTexture.compute.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/FlowTexture.compute.meta new file mode 100644 index 000000000..3079478e1 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/FlowTexture.compute.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 67ee915fe51504dd894c5cbf6f1a7868 +ComputeShaderImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/FoamTexture.compute b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/FoamTexture.compute new file mode 100644 index 000000000..8c5a66d46 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/FoamTexture.compute @@ -0,0 +1,56 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// Adds foam from a provided texture. Used by Painted and Texture input modes. + +#pragma kernel CrestExecute + +#include "HLSLSupport.cginc" + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Constants.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Helpers.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/InputsDriven.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Cascade.hlsl" + +Texture2D _Crest_Texture; +RWTexture2DArray _Crest_Target; + +CBUFFER_START(CrestPerMaterial) +int _Crest_Blend; +float _Crest_Weight; +float2 _Crest_TextureSize; +float2 _Crest_TexturePosition; +float2 _Crest_TextureRotation; +float _Crest_FeatherWidth; +float _Crest_SimDeltaTime; +CBUFFER_END + +m_CrestNameSpace + +void Execute(uint3 id) +{ + const Cascade cascade = Cascade::MakeFoam(id.z); + const float2 uv = DataIDToInputUV(id.xy, cascade, _Crest_TexturePosition, _Crest_TextureRotation, _Crest_TextureSize); + + half weight = _Crest_Weight; + + // Boundary check with feathering. + weight *= FeatherWeightFromUV(uv, _Crest_FeatherWidth); + + // Check we are within bounds. + if (weight <= 0.0) + { + return; + } + + const float source = _Crest_Texture.SampleLevel(LODData_linear_clamp_sampler, uv, 0).x; + const float target = _Crest_Target[id]; + + _Crest_Target[id] = Blend(_Crest_Blend, weight, _Crest_SimDeltaTime, source, target); +} + +m_CrestNameSpaceEnd + +m_CrestInputKernelDefault(Execute) diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/FoamTexture.compute.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/FoamTexture.compute.meta new file mode 100644 index 000000000..23a7b018d --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/FoamTexture.compute.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 69307e5986e134adc90ee257e7dba1ea +ComputeShaderImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/JumpFloodSDF.compute b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/JumpFloodSDF.compute new file mode 100644 index 000000000..16da02205 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/JumpFloodSDF.compute @@ -0,0 +1,154 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// An implementation of the Jump Flood algorithm by Rong and Tan +// Source: https://www.comp.nus.edu.sg/~tants/jfa.html + +#pragma kernel CrestInitialize +#pragma kernel CrestExecute +#pragma kernel CrestApply + +#pragma multi_compile_local __ d_Crest_Inverted +#pragma multi_compile_local __ d_Crest_Standalone + +#include "HLSLSupport.cginc" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Constants.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Helpers.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Cascade.hlsl" + +CBUFFER_START(CrestPerMaterial) +uint _Crest_JumpSize; +uint _Crest_TextureSize; +float4x4 _Crest_ProjectionToWorld; +float _Crest_HeightOffset; +float _Crest_WaterLevel; +CBUFFER_END + +// Holds scene depth for initialization. +Texture2D _Crest_Source; +RWTexture2D _Crest_Target; + +// Setting this to zero means that geometry at exactly the origin won't be handled +// gracefully - but it would only affect a single-pixel in the worst-case and would +// doubtfully be noticable anyway. Use infinity instead. +#define m_CrestUninitializedPosition float2(m_Crest_PositiveInfinity, m_Crest_PositiveInfinity) + +#if d_Crest_Inverted +#define m_DepthCheck depth > 0.0 +#else +#define m_DepthCheck depth <= 0.0 +#endif + +m_CrestNameSpace + +bool IsUninitializedPosition(const float2 position) +{ + return isinf(position.x); +} + +float2 IDtoWorld(const uint2 id, const float resolution, const float4x4 projectionToWorld) +{ + float2 uv = (((id + 0.5) / resolution) - 0.5) * 2.0; + return mul(projectionToWorld, float4(uv, 0.0, 1.0)).xz; +} + +void Initialize(const uint3 id) +{ + float2 position = IDtoWorld(id.xy, _Crest_TextureSize, _Crest_ProjectionToWorld); + float depth = _Crest_WaterLevel - (_Crest_Source[id.xy].x + _Crest_HeightOffset); + +#ifndef d_Crest_Standalone + // Add height offset. + uint slice0; uint slice1; float alpha; + PosToSliceIndices(position, 0, g_Crest_LodCount - 1, g_Crest_WaterScale, slice0, slice1, alpha); + depth += lerp(Cascade::MakeLevel(slice0).SampleLevel(position), Cascade::MakeLevel(slice1).SampleLevel(position), alpha); +#endif + + _Crest_Target[id.xy] = m_DepthCheck ? position : m_CrestUninitializedPosition; +} + +void Execute(const uint3 id) +{ + float2 nearest = _Crest_Source[id.xy]; + + const uint3 jump = uint3(_Crest_JumpSize, -(int)_Crest_JumpSize, 0); + const bool xBounds = _Crest_TextureSize - _Crest_JumpSize > id.x; + const bool yBounds = _Crest_TextureSize - _Crest_JumpSize > id.y; + const bool zBounds = id.x >= _Crest_JumpSize; + const bool wBounds = id.y >= _Crest_JumpSize; + + float2 candidates[8]; + candidates[0] = yBounds ? _Crest_Source[id.xy + jump.zx] : nearest; + candidates[1] = yBounds && xBounds ? _Crest_Source[id.xy + jump.xx] : nearest; + candidates[2] = xBounds ? _Crest_Source[id.xy + jump.xz] : nearest; + candidates[3] = xBounds && wBounds ? _Crest_Source[id.xy + jump.xy] : nearest; + candidates[4] = wBounds ? _Crest_Source[id.xy + jump.zy] : nearest; + candidates[5] = wBounds && zBounds ? _Crest_Source[id.xy + jump.yy] : nearest; + candidates[6] = zBounds ? _Crest_Source[id.xy + jump.yz] : nearest; + candidates[7] = zBounds && yBounds ? _Crest_Source[id.xy + jump.yx] : nearest; + + const float2 position = IDtoWorld(id.xy, _Crest_TextureSize, _Crest_ProjectionToWorld); + const float2 displacement = nearest - position; + float distance2 = dot(displacement, displacement); + + for (uint i = 0; i < 8; i++) + { + if (IsUninitializedPosition(nearest)) + { + nearest = candidates[i]; + continue; + } + + const float2 candidateDisplacement = candidates[i] - position; + const float candidateDistance2 = dot(candidateDisplacement, candidateDisplacement); + + if (candidateDistance2 < distance2) + { + nearest = candidates[i]; + distance2 = candidateDistance2; + } + } + + _Crest_Target[id.xy] = nearest; +} + +void Apply(const uint3 id) +{ + float2 result = _Crest_Target[id.xy]; + float2 position = IDtoWorld(id.xy, _Crest_TextureSize, _Crest_ProjectionToWorld); + +#if d_Crest_Inverted + float depth = _Crest_WaterLevel - (result.x + _Crest_HeightOffset); + +#ifndef d_Crest_Standalone + // Get depth including height offset. + uint slice0; uint slice1; float alpha; + PosToSliceIndices(position, 0, g_Crest_LodCount - 1, g_Crest_WaterScale, slice0, slice1, alpha); + depth += lerp(Cascade::MakeLevel(slice0).SampleLevel(position), Cascade::MakeLevel(slice1).SampleLevel(position), alpha); +#endif + + // Do not overwrite positive SDF. + if (depth > 0) return; +#endif + + float2 nearest = _Crest_Source[id.xy]; + float2 displacement = nearest - position; + + float distance = length(displacement); + +#if d_Crest_Inverted + distance = -distance; +#endif + + result.y = distance; + + _Crest_Target[id.xy] = result; +} + +m_CrestNameSpaceEnd + +m_CrestKernelDefault(Initialize) +m_CrestKernelDefault(Execute) +m_CrestKernelDefault(Apply) diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/JumpFloodSDF.compute.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/JumpFloodSDF.compute.meta new file mode 100644 index 000000000..da0c4e6d2 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/JumpFloodSDF.compute.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 55a9b76c48b7343b2b66ed91a0619c29 +ComputeShaderImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/LevelTexture.compute b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/LevelTexture.compute new file mode 100644 index 000000000..e1d328bb0 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/LevelTexture.compute @@ -0,0 +1,63 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// Adds height from a provided texture. Used by Painted and Texture input modes. + +#pragma kernel CrestExecute + +#pragma multi_compile_local __ d_CatmullRom + +#include "HLSLSupport.cginc" + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Constants.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Helpers.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/InputsDriven.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Cascade.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Filtering.hlsl" + +m_DisplacementTexture(Texture2D, 4) _Crest_Texture; +RWTexture2DArray _Crest_Target; + +CBUFFER_START(CrestPerMaterial) +int _Crest_Blend; +float _Crest_Weight; +float2 _Crest_TextureSize; +float2 _Crest_TexturePosition; +float2 _Crest_TextureRotation; +float2 _Crest_Resolution; +CBUFFER_END + +m_CrestNameSpace + +void Execute(uint3 id) +{ + const Cascade cascade = Cascade::MakeLevel(id.z); + const float2 uv = DataIDToInputUV(id.xy, cascade, _Crest_TexturePosition, _Crest_TextureRotation, _Crest_TextureSize); + + half weight = _Crest_Weight; + + // Feather boundaries. + weight *= FeatherWeightFromUV(uv, 0.0); + + // Check we are within bounds. + if (weight <= 0.0) + { + return; + } + +#if d_CatmullRom + const float source = Utility::SampleTextureCatmullRom(_Crest_Texture, LODData_linear_clamp_sampler, uv, _Crest_Resolution).x; +#else + const float source = _Crest_Texture.SampleLevel(LODData_linear_clamp_sampler, uv, 0.0).x; +#endif + + const float target = _Crest_Target[id]; + + _Crest_Target[id] = Blend(_Crest_Blend, weight, 1.0, source, target); +} + +m_CrestNameSpaceEnd + +m_CrestInputKernelDefault(Execute) diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/LevelTexture.compute.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/LevelTexture.compute.meta new file mode 100644 index 000000000..16e5c9572 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/LevelTexture.compute.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6bccbd92220dc418cacd3f17096c6b97 +ComputeShaderImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/ScatteringTexture.compute b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/ScatteringTexture.compute new file mode 100644 index 000000000..8d981dcd4 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/ScatteringTexture.compute @@ -0,0 +1,54 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#pragma kernel CrestExecute + +#include "HLSLSupport.cginc" + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Constants.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Helpers.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/InputsDriven.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Cascade.hlsl" + +Texture2D _Crest_Texture; +RWTexture2DArray _Crest_Target; + +CBUFFER_START(CrestPerMaterial) +int _Crest_Blend; +float _Crest_Weight; +float2 _Crest_TextureSize; +float2 _Crest_TexturePosition; +float2 _Crest_TextureRotation; +float _Crest_FeatherWidth; +CBUFFER_END + +m_CrestNameSpace + +void Execute(uint3 id) +{ + const Cascade cascade = Cascade::MakeScattering(id.z); + const float2 uv = DataIDToInputUV(id.xy, cascade, _Crest_TexturePosition, _Crest_TextureRotation, _Crest_TextureSize); + + half weight = _Crest_Weight; + + // Feather boundaries. + weight *= FeatherWeightFromUV(uv, _Crest_FeatherWidth); + + // Check we are within bounds. + if (weight <= 0.0) + { + return; + } + + const half4 source = _Crest_Texture.SampleLevel(LODData_linear_clamp_sampler, uv, 0); + const half3 target = _Crest_Target[id]; + weight *= source.a; + + _Crest_Target[id] = Blend(_Crest_Blend, weight, 1.0, source.xyz, target); +} + +m_CrestNameSpaceEnd + +m_CrestInputKernelDefault(Execute) diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/ScatteringTexture.compute.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/ScatteringTexture.compute.meta new file mode 100644 index 000000000..d354c8d74 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/ScatteringTexture.compute.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 78d6b75ecfb664f0cbb70001b1446627 +ComputeShaderImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/SphereWaterInteraction.compute b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/SphereWaterInteraction.compute new file mode 100644 index 000000000..29c37c6c2 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/SphereWaterInteraction.compute @@ -0,0 +1,124 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#pragma kernel CrestExecute + +#include "HLSLSupport.cginc" + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Constants.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Helpers.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/InputsDriven.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Cascade.hlsl" + +RWTexture2DArray _Crest_Target; + +CBUFFER_START(CrestPerWaterInput) +float3 _Crest_Position; +float3 _Crest_Velocity; +float _Crest_SimDeltaTime; +float _Crest_Weight; +float _Crest_Radius; +float _Crest_InnerSphereOffset; +float _Crest_InnerSphereMultiplier; +float _Crest_LargeWaveMultiplier; +CBUFFER_END + +m_CrestNameSpace + +// Resolution-aware interaction falloff function, inspired by "bandfiltered step" +// from Ottosson. Basically adding together this falloff function at different +// scales generates a consistent result that doesn't grow into an ugly uintended +// shape. Shadertoy with more details: https://www.shadertoy.com/view/WltBWM +float InteractionFalloff(float a, float x) +{ + float ax = a * x; + float ax2 = ax * ax; + float ax4 = ax2 * ax2; + + return ax / (1.0 + ax2 * ax4); +} + +void SphereSDF(float2 offsetXZ, out float sdf, out float2 normal) +{ + float distance = length(offsetXZ); + sdf = distance - _Crest_Radius; + normal = distance > 0.0001 ? offsetXZ / distance : float2(1.0, 0.0); +} + +void Execute(uint3 id) +{ + const Cascade cascade = Cascade::MakeDynamicWaves(id.z); + + if (_Crest_LargeWaveMultiplier * _Crest_Radius < cascade._Texel) + { + return; + } + + float2 positionXZ = cascade.IDToWorld(id.xy); + float2 offsetXZ = positionXZ - _Crest_Position.xz; + + // Spherical culling. Check diameter for buffered area. + if (length(offsetXZ) > _Crest_Radius * 4.0) + { + return; + } + + // Feather at edges of LOD to reduce streaking without reflections. + half weight = _Crest_Weight * FeatherWeightFromUV(cascade.WorldToUV(positionXZ).xy, 0.1); + + // Check we are within bounds. + if (weight <= 0.0) + { + return; + } + + float minimumWavelength = Cascade::Make(id.z)._MaximumWavelength * 0.5; + + float sdf; + float2 sdfNormal; + SphereSDF(offsetXZ, sdf, sdfNormal); + + // Push in same direction as velocity inside sphere, and opposite direction outside. + float verticalForce = 0.0; + { + verticalForce = -_Crest_Velocity.y; + + // Range / radius of interaction force + const float a = 1.67 / minimumWavelength; + verticalForce *= InteractionFalloff( a, sdf ); + } + + // Push water up in direction of motion, pull down behind. + float horizontalForce = 0.0; + if (sdf > 0.0 || sdf < -_Crest_Radius * _Crest_InnerSphereOffset) + { + // Range / radius of interaction force. + const float a = 1.43 / minimumWavelength; + + // Invert within sphere, to balance / negate forces applied outside of sphere. + float forceSign = sign(sdf); + + horizontalForce = forceSign * dot(sdfNormal, _Crest_Velocity.xz) * InteractionFalloff(a, abs(sdf)); + + // If inside sphere, add an additional weight. + if (sdf < 0.0) + { + horizontalForce *= _Crest_InnerSphereMultiplier; + } + } + + // Add to velocity (y-channel) to accelerate water. Magic number was the default + // value for _Strength which has been removed. + float acceleration = weight * (verticalForce + horizontalForce) * 0.2; + + // Helps interaction to work at different scales + acceleration /= minimumWavelength; + + _Crest_Target[id] = float2(_Crest_Target[id].x, _Crest_Target[id].y + acceleration * _Crest_SimDeltaTime); +} + +m_CrestNameSpaceEnd + +m_CrestInputKernelDefault(Execute) diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/SphereWaterInteraction.compute.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/SphereWaterInteraction.compute.meta new file mode 100644 index 000000000..3d7d9a0f1 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Hidden/SphereWaterInteraction.compute.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 98fb0af5d79724a2c945809b974524eb +ComputeShaderImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Override.shader b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Override.shader new file mode 100644 index 000000000..bb55e2d0e --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Override.shader @@ -0,0 +1,52 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +Shader "Crest/Inputs/All/Override" +{ + Properties + { + [Enum(ColorWriteMask)] + _Crest_ColorMask("Color Mask", Int) = 15 + _Crest_Value("Value", Vector) = (1, 1, 1, 1) + + [HideInInspector] + _Crest_Version("Version", Integer) = 0 + } + + SubShader + { + Pass + { + Blend Off + ColorMask [_Crest_ColorMask] + ZWrite Off + + CGPROGRAM + #pragma vertex Vertex + #pragma fragment Fragment + + #include "UnityCG.cginc" + + CBUFFER_START(CrestPerWaterInput) + float3 _Crest_DisplacementAtInputPosition; + half4 _Crest_Value; + half _Crest_Weight; + CBUFFER_END + + float4 Vertex(float3 positionOS : POSITION) : SV_POSITION + { + float3 positionWS = mul(unity_ObjectToWorld, float4(positionOS, 1.0)).xyz; + // Correct for displacement. + positionWS.xz -= _Crest_DisplacementAtInputPosition.xz; + return mul(UNITY_MATRIX_VP, float4(positionWS, 1.0)); + } + + half4 Fragment() : SV_Target + { + return _Crest_Value * _Crest_Weight; + } + ENDCG + } + } + CustomEditor "WaveHarmonic.Crest.Editor.CustomShaderGUI" +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Override.shader.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Override.shader.meta new file mode 100644 index 000000000..57bf132ff --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Override.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 288a089f90e714983b8a760dd49e5a5c +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Scale.shader b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Scale.shader new file mode 100644 index 000000000..f3890f2bb --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Scale.shader @@ -0,0 +1,129 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// 0-1 scaling of existing water data using multiplicative blending. + +Shader "Crest/Inputs/All/Scale" +{ + Properties + { + // Scale the water data. Zero is no data and one leaves data untouched. + _Crest_Scale("Scale", Range(0, 1)) = 0.35 + + // Use the texture instead of the scale value. + [Toggle(d_Texture)] + _Crest_ApplyTexture("Apply Texture", Float) = 0 + [MainTexture] _Crest_Texture("Texture", 2D) = "black" {} + + // Inverts the scale value. + [Toggle(d_Invert)] + _Crest_Invert("Invert", Float) = 0 + + [Header(Feather)] + // Feather the edges of the mesh using the texture coordinates. Easiest to understand with a plane. + [Toggle(d_Feather)] + _Crest_Feather("Feather At UV Extents", Float) = 0 + // How far from edge to feather. + _Crest_FeatherWidth("Feather Width", Range(0.001, 0.5)) = 0.1 + + [HideInInspector] + _Crest_Version("Version", Integer) = 0 + } + + SubShader + { + Pass + { + // Multiply + Blend Zero SrcColor + + CGPROGRAM + #pragma vertex Vert + #pragma fragment Frag + + #pragma shader_feature_local d_Texture + #pragma shader_feature_local d_Invert + #pragma shader_feature_local d_Feather + + #include "UnityCG.cginc" + + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl" + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/InputsDriven.hlsl" + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Helpers.hlsl" + +#if defined(d_Texture) || defined(d_Feather) +#define _NEED_UVS +#endif + +#if d_Texture + Texture2D _Crest_Texture; + SamplerState sampler_Crest_Texture; +#endif + + CBUFFER_START(CrestPerWaterInput) + float _Crest_Weight; + float3 _Crest_DisplacementAtInputPosition; + float _Crest_Scale; +#if d_Feather + half _Crest_FeatherWidth; +#endif +#if d_Texture + float4 _Crest_Texture_ST; +#endif + CBUFFER_END + + struct Attributes + { + float3 positionOS : POSITION; +#ifdef _NEED_UVS + float2 uv : TEXCOORD0; +#endif + }; + + struct Varyings + { + float4 positionCS : SV_POSITION; +#ifdef _NEED_UVS + float2 uv : TEXCOORD0; +#endif + }; + + Varyings Vert(Attributes input) + { + Varyings o; + + float3 positionWS = mul(unity_ObjectToWorld, float4(input.positionOS, 1.0)).xyz; + // Correct for displacement. + positionWS.xz -= _Crest_DisplacementAtInputPosition.xz; + o.positionCS = mul(UNITY_MATRIX_VP, float4(positionWS, 1.0)); + +#ifdef _NEED_UVS + o.uv = input.uv; +#endif + + return o; + } + + half4 Frag(Varyings input) : SV_Target + { +#if d_Texture + float scale = _Crest_Texture.Sample(sampler_Crest_Texture, input.uv).r; +#else + float scale = _Crest_Scale; +#endif + +#if d_Invert + scale = 1.0 - scale; +#endif + +#if d_Feather + scale = lerp(1.0, scale, WaveHarmonic::Crest::FeatherWeightFromUV(input.uv, _Crest_FeatherWidth)); +#endif + + return scale * _Crest_Weight; + } + ENDCG + } + } + CustomEditor "WaveHarmonic.Crest.Editor.CustomShaderGUI" +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Scale.shader.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Scale.shader.meta new file mode 100644 index 000000000..bc167f685 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Scale.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: cbf67e7cbdc0a4cc09a539707e0007b9 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/ScatteringColor.shader b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/ScatteringColor.shader new file mode 100644 index 000000000..0eb03e0f4 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/ScatteringColor.shader @@ -0,0 +1,82 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +Shader "Crest/Inputs/Scattering/Color" +{ + Properties + { + _Crest_Scattering("Scattering", Color) = (0.0, 0.09803921729326248, 0.20000000298023225, 0.0) + + [Toggle(d_Feather)] + _Crest_Feather("Feather At UV Extents", Float) = 0 + _Crest_FeatherWidth("Feather Width", Range(0.001, 0.5)) = 0.1 + + [HideInInspector] + _Crest_Version("Version", Integer) = 0 + } + + SubShader + { + Pass + { + Blend SrcAlpha OneMinusSrcAlpha + ZWrite Off + ColorMask RGB + + CGPROGRAM + #pragma vertex Vertex + #pragma fragment Fragment + + #pragma shader_feature_local d_Feather + + #include "UnityCG.cginc" + + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Helpers.hlsl" + + struct Attributes + { + float3 vertex : POSITION; +#if d_Feather + float2 uv : TEXCOORD0; +#endif + }; + + struct Varyings + { + float4 vertex : SV_POSITION; +#if d_Feather + float2 uv : TEXCOORD0; +#endif + }; + + CBUFFER_START(CrestPerWaterInput) + half4 _Crest_Scattering; + half _Crest_FeatherWidth; + CBUFFER_END + + Varyings Vertex(Attributes input) + { + Varyings output; + float3 positionWS = mul(unity_ObjectToWorld, float4(input.vertex, 1.0)).xyz; + output.vertex = mul(UNITY_MATRIX_VP, float4(positionWS, 1.0)); +#if d_Feather + output.uv = input.uv; +#endif + return output; + } + + float4 Fragment(Varyings input) : SV_Target + { + half4 color = _Crest_Scattering; + color.a = 1.0; +#if d_Feather + color.a *= WaveHarmonic::Crest::FeatherWeightFromUV(input.uv, _Crest_FeatherWidth); +#endif + + return color; + } + ENDCG + } + } + CustomEditor "WaveHarmonic.Crest.Editor.CustomShaderGUI" +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/ScatteringColor.shader.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/ScatteringColor.shader.meta new file mode 100644 index 000000000..a1ce0a57c --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/ScatteringColor.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ea69fc35da7574631aea97812ee8652b +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/ShapeWavesFromGeometry.shader b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/ShapeWavesFromGeometry.shader new file mode 100644 index 000000000..13ba48457 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/ShapeWavesFromGeometry.shader @@ -0,0 +1,192 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// Generates waves from geometry that is rendered into the water simulation from a top down camera. Expects +// following data on verts: +// - POSITION: Vert positions as normal. +// - TEXCOORD0: Axis - direction for waves to travel. "Forward vector" for waves. +// - TEXCOORD1: X - 0 at start of waves, 1 at end of waves +// +// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ uv1.x = 0 | +// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | uv0 - wave direction vector +// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | \|/ +// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ uv1.x = 1 +// ------------------- shoreline -------------------- +// + +Shader "Crest/Inputs/Shape Waves/Add From Geometry" +{ + Properties + { + [Enum(UnityEngine.Rendering.BlendMode)] + _Crest_BlendModeSource("Source Blend Mode", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] + _Crest_BlendModeTarget("Target Blend Mode", Int) = 1 + + // Controls ramp distance over which waves grow/fade as they move forwards + _Crest_FeatherWaveStart( "Feather wave start (0-1)", Range( 0.0, 10 ) ) = 0.1 + + [Toggle(d_Feather)] + _Crest_Feather("Feather At UV Extents", Float) = 0 + _Crest_FeatherWidth("Feather Width", Range(0.001, 1)) = 0.1 + + [HideInInspector] + _Crest_Version("Version", Integer) = 0 + } + + CGINCLUDE + #pragma vertex Vertex + #pragma fragment Fragment + // #pragma enable_d3d11_debug_symbols + + #pragma shader_feature_local d_Feather + + #include "UnityCG.cginc" + + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl" + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/InputsDriven.hlsl" + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Cascade.hlsl" + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Helpers.hlsl" + + Texture2DArray _Crest_WaveBuffer; + + CBUFFER_START(CrestPerWaterInput) + float _Crest_RespectShallowWaterAttenuation; + int _Crest_WaveBufferSliceIndex; + float _Crest_AverageWavelength; + float _Crest_AttenuationInShallows; + float _Crest_Weight; + float2 _Crest_AxisX; + half _Crest_MaximumAttenuationDepth; + half _Crest_FeatherWidth; + half _Crest_FeatherWaveStart; + CBUFFER_END + + m_CrestNameSpace + + struct Attributes + { + float4 vertex : POSITION; + float2 uv : TEXCOORD0; + }; + + struct Varyings + { + float4 vertex : SV_POSITION; + float2 uv : TEXCOORD0; + float3 uv_slice : TEXCOORD1; + float2 axis : TEXCOORD2; + float3 worldPosScaled : TEXCOORD3; + float2 worldPosXZ : TEXCOORD5; + }; + + Varyings Vertex(Attributes v) + { + Varyings o; + + const float3 positionOS = v.vertex.xyz; + o.vertex = UnityObjectToClipPos(positionOS); + const float3 worldPos = mul( unity_ObjectToWorld, float4(positionOS, 1.0) ).xyz; + + // UV coordinate into the cascade we are rendering into + o.uv_slice = Cascade::MakeAnimatedWaves(_Crest_LodIndex).WorldToUV(worldPos.xz); + + o.worldPosXZ = worldPos.xz; + + o.uv = v.uv; + + // World pos prescaled by wave buffer size, suitable for using as UVs in fragment shader + const float waveBufferSize = 0.5f * (1 << _Crest_WaveBufferSliceIndex); + o.worldPosScaled = worldPos / waveBufferSize; + + // Rotate forward axis around y-axis into world space + o.axis = unity_ObjectToWorld._m00_m20.xy; + o.axis = _Crest_AxisX.x * o.axis + _Crest_AxisX.y * float2(-o.axis.y, o.axis.x); + + return o; + } + + float4 Fragment(Varyings input) + { + float wt = _Crest_Weight; + + // Feature at away from shore. + wt *= saturate(input.uv.x / _Crest_FeatherWaveStart); + +#if d_Feather + wt *= FeatherWeightFromUV(input.uv, _Crest_FeatherWidth); +#endif + + float alpha = wt; + + // Attenuate if depth is less than half of the average wavelength + const half depth = Cascade::MakeDepth(_Crest_LodIndex).SampleSignedDepthFromSeaLevel(input.worldPosXZ) + + Cascade::MakeLevel(_Crest_LodIndex).SampleLevel(input.worldPosXZ); + half depth_wt = saturate(2.0 * depth / _Crest_AverageWavelength); + if (_Crest_MaximumAttenuationDepth < k_Crest_MaximumWaveAttenuationDepth) + { + depth_wt = lerp(depth_wt, 1.0, saturate(depth / _Crest_MaximumAttenuationDepth)); + } + const float attenuationAmount = _Crest_AttenuationInShallows * _Crest_RespectShallowWaterAttenuation; + wt *= attenuationAmount * depth_wt + (1.0 - attenuationAmount); + + // Quantize wave direction and interpolate waves + float axisHeading = atan2( input.axis.y, input.axis.x ) + 2.0 * 3.141592654; + const float dTheta = 0.5*0.314159265; + float angle0 = axisHeading; + const float rem = fmod( angle0, dTheta ); + angle0 -= rem; + const float angle1 = angle0 + dTheta; + + float2 axisX0; sincos( angle0, axisX0.y, axisX0.x ); + float2 axisX1; sincos( angle1, axisX1.y, axisX1.x ); + float2 axisZ0; axisZ0.x = -axisX0.y; axisZ0.y = axisX0.x; + float2 axisZ1; axisZ1.x = -axisX1.y; axisZ1.y = axisX1.x; + + const float2 uv0 = float2(dot( input.worldPosScaled.xz, axisX0 ), dot( input.worldPosScaled.xz, axisZ0 )); + const float2 uv1 = float2(dot( input.worldPosScaled.xz, axisX1 ), dot( input.worldPosScaled.xz, axisZ1 )); + + // Sample displacement, rotate into frame + float3 disp0 = _Crest_WaveBuffer.SampleLevel( sampler_Crest_linear_repeat, float3(uv0, _Crest_WaveBufferSliceIndex), 0 ).xyz; + float3 disp1 = _Crest_WaveBuffer.SampleLevel( sampler_Crest_linear_repeat, float3(uv1, _Crest_WaveBufferSliceIndex), 0 ).xyz; + disp0.xz = disp0.x * axisX0 + disp0.z * axisZ0; + disp1.xz = disp1.x * axisX1 + disp1.z * axisZ1; + float3 disp = lerp( disp0, disp1, rem / dTheta ); + + disp *= wt; + + return float4(disp, alpha); + } + + m_CrestNameSpaceEnd + + m_CrestVertex + m_CrestFragment(float4) + ENDCG + + SubShader + { + ZWrite Off + ZTest Always + Cull Off + + Pass + { + // Either additive or alpha blend for geometry waves. + Blend [_Crest_BlendModeSource] [_Crest_BlendModeTarget] + CGPROGRAM + ENDCG + } + + Pass + { + // Subsequent draws need to be additive. We cannot change render state with command + // buffer and changing on material is not aligned with command buffer usage. + Blend One One + CGPROGRAM + ENDCG + } + } + CustomEditor "WaveHarmonic.Crest.Editor.CustomShaderGUI" +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/ShapeWavesFromGeometry.shader.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/ShapeWavesFromGeometry.shader.meta new file mode 100644 index 000000000..2498f3292 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/ShapeWavesFromGeometry.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 95ec6475fc33247d4b80d07df23f2748 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Utility.shader b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Utility.shader new file mode 100644 index 000000000..46df5d243 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Utility.shader @@ -0,0 +1,55 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +Shader "Crest/Inputs/All/Utility" +{ + Properties + { + [Enum(UnityEngine.Rendering.BlendMode)] _Crest_BlendModeSource("Source Blend Mode", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _Crest_BlendModeTarget("Target Blend Mode", Int) = 1 + [Enum(UnityEngine.Rendering.BlendOp)] _Crest_BlendOperation("Blend Operation", Int) = 0 + [Enum(UnityEngine.Rendering.ColorWriteMask)] _Crest_ColorMask("Color Mask", Int) = 15 + _Crest_Value("Value", Vector) = (1, 1, 1, 1) + + [HideInInspector] + _Crest_Version("Version", Integer) = 0 + } + + SubShader + { + Pass + { + Blend [_Crest_BlendModeSource] [_Crest_BlendModeTarget] + BlendOp [_Crest_BlendOperation] + ColorMask [_Crest_ColorMask] + ZWrite Off + + CGPROGRAM + #pragma vertex Vertex + #pragma fragment Fragment + + #include "UnityCG.cginc" + + CBUFFER_START(CrestPerWaterInput) + float3 _Crest_DisplacementAtInputPosition; + half4 _Crest_Value; + half _Crest_Weight; + CBUFFER_END + + float4 Vertex(float3 positionOS : POSITION) : SV_POSITION + { + float3 positionWS = mul(unity_ObjectToWorld, float4(positionOS, 1.0)).xyz; + // Correct for displacement. + positionWS.xz -= _Crest_DisplacementAtInputPosition.xz; + return mul(UNITY_MATRIX_VP, float4(positionWS, 1.0)); + } + + half4 Fragment() : SV_Target + { + return _Crest_Value * _Crest_Weight; + } + ENDCG + } + } + CustomEditor "WaveHarmonic.Crest.Editor.CustomShaderGUI" +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Utility.shader.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Utility.shader.meta new file mode 100644 index 000000000..7e2444455 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/Utility.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 27b6f889dcd1b4d20919255e69078a08 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/WaterDepthFromGeometry.shader b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/WaterDepthFromGeometry.shader new file mode 100644 index 000000000..455acf4b1 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/WaterDepthFromGeometry.shader @@ -0,0 +1,54 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// Renders water depth - signed distance from sea level to sea floor +Shader "Crest/Inputs/Depth/Water Depth From Geometry" +{ + Properties + { + [HideInInspector] + _Crest_Version("Version", Integer) = 0 + } + + SubShader + { + Pass + { + BlendOp Max + ColorMask R + + CGPROGRAM + #pragma vertex Vert + #pragma fragment Frag + + #include "UnityCG.cginc" + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Constants.hlsl" + + struct Attributes + { + float3 positionOS : POSITION; + }; + + struct Varyings + { + float4 positionCS : SV_POSITION; + float terrainHeight : TEXCOORD0; + }; + + Varyings Vert(Attributes input) + { + Varyings o; + o.positionCS = UnityObjectToClipPos(input.positionOS); + o.terrainHeight = mul(unity_ObjectToWorld, float4(input.positionOS, 1.0)).y; + return o; + } + + float4 Frag(Varyings input) : SV_Target + { + return float4(input.terrainHeight, 0.0, 0.0, 0.0); + } + ENDCG + } + } + CustomEditor "WaveHarmonic.Crest.Editor.CustomShaderGUI" +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/WaterDepthFromGeometry.shader.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/WaterDepthFromGeometry.shader.meta new file mode 100644 index 000000000..500abbc0f --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/WaterDepthFromGeometry.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a8aeab41790ee4cb1b72e19aa4a7a1ad +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/WaterLevelFromGeometry.shader b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/WaterLevelFromGeometry.shader new file mode 100644 index 000000000..bb7f60a7a --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/WaterLevelFromGeometry.shader @@ -0,0 +1,71 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// This sets base water height to Y value of geometry. + +Shader "Crest/Inputs/Level/Water Level From Geometry" +{ + Properties + { + [Enum(UnityEngine.Rendering.BlendMode)] _Crest_BlendSource("Source Blend Mode", Int) = 1 + [Enum(UnityEngine.Rendering.BlendMode)] _Crest_BlendTarget("Target Blend Mode", Int) = 0 + [Enum(UnityEngine.Rendering.BlendOp)] _Crest_BlendOperation("Blend Operation", Int) = 0 + + [HideInInspector] + _Crest_Version("Version", Integer) = 0 + } + + SubShader + { + Pass + { + Blend [_Crest_BlendSource] [_Crest_BlendTarget] + BlendOp [_Crest_BlendOperation] + + CGPROGRAM + #pragma vertex Vert + #pragma fragment Frag + + #include "UnityCG.cginc" + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl" + + CBUFFER_START(CrestPerWaterInput) + float3 _Crest_DisplacementAtInputPosition; + half _Crest_Weight; + CBUFFER_END + + struct Attributes + { + float3 positionOS : POSITION; + }; + + struct Varyings + { + float4 positionCS : SV_POSITION; + float3 worldPos : TEXCOORD0; + }; + + Varyings Vert(Attributes input) + { + Varyings o; + + o.worldPos = mul(unity_ObjectToWorld, float4(input.positionOS, 1.0)).xyz; + // Correct for displacement + o.worldPos.xz -= _Crest_DisplacementAtInputPosition.xz; + + o.positionCS = mul(UNITY_MATRIX_VP, float4(o.worldPos, 1.0)); + + return o; + } + + half4 Frag(Varyings input) : SV_Target + { + // Write displacement to get from sea level of water to the y value of this geometry + const float heightOffset = input.worldPos.y - g_Crest_WaterCenter.y; + return heightOffset * _Crest_Weight; + } + ENDCG + } + } + CustomEditor "WaveHarmonic.Crest.Editor.CustomShaderGUI" +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/WaterLevelFromGeometry.shader.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/WaterLevelFromGeometry.shader.meta new file mode 100644 index 000000000..1ff8c471f --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Input/WaterLevelFromGeometry.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 06402bee7075b4b9fafef2b1ddf3b5cc +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/PackLevel.compute b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/PackLevel.compute new file mode 100644 index 000000000..d9736ebe6 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/PackLevel.compute @@ -0,0 +1,32 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#pragma kernel CrestPackLevel + +#include "HLSLSupport.cginc" + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Constants.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/InputsDriven.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Cascade.hlsl" + +RWTexture2DArray _Crest_Target; + +m_CrestNameSpace + +void PackLevel(uint3 id) +{ + float4 displacement = _Crest_Target[id]; + + // Previously, in the water shader, we would sample the offset at the displaced + // position so we need to do the same here to simulate that. + const float2 position = Cascade::MakeAnimatedWaves(id.z).IDToWorld(id.xy); + displacement.a = Cascade::MakeLevel(id.z).SampleLevel(position + displacement.xz); + + _Crest_Target[id] = displacement; +} + +m_CrestNameSpaceEnd + +m_CrestKernelDefault(PackLevel) diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/PackLevel.compute.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/PackLevel.compute.meta new file mode 100644 index 000000000..efa6fdad8 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/PackLevel.compute.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 62854cc297743429aa087d7708d221c0 +ComputeShaderImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Query.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Query.meta new file mode 100644 index 000000000..c4c0843d0 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Query.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c3649a5e721fa420f9b546578f3987a1 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Query/Query.compute b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Query/Query.compute new file mode 100644 index 000000000..ec2e00192 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Query/Query.compute @@ -0,0 +1,102 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#pragma kernel CrestQueryDisplacement d_CrestDisplacement +#pragma kernel CrestQueryFlow d_CrestFlow +#pragma kernel CrestQueryDepth d_CrestDepth + +// Must match value in script. +#define GROUP_SIZE 64 + +StructuredBuffer _Crest_QueryPositions_MinimumGridSizes; +RWStructuredBuffer _Crest_Target; + +#include "HLSLSupport.cginc" + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/InputsDriven.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Helpers.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Cascade.hlsl" + +#if d_CrestDisplacement +#define d_CrestSample SampleDisplacement +#define d_CrestMake MakeAnimatedWaves +#define d_CrestComponents float3 +#define d_CrestReturn result +#elif d_CrestDepth +#define d_CrestSample SampleSignedDepthFromSeaLevelAndDistance +#define d_CrestMake MakeDepth +#define d_CrestComponents float2 +#define d_CrestReturn float3(result.x, result.y, 0.0) +#else +#define d_CrestSample SampleFlow +#define d_CrestMake MakeFlow +#define d_CrestComponents float2 +// Unfortunately we don't support float2 vs float3s yet, on the C# side +#define d_CrestReturn float3(result.x, 0.0, result.y) +#endif + +m_CrestNameSpace + + +float3 Compute(const float2 i_Position, const float i_MinimumSlice, const float i_BaseScale) +{ + // Do not use last slice - this is a 'transition' slice used to cross-fade waves + // between LOD resolutions to avoid pops. That being said, this will have clamped + // samples leading to objects floating on waves that do not exist. + uint slice0, slice1; float alpha; + PosToSliceIndices(i_Position, i_MinimumSlice, g_Crest_LodCount - 2.0, i_BaseScale, slice0, slice1, alpha); + + const Cascade cascade0 = Cascade::d_CrestMake(slice0); + const Cascade cascade1 = Cascade::d_CrestMake(slice1); + + const float weight0 = (1.0 - alpha) * Cascade::Make(slice0)._Weight; + const float weight1 = (1.0 - weight0) * Cascade::Make(slice1)._Weight; + + d_CrestComponents result = + weight0 * cascade0.d_CrestSample(i_Position) + + weight1 * cascade1.d_CrestSample(i_Position); + + return d_CrestReturn; +} + +void Query(const uint3 id) +{ + const float3 data = _Crest_QueryPositions_MinimumGridSizes[id.x]; + const float minimumGridSize = data.z; + float2 position = data.xy; + + const float gridSizeSlice0 = Cascade::d_CrestMake(0)._Texel; + // Displacements should not utilize the last slice which is used for transitioning + // waves between sampling resolutions. While it might be ok to use the last slice + // for other targets, we avoid using it to be consistent with displacements. + const float minimumSlice = clamp(floor(log2(max(minimumGridSize / gridSizeSlice0, 1.0))), 0.0, g_Crest_LodCount - 2.0); + +#if d_CrestDisplacement + // Perform iteration to invert the displacement vector field - find position that displaces to query position, + // and return displacement at that point. + float2 undisplaced = position; + for (int i = 0; i < 4; i++) + { + const float3 displacement = Compute(undisplaced, minimumSlice, g_Crest_WaterScale); + const float2 error = (undisplaced + displacement.xz) - position; + undisplaced -= error; + } + + position = undisplaced; +#endif + + _Crest_Target[id.x] = Compute(position, minimumSlice, g_Crest_WaterScale); +} + +m_CrestNameSpaceEnd + +[numthreads(GROUP_SIZE, 1, 1)] +m_CrestKernelVariant(Query, Displacement) + +[numthreads(GROUP_SIZE, 1, 1)] +m_CrestKernelVariant(Query, Flow) + +[numthreads(GROUP_SIZE, 1, 1)] +m_CrestKernelVariant(Query, Depth) diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Query/Query.compute.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Query/Query.compute.meta new file mode 100644 index 000000000..3ca3dba16 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Query/Query.compute.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 7089d2ff99e0e4c9a94ef7c4711d5524 +ComputeShaderImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Query/QueryDisplacements.compute b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Query/QueryDisplacements.compute new file mode 100644 index 000000000..542a4af0b --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Query/QueryDisplacements.compute @@ -0,0 +1,8 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// Merged into Query.compute. + +#pragma kernel CrestExecute +[numthreads(1, 1, 1)] +void CrestExecute(uint3 id : SV_DispatchThreadID) { } diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Query/QueryDisplacements.compute.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Query/QueryDisplacements.compute.meta new file mode 100644 index 000000000..48699834e --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Query/QueryDisplacements.compute.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 10bebb70ef1ea46d0b8babd5dda216bb +ComputeShaderImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Query/QueryFlow.compute b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Query/QueryFlow.compute new file mode 100644 index 000000000..542a4af0b --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Query/QueryFlow.compute @@ -0,0 +1,8 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// Merged into Query.compute. + +#pragma kernel CrestExecute +[numthreads(1, 1, 1)] +void CrestExecute(uint3 id : SV_DispatchThreadID) { } diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Query/QueryFlow.compute.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Query/QueryFlow.compute.meta new file mode 100644 index 000000000..9b049e76a --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/Query/QueryFlow.compute.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d20424c840cb64d6e93f9b46e9c2353d +ComputeShaderImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/ShapeCombine.compute b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/ShapeCombine.compute new file mode 100644 index 000000000..13401d40d --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/ShapeCombine.compute @@ -0,0 +1,171 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// Compute shader to perform combine of displacements. Reads and writes to texture array which saves +// needing to do ping pong of render targets. Unfortunately reading/writing float4s is not supported +// on pre-DX11.3 hardware (aka typed UAV loads), so this path is not the default, for now.. + +#pragma kernel ShapeCombine +#pragma kernel ShapeCombine_DISABLE_COMBINE _DISABLE_COMBINE +#pragma kernel ShapeCombine_FLOW_ON _FLOW_ON +#pragma kernel ShapeCombine_FLOW_ON_DISABLE_COMBINE _FLOW_ON _DISABLE_COMBINE +#pragma kernel ShapeCombine_DYNAMIC_WAVE_SIM_ON _DYNAMIC_WAVE_SIM_ON +#pragma kernel ShapeCombine_DYNAMIC_WAVE_SIM_ON_DISABLE_COMBINE _DYNAMIC_WAVE_SIM_ON _DISABLE_COMBINE +#pragma kernel ShapeCombine_FLOW_ON_DYNAMIC_WAVE_SIM_ON _FLOW_ON _DYNAMIC_WAVE_SIM_ON +#pragma kernel ShapeCombine_FLOW_ON_DYNAMIC_WAVE_SIM_ON_DISABLE_COMBINE _FLOW_ON _DYNAMIC_WAVE_SIM_ON _DISABLE_COMBINE +#pragma kernel ShapeCombineDynamicWaves +#pragma kernel ShapeCombineCopyDynamicWaves + +#include "HLSLSupport.cginc" + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Constants.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/InputsDriven.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Cascade.hlsl" + +float _Crest_HorizontalDisplace; +float _Crest_DisplaceClamp; + +Texture2DArray _Crest_WaveBuffer; +RWTexture2DArray _Crest_Target; +RWTexture2DArray _Crest_DynamicWavesTarget; +RWTexture2DArray _Crest_AnimatedWavesTarget; + +m_CrestNameSpace + +void Flow(const float texel, out float2 offsets, out float2 weights) +{ + const float period = max(3.0 * texel, 1.0); + const float half_period = period / 2.0; + offsets = fmod(float2(g_Crest_Time, g_Crest_Time + half_period), period); + weights.x = offsets.x / half_period; + if (weights.x > 1.0) weights.x = 2.0 - weights.x; + weights.y = 1.0 - weights.x; +} + +void SampleDisplacementsCompute( + in RWTexture2DArray i_dispSampler, + in float i_resolution, in float3 i_uv_slice, + in float i_wt, inout float3 io_worldPos +) { + // NOTE: We have to roll our own bilinear filter in Compute shaders when + // reading from a RWTexture. The documentation below explains how SRV + // and UAV mappings of the same texture cannot exist at the same time. + // https://docs.microsoft.com/en-us/windows/desktop/direct3dhlsl/sm5-object-rwtexture2d + + // Convert from UV to coordinates + const float2 pixelCoord = i_uv_slice.xy * i_resolution; + + // Make relative to pixel centers + float2 pixelCoordCenters = pixelCoord - 0.5; + + // Clamp from below and above (desired?) + pixelCoordCenters = clamp(pixelCoordCenters, 0.0, i_resolution - 1.0); + + // Compute integral and fractional parts + const uint2 pixelCoordCentersBotLeft = floor(pixelCoordCenters); + const uint sliceIndex = i_uv_slice.z; + const float2 pixelCoordCentersFrac = frac(pixelCoordCenters); + + const half4 dataBotLeft = i_dispSampler[uint3(pixelCoordCentersBotLeft, sliceIndex)]; + const half4 dataBotRight = i_dispSampler[uint3(pixelCoordCentersBotLeft + uint2(1, 0), sliceIndex)]; + const half4 dataTopLeft = i_dispSampler[uint3(pixelCoordCentersBotLeft + uint2(0, 1), sliceIndex)]; + const half4 dataTopRight = i_dispSampler[uint3(pixelCoordCentersBotLeft + uint2(1, 1), sliceIndex)]; + + const float4 dataLerped = lerp( + lerp(dataBotLeft, dataBotRight, pixelCoordCentersFrac.x), + lerp(dataTopLeft, dataTopRight, pixelCoordCentersFrac.x), + pixelCoordCentersFrac.y + ); + + io_worldPos += i_wt * dataLerped.xyz; +} + +void ShapeCombineBase(uint3 id) +{ + const uint slice0 = _Crest_LodIndex; + const Cascade cascade = Cascade::MakeAnimatedWaves(slice0); + + const float3 uv = cascade.IDToUV(id.xy); + const float2 positionWSXZ = cascade.UVToWorld(uv); + + float3 result = 0.0; + + // Sample in waves for this cascade. + { +#if _FLOW_ON + const half2 flow = Cascade::MakeFlow(slice0).SampleFlow(positionWSXZ); + + float2 offsets, weights; + Flow(cascade._Texel, offsets, weights); + + result += cascade.Sample(_Crest_WaveBuffer, positionWSXZ - offsets[0] * flow).xyz * weights[0]; + result += cascade.Sample(_Crest_WaveBuffer, positionWSXZ - offsets[1] * flow).xyz * weights[1]; +#else + result += cascade.Sample(_Crest_WaveBuffer, uv).xyz; +#endif // _FLOW_ON + } + +#if !_DISABLE_COMBINE + { + const Cascade cascade = Cascade::MakeAnimatedWaves(slice0 + 1); + // Sample the shape 1 texture at this world position. + const float3 uv = cascade.WorldToUV(positionWSXZ); + // Waves to combine down from the next lod up the chain. + SampleDisplacementsCompute(_Crest_Target, cascade._Resolution, uv, 1.0, result); + } +#endif + +#if _DYNAMIC_WAVE_SIM_ON + { + // Convert dynamic wave sim to displacements. + result += Cascade::MakeDynamicWaves(slice0) + .SampleDynamicWavesDisplacement(positionWSXZ, _Crest_HorizontalDisplace, _Crest_DisplaceClamp); + } +#endif // _DYNAMIC_WAVE_SIM_ON + + _Crest_Target[uint3(id.xy, slice0)] = float4(result, 0.0); +} + +void ShapeCombineDynamicWaves(uint3 id) +{ + const uint slice0 = _Crest_LodIndex; + const Cascade cascade = Cascade::MakeAnimatedWaves(slice0); + const float3 uv = cascade.IDToUV(id.xy); + const float2 positionWSXZ = cascade.UVToWorld(uv); + float3 result = 0.0; + + { + const Cascade cascade = Cascade::MakeDynamicWaves(slice0 + 1); + const float3 uv = cascade.WorldToUV(positionWSXZ); + // Waves to combine down from the next lod up the chain. + SampleDisplacementsCompute(_Crest_DynamicWavesTarget, cascade._Resolution, uv, 1.0, result); + } + + { + const Cascade cascade = Cascade::MakeDynamicWaves(slice0); + const float3 uv = cascade.WorldToUV(positionWSXZ); + result += cascade.SampleDynamicWavesDisplacement(uv, _Crest_HorizontalDisplace, _Crest_DisplaceClamp); + } + + _Crest_DynamicWavesTarget[uint3(id.xy, slice0)] = float4(result, 0.0); +} + +void ShapeCombineCopyDynamicWaves(uint3 id) +{ + _Crest_AnimatedWavesTarget[id] += _Crest_DynamicWavesTarget[id]; +} + +m_CrestNameSpaceEnd + +[numthreads(THREAD_GROUP_SIZE_X, THREAD_GROUP_SIZE_Y, 1)] void ShapeCombine(uint3 id : SV_DispatchThreadID) { m_Crest::ShapeCombineBase(id); } +[numthreads(THREAD_GROUP_SIZE_X, THREAD_GROUP_SIZE_Y, 1)] void ShapeCombine_DISABLE_COMBINE(uint3 id : SV_DispatchThreadID) { m_Crest::ShapeCombineBase(id); } +[numthreads(THREAD_GROUP_SIZE_X, THREAD_GROUP_SIZE_Y, 1)] void ShapeCombine_FLOW_ON(uint3 id : SV_DispatchThreadID) { m_Crest::ShapeCombineBase(id); } +[numthreads(THREAD_GROUP_SIZE_X, THREAD_GROUP_SIZE_Y, 1)] void ShapeCombine_FLOW_ON_DISABLE_COMBINE(uint3 id : SV_DispatchThreadID) { m_Crest::ShapeCombineBase(id); } +[numthreads(THREAD_GROUP_SIZE_X, THREAD_GROUP_SIZE_Y, 1)] void ShapeCombine_DYNAMIC_WAVE_SIM_ON(uint3 id : SV_DispatchThreadID) { m_Crest::ShapeCombineBase(id); } +[numthreads(THREAD_GROUP_SIZE_X, THREAD_GROUP_SIZE_Y, 1)] void ShapeCombine_DYNAMIC_WAVE_SIM_ON_DISABLE_COMBINE(uint3 id : SV_DispatchThreadID) { m_Crest::ShapeCombineBase(id); } +[numthreads(THREAD_GROUP_SIZE_X, THREAD_GROUP_SIZE_Y, 1)] void ShapeCombine_FLOW_ON_DYNAMIC_WAVE_SIM_ON(uint3 id : SV_DispatchThreadID) { m_Crest::ShapeCombineBase(id); } +[numthreads(THREAD_GROUP_SIZE_X, THREAD_GROUP_SIZE_Y, 1)] void ShapeCombine_FLOW_ON_DYNAMIC_WAVE_SIM_ON_DISABLE_COMBINE(uint3 id : SV_DispatchThreadID) { m_Crest::ShapeCombineBase(id); } +[numthreads(THREAD_GROUP_SIZE_X, THREAD_GROUP_SIZE_Y, 1)] void ShapeCombineDynamicWaves(uint3 id : SV_DispatchThreadID) { m_Crest::ShapeCombineDynamicWaves(id); } +[numthreads(THREAD_GROUP_SIZE_X, THREAD_GROUP_SIZE_Y, 1)] void ShapeCombineCopyDynamicWaves(uint3 id : SV_DispatchThreadID) { m_Crest::ShapeCombineCopyDynamicWaves(id); } diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/ShapeCombine.compute.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/ShapeCombine.compute.meta new file mode 100644 index 000000000..ff7ea5a05 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/ShapeCombine.compute.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 02a2fc6716dfd4730a8c689ce364f132 +ComputeShaderImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/ShorelineColor.compute b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/ShorelineColor.compute new file mode 100644 index 000000000..926792aaa --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/ShorelineColor.compute @@ -0,0 +1,51 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#pragma kernel CrestShorelineColor + +#pragma multi_compile_local __ d_Crest_ShorelineColorSource_ShorelineDistance +#pragma multi_compile_local __ d_Crest_ShorelineScattering + +#include "HLSLSupport.cginc" + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Constants.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/InputsDriven.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Cascade.hlsl" + +RWTexture2DArray _Crest_Target; + +CBUFFER_START(CrestPerMaterial) +float _Crest_ShorelineColorMaximumDistance; +float _Crest_ShorelineColorFalloff; +half3 _Crest_ShorelineColor; +CBUFFER_END + +m_CrestNameSpace + +void ShorelineColor(uint3 id) +{ + const uint slice0 = id.z; + const Cascade cascade = +#if d_Crest_ShorelineScattering + Cascade::MakeScattering(slice0); +#else + Cascade::MakeAbsorption(slice0); +#endif + const float2 worldXZ = cascade.IDToWorld(id.xy); + + const half depth = Cascade::MakeDepth(slice0) +#if d_Crest_ShorelineColorSource_ShorelineDistance + .SampleShorelineDistance(worldXZ); +#else + .SampleSignedDepthFromSeaLevel(worldXZ); +#endif + + const float shallowness = pow(1.0 - saturate(depth / _Crest_ShorelineColorMaximumDistance), _Crest_ShorelineColorFalloff); + _Crest_Target[id] = lerp(_Crest_Target[id], _Crest_ShorelineColor, shallowness); +} + +m_CrestNameSpaceEnd + +m_CrestKernelDefault(ShorelineColor) diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/ShorelineColor.compute.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/ShorelineColor.compute.meta new file mode 100644 index 000000000..0c45bc706 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/ShorelineColor.compute.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 690b406e28d9a4abb842f6e39c9dc582 +ComputeShaderImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/UpdateDynamicWaves.compute b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/UpdateDynamicWaves.compute new file mode 100644 index 000000000..2f6a7c1a2 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/UpdateDynamicWaves.compute @@ -0,0 +1,156 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// Solves 2D wave equation + +#pragma kernel CrestUpdateDynamicWaves + +#include "HLSLSupport.cginc" + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Constants.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/InputsDriven.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Cascade.hlsl" + +RWTexture2DArray _Crest_Target; + +CBUFFER_START(CrestPerMaterial) +float _Crest_Damping; +float _Crest_Gravity; +float _Crest_SimDeltaTime; +float _Crest_LodChange; +float _Crest_CourantNumber; +float _Crest_AttenuationInShallows; +CBUFFER_END + +m_CrestNameSpace + +float ComputeWaveSpeed(float wavelength, float g) +{ + // wave speed of deep sea water waves: https://en.wikipedia.org/wiki/Wind_wave + // https://en.wikipedia.org/wiki/Dispersion_(water_waves)#Wave_propagation_and_dispersion + //float g = 9.81; float k = 2. * 3.141593 / wavelength; float cp = sqrt(g / k); return cp; + const float one_over_2pi = 0.15915494; + return sqrt(wavelength*g*one_over_2pi); +} + +void UpdateDynamicWaves(uint3 id) +{ + // Slice to sample previous frames data from. LOD change takes into account shifting of the cascades in scale. + const float sliceIndexSource = id.z + _Crest_LodChange; + const Cascade cascadeSource = Cascade::MakeDynamicWavesSource(sliceIndexSource); + + // Off either end of the cascade - not useful to sample anything from previous frame. Always initialise + // with 0 values. + if (sliceIndexSource < 0.0 || sliceIndexSource >= cascadeSource._Count - 1.0) + { + _Crest_Target[id] = (float2)0; + return; + } + + const float sliceIndex = id.z; + const Cascade cascade = Cascade::MakeDynamicWaves(sliceIndex); + + const float2 worldPosXZ = cascade.IDToWorld(id.xy); + const float gridSize = cascade._Texel; + + // Min wavelength for this scale + const float wavelength = 2.0 * gridSize; + // could make velocity depend on waves + //float h = max(waterSignedDepth + ft, 0.); + float c = ComputeWaveSpeed(wavelength, _Crest_Gravity); + + const float dt = _Crest_SimDeltaTime; + + // Clamp based on my main man Courant + c = min( c, _Crest_CourantNumber * gridSize / dt ); + + const half waterDepth = Cascade::MakeDepth(sliceIndex).SampleSignedDepthFromSeaLevel(worldPosXZ) + + Cascade::MakeLevel(sliceIndex).SampleLevel(worldPosXZ); + + // Wave reflections off geometry. + if (waterDepth <= 0.0) + { + _Crest_Target[id] = float2(0.0, 0.0); + return; + } + + const half2 velocity = Cascade::MakeFlow(sliceIndex).SampleFlow(worldPosXZ); + const float2 worldPosXZFlowed = worldPosXZ - dt * velocity; + const float3 uv_source = cascadeSource.WorldToUV(worldPosXZFlowed); + + // weighting for source position - weight 0 for off texture accesses to stop streaky artifacts + float2 distToEdge = min(uv_source.xy, 1.0 - uv_source.xy); + // soft, wide feather at boundary to balance reflections vs streaking under motion + const float edgeFeather = 0.1; + float weightEdge = saturate(min(distToEdge.x, distToEdge.y) / edgeFeather); + weightEdge = lerp(0.95, 1.0, weightEdge); + + // compute axes of laplacian kernel - rotated every frame + const float e = cascadeSource._OneOverResolution; + const float3 X = float3(1.0, 0.0, 0.0); + const float3 Y = float3(-X.y, X.x, 0.0); + + // no border wrap mode for RTs in unity it seems, + // so make any off-array reads 0 manually + const bool insideTarget = sliceIndexSource <= cascadeSource._Count && sliceIndexSource >= 0; + + float fxm, fym, fxp, fyp; float2 ft_v; + ft_v = fxm = fym = fxp = fyp = 0.0; + + if (insideTarget) + { + fxm = cascadeSource.SampleDynamicWaves(uv_source - e * X).x; // x minus + fym = cascadeSource.SampleDynamicWaves(uv_source - e * Y).x; // y minus + fxp = cascadeSource.SampleDynamicWaves(uv_source + e * X).x; // x plus + fyp = cascadeSource.SampleDynamicWaves(uv_source + e * Y).x; // y plus + ft_v = cascadeSource.SampleDynamicWaves(uv_source); + } + + // wave propagation + + // t - current value before update + const float ft = ft_v.x; + const float vt = ft_v.y; + + // wave equation + float coeff = dt * c * c / (gridSize * gridSize); + float vtp = vt + coeff * (fxm + fxp + fym + fyp - 4.0 * ft); + + // damping. works ok at low dts, doesnt damp well at high dts which counter intuitively leads to instabilities, i think. + vtp *= 1.0 - min(1.0, _Crest_Damping * dt); + + // dampen towards boundaries smoothly to eliminate reflections and streaking + vtp *= weightEdge; + + // integrate velocity onto position + float ftp = ft + dt * vtp; + ftp *= weightEdge; + + if (_Crest_AttenuationInShallows > 0.0) + { + // attenuate waves based on water depth. if depth is greater than 0.5*wavelength, water is considered Deep and wave is + // unaffected. if depth is less than this, wave velocity decreases. waves will then bunch up and grow in amplitude and + // eventually break. i model "Deep" water, but then simply ramp down waves in non-deep water with a linear multiplier. + // http://hyperphysics.phy-astr.gsu.edu/hbase/Waves/watwav2.html + // http://hyperphysics.phy-astr.gsu.edu/hbase/watwav.html#c1 + const float depthMul = 1.0 - (1.0 - saturate(2.0 * waterDepth / wavelength)) * dt * 2.0; + ftp *= _Crest_AttenuationInShallows * depthMul + (1.0 - _Crest_AttenuationInShallows); + } + + // Clear for safety as there is a potential for bad values which will propagate throughout the entire simulation. + // Zero is not ideal but better than bad values. Cases: + // - bad values randomly being sampled from the source texture, but ostensibly not injected by an input + // - bad values sometimes appearing after an hour or so runtime + if (!isfinite(ftp) || !isfinite(vtp)) + { + ftp = 0.0; + vtp = 0.0; + } + + _Crest_Target[id] = float2(ftp, vtp); +} + +m_CrestNameSpaceEnd + +m_CrestKernelDefault(UpdateDynamicWaves) diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/UpdateDynamicWaves.compute.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/UpdateDynamicWaves.compute.meta new file mode 100644 index 000000000..d880d7216 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/UpdateDynamicWaves.compute.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 0ba116507793f45b5ba3f016f0837660 +ComputeShaderImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/UpdateFoam.compute b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/UpdateFoam.compute new file mode 100644 index 000000000..2b64d0afb --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/UpdateFoam.compute @@ -0,0 +1,80 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#pragma kernel CrestUpdateFoam + +#include "HLSLSupport.cginc" + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Constants.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/InputsDriven.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Cascade.hlsl" + +RWTexture2DArray _Crest_Target; + +CBUFFER_START(CrestPerMaterial) +float _Crest_FoamFadeRate; +float _Crest_FoamMaximum; +float _Crest_WaveFoamStrength; +float _Crest_WaveFoamCoverage; +float _Crest_ShorelineFoamMaxDepth; +float _Crest_ShorelineFoamStrength; +float _Crest_SimDeltaTime; +float _Crest_SimDeltaTimePrev; +float _Crest_LodChange; +bool _Crest_NeedsPrewarming; +uint _Crest_MinimumWavesSlice; +float _Crest_FoamNegativeDepthPriming; +CBUFFER_END + +m_CrestNameSpace + +void UpdateFoam(uint3 id) +{ + const uint slice0 = id.z; + const Cascade cascade = Cascade::MakeFoam(slice0); + const float2 worldPosXZ = cascade.IDToWorld(id.xy); + half foam = 0.0; + + // Sample from previous frame. + { + const half2 velocity = Cascade::MakeFlow(slice0).SampleFlow(worldPosXZ); + const float2 positionXZ = worldPosXZ - _Crest_SimDeltaTime * velocity; + // Slice to sample previous frames data from. LOD change takes into account shifting of the cascades in scale. + const float sliceIndexSource = clamp(id.z + _Crest_LodChange, 0.0, cascade._Count - 1.0); + foam = Cascade::MakeFoamSource(sliceIndexSource).SampleFoamOverflow(positionXZ, 1.0); + } + + // fade + foam *= max(0.0, 1.0 - _Crest_FoamFadeRate * _Crest_SimDeltaTime); + + // Prewarm wave foam. 1.0 / _Crest_FoamFadeRate perfectly matches a paused water in edit mode, but this is an unnatural + // accumulation of foam and causes overshoots when _Crest_WaveFoamStrength is less than 1.0. + float simDeltaTime = _Crest_NeedsPrewarming ? max(_Crest_SimDeltaTime, min(1.0, _Crest_WaveFoamStrength - 1.0) / _Crest_FoamFadeRate) : _Crest_SimDeltaTime; + + // The determinant of the displacement Jacobian is a good measure for turbulence. + float det; + const half3 displacement = Cascade::MakeAnimatedWaves(max(_Crest_MinimumWavesSlice, slice0)).SampleDisplacement(worldPosXZ, det); + foam += 5.0 * simDeltaTime * _Crest_WaveFoamStrength * saturate( _Crest_WaveFoamCoverage - det ); + + // Prewarm shoreline foam. 1.0 / _Crest_FoamFadeRate perfectly matches a paused water in edit mode which is fine for + // shoreline foam. + simDeltaTime = _Crest_NeedsPrewarming ? (1.0 / _Crest_FoamFadeRate) : _Crest_SimDeltaTime; + + // Add foam in shallow water. use the displaced position to ensure we add foam where world objects are. + const half depth = Cascade::MakeDepth(slice0).SampleSignedDepthFromSeaLevel(worldPosXZ + displacement.xz) + displacement.y; + foam += _Crest_ShorelineFoamStrength * simDeltaTime * saturate(1.0 - depth / _Crest_ShorelineFoamMaxDepth); + + // Priming foam when under terrain helps with SWS leading-edge foam. + if (depth <= _Crest_FoamNegativeDepthPriming) + { + foam += simDeltaTime; + } + + _Crest_Target[id] = min(foam, _Crest_FoamMaximum); +} + +m_CrestNameSpaceEnd + +m_CrestKernelDefault(UpdateFoam) diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/UpdateFoam.compute.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/UpdateFoam.compute.meta new file mode 100644 index 000000000..3f784347f --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/UpdateFoam.compute.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 1149a28b1712c464fbc3d96bea0bc34d +ComputeShaderImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/UpdateShadow.hlsl b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/UpdateShadow.hlsl new file mode 100644 index 000000000..05e595cff --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/UpdateShadow.hlsl @@ -0,0 +1,175 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// Soft shadow term is red, hard shadow term is green. In HDRP, hard shadows are not computed and y channel will be 0. + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Constants.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/InputsDriven.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Cascade.hlsl" +// Noise functions used for jitter. +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Noise/Noise.hlsl" + +CBUFFER_START(CrestPerMaterial) +// Settings._jitterDiameterSoft, Settings._jitterDiameterHard, Settings._currentFrameWeightSoft, Settings._currentFrameWeightHard +float4 _Crest_JitterDiameters_CurrentFrameWeights; +float _Crest_SimDeltaTime; + +bool _Crest_ClearShadows; + +float3 _Crest_CenterPos; +float3 _Crest_Scale; +float4x4 _Crest_MainCameraProjectionMatrix; + +bool _Crest_SampleColorMap; +float3 _Crest_Absorption; +float3 _Crest_Scattering; +CBUFFER_END + +m_CrestNameSpace + +struct Attributes +{ + uint id : SV_VertexID; + UNITY_VERTEX_INPUT_INSTANCE_ID +}; + +struct Varyings +{ + float4 positionCS : SV_POSITION; + float3 positionWS : TEXCOORD0; + UNITY_VERTEX_OUTPUT_STEREO +}; + +Varyings Vertex(Attributes input) +{ + // This will work for all pipelines. + Varyings output = (Varyings)0; + UNITY_SETUP_INSTANCE_ID(input); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); + + output.positionCS = GetFullScreenTriangleVertexPosition(input.id); + float2 uv = GetFullScreenTriangleTexCoord(input.id); + + // World position from UV. + output.positionWS.xyz = float3(uv.x - 0.5, 0.0, uv.y - 0.5) * _Crest_Scale * 4.0 + _Crest_CenterPos; + output.positionWS.y = g_Crest_WaterCenter.y; + + return output; +} + +half SampleShadows(const float4 i_positionWS); +half ComputeShadowFade(const float4 i_positionWS); + +// Compiler shows warning when using intermediate returns, disable this. +#pragma warning(push) +#pragma warning(disable: 4000) +half ComputeShadow(const float4 i_positionWS, const float i_jitterDiameter, const half i_terrainHeight) +{ + float4 positionWS = i_positionWS; + + if (i_jitterDiameter > 0.0) + { + // Add jitter. + positionWS.xz += i_jitterDiameter * (hash33(uint3(abs(positionWS.xz * 10.0), _Time.y * 120.0)) - 0.5).xy; + + // Shadow Bleeding. + // If we are not within a terrain, then check for shadow bleeding. + if (i_positionWS.y > i_terrainHeight) + { + // WorldToSafeUV + half terrainHeight = Cascade::MakeDepth(_Crest_LodIndex).SampleSceneHeight(positionWS.xz); + + // If our current position is below the jittered terrain height, then we have landed within a terrain and + // we do not want to sample those shadows. + if (i_positionWS.y < terrainHeight) + { + // Return no shadows. + return 1.0; + } + } + } + + return SampleShadows(positionWS); +} +#pragma warning(pop) + +half2 Fragment(Varyings input) +{ + float4 positionWS = float4(input.positionWS.xyz, 1.0); + + // Shadow from last frame. Manually implement black border. + half2 shadow = Cascade::MakeShadowSource(_Crest_LodIndex + g_Crest_LodChange).SampleShadowOverflow(positionWS.xz, 1.0); + + // Add displacement so shorelines do not receive shadows incorrectly. + positionWS.xyz += Cascade::MakeAnimatedWaves(_Crest_LodIndex).SampleDisplacement(positionWS.xz); + + // This was calculated in vertex but we have to sample sea level offset in fragment. + float4 mainCameraCoordinates = mul(_Crest_MainCameraProjectionMatrix, positionWS); + + // Check if the current sample is visible in the main camera (and therefore the shadow map can be sampled). This is + // required as the shadow buffer is world aligned and surrounds viewer. + float3 projected = mainCameraCoordinates.xyz / mainCameraCoordinates.w; + if (projected.z < 1.0 && projected.z > 0.0 && abs(projected.x) < 1.0 && abs(projected.y) < 1.0) + { + half2 shadowThisFrame = 1.0; + +#if (SHADEROPTIONS_CAMERA_RELATIVE_RENDERING != 0) + positionWS.xyz -= _WorldSpaceCameraPos.xyz; +#endif + + half terrainHeight = Cascade::MakeDepth(_Crest_LodIndex).SampleSceneHeight(positionWS.xz); + + half softJitter = _Crest_JitterDiameters_CurrentFrameWeights[CREST_SHADOW_INDEX_SOFT]; + + if (_Crest_SampleColorMap) + { + half3 absorption = _Crest_Absorption; + half3 scattering = _Crest_Scattering; + + if (g_Crest_SampleAbsorptionSimulation) + { + absorption = Cascade::MakeAbsorption(_Crest_LodIndex).SampleAbsorption(positionWS.xz); + } + + if (g_Crest_SampleScatteringSimulation) + { + scattering = Cascade::MakeScattering(_Crest_LodIndex).SampleScattering(positionWS.xz); + } + + half3 extinction = absorption + scattering; + half factor = saturate(min(min(extinction.x, extinction.y), extinction.z) * g_Crest_DynamicSoftShadowsFactor); + softJitter = (1.0 - factor) * k_Crest_MaximumShadowJitter; + } + + // Add soft shadowing data. + shadowThisFrame[CREST_SHADOW_INDEX_SOFT] = ComputeShadow + ( + positionWS, + softJitter, + terrainHeight + ); + +#ifdef CREST_SAMPLE_SHADOW_HARD + // Add hard shadowing data. + shadowThisFrame[CREST_SHADOW_INDEX_HARD] = ComputeShadow + ( + positionWS, + _Crest_JitterDiameters_CurrentFrameWeights[CREST_SHADOW_INDEX_HARD], + terrainHeight + ); +#endif + + shadowThisFrame = (half2)1.0 - saturate(shadowThisFrame + ComputeShadowFade(positionWS)); + + shadow = lerp(shadow, shadowThisFrame, _Crest_JitterDiameters_CurrentFrameWeights.zw * _Crest_SimDeltaTime * 60.0); + } + + return shadow; +} + +m_CrestNameSpaceEnd + +m_CrestVertex +m_CrestFragment(half2) diff --git a/Assets/Obi/Resources/Compute/DistanceFunctions.cginc.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/UpdateShadow.hlsl.meta similarity index 75% rename from Assets/Obi/Resources/Compute/DistanceFunctions.cginc.meta rename to Packages/com.waveharmonic.crest/Runtime/Shaders/Data/UpdateShadow.hlsl.meta index 9159daa26..fb88c1694 100644 --- a/Assets/Obi/Resources/Compute/DistanceFunctions.cginc.meta +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/UpdateShadow.hlsl.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 5b1df68bf523b4106a6b113980018d93 +guid: d67c7804ecde845f19a01df7b5097557 ShaderIncludeImporter: externalObjects: {} userData: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/UpdateShadow.shader b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/UpdateShadow.shader new file mode 100644 index 000000000..069f8c60b --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/UpdateShadow.shader @@ -0,0 +1,170 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// Soft shadow term is red, hard shadow term is green. + +Shader "Hidden/Crest/Simulation/Update Shadow" +{ + SubShader + { + PackageRequirements + { + "com.unity.render-pipelines.high-definition" + } + + Tags { "RenderPipeline"="HDRenderPipeline" } + + Pass + { + HLSLPROGRAM + #pragma vertex Vertex + #pragma fragment Fragment + + // #pragma enable_d3d11_debug_symbols + + // SHADOW_ULTRA_LOW uses Gather which is 4.5. HDRP minimum is 5.0 so this is fine. + #pragma target 4.5 + + // TODO: We might be able to expose this to give developers the option. + // #pragma multi_compile SHADOW_ULTRA_LOW SHADOW_LOW SHADOW_MEDIUM SHADOW_HIGH + + // Ultra low uses Gather to filter which should be same cost as not filtering. See algorithms per keyword: + // Runtime/Lighting/Shadow/HDShadowAlgorithms.hlsl + #define SHADOW_ULTRA_LOW + #define AREA_SHADOW_LOW + #define PUNCTUAL_SHADOW_ULTRA_LOW + #define DIRECTIONAL_SHADOW_ULTRA_LOW + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/CommonMaterial.hlsl" + #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" + #include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/HDShadow.hlsl" + + float4x4 _Crest_ViewProjectionMatrix; + + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Data/UpdateShadow.hlsl" + + m_CrestNameSpace + + half SampleShadows(const float4 i_positionWS) + { + // Get directional light data. By definition we only have one directional light casting shadow. + DirectionalLightData light = _DirectionalLightDatas[_DirectionalShadowIndex]; + HDShadowContext context = InitShadowContext(); + + // Zeros are for screen space position and world space normal which are for filtering and normal bias + // respectively. They did not appear to have an impact. + half shadows = GetDirectionalShadowAttenuation(context, 0, i_positionWS.xyz, 0, _DirectionalShadowIndex, -light.forward); + // Apply shadow strength from main light. + shadows = LerpWhiteTo(shadows, light.shadowDimmer); + + return shadows; + } + + half ComputeShadowFade(const float4 i_positionWS) + { + // TODO: Work out shadow fade. + return 0.0; + } + + m_CrestNameSpaceEnd + ENDHLSL + } + } + + SubShader + { + PackageRequirements + { + "com.unity.render-pipelines.universal" + } + + Tags { "RenderPipeline"="UniversalPipeline" } + + Pass + { + HLSLPROGRAM + + #pragma vertex Vertex + #pragma fragment Fragment + // #pragma enable_d3d11_debug_symbols + + // Maybe this is the equivalent of the SHADOW_COLLECTOR_PASS define? Inspired from com.unity.render-pipelines.universal/Shaders/Utils/ScreenSpaceShadows.shader + #define _MAIN_LIGHT_SHADOWS_CASCADE + #define MAIN_LIGHT_CALCULATE_SHADOWS + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/CommonMaterial.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl" + + #define CREST_SAMPLE_SHADOW_HARD + + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Data/UpdateShadow.hlsl" + + m_CrestNameSpace + + half SampleShadows(const float4 i_positionWS) + { + // Includes soft shadows if _SHADOWS_SOFT is defined (requires multi-compile pragma). + return MainLightRealtimeShadow(TransformWorldToShadowCoord(i_positionWS.xyz)); + } + + half ComputeShadowFade(const float4 i_positionWS) + { + return GetShadowFade(i_positionWS.xyz); + } + + m_CrestNameSpaceEnd + ENDHLSL + } + } + + SubShader + { + Pass + { + HLSLPROGRAM + #pragma vertex Vertex + #pragma fragment Fragment + + #pragma multi_compile_shadowcollector + + // #pragma enable_d3d11_debug_symbols + + #define CREST_SAMPLE_SHADOW_HARD + #define d_Crest_ReceiveShadowsTransparent 1 + + #include "UnityCG.cginc" + + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/Core.hlsl" + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/Shadows.hlsl" + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Data/UpdateShadow.hlsl" + + m_CrestNameSpace + + half SampleShadows(const float4 i_positionWS) + { + // NOTE: "Shadow Projection > Close Fit" can still produce artefacts when away from caster, but this + // appears to be an improvement over the compute shader. + float4 shadowCoord = GET_SHADOW_COORDINATES(i_positionWS); + half shadows = UNITY_SAMPLE_SHADOW(_ShadowMapTexture, shadowCoord); + if (_Crest_ClearShadows) shadows = 1.0; + shadows = lerp(_LightShadowData.r, 1.0, shadows); + + return shadows; + } + + half ComputeShadowFade(const float4 i_positionWS) + { + float z = dot(i_positionWS.xyz - _WorldSpaceCameraPos.xyz, unity_CameraToWorld._m02_m12_m22); + float fadeDistance = UnityComputeShadowFadeDistance(i_positionWS.xyz, z); + float fade = UnityComputeShadowFade(fadeDistance); + return fade; + } + + m_CrestNameSpaceEnd + ENDHLSL + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/UpdateShadow.shader.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/UpdateShadow.shader.meta new file mode 100644 index 000000000..e114ffa84 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Data/UpdateShadow.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 6195b173b90b246ac9f5300b7e2aa482 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Library.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library.meta new file mode 100644 index 000000000..ce4345250 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 125a3abfbf29c41c8a9e84377488461c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Cascade.hlsl b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Cascade.hlsl new file mode 100644 index 000000000..5184fb453 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Cascade.hlsl @@ -0,0 +1,545 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#ifndef CREST_CASCADE_INCLUDED +#define CREST_CASCADE_INCLUDED + +// Fix Unity macro leaks. +#undef _Weight + +#ifdef SHADER_API_PSSL +#define m_ConstantReturn const +#else +#define m_ConstantReturn +#endif + +#define m_SanitizeAbsorption(x) x +#define m_SanitizeAlbedo(x) x +#define m_SanitizeAnimatedWaves(x) x +#define m_SanitizeClip(x) x +// Infinity is unsafe, as it causes NaNs if multiplied by zero. +#define m_SanitizeDepth(x) max(x, -m_FloatMaximum) +#define m_SanitizeDynamicWaves(x) x +#define m_SanitizeFlow(x) x +#define m_SanitizeFoam(x) x +#define m_SanitizeLevel(x) x +#define m_SanitizeScattering(x) x +#define m_SanitizeShadow(x) x + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/InputsDriven.hlsl" + +#define m__MakeCascade(name, source) \ + static Cascade Make##name##source(uint i_Index) \ + { \ + float4 perType = g_Crest_SamplingParameters##name; \ + float4 perSlice = g_Crest_SamplingParametersCascade##name##source[i_Index]; \ + Cascade result; \ + result._Texture = g_Crest_Cascade##name##source; \ + result._SamplingParameters = g_Crest_SamplingParametersCascade##name##source; \ + result._Index = i_Index; \ + result._PositionSnapped = perSlice.xy; \ + result._Texel = perSlice.z; \ + result._Resolution = perType.y; \ + result._OneOverResolution = perType.z; \ + result._Count = perType.x; \ + return result; \ + } \ + +#define m_MakeCascadeCopy(name) \ + static Cascade Make##name(uint i_Index, Cascade i_Cascade) \ + { \ + float4 perType = g_Crest_SamplingParameters##name; \ + float4 perSlice = i_Cascade._SamplingParameters[i_Index]; \ + Cascade result; \ + result._Texture = i_Cascade._Texture; \ + result._SamplingParameters = i_Cascade._SamplingParameters; \ + result._Index = i_Index; \ + result._PositionSnapped = perSlice.xy; \ + result._Texel = perSlice.z; \ + result._Resolution = perType.y; \ + result._OneOverResolution = perType.z; \ + result._Count = perType.x; \ + return result; \ + } + +#define m__MakeCascadeShared(source) \ + static Cascade Make##source(uint i_Index) \ + { \ + const float4 perAll = g_Crest_CascadeData##source[i_Index]; \ + Cascade result; \ + result._Index = i_Index; \ + result._Scale = perAll.x; \ + result._Weight = perAll.y; \ + result._MaximumWavelength = perAll.z; \ + return result; \ + } + +#define m_MakeCascade(name) m__MakeCascade(name,) +#define m_MakeCascadePrevious(name) m__MakeCascade(name, Source) +#define m_MakeCascadeShared m__MakeCascadeShared() +#define m_MakeCascadeSharedPrevious m__MakeCascadeShared(Source) + +#define m_Sample(name, type, swizzle) \ + type Sample##name(const float2 i_Position) m_ConstantReturn \ + { \ + type result = Sample(i_Position)swizzle; \ + result = m_Sanitize##name(result); \ + return result; \ + } \ + type Sample##name(const float3 i_UV) m_ConstantReturn \ + { \ + return Sample(i_UV)swizzle; \ + } \ + type Sample##name(const uint2 i_ID) m_ConstantReturn \ + { \ + return Sample(i_ID)swizzle; \ + } \ + type Sample##name##Overflow(const float2 i_Position, const float i_Border) m_ConstantReturn \ + { \ + type result = 0.0; \ + const float3 uv = WorldToUV(i_Position); \ + const half2 r = abs(uv.xy - 0.5); \ + const half rMax = 0.5 - _OneOverResolution * i_Border; \ + if (max(r.x, r.y) <= rMax) \ + { \ + result = Sample##name(uv); \ + } \ + else if (_Index < _Count) \ + { \ + const Cascade cascade = Cascade::Make##name(_Index + 1, this); \ + const float3 uv = cascade.WorldToUV(i_Position); \ + const half2 r = abs(uv.xy - 0.5); \ + const half rMax = 0.5 - cascade._OneOverResolution * i_Border; \ + if (max(r.x, r.y) <= rMax) \ + { \ + result = Sample##name(uv); \ + } \ + } \ + return result; \ + } \ + type Sample##name##Overflow(const float3 i_UV, const float i_Border) m_ConstantReturn \ + { \ + type result = 0.0; \ + const half2 r = abs(i_UV.xy - 0.5); \ + const half rMax = 0.5 - _OneOverResolution * i_Border; \ + if (max(r.x, r.y) <= rMax) \ + { \ + result = Sample##name(i_UV); \ + } \ + else if (_Index < _Count) \ + { \ + const Cascade cascade = Cascade::Make##name(_Index + 1, this); \ + const float3 uv = cascade.WorldToUV(UVToWorld(i_UV)); \ + const half2 r = abs(uv.xy - 0.5); \ + const half rMax = 0.5 - cascade._OneOverResolution * i_Border; \ + if (max(r.x, r.y) <= rMax) \ + { \ + result = Sample##name(uv); \ + } \ + } \ + return result; \ + } + +#define m_SampleWeighted(name, type) \ + void Sample##name(const float2 i_Position, const float i_Weight, inout type io_##name) m_ConstantReturn \ + { \ + io_##name += Sample##name(i_Position) * i_Weight; \ + } \ + void Sample##name(const float3 i_UV, const float i_Weight, inout type io_##name) m_ConstantReturn \ + { \ + io_##name += Sample##name(i_UV) * i_Weight; \ + } \ + void Sample##name##Overflow(const float2 i_Position, const float i_Border, const float i_Weight, inout type io_##name) m_ConstantReturn \ + { \ + io_##name += Sample##name##Overflow(i_Position, i_Border) * i_Weight; \ + } + +m_CrestNameSpace + +struct Cascade +{ + Texture2DArray _Texture; + float _Index; + float2 _PositionSnapped; + float _Resolution; + float _Count; + float _OneOverResolution; + float _Texel; + float _MaximumWavelength; + + float _Scale; + float _Weight; + + // For copy constructor. + float4 _SamplingParameters[MAX_LOD_COUNT]; + + m_MakeCascadeShared + m_MakeCascadeSharedPrevious + + static Cascade Make(const uint i_Index, bool i_Previous) + { + const float4 perAll = i_Previous ? g_Crest_CascadeDataSource[i_Index] : g_Crest_CascadeData[i_Index]; + Cascade result; + result._Index = i_Index; + result._Scale = perAll.x; + result._Weight = perAll.y; + result._MaximumWavelength = perAll.z; + return result; + } + + m_MakeCascade(Absorption) + m_MakeCascadeCopy(Absorption) + m_MakeCascade(Albedo) + m_MakeCascadeCopy(Albedo) + m_MakeCascade(AnimatedWaves) + m_MakeCascadeCopy(AnimatedWaves) + m_MakeCascadePrevious(AnimatedWaves) + m_MakeCascade(Clip) + m_MakeCascadeCopy(Clip) + m_MakeCascade(Depth) + m_MakeCascadeCopy(Depth) + m_MakeCascade(DynamicWaves) + m_MakeCascadeCopy(DynamicWaves) + m_MakeCascadePrevious(DynamicWaves) + m_MakeCascade(Flow) + m_MakeCascadeCopy(Flow) + m_MakeCascade(Foam) + m_MakeCascadeCopy(Foam) + m_MakeCascadePrevious(Foam) + m_MakeCascade(Level) + m_MakeCascadeCopy(Level) + m_MakeCascade(Scattering) + m_MakeCascadeCopy(Scattering) + m_MakeCascade(Shadow) + m_MakeCascadeCopy(Shadow) + m_MakeCascadePrevious(Shadow) + + // Convert compute shader id to uv texture coordinates + float3 IDToUV(const uint2 i_ID) m_ConstantReturn + { + return float3((i_ID + 0.5) / _Resolution, _Index); + } + + float2 UVToWorld(const float3 i_UV) m_ConstantReturn + { + return _Texel * _Resolution * (i_UV.xy - 0.5) + _PositionSnapped; + } + + float3 WorldToUV(const float2 i_Position) m_ConstantReturn + { + return float3((i_Position - _PositionSnapped) / (_Texel * _Resolution) + 0.5, _Index); + } + + float2 IDToWorld(const uint2 i_ID) m_ConstantReturn + { + return UVToWorld(IDToUV(i_ID)); + } + + bool IsOutOfBounds(float2 uv, float offset) m_ConstantReturn + { + const half2 r = abs(uv - 0.5); + const half rMax = 0.5 - _OneOverResolution * offset; + return max(r.x, r.y) > rMax; + } + + half4 Sample(const float3 i_UV) m_ConstantReturn + { + return _Texture.SampleLevel(LODData_linear_clamp_sampler, i_UV, 0.0); + } + + half4 Sample(const Texture2DArray i_Texture, const float3 i_UV) m_ConstantReturn + { + return i_Texture.SampleLevel(LODData_linear_clamp_sampler, i_UV, 0.0); + } + + half4 Sample(const float2 i_Position) m_ConstantReturn + { + return Sample(WorldToUV(i_Position)); + } + + half4 Sample(const Texture2DArray i_Texture, const float2 i_Position) m_ConstantReturn + { + return Sample(i_Texture, WorldToUV(i_Position)); + } + + half4 Sample(const uint2 i_ID) m_ConstantReturn + { + return Sample(IDToUV(i_ID)); + } + + half4 Sample(const Texture2DArray i_Texture, const uint2 i_ID) m_ConstantReturn + { + return Sample(i_Texture, IDToUV(i_ID)); + } + + float3 Internal_WrapToNextSlice(float3 i_uv, float i_overflowed) m_ConstantReturn + { + // Next slice is twice the size so half the coordinates to match position. + float overflow = 0.5 * i_overflowed; + i_uv = float3((i_uv.xy - overflow) * (1.0 - overflow) + overflow, i_uv.z + i_overflowed); + return i_uv; + } + + // Wraps to next slice if coordinates outside of range. + float3 WrapToNextSlice(float3 i_uv) m_ConstantReturn + { + return Internal_WrapToNextSlice(i_uv, any(i_uv.xy > 1.0) || any(i_uv.xy < 0.0)); + } + + // Wraps to next slice if coordinates outside of range. + float3 WrapToNextSlice(float3 i_uv, float i_depth) m_ConstantReturn + { + return Internal_WrapToNextSlice(i_uv, any(i_uv.xy > 1.0) || any(i_uv.xy < 0.0) && i_uv.z + 1.0 < i_depth); + } + + m_Sample(Absorption, half3, .xyz) + m_SampleWeighted(Absorption, half3) + m_Sample(Albedo, half4, ) + m_SampleWeighted(Albedo, half4) + m_Sample(AnimatedWaves, half4, ) + m_SampleWeighted(AnimatedWaves, float4) // Use float because parameter is position + m_Sample(Clip, half, .x) + m_SampleWeighted(Clip, half) + m_Sample(Depth, half2, .xy) + m_SampleWeighted(Depth, half2) + m_Sample(DynamicWaves, half2, .xy) + m_Sample(Flow, half2, .xy) + m_SampleWeighted(Flow, half2) + m_Sample(Foam, half, .x) + m_SampleWeighted(Foam, half) + m_Sample(Level, half, .x) + m_SampleWeighted(Level, half) + m_Sample(Scattering, half3, .xyz) + m_SampleWeighted(Scattering, half3) + m_Sample(Shadow, half2, .xy) + m_SampleWeighted(Shadow, half2) + + float3 SampleDisplacement(const float2 i_Position) m_ConstantReturn + { + float4 position = SampleAnimatedWaves(i_Position); + position.y += position.w; + return position.xyz; + } + + void SampleDisplacement(const float2 i_Position, const float i_Weight, inout float3 io_Position) m_ConstantReturn + { + io_Position += SampleDisplacement(i_Position).xyz * i_Weight; + } + + half3 SampleWaveDisplacement(const float2 i_Position) m_ConstantReturn + { + return SampleAnimatedWaves(i_Position).xyz; + } + + half3 SampleWaveDisplacement(const float3 i_UV) m_ConstantReturn + { + return SampleAnimatedWaves(i_UV).xyz; + } + + half4 __SampleDisplacements(const float2 i_Position, out float3 o_DisplacementX, out float3 o_DisplacementZ) m_ConstantReturn + { + const float3 uv = WorldToUV(i_Position); + const half4 displacement = SampleAnimatedWaves(uv); + const float3 dd = float3(_OneOverResolution, 0.0, _Texel); + o_DisplacementX = dd.zyy + SampleWaveDisplacement(uv + dd.xyy); + o_DisplacementZ = dd.yyz + SampleWaveDisplacement(uv + dd.yxy); + return displacement; + } + + void SampleDisplacement(const float2 i_Position, const float i_Weight, inout float3 io_Position, inout half2 io_Derivatives, inout half io_LevelOffset) m_ConstantReturn + { + float3 uv = WorldToUV(i_Position); + float4 position = SampleAnimatedWaves(uv); + io_LevelOffset += position.w * i_Weight; + io_Position += position.xyz * i_Weight; + + // Derivatives + { + // Compute derivative of water level - needed to get base normal of water. Water + // normal, normal map etc is then added to base normal. + const float2 dd = float2(_OneOverResolution, 0.0); + const float xOffset = SampleAnimatedWaves(uv + dd.xyy).w; + const float zOffset = SampleAnimatedWaves(uv + dd.yxy).w; + + // TODO: Is weight in correct position? + io_Derivatives.x += i_Weight * (xOffset - position.w) / _Texel; + io_Derivatives.y += i_Weight * (zOffset - position.w) / _Texel; + } + } + + void SampleDisplacement(const float2 i_Position, const float i_Weight, inout float3 io_Position, inout half2 io_Derivatives) m_ConstantReturn + { + half offset = 0.0; + SampleDisplacement(i_Position, i_Weight, io_Position, io_Derivatives, offset); + io_Position.y += offset; + } + + half3 SampleDisplacement(const float2 i_Position, out half o_Determinent) m_ConstantReturn + { + float3 xDisplacement; float3 zDisplacement; + half4 displacement = __SampleDisplacements(i_Position, xDisplacement, zDisplacement); + o_Determinent = __ComputeDisplacementDeterminant(displacement.xyz, xDisplacement, zDisplacement); + displacement.y += displacement.w; + return displacement.xyz; + } + + half __ComputeDisplacementDeterminant(half3 i_Displacement, float3 i_DisplacementX, float3 i_DisplacementZ) m_ConstantReturn + { + const float2x2 jacobian = (float4(i_DisplacementX.xz, i_DisplacementZ.xz) - i_Displacement.xzxz) / _Texel; + // Determinant is < 1 for pinched, < 0 for overlap/inversion and > 1 for stretched. + return determinant(jacobian); + } + + half2 __ComputeDisplacementNormals(half3 i_Displacement, float3 i_DisplacementX, float3 i_DisplacementZ) m_ConstantReturn + { + float3 xProduct = cross(i_DisplacementZ - i_Displacement, i_DisplacementX - i_Displacement); + + // Situation could arise where cross returns 0, prob when arguments are two aligned vectors. This + // resulted in NaNs and flashing screen in HDRP. Force normal to point upwards as the only time + // it should point downwards is for underwater (handled elsewhere) or in surface inversions which + // should not happen for well tweaked waves, and look broken anyway. + xProduct.y = max(xProduct.y, 0.0001); + + return normalize(xProduct).xz; + } + + // TODO: Rename + void SampleNormals(const float2 i_Position, const float i_Weight, inout half2 io_Normal, inout half io_Determinant) m_ConstantReturn + { + float3 xDisplacement; float3 zDisplacement; + half3 displacement = __SampleDisplacements(i_Position, xDisplacement, zDisplacement).xyz; + io_Normal += __ComputeDisplacementNormals(displacement, xDisplacement, zDisplacement) * i_Weight; + io_Determinant += __ComputeDisplacementDeterminant(displacement, xDisplacement, zDisplacement) * i_Weight; + } + + half SampleSceneHeight(const float2 i_Position) m_ConstantReturn + { + return SampleDepth(i_Position).x; + } + + void SampleSceneHeight(const float2 i_Position, const float i_Weight, inout half io_Height) m_ConstantReturn + { + io_Height += SampleSceneHeight(i_Position) * i_Weight; + } + + half SampleShorelineDistance(const float2 i_Position) m_ConstantReturn + { + return Sample(i_Position).y; + } + + half SampleShorelineDistance(const float3 i_UV) m_ConstantReturn + { + return Sample(i_UV).y; + } + + half SampleShorelineDistance(const uint2 i_ID) m_ConstantReturn + { + return Sample(i_ID).y; + } + + void SampleShorelineDistance(const float2 i_Position, const float i_Weight, inout half io_Distance) m_ConstantReturn + { + io_Distance += SampleShorelineDistance(i_Position) * i_Weight; + } + + half SampleSignedDepthFromSeaLevel(const float2 i_Position) m_ConstantReturn + { + return g_Crest_WaterCenter.y - SampleSceneHeight(i_Position); + } + + half2 SampleSignedDepthFromSeaLevelAndDistance(const float2 i_Position) m_ConstantReturn + { + half2 value = SampleDepth(i_Position); + value.x = g_Crest_WaterCenter.y - value.x; + return value; + } + + void SampleSignedDepthFromSeaLevel(const float2 i_Position, const float i_Weight, inout half io_Depth) m_ConstantReturn + { + io_Depth += (g_Crest_WaterCenter.y - SampleSceneHeight(i_Position)) * i_Weight; + } + + // Perform iteration to invert the displacement vector field - find position that displaces to query position. + float2 SampleInvertedDisplacement(const float2 i_Position) m_ConstantReturn + { + float2 inverted = i_Position; + for (uint i = 0; i < 4; i++) + { + const float2 displacement = SampleAnimatedWaves(inverted).xz; + const float2 error = (inverted + displacement) - i_Position; + inverted -= error; + } + + return inverted; + } + + half3 SampleDisplacementFromUndisplaced(const float2 i_Position) m_ConstantReturn + { + return SampleDisplacement(SampleInvertedDisplacement(i_Position)); + } + + half3 SampleDynamicWavesDisplacement(const float2 i_Position, const float i_HorizontalDisplace, const float i_DisplaceClamp) m_ConstantReturn + { + const float3 uv = WorldToUV(i_Position); + return SampleDynamicWavesDisplacement(uv, i_HorizontalDisplace, i_DisplaceClamp); + } + + half3 SampleDynamicWavesDisplacement(const float3 i_UV, const float i_HorizontalDisplace, const float i_DisplaceClamp) m_ConstantReturn + { + const float3 uv = i_UV; + + half3 displacement = 0.0; + displacement.y = Sample(uv).x; + + const float2 invRes = float2(_OneOverResolution, 0.0); + const half waveSimY_px = Sample(uv + invRes.xyy).x; + const half waveSimY_nx = Sample(uv - invRes.xyy).x; + const half waveSimY_pz = Sample(uv + invRes.yxy).x; + const half waveSimY_nz = Sample(uv - invRes.yxy).x; + // Compute displacement from gradient of water surface - discussed in issue #18 and then in issue #47. + + // For gerstner waves, horizontal displacement is proportional to derivative of + // vertical displacement multiplied by the wavelength. + const float wavelength_mid = 2.0 * _Texel * 1.5; + const float wavevector = 2.0 * 3.14159 / wavelength_mid; + const float2 dydx = (float2(waveSimY_px, waveSimY_pz) - float2(waveSimY_nx, waveSimY_nz)) / (2.0 * _Texel); + displacement.xz = i_HorizontalDisplace * dydx / wavevector; + + const float maxDisp = _Texel * i_DisplaceClamp; + displacement.xz = clamp(displacement.xz, -maxDisp, maxDisp); + + return displacement; + } +}; + +float2 DataIDToInputUV +( + const float2 i_ID, + const Cascade i_Cascade, + const float2 i_Position, + const float2 i_Rotation, + const float2 i_Size +) +{ + const float2 position = i_Cascade.IDToWorld(i_ID); + float2 uv = (position - i_Position) / i_Size; + + // Clockwise transform rotation. + uv = uv.x * float2(i_Rotation.y, -i_Rotation.x) + uv.y * i_Rotation; + uv += 0.5; + + return uv; +} + +m_CrestNameSpaceEnd + +#undef m__MakeCascade +#undef m_MakeCascade +#undef m_MakeCascadePrevious +#undef m_Sample +#undef m_SampleWeighted +#undef m_ComputeDepth + +#endif // CREST_CASCADE_INCLUDED diff --git a/Assets/Obi/Resources/ObiMaterials/Common/ObiEllipsoidsHDRP.cginc.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Cascade.hlsl.meta similarity index 75% rename from Assets/Obi/Resources/ObiMaterials/Common/ObiEllipsoidsHDRP.cginc.meta rename to Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Cascade.hlsl.meta index 62b298766..d1a2d0af4 100644 --- a/Assets/Obi/Resources/ObiMaterials/Common/ObiEllipsoidsHDRP.cginc.meta +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Cascade.hlsl.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: bc807595df1f54350ac0027aaf7cb91b +guid: a2766c94869154bff829f45f26f23f7b ShaderIncludeImporter: externalObjects: {} userData: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Constants.hlsl b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Constants.hlsl new file mode 100644 index 000000000..10994c83e --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Constants.hlsl @@ -0,0 +1,72 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#ifndef CREST_CONSTANTS_H +#define CREST_CONSTANTS_H + +#define m_CrestBlendNone 0 +#define m_CrestBlendAdditive 1 +#define m_CrestBlendMinimum 2 +#define m_CrestBlendMaximum 3 +#define m_CrestBlendAlpha 4 + +#define m_Crest_PositiveInfinity asfloat(0x7F800000) +#define m_Crest_NegativeInfinity asfloat(0xFF800000) + +// Was 0.001, but caused prominent seams for sensitive data like water level. +// 0.00001 worked, but not worth the miniscule saving (in theory). It would require +// testing across various LOD quality settings. +#define m_CrestSampleLodThreshold 0.0 + +// NOTE: these MUST match the values in PropertyWrapper.cs +#define THREAD_GROUP_SIZE_X 8 +#define THREAD_GROUP_SIZE_Y 8 + +// NOTE: This must match the value in LodDataMgr.cs, as it is used to allow the +// C# code to check if any parameters are within the MAX_LOD_COUNT limits +#define MAX_LOD_COUNT 15 + +// How light is attenuated deep in water +#define DEPTH_OUTSCATTER_CONSTANT 0.25 + +// NOTE: Must match k_DepthBaseline in LodDataMgrSeaFloorDepth.cs. +// Bias water floor depth so that default (0) values in texture are not interpreted as shallow and generating foam everywhere +#define CREST_WATER_DEPTH_BASELINE m_Crest_PositiveInfinity +#define k_Crest_MaximumWaveAttenuationDepth 1000.0 + +// Soft shadows is red, hard shadows is green. +#define CREST_SHADOW_INDEX_SOFT 0 +#define CREST_SHADOW_INDEX_HARD 1 +#define k_Crest_MaximumShadowJitter 32.0 + +#define CREST_SSS_MAXIMUM 0.6 +#define CREST_SSS_RANGE 0.12 + +// Note: Must match k_MaskBelowSurfaceCull in UnderwaterRenderer.Mask.cs. +// Fog rendered from below and before transparents and water tile is culled. +#define CREST_MASK_BELOW_SURFACE_CULLED -2.0 +// Note: Must match k_MaskBelowSurface in UnderwaterRenderer.Mask.cs. +// Fog rendered from below. +#define CREST_MASK_BELOW_SURFACE -1.0 +// Fog rendered from above. +#define CREST_MASK_ABOVE_SURFACE 1.0 +// Normally discard, but keep. Used by negative volumes. +#define CREST_MASK_ABOVE_SURFACE_KEPT 2.0 +#define CREST_MASK_BELOW_SURFACE_KEPT -2.0 +// No mask. Used by meniscus when using volumes. +#define CREST_MASK_NONE 0.0 +// No fog. Nicer wording for comparisons. +#define CREST_MASK_NO_FOG 0.0 + +// The maximum distance the meniscus will be rendered. Only valid when rendering underwater from geometry. The value is +// used to scale the meniscus as it is calculate using a pixel offset which can make the meniscus large at a distance. +#define MENISCUS_MAXIMUM_DISTANCE 15.0 + + +#if defined(STEREO_INSTANCING_ON) || defined(STEREO_MULTIVIEW_ON) +#define CREST_HANDLE_XR 1 +#else +#define CREST_HANDLE_XR 0 +#endif + +#endif // CREST_CONSTANTS_H diff --git a/Assets/Obi/Resources/Compute/Rigidbody.cginc.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Constants.hlsl.meta similarity index 75% rename from Assets/Obi/Resources/Compute/Rigidbody.cginc.meta rename to Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Constants.hlsl.meta index 68dede378..02c79e2ca 100644 --- a/Assets/Obi/Resources/Compute/Rigidbody.cginc.meta +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Constants.hlsl.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 157a770866f4047a5b8a08e6aca2f1bf +guid: 9553b06787bdd4dfb99d0563f6027d3f ShaderIncludeImporter: externalObjects: {} userData: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Flow.hlsl b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Flow.hlsl new file mode 100644 index 000000000..1e9151197 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Flow.hlsl @@ -0,0 +1,48 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#ifndef CREST_FLOW_INCLUDED +#define CREST_FLOW_INCLUDED + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" + +m_CrestNameSpace + +struct Flow +{ + float _Offset0; + float _Weight0; + float _Offset1; + float _Weight1; + float _Period; + half2 _Flow; + + static Flow Make + ( + const half2 i_Flow, + const float i_Time, + const float i_Period = 1.0 + ) + { + const float Period = i_Period; + const float HalfPeriod = Period * 0.5; + const float Offset0 = fmod(i_Time, Period); + float Weight0 = Offset0 / HalfPeriod; + if (Weight0 > 1.0) Weight0 = 2.0 - Weight0; + const float Offset1 = fmod(i_Time + HalfPeriod, Period); + const float Weight1 = 1.0 - Weight0; + + Flow flow; + flow._Offset0 = Offset0; + flow._Weight0 = Weight0; + flow._Offset1 = Offset1; + flow._Weight1 = Weight1; + flow._Period = Period; + flow._Flow = i_Flow; + return flow; + } +}; + +m_CrestNameSpaceEnd + +#endif // CREST_FLOW_INCLUDED diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Flow.hlsl.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Flow.hlsl.meta new file mode 100644 index 000000000..993321757 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Flow.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ed3b576b7fe3c45b89366844bacbe976 +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl new file mode 100644 index 000000000..62d606fee --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl @@ -0,0 +1,55 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// GLOBALs - we're allowed to use these anywhere. + +#ifndef CREST_WATER_GLOBALS_H +#define CREST_WATER_GLOBALS_H + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Settings.Crest.hlsl" + +SamplerState LODData_linear_clamp_sampler; +SamplerState LODData_point_clamp_sampler; +SamplerState sampler_Crest_linear_repeat; + +CBUFFER_START(CrestPerFrame) +float3 g_Crest_WaterCenter; +float g_Crest_WaterScale; +float g_Crest_Time; +float g_Crest_LodCount; +int g_Crest_LodChange; +float g_Crest_MeshScaleLerp; +float g_Crest_ClipByDefault; +float g_Crest_LodAlphaBlackPointFade; +float g_Crest_LodAlphaBlackPointWhitePointFade; + +// Hack - due to SV_IsFrontFace occasionally coming through as true for +// backfaces, add a param here that forces water to be in undrwater state. I +// think the root cause here might be imprecision or numerical issues at water +// tile boundaries, although I'm not sure why cracks are not visible in this case. +int g_Crest_ForceUnderwater; + +float3 g_Crest_PrimaryLightDirection; +float3 g_Crest_PrimaryLightIntensity; + +float g_Crest_DynamicSoftShadowsFactor; + +bool g_Crest_SampleAbsorptionSimulation; +bool g_Crest_SampleScatteringSimulation; + +// Motion Vector Parameters +float g_Crest_WaterScaleChange; +float3 g_Crest_WaterCenterDelta; + +// Shifting Origin +#if (CREST_SHIFTING_ORIGIN != 0) +float3 g_Crest_ShiftingOriginOffset; +#endif + +// Portals +#if (CREST_PORTALS != 0) +int _Crest_Portal; +#endif +CBUFFER_END + +#endif diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl.meta new file mode 100644 index 000000000..f6e130d0b --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 219ccb266236f4738917065843609901 +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Helpers.hlsl b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Helpers.hlsl new file mode 100644 index 000000000..5b5746656 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Helpers.hlsl @@ -0,0 +1,127 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// LOD data - data, samplers and functions associated with LODs + +#ifndef CREST_WATER_HELPERS_H +#define CREST_WATER_HELPERS_H + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/InputsDriven.hlsl" + +m_CrestNameSpace + +#define m_Blend(type) \ + type Blend(const int i_Blend, const float i_Alpha, const float i_DeltaTime, const type i_Source, const type i_Target) \ + { \ + switch (i_Blend) \ + { \ + case m_CrestBlendMinimum: \ + return min(i_Target, i_Source * i_Alpha); \ + case m_CrestBlendMaximum: \ + return max(i_Target, i_Source * i_Alpha); \ + case m_CrestBlendAdditive: \ + return i_Target + i_Source * i_Alpha * i_DeltaTime; \ + case m_CrestBlendAlpha: \ + return lerp(i_Target, i_Source, i_Alpha); \ + case m_CrestBlendNone: \ + default: \ + return i_Source * i_Alpha; \ + } \ + } \ + +m_Blend(float) +m_Blend(float2) +m_Blend(float3) +m_Blend(float4) + +uint PositionToSliceIndex +( + const float2 i_PositionXZ, + const float i_MinimumSlice, + const float i_WaterScale0 +) +{ + const float2 offsetFromCenter = abs(i_PositionXZ - g_Crest_WaterCenter.xz); + const float taxicab = max(offsetFromCenter.x, offsetFromCenter.y); + const float radius0 = i_WaterScale0; + float sliceNumber = log2(max(taxicab / radius0, 1.0)); + // Don't use last slice - this is a "transition" slice used to cross fade waves + // between LOD resolutions to avoid pops. + sliceNumber = clamp(sliceNumber, i_MinimumSlice, g_Crest_LodCount - 2.0); + return floor(sliceNumber); +} + +void PosToSliceIndices +( + const float2 worldXZ, + const float minSlice, + const float maxSlice, + const float waterScale0, + out uint slice0, + out uint slice1, + out float lodAlpha +) +{ + const float2 offsetFromCenter = abs(worldXZ - g_Crest_WaterCenter.xz); + const float taxicab = max(offsetFromCenter.x, offsetFromCenter.y); + const float radius0 = waterScale0; + float sliceNumber = log2( max( taxicab / radius0, 1.0 ) ); + sliceNumber = clamp( sliceNumber, minSlice, maxSlice ); + + lodAlpha = frac(sliceNumber); + + // Fixes artefact with DX12 & Vulkan. Likely a compiler bug. + // Sampling result appears to be all over the place. + slice0 = floor(sliceNumber) + 0.01; + slice1 = slice0 + 1; + + // lod alpha is remapped to ensure patches weld together properly. patches can vary significantly in shape (with + // strips added and removed), and this variance depends on the base density of the mesh, as this defines the strip width. + // using .15 as black and .85 as white should work for base mesh density as low as 16. + const float BLACK_POINT = 0.15, WHITE_POINT = 0.85; + lodAlpha = saturate((lodAlpha - BLACK_POINT) / (WHITE_POINT - BLACK_POINT)); + + if (slice0 == 0) + { + // blend out lod0 when viewpoint gains altitude. we're using the global g_Crest_MeshScaleLerp so check for LOD0 is necessary + lodAlpha = min(lodAlpha + g_Crest_MeshScaleLerp, 1.0); + } +} + +bool IsUnderwater(const bool i_FrontFace, const int i_ForceUnderwater) +{ + // We are well below water. + if (i_ForceUnderwater == 1) + { + return true; + } + + // We are well above water. + if (i_ForceUnderwater == 2) + { + return false; + } + + return !i_FrontFace; +} + +float FeatherWeightFromUV(const float2 i_uv, const half i_featherWidth) +{ + float2 offset = abs(i_uv - 0.5); + float r_l1 = max(offset.x, offset.y) - (0.5 - i_featherWidth); + if (i_featherWidth > 0.0) r_l1 /= i_featherWidth; + float weight = saturate(1.0 - r_l1); + return weight; +} + +bool WithinUV(const float2 i_UV) +{ + const float2 d = abs(i_UV - 0.5); + return max(d.x, d.y) <= 0.5; +} + +m_CrestNameSpaceEnd + +#endif // CREST_WATER_HELPERS_H diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Helpers.hlsl.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Helpers.hlsl.meta new file mode 100644 index 000000000..68f22a63b --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Helpers.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5dd9b4a212760411496bde4d1b7a6b7c +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/InputsDriven.hlsl b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/InputsDriven.hlsl new file mode 100644 index 000000000..9271bdf1b --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/InputsDriven.hlsl @@ -0,0 +1,74 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// Anything marked as "Source" is from the previous frame. + +#ifndef CREST_INPUTS_DRIVEN_H +#define CREST_INPUTS_DRIVEN_H + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Constants.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" + +CBUFFER_START(CrestChunkInstanceData) +uint _Crest_LodIndex; +float _Crest_ChunkMeshScaleAlpha; +float _Crest_ChunkMeshScaleAlphaSource; +float _Crest_ChunkGeometryGridWidth; +float _Crest_ChunkGeometryGridWidthSource; +float _Crest_ChunkFarNormalsWeight; +float2 _Crest_ChunkNormalScrollSpeed; +CBUFFER_END + +Texture2DArray g_Crest_CascadeAbsorption; +m_DisplacementTexture(Texture2DArray, 4) g_Crest_CascadeAnimatedWaves; +m_DisplacementTexture(Texture2DArray, 4) g_Crest_CascadeAnimatedWavesSource; +Texture2DArray g_Crest_CascadeDepth; +m_DisplacementTexture(Texture2DArray, 4) g_Crest_CascadeLevel; +Texture2DArray g_Crest_CascadeClip; +Texture2DArray g_Crest_CascadeFoam; +Texture2DArray g_Crest_CascadeFoamSource; +Texture2DArray g_Crest_CascadeFlow; +Texture2DArray g_Crest_CascadeDynamicWaves; +Texture2DArray g_Crest_CascadeDynamicWavesSource; +Texture2DArray g_Crest_CascadeScattering; +Texture2DArray g_Crest_CascadeShadow; +Texture2DArray g_Crest_CascadeShadowSource; +Texture2DArray g_Crest_CascadeAlbedo; + + +CBUFFER_START(CrestLodData) +// Cascade Data: Scale, Weight, MaximumWavelength, 0 +float4 g_Crest_CascadeData[MAX_LOD_COUNT]; +float4 g_Crest_CascadeDataSource[MAX_LOD_COUNT]; + +// Sampling Parameters: LodCount, Resolution, OneOverResolution, 0 +// Sampling Parameters (Cascade): SnappedPositionX, SnappedPositionZ, TexelWidth, 0 +float4 g_Crest_SamplingParametersAbsorption; +float4 g_Crest_SamplingParametersCascadeAbsorption[MAX_LOD_COUNT]; +float4 g_Crest_SamplingParametersAlbedo; +float4 g_Crest_SamplingParametersCascadeAlbedo[MAX_LOD_COUNT]; +float4 g_Crest_SamplingParametersAnimatedWaves; +float4 g_Crest_SamplingParametersCascadeAnimatedWaves[MAX_LOD_COUNT]; +float4 g_Crest_SamplingParametersCascadeAnimatedWavesSource[MAX_LOD_COUNT]; +float4 g_Crest_SamplingParametersClip; +float4 g_Crest_SamplingParametersCascadeClip[MAX_LOD_COUNT]; +float4 g_Crest_SamplingParametersDepth; +float4 g_Crest_SamplingParametersCascadeDepth[MAX_LOD_COUNT]; +float4 g_Crest_SamplingParametersDynamicWaves; +float4 g_Crest_SamplingParametersCascadeDynamicWaves[MAX_LOD_COUNT]; +float4 g_Crest_SamplingParametersCascadeDynamicWavesSource[MAX_LOD_COUNT]; +float4 g_Crest_SamplingParametersFlow; +float4 g_Crest_SamplingParametersCascadeFlow[MAX_LOD_COUNT]; +float4 g_Crest_SamplingParametersFoam; +float4 g_Crest_SamplingParametersCascadeFoam[MAX_LOD_COUNT]; +float4 g_Crest_SamplingParametersCascadeFoamSource[MAX_LOD_COUNT]; +float4 g_Crest_SamplingParametersLevel; +float4 g_Crest_SamplingParametersCascadeLevel[MAX_LOD_COUNT]; +float4 g_Crest_SamplingParametersScattering; +float4 g_Crest_SamplingParametersCascadeScattering[MAX_LOD_COUNT]; +float4 g_Crest_SamplingParametersShadow; +float4 g_Crest_SamplingParametersCascadeShadow[MAX_LOD_COUNT]; +float4 g_Crest_SamplingParametersCascadeShadowSource[MAX_LOD_COUNT]; +CBUFFER_END + +#endif // CREST_INPUTS_DRIVEN_H diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/InputsDriven.hlsl.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/InputsDriven.hlsl.meta new file mode 100644 index 000000000..303d8d86d --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/InputsDriven.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c6fd0850e77df417eaf4485a17669d04 +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl new file mode 100644 index 000000000..ea3410778 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl @@ -0,0 +1,72 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#ifndef CREST_MACROS_H +#define CREST_MACROS_H + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Settings.Crest.hlsl" + +#define m_CrestNameSpace namespace WaveHarmonic { namespace Crest { +#define m_CrestNameSpaceEnd } } + +#define m_Crest WaveHarmonic::Crest + +#define m_FloatMaximum 3.402823466e+38 + +#if (CREST_FULL_PRECISION_DISPLACEMENT != 0) +#define m_DisplacementTexture(texture, components) texture +#else +#define m_DisplacementTexture(texture, components) texture +#endif + +#define m_CrestVertex \ +m_Crest::Varyings Vertex(m_Crest::Attributes i_Input) \ +{ \ + return m_Crest::Vertex(i_Input); \ +} + +#define m_CrestFragment(type) \ +type Fragment(m_Crest::Varyings i_Input) : SV_Target \ +{ \ + return m_Crest::Fragment(i_Input); \ +} + +#define m_CrestFragmentWithFrontFace(type) \ +type Fragment(m_Crest::Varyings i_Input, const bool i_IsFrontFace : SV_IsFrontFace) : SV_Target \ +{ \ + return m_Crest::Fragment(i_Input, i_IsFrontFace); \ +} + +#define m_CrestKernel(name) \ +void Crest##name(uint3 id : SV_DispatchThreadID) \ +{ \ + m_Crest::name(id); \ +} + +#define m_CrestKernelVariant(name, variant) \ +void Crest##name##variant(uint3 id : SV_DispatchThreadID) \ +{ \ + m_Crest::name(id); \ +} + +#define m_CrestKernelDefault(name) \ +[numthreads(THREAD_GROUP_SIZE_X, THREAD_GROUP_SIZE_Y, 1)] \ +void Crest##name(uint3 id : SV_DispatchThreadID) \ +{ \ + m_Crest::name(id); \ +} + +#define m_CrestInputKernel(name) \ +void Crest##name(uint3 id : SV_DispatchThreadID) \ +{ \ + m_Crest::name(uint3(id.xy, g_Crest_LodCount - 1 - id.z)); \ +} + +#define m_CrestInputKernelDefault(name) \ +[numthreads(THREAD_GROUP_SIZE_X, THREAD_GROUP_SIZE_Y, 1)] \ +void Crest##name(uint3 id : SV_DispatchThreadID) \ +{ \ + m_Crest::name(uint3(id.xy, g_Crest_LodCount - 1 - id.z)); \ +} + +#endif // CREST_MACROS_H diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl.meta new file mode 100644 index 000000000..da2d24bbc --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: caa2db9eeee624124b0731445b09e163 +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Settings.Crest.hlsl b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Settings.Crest.hlsl new file mode 100644 index 000000000..755738913 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Settings.Crest.hlsl @@ -0,0 +1,16 @@ +// +// This file was automatically generated. Please don't edit by hand. Execute Editor command [ Edit > Rendering > Generate Shader Includes ] instead +// + +#ifndef SETTINGS_CREST_HLSL +#define SETTINGS_CREST_HLSL +// +// WaveHarmonic.Crest.Editor.ShaderSettings: static fields +// +#define CREST_PORTALS (0) +#define CREST_SHIFTING_ORIGIN (0) +#define CREST_SHADOWS_BUILT_IN_RENDER_PIPELINE (1) +#define CREST_FULL_PRECISION_DISPLACEMENT (1) + + +#endif diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Settings.Crest.hlsl.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Settings.Crest.hlsl.meta new file mode 100644 index 000000000..fef34146e --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Settings.Crest.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 38f675942a9ca46a58afd1191b304f11 +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Texture.hlsl b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Texture.hlsl new file mode 100644 index 000000000..c7c8fb51b --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Texture.hlsl @@ -0,0 +1,69 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// The const keyword for PSSL solves the following: +// > Shader error in '': Program '', member function '' not viable: 'this' argument has +// > type ' const', but function is not marked const +// This appears to be PSSL only feature as the fix throws a compiler error elsewhere (comprehensive test not done). I +// tried putting const at the beginning of the function signature which compiles but did not solve the problem on PSSL +// so must be different. + +#ifndef CREST_TEXTURE_INCLUDED +#define CREST_TEXTURE_INCLUDED + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Settings.Crest.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/InputsDriven.hlsl" + +#ifdef SHADER_API_PSSL +#define m_ConstantReturn const +#else +#define m_ConstantReturn +#endif + +m_CrestNameSpace + +struct TiledTexture +{ + Texture2D _texture; + SamplerState _sampler; + half _size; + half _scale; + half _speed; + float _texel; + + static TiledTexture Make + ( + in const Texture2D i_texture, + in const SamplerState i_sampler, + in const float4 i_size, + in const half i_scale, + in const half i_speed + ) + { + TiledTexture tiledTexture; + tiledTexture._texture = i_texture; + tiledTexture._sampler = i_sampler; + tiledTexture._scale = i_scale; + tiledTexture._speed = i_speed; + // Safely assume a square texture. + tiledTexture._size = i_size.z; + tiledTexture._texel = i_size.x; + return tiledTexture; + } + + half4 Sample(float2 uv) m_ConstantReturn + { + return SAMPLE_TEXTURE2D(_texture, _sampler, uv); + } + + half4 SampleLevel(float2 uv, float lod) m_ConstantReturn + { + return SAMPLE_TEXTURE2D_LOD(_texture, _sampler, uv, lod); + } +}; + +m_CrestNameSpaceEnd + +#endif // CREST_TEXTURE_INCLUDED diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Texture.hlsl.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Texture.hlsl.meta new file mode 100644 index 000000000..3fc481f38 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Texture.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4fc5f278802cd484a8ee3e944ec8f858 +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility.meta new file mode 100644 index 000000000..a563d8dd0 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 298ae417217804dd48e3925a84f28b28 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Depth.hlsl b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Depth.hlsl new file mode 100644 index 000000000..e52da02a0 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Depth.hlsl @@ -0,0 +1,74 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// Helpers that will only be used for shaders (eg depth, lighting etc). + +#ifndef d_WaveHarmonic_Utility_Depth +#define d_WaveHarmonic_Utility_Depth + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Macros.hlsl" + +// Silence Unity errors in SG editor. +#ifdef SHADERGRAPH_PREVIEW +#define LOAD_DEPTH_TEXTURE_X(a, b) 0 +#define TEXTURE2D_X(t) Texture2D t +#else +#define LOAD_DEPTH_TEXTURE_X(textureName, coord2) LOAD_TEXTURE2D_X(textureName, coord2).r +#endif + +m_UtilityNameSpace + +// Taken from: +// https://www.cyanilux.com/tutorials/depth/#depth-output +float LinearDepthToNonLinear(float depth, float4 zBufferParameters) +{ + return (1.0 - depth * zBufferParameters.y) / (depth * zBufferParameters.x); +} + +// Taken from: +// https://www.cyanilux.com/tutorials/depth/#depth-output +float EyeDepthToNonLinear(float depth, float4 zBufferParameters) +{ + return (1.0 - depth * zBufferParameters.w) / (depth * zBufferParameters.z); +} + +// Same as LinearEyeDepth except supports orthographic projection. Use projection keywords to restrict support to either +// of these modes as an optimisation. +float CrestLinearEyeDepth(const float i_rawDepth) +{ +#if !defined(_PROJECTION_ORTHOGRAPHIC) + // Handles UNITY_REVERSED_Z for us. +#if defined(UNITY_CG_INCLUDED) + float perspective = LinearEyeDepth(i_rawDepth); +#elif defined(UNITY_COMMON_INCLUDED) + float perspective = LinearEyeDepth(i_rawDepth, _ZBufferParams); +#endif +#endif // _PROJECTION + +#if !defined(_PROJECTION_PERSPECTIVE) + // Orthographic Depth taken and modified from: + // https://github.com/keijiro/DepthInverseProjection/blob/master/Assets/InverseProjection/Resources/InverseProjection.shader + float near = _ProjectionParams.y; + float far = _ProjectionParams.z; + float isOrthographic = unity_OrthoParams.w; + +#if defined(UNITY_REVERSED_Z) + float orthographic = lerp(far, near, i_rawDepth); +#else + float orthographic = lerp(near, far, i_rawDepth); +#endif // UNITY_REVERSED_Z +#endif // _PROJECTION + +#if defined(_PROJECTION_ORTHOGRAPHIC) + return orthographic; +#elif defined(_PROJECTION_PERSPECTIVE) + return perspective; +#else + // If a shader does not have the projection enumeration, then assume they want to support both projection modes. + return lerp(perspective, orthographic, isOrthographic); +#endif // _PROJECTION +} + +m_UtilityNameSpaceEnd + +#endif // d_WaveHarmonic_Utility_Depth diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Depth.hlsl.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Depth.hlsl.meta new file mode 100644 index 000000000..c92d4c4b2 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Depth.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 941ad013a0cbf4dec8d525ee790f5c6e +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Filtering.hlsl b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Filtering.hlsl new file mode 100644 index 000000000..f34ade870 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Filtering.hlsl @@ -0,0 +1,71 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#ifndef d_WaveHarmonic_Utility_Filtering +#define d_WaveHarmonic_Utility_Filtering + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Macros.hlsl" + +m_UtilityNameSpace + +// Taken from: +// https://gist.github.com/TheRealMJP/c83b8c0f46b63f3a88a5986f4fa982b1 +// +// The following code is licensed under the MIT license: +// https://gist.github.com/TheRealMJP/bc503b0b87b643d3505d41eab8b332ae +// +// Samples a texture with Catmull-Rom filtering, using 9 texture fetches instead of 16. +// See http://vec3.ca/bicubic-filtering-in-fewer-taps/ for more details +float4 SampleTextureCatmullRom(in Texture2D tex, in SamplerState linearSampler, in float2 uv, in float2 texSize) +{ + // We're going to sample a a 4x4 grid of texels surrounding the target UV coordinate. We'll do this by rounding + // down the sample location to get the exact center of our "starting" texel. The starting texel will be at + // location [1, 1] in the grid, where [0, 0] is the top left corner. + float2 samplePos = uv * texSize; + float2 texPos1 = floor(samplePos - 0.5f) + 0.5f; + + // Compute the fractional offset from our starting texel to our original sample location, which we'll + // feed into the Catmull-Rom spline function to get our filter weights. + float2 f = samplePos - texPos1; + + // Compute the Catmull-Rom weights using the fractional offset that we calculated earlier. + // These equations are pre-expanded based on our knowledge of where the texels will be located, + // which lets us avoid having to evaluate a piece-wise function. + float2 w0 = f * (-0.5f + f * (1.0f - 0.5f * f)); + float2 w1 = 1.0f + f * f * (-2.5f + 1.5f * f); + float2 w2 = f * (0.5f + f * (2.0f - 1.5f * f)); + float2 w3 = f * f * (-0.5f + 0.5f * f); + + // Work out weighting factors and sampling offsets that will let us use bilinear filtering to + // simultaneously evaluate the middle 2 samples from the 4x4 grid. + float2 w12 = w1 + w2; + float2 offset12 = w2 / (w1 + w2); + + // Compute the final UV coordinates we'll use for sampling the texture + float2 texPos0 = texPos1 - 1; + float2 texPos3 = texPos1 + 2; + float2 texPos12 = texPos1 + offset12; + + texPos0 /= texSize; + texPos3 /= texSize; + texPos12 /= texSize; + + float4 result = 0.0f; + result += tex.SampleLevel(linearSampler, float2(texPos0.x, texPos0.y), 0.0f) * w0.x * w0.y; + result += tex.SampleLevel(linearSampler, float2(texPos12.x, texPos0.y), 0.0f) * w12.x * w0.y; + result += tex.SampleLevel(linearSampler, float2(texPos3.x, texPos0.y), 0.0f) * w3.x * w0.y; + + result += tex.SampleLevel(linearSampler, float2(texPos0.x, texPos12.y), 0.0f) * w0.x * w12.y; + result += tex.SampleLevel(linearSampler, float2(texPos12.x, texPos12.y), 0.0f) * w12.x * w12.y; + result += tex.SampleLevel(linearSampler, float2(texPos3.x, texPos12.y), 0.0f) * w3.x * w12.y; + + result += tex.SampleLevel(linearSampler, float2(texPos0.x, texPos3.y), 0.0f) * w0.x * w3.y; + result += tex.SampleLevel(linearSampler, float2(texPos12.x, texPos3.y), 0.0f) * w12.x * w3.y; + result += tex.SampleLevel(linearSampler, float2(texPos3.x, texPos3.y), 0.0f) * w3.x * w3.y; + + return result; +} + +m_UtilityNameSpaceEnd + +#endif // d_WaveHarmonic_Utility_Filtering diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Filtering.hlsl.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Filtering.hlsl.meta new file mode 100644 index 000000000..f6d9a2cdf --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Filtering.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 65a9a0cfb233a4a418d51cbf55265c55 +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy.meta new file mode 100644 index 000000000..1e7728207 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 31c666ce642464bd1901041e360703ef +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/Common.hlsl b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/Common.hlsl new file mode 100644 index 000000000..3515e6fcf --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/Common.hlsl @@ -0,0 +1,257 @@ +// Crest Water System + +// This file is subject to the Unity Companion License: +// https://github.com/Unity-Technologies/Graphics/blob/7ff8fd444c179fd9bb380d61f4865be6935b47dd/LICENSE.md + +// Adds functions from SRP. + +// Adapted from: +// https://github.com/Unity-Technologies/Graphics/blob/8f54e6591e93fb3bf8e9879a0e43665dfbe2f629/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl + +#ifndef UNITY_COMMON_INCLUDED +#define UNITY_COMMON_INCLUDED + +// Add "real" alias for "fixed". Helps with including files downstream. + +#define real fixed +#define real2 fixed2 +#define real3 fixed3 +#define real4 fixed4 + +// Commented lines have no "fixed" equivalent. + +#define real2x2 fixed2x2 +// #define real2x3 fixed2x3 +// #define real2x4 fixed2x4 +// #define real3x2 fixed3x2 +#define real3x3 fixed3x3 +// #define real3x4 fixed3x4 +// #define real4x3 fixed4x3 +#define real4x4 fixed4x4 + +// +// MACROS +// + +#define ZERO_INITIALIZE(type, name) UNITY_INITIALIZE_OUTPUT(type,name) +#define TransformObjectToHClip(positionOS) UnityObjectToClipPos(float4(positionOS, 1.0)) + +// Taken from: +// com.unity.render-pipelines.core@10.5.0/ShaderLibrary/API/D3D11.hlsl +// com.unity.render-pipelines.core@10.5.0/ShaderLibrary/API/Metal.hlsl +// com.unity.render-pipelines.core@10.5.0/ShaderLibrary/API/Switch.hlsl +// com.unity.render-pipelines.core@10.5.0/ShaderLibrary/API/Vulkan.hlsl + +// GameCore, PSSL etc require an NDA so hard to confirm how some of these APIs are implemented, but the PPv2 package has +// some of APIs (the ones we use) and they are the same: +// com.unity.postprocessing/PostProcessing/Shaders/API/ + +// Texture abstraction. + +#define TEXTURE2D(textureName) UNITY_DECLARE_TEX2D_NOSAMPLER(textureName) +#define TEXTURE2D_ARRAY(textureName) UNITY_DECLARE_TEX2DARRAY_NOSAMPLER(textureName) +#define TEXTURECUBE(textureName) UNITY_DECLARE_TEXCUBE_NOSAMPLER(textureName) +// #define TEXTURECUBE_ARRAY(textureName) TextureCubeArray textureName +// #define TEXTURE3D(textureName) Texture3D textureName + +// #ifdef SHADER_API_D3D11 + +// #define TEXTURE2D_FLOAT(textureName) TEXTURE2D(textureName) +// #define TEXTURE2D_ARRAY_FLOAT(textureName) TEXTURE2D_ARRAY(textureName) +// #define TEXTURECUBE_FLOAT(textureName) TEXTURECUBE(textureName) +// #define TEXTURECUBE_ARRAY_FLOAT(textureName) TEXTURECUBE_ARRAY(textureName) +// #define TEXTURE3D_FLOAT(textureName) TEXTURE3D(textureName) + +// #define TEXTURE2D_HALF(textureName) TEXTURE2D(textureName) +// #define TEXTURE2D_ARRAY_HALF(textureName) TEXTURE2D_ARRAY(textureName) +// #define TEXTURECUBE_HALF(textureName) TEXTURECUBE(textureName) +// #define TEXTURECUBE_ARRAY_HALF(textureName) TEXTURECUBE_ARRAY(textureName) +// #define TEXTURE3D_HALF(textureName) TEXTURE3D(textureName) + +// #else // !SHADER_API_D3D11 + +// #define TEXTURE2D_FLOAT(textureName) Texture2D_float textureName +// #define TEXTURE2D_ARRAY_FLOAT(textureName) Texture2DArray_float textureName +// #define TEXTURECUBE_FLOAT(textureName) TextureCube_float textureName +// #define TEXTURECUBE_ARRAY_FLOAT(textureName) TextureCubeArray_float textureName +// #define TEXTURE3D_FLOAT(textureName) Texture3D_float textureName + +// #define TEXTURE2D_HALF(textureName) Texture2D_half textureName +// #define TEXTURE2D_ARRAY_HALF(textureName) Texture2DArray_half textureName +// #define TEXTURECUBE_HALF(textureName) TextureCube_half textureName +// #define TEXTURECUBE_ARRAY_HALF(textureName) TextureCubeArray_half textureName +// #define TEXTURE3D_HALF(textureName) Texture3D_half textureName + +// #endif // SHADER_API_D3D11 + +// #define TEXTURE2D_SHADOW(textureName) TEXTURE2D(textureName) +// #define TEXTURE2D_ARRAY_SHADOW(textureName) TEXTURE2D_ARRAY(textureName) +// #define TEXTURECUBE_SHADOW(textureName) TEXTURECUBE(textureName) +// #define TEXTURECUBE_ARRAY_SHADOW(textureName) TEXTURECUBE_ARRAY(textureName) + +#define RW_TEXTURE2D(type, textureName) RWTexture2D textureName +#define RW_TEXTURE2D_ARRAY(type, textureName) RWTexture2DArray textureName +// #define RW_TEXTURE3D(type, textureName) RWTexture3D textureName + +#define SAMPLER(samplerName) SamplerState samplerName +// #define SAMPLER_CMP(samplerName) SamplerComparisonState samplerName +// #define ASSIGN_SAMPLER(samplerName, samplerValue) samplerName = samplerValue + +// #define TEXTURE2D_PARAM(textureName, samplerName) TEXTURE2D(textureName), SAMPLER(samplerName) +// #define TEXTURE2D_ARRAY_PARAM(textureName, samplerName) TEXTURE2D_ARRAY(textureName), SAMPLER(samplerName) +// #define TEXTURECUBE_PARAM(textureName, samplerName) TEXTURECUBE(textureName), SAMPLER(samplerName) +// #define TEXTURECUBE_ARRAY_PARAM(textureName, samplerName) TEXTURECUBE_ARRAY(textureName), SAMPLER(samplerName) +// #define TEXTURE3D_PARAM(textureName, samplerName) TEXTURE3D(textureName), SAMPLER(samplerName) + +// #define TEXTURE2D_SHADOW_PARAM(textureName, samplerName) TEXTURE2D(textureName), SAMPLER_CMP(samplerName) +// #define TEXTURE2D_ARRAY_SHADOW_PARAM(textureName, samplerName) TEXTURE2D_ARRAY(textureName), SAMPLER_CMP(samplerName) +// #define TEXTURECUBE_SHADOW_PARAM(textureName, samplerName) TEXTURECUBE(textureName), SAMPLER_CMP(samplerName) +// #define TEXTURECUBE_ARRAY_SHADOW_PARAM(textureName, samplerName) TEXTURECUBE_ARRAY(textureName), SAMPLER_CMP(samplerName) + +// #define TEXTURE2D_ARGS(textureName, samplerName) textureName, samplerName +// #define TEXTURE2D_ARRAY_ARGS(textureName, samplerName) textureName, samplerName +// #define TEXTURECUBE_ARGS(textureName, samplerName) textureName, samplerName +// #define TEXTURECUBE_ARRAY_ARGS(textureName, samplerName) textureName, samplerName +// #define TEXTURE3D_ARGS(textureName, samplerName) textureName, samplerName + +// #define TEXTURE2D_SHADOW_ARGS(textureName, samplerName) textureName, samplerName +// #define TEXTURE2D_ARRAY_SHADOW_ARGS(textureName, samplerName) textureName, samplerName +// #define TEXTURECUBE_SHADOW_ARGS(textureName, samplerName) textureName, samplerName +// #define TEXTURECUBE_ARRAY_SHADOW_ARGS(textureName, samplerName) textureName, samplerName + +// We cannot use Unity's macros because they change the samplerName and it needs to be unchanged. +#define SAMPLE_TEXTURE2D(textureName, samplerName, coord2) textureName.Sample(samplerName, coord2) +#define SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod) textureName.SampleLevel(samplerName, coord2, lod) +// #define SAMPLE_TEXTURE2D_BIAS(textureName, samplerName, coord2, bias) textureName.SampleBias(samplerName, coord2, bias) +// #define SAMPLE_TEXTURE2D_GRAD(textureName, samplerName, coord2, dpdx, dpdy) textureName.SampleGrad(samplerName, coord2, dpdx, dpdy) +#define SAMPLE_TEXTURE2D_ARRAY(textureName, samplerName, coord2, index) textureName.Sample(samplerName, float3(coord2, index)) +// #define SAMPLE_TEXTURE2D_ARRAY_LOD(textureName, samplerName, coord2, index, lod) textureName.SampleLevel(samplerName, float3(coord2, index), lod) +// #define SAMPLE_TEXTURE2D_ARRAY_BIAS(textureName, samplerName, coord2, index, bias) textureName.SampleBias(samplerName, float3(coord2, index), bias) +// #define SAMPLE_TEXTURE2D_ARRAY_GRAD(textureName, samplerName, coord2, index, dpdx, dpdy) textureName.SampleGrad(samplerName, float3(coord2, index), dpdx, dpdy) +// #define SAMPLE_TEXTURECUBE(textureName, samplerName, coord3) textureName.Sample(samplerName, coord3) +// #define SAMPLE_TEXTURECUBE_LOD(textureName, samplerName, coord3, lod) textureName.SampleLevel(samplerName, coord3, lod) +// #define SAMPLE_TEXTURECUBE_BIAS(textureName, samplerName, coord3, bias) textureName.SampleBias(samplerName, coord3, bias) +// #define SAMPLE_TEXTURECUBE_ARRAY(textureName, samplerName, coord3, index) textureName.Sample(samplerName, float4(coord3, index)) +// #define SAMPLE_TEXTURECUBE_ARRAY_LOD(textureName, samplerName, coord3, index, lod) textureName.SampleLevel(samplerName, float4(coord3, index), lod) +// #define SAMPLE_TEXTURECUBE_ARRAY_BIAS(textureName, samplerName, coord3, index, bias) textureName.SampleBias(samplerName, float4(coord3, index), bias) +// #define SAMPLE_TEXTURE3D(textureName, samplerName, coord3) textureName.Sample(samplerName, coord3) +// #define SAMPLE_TEXTURE3D_LOD(textureName, samplerName, coord3, lod) textureName.SampleLevel(samplerName, coord3, lod) + +// #define SAMPLE_TEXTURE2D_SHADOW(textureName, samplerName, coord3) textureName.SampleCmpLevelZero(samplerName, (coord3).xy, (coord3).z) +// #define SAMPLE_TEXTURE2D_ARRAY_SHADOW(textureName, samplerName, coord3, index) textureName.SampleCmpLevelZero(samplerName, float3((coord3).xy, index), (coord3).z) +// #define SAMPLE_TEXTURECUBE_SHADOW(textureName, samplerName, coord4) textureName.SampleCmpLevelZero(samplerName, (coord4).xyz, (coord4).w) +// #define SAMPLE_TEXTURECUBE_ARRAY_SHADOW(textureName, samplerName, coord4, index) textureName.SampleCmpLevelZero(samplerName, float4((coord4).xyz, index), (coord4).w) + +#undef SAMPLE_DEPTH_TEXTURE +// #undef SAMPLE_DEPTH_TEXTURE_LOD +#define SAMPLE_DEPTH_TEXTURE(textureName, samplerName, coord2) SAMPLE_TEXTURE2D(textureName, samplerName, coord2).r +// #define SAMPLE_DEPTH_TEXTURE_LOD(textureName, samplerName, coord2, lod) SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod).r + +#define LOAD_TEXTURE2D(textureName, unCoord2) textureName.Load(int3(unCoord2, 0)) +// #define LOAD_TEXTURE2D_LOD(textureName, unCoord2, lod) textureName.Load(int3(unCoord2, lod)) +// #define LOAD_TEXTURE2D_MSAA(textureName, unCoord2, sampleIndex) textureName.Load(unCoord2, sampleIndex) +#define LOAD_TEXTURE2D_ARRAY(textureName, unCoord2, index) textureName.Load(int4(unCoord2, index, 0)) +// #ifndef SHADER_API_SWITCH +// #define LOAD_TEXTURE2D_ARRAY_MSAA(textureName, unCoord2, index, sampleIndex) textureName.Load(int3(unCoord2, index), sampleIndex) +// #endif +// #define LOAD_TEXTURE2D_ARRAY_LOD(textureName, unCoord2, index, lod) textureName.Load(int4(unCoord2, index, lod)) +// #define LOAD_TEXTURE3D(textureName, unCoord3) textureName.Load(int4(unCoord3, 0)) +// #define LOAD_TEXTURE3D_LOD(textureName, unCoord3, lod) textureName.Load(int4(unCoord3, lod)) + +// #define GATHER_TEXTURE2D(textureName, samplerName, coord2) textureName.Gather(samplerName, coord2) +// #define GATHER_TEXTURE2D_ARRAY(textureName, samplerName, coord2, index) textureName.Gather(samplerName, float3(coord2, index)) +// #define GATHER_TEXTURECUBE(textureName, samplerName, coord3) textureName.Gather(samplerName, coord3) +// #define GATHER_TEXTURECUBE_ARRAY(textureName, samplerName, coord3, index) textureName.Gather(samplerName, float4(coord3, index)) +// #define GATHER_RED_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherRed(samplerName, coord2) +// #define GATHER_GREEN_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherGreen(samplerName, coord2) +// #define GATHER_BLUE_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherBlue(samplerName, coord2) +// #define GATHER_ALPHA_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherAlpha(samplerName, coord2) + +// Generates a triangle in homogeneous clip space, s.t. +// v0 = (-1, -1, 1), v1 = (3, -1, 1), v2 = (-1, 3, 1). +float2 GetFullScreenTriangleTexCoord(uint vertexID) +{ +#if UNITY_UV_STARTS_AT_TOP + return float2((vertexID << 1) & 2, 1.0 - (vertexID & 2)); +#else + return float2((vertexID << 1) & 2, vertexID & 2); +#endif +} + +float4 GetFullScreenTriangleVertexPosition(uint vertexID, float z = UNITY_NEAR_CLIP_VALUE) +{ + float2 uv = float2((vertexID << 1) & 2, vertexID & 2); + return float4(uv * 2.0 - 1.0, z, 1.0); +} + +#endif // UNITY_COMMON_INCLUDED + +// +// FUNCTIONS +// + +// Keep the following unguarded + +// Taken and modified from: +// com.unity.render-pipelines.core@12.0.0/ShaderLibrary/Common.hlsl +float4 CrestComputeClipSpacePosition(float2 positionNDC, float deviceDepth) +{ + float4 positionCS = float4(positionNDC * 2.0 - 1.0, deviceDepth, 1.0); + // positionCS.y was flipped here but that is SRP specific to solve flip baked into matrix. + return positionCS; +} + +// Taken and modified from: +// com.unity.render-pipelines.core@12.0.0/ShaderLibrary/Common.hlsl +float3 CrestComputeWorldSpacePosition(float2 positionNDC, float deviceDepth, float4x4 invViewProjMatrix) +{ + float4 positionCS = CrestComputeClipSpacePosition(positionNDC, deviceDepth); + float4 hpositionWS = mul(invViewProjMatrix, positionCS); + return hpositionWS.xyz / hpositionWS.w; +} + +// Taken from: +// com.unity.render-pipelines.core@12.0.0/ShaderLibrary/Common.hlsl +float3 CrestComputeWorldSpacePosition(float4 positionCS, float4x4 invViewProjMatrix) +{ + float4 hpositionWS = mul(invViewProjMatrix, positionCS); + return hpositionWS.xyz / hpositionWS.w; +} + +#undef ComputeClipSpacePosition +#undef ComputeWorldSpacePosition + +// Replace these with our own as ComputeClipSpacePosition flips the Y which is not correct for BIRP. +#define ComputeClipSpacePosition CrestComputeClipSpacePosition +#define ComputeWorldSpacePosition CrestComputeWorldSpacePosition + +// Taken from: +// com.unity.render-pipelines.core/ShaderLibrary/Packing.hlsl +real3 CrestUnpackNormalmapRGorAG(real4 packednormal) +{ + // This do the trick + packednormal.x *= packednormal.w; + + real3 normal; + normal.xy = packednormal.xy * 2 - 1; + normal.z = sqrt(1 - saturate(dot(normal.xy, normal.xy))); + return normal; +} + +// Taken from: +// com.unity.render-pipelines.core/ShaderLibrary/Packing.hlsl +inline real3 CrestUnpackNormal(real4 packednormal) +{ +#if defined(UNITY_NO_DXT5nm) + return packednormal.xyz * 2 - 1; +#elif defined(UNITY_ASTC_NORMALMAP_ENCODING) + return UnpackNormalDXT5nm(packednormal); +#else + return CrestUnpackNormalmapRGorAG(packednormal); +#endif +} + +#undef UnpackNormal + +// Replace these to solve Unity bug "ambiguous call to 'UnpackNormalmapRGorAG'" +#define UnpackNormal CrestUnpackNormal diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/Common.hlsl.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/Common.hlsl.meta new file mode 100644 index 000000000..37fe44b43 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/Common.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4ff429977add540198b8820ff8f0cd7a +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/Core.hlsl b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/Core.hlsl new file mode 100644 index 000000000..a07e1025f --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/Core.hlsl @@ -0,0 +1,75 @@ +// Crest Water System + +// This file is subject to the Unity Companion License: +// https://github.com/Unity-Technologies/Graphics/blob/7ff8fd444c179fd9bb380d61f4865be6935b47dd/LICENSE.md + +// Adds functions from SRP. + +// Adapted from: +// https://github.com/Unity-Technologies/Graphics/blob/8f54e6591e93fb3bf8e9879a0e43665dfbe2f629/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/ShaderLibrary/Core.hlsl +// https://github.com/Unity-Technologies/Graphics/blob/7ff8fd444c179fd9bb380d61f4865be6935b47dd/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/TextureXR.hlsl + +#ifndef BUILTIN_PIPELINE_CORE_INCLUDED +#define BUILTIN_PIPELINE_CORE_INCLUDED + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/Common.hlsl" + +// Stereo-related bits +#if defined(UNITY_STEREO_INSTANCING_ENABLED) || defined(UNITY_STEREO_MULTIVIEW_ENABLED) + + #define SLICE_ARRAY_INDEX unity_StereoEyeIndex + + #define COORD_TEXTURE2D_X(pixelCoord) uint3(pixelCoord, SLICE_ARRAY_INDEX) + + #define TEXTURE2D_X(textureName) TEXTURE2D_ARRAY(textureName) + // #define TEXTURE2D_X_PARAM(textureName, samplerName) TEXTURE2D_ARRAY_PARAM(textureName, samplerName) + // #define TEXTURE2D_X_ARGS(textureName, samplerName) TEXTURE2D_ARRAY_ARGS(textureName, samplerName) + // #define TEXTURE2D_X_HALF(textureName) TEXTURE2D_ARRAY_HALF(textureName) + // #define TEXTURE2D_X_FLOAT(textureName) TEXTURE2D_ARRAY_FLOAT(textureName) + + #define RW_TEXTURE2D_X(type, textureName) RW_TEXTURE2D_ARRAY(type, textureName) + + #define LOAD_TEXTURE2D_X(textureName, unCoord2) LOAD_TEXTURE2D_ARRAY(textureName, unCoord2, SLICE_ARRAY_INDEX) + // #define LOAD_TEXTURE2D_X_LOD(textureName, unCoord2, lod) LOAD_TEXTURE2D_ARRAY_LOD(textureName, unCoord2, SLICE_ARRAY_INDEX, lod) + #define SAMPLE_TEXTURE2D_X(textureName, samplerName, coord2) SAMPLE_TEXTURE2D_ARRAY(textureName, samplerName, coord2, SLICE_ARRAY_INDEX) + // #define SAMPLE_TEXTURE2D_X_LOD(textureName, samplerName, coord2, lod) SAMPLE_TEXTURE2D_ARRAY_LOD(textureName, samplerName, coord2, SLICE_ARRAY_INDEX, lod) + // #define GATHER_TEXTURE2D_X(textureName, samplerName, coord2) GATHER_TEXTURE2D_ARRAY(textureName, samplerName, coord2, SLICE_ARRAY_INDEX) + // #define GATHER_RED_TEXTURE2D_X(textureName, samplerName, coord2) GATHER_RED_TEXTURE2D(textureName, samplerName, float3(coord2, SLICE_ARRAY_INDEX)) + // #define GATHER_GREEN_TEXTURE2D_X(textureName, samplerName, coord2) GATHER_GREEN_TEXTURE2D(textureName, samplerName, float3(coord2, SLICE_ARRAY_INDEX)) + // #define GATHER_BLUE_TEXTURE2D_X(textureName, samplerName, coord2) GATHER_BLUE_TEXTURE2D(textureName, samplerName, float3(coord2, SLICE_ARRAY_INDEX)) + +#else // UNITY_STEREO + + #define SLICE_ARRAY_INDEX 0 + + #define COORD_TEXTURE2D_X(pixelCoord) pixelCoord + + #define TEXTURE2D_X(textureName) TEXTURE2D(textureName) + // #define TEXTURE2D_X_PARAM(textureName, samplerName) TEXTURE2D_PARAM(textureName, samplerName) + // #define TEXTURE2D_X_ARGS(textureName, samplerName) TEXTURE2D_ARGS(textureName, samplerName) + // #define TEXTURE2D_X_HALF(textureName) TEXTURE2D_HALF(textureName) + // #define TEXTURE2D_X_FLOAT(textureName) TEXTURE2D_FLOAT(textureName) + + #define RW_TEXTURE2D_X RW_TEXTURE2D + + #define LOAD_TEXTURE2D_X(textureName, unCoord2) LOAD_TEXTURE2D(textureName, unCoord2) + // #define LOAD_TEXTURE2D_X_LOD(textureName, unCoord2, lod) LOAD_TEXTURE2D_LOD(textureName, unCoord2, lod) + #define SAMPLE_TEXTURE2D_X(textureName, samplerName, coord2) SAMPLE_TEXTURE2D(textureName, samplerName, coord2) + // #define SAMPLE_TEXTURE2D_X_LOD(textureName, samplerName, coord2, lod) SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod) + // #define GATHER_TEXTURE2D_X(textureName, samplerName, coord2) GATHER_TEXTURE2D(textureName, samplerName, coord2) + // #define GATHER_RED_TEXTURE2D_X(textureName, samplerName, coord2) GATHER_RED_TEXTURE2D(textureName, samplerName, coord2) + // #define GATHER_GREEN_TEXTURE2D_X(textureName, samplerName, coord2) GATHER_GREEN_TEXTURE2D(textureName, samplerName, coord2) + // #define GATHER_BLUE_TEXTURE2D_X(textureName, samplerName, coord2) GATHER_BLUE_TEXTURE2D(textureName, samplerName, coord2) + +#endif // UNITY_STEREO + +// Helper macro to assign view index during compute/ray pass (usually from SV_DispatchThreadID or DispatchRaysIndex()) +#if defined(SHADER_STAGE_COMPUTE) || defined(SHADER_STAGE_RAY_TRACING) + #if defined(UNITY_STEREO_INSTANCING_ENABLED) + #define UNITY_XR_ASSIGN_VIEW_INDEX(viewIndex) unity_StereoEyeIndex = viewIndex; + #else + #define UNITY_XR_ASSIGN_VIEW_INDEX(viewIndex) + #endif +#endif + +#endif // BUILTIN_PIPELINE_CORE_INCLUDED diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/Core.hlsl.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/Core.hlsl.meta new file mode 100644 index 000000000..ce3a63e25 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/Core.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8501e8dffc440417cb78449e6079d3fa +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/InputsDriven.hlsl b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/InputsDriven.hlsl new file mode 100644 index 000000000..7b40cd953 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/InputsDriven.hlsl @@ -0,0 +1,18 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// Defines missing inputs. + +float4x4 _Crest_InverseViewProjection; +float4x4 _Crest_InverseViewProjectionRight; + +#undef UNITY_MATRIX_I_VP + +#if defined(STEREO_INSTANCING_ON) || defined(STEREO_MULTIVIEW_ON) +#define UNITY_MATRIX_I_VP (unity_StereoEyeIndex == 0 ? _Crest_InverseViewProjection : _Crest_InverseViewProjectionRight) +#else +#define UNITY_MATRIX_I_VP _Crest_InverseViewProjection +#endif + +// Not set and _ScreenParams.zw is "1.0 + 1.0 / _ScreenParams.xy" +#define _ScreenSize float4(_ScreenParams.xy, float2(1.0, 1.0) / _ScreenParams.xy) diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/InputsDriven.hlsl.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/InputsDriven.hlsl.meta new file mode 100644 index 000000000..5db4b8dde --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/InputsDriven.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8e956ca85fd1846899d2a3b106267dcd +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/Shadows.hlsl b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/Shadows.hlsl new file mode 100644 index 000000000..7c67b1b50 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/Shadows.hlsl @@ -0,0 +1,125 @@ +// Crest Water System + +// Copyright (c) 2016 Unity Technologies +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of +// this software and associated documentation files (the "Software"), to deal in +// the Software without restriction, including without limitation the rights to +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +// of the Software, and to permit persons to whom the Software is furnished to do +// so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +// Screen-space shadow helpers. + +// Taken and adapted from: +// 2020.3.12f1/DefaultResourcesExtra/Internal-ScreenSpaceShadows.shader + +// Main changes is that now only world position is required. Specialised for the shadow LOD data. + +// Add multi_compile_shadowcollector pragma to get SHADOWS_SPLIT_SPHERES and SHADOWS_SINGLE_CASCADE. +// https://docs.unity3d.com/Manual/SL-MultipleProgramVariants.html + +// SHADOWS_SCREEN + SHADOWS_CUBE will never be triggered for transparency, but +// Unity still compiles the variant which causes compiler errors. +#if defined(_SURFACE_TYPE_TRANSPARENT) && !defined(SHADERGRAPH_PREVIEW) && !defined(SHADOWS_SCREEN) && !defined(SHADOWS_CUBE) +#define d_Crest_ReceiveShadowsTransparent 1 +#endif + +#if d_Crest_ReceiveShadowsTransparent + +#include "UnityShadowLibrary.cginc" + +#ifndef SHADOWMAPSAMPLER_DEFINED +UNITY_DECLARE_SHADOWMAP(_ShadowMapTexture); +#define SHADOWMAPSAMPLER_DEFINED + +#ifndef SHADOWMAPSAMPLER_AND_TEXELSIZE_DEFINED +float4 _ShadowMapTexture_TexelSize; +#define SHADOWMAPSAMPLER_AND_TEXELSIZE_DEFINED +#endif +#endif + + +// +// Keywords based defines +// +#if defined (SHADOWS_SPLIT_SPHERES) + #define GET_CASCADE_WEIGHTS(wpos) getCascadeWeights_splitSpheres(wpos) +#else + #define GET_CASCADE_WEIGHTS(wpos) getCascadeWeights(wpos) +#endif + +#if defined (SHADOWS_SINGLE_CASCADE) + #define GET_SHADOW_COORDINATES(wpos) getShadowCoord_SingleCascade(wpos) +#else + #define GET_SHADOW_COORDINATES(wpos) getShadowCoord(wpos) +#endif + +/** + * Gets the cascade weights based on the world position of the fragment. + * Returns a float4 with only one component set that corresponds to the appropriate cascade. + */ +inline fixed4 getCascadeWeights(float3 wpos) +{ + // Calculate depth. Normally this would be depth from the depth buffer. + float z = dot(wpos - _WorldSpaceCameraPos.xyz, unity_CameraToWorld._m02_m12_m22); + fixed4 zNear = float4( z >= _LightSplitsNear ); + fixed4 zFar = float4( z < _LightSplitsFar ); + fixed4 weights = zNear * zFar; + return weights; +} + +/** + * Gets the cascade weights based on the world position of the fragment and the poisitions of the split spheres for each cascade. + * Returns a float4 with only one component set that corresponds to the appropriate cascade. + */ +inline fixed4 getCascadeWeights_splitSpheres(float3 wpos) +{ + float3 fromCenter0 = wpos.xyz - unity_ShadowSplitSpheres[0].xyz; + float3 fromCenter1 = wpos.xyz - unity_ShadowSplitSpheres[1].xyz; + float3 fromCenter2 = wpos.xyz - unity_ShadowSplitSpheres[2].xyz; + float3 fromCenter3 = wpos.xyz - unity_ShadowSplitSpheres[3].xyz; + float4 distances2 = float4(dot(fromCenter0,fromCenter0), dot(fromCenter1,fromCenter1), dot(fromCenter2,fromCenter2), dot(fromCenter3,fromCenter3)); + fixed4 weights = float4(distances2 < unity_ShadowSplitSqRadii); + weights.yzw = saturate(weights.yzw - weights.xyz); + return weights; +} + +/** + * Returns the shadowmap coordinates for the given fragment based on the world position and z-depth. + * These coordinates belong to the shadowmap atlas that contains the maps for all cascades. + */ +inline float4 getShadowCoord(float4 wpos) +{ + fixed4 cascadeWeights = GET_CASCADE_WEIGHTS(wpos.xyz); + float3 sc0 = mul (unity_WorldToShadow[0], wpos).xyz; + float3 sc1 = mul (unity_WorldToShadow[1], wpos).xyz; + float3 sc2 = mul (unity_WorldToShadow[2], wpos).xyz; + float3 sc3 = mul (unity_WorldToShadow[3], wpos).xyz; + float4 shadowMapCoordinate = float4(sc0 * cascadeWeights[0] + sc1 * cascadeWeights[1] + sc2 * cascadeWeights[2] + sc3 * cascadeWeights[3], 1); +#if defined(UNITY_REVERSED_Z) + float noCascadeWeights = 1 - dot(cascadeWeights, float4(1, 1, 1, 1)); + shadowMapCoordinate.z += noCascadeWeights; +#endif + return shadowMapCoordinate; +} + +/** + * Same as the getShadowCoord; but optimized for single cascade + */ +inline float4 getShadowCoord_SingleCascade( float4 wpos ) +{ + return float4(mul(unity_WorldToShadow[0], wpos).xyz, 0); +} + +#endif // d_Crest_ReceiveShadowsTransparent diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/Shadows.hlsl.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/Shadows.hlsl.meta new file mode 100644 index 000000000..c16fdd5f8 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/Shadows.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 14d63b54d73024767903a5caa23e8e53 +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Lighting.hlsl b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Lighting.hlsl new file mode 100644 index 000000000..2f1fc1d3b --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Lighting.hlsl @@ -0,0 +1,200 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// Based on tutorial: https://connect.unity.com/p/adding-your-own-hlsl-code-to-shader-graph-the-custom-function-node + +#ifndef CREST_LIGHTING_H +#define CREST_LIGHTING_H + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl" + +TEXTURE2D_X(_Crest_ScreenSpaceShadowTexture); +float4 _Crest_ScreenSpaceShadowTexture_TexelSize; + +#if CREST_URP +#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + +// Unity renamed keyword. +#ifdef USE_FORWARD_PLUS +#define USE_CLUSTER_LIGHT_LOOP USE_FORWARD_PLUS +#endif +#endif // CREST_URP + +#if CREST_HDRP +#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" + +#ifndef SHADERGRAPH_PREVIEW +#if CREST_HDRP_FORWARD_PASS +#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/HDShadow.hlsl" +#endif +#endif + +#if UNITY_VERSION < 202310 +#define GetMeshRenderingLayerMask GetMeshRenderingLightLayer +#endif + +#if UNITY_VERSION < 60000000 +#if PROBE_VOLUMES_L1 +#define AMBIENT_PROBE_BUFFER 1 +#endif +#endif // CREST_HDRP + +m_CrestNameSpace + +// TODO: Move +void ApplyIndirectLightingMultiplier +( + inout half3 io_AmbientLight +) +{ + // Allows control of baked lighting through volume framework. +#ifndef SHADERGRAPH_PREVIEW + // We could create a BuiltinData struct which would have rendering layers on it, but it seems more complicated. + io_AmbientLight *= GetIndirectDiffuseMultiplier(GetMeshRenderingLayerMask()); +#endif +} +#else // CREST_HDRP +m_CrestNameSpace +#endif + +void PrimaryLight +( + const float3 i_PositionWS, + out half3 o_Color, + out half3 o_Direction +) +{ +#if CREST_HDRP + // We could get the main light the same way we get the main light shadows, + // but most of the data would be missing (including below horizon + // attenuation) which would require re-running the light loop which is expensive. + o_Direction = g_Crest_PrimaryLightDirection; + o_Color = g_Crest_PrimaryLightIntensity; +#elif CREST_URP + // Actual light data from the pipeline. + Light light = GetMainLight(); + o_Direction = light.direction; + o_Color = light.color; +#elif CREST_BIRP +#ifndef USING_DIRECTIONAL_LIGHT + // Yes. This function wants the world position of the surface. + o_Direction = normalize(UnityWorldSpaceLightDir(i_PositionWS)); +#else + o_Direction = _WorldSpaceLightPos0.xyz; +#endif + o_Color = _LightColor0.rgb; +#endif +} + +void AmbientLight(out half3 o_AmbientLight) +{ + // Use the constant term (0th order) of SH stuff - this is the average. + o_AmbientLight = +#if AMBIENT_PROBE_BUFFER + half3(_AmbientProbeData[0].w, _AmbientProbeData[1].w, _AmbientProbeData[2].w); +#else + half3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w); +#endif + +#if CREST_HDRP + ApplyIndirectLightingMultiplier(o_AmbientLight); +#endif +} + +// Position: SRP = WS / BIRP = SS (z ignored) +half PrimaryLightShadows(const float3 i_Position) +{ + // Unshadowed. + half shadow = 1; + +#if CREST_URP + // We could skip GetMainLight but this is recommended approach which is likely more robust to API changes. + float4 shadowCoord = TransformWorldToShadowCoord(i_Position); + Light light = GetMainLight(TransformWorldToShadowCoord(i_Position)); + shadow = light.shadowAttenuation; +#endif + +#ifndef SHADERGRAPH_PREVIEW +#if CREST_HDRP_FORWARD_PASS + DirectionalLightData light = _DirectionalLightDatas[_DirectionalShadowIndex]; + HDShadowContext context = InitShadowContext(); + context.directionalShadowData = _HDDirectionalShadowData[_DirectionalShadowIndex]; + + float3 positionWS = GetCameraRelativePositionWS(i_Position); + // From Unity: + // > With XR single-pass and camera-relative: offset position to do lighting computations from the combined center view (original camera matrix). + // > This is required because there is only one list of lights generated on the CPU. Shadows are also generated once and shared between the instanced views. + ApplyCameraRelativeXR(positionWS); + + // TODO: Pass in screen space position and scene normal. + shadow = GetDirectionalShadowAttenuation + ( + context, + 0, // positionSS + positionWS, + 0, // normalWS + light.shadowIndex, + -light.forward + ); + + // Apply shadow strength from main light. + shadow = LerpWhiteTo(shadow, light.shadowDimmer); +#endif // CREST_HDRP_FORWARD_PASS +#endif // SHADERGRAPH_PREVIEW + +#if CREST_BIRP + shadow = LOAD_TEXTURE2D_X(_Crest_ScreenSpaceShadowTexture, min(i_Position.xy, _Crest_ScreenSpaceShadowTexture_TexelSize.zw - 1.0)).r; +#endif + + return shadow; +} + +half3 AdditionalLighting(const float3 i_PositionWS, const float4 i_ScreenPosition, const float2 i_StaticLightMapUV) +{ + half3 color = 0.0; + +#if CREST_URP +#if defined(_ADDITIONAL_LIGHTS) + + // Shadowmask. +#if defined(SHADOWS_SHADOWMASK) && defined(LIGHTMAP_ON) + half4 shadowMask = SAMPLE_SHADOWMASK(i_StaticLightMapUV); +#elif !defined(LIGHTMAP_ON) + half4 shadowMask = unity_ProbesOcclusion; +#else + half4 shadowMask = half4(1, 1, 1, 1); +#endif + + uint pixelLightCount = GetAdditionalLightsCount(); + +#ifdef _LIGHT_LAYERS + uint meshRenderingLayers = GetMeshRenderingLayer(); +#endif + +#if USE_CLUSTER_LIGHT_LOOP + InputData inputData = (InputData)0; + // For Foward+ LIGHT_LOOP_BEGIN macro uses inputData.normalizedScreenSpaceUV and inputData.positionWS. + inputData.normalizedScreenSpaceUV = i_ScreenPosition.xy / i_ScreenPosition.w; + inputData.positionWS = i_PositionWS; +#endif + +LIGHT_LOOP_BEGIN(pixelLightCount) + // Includes shadows and cookies. + Light light = GetAdditionalLight(lightIndex, i_PositionWS, shadowMask); +#ifdef _LIGHT_LAYERS + if (IsMatchingLightLayer(light.layerMask, meshRenderingLayers)) +#endif + { + color += light.color * (light.distanceAttenuation * light.shadowAttenuation); + } +LIGHT_LOOP_END +#endif // _ADDITIONAL_LIGHTS +#endif // CREST_URP + + return color; +} + +m_CrestNameSpaceEnd + +#endif diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Lighting.hlsl.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Lighting.hlsl.meta new file mode 100644 index 000000000..35a379fd3 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Lighting.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 986eee3bc5a7a49f7a6a1f94c96d22e8 +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Macros.hlsl b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Macros.hlsl new file mode 100644 index 000000000..d2a7d38d5 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Macros.hlsl @@ -0,0 +1,50 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#ifndef d_WaveHarmonic_Utility_Macros +#define d_WaveHarmonic_Utility_Macros + +#define m_UtilityNameSpace namespace WaveHarmonic { namespace Utility { +#define m_UtilityNameSpaceEnd } } + +#define m_Utility WaveHarmonic::Utility + +#define m_UtilityVertex \ +m_Utility::Varyings Vertex(m_Utility::Attributes i_Input) \ +{ \ + return m_Utility::Vertex(i_Input); \ +} + +#define m_UtilityFragment(type) \ +type Fragment(m_Utility::Varyings i_Input) : SV_Target \ +{ \ + return m_Utility::Fragment(i_Input); \ +} + +#define m_UtilityKernel(name) \ +void Crest##name(uint3 id : SV_DispatchThreadID) \ +{ \ + m_Utility::name(id); \ +} + +#define m_UtilityKernelVariant(name, variant) \ +void Crest##name##variant(uint3 id : SV_DispatchThreadID) \ +{ \ + m_Utility::name(id); \ +} + +#define m_UtilityKernelDefault(name) \ +[numthreads(8, 8, 1)] \ +void Crest##name(uint3 id : SV_DispatchThreadID) \ +{ \ + m_Utility::name(id); \ +} + +#define m_UtilityKernelDefaultVariant(name, variant) \ +[numthreads(8, 8, 1)] \ +void Crest##name##variant(uint3 id : SV_DispatchThreadID) \ +{ \ + m_Utility::name(id); \ +} + +#endif // d_WaveHarmonic_Utility_Macros diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Macros.hlsl.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Macros.hlsl.meta new file mode 100644 index 000000000..f390288e2 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Macros.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ac63edd7bcb3b4b35a5ea50c7deb4202 +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Noise.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Noise.meta new file mode 100644 index 000000000..70ea5c8cd --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Noise.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 85562641776fc423e829bb13477e80f3 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Noise/Noise.hlsl b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Noise/Noise.hlsl new file mode 100644 index 000000000..c9ac441ce --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Noise/Noise.hlsl @@ -0,0 +1,35 @@ +// See header/license in SOURCE.txt file accompanying this shader. + +// Trivial modifications made to the code to translate it to HLSL by Huw Bowles + +#ifndef CREST_GPU_NOISE_INCLUDED +#define CREST_GPU_NOISE_INCLUDED + +uint baseHash(uint3 p) +{ + p = 1103515245U * ((p.xyz >> 1U) ^ (p.yzx)); + uint h32 = 1103515245U * ((p.x^p.z) ^ (p.y >> 3U)); + return h32 ^ (h32 >> 16); +} + +float hash13(uint3 x) +{ + uint n = baseHash(x); + return float(n)*(1.0 / float(0xffffffffU)); +} + +float2 hash23(float3 x) +{ + uint n = baseHash(x); + uint2 rz = uint2(n, n * 48271U); //see: http://random.mat.sbg.ac.at/results/karl/server/node4.html + return float2(rz.xy & (uint2)0x7fffffffU) / float(0x7fffffff); +} + +float3 hash33(uint3 x) +{ + uint n = baseHash(x); + uint3 rz = uint3(n, n * 16807U, n * 48271U); //see: http://random.mat.sbg.ac.at/results/karl/server/node4.html + return float3(rz & (uint3)0x7fffffffU) / float(0x7fffffff); +} + +#endif // CREST_GPU_NOISE_INCLUDED diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Noise/Noise.hlsl.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Noise/Noise.hlsl.meta new file mode 100644 index 000000000..d7438dfe3 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Noise/Noise.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5f79fd5a427da4de09803ded352ecfb1 +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Noise/Source.txt b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Noise/Source.txt new file mode 100644 index 000000000..91204066d --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Noise/Source.txt @@ -0,0 +1,10 @@ +Source: https://www.shadertoy.com/view/Xt3cDn +Modifications: Trivial modifications made to the code to translate it to HLSL. + +Copyright Notice: + +Quality hashes collection +by nimitz 2018 (twitter: @stormoid) + +The MIT License +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Noise/Source.txt.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Noise/Source.txt.meta new file mode 100644 index 000000000..de78c5870 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Noise/Source.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 1ae623fc941b44349a1836e6ab666922 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface.meta new file mode 100644 index 000000000..7a86daaed --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e10a7ee554ae549eda8d60d1e17fc8bd +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Alpha.hlsl b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Alpha.hlsl new file mode 100644 index 000000000..39eb08abc --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Alpha.hlsl @@ -0,0 +1,42 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#ifndef CREST_WATER_ALPHA_H +#define CREST_WATER_ALPHA_H + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/InputsDriven.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Helpers.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Cascade.hlsl" + +m_CrestNameSpace + +float ClipSurface(const float2 i_PositionWSXZ) +{ + // Do not include transition slice to avoid blending as we do a black border instead. + uint slice0; uint slice1; float alpha; + PosToSliceIndices(i_PositionWSXZ, 0.0, g_Crest_LodCount - 1.0, g_Crest_WaterScale, slice0, slice1, alpha); + + const Cascade cascade0 = Cascade::Make(slice0); + const Cascade cascade1 = Cascade::Make(slice1); + const float weight0 = (1.0 - alpha) * cascade0._Weight; + const float weight1 = (1.0 - weight0) * cascade1._Weight; + + float value = 0.0; + + if (weight0 > m_CrestSampleLodThreshold) + { + Cascade::MakeClip(slice0).SampleClip(i_PositionWSXZ, weight0, value); + } + if (weight1 > m_CrestSampleLodThreshold) + { + Cascade::MakeClip(slice1).SampleClip(i_PositionWSXZ, weight1, value); + } + + return lerp(g_Crest_ClipByDefault, value, weight0 + weight1); +} + +m_CrestNameSpaceEnd + +#endif diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Alpha.hlsl.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Alpha.hlsl.meta new file mode 100644 index 000000000..19f2eaeb4 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Alpha.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c1e69a8c6920249c1ad0b50907793046 +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Caustics.hlsl b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Caustics.hlsl new file mode 100644 index 000000000..0b0dd44bc --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Caustics.hlsl @@ -0,0 +1,181 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#ifndef CREST_WATER_CAUSTICS_H +#define CREST_WATER_CAUSTICS_H + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Settings.Crest.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Texture.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Flow.hlsl" + +#if (CREST_SHIFTING_ORIGIN != 0) +#include "Packages/com.waveharmonic.crest.shifting-origin/Runtime/Shaders/ShiftingOrigin.hlsl" +#endif + +m_CrestNameSpace + +half3 Caustics +( + const float3 i_ScenePositionWS, + const float i_SurfacePositionY, + const half3 i_LightIntensity, + const half3 i_LightDirection, + const half i_LightShadow, + const float i_SceneDepth, + const TiledTexture i_CausticsTexture, + const half i_TextureAverage, + const half i_Strength, + const half i_FocalDepth, + const half i_DepthOfField, + const TiledTexture i_DistortionTexture, + const half i_DistortionStrength, + const half i_Blur, + const bool i_Underwater +) +{ + half sceneDepth = i_SurfacePositionY - i_ScenePositionWS.y; + + // Compute mip index manually, with bias based on sea floor depth. We compute it manually because if it is computed automatically it produces ugly patches + // where samples are stretched/dilated. The bias is to give a focusing effect to caustics - they are sharpest at a particular depth. This doesn't work amazingly + // well and could be replaced. + float mipLod = log2(i_SceneDepth) + abs(sceneDepth - i_FocalDepth) / i_DepthOfField + i_Blur; + + // Project along light dir, but multiply by a fudge factor reduce the angle bit - compensates for fact that in real life + // caustics come from many directions and don't exhibit such a strong directonality + // Removing the fudge factor (4.0) will cause the caustics to move around more with the waves. But this will also + // result in stretched/dilated caustics in certain areas. This is especially noticeable on angled surfaces. + float2 lightProjection = i_LightDirection.xz * sceneDepth / (4.0 * i_LightDirection.y); + + float3 cuv1 = 0.0; float3 cuv2 = 0.0; + { + float2 surfacePosXZ = i_ScenePositionWS.xz; + float surfacePosScale = 1.37; + +#if (CREST_SHIFTING_ORIGIN != 0) + // Apply tiled floating origin offset. Always needed. + surfacePosXZ -= ShiftingOriginOffset(i_CausticsTexture); + // Scale was causing popping. + surfacePosScale = 1.0; +#endif + + surfacePosXZ += lightProjection; + + float scale = i_CausticsTexture._scale / 10.0; + const float speed = g_Crest_Time * i_CausticsTexture._speed; + + cuv1 = float3 + ( + surfacePosXZ / scale + float2(0.044 * speed + 17.16, -0.169 * speed), + mipLod + ); + cuv2 = float3 + ( + surfacePosScale * surfacePosXZ / scale + float2(0.248 * speed, 0.117 * speed), + mipLod + ); + } + + if (i_Underwater) + { + float2 surfacePosXZ = i_ScenePositionWS.xz; + +#if (CREST_SHIFTING_ORIGIN != 0) + // Apply tiled floating origin offset. Always needed. + surfacePosXZ -= ShiftingOriginOffset(i_DistortionTexture); +#endif + + surfacePosXZ += lightProjection; + + float scale = i_DistortionTexture._scale / 10.0; + half2 causticN = i_DistortionStrength * UnpackNormal(i_DistortionTexture.Sample(surfacePosXZ / scale)).xy; + cuv1.xy += 1.30 * causticN; + cuv2.xy += 1.77 * causticN; + } + + half causticsStrength = i_Strength; + + // Occlusion. + { + causticsStrength *= i_LightShadow; + } + + return 1.0 + causticsStrength * + ( + 0.5 * i_CausticsTexture.SampleLevel(cuv1.xy, cuv1.z).xyz + + 0.5 * i_CausticsTexture.SampleLevel(cuv2.xy, cuv2.z).xyz + - i_TextureAverage + ); +} + +half3 Caustics +( + const Flow i_Flow, + const float3 i_ScenePositionWS, + const float i_SurfacePositionY, + const half3 i_LightIntensity, + const half3 i_LightDirection, + const half i_LightShadow, + const float i_SceneDepth, + const TiledTexture i_CausticsTexture, + const half i_TextureAverage, + const half i_Strength, + const half i_FocalDepth, + const half i_DepthOfField, + const TiledTexture i_DistortionTexture, + const half i_DistortionStrength, + const half i_Blur, + const bool i_Underwater +) +{ + half blur = 0.0; + half3 flow = half3(i_Flow._Flow.x, 0, i_Flow._Flow.y); + + if (i_Blur > 0.0) + { + // Calculate blur in flowing water as will likely be more disturbed, resulting in + // caustics being less defined. + blur = length(i_Flow._Flow) * i_Blur; + } + + return Caustics + ( + i_ScenePositionWS - flow * i_Flow._Offset0, + i_SurfacePositionY, + i_LightIntensity, + i_LightDirection, + i_LightShadow, + i_SceneDepth, + i_CausticsTexture, + i_TextureAverage, + i_Strength, + i_FocalDepth, + i_DepthOfField, + i_DistortionTexture, + i_DistortionStrength, + blur, + i_Underwater + ) * i_Flow._Weight0 + Caustics + ( + i_ScenePositionWS - flow * i_Flow._Offset1, + i_SurfacePositionY, + i_LightIntensity, + i_LightDirection, + i_LightShadow, + i_SceneDepth, + i_CausticsTexture, + i_TextureAverage, + i_Strength, + i_FocalDepth, + i_DepthOfField, + i_DistortionTexture, + i_DistortionStrength, + blur, + i_Underwater + ) * i_Flow._Weight1; +} + +m_CrestNameSpaceEnd + +#endif diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Caustics.hlsl.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Caustics.hlsl.meta new file mode 100644 index 000000000..18de7a29a --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Caustics.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b2ee0978718e447e3ab93a881f3d5dcf +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Foam.hlsl b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Foam.hlsl new file mode 100644 index 000000000..1e012cec9 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Foam.hlsl @@ -0,0 +1,224 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#ifndef CREST_WATER_FOAM_H +#define CREST_WATER_FOAM_H + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Settings.Crest.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Texture.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Flow.hlsl" + +#if (CREST_SHIFTING_ORIGIN != 0) +#include "Packages/com.waveharmonic.crest.shifting-origin/Runtime/Shaders/ShiftingOrigin.hlsl" +#endif + +m_CrestNameSpace + +half WhiteFoamTexture +( + const TiledTexture i_Texture, + const half i_Foam, + const half i_Feather, + const float2 i_WorldXZ0, + const float2 i_WorldXZ1, + const float2 i_TexelOffset, + const half i_LodAlpha, + const Cascade i_CascadeData0 +) +{ + const float2 uvOffset = i_TexelOffset + g_Crest_Time * i_Texture._speed / 32.0; + // Scale with lods to get multiscale detail. 10 is magic number that gets the + // material 'scale' slider into an intuitive range. + const float scale = i_Texture._scale * i_CascadeData0._Scale / 10.0; + + half ft = lerp + ( + i_Texture.Sample((i_WorldXZ0 + uvOffset) / scale).r, + i_Texture.Sample((i_WorldXZ1 + uvOffset) / (2.0 * scale)).r, + i_LodAlpha + ); + + // Black point fade. + half result = saturate(1.0 - i_Foam); + return smoothstep(result, result + i_Feather, ft); +} + +half MultiScaleFoamAlbedo +( + const TiledTexture i_Texture, + const half i_Feather, + const half i_FoamData, + const Cascade i_CascadeData0, + const Cascade i_CascadeData1, + const half i_LodAlpha, + const float2 i_UndisplacedXZ +) +{ + float2 worldXZ0 = i_UndisplacedXZ; + float2 worldXZ1 = i_UndisplacedXZ; + +#if (CREST_SHIFTING_ORIGIN != 0) + // Apply tiled floating origin offset. Only needed if: + // - _FoamScale is a non integer value + // - _FoamScale is over 48 + worldXZ0 -= ShiftingOriginOffset(i_Texture, i_CascadeData0); + worldXZ1 -= ShiftingOriginOffset(i_Texture, i_CascadeData1); +#endif // CREST_SHIFTING_ORIGIN + + return WhiteFoamTexture(i_Texture, i_FoamData, i_Feather, worldXZ0, worldXZ1, (float2)0.0, i_LodAlpha, i_CascadeData0); +} + +half2 MultiScaleFoamNormal +( + const TiledTexture i_Texture, + const half i_Feather, + const half i_NormalStrength, + const half i_FoamData, + const half i_FoamAlbedo, + const Cascade i_CascadeData0, + const Cascade i_CascadeData1, + const half i_LodAlpha, + const float2 i_UndisplacedXZ, + const float i_PixelZ +) +{ + float2 worldXZ0 = i_UndisplacedXZ; + float2 worldXZ1 = i_UndisplacedXZ; + +#if (CREST_SHIFTING_ORIGIN != 0) + // Apply tiled floating origin offset. Only needed if: + // - _FoamScale is a non integer value + // - _FoamScale is over 48 + worldXZ0 -= ShiftingOriginOffset(i_Texture, i_CascadeData0); + worldXZ1 -= ShiftingOriginOffset(i_Texture, i_CascadeData1); +#endif // CREST_SHIFTING_ORIGIN + + // 0.25 is magic number found through tweaking. + const float2 dd = float2(0.25 * i_PixelZ * i_Texture._texel, 0.0); + const half whiteFoam_x = WhiteFoamTexture(i_Texture, i_FoamData, i_Feather, worldXZ0, worldXZ1, dd.xy, i_LodAlpha, i_CascadeData0); + const half whiteFoam_z = WhiteFoamTexture(i_Texture, i_FoamData, i_Feather, worldXZ0, worldXZ1, dd.yx, i_LodAlpha, i_CascadeData0); + + // Compute a foam normal - manually push in derivatives. If I used blend + // smooths all the normals towards straight up when there is no foam. + // Gets material slider into friendly range. + const float magicStrengthFactor = 0.01; + return magicStrengthFactor * i_NormalStrength * half2(whiteFoam_x - i_FoamAlbedo, whiteFoam_z - i_FoamAlbedo) / dd.x; +} + +half MultiScaleFoamAlbedo +( + const Flow i_Flow, + const TiledTexture i_Texture, + const half i_Feather, + const half i_Foam, + const Cascade i_CascadeData0, + const Cascade i_CascadeData1, + const half i_LodAlpha, + const float2 i_UndisplacedXZ +) +{ + return MultiScaleFoamAlbedo + ( + i_Texture, + i_Feather, + i_Foam, + i_CascadeData0, + i_CascadeData1, + i_LodAlpha, + i_UndisplacedXZ - i_Flow._Flow * i_Flow._Offset0 + ) * i_Flow._Weight0 + MultiScaleFoamAlbedo + ( + i_Texture, + i_Feather, + i_Foam, + i_CascadeData0, + i_CascadeData1, + i_LodAlpha, + i_UndisplacedXZ - i_Flow._Flow * i_Flow._Offset1 + ) * i_Flow._Weight1; +} + +half2 MultiScaleFoamNormal +( + const Flow i_Flow, + const TiledTexture i_Texture, + const half i_Feather, + const half i_NormalStrength, + const half i_FoamData, + const half i_FoamAlbedo, + const Cascade i_CascadeData0, + const Cascade i_CascadeData1, + const half i_LodAlpha, + const float2 i_UndisplacedXZ, + const float i_PixelZ +) +{ + return MultiScaleFoamNormal + ( + i_Texture, + i_Feather, + i_NormalStrength, + i_FoamData, + i_FoamAlbedo, + i_CascadeData0, + i_CascadeData1, + i_LodAlpha, + i_UndisplacedXZ - i_Flow._Flow * i_Flow._Offset0, + i_PixelZ + ) * i_Flow._Weight0 + MultiScaleFoamNormal + ( + i_Texture, + i_Feather, + i_NormalStrength, + i_FoamData, + i_FoamAlbedo, + i_CascadeData0, + i_CascadeData1, + i_LodAlpha, + i_UndisplacedXZ - i_Flow._Flow * i_Flow._Offset1, + i_PixelZ + ) * i_Flow._Weight1; +} + +void ApplyFoamToSurface +( + half i_Foam, + const half2 i_Normal, + const half3 i_Albedo, + const half i_Occlusion, + const half i_Smoothness, + const half i_Specular, + const bool i_Underwater, + inout half3 io_Albedo, + inout half3 io_NormalWS, + inout half3 io_Emission, + inout half io_Occlusion, + inout float io_Smoothness, + inout half3 io_Specular +) +{ + // Apply foam to surface. + io_Albedo = lerp(io_Albedo, i_Albedo, i_Foam); + io_Emission *= 1.0 - i_Foam; + io_Occlusion = lerp(io_Occlusion, i_Occlusion, i_Foam); + io_Smoothness = lerp(io_Smoothness, i_Smoothness, i_Foam); + io_NormalWS.xz -= i_Normal; + io_NormalWS = normalize(io_NormalWS); + + // Foam Transmission + if (i_Underwater) + { + // Foam will be black when not facing the sun. This is a hacky way to have foam lit + // as if it had transmission. + // There is still ugliness around the edges. There will either be black or + // incorrect reflections depending on the magic value. + io_NormalWS.y *= i_Foam > 0.15 ? -1.0 : 1.0; + io_Specular = lerp(io_Specular, i_Specular, i_Foam); + } +} + +m_CrestNameSpaceEnd + +#endif diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Foam.hlsl.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Foam.hlsl.meta new file mode 100644 index 000000000..98cdc893d --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Foam.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 58f878eb932e14fb0b1d13173caa2857 +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Fragment.hlsl b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Fragment.hlsl new file mode 100644 index 000000000..7878db793 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Fragment.hlsl @@ -0,0 +1,644 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// Guard against missing uniforms. +#ifdef SHADERPASS + +#define m_Properties \ + const float2 i_UndisplacedXZ, \ + const float i_LodAlpha, \ + const half i_WaterLevelOffset, \ + const float2 i_WaterLevelDerivatives, \ + const half2 i_Flow, \ + const half3 i_ViewDirectionWS, \ + const bool i_Facing, \ + const half3 i_SceneColor, \ + const float i_SceneDepthRaw, \ + const float4 i_ScreenPosition, \ + const float4 i_ScreenPositionRaw, \ + const float3 i_PositionWS, \ + const float3 i_PositionVS, \ + const float2 i_StaticLightMapUV, \ + out half3 o_Albedo, \ + out half3 o_NormalWS, \ + out half3 o_Specular, \ + out half3 o_Emission, \ + out half o_Smoothness, \ + out half o_Occlusion, \ + out half o_Alpha + +// Guard against Shader Graph preview. +#ifndef SHADERGRAPH_PREVIEW + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Shim.hlsl" + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/InputsDriven.hlsl" + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Cascade.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Geometry.hlsl" + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Depth.hlsl" + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Texture.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Flow.hlsl" + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Lighting.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Normal.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Reflection.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Refraction.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Caustics.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/VolumeLighting.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Fresnel.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Foam.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Alpha.hlsl" + +#if (CREST_PORTALS != 0) +#include "Packages/com.waveharmonic.crest.portals/Runtime/Shaders/Library/Portals.hlsl" +#endif + +#if (CREST_SHADOWS_BUILT_IN_RENDER_PIPELINE != 0) +#if CREST_BIRP +#define SHADOWS_SPLIT_SPHERES 1 +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/Core.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/Shadows.hlsl" +#endif +#endif + +bool _Crest_DrawBoundaryXZ; +float4 _Crest_BoundaryXZ; + +m_CrestNameSpace + +static const TiledTexture _Crest_NormalMapTiledTexture = + TiledTexture::Make(_Crest_NormalMapTexture, sampler_Crest_NormalMapTexture, _Crest_NormalMapTexture_TexelSize, _Crest_NormalMapScale, _Crest_NormalMapScrollSpeed); + +static const TiledTexture _Crest_FoamTiledTexture = + TiledTexture::Make(_Crest_FoamTexture, sampler_Crest_FoamTexture, _Crest_FoamTexture_TexelSize, _Crest_FoamScale, _Crest_FoamScrollSpeed); + +static const TiledTexture _Crest_CausticsTiledTexture = + TiledTexture::Make(_Crest_CausticsTexture, sampler_Crest_CausticsTexture, _Crest_CausticsTexture_TexelSize, _Crest_CausticsTextureScale, _Crest_CausticsScrollSpeed); +static const TiledTexture _Crest_CausticsDistortionTiledTexture = + TiledTexture::Make(_Crest_CausticsDistortionTexture, sampler_Crest_CausticsDistortionTexture, _Crest_CausticsDistortionTexture_TexelSize, _Crest_CausticsDistortionScale, 1.0); + +void Fragment(m_Properties) +{ + o_Albedo = 0.0; + o_NormalWS = half3(0.0, 1.0, 0.0); + o_Specular = 0.0; + o_Emission = 0.0; + o_Smoothness = 0.7; + o_Occlusion = 1.0; + o_Alpha = 1.0; + + + // Editor only. There is no defined editor symbol. + if (_Crest_DrawBoundaryXZ) + { + const float2 p = abs(i_PositionWS.xz - _Crest_BoundaryXZ.xy); + const float2 s = _Crest_BoundaryXZ.zw * 0.5; + if ((p.x > s.x && p.x < s.x + 1.0 && p.y < s.y + 1.0) || (p.y > s.y && p.y < s.y + 1.0 && p.x < s.x + 1.0)) + { + o_Emission = half3(1.0, 0.0, 1.0); +#if CREST_HDRP + o_Emission /= GetCurrentExposureMultiplier(); +#endif + } + } + + const bool underwater = IsUnderwater(i_Facing, g_Crest_ForceUnderwater); + + // TODO: Should we use PosToSIs or check for overflow? + float slice0 = _Crest_LodIndex; + float slice1 = _Crest_LodIndex + 1; + +#ifdef CREST_FLOW_ON + const Flow flow = Flow::Make(i_Flow, g_Crest_Time); +#endif + + const Cascade cascade0 = Cascade::Make(slice0); + const Cascade cascade1 = Cascade::Make(slice1); + + float sceneRawZ = i_SceneDepthRaw; + +#if (CREST_PORTALS != 0) +#ifndef CREST_SHADOWPASS +#if _ALPHATEST_ON + if (m_CrestPortal) + { + const float pixelRawZ = i_ScreenPositionRaw.z / i_ScreenPositionRaw.w; + if (OutsideOfPortal(i_ScreenPosition.xy, pixelRawZ, sceneRawZ)) + { + o_Alpha = 0.0; + return; + } + } +#endif +#endif +#endif + + float sceneZ = Utility::CrestLinearEyeDepth(sceneRawZ); + float pixelZ = -i_PositionVS.z; + + const bool isLastLod = _Crest_LodIndex == (uint)g_Crest_LodCount - 1; + const float weight0 = (1.0 - i_LodAlpha) * cascade0._Weight; + const float weight1 = (1.0 - weight0) * cascade1._Weight; + + // Data that fades towards the edge. + half foam = 0.0; half _determinant = 0.0; half4 albedo = 0.0; half2 shadow = 0.0; + if (weight0 > m_CrestSampleLodThreshold) + { + Cascade::MakeAnimatedWaves(slice0).SampleNormals(i_UndisplacedXZ, weight0, o_NormalWS.xz, _determinant); + + if (_Crest_FoamEnabled) + { + Cascade::MakeFoam(slice0).SampleFoam(i_UndisplacedXZ, weight0, foam); + } + + if (_Crest_AlbedoEnabled) + { + Cascade::MakeAlbedo(slice0).SampleAlbedo(i_UndisplacedXZ, weight0, albedo); + } + + if (_Crest_ShadowsEnabled) + { + Cascade::MakeShadow(slice0).SampleShadow(i_PositionWS.xz, weight0, shadow); + } + } + + if (weight1 > m_CrestSampleLodThreshold) + { + Cascade::MakeAnimatedWaves(slice1).SampleNormals(i_UndisplacedXZ, weight1, o_NormalWS.xz, _determinant); + + if (_Crest_FoamEnabled) + { + Cascade::MakeFoam(slice1).SampleFoam(i_UndisplacedXZ, weight1, foam); + } + + if (_Crest_AlbedoEnabled) + { + Cascade::MakeAlbedo(slice1).SampleAlbedo(i_UndisplacedXZ, weight1, albedo); + } + + if (_Crest_ShadowsEnabled) + { + Cascade::MakeShadow(slice1).SampleShadow(i_PositionWS.xz, weight1, shadow); + } + } + + // Invert so shadows are black as we normally multiply this by lighting. + shadow = 1.0 - shadow; + + // Data that displays to the edge. + // The default simulation value has been written to the border of the last slice. + half3 absorption = 0.0; half3 scattering = 0.0; + { + const float weight0 = (1.0 - (isLastLod ? 0.0 : i_LodAlpha)) * cascade0._Weight; + const float weight1 = (1.0 - weight0) * cascade1._Weight; + + if (weight0 > m_CrestSampleLodThreshold) + { + if (g_Crest_SampleScatteringSimulation) + { + Cascade::MakeScattering(slice0).SampleScattering(i_UndisplacedXZ, weight0, scattering); + } + + if (g_Crest_SampleAbsorptionSimulation) + { + Cascade::MakeAbsorption(slice0).SampleAbsorption(i_UndisplacedXZ, weight0, absorption); + } + } + + if (weight1 > m_CrestSampleLodThreshold) + { + if (g_Crest_SampleScatteringSimulation) + { + Cascade::MakeScattering(slice1).SampleScattering(i_UndisplacedXZ, weight1, scattering); + } + + if (g_Crest_SampleAbsorptionSimulation) + { + Cascade::MakeAbsorption(slice1).SampleAbsorption(i_UndisplacedXZ, weight1, absorption); + } + } + } + + if (!g_Crest_SampleScatteringSimulation) + { + scattering = _Crest_Scattering.xyz; + } + + if (!g_Crest_SampleAbsorptionSimulation) + { + absorption = _Crest_Absorption.xyz; + } + + // Determinant needs to be one when no waves. + if (isLastLod) + { + _determinant += 1.0 - weight0; + } + + // Normal. + { + WaterNormal + ( + i_WaterLevelDerivatives, + i_ViewDirectionWS, + _Crest_MinimumReflectionDirectionY, + underwater, + o_NormalWS + ); + + if (_Crest_NormalMapEnabled) + { + o_NormalWS.xz += SampleNormalMaps + ( +#ifdef CREST_FLOW_ON + flow, +#endif + _Crest_NormalMapTiledTexture, + _Crest_NormalMapStrength, + i_UndisplacedXZ, + i_LodAlpha, + cascade0 + ); + } + + o_NormalWS = normalize(o_NormalWS); + + o_NormalWS.xz *= _Crest_NormalsStrengthOverall; + o_NormalWS.y = lerp(1.0, o_NormalWS.y, _Crest_NormalsStrengthOverall); + + if (underwater) + { + // Flip when underwater. + o_NormalWS.xyz *= -1.0; + } + } + + // Default for opaque render type. + float sceneDistance = 1000.0; + float3 scenePositionWS = 0.0; + + half3 ambientLight = 0.0; + AmbientLight + ( + ambientLight + ); + + float3 lightIntensity = 0.0; + half3 lightDirection = 0.0; + + PrimaryLight + ( + i_PositionWS, + lightIntensity, + lightDirection + ); + + half3 additionalLight = AdditionalLighting(i_PositionWS, i_ScreenPositionRaw, i_StaticLightMapUV); + +#if d_Crest_ReceiveShadowsTransparent + // Sample shadow maps. + float4 shadowCoord = GET_SHADOW_COORDINATES(float4(i_PositionWS, 1.0)); + half shadows = UNITY_SAMPLE_SHADOW(_ShadowMapTexture, shadowCoord); + shadows = lerp(_LightShadowData.r, 1.0, shadows); + shadows = min(shadow.y, shadows); +#endif + +#if d_Transparent + bool caustics; + RefractedScene + ( + _Crest_RefractionStrength, + o_NormalWS, + i_ScreenPosition.xy, + pixelZ, + i_SceneColor, + sceneZ, + sceneRawZ, + underwater, + o_Emission, + sceneDistance, + scenePositionWS, + caustics + ); +#endif + + float refractedSeaLevel = 0; + float3 refractedSurfacePosition = 0; + if (!underwater) + { + // Sample larger slice to avoid the first slice. + float4 displacement = Cascade::MakeAnimatedWaves(slice1).Sample(scenePositionWS.xz); + refractedSeaLevel = g_Crest_WaterCenter.y + displacement.w; + refractedSurfacePosition = displacement.xyz; + refractedSurfacePosition.y += refractedSeaLevel; + } + + // Out-scattering. + if (!underwater) + { + // Account for average extinction of light as it travels down through volume. Assume flat water as anything else would be expensive. + half3 extinction = absorption.xyz + scattering.xyz; + o_Emission *= exp(-extinction * max(0.0, refractedSeaLevel - scenePositionWS.y)); + } + +#if d_Transparent + // Caustics + if (_Crest_CausticsEnabled && !underwater && caustics) + { + float3 position = scenePositionWS; +#if CREST_BIRP + position = float3(i_ScreenPosition.xy * _ScreenSize.xy, 0); +#endif + + half lightOcclusion = PrimaryLightShadows(position); + + half blur = 0.0; +#ifdef CREST_FLOW_ON + blur = _Crest_CausticsMotionBlur; +#endif + + o_Emission *= Caustics + ( +#ifdef CREST_FLOW_ON + flow, +#endif + scenePositionWS, + refractedSurfacePosition.y, + lightIntensity, + lightDirection, + lightOcclusion, + sceneDistance, + _Crest_CausticsTiledTexture, + _Crest_CausticsTextureAverage, + _Crest_CausticsStrength, + _Crest_CausticsFocalDepth, + _Crest_CausticsDepthOfField, + _Crest_CausticsDistortionTiledTexture, + _Crest_CausticsDistortionStrength, + blur, + underwater + ); + } +#endif + + half3 sss = 0.0; + + if (_Crest_SSSEnabled) + { + sss = PinchSSS + ( + _determinant, + _Crest_SSSPinchMinimum, + _Crest_SSSPinchMaximum, + _Crest_SSSPinchFalloff, + _Crest_SSSIntensity, + lightDirection, + _Crest_SSSDirectionalFalloff, + i_ViewDirectionWS + ); + } + + // Volume Lighting + half3 volumeLight = 0.0; + half3 volumeOpacity = 0.0; + VolumeLighting + ( + absorption, + scattering, + _Crest_Anisotropy, + shadow.x, + i_ViewDirectionWS, + ambientLight, + lightDirection, + lightIntensity, + additionalLight, + _Crest_AmbientTerm, + _Crest_DirectTerm, + sceneDistance, + sss, + _Crest_ShadowsAffectsAmbientFactor, + volumeLight, + volumeOpacity + ); + + // Fresnel + float reflected = 0.0; + float transmitted = 0.0; + { + ApplyFresnel + ( + i_ViewDirectionWS, + o_NormalWS, + underwater, + 1.0, // air + _Crest_RefractiveIndexOfWater, + _Crest_TotalInternalReflectionIntensity, + transmitted, + reflected + ); + + if (underwater) + { + o_Emission *= transmitted; + o_Emission += volumeLight * reflected; + } + else + { + o_Emission *= 1.0 - volumeOpacity; + o_Emission += volumeLight * volumeOpacity; + o_Emission *= transmitted; + } + } + + // Specular + { + o_Specular = _Crest_Specular * reflected * shadow.y; + } + + // Smoothness + { + // Vary smoothness by distance. + o_Smoothness = lerp(_Crest_Smoothness, _Crest_SmoothnessFar, pow(saturate(pixelZ / _Crest_SmoothnessFarDistance), _Crest_SmoothnessFalloff)); + } + + // Occlusion + { + o_Occlusion = underwater ? _Crest_OcclusionUnderwater : _Crest_Occlusion; + } + + // Planar Reflections + if (_Crest_PlanarReflectionsEnabled) + { + half4 reflection = PlanarReflection + ( + _Crest_ReflectionTexture, + sampler_Crest_ReflectionTexture, + _Crest_PlanarReflectionsIntensity, + o_Smoothness, + _Crest_PlanarReflectionsRoughness, + o_NormalWS, + _Crest_PlanarReflectionsDistortion, + i_ViewDirectionWS, + i_ScreenPosition.xy, + underwater + ); + + half alpha = reflection.a; + o_Emission = lerp(o_Emission, reflection.rgb, alpha * reflected * o_Occlusion); + // Override reflections with planar reflections. + // Results are darker than Unity's. + o_Occlusion *= 1.0 - alpha; + } + + // Foam + if (_Crest_FoamEnabled) + { + half albedo = MultiScaleFoamAlbedo + ( +#ifdef CREST_FLOW_ON + flow, +#endif + _Crest_FoamTiledTexture, + _Crest_FoamFeather, + foam, + cascade0, + cascade1, + i_LodAlpha, + i_UndisplacedXZ + ); + + half2 normal = MultiScaleFoamNormal + ( +#ifdef CREST_FLOW_ON + flow, +#endif + _Crest_FoamTiledTexture, + _Crest_FoamFeather, + _Crest_FoamNormalStrength, + foam, + albedo, + cascade0, + cascade1, + i_LodAlpha, + i_UndisplacedXZ, + pixelZ + ); + + half3 intensity = _Crest_FoamIntensityAlbedo; + +#if d_Crest_ReceiveShadowsTransparent + // @HACK: Scale intensity as BIRP does not support shadows for transparent objects. + intensity = max(_Crest_FoamIntensityAlbedo * saturate(ShadeSH9(float4(o_NormalWS, 1.0))), _Crest_FoamIntensityAlbedo * shadows); +#endif + + ApplyFoamToSurface + ( + albedo, + normal, + intensity, + _Crest_Occlusion, + _Crest_FoamSmoothness, + _Crest_Specular, + underwater, + o_Albedo, + o_NormalWS, + o_Emission, + o_Occlusion, + o_Smoothness, + o_Specular + ); + + // We will use this for shadow casting. + foam = albedo; + } + + // Albedo + if (_Crest_AlbedoEnabled) + { + const float foamMask = _Crest_AlbedoIgnoreFoam ? (1.0 - saturate(foam)) : 1.0; + o_Albedo = lerp(o_Albedo, albedo.rgb, albedo.a * foamMask); + o_Emission *= 1.0 - albedo.a * foamMask; + } + + // Alpha + { +#ifndef CREST_SHADOWPASS +#if d_Transparent + // Feather at intersection. Cannot be used for shadows since depth is not available. + o_Alpha = saturate((sceneZ - pixelZ) / 0.2); +#endif +#endif + + // This keyword works for all RPs despite BIRP having prefixes in serialised data. +#if _ALPHATEST_ON +#if CREST_SHADOWPASS + o_Alpha = max(foam, albedo.a) - _Crest_ShadowCasterThreshold; +#endif + + // Add 0.5 bias for LOD blending and texel resolution correction. This will help to + // tighten and smooth clipped edges. + o_Alpha -= ClipSurface(i_PositionWS.xz) > 0.5 ? 2.0 : 0.0; +#endif // _ALPHATEST_ON + + // Specular in HDRP is still affected outside the 0-1 alpha range. + o_Alpha = min(o_Alpha, 1.0); + } + +#if d_Crest_ReceiveShadowsTransparent + // @HACK: Dull highlights as BIRP does not support shadows for transparent objects. + o_Smoothness *= lerp(1, shadows, foam * 100); + // @FIXME: 0.2 to difference when high. Likely incorrect shadow sampling. + o_Specular = shadows < 0.2 ? 1.0 - max(shadows, 0.3) : o_Specular; +#endif +} + +m_CrestNameSpaceEnd + +#endif // SHADERGRAPH_PREVIEW + +void Fragment_float(m_Properties) +{ +#if SHADERGRAPH_PREVIEW + o_Albedo = 0.0; + o_NormalWS = half3(0.0, 1.0, 0.0); + o_Specular = 0.0; + o_Emission = 0.0; + o_Smoothness = 0.7; + o_Occlusion = 1.0; + o_Alpha = 1.0; +#else // SHADERGRAPH_PREVIEW + m_Crest::Fragment + ( + i_UndisplacedXZ, + i_LodAlpha, + i_WaterLevelOffset, + i_WaterLevelDerivatives, + i_Flow, + i_ViewDirectionWS, + i_Facing, + i_SceneColor, + i_SceneDepthRaw, + i_ScreenPosition, + i_ScreenPositionRaw, + i_PositionWS, + i_PositionVS, + i_StaticLightMapUV, + o_Albedo, + o_NormalWS, + o_Specular, + o_Emission, + o_Smoothness, + o_Occlusion, + o_Alpha + ); +#endif // SHADERGRAPH_PREVIEW +} + +#undef m_Properties + +#endif // SHADERPASS diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Fragment.hlsl.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Fragment.hlsl.meta new file mode 100644 index 000000000..1166a1bbb --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Fragment.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: fdafd40ae20374db88e293739fad1854 +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Fresnel.hlsl b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Fresnel.hlsl new file mode 100644 index 000000000..b5e09e23f --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Fresnel.hlsl @@ -0,0 +1,83 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#ifndef CREST_WATER_FRESNEL_H +#define CREST_WATER_FRESNEL_H + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" + +m_CrestNameSpace + +float CalculateFresnelReflectionCoefficient(const float i_CosineTheta, const float i_RefractiveIndexOfAir, const float i_RefractiveIndexOfWater) +{ + // Fresnel calculated using Schlick's approximation. + // See: http://www.cs.virginia.edu/~jdl/bib/appearance/analytic%20models/schlick94b.pdf + // Reflectance at facing angle. + float R_0 = (i_RefractiveIndexOfAir - i_RefractiveIndexOfWater) / (i_RefractiveIndexOfAir + i_RefractiveIndexOfWater); + R_0 *= R_0; + const float R_theta = R_0 + (1.0 - R_0) * pow(max(0., 1.0 - i_CosineTheta), 5.0); + return R_theta; +} + +void ApplyReflectionUnderwater( + const half3 i_ViewDirectionWS, + const half3 i_NormalWS, + const float i_RefractiveIndexOfAir, + const float i_RefractiveIndexOfWater, + out float o_LightTransmitted, + out float o_LightReflected +) { + // The the angle of outgoing light from water's surface (whether refracted form outside or internally reflected). + const float cosOutgoingAngle = max(dot(i_NormalWS, i_ViewDirectionWS), 0.); + + // Calculate the amount of light transmitted from the sky (o_LightTransmitted). + { + // Have to calculate the incident angle of incoming light to water. + // Surface based on how it would be refracted so as to hit the camera. + const float cosIncomingAngle = cos(asin(clamp((i_RefractiveIndexOfWater * sin(acos(cosOutgoingAngle))) / i_RefractiveIndexOfAir, -1.0, 1.0))); + const float reflectionCoefficient = CalculateFresnelReflectionCoefficient(cosIncomingAngle, i_RefractiveIndexOfAir, i_RefractiveIndexOfWater); + o_LightTransmitted = (1.0 - reflectionCoefficient); + o_LightTransmitted = max(o_LightTransmitted, 0.0); + } + + // Calculate the amount of light reflected from below the water. + { + // Angle of incident is angle of reflection. + const float cosIncomingAngle = cosOutgoingAngle; + const float reflectionCoefficient = CalculateFresnelReflectionCoefficient(cosIncomingAngle, i_RefractiveIndexOfAir, i_RefractiveIndexOfWater); + o_LightReflected = reflectionCoefficient; + } +} + +void ApplyFresnel +( + const half3 i_ViewDirectionWS, + const half3 i_NormalWS, + const bool i_IsUnderwater, + const float i_RefractiveIndexOfAir, + const float i_RefractiveIndexOfWater, + const float i_TirIntensity, + out float o_LightTransmitted, + out float o_LightReflected +) +{ + o_LightTransmitted = 1.0; + + if (i_IsUnderwater) + { + ApplyReflectionUnderwater(i_ViewDirectionWS, i_NormalWS, i_RefractiveIndexOfAir, i_RefractiveIndexOfWater, o_LightTransmitted, o_LightReflected); + // Limit how strong TIR is. Not sure if this is the best way but it seems to work gracefully. + o_LightTransmitted = max(o_LightTransmitted, 1.0 - i_TirIntensity); + o_LightReflected = min(o_LightReflected, i_TirIntensity); + } + else + { + const float cosAngle = max(dot(i_NormalWS, i_ViewDirectionWS), 0.0); + // Hardcode water IOR for above surface. + o_LightReflected = CalculateFresnelReflectionCoefficient(cosAngle, i_RefractiveIndexOfAir, 1.33); + } +} + +m_CrestNameSpaceEnd + +#endif diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Fresnel.hlsl.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Fresnel.hlsl.meta new file mode 100644 index 000000000..0df2487a5 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Fresnel.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 7e2e3d8f8fe32492583d087ad2add952 +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Geometry.hlsl b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Geometry.hlsl new file mode 100644 index 000000000..4779d6706 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Geometry.hlsl @@ -0,0 +1,75 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#ifndef CREST_WATER_VERT_HELPERS_H +#define CREST_WATER_VERT_HELPERS_H + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Cascade.hlsl" + +m_CrestNameSpace + +// i_meshScaleAlpha is passed in as it is provided per tile and is set only for LOD0 +float ComputeLodAlpha(float3 i_worldPos, float i_meshScaleAlpha, in const Cascade i_cascadeData0) +{ + // taxicab distance from water center drives LOD transitions + float2 offsetFromCenter = abs(float2(i_worldPos.x - g_Crest_WaterCenter.x, i_worldPos.z - g_Crest_WaterCenter.z)); + float taxicab_norm = max(offsetFromCenter.x, offsetFromCenter.y); + + // interpolation factor to next lod (lower density / higher sampling period) + // TODO - pass this in, and then make a node to provide it automatically + float lodAlpha = taxicab_norm / i_cascadeData0._Scale - 1.0; + + // LOD alpha is remapped to ensure patches weld together properly. Patches can vary significantly in shape (with + // strips added and removed), and this variance depends on the base vertex density of the mesh, as this defines the + // strip width. + lodAlpha = max((lodAlpha - g_Crest_LodAlphaBlackPointFade) / g_Crest_LodAlphaBlackPointWhitePointFade, 0.); + + // blend out lod0 when viewpoint gains altitude + lodAlpha = min(lodAlpha + i_meshScaleAlpha, 1.); + +#if _DEBUGDISABLESMOOTHLOD_ON + lodAlpha = 0.; +#endif + + return lodAlpha; +} + +void SnapAndTransitionVertLayout(in const float4x4 i_objectMatrix, in const float i_meshScaleAlpha, in const Cascade i_cascadeData0, in const float i_geometryGridSize, inout float3 io_worldPos, out float o_lodAlpha) +{ + const float GRID_SIZE_2 = 2.0 * i_geometryGridSize, GRID_SIZE_4 = 4.0 * i_geometryGridSize; + + // snap the verts to the grid + // The snap size should be twice the original size to keep the shape of the eight triangles (otherwise the edge layout changes). + float2 objectPosXZWS = i_objectMatrix._m03_m23; + + // Relative world space - add camera pos to get back out to world. Would be nice if we could operate in RWS.. +#if (SHADEROPTIONS_CAMERA_RELATIVE_RENDERING != 0) + objectPosXZWS += _WorldSpaceCameraPos.xz; +#endif + + io_worldPos.xz -= frac(objectPosXZWS / GRID_SIZE_2) * GRID_SIZE_2; // caution - sign of frac might change in non-hlsl shaders + + // compute lod transition alpha + o_lodAlpha = ComputeLodAlpha(io_worldPos, i_meshScaleAlpha, i_cascadeData0); + + // now smoothly transition vert layouts between lod levels - move interior verts inwards towards center + float2 m = frac(io_worldPos.xz / GRID_SIZE_4); // this always returns positive + float2 offset = m - 0.5; + // Check if vert is within one square from the center point which the verts move towards. the verts that need moving + // inwards should have a radius of 0.25, whereas the outer ring of verts will have radius 0.5. Pick half way between + // to give max leeway for numerical robustness. + const float minRadius = 0.375; + if (abs(offset.x) < minRadius) io_worldPos.x += offset.x * o_lodAlpha * GRID_SIZE_4; + if (abs(offset.y) < minRadius) io_worldPos.z += offset.y * o_lodAlpha * GRID_SIZE_4; +} + +void SnapAndTransitionVertLayout(in const float i_meshScaleAlpha, in const Cascade i_cascadeData0, in const float i_geometryGridSize, inout float3 io_worldPos, out float o_lodAlpha) +{ + SnapAndTransitionVertLayout(UNITY_MATRIX_M, i_meshScaleAlpha, i_cascadeData0, i_geometryGridSize, io_worldPos, o_lodAlpha); +} + +m_CrestNameSpaceEnd + +#endif // CREST_WATER_VERT_HELPERS_H diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Geometry.hlsl.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Geometry.hlsl.meta new file mode 100644 index 000000000..bca2d3485 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Geometry.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 1917cef0dc0904e92aeeb267b5543b49 +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Normal.hlsl b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Normal.hlsl new file mode 100644 index 000000000..bbeadbc45 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Normal.hlsl @@ -0,0 +1,123 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#ifndef CREST_WATER_NORMAL_H +#define CREST_WATER_NORMAL_H + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Settings.Crest.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Texture.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Flow.hlsl" + +#if (CREST_SHIFTING_ORIGIN != 0) +#include "Packages/com.waveharmonic.crest.shifting-origin/Runtime/Shaders/ShiftingOrigin.hlsl" +#endif + +m_CrestNameSpace + +half2 SampleNormalMaps +( + const TiledTexture i_NormalMap, + const half i_Strength, + const float2 i_UndisplacedXZ, + const float i_LodAlpha, + const Cascade i_CascadeData +) +{ + float2 worldXZUndisplaced = i_UndisplacedXZ; + +#if (CREST_SHIFTING_ORIGIN != 0) + // Apply tiled floating origin offset. Always needed. + worldXZUndisplaced -= ShiftingOriginOffset(i_NormalMap, i_CascadeData); +#endif + + const float2 v0 = float2(0.94, 0.34), v1 = float2(-0.85, -0.53); + float scale = i_NormalMap._scale * i_CascadeData._Scale / 10.0; + const float spdmulL = _Crest_ChunkNormalScrollSpeed.x * i_NormalMap._speed; + half2 norm = + UnpackNormal(i_NormalMap.Sample((worldXZUndisplaced + v0 * g_Crest_Time * spdmulL) / scale)).xy + + UnpackNormal(i_NormalMap.Sample((worldXZUndisplaced + v1 * g_Crest_Time * spdmulL) / scale)).xy; + + // blend in next higher scale of normals to obtain continuity + const half nblend = i_LodAlpha * _Crest_ChunkFarNormalsWeight; + if (nblend > 0.001) + { + // next lod level + scale *= 2.0; + const float spdmulH = _Crest_ChunkNormalScrollSpeed.y * i_NormalMap._speed; + norm = lerp(norm, + UnpackNormal(i_NormalMap.Sample((worldXZUndisplaced + v0 * g_Crest_Time * spdmulH) / scale)).xy + + UnpackNormal(i_NormalMap.Sample((worldXZUndisplaced + v1 * g_Crest_Time * spdmulH) / scale)).xy, + nblend); + } + + // approximate combine of normals. would be better if normals applied in local frame. + return i_Strength * norm; +} + +half2 SampleNormalMaps +( + const Flow i_Flow, + const TiledTexture i_NormalMap, + const half i_Strength, + const float2 i_UndisplacedXZ, + const float i_LodAlpha, + const Cascade i_CascadeData +) +{ + return SampleNormalMaps + ( + i_NormalMap, + i_Strength, + i_UndisplacedXZ - i_Flow._Flow * (i_Flow._Offset0 - i_Flow._Period * 0.5), + i_LodAlpha, + i_CascadeData + ) * i_Flow._Weight0 + SampleNormalMaps + ( + i_NormalMap, + i_Strength, + i_UndisplacedXZ - i_Flow._Flow * (i_Flow._Offset1 - i_Flow._Period * 0.5), + i_LodAlpha, + i_CascadeData + ) * i_Flow._Weight1; +} + +void WaterNormal +( + const float2 i_WaterLevelDerivatives, + const half3 i_ViewDirectionWS, + const half i_MinimumReflectionDirectionY, + const bool i_Underwater, + inout half3 io_NormalWS +) +{ + // Account for water level changes which change angle of water surface, impacting normal. + io_NormalWS.xz += -i_WaterLevelDerivatives; + + // Finalise normal + io_NormalWS = normalize(io_NormalWS); + + if (i_Underwater) + { + return; + } + + // Limit how close to horizontal reflection ray can get, useful to avoid unsightly below-horizon reflections. + { + float3 refl = reflect(-i_ViewDirectionWS, io_NormalWS); + if (refl.y < i_MinimumReflectionDirectionY) + { + // Find the normal that keeps the reflection direction above the horizon. Compute + // the reflection dir that does work, normalize it, and then normal is half vector + // between this good reflection direction and view direction. + float3 FL = refl; + FL.y = i_MinimumReflectionDirectionY; + FL = normalize(FL); + io_NormalWS = normalize(FL + i_ViewDirectionWS); + } + } +} + +m_CrestNameSpaceEnd + +#endif diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Normal.hlsl.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Normal.hlsl.meta new file mode 100644 index 000000000..d0c009359 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Normal.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5e48e10254d2e49b8b040871986b6605 +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Reflection.hlsl b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Reflection.hlsl new file mode 100644 index 000000000..bbccbb56a --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Reflection.hlsl @@ -0,0 +1,66 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#ifndef CREST_WATER_REFLECTION_H +#define CREST_WATER_REFLECTION_H + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Utility.hlsl" + +float4 _Crest_ReflectionPositionNormal[2]; +Texture2DArray _Crest_ReflectionTexture; +SamplerState sampler_Crest_ReflectionTexture; + +m_CrestNameSpace + +half4 PlanarReflection +( + const Texture2DArray i_ReflectionsTexture, + const SamplerState i_ReflectionsSampler, + const half i_Intensity, + const half i_Smoothness, + const half i_Roughness, + const half3 i_NormalWS, + const half i_NormalStrength, + const half3 i_ViewDirectionWS, + const float2 i_PositionNDC, + const bool i_Underwater +) +{ + half3 planeNormal = half3(0.0, i_Underwater ? -1.0 : 1.0, 0.0); + half3 reflected = reflect(-i_ViewDirectionWS, lerp(planeNormal, i_NormalWS, i_NormalStrength)); + reflected.y = -reflected.y; + + float4 positionCS = mul(UNITY_MATRIX_VP, half4(reflected, 0.0)); +#if UNITY_UV_STARTS_AT_TOP + positionCS.y = -positionCS.y; +#endif + + float2 positionNDC = positionCS.xy * rcp(positionCS.w) * 0.5 + 0.5; + + // Cancel out distortion if out of bounds. We could make this nicer by doing an edge fade but the improvement is + // barely noticeable. Edge fade requires recalculating the above a second time. + { + float4 positionAndNormal = _Crest_ReflectionPositionNormal[i_Underwater]; + if (dot(positionNDC - positionAndNormal.xy, positionAndNormal.zw) < 0.0) + { + positionNDC = lerp(i_PositionNDC, positionNDC, 0.25); + } + } + + const half roughness = PerceptualSmoothnessToPerceptualRoughness(i_Smoothness); + const half level = PerceptualRoughnessToMipmapLevel(roughness, i_Roughness); + half4 reflection = i_ReflectionsTexture.SampleLevel(sampler_Crest_ReflectionTexture, float3(positionNDC, i_Underwater), level); + + // If more than four layers are used on the terrain, they will appear black if HDR + // is enabled on the planar reflection camera. Alpha is probably a negative value. + reflection.a = saturate(reflection.a); + + reflection.a *= i_Intensity; + + return reflection; +} + +m_CrestNameSpaceEnd + +#endif diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Reflection.hlsl.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Reflection.hlsl.meta new file mode 100644 index 000000000..b9e83aa0a --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Reflection.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 59ed70386a75c40a594ac82af7bd817b +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Refraction.hlsl b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Refraction.hlsl new file mode 100644 index 000000000..0439dfff3 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Refraction.hlsl @@ -0,0 +1,113 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#ifndef CREST_WATER_REFRACTION_H +#define CREST_WATER_REFRACTION_H + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Settings.Crest.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Depth.hlsl" + +#if (CREST_PORTALS != 0) +#include "Packages/com.waveharmonic.crest.portals/Runtime/Shaders/Library/Portals.hlsl" +#endif + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Utility.hlsl" + +#ifndef SUPPORTS_FOVEATED_RENDERING_NON_UNIFORM_RASTER +#define FoveatedRemapLinearToNonUniform(uv) uv +#endif + +m_CrestNameSpace + +// We take the unrefracted scene colour as input because having a Scene Colour node in the graph +// appears to be necessary to ensure the scene colours are bound? +void RefractedScene +( + const half i_RefractionStrength, + const half3 i_NormalWS, + const float2 i_PositionNDC, + const float i_PixelZ, + const half3 i_SceneColorUnrefracted, + const float i_SceneZ, + const float i_SceneZRaw, + const bool i_Underwater, + out half3 o_SceneColor, + out float o_SceneDistance, + out float3 o_ScenePositionWS, + out bool o_Caustics +) +{ + float2 positionNDC = i_PositionNDC; + float sceneDepthRaw = i_SceneZRaw; + + o_Caustics = true; + + // View ray intersects geometry surface either above or below water surface. + float2 refractOffset = i_RefractionStrength * i_NormalWS.xz; + if (!i_Underwater) + { + // We're above the water, so behind interface is depth fog. + refractOffset *= min(1.0, 0.5 * (i_SceneZ - i_PixelZ)) / i_SceneZ; + } + else + { + // When looking up through water, full strength ends up being quite intense so reduce it a bunch. + refractOffset *= 0.3; + } + + // Blend at the edge of the screen to avoid artifacts. + refractOffset *= 1.0 - EdgeBlendingFactor(positionNDC, i_PixelZ); + + const float2 positionNDCRefracted = FoveatedRemapLinearToNonUniform(positionNDC + refractOffset); + float sceneDepthRawRefracted = SHADERGRAPH_SAMPLE_SCENE_DEPTH(positionNDCRefracted); + +#if (CREST_PORTALS != 0) +#if _ALPHATEST_ON + // Portals + ApplyPortalRefractions(positionNDCRefracted, i_SceneZRaw, i_Underwater, sceneDepthRawRefracted, o_Caustics); +#endif +#endif + + + const float sceneZRefract = Utility::CrestLinearEyeDepth(sceneDepthRawRefracted); + + // Depth fog & caustics - only if view ray starts from above water. + // Compute depth fog alpha based on refracted position if it landed on an + // underwater surface, or on unrefracted depth otherwise. + if (sceneZRefract > i_PixelZ) + { + // Refracted. + o_SceneDistance = sceneZRefract - i_PixelZ; + o_SceneColor = SHADERGRAPH_SAMPLE_SCENE_COLOR(positionNDCRefracted); + + positionNDC = positionNDCRefracted; + sceneDepthRaw = sceneDepthRawRefracted; + } + else + { + // Unrefracted. + // It seems that when MSAA is enabled this can sometimes be negative. + o_SceneDistance = max(i_SceneZ - i_PixelZ, 0.0); + o_SceneColor = i_SceneColorUnrefracted; + + // NOTE: Causes refraction artifact with caustics. Cannot remember exactly why this was added. + // o_Caustics = false; + positionNDC = FoveatedRemapLinearToNonUniform(positionNDC); + } + + if (i_Underwater) + { + // Depth fog is handled by underwater shader. + o_SceneDistance = i_PixelZ; + } + + o_ScenePositionWS = ComputeWorldSpacePosition(positionNDC, sceneDepthRaw, UNITY_MATRIX_I_VP); +#if (SHADEROPTIONS_CAMERA_RELATIVE_RENDERING != 0) + o_ScenePositionWS += _WorldSpaceCameraPos; +#endif +} + +m_CrestNameSpaceEnd + +#endif diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Refraction.hlsl.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Refraction.hlsl.meta new file mode 100644 index 000000000..54d54a61c --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Refraction.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: bede8020b874c4bc389767163dc07528 +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Shim.hlsl b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Shim.hlsl new file mode 100644 index 000000000..3e71f9b7c --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Shim.hlsl @@ -0,0 +1,56 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// Constants for shader graph. For example, we can force shader features when we have yet to make a keyword for it in +// shader graph. + +// This file must be included before all other includes. And it must be done for every node. This is due to #ifndef +// limiting includes from being evaluated once, and we cannot specify the order because shader graph does this. + +#ifndef CREST_SHADERGRAPH_CONSTANTS_H +#define CREST_SHADERGRAPH_CONSTANTS_H + +#ifdef UNIVERSAL_PIPELINE_CORE_INCLUDED + #define CREST_URP 1 + + #if (SHADERPASS == SHADERPASS_SHADOWCASTER) + #define CREST_SHADOWPASS 1 + #endif + +#if _SURFACE_TYPE_TRANSPARENT + #define d_Transparent 1 +#endif + +#elif BUILTIN_TARGET_API + #define CREST_BIRP 1 + + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/InputsDriven.hlsl" + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/Common.hlsl" + +#if _BUILTIN_SURFACE_TYPE_TRANSPARENT + #define d_Transparent 1 +#endif + + // SHADERPASS is currently broken: + // https://forum.unity.com/threads/built-in-renderer-shaderpass-include-in-wrong-place.1444156/ + // #if (SHADERPASS == SHADERPASS_SHADOWCASTER) + // #define CREST_SHADOWPASS 1 + // #endif +#else + // HDRP does not appear to have a reliable keyword to target. + #define CREST_HDRP 1 + +#if _SURFACE_TYPE_TRANSPARENT + #define d_Transparent 1 +#endif + + #if (SHADERPASS == SHADERPASS_SHADOWS) + #define CREST_SHADOWPASS 1 + #endif +#endif + +#if defined(CREST_HDRP) && (SHADERPASS == SHADERPASS_FORWARD) +#define CREST_HDRP_FORWARD_PASS 1 +#endif + +#endif // CREST_SHADERGRAPH_CONSTANTS_H diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Shim.hlsl.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Shim.hlsl.meta new file mode 100644 index 000000000..409e2e59e --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Shim.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a641876bd41254d07831fd1b0b92f99b +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Utility.hlsl b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Utility.hlsl new file mode 100644 index 000000000..52d72eba7 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Utility.hlsl @@ -0,0 +1,38 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#ifndef CREST_UTILITY_H +#define CREST_UTILITY_H + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" + +m_CrestNameSpace + +half InverseLerp(half a, half b, half t) +{ + return (t - a) / (b - a); +} + +// Taken from: +// https://github.com/Unity-Technologies/Graphics/blob/f56d2b265eb9e01b0376623e909f98c88bc60662/Packages/com.unity.render-pipelines.high-definition/Runtime/Surface/Shaders/WaterUtilities.hlsl#L781-L797 +float EdgeBlendingFactor(float2 screenPosition, float distanceToWaterSurface) +{ + // Convert the screen position to NDC + float2 screenPosNDC = screenPosition * 2 - 1; + + // We want the value to be 0 at the center and go to 1 at the edges + float distanceToEdge = 1.0 - min((1.0 - abs(screenPosNDC.x)), (1.0 - abs(screenPosNDC.y))); + + // What we want here is: + // - +inf -> 0.5 value is 0 + // - 0.5-> 0.25 value is going from 0 to 1 + // - 0.25 -> 0 value is 1 + float distAttenuation = 1.0 - saturate((distanceToWaterSurface - 0.75) / 0.25); + + // Based on if the water surface is close, we want to make the blending region even bigger + return lerp(saturate((distanceToEdge - 0.8) / (0.2)), saturate(distanceToEdge + 0.25), distAttenuation); +} + +m_CrestNameSpaceEnd + +#endif diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Utility.hlsl.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Utility.hlsl.meta new file mode 100644 index 000000000..e21d93be7 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Utility.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8a725a22984064d758e158a964ac1255 +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Vertex.hlsl b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Vertex.hlsl new file mode 100644 index 000000000..95a65140d --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Vertex.hlsl @@ -0,0 +1,186 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// Guard against missing uniforms. +#ifdef SHADERPASS + +#define m_Properties \ + const float3 i_PositionWS, \ + const float3 i_ObjectPosition, \ + const float3 i_CameraPosition, \ + const float i_Time, \ + out float3 o_PositionWS, \ + out float2 o_UndisplacedXZ, \ + out float o_LodAlpha, \ + out half o_WaterLevelOffset, \ + out float2 o_WaterLevelDerivatives, \ + out half2 o_Flow + +// Guard against Shader Graph preview. +#ifndef SHADERGRAPH_PREVIEW + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Shim.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/InputsDriven.hlsl" + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Cascade.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Geometry.hlsl" + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Depth.hlsl" + +#if CREST_URP +#if (SHADERPASS == SHADERPASS_MOTION_VECTORS) +#define _TRANSPARENT_WRITES_MOTION_VEC 1 +#endif +#endif + +#if _TRANSPARENT_WRITES_MOTION_VEC +#define m_Slice clamp(_Crest_LodIndex + (isMotionVectors ? g_Crest_LodChange : 0), 0, g_Crest_LodCount) +#define m_Make(slice) Make(slice, isMotionVectors) +#else +#define m_Slice _Crest_LodIndex +#define m_Make(slice) Make(slice) +#endif + +m_CrestNameSpace + +void Vertex(m_Properties) +{ + // This will get called twice. + // With current and previous time respectively. + + o_UndisplacedXZ = 0.0; + o_LodAlpha = 0.0; + o_WaterLevelOffset = 0.0; + o_WaterLevelDerivatives = 0.0; + o_Flow = 0.0; + + const bool isMotionVectors = i_Time < _Time.y; + + const float slice0 = m_Slice; + const float slice1 = slice0 + 1; + const Cascade cascade0 = Cascade::m_Make(slice0); + const Cascade cascade1 = Cascade::m_Make(slice1); + + o_PositionWS = i_PositionWS; + + // Vertex snapping and LOD transition. + SnapAndTransitionVertLayout + ( + _Crest_ChunkMeshScaleAlpha, + Cascade::Make(_Crest_LodIndex), + _Crest_ChunkGeometryGridWidth, + o_PositionWS, + o_LodAlpha + ); + + // Fix precision errors at edges. + { + // Scale up by small "epsilon" to solve numerical issues. Expand slightly about tile center. + // :WaterGridPrecisionErrors + const float2 tileCenterXZ = i_ObjectPosition.xz; + const float2 cameraPositionXZ = abs(i_CameraPosition.xz); + // Scale "epsilon" by distance from zero. There is an issue where overlaps can cause SV_IsFrontFace + // to be flipped (needs to be investigated). Gaps look bad from above surface, and overlaps look bad + // from below surface. We want to close gaps without introducing overlaps. A fixed "epsilon" will + // either not solve gaps at large distances or introduce too many overlaps at small distances. Even + // with scaling, there are still unsolvable overlaps underwater (especially at large distances). + // 100,000 (0.00001) is the maximum position before Unity warns the user of precision issues. + o_PositionWS.xz = lerp(tileCenterXZ, o_PositionWS.xz, lerp(1.0, 1.01, max(cameraPositionXZ.x, cameraPositionXZ.y) * 0.00001)); + } + + o_UndisplacedXZ = o_PositionWS.xz; + + // Calculate sample weights. params.z allows shape to be faded out (used on last lod to support pop-less scale transitions). + const float weight0 = (1.0 - o_LodAlpha) * cascade0._Weight; + const float weight1 = (1.0 - weight0) * cascade1._Weight; + + // Data that needs to be sampled at the undisplaced position. + if (weight0 > m_CrestSampleLodThreshold) + { +#if _TRANSPARENT_WRITES_MOTION_VEC + if (isMotionVectors) + { + Cascade::MakeAnimatedWavesSource(slice0).SampleDisplacement(o_UndisplacedXZ, weight0, o_PositionWS, o_WaterLevelDerivatives); + } + else +#endif + { + Cascade::MakeAnimatedWaves(slice0).SampleDisplacement(o_UndisplacedXZ, weight0, o_PositionWS, o_WaterLevelDerivatives); + } + } + + if (weight1 > m_CrestSampleLodThreshold) + { +#if _TRANSPARENT_WRITES_MOTION_VEC + if (isMotionVectors) + { + Cascade::MakeAnimatedWavesSource(slice1).SampleDisplacement(o_UndisplacedXZ, weight1, o_PositionWS, o_WaterLevelDerivatives); + } + else +#endif + { + Cascade::MakeAnimatedWaves(slice1).SampleDisplacement(o_UndisplacedXZ, weight1, o_PositionWS, o_WaterLevelDerivatives); + } + } + + // Data that needs to be sampled at the displaced position. + if (weight0 > m_CrestSampleLodThreshold) + { +#if CREST_FLOW_ON + Cascade::MakeFlow(slice0).SampleFlow(o_UndisplacedXZ, weight0, o_Flow); +#endif + } + + if (weight1 > m_CrestSampleLodThreshold) + { +#if CREST_FLOW_ON + Cascade::MakeFlow(slice1).SampleFlow(o_UndisplacedXZ, weight1, o_Flow); +#endif + } + +#if _TRANSPARENT_WRITES_MOTION_VEC + if (isMotionVectors) + { + o_PositionWS.xz -= g_Crest_WaterCenter.xz; + o_PositionWS.xz *= g_Crest_WaterScaleChange; + o_PositionWS.xz += g_Crest_WaterCenter.xz; + o_PositionWS += g_Crest_WaterCenterDelta; + } +#endif +} + +m_CrestNameSpaceEnd + +#endif // SHADERGRAPH_PREVIEW + +void Vertex_float(m_Properties) +{ +#if SHADERGRAPH_PREVIEW + o_PositionWS = 0.0; + o_UndisplacedXZ = 0.0; + o_LodAlpha = 0.0; + o_WaterLevelOffset = 0.0; + o_WaterLevelDerivatives = 0.0; + o_Flow = 0.0; +#else // SHADERGRAPH_PREVIEW + m_Crest::Vertex + ( + i_PositionWS, + i_ObjectPosition, + i_CameraPosition, + i_Time, + o_PositionWS, + o_UndisplacedXZ, + o_LodAlpha, + o_WaterLevelOffset, + o_WaterLevelDerivatives, + o_Flow + ); +#endif // SHADERGRAPH_PREVIEW +} + +#undef m_Properties + +#endif // SHADERPASS diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Vertex.hlsl.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Vertex.hlsl.meta new file mode 100644 index 000000000..e11b9dc53 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Vertex.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 2c406004ec98d40d292b359364c27961 +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/VolumeLighting.hlsl b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/VolumeLighting.hlsl new file mode 100644 index 000000000..36950af6f --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/VolumeLighting.hlsl @@ -0,0 +1,84 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#ifndef CREST_WATER_VOLUME_LIGHTING_H +#define CREST_WATER_VOLUME_LIGHTING_H + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Utility.hlsl" + +m_CrestNameSpace + +// Schlick phase function. +float SchlickPhase(float phaseG, float cosTheta) +{ + const float schlickK = 1.5 * phaseG - 0.5 * phaseG * phaseG * phaseG; + const float phaseFactor = 1.0 + schlickK * cosTheta; + return (1.0 - schlickK * schlickK) / (4.0 * PI * phaseFactor * phaseFactor); +} + +void VolumeLighting +( + const half3 i_Absorption, + const half3 i_Scattering, + const half i_PhaseG, + const half i_DirectionalLightShadow, + const half3 i_ViewDirectionWS, + const half3 i_AmbientLighting, + const half3 i_PrimaryLightDirection, + const half3 i_PrimaryLightIntensity, + const half3 i_AdditionalLight, + const half i_AmbientLightingTerm, + const half i_PrimaryLightingTerm, + const half i_WaterRayLength, + const half3 i_SunBoost, + const half i_ShadowsAffectAmbientLightingFactor, + out half3 o_VolumeLight, + out half3 o_VolumeOpacity +) +{ + // Extinction is light absorbed plus light scattered out. + const half3 extinction = i_Absorption + i_Scattering; + + const float ambientLightShadow = lerp + ( + 1.0, + i_DirectionalLightShadow, + saturate(min(min(extinction.x, extinction.y), extinction.z) * i_ShadowsAffectAmbientLightingFactor * g_Crest_DynamicSoftShadowsFactor) + ); + + // Sun + const float sunPhase = SchlickPhase(i_PhaseG, dot(i_PrimaryLightDirection, i_ViewDirectionWS)); + const float3 inScatteredSun = (1.0 + i_SunBoost) * sunPhase * i_PrimaryLightIntensity * i_PrimaryLightingTerm; + const float3 inScatteredAmbient = i_AmbientLighting * i_AmbientLightingTerm * ambientLightShadow; + + // Total inscattered + const float3 inscattered = (inScatteredAmbient + i_AdditionalLight + inScatteredSun * i_DirectionalLightShadow); + const float3 scatteringAmount = saturate(i_Scattering / max(extinction, 0.00001)); + o_VolumeLight = inscattered * scatteringAmount; + + // Like 'alpha' value or obscurance. Volume light needs multiplying by this value to be correct in shallows. + o_VolumeOpacity = 1.0 - exp(-extinction * max(0.0, i_WaterRayLength)); +} + +half PinchSSS +( + const half i_Pinch, + const half i_Minimum, + const half i_Maximum, + const half i_Falloff, + const half i_Intensity, + const half3 i_SunDirection, + const half i_SunDirectionFalloff, + const half3 i_ViewDirectionWS +) +{ + half pinch = pow(saturate(InverseLerp(i_Minimum, i_Maximum, max(2.0 - i_Pinch, 0.0))), i_Falloff); + half sun = pow(saturate(dot(i_ViewDirectionWS, -i_SunDirection)), i_SunDirectionFalloff); + return pinch * sun * i_Intensity; +} + +m_CrestNameSpaceEnd + +#endif diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/VolumeLighting.hlsl.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/VolumeLighting.hlsl.meta new file mode 100644 index 000000000..5ef016f40 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/VolumeLighting.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: bf1d64d62eeee4f058f304a0c2f36590 +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Water.shadergraph b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Water.shadergraph new file mode 100644 index 000000000..89206abdb --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Water.shadergraph @@ -0,0 +1,6387 @@ +{ + "m_SGVersion": 3, + "m_Type": "UnityEditor.ShaderGraph.GraphData", + "m_ObjectId": "e686651ddd104539a96befa9488a7220", + "m_Properties": [ + { + "m_Id": "4f69e9e4f638098994f0c45329a5d585" + }, + { + "m_Id": "5cd3653818bf0483aba63838ff94db1e" + }, + { + "m_Id": "ff8bcce5ee09228abb73bf677fa20052" + }, + { + "m_Id": "0e5f52aeae1e218abfab5efa5841098c" + }, + { + "m_Id": "994e8f13c14f6c80985a81bc860d6550" + }, + { + "m_Id": "6f4f3ecc7e7d4d83ab0176010684a61e" + }, + { + "m_Id": "c700bce5ef10cf8e9e5b69ba043d383b" + }, + { + "m_Id": "7b2f0f23d232ab88bcacd3e88392015a" + }, + { + "m_Id": "7bd38e1a9e3f978aa6c1746701bf789b" + }, + { + "m_Id": "8741edca0fbbee8a8999dd01e18125ee" + }, + { + "m_Id": "9c1e3b7101c8d18eafc43983c69eb3d0" + }, + { + "m_Id": "bbd2579dfd7f38879fab18706b09b5fb" + }, + { + "m_Id": "71f6994de656018baa684da1128e623c" + }, + { + "m_Id": "a11232afc69f728f9691066ce697feee" + }, + { + "m_Id": "d03d9fc3ce7b4a8f939cf6a6a147257e" + }, + { + "m_Id": "bfe5cf33a577b383b757f8332383b77d" + }, + { + "m_Id": "061da12cae33a388819d087995f680bf" + }, + { + "m_Id": "4a3c770430d2578aaf28126d16b17016" + }, + { + "m_Id": "a141f53b584cb28fb6292eb41f81614b" + }, + { + "m_Id": "14f5135a4bf8f5868cb55001b6472657" + }, + { + "m_Id": "aa75e7087fa330809fdc753edcd8995b" + }, + { + "m_Id": "a1b2f9dc07dc18858f11fd5ff20187d8" + }, + { + "m_Id": "fba39aeafd5aed838e2205e938a89b91" + }, + { + "m_Id": "87bec886e74d0b818024ab60ee3f8d88" + }, + { + "m_Id": "2b7848993646568dbe1e87b356d4e19b" + }, + { + "m_Id": "f75baf34d9f28a80a10af59ed35841c5" + }, + { + "m_Id": "91e9a577d315a3848dfb1f48a6743f9c" + }, + { + "m_Id": "4b09daebd022cf89bc77ad473c95586c" + }, + { + "m_Id": "0b19ab8baeda8584a55a0631c4f4decc" + }, + { + "m_Id": "3096e39a5605958497b1d3d3fac8ded2" + }, + { + "m_Id": "a591f22444f34efc876bf557bb9ebd1f" + }, + { + "m_Id": "27c63605cb7d41ceb669eccab82f3416" + }, + { + "m_Id": "b46c0ecc382d4777a4364feb0e0f8b70" + }, + { + "m_Id": "aa43a0a61bb9443ea398c342f79765a9" + }, + { + "m_Id": "d3e20a560cd246c5966f967e53903833" + }, + { + "m_Id": "86d9bc7bf9c2470ebe124428be6585d1" + }, + { + "m_Id": "d33c23a144f9400888ebc0b17741ceea" + }, + { + "m_Id": "d347a12dc40b4875b10257a32f31301c" + }, + { + "m_Id": "21db17a76f094b19ba523148b6f7aa41" + }, + { + "m_Id": "bd96da68193149a4a37e60284d87b160" + }, + { + "m_Id": "f00a6ef3872645488e79e89c6ac1845e" + }, + { + "m_Id": "723dc6aba75e40dcbe7ee413e905c51a" + }, + { + "m_Id": "5c5b9e2a267d466ea6353121d9e12662" + }, + { + "m_Id": "2d31998b356d41179aa5291dcedc7850" + }, + { + "m_Id": "0d81099c729342968bf4ee002d378dcf" + }, + { + "m_Id": "d6af4ca8280b4d56b6f2bf1c8b7a0bbd" + }, + { + "m_Id": "c9e151d906b14205b3c0d9b6d5561067" + }, + { + "m_Id": "855a78e097d54640b5bbc53c3f227524" + }, + { + "m_Id": "bb642d517f6040f9b3810d5c14873f37" + }, + { + "m_Id": "524d5e06f6474217aa1f93ce3139d36b" + }, + { + "m_Id": "a64036ce5dde44bf8d55a5caf75668f5" + }, + { + "m_Id": "973fda11195c4260a5bee711dca38ccf" + }, + { + "m_Id": "3b6b9f9fc3614e43a2cd513af66b9fc5" + }, + { + "m_Id": "e632a014145542d8a0f6bad7aac6cb63" + }, + { + "m_Id": "ac20e42c0c5f4e60872782a3b5cb4aac" + }, + { + "m_Id": "b83ed6e75a6f47b785c0fc9a5ee0c00a" + }, + { + "m_Id": "e608dd8f43794f5d8b3995446b21467f" + }, + { + "m_Id": "5af4fab89c55486e8ec4914978d76006" + }, + { + "m_Id": "e4a54526c6204b5badd66e158dcf0b1d" + } + ], + "m_Keywords": [ + { + "m_Id": "b91141f3e4cf4131ab732e6ae5828231" + } + ], + "m_Dropdowns": [], + "m_CategoryData": [ + { + "m_Id": "ab5c287be1ea4492ab82972b1124492c" + }, + { + "m_Id": "39bdc7581dce44f5a9d59072bb141cb1" + }, + { + "m_Id": "1acefc13e64f4bbfbf2ffbb48d713165" + }, + { + "m_Id": "7c52172b64174c238d63df6a6ea01f69" + }, + { + "m_Id": "9475b0c108bc456eb09f35111542022b" + }, + { + "m_Id": "330cb63ecb704ddebac4935cb0b85ab7" + }, + { + "m_Id": "1920b69a79204a50b7ca9f87f80ef449" + }, + { + "m_Id": "76dfbf9d02da4e2b9a7cffa11a17b81d" + }, + { + "m_Id": "76a4c02b522d4e1d84eca095e84b1f30" + }, + { + "m_Id": "1d88e2d02e6f45ddbf89f1131a617042" + }, + { + "m_Id": "d65753c4eac547c5a73c35da6956d9e2" + } + ], + "m_Nodes": [ + { + "m_Id": "d22d7fde479b42818d46226e4fdf8fd2" + }, + { + "m_Id": "3f561c9e6dff4963bd333d65a10e76bc" + }, + { + "m_Id": "2410a929cea74c53b00a0f819f5be0f9" + }, + { + "m_Id": "4bb923e45f9f48bab142707a3af6e4bd" + }, + { + "m_Id": "b7891fe7e5a34f03adebd8a45505c5fc" + }, + { + "m_Id": "e207931e020242bba83058a59f3fb07d" + }, + { + "m_Id": "01717f91918a4191a16ca9eb0a394f85" + }, + { + "m_Id": "641a42645cc2483bb33d553093357479" + }, + { + "m_Id": "088237a0a2ea4680b3ef33263034c583" + }, + { + "m_Id": "0ce731b4d64244f499c8f8f3adac65db" + }, + { + "m_Id": "d6507a957f404764aa2670d0dc950578" + }, + { + "m_Id": "8f7d3c6acd8c40a993fe189ad3b6e808" + }, + { + "m_Id": "8e8aee51883445f1b08bfbec696cb18d" + }, + { + "m_Id": "f16010780e29425caac8bbcfaae9bde4" + }, + { + "m_Id": "a22b846424134313814bef43e40c5cb3" + }, + { + "m_Id": "4c57f9182e154397bf38efa2af2224ef" + }, + { + "m_Id": "406c1f6f5af140b99dc01fff3651340e" + }, + { + "m_Id": "840981f260e04e378944867968a40230" + }, + { + "m_Id": "170e2545cc944659aa55e7eeb33298b1" + }, + { + "m_Id": "6fb510b9ca124cf881fe849664df5924" + }, + { + "m_Id": "d056d4d282b14a5b9a336e5561143c6a" + }, + { + "m_Id": "70391ba97bb44b55a04506b2aef83ade" + }, + { + "m_Id": "94663a98bbc145dba013a7c0d9301c85" + }, + { + "m_Id": "7b9e8caf91bb4d56b28c9420be41aa60" + }, + { + "m_Id": "d3778e9c7b9a4c8098a0fba6b826b854" + }, + { + "m_Id": "a6aefd808acc4136b14b84d9277addbd" + }, + { + "m_Id": "4fa7283733c64318a6c32176ce80a2bc" + }, + { + "m_Id": "cc4998fd8e074695a09b766078550f62" + }, + { + "m_Id": "2006e2e92edf4a748fc6cd3cc1a8bca5" + }, + { + "m_Id": "f1091500a8a244058957bd706b5fd6e7" + }, + { + "m_Id": "606b9292242c4a2a9b060ca6caa06628" + }, + { + "m_Id": "046853f212c34016b4d79091399be33a" + }, + { + "m_Id": "f8a8f45aa5dd42febd6bf935dae62d1c" + }, + { + "m_Id": "4678beb45340481b97ab1e7d20b2f83a" + }, + { + "m_Id": "2275b40e4a324efeace08a27b84ee3bf" + }, + { + "m_Id": "7802a5d4a56f4ec5aa4102c84c789b65" + }, + { + "m_Id": "647d1bffe5584ed1871477047f5ae889" + }, + { + "m_Id": "852bbc9178fe4d819f976ab80a0d4a3c" + }, + { + "m_Id": "429cf994a61b4915b0a34fd547f23370" + }, + { + "m_Id": "c3f4381605564b8bb0cc3445ae03c7b1" + }, + { + "m_Id": "5fbd8abb8cfb49fc8d944eb233fcdd37" + } + ], + "m_GroupDatas": [ + { + "m_Id": "0b12e9fc0b164611b7fa17e0c6955043" + } + ], + "m_StickyNoteDatas": [], + "m_Edges": [ + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "046853f212c34016b4d79091399be33a" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "6fb510b9ca124cf881fe849664df5924" + }, + "m_SlotId": 18 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "170e2545cc944659aa55e7eeb33298b1" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "a22b846424134313814bef43e40c5cb3" + }, + "m_SlotId": 12 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "2006e2e92edf4a748fc6cd3cc1a8bca5" + }, + "m_SlotId": 1 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "6fb510b9ca124cf881fe849664df5924" + }, + "m_SlotId": 15 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "406c1f6f5af140b99dc01fff3651340e" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "a22b846424134313814bef43e40c5cb3" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "4678beb45340481b97ab1e7d20b2f83a" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "6fb510b9ca124cf881fe849664df5924" + }, + "m_SlotId": 19 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "4c57f9182e154397bf38efa2af2224ef" + }, + "m_SlotId": 1 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "d22d7fde479b42818d46226e4fdf8fd2" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "4fa7283733c64318a6c32176ce80a2bc" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "6fb510b9ca124cf881fe849664df5924" + }, + "m_SlotId": 14 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "5fbd8abb8cfb49fc8d944eb233fcdd37" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "6fb510b9ca124cf881fe849664df5924" + }, + "m_SlotId": 23 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "606b9292242c4a2a9b060ca6caa06628" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "6fb510b9ca124cf881fe849664df5924" + }, + "m_SlotId": 17 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "6fb510b9ca124cf881fe849664df5924" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "3f561c9e6dff4963bd333d65a10e76bc" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "6fb510b9ca124cf881fe849664df5924" + }, + "m_SlotId": 1 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "2275b40e4a324efeace08a27b84ee3bf" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "6fb510b9ca124cf881fe849664df5924" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "2410a929cea74c53b00a0f819f5be0f9" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "6fb510b9ca124cf881fe849664df5924" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "8e8aee51883445f1b08bfbec696cb18d" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "6fb510b9ca124cf881fe849664df5924" + }, + "m_SlotId": 3 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "4bb923e45f9f48bab142707a3af6e4bd" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "6fb510b9ca124cf881fe849664df5924" + }, + "m_SlotId": 4 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "b7891fe7e5a34f03adebd8a45505c5fc" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "6fb510b9ca124cf881fe849664df5924" + }, + "m_SlotId": 5 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "e207931e020242bba83058a59f3fb07d" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "6fb510b9ca124cf881fe849664df5924" + }, + "m_SlotId": 6 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "01717f91918a4191a16ca9eb0a394f85" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "70391ba97bb44b55a04506b2aef83ade" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "6fb510b9ca124cf881fe849664df5924" + }, + "m_SlotId": 8 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "7b9e8caf91bb4d56b28c9420be41aa60" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "6fb510b9ca124cf881fe849664df5924" + }, + "m_SlotId": 10 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "840981f260e04e378944867968a40230" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "a22b846424134313814bef43e40c5cb3" + }, + "m_SlotId": 13 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "94663a98bbc145dba013a7c0d9301c85" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "6fb510b9ca124cf881fe849664df5924" + }, + "m_SlotId": 9 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "a22b846424134313814bef43e40c5cb3" + }, + "m_SlotId": 3 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "4c57f9182e154397bf38efa2af2224ef" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "a22b846424134313814bef43e40c5cb3" + }, + "m_SlotId": 6 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "088237a0a2ea4680b3ef33263034c583" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "a22b846424134313814bef43e40c5cb3" + }, + "m_SlotId": 7 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "0ce731b4d64244f499c8f8f3adac65db" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "a22b846424134313814bef43e40c5cb3" + }, + "m_SlotId": 8 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "f16010780e29425caac8bbcfaae9bde4" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "a22b846424134313814bef43e40c5cb3" + }, + "m_SlotId": 9 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "d6507a957f404764aa2670d0dc950578" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "a22b846424134313814bef43e40c5cb3" + }, + "m_SlotId": 11 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "8f7d3c6acd8c40a993fe189ad3b6e808" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "a6aefd808acc4136b14b84d9277addbd" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "6fb510b9ca124cf881fe849664df5924" + }, + "m_SlotId": 13 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "cc4998fd8e074695a09b766078550f62" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "a22b846424134313814bef43e40c5cb3" + }, + "m_SlotId": 14 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "d056d4d282b14a5b9a336e5561143c6a" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "6fb510b9ca124cf881fe849664df5924" + }, + "m_SlotId": 7 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "d3778e9c7b9a4c8098a0fba6b826b854" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "6fb510b9ca124cf881fe849664df5924" + }, + "m_SlotId": 12 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "f1091500a8a244058957bd706b5fd6e7" + }, + "m_SlotId": 1 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "6fb510b9ca124cf881fe849664df5924" + }, + "m_SlotId": 16 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "f8a8f45aa5dd42febd6bf935dae62d1c" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "6fb510b9ca124cf881fe849664df5924" + }, + "m_SlotId": 22 + } + } + ], + "m_VertexContext": { + "m_Position": { + "x": 2642.999755859375, + "y": -179.99996948242188 + }, + "m_Blocks": [ + { + "m_Id": "d22d7fde479b42818d46226e4fdf8fd2" + }, + { + "m_Id": "088237a0a2ea4680b3ef33263034c583" + }, + { + "m_Id": "0ce731b4d64244f499c8f8f3adac65db" + }, + { + "m_Id": "f16010780e29425caac8bbcfaae9bde4" + }, + { + "m_Id": "d6507a957f404764aa2670d0dc950578" + }, + { + "m_Id": "8f7d3c6acd8c40a993fe189ad3b6e808" + } + ] + }, + "m_FragmentContext": { + "m_Position": { + "x": 2642.6669921875, + "y": 727.3333740234375 + }, + "m_Blocks": [ + { + "m_Id": "3f561c9e6dff4963bd333d65a10e76bc" + }, + { + "m_Id": "2275b40e4a324efeace08a27b84ee3bf" + }, + { + "m_Id": "2410a929cea74c53b00a0f819f5be0f9" + }, + { + "m_Id": "4bb923e45f9f48bab142707a3af6e4bd" + }, + { + "m_Id": "8e8aee51883445f1b08bfbec696cb18d" + }, + { + "m_Id": "b7891fe7e5a34f03adebd8a45505c5fc" + }, + { + "m_Id": "e207931e020242bba83058a59f3fb07d" + }, + { + "m_Id": "01717f91918a4191a16ca9eb0a394f85" + }, + { + "m_Id": "641a42645cc2483bb33d553093357479" + }, + { + "m_Id": "7802a5d4a56f4ec5aa4102c84c789b65" + }, + { + "m_Id": "647d1bffe5584ed1871477047f5ae889" + }, + { + "m_Id": "852bbc9178fe4d819f976ab80a0d4a3c" + }, + { + "m_Id": "429cf994a61b4915b0a34fd547f23370" + }, + { + "m_Id": "c3f4381605564b8bb0cc3445ae03c7b1" + } + ] + }, + "m_PreviewData": { + "serializedMesh": { + "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", + "m_Guid": "" + }, + "preventRotation": false + }, + "m_Path": "Crest", + "m_GraphPrecision": 0, + "m_PreviewMode": 2, + "m_OutputNode": { + "m_Id": "" + }, + "m_SubDatas": [], + "m_ActiveTargets": [ + { + "m_Id": "b08214e872de4a3b82e77ece5ecb284d" + }, + { + "m_Id": "0f86b478c7b0468e8f20138835946bc9" + }, + { + "m_Id": "09d96e4ff0454961851197be0627117e" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "014708395fd3480aad2b5de738cb4d20", + "m_Id": 2, + "m_DisplayName": "World Bounds Min", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "World Bounds Min", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "01717f91918a4191a16ca9eb0a394f85", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Alpha", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "778d032f795249ef90f902e1feff0a56" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Alpha" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "023e0d861a9247689a2f5c3db679f5e3", + "m_Id": 6, + "m_DisplayName": "Width", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Width", + "m_StageCapability": 3, + "m_Value": 1.0, + "m_DefaultValue": 1.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "030e617918184625a9f533d1786f82cf", + "m_Id": 0, + "m_DisplayName": "Smoothness", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Smoothness", + "m_StageCapability": 2, + "m_Value": 0.800000011920929, + "m_DefaultValue": 0.5, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "0462d8e66f824b829a9cb6ba741ed13e", + "m_Id": 1, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.ScreenPositionNode", + "m_ObjectId": "046853f212c34016b4d79091399be33a", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Screen Position", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 1213.0001220703125, + "y": 1398.0001220703125, + "width": 144.9998779296875, + "height": 128.9998779296875 + } + }, + "m_Slots": [ + { + "m_Id": "c145f00f4fe840b49f120c0890188e8f" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_ScreenSpaceType": 1 +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "061da12cae33a388819d087995f680bf", + "m_Guid": { + "m_GuidSerialized": "b9f4d2ae-39c8-4f5c-9ded-da3cfa50a371" + }, + "m_Name": "Foam Albedo Intensity", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", + "m_DefaultReferenceName": "Vector1_CB513E94", + "m_OverrideReferenceName": "_Crest_FoamIntensityAlbedo", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 2, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 1.0, + "m_FloatType": 1, + "m_RangeValues": { + "x": 0.0, + "y": 3.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "07e7cb6fc0a64d58a86ea20335ce4ef5", + "m_Id": 4, + "m_DisplayName": "Bounds Size", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Bounds Size", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "088237a0a2ea4680b3ef33263034c583", + "m_Group": { + "m_Id": "" + }, + "m_Name": "VertexDescription.CustomInterpolator", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "9007c591a2e44c06bf6301a6752b966b" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Undisplaced_XZ#2" +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalTarget", + "m_ObjectId": "09d96e4ff0454961851197be0627117e", + "m_Datas": [], + "m_ActiveSubTarget": { + "m_Id": "a52dd0dd7c42405cabd2b96b877532a3" + }, + "m_AllowMaterialOverride": true, + "m_SurfaceType": 1, + "m_ZTestMode": 4, + "m_ZWriteControl": 1, + "m_AlphaMode": 0, + "m_RenderFace": 0, + "m_AlphaClip": true, + "m_CastShadows": false, + "m_ReceiveShadows": true, + "m_AdditionalMotionVectorMode": 1, + "m_SupportsLODCrossFade": false, + "m_CustomEditorGUI": "WaveHarmonic.Crest.Editor.UniversalWaterShaderGUI", + "m_SupportVFX": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.GroupData", + "m_ObjectId": "0b12e9fc0b164611b7fa17e0c6955043", + "m_Title": "Interpolators", + "m_Position": { + "x": 590.9999389648438, + "y": 208.5 + } +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "0b19ab8baeda8584a55a0631c4f4decc", + "m_Guid": { + "m_GuidSerialized": "9f82d9b0-2c02-4ed1-95a8-e8bac42aae51" + }, + "m_Name": "Caustics Distortion Strength", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", + "m_DefaultReferenceName": "Vector1_E24A4BDF", + "m_OverrideReferenceName": "_Crest_CausticsDistortionStrength", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 0.1599999964237213, + "m_FloatType": 1, + "m_RangeValues": { + "x": 0.0, + "y": 0.25 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", + "m_ObjectId": "0baa9d94a6294f619b49aa7151c9229a", + "m_Id": 0, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "0ce731b4d64244f499c8f8f3adac65db", + "m_Group": { + "m_Id": "" + }, + "m_Name": "VertexDescription.CustomInterpolator", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "4c6ac361550b49018d0cf20e95971e8f" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Lod_Alpha#1" +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "0d81099c729342968bf4ee002d378dcf", + "m_Guid": { + "m_GuidSerialized": "801d447a-fb21-40c1-8216-2b513df4d53e" + }, + "m_Name": "Planar Reflections Distortion", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Planar Reflections Distortion", + "m_DefaultReferenceName": "_Planar_Reflections_Distortion", + "m_OverrideReferenceName": "_Crest_PlanarReflectionsDistortion", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 1.0, + "m_FloatType": 1, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "0e5f52aeae1e218abfab5efa5841098c", + "m_Guid": { + "m_GuidSerialized": "8a177494-998a-440a-9748-db9944da8883" + }, + "m_Name": "Normal Map Strength", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", + "m_DefaultReferenceName": "Vector1_1AEB3981", + "m_OverrideReferenceName": "_Crest_NormalMapStrength", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 2, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 0.15000000596046449, + "m_FloatType": 1, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.HDTarget", + "m_ObjectId": "0f86b478c7b0468e8f20138835946bc9", + "m_ActiveSubTarget": { + "m_Id": "eea8298ecc6944318bd614020316fbf9" + }, + "m_Datas": [ + { + "m_Id": "cee72db709954dd38e8039e087fe5744" + }, + { + "m_Id": "276bf2c327c04ffcae08012d175d3554" + }, + { + "m_Id": "81a3aef8387044d2a3fbf24877b4f380" + }, + { + "m_Id": "4d02d98ad13c416c989fa4a1c65d2550" + } + ], + "m_CustomEditorGUI": "WaveHarmonic.Crest.Editor.HighDefinitionWaterShaderGUI", + "m_SupportVFX": false, + "m_SupportComputeForVertexSetup": false +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "14f5135a4bf8f5868cb55001b6472657", + "m_Guid": { + "m_GuidSerialized": "7b5348be-75e8-4aab-be4a-26da719c745e" + }, + "m_Name": "Refraction Strength", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", + "m_DefaultReferenceName": "Vector1_9F4B8948", + "m_OverrideReferenceName": "_Crest_RefractionStrength", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 2, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 1.0, + "m_FloatType": 1, + "m_RangeValues": { + "x": 0.0, + "y": 2.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.TimeNode", + "m_ObjectId": "170e2545cc944659aa55e7eeb33298b1", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Time", + "m_DrawState": { + "m_Expanded": false, + "m_Position": { + "serializedVersion": "2", + "x": 1373.0, + "y": 204.00001525878907, + "width": 79.0, + "height": 76.00004577636719 + } + }, + "m_Slots": [ + { + "m_Id": "4f34b324cb0c498fb1677432e5e6206e" + }, + { + "m_Id": "d184a57774014d1b93bf49daab22b439" + }, + { + "m_Id": "93c5051a05a94644b9bbf2bf2e90e741" + }, + { + "m_Id": "67fde13c8cfe41bb85c0697389bc1ac6" + }, + { + "m_Id": "7146dc6dffb44d189b52337223b743ab" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "19028599facd4389b224b68d388b6d73", + "m_Id": 19, + "m_DisplayName": "Position_VS", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Position_VS", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CategoryData", + "m_ObjectId": "1920b69a79204a50b7ca9f87f80ef449", + "m_Name": "Shadows", + "m_ChildObjectList": [ + { + "m_Id": "524d5e06f6474217aa1f93ce3139d36b" + }, + { + "m_Id": "d347a12dc40b4875b10257a32f31301c" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CategoryData", + "m_ObjectId": "1acefc13e64f4bbfbf2ffbb48d713165", + "m_Name": "Volume Lighting", + "m_ChildObjectList": [ + { + "m_Id": "a591f22444f34efc876bf557bb9ebd1f" + }, + { + "m_Id": "994e8f13c14f6c80985a81bc860d6550" + }, + { + "m_Id": "27c63605cb7d41ceb669eccab82f3416" + }, + { + "m_Id": "973fda11195c4260a5bee711dca38ccf" + }, + { + "m_Id": "a64036ce5dde44bf8d55a5caf75668f5" + }, + { + "m_Id": "ac20e42c0c5f4e60872782a3b5cb4aac" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot", + "m_ObjectId": "1b1405f06e5d4657961e7a0cb5dbc6da", + "m_Id": 0, + "m_DisplayName": "Base Color", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "BaseColor", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_ColorMode": 0, + "m_DefaultColor": { + "r": 0.5, + "g": 0.5, + "b": 0.5, + "a": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "1bbc9f63da2843b9b22e44979b6c248d", + "m_Id": 0, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CategoryData", + "m_ObjectId": "1d88e2d02e6f45ddbf89f1131a617042", + "m_Name": "Flow", + "m_ChildObjectList": [ + { + "m_Id": "b91141f3e4cf4131ab732e6ae5828231" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SceneColorNode", + "m_ObjectId": "2006e2e92edf4a748fc6cd3cc1a8bca5", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Scene Color", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 1220.0, + "y": 1080.0001220703125, + "width": 138.0, + "height": 76.9998779296875 + } + }, + "m_Slots": [ + { + "m_Id": "d89ecf302f85402382c31ff6408de83a" + }, + { + "m_Id": "595de3422e1244f6b19243da3fa1b077" + } + ], + "synonyms": [ + "screen buffer" + ], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "21db17a76f094b19ba523148b6f7aa41", + "m_Guid": { + "m_GuidSerialized": "6802dca7-07d1-43da-94d8-846799a04fdb" + }, + "m_Name": "Occlusion (U)", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Occlusion (U)", + "m_DefaultReferenceName": "_Occlusion_U", + "m_OverrideReferenceName": "_Crest_OcclusionUnderwater", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 0.0, + "m_FloatType": 1, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "2275b40e4a324efeace08a27b84ee3bf", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.NormalWS", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 2640.0, + "y": 785.0000610351563, + "width": 200.0, + "height": 41.0 + } + }, + "m_Slots": [ + { + "m_Id": "e9abf5f3e2204dec98991b9ac5698855" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.NormalWS" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "2410a929cea74c53b00a0f819f5be0f9", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Specular", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "91363cf6c6b44054997f3e0b5549ed73" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Specular" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "2578b8f9b3fa4b19ac471501136576e4", + "m_Id": 0, + "m_DisplayName": "Position", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Position", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "25f5ad60e93046fdaaf419e16de106ee", + "m_Id": 3, + "m_DisplayName": "World Bounds Max", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "World Bounds Max", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.BuiltinData", + "m_ObjectId": "276bf2c327c04ffcae08012d175d3554", + "m_Distortion": false, + "m_DistortionMode": 0, + "m_DistortionDepthTest": true, + "m_AddPrecomputedVelocity": false, + "m_TransparentWritesMotionVec": true, + "m_DepthOffset": false, + "m_ConservativeDepthOffset": false, + "m_TransparencyFog": true, + "m_AlphaTestShadow": false, + "m_BackThenFrontRendering": false, + "m_TransparentDepthPrepass": false, + "m_TransparentDepthPostpass": false, + "m_SupportLodCrossFade": false +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "27c63605cb7d41ceb669eccab82f3416", + "m_Guid": { + "m_GuidSerialized": "fc4e5947-f45f-401e-8dd2-672680452439" + }, + "m_Name": "Anisotropy", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Anisotropy", + "m_DefaultReferenceName": "_Anisotropy", + "m_OverrideReferenceName": "_Crest_Anisotropy", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 0.5, + "m_FloatType": 1, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", + "m_ObjectId": "2b33bfcf12bd4deca2a09ca1fa4a583c", + "m_Id": 0, + "m_DisplayName": "Water_Level_Derivatives", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Water_Level_Derivatives", + "m_StageCapability": 1, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "2b7848993646568dbe1e87b356d4e19b", + "m_Guid": { + "m_GuidSerialized": "6098ab6c-ff2b-42a1-a952-aa9ee9921591" + }, + "m_Name": "Caustics Strength", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", + "m_DefaultReferenceName": "Vector1_2F84D846", + "m_OverrideReferenceName": "_Crest_CausticsStrength", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 3.200000047683716, + "m_FloatType": 1, + "m_RangeValues": { + "x": 0.0, + "y": 10.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", + "m_ObjectId": "2bc9e62b42574b07847aba9250b1660a", + "m_Id": 0, + "m_DisplayName": "Flow", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Flow", + "m_StageCapability": 1, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "2d31998b356d41179aa5291dcedc7850", + "m_Guid": { + "m_GuidSerialized": "b9c23c72-2bc3-44f3-a9d3-0264a1957f4f" + }, + "m_Name": "Planar Reflections Intensity", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Planar Reflections Intensity", + "m_DefaultReferenceName": "_Planar_Reflections_Intensity", + "m_OverrideReferenceName": "_Crest_PlanarReflectionsIntensity", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 1.0, + "m_FloatType": 1, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "3096e39a5605958497b1d3d3fac8ded2", + "m_Guid": { + "m_GuidSerialized": "964dc714-8be0-4804-8e56-c6541274d728" + }, + "m_Name": "Caustics Distortion Scale", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", + "m_DefaultReferenceName": "Vector1_F6A28245", + "m_OverrideReferenceName": "_Crest_CausticsDistortionScale", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 250.0, + "m_FloatType": 1, + "m_RangeValues": { + "x": 0.009999999776482582, + "y": 1000.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CategoryData", + "m_ObjectId": "330cb63ecb704ddebac4935cb0b85ab7", + "m_Name": "Refraction", + "m_ChildObjectList": [ + { + "m_Id": "14f5135a4bf8f5868cb55001b6472657" + }, + { + "m_Id": "bbd2579dfd7f38879fab18706b09b5fb" + }, + { + "m_Id": "d33c23a144f9400888ebc0b17741ceea" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", + "m_ObjectId": "3682a58d283c445db8c7cb725e7e7812", + "m_Id": 7, + "m_DisplayName": "Undisplaced_XZ", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Undisplaced_XZ", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "39a98ff13e9649f997d7d1532c218637", + "m_Id": 0, + "m_DisplayName": "Alpha Clip Threshold", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "AlphaClipThreshold", + "m_StageCapability": 2, + "m_Value": 0.00009999999747378752, + "m_DefaultValue": 0.5, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CategoryData", + "m_ObjectId": "39bdc7581dce44f5a9d59072bb141cb1", + "m_Name": "Normals", + "m_ChildObjectList": [ + { + "m_Id": "4f69e9e4f638098994f0c45329a5d585" + }, + { + "m_Id": "f00a6ef3872645488e79e89c6ac1845e" + }, + { + "m_Id": "5cd3653818bf0483aba63838ff94db1e" + }, + { + "m_Id": "0e5f52aeae1e218abfab5efa5841098c" + }, + { + "m_Id": "ff8bcce5ee09228abb73bf677fa20052" + }, + { + "m_Id": "e608dd8f43794f5d8b3995446b21467f" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "3b4e99d0926f487682f11375ff6a57bd", + "m_Id": 3, + "m_DisplayName": "o_Position", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "o_Position", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "3b6b9f9fc3614e43a2cd513af66b9fc5", + "m_Guid": { + "m_GuidSerialized": "9abe19ba-2b9e-4d71-aec8-518850d0bd5d" + }, + "m_Name": "Version", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Version", + "m_DefaultReferenceName": "_Version", + "m_OverrideReferenceName": "_Crest_Version", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 1, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 0.0, + "m_FloatType": 2, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", + "m_ObjectId": "3efd227739f54e0e8ad0e727e8fff52e", + "m_Id": 9, + "m_DisplayName": "Water_Level_Derivatives", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Water_Level_Derivatives", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "3f4e0cb256fa4debab17315679346334", + "m_Id": 15, + "m_DisplayName": "Scene_Color", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Scene_Color", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "3f561c9e6dff4963bd333d65a10e76bc", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.BaseColor", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "1b1405f06e5d4657961e7a0cb5dbc6da" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.BaseColor" +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.PositionNode", + "m_ObjectId": "406c1f6f5af140b99dc01fff3651340e", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Position", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 1246.0, + "y": -80.99993133544922, + "width": 206.0, + "height": 131.00001525878907 + } + }, + "m_Slots": [ + { + "m_Id": "d741ef18d57845e59b9e6d6ebeb72dec" + } + ], + "synonyms": [ + "location" + ], + "m_Precision": 1, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 2, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Space": 4, + "m_PositionSource": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "429cf994a61b4915b0a34fd547f23370", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.RefractionDistance", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "d32e3256b70746c094ee8fa4f441ad01" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.RefractionDistance" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "42af552c56814415adaf3f442e76a8f3", + "m_Id": 2, + "m_DisplayName": "Orthographic", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Orthographic", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", + "m_ObjectId": "45e01376beba4378949c16fb68aeda17", + "m_Id": 11, + "m_DisplayName": "Flow", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Flow", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.PositionNode", + "m_ObjectId": "4678beb45340481b97ab1e7d20b2f83a", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Position", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 1152.0001220703125, + "y": 1658.0001220703125, + "width": 205.9998779296875, + "height": 130.9998779296875 + } + }, + "m_Slots": [ + { + "m_Id": "882dadfb4b104b03ab629981e3b4528d" + } + ], + "synonyms": [ + "location" + ], + "m_Precision": 1, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 2, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Space": 1, + "m_PositionSource": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "486351168fc04951b80963ed0d2e51df", + "m_Id": 17, + "m_DisplayName": "Screen_Position", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Screen_Position", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", + "m_ObjectId": "48a91eeecdab4809acc394137a57a47a", + "m_Id": 12, + "m_DisplayName": "Flow", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Flow", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "4a3c770430d2578aaf28126d16b17016", + "m_Guid": { + "m_GuidSerialized": "ffa8bff1-966c-46dc-935f-12e73a44429b" + }, + "m_Name": "Foam Smoothness", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", + "m_DefaultReferenceName": "Vector1_66FBE93", + "m_OverrideReferenceName": "_Crest_FoamSmoothness", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 2, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 0.699999988079071, + "m_FloatType": 1, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty", + "m_ObjectId": "4b09daebd022cf89bc77ad473c95586c", + "m_Guid": { + "m_GuidSerialized": "a6a965c5-9ecc-4726-95e5-33dd6a052922" + }, + "m_Name": "Caustics Distortion Texture", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", + "m_DefaultReferenceName": "Texture2D_880763AD", + "m_OverrideReferenceName": "_Crest_CausticsDistortionTexture", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"7aa3f69cfb40b429a865c45a7271c5f5\",\"type\":3}}", + "m_Guid": "" + }, + "isMainTexture": false, + "useTilingAndOffset": false, + "m_Modifiable": true, + "m_DefaultType": 2 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "4bb923e45f9f48bab142707a3af6e4bd", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Emission", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "eba256bd9199402fb1791e8f894b5e8f" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Emission" +} + +{ + "m_SGVersion": 2, + "m_Type": "UnityEditor.ShaderGraph.TransformNode", + "m_ObjectId": "4c57f9182e154397bf38efa2af2224ef", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Transform", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 2088.0, + "y": -237.99993896484376, + "width": 211.0, + "height": 157.0 + } + }, + "m_Slots": [ + { + "m_Id": "bb078b3adb574ec18c0f7d0a0a94a72b" + }, + { + "m_Id": "fc68a5e215ec419dab8e51a54c9f195c" + } + ], + "synonyms": [ + "world", + "tangent", + "object", + "view", + "screen", + "convert" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Conversion": { + "from": 4, + "to": 0 + }, + "m_ConversionType": 0, + "m_Normalize": true +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "4c6ac361550b49018d0cf20e95971e8f", + "m_Id": 0, + "m_DisplayName": "Lod_Alpha", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Lod_Alpha", + "m_StageCapability": 1, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.SystemData", + "m_ObjectId": "4d02d98ad13c416c989fa4a1c65d2550", + "m_MaterialNeedsUpdateHash": 279864, + "m_SurfaceType": 1, + "m_RenderingPass": 4, + "m_BlendMode": 0, + "m_ZTest": 4, + "m_ZWrite": true, + "m_TransparentCullMode": 2, + "m_OpaqueCullMode": 2, + "m_SortPriority": -1, + "m_AlphaTest": true, + "m_ExcludeFromTUAndAA": false, + "m_TransparentDepthPrepass": false, + "m_TransparentDepthPostpass": false, + "m_SupportLodCrossFade": false, + "m_DoubleSidedMode": 1, + "m_DOTSInstancing": false, + "m_CustomVelocity": false, + "m_Tessellation": false, + "m_TessellationMode": 0, + "m_TessellationFactorMinDistance": 20.0, + "m_TessellationFactorMaxDistance": 50.0, + "m_TessellationFactorTriangleSize": 100.0, + "m_TessellationShapeFactor": 0.75, + "m_TessellationBackFaceCullEpsilon": -0.25, + "m_TessellationMaxDisplacement": 0.009999999776482582, + "m_Version": 1, + "inspectorFoldoutMask": 11 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot", + "m_ObjectId": "4e2ff019a3b64772a3ae2b1e6ab7a900", + "m_Id": 0, + "m_DisplayName": "Transmittance Color", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "RefractionColor", + "m_StageCapability": 2, + "m_Value": { + "x": 1.0, + "y": 1.0, + "z": 1.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_ColorMode": 0, + "m_DefaultColor": { + "r": 1.0, + "g": 1.0, + "b": 1.0, + "a": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "4f34b324cb0c498fb1677432e5e6206e", + "m_Id": 0, + "m_DisplayName": "Time", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Time", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "4f69e9e4f638098994f0c45329a5d585", + "m_Guid": { + "m_GuidSerialized": "26cd766e-f6cc-472e-b906-074f02cb58ad" + }, + "m_Name": "Normal Strength", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", + "m_DefaultReferenceName": "Vector1_D531AD17", + "m_OverrideReferenceName": "_Crest_NormalsStrengthOverall", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 1.0, + "m_FloatType": 1, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", + "m_ObjectId": "4f9c60ee0f3e4c42ac334922e9640127", + "m_Id": 0, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "4f9dca6e8a1d46028cb365c95a259fc2", + "m_Id": 2, + "m_DisplayName": "o_Specular", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "o_Specular", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.IsFrontFaceNode", + "m_ObjectId": "4fa7283733c64318a6c32176ce80a2bc", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Is Front Face", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 1238.0, + "y": 1003.0, + "width": 120.0, + "height": 77.0001220703125 + } + }, + "m_Slots": [ + { + "m_Id": "dd2364c2819e440281a8d86cde9bcba5" + } + ], + "synonyms": [ + "face", + "side" + ], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "503219cfdffc43b38928577e580c684b", + "m_Id": 8, + "m_DisplayName": "Water_Level_Offset", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Water_Level_Offset", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.BooleanShaderProperty", + "m_ObjectId": "524d5e06f6474217aa1f93ce3139d36b", + "m_Guid": { + "m_GuidSerialized": "52c7d757-c039-4dc9-b7a3-26eaf8b7f7f6" + }, + "m_Name": "Shadows Enabled", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Shadows Enabled", + "m_DefaultReferenceName": "_Shadows_Enabled", + "m_OverrideReferenceName": "_Crest_ShadowsEnabled", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": true +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "538cf5cf053d448e9eda5626daa46d9d", + "m_Id": 1, + "m_DisplayName": "Scale", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Scale", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "55d3ff7ea5e4413391fbe56ff4b9fd79", + "m_Id": 0, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "5816484918bf42bdbd9a73f0cbaebaf3", + "m_Id": 13, + "m_DisplayName": "View_Direction", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "View_Direction", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "595de3422e1244f6b19243da3fa1b077", + "m_Id": 1, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "5a4a6e350ff4411097da39c02f42957c", + "m_Id": 0, + "m_DisplayName": "Position", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Position", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "5af4fab89c55486e8ec4914978d76006", + "m_Guid": { + "m_GuidSerialized": "f4540086-b571-4748-b063-2f62067e587d" + }, + "m_Name": "Caustics Scroll Speed", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Caustics Scroll Speed", + "m_DefaultReferenceName": "_Caustics_Scroll_Speed", + "m_OverrideReferenceName": "_Crest_CausticsScrollSpeed", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 2, + "m_Hidden": false, + "m_Value": 1.0, + "m_FloatType": 1, + "m_RangeValues": { + "x": 0.0, + "y": 10.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "5babb0a0d0f040b6a2999f218d03511c", + "m_Id": 4, + "m_DisplayName": "o_Smoothness", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "o_Smoothness", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "5be08bf11b86490289f2507512b15874", + "m_Id": 0, + "m_DisplayName": "o_Color", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "o_Color", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.BooleanShaderProperty", + "m_ObjectId": "5c5b9e2a267d466ea6353121d9e12662", + "m_Guid": { + "m_GuidSerialized": "a59f9e2c-d4b7-44f2-8c23-5c131982bfcc" + }, + "m_Name": "Foam Enabled", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Foam Enabled", + "m_DefaultReferenceName": "_Foam_Enabled", + "m_OverrideReferenceName": "_Crest_FoamEnabled", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": true +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty", + "m_ObjectId": "5cd3653818bf0483aba63838ff94db1e", + "m_Guid": { + "m_GuidSerialized": "f6647a86-8695-4c4f-9eeb-d55166d20a99" + }, + "m_Name": "Normal Map", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", + "m_DefaultReferenceName": "Texture2D_406152FF", + "m_OverrideReferenceName": "_Crest_NormalMapTexture", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"7aa3f69cfb40b429a865c45a7271c5f5\",\"type\":3}}", + "m_Guid": "" + }, + "isMainTexture": false, + "useTilingAndOffset": false, + "m_Modifiable": true, + "m_DefaultType": 3 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "5e12f24b0f7c4d378cea72abc720df26", + "m_Id": 0, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.UVNode", + "m_ObjectId": "5fbd8abb8cfb49fc8d944eb233fcdd37", + "m_Group": { + "m_Id": "" + }, + "m_Name": "UV", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 1213.0001220703125, + "y": 1789.0, + "width": 144.9998779296875, + "height": 129.000244140625 + } + }, + "m_Slots": [ + { + "m_Id": "1bbc9f63da2843b9b22e44979b6c248d" + } + ], + "synonyms": [ + "texcoords", + "coords", + "coordinates" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_OutputChannel": 1 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.ScreenPositionNode", + "m_ObjectId": "606b9292242c4a2a9b060ca6caa06628", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Screen Position", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 1213.0001220703125, + "y": 1269.0, + "width": 144.9998779296875, + "height": 129.0001220703125 + } + }, + "m_Slots": [ + { + "m_Id": "6a02b66230f84bfca4d0b33460b2f338" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_ScreenSpaceType": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.ScreenPositionMaterialSlot", + "m_ObjectId": "62352145719941a3ab393292aab906fd", + "m_Id": 0, + "m_DisplayName": "UV", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "UV", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [], + "m_ScreenSpaceType": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", + "m_ObjectId": "63a4841ac2f94a8185e95772cfe193c8", + "m_Id": 10, + "m_DisplayName": "Water_Level_Derivatives", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Water_Level_Derivatives", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "641a42645cc2483bb33d553093357479", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.AlphaClipThreshold", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "39a98ff13e9649f997d7d1532c218637" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.AlphaClipThreshold" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "647d1bffe5584ed1871477047f5ae889", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.RefractionIndex", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "ac72e84550f64ff7bba0fdec760e9ac8" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.RefractionIndex" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "67f656c3174f49288d9d8b8af7c19143", + "m_Id": 0, + "m_DisplayName": "Water_Level_Offset", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Water_Level_Offset", + "m_StageCapability": 1, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "67fde13c8cfe41bb85c0697389bc1ac6", + "m_Id": 3, + "m_DisplayName": "Delta Time", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Delta Time", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "6944d0d08aa242f38d21b3ff8a19d7a0", + "m_Id": 0, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "6a02b66230f84bfca4d0b33460b2f338", + "m_Id": 0, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "6f4f3ecc7e7d4d83ab0176010684a61e", + "m_Guid": { + "m_GuidSerialized": "303e4d1f-363e-40a4-bb34-a728bab71d22" + }, + "m_Name": "Specular", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", + "m_DefaultReferenceName": "Vector1_19186AF2", + "m_OverrideReferenceName": "_Crest_Specular", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 0.25, + "m_FloatType": 1, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.CustomFunctionNode", + "m_ObjectId": "6fb510b9ca124cf881fe849664df5924", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Fragment (Custom Function)", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 1689.0, + "y": 727.0000610351563, + "width": 305.0001220703125, + "height": 429.99993896484377 + } + }, + "m_Slots": [ + { + "m_Id": "3682a58d283c445db8c7cb725e7e7812" + }, + { + "m_Id": "b674b64ba77748a1a1ab3cf388aa1232" + }, + { + "m_Id": "de2797e54cc7464ea2e88533681e7485" + }, + { + "m_Id": "63a4841ac2f94a8185e95772cfe193c8" + }, + { + "m_Id": "48a91eeecdab4809acc394137a57a47a" + }, + { + "m_Id": "5816484918bf42bdbd9a73f0cbaebaf3" + }, + { + "m_Id": "d78925eabe5948b98e661f7eeba64a4e" + }, + { + "m_Id": "3f4e0cb256fa4debab17315679346334" + }, + { + "m_Id": "82e9b6c3d9dc4782957d60c8d09119cd" + }, + { + "m_Id": "486351168fc04951b80963ed0d2e51df" + }, + { + "m_Id": "eda23d92596c4c3e93952a590edf7bfc" + }, + { + "m_Id": "ad86ac4b1c7d4f998c9e2b44c9950af2" + }, + { + "m_Id": "19028599facd4389b224b68d388b6d73" + }, + { + "m_Id": "aa6aadfb2101446cabb0da2a6c68ead3" + }, + { + "m_Id": "5be08bf11b86490289f2507512b15874" + }, + { + "m_Id": "813ea711c89d4b43803d90b274b12e8f" + }, + { + "m_Id": "4f9dca6e8a1d46028cb365c95a259fc2" + }, + { + "m_Id": "8cd7130e53ca418f98027d1a6ec5db0d" + }, + { + "m_Id": "5babb0a0d0f040b6a2999f218d03511c" + }, + { + "m_Id": "8208cb1830d44c9abea8e785ec4187da" + }, + { + "m_Id": "e1cad9f1cf9b489c9cac9fa804c1b5aa" + } + ], + "synonyms": [ + "code", + "HLSL" + ], + "m_Precision": 1, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SourceType": 0, + "m_FunctionName": "Fragment", + "m_FunctionSource": "fdafd40ae20374db88e293739fad1854", + "m_FunctionBody": "Enter function body here..." +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CustomInterpolatorNode", + "m_ObjectId": "70391ba97bb44b55a04506b2aef83ade", + "m_Group": { + "m_Id": "0b12e9fc0b164611b7fa17e0c6955043" + }, + "m_Name": "Lod_Alpha (Custom Interpolator)", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 696.0000610351563, + "y": 361.0000305175781, + "width": 231.0, + "height": 94.00003051757813 + } + }, + "m_Slots": [ + { + "m_Id": "55d3ff7ea5e4413391fbe56ff4b9fd79" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "customBlockNodeName": "Lod_Alpha", + "serializedType": 1 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "7146dc6dffb44d189b52337223b743ab", + "m_Id": 4, + "m_DisplayName": "Smooth Delta", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Smooth Delta", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "71f6994de656018baa684da1128e623c", + "m_Guid": { + "m_GuidSerialized": "28b5222c-b528-494b-848d-baa890376b5b" + }, + "m_Name": "Minimum Reflection Direction Y", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", + "m_DefaultReferenceName": "Vector1_5221D8E5", + "m_OverrideReferenceName": "_Crest_MinimumReflectionDirectionY", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 0.0, + "m_FloatType": 1, + "m_RangeValues": { + "x": -1.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.BooleanShaderProperty", + "m_ObjectId": "723dc6aba75e40dcbe7ee413e905c51a", + "m_Guid": { + "m_GuidSerialized": "db915810-9e09-4bd6-958c-6b0debb701a7" + }, + "m_Name": "SSS Enabled", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "SSS Enabled", + "m_DefaultReferenceName": "_SSS_Enabled", + "m_OverrideReferenceName": "_Crest_SSSEnabled", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "75e4730fc7a040cfa3b993329bc76d87", + "m_Id": 3, + "m_DisplayName": "Near Plane", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Near Plane", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CategoryData", + "m_ObjectId": "76a4c02b522d4e1d84eca095e84b1f30", + "m_Name": "Caustics", + "m_ChildObjectList": [ + { + "m_Id": "bd96da68193149a4a37e60284d87b160" + }, + { + "m_Id": "a1b2f9dc07dc18858f11fd5ff20187d8" + }, + { + "m_Id": "2b7848993646568dbe1e87b356d4e19b" + }, + { + "m_Id": "fba39aeafd5aed838e2205e938a89b91" + }, + { + "m_Id": "5af4fab89c55486e8ec4914978d76006" + }, + { + "m_Id": "87bec886e74d0b818024ab60ee3f8d88" + }, + { + "m_Id": "f75baf34d9f28a80a10af59ed35841c5" + }, + { + "m_Id": "91e9a577d315a3848dfb1f48a6743f9c" + }, + { + "m_Id": "4b09daebd022cf89bc77ad473c95586c" + }, + { + "m_Id": "0b19ab8baeda8584a55a0631c4f4decc" + }, + { + "m_Id": "3096e39a5605958497b1d3d3fac8ded2" + }, + { + "m_Id": "855a78e097d54640b5bbc53c3f227524" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CategoryData", + "m_ObjectId": "76dfbf9d02da4e2b9a7cffa11a17b81d", + "m_Name": "Foam", + "m_ChildObjectList": [ + { + "m_Id": "5c5b9e2a267d466ea6353121d9e12662" + }, + { + "m_Id": "a11232afc69f728f9691066ce697feee" + }, + { + "m_Id": "d03d9fc3ce7b4a8f939cf6a6a147257e" + }, + { + "m_Id": "e4a54526c6204b5badd66e158dcf0b1d" + }, + { + "m_Id": "bfe5cf33a577b383b757f8332383b77d" + }, + { + "m_Id": "061da12cae33a388819d087995f680bf" + }, + { + "m_Id": "4a3c770430d2578aaf28126d16b17016" + }, + { + "m_Id": "a141f53b584cb28fb6292eb41f81614b" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "778d032f795249ef90f902e1feff0a56", + "m_Id": 0, + "m_DisplayName": "Alpha", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Alpha", + "m_StageCapability": 2, + "m_Value": 1.0, + "m_DefaultValue": 1.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "77f30e5b61ae46c19146e7c270fa7aa8", + "m_Id": 5, + "m_DisplayName": "Z Buffer Sign", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Z Buffer Sign", + "m_StageCapability": 3, + "m_Value": 1.0, + "m_DefaultValue": 1.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "7802a5d4a56f4ec5aa4102c84c789b65", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.BentNormal", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "7831a4522284465a9c1d357307054c91" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.BentNormal" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot", + "m_ObjectId": "7831a4522284465a9c1d357307054c91", + "m_Id": 0, + "m_DisplayName": "Bent Normal", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "BentNormal", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 3 +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "7b2f0f23d232ab88bcacd3e88392015a", + "m_Guid": { + "m_GuidSerialized": "ba44782a-44ff-4282-b3a8-11d566d69e7b" + }, + "m_Name": "Smoothness", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", + "m_DefaultReferenceName": "Vector1_CCA62AB", + "m_OverrideReferenceName": "_Crest_Smoothness", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 2, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 0.8999999761581421, + "m_FloatType": 1, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CustomInterpolatorNode", + "m_ObjectId": "7b9e8caf91bb4d56b28c9420be41aa60", + "m_Group": { + "m_Id": "0b12e9fc0b164611b7fa17e0c6955043" + }, + "m_Name": "Water_Level_Derivatives (Custom Interpolator)", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 616.0, + "y": 549.0000610351563, + "width": 311.00006103515627, + "height": 93.99993896484375 + } + }, + "m_Slots": [ + { + "m_Id": "b0622d58143646b4bd6c849858bac981" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "customBlockNodeName": "Water_Level_Derivatives", + "serializedType": 2 +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "7bd38e1a9e3f978aa6c1746701bf789b", + "m_Guid": { + "m_GuidSerialized": "c08ba69e-bc65-44d5-baf2-4731fb94240f" + }, + "m_Name": "Smoothness Far", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", + "m_DefaultReferenceName": "Vector1_BB3F00BF", + "m_OverrideReferenceName": "_Crest_SmoothnessFar", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 0.4000000059604645, + "m_FloatType": 1, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CategoryData", + "m_ObjectId": "7c52172b64174c238d63df6a6ea01f69", + "m_Name": "Subsurface Scatttering", + "m_ChildObjectList": [ + { + "m_Id": "723dc6aba75e40dcbe7ee413e905c51a" + }, + { + "m_Id": "c9e151d906b14205b3c0d9b6d5561067" + }, + { + "m_Id": "aa43a0a61bb9443ea398c342f79765a9" + }, + { + "m_Id": "d3e20a560cd246c5966f967e53903833" + }, + { + "m_Id": "b46c0ecc382d4777a4364feb0e0f8b70" + }, + { + "m_Id": "86d9bc7bf9c2470ebe124428be6585d1" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "813ea711c89d4b43803d90b274b12e8f", + "m_Id": 1, + "m_DisplayName": "o_Normal", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "o_Normal", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.LightingData", + "m_ObjectId": "81a3aef8387044d2a3fbf24877b4f380", + "m_NormalDropOffSpace": 2, + "m_BlendPreserveSpecular": false, + "m_ReceiveDecals": true, + "m_ReceiveSSR": true, + "m_ReceiveSSRTransparent": true, + "m_SpecularAA": false, + "m_SpecularOcclusionMode": 1, + "m_OverrideBakedGI": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "8208cb1830d44c9abea8e785ec4187da", + "m_Id": 5, + "m_DisplayName": "o_Occlusion", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "o_Occlusion", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "82e9b6c3d9dc4782957d60c8d09119cd", + "m_Id": 16, + "m_DisplayName": "Scene_Depth", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Scene_Depth", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CameraNode", + "m_ObjectId": "840981f260e04e378944867968a40230", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Camera", + "m_DrawState": { + "m_Expanded": false, + "m_Position": { + "serializedVersion": "2", + "x": 1355.0001220703125, + "y": 127.0000991821289, + "width": 96.9998779296875, + "height": 75.99993133544922 + } + }, + "m_Slots": [ + { + "m_Id": "9a2c0b6a5c604924b1d37e4fa221e032" + }, + { + "m_Id": "e5d7d621e53a44598747bb25ccf0dca5" + }, + { + "m_Id": "42af552c56814415adaf3f442e76a8f3" + }, + { + "m_Id": "75e4730fc7a040cfa3b993329bc76d87" + }, + { + "m_Id": "da377bcf5895426f889bf7f43fea086c" + }, + { + "m_Id": "77f30e5b61ae46c19146e7c270fa7aa8" + }, + { + "m_Id": "023e0d861a9247689a2f5c3db679f5e3" + }, + { + "m_Id": "c8d4b557497248afaf7f293a36ade324" + } + ], + "synonyms": [ + "position", + "direction", + "orthographic", + "near plane", + "far plane", + "width", + "height" + ], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "852bbc9178fe4d819f976ab80a0d4a3c", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.RefractionColor", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "4e2ff019a3b64772a3ae2b1e6ab7a900" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.RefractionColor" +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "855a78e097d54640b5bbc53c3f227524", + "m_Guid": { + "m_GuidSerialized": "30aadd1a-9dd7-4eab-a347-266b840f67b4" + }, + "m_Name": "Caustics Motion Blur", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Caustics Motion Blur", + "m_DefaultReferenceName": "_Caustics_Motion_Blur", + "m_OverrideReferenceName": "_Crest_CausticsMotionBlur", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 1.0, + "m_FloatType": 1, + "m_RangeValues": { + "x": 0.0, + "y": 10.0 + } +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "86d9bc7bf9c2470ebe124428be6585d1", + "m_Guid": { + "m_GuidSerialized": "d79f410d-74ce-42a7-96be-831f91f5aa72" + }, + "m_Name": "SSS Directional Falloff", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "SSS Directional Falloff", + "m_DefaultReferenceName": "_SSS_Directional_Falloff", + "m_OverrideReferenceName": "_Crest_SSSDirectionalFalloff", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 2.0, + "m_FloatType": 1, + "m_RangeValues": { + "x": 0.5, + "y": 8.0 + } +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "8741edca0fbbee8a8999dd01e18125ee", + "m_Guid": { + "m_GuidSerialized": "440cd98b-3e75-4638-8fbe-256c224bbdac" + }, + "m_Name": "Smoothness Far Distance", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", + "m_DefaultReferenceName": "Vector1_668538DC", + "m_OverrideReferenceName": "_Crest_SmoothnessFarDistance", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 4000.0, + "m_FloatType": 1, + "m_RangeValues": { + "x": 1.0, + "y": 8000.0 + } +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "87bec886e74d0b818024ab60ee3f8d88", + "m_Guid": { + "m_GuidSerialized": "e6bc08dc-640b-44f8-8250-ef8357a9c3bb" + }, + "m_Name": "Caustics Grey Point", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", + "m_DefaultReferenceName": "Vector1_D144C4E1", + "m_OverrideReferenceName": "_Crest_CausticsTextureAverage", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 0.07000000029802323, + "m_FloatType": 1, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "882dadfb4b104b03ab629981e3b4528d", + "m_Id": 0, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "8cd7130e53ca418f98027d1a6ec5db0d", + "m_Id": 3, + "m_DisplayName": "o_Emission", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "o_Emission", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "8e8aee51883445f1b08bfbec696cb18d", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Metallic", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 2691.999755859375, + "y": 871.9999389648438, + "width": 200.000244140625, + "height": 41.0 + } + }, + "m_Slots": [ + { + "m_Id": "a82fc9659a8640bf860e2051118ded81" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Metallic" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "8f7d3c6acd8c40a993fe189ad3b6e808", + "m_Group": { + "m_Id": "" + }, + "m_Name": "VertexDescription.CustomInterpolator", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "2bc9e62b42574b07847aba9250b1660a" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Flow#2" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", + "m_ObjectId": "9007c591a2e44c06bf6301a6752b966b", + "m_Id": 0, + "m_DisplayName": "Undisplaced_XZ", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Undisplaced_XZ", + "m_StageCapability": 1, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot", + "m_ObjectId": "91363cf6c6b44054997f3e0b5549ed73", + "m_Id": 0, + "m_DisplayName": "Specular Color", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Specular", + "m_StageCapability": 2, + "m_Value": { + "x": 0.7452830076217651, + "y": 0.7452830076217651, + "z": 0.7452830076217651 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_ColorMode": 0, + "m_DefaultColor": { + "r": 0.5, + "g": 0.5, + "b": 0.5, + "a": 1.0 + } +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "91e9a577d315a3848dfb1f48a6743f9c", + "m_Guid": { + "m_GuidSerialized": "9226adec-1697-473d-bfc8-32ef2f802434" + }, + "m_Name": "Caustics Depth of Field", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", + "m_DefaultReferenceName": "Vector1_D55D4FBF", + "m_OverrideReferenceName": "_Crest_CausticsDepthOfField", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 6.0, + "m_FloatType": 1, + "m_RangeValues": { + "x": 0.009999999776482582, + "y": 10.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "91f70aef4b7344fa9bd8a019b1deb03e", + "m_Id": 0, + "m_DisplayName": "Ambient Occlusion", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Occlusion", + "m_StageCapability": 2, + "m_Value": 1.0, + "m_DefaultValue": 1.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "93c5051a05a94644b9bbf2bf2e90e741", + "m_Id": 2, + "m_DisplayName": "Cosine Time", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Cosine Time", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CustomInterpolatorNode", + "m_ObjectId": "94663a98bbc145dba013a7c0d9301c85", + "m_Group": { + "m_Id": "0b12e9fc0b164611b7fa17e0c6955043" + }, + "m_Name": "Water_Level_Offset (Custom Interpolator)", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 645.0000610351563, + "y": 455.00006103515627, + "width": 282.0, + "height": 94.0 + } + }, + "m_Slots": [ + { + "m_Id": "5e12f24b0f7c4d378cea72abc720df26" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "customBlockNodeName": "Water_Level_Offset", + "serializedType": 1 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CategoryData", + "m_ObjectId": "9475b0c108bc456eb09f35111542022b", + "m_Name": "Reflections", + "m_ChildObjectList": [ + { + "m_Id": "6f4f3ecc7e7d4d83ab0176010684a61e" + }, + { + "m_Id": "c700bce5ef10cf8e9e5b69ba043d383b" + }, + { + "m_Id": "21db17a76f094b19ba523148b6f7aa41" + }, + { + "m_Id": "7b2f0f23d232ab88bcacd3e88392015a" + }, + { + "m_Id": "7bd38e1a9e3f978aa6c1746701bf789b" + }, + { + "m_Id": "8741edca0fbbee8a8999dd01e18125ee" + }, + { + "m_Id": "9c1e3b7101c8d18eafc43983c69eb3d0" + }, + { + "m_Id": "71f6994de656018baa684da1128e623c" + }, + { + "m_Id": "d6af4ca8280b4d56b6f2bf1c8b7a0bbd" + }, + { + "m_Id": "2d31998b356d41179aa5291dcedc7850" + }, + { + "m_Id": "0d81099c729342968bf4ee002d378dcf" + }, + { + "m_Id": "e632a014145542d8a0f6bad7aac6cb63" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "953d810767954375930bc2e13cb46a51", + "m_Id": 13, + "m_DisplayName": "Camera_Position", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Camera_Position", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "973fda11195c4260a5bee711dca38ccf", + "m_Guid": { + "m_GuidSerialized": "8f109505-58b6-4876-b26e-c07f5751496e" + }, + "m_Name": "Direct Term", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Direct Term", + "m_DefaultReferenceName": "_Direct_Term", + "m_OverrideReferenceName": "_Crest_DirectTerm", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 1.0, + "m_FloatType": 0, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PositionMaterialSlot", + "m_ObjectId": "9872f3ce676b446e97fd8eea59a121e5", + "m_Id": 0, + "m_DisplayName": "Position", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Position", + "m_StageCapability": 1, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 0 +} + +{ + "m_SGVersion": 3, + "m_Type": "UnityEditor.ShaderGraph.Internal.ColorShaderProperty", + "m_ObjectId": "994e8f13c14f6c80985a81bc860d6550", + "m_Guid": { + "m_GuidSerialized": "d1dc886e-c446-4768-8588-b16b79d9651b" + }, + "m_Name": "Scattering", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", + "m_DefaultReferenceName": "Color_33D97985", + "m_OverrideReferenceName": "_Crest_Scattering", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 2, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "r": 0.0, + "g": 0.09803921729326248, + "b": 0.20000000298023225, + "a": 1.0 + }, + "isMainColor": false, + "m_ColorMode": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "9a2c0b6a5c604924b1d37e4fa221e032", + "m_Id": 0, + "m_DisplayName": "Position", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Position", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "9c1e3b7101c8d18eafc43983c69eb3d0", + "m_Guid": { + "m_GuidSerialized": "30a35dd7-a9df-4b1b-8439-ce6b5458df42" + }, + "m_Name": "Smoothness Falloff", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", + "m_DefaultReferenceName": "Vector1_6D4913AE", + "m_OverrideReferenceName": "_Crest_SmoothnessFalloff", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 0.5, + "m_FloatType": 1, + "m_RangeValues": { + "x": 0.0, + "y": 5.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "9d5b95e11d8c472c884a6c0295b1cd4e", + "m_Id": 0, + "m_DisplayName": "Thickness", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Thickness", + "m_StageCapability": 2, + "m_Value": 1.0, + "m_DefaultValue": 1.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty", + "m_ObjectId": "a11232afc69f728f9691066ce697feee", + "m_Guid": { + "m_GuidSerialized": "87092513-30db-4f86-84a6-fcae5d7f5c09" + }, + "m_Name": "Foam Texture", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", + "m_DefaultReferenceName": "Texture2D_686B83E5", + "m_OverrideReferenceName": "_Crest_FoamTexture", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 2, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"959dd0505e2c54585865f51257daa0e3\",\"type\":3}}", + "m_Guid": "" + }, + "isMainTexture": false, + "useTilingAndOffset": false, + "m_Modifiable": true, + "m_DefaultType": 0 +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "a141f53b584cb28fb6292eb41f81614b", + "m_Guid": { + "m_GuidSerialized": "796372d3-af2f-49e4-a1b8-afd3516df24c" + }, + "m_Name": "Foam Normal Strength", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", + "m_DefaultReferenceName": "Vector1_AB752019", + "m_OverrideReferenceName": "_Crest_FoamNormalStrength", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 2, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 1.0, + "m_FloatType": 1, + "m_RangeValues": { + "x": 0.0, + "y": 3.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty", + "m_ObjectId": "a1b2f9dc07dc18858f11fd5ff20187d8", + "m_Guid": { + "m_GuidSerialized": "28bd3197-1e77-4feb-9870-07c167c99596" + }, + "m_Name": "Caustics Texture", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", + "m_DefaultReferenceName": "Texture2D_3BE9AD61", + "m_OverrideReferenceName": "_Crest_CausticsTexture", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "m_SerializedTexture": "{\"texture\":{\"fileID\":2800000,\"guid\":\"1407209016967410da2ae6fdd4d97fc6\",\"type\":3}}", + "m_Guid": "" + }, + "isMainTexture": false, + "useTilingAndOffset": false, + "m_Modifiable": true, + "m_DefaultType": 1 +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.CustomFunctionNode", + "m_ObjectId": "a22b846424134313814bef43e40c5cb3", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Vertex (Custom Function)", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 1647.0, + "y": -80.99993133544922, + "width": 317.0, + "height": 238.0 + } + }, + "m_Slots": [ + { + "m_Id": "3b4e99d0926f487682f11375ff6a57bd" + }, + { + "m_Id": "ce9362a1c92e483fa82bf400f6c55967" + }, + { + "m_Id": "b90775c28ccb48139273b5f2b4071b81" + }, + { + "m_Id": "503219cfdffc43b38928577e580c684b" + }, + { + "m_Id": "3efd227739f54e0e8ad0e727e8fff52e" + }, + { + "m_Id": "45e01376beba4378949c16fb68aeda17" + }, + { + "m_Id": "5a4a6e350ff4411097da39c02f42957c" + }, + { + "m_Id": "c3972c4f68b848a9a4a4ab335d0ffd94" + }, + { + "m_Id": "953d810767954375930bc2e13cb46a51" + }, + { + "m_Id": "fb1302edc1fa4af5b8c45996545e0902" + } + ], + "synonyms": [ + "code", + "HLSL" + ], + "m_Precision": 1, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SourceType": 0, + "m_FunctionName": "Vertex", + "m_FunctionSource": "2c406004ec98d40d292b359364c27961", + "m_FunctionBody": "Enter function body here..." +} + +{ + "m_SGVersion": 2, + "m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalLitSubTarget", + "m_ObjectId": "a52dd0dd7c42405cabd2b96b877532a3", + "m_WorkflowMode": 0, + "m_NormalDropOffSpace": 2, + "m_ClearCoat": false, + "m_BlendModePreserveSpecular": false +} + +{ + "m_SGVersion": 3, + "m_Type": "UnityEditor.ShaderGraph.Internal.ColorShaderProperty", + "m_ObjectId": "a591f22444f34efc876bf557bb9ebd1f", + "m_Guid": { + "m_GuidSerialized": "d3a0040e-a78c-44fd-bb5f-94d821fb431c" + }, + "m_Name": "Absorption Color", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Absorption Color", + "m_DefaultReferenceName": "_Absorption_Color", + "m_OverrideReferenceName": "_Crest_AbsorptionColor", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "r": 0.3416268229484558, + "g": 0.6954545974731445, + "b": 0.8500000238418579, + "a": 0.10196078568696976 + }, + "isMainColor": false, + "m_ColorMode": 0 +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "a64036ce5dde44bf8d55a5caf75668f5", + "m_Guid": { + "m_GuidSerialized": "f48287db-5185-4719-99df-02fc69d0d9c3" + }, + "m_Name": "Ambient Term", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Ambient Term", + "m_DefaultReferenceName": "_Ambient_Term", + "m_OverrideReferenceName": "_Crest_AmbientTerm", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 1.0, + "m_FloatType": 0, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.ViewDirectionNode", + "m_ObjectId": "a6aefd808acc4136b14b84d9277addbd", + "m_Group": { + "m_Id": "" + }, + "m_Name": "View Direction", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 1149.0, + "y": 872.0001220703125, + "width": 206.0001220703125, + "height": 130.9998779296875 + } + }, + "m_Slots": [ + { + "m_Id": "6944d0d08aa242f38d21b3ff8a19d7a0" + } + ], + "synonyms": [ + "eye direction" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 2, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Space": 2 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "a82fc9659a8640bf860e2051118ded81", + "m_Id": 0, + "m_DisplayName": "Metallic", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Metallic", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "aa43a0a61bb9443ea398c342f79765a9", + "m_Guid": { + "m_GuidSerialized": "b9950af2-aed4-414d-b178-aaf1174e2e3b" + }, + "m_Name": "SSS Pinch Minimum", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "SSS Pinch Minimum", + "m_DefaultReferenceName": "_SSS_Pinch_Minimum", + "m_OverrideReferenceName": "_Crest_SSSPinchMinimum", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 0.5699999928474426, + "m_FloatType": 1, + "m_RangeValues": { + "x": -1.0, + "y": 3.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", + "m_ObjectId": "aa6aadfb2101446cabb0da2a6c68ead3", + "m_Id": 23, + "m_DisplayName": "Static_Lightmap_UV", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Static_Lightmap_UV", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector3ShaderProperty", + "m_ObjectId": "aa75e7087fa330809fdc753edcd8995b", + "m_Guid": { + "m_GuidSerialized": "a2bdf012-457e-4935-b7b5-e2078b0d8cee" + }, + "m_Name": "Absorption", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", + "m_DefaultReferenceName": "Vector3_2B491163", + "m_OverrideReferenceName": "_Crest_Absorption", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 1, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "x": 0.7008615732192993, + "y": 0.2369990050792694, + "z": 0.10605160146951676, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CategoryData", + "m_ObjectId": "ab5c287be1ea4492ab82972b1124492c", + "m_Name": "", + "m_ChildObjectList": [ + { + "m_Id": "3b6b9f9fc3614e43a2cd513af66b9fc5" + }, + { + "m_Id": "aa75e7087fa330809fdc753edcd8995b" + } + ] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "ac20e42c0c5f4e60872782a3b5cb4aac", + "m_Guid": { + "m_GuidSerialized": "6dbefb58-73e0-4c93-9e20-7736a46c599c" + }, + "m_Name": "Shadows Affects Ambient Factor", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Shadows Affects Ambient Factor", + "m_DefaultReferenceName": "_Shadows_Affects_Ambient_Factor", + "m_OverrideReferenceName": "_Crest_ShadowsAffectsAmbientFactor", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 0.5, + "m_FloatType": 1, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "ac72e84550f64ff7bba0fdec760e9ac8", + "m_Id": 0, + "m_DisplayName": "Index Of Refraction", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "RefractionIndex", + "m_StageCapability": 2, + "m_Value": 1.0, + "m_DefaultValue": 1.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "ad86ac4b1c7d4f998c9e2b44c9950af2", + "m_Id": 22, + "m_DisplayName": "Position_WS", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Position_WS", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", + "m_ObjectId": "b0622d58143646b4bd6c849858bac981", + "m_Id": 0, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 2, + "m_Type": "UnityEditor.Rendering.BuiltIn.ShaderGraph.BuiltInTarget", + "m_ObjectId": "b08214e872de4a3b82e77ece5ecb284d", + "m_ActiveSubTarget": { + "m_Id": "bb3b0e5f6ef041aebb81194f38a5d07c" + }, + "m_AllowMaterialOverride": true, + "m_SurfaceType": 1, + "m_ZWriteControl": 1, + "m_ZTestMode": 4, + "m_AlphaMode": 0, + "m_RenderFace": 0, + "m_AlphaClip": true, + "m_CustomEditorGUI": "WaveHarmonic.Crest.Editor.LegacyWaterShaderGUI" +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "b46c0ecc382d4777a4364feb0e0f8b70", + "m_Guid": { + "m_GuidSerialized": "90d60f39-3e5f-42b2-96bb-03923a1dcc30" + }, + "m_Name": "SSS Pinch Falloff", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "SSS Pinch Falloff", + "m_DefaultReferenceName": "_SSS_Pinch_Falloff", + "m_OverrideReferenceName": "_Crest_SSSPinchFalloff", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 1.5, + "m_FloatType": 1, + "m_RangeValues": { + "x": 1.0, + "y": 8.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "b674b64ba77748a1a1ab3cf388aa1232", + "m_Id": 8, + "m_DisplayName": "LOD_Alpha", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "LOD_Alpha", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "b7891fe7e5a34f03adebd8a45505c5fc", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Smoothness", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "030e617918184625a9f533d1786f82cf" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Smoothness" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.BooleanShaderProperty", + "m_ObjectId": "b83ed6e75a6f47b785c0fc9a5ee0c00a", + "m_Guid": { + "m_GuidSerialized": "511967ee-cd16-49f3-b4bc-f1108dbebe3e" + }, + "m_Name": "Albedo Ignore Foam", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Albedo Ignore Foam", + "m_DefaultReferenceName": "_Albedo_Ignore_Foam", + "m_OverrideReferenceName": "_Crest_AlbedoIgnoreFoam", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": true +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "b90775c28ccb48139273b5f2b4071b81", + "m_Id": 7, + "m_DisplayName": "LOD_Alpha", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "LOD_Alpha", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.ShaderKeyword", + "m_ObjectId": "b91141f3e4cf4131ab732e6ae5828231", + "m_Guid": { + "m_GuidSerialized": "cbd2da98-b96c-40d7-951d-8646cf855506" + }, + "m_Name": "Flow Enabled", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", + "m_DefaultReferenceName": "BOOLEAN_547DED44_ON", + "m_OverrideReferenceName": "CREST_FLOW_ON", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_KeywordType": 0, + "m_KeywordDefinition": 0, + "m_KeywordScope": 0, + "m_KeywordStages": 63, + "m_Entries": [], + "m_Value": 0, + "m_IsEditable": true +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "bb078b3adb574ec18c0f7d0a0a94a72b", + "m_Id": 0, + "m_DisplayName": "In", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "In", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.BuiltIn.ShaderGraph.BuiltInLitSubTarget", + "m_ObjectId": "bb3b0e5f6ef041aebb81194f38a5d07c", + "m_WorkflowMode": 1, + "m_NormalDropOffSpace": 2 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.BooleanShaderProperty", + "m_ObjectId": "bb642d517f6040f9b3810d5c14873f37", + "m_Guid": { + "m_GuidSerialized": "579db0d6-50ab-4e1b-9d48-3dea19ec1186" + }, + "m_Name": "Albedo Enabled", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Albedo Enabled", + "m_DefaultReferenceName": "_Albedo_Enabled", + "m_OverrideReferenceName": "_Crest_AlbedoEnabled", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": false +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "bbd2579dfd7f38879fab18706b09b5fb", + "m_Guid": { + "m_GuidSerialized": "016cb2c5-f364-4008-a0c6-7048633752a2" + }, + "m_Name": "Refractive Index of Water (U)", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", + "m_DefaultReferenceName": "Vector1_C5277D42", + "m_OverrideReferenceName": "_Crest_RefractiveIndexOfWater", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 1.3300000429153443, + "m_FloatType": 1, + "m_RangeValues": { + "x": 1.0, + "y": 2.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.BooleanShaderProperty", + "m_ObjectId": "bd96da68193149a4a37e60284d87b160", + "m_Guid": { + "m_GuidSerialized": "c3691388-802d-4ae2-afd0-75b19f4ff190" + }, + "m_Name": "Caustics Enabled", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Caustics Enabled", + "m_DefaultReferenceName": "_Caustics_Enabled", + "m_OverrideReferenceName": "_Crest_CausticsEnabled", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": true +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "bfe5cf33a577b383b757f8332383b77d", + "m_Guid": { + "m_GuidSerialized": "f345b0a9-2d46-4f55-81f2-4d97087d379e" + }, + "m_Name": "Foam Feather", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", + "m_DefaultReferenceName": "Vector1_1E5C55C0", + "m_OverrideReferenceName": "_Crest_FoamFeather", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 2, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 0.75, + "m_FloatType": 1, + "m_RangeValues": { + "x": 0.0010000000474974514, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "c145f00f4fe840b49f120c0890188e8f", + "m_Id": 0, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "c3972c4f68b848a9a4a4ab335d0ffd94", + "m_Id": 14, + "m_DisplayName": "Object_Position", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Object_Position", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "c3f4381605564b8bb0cc3445ae03c7b1", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Thickness", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "9d5b95e11d8c472c884a6c0295b1cd4e" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Thickness" +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "c700bce5ef10cf8e9e5b69ba043d383b", + "m_Guid": { + "m_GuidSerialized": "6f667c2d-be20-48d7-b430-5d16e288e854" + }, + "m_Name": "Occlusion", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", + "m_DefaultReferenceName": "Vector1_5F4D880B", + "m_OverrideReferenceName": "_Crest_Occlusion", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 1.0, + "m_FloatType": 1, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "c8d4b557497248afaf7f293a36ade324", + "m_Id": 7, + "m_DisplayName": "Height", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Height", + "m_StageCapability": 3, + "m_Value": 1.0, + "m_DefaultValue": 1.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "c9e151d906b14205b3c0d9b6d5561067", + "m_Guid": { + "m_GuidSerialized": "4d8207fb-5fbb-4173-b3aa-c4157a1dbe38" + }, + "m_Name": "SSS Intensity", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "SSS Intensity", + "m_DefaultReferenceName": "_SSS_Intensity", + "m_OverrideReferenceName": "_Crest_SSSIntensity", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 10.0, + "m_FloatType": 0, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.ObjectNode", + "m_ObjectId": "cc4998fd8e074695a09b766078550f62", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Object", + "m_DrawState": { + "m_Expanded": false, + "m_Position": { + "serializedVersion": "2", + "x": 1355.0001220703125, + "y": 50.00008010864258, + "width": 96.9998779296875, + "height": 75.99992370605469 + } + }, + "m_Slots": [ + { + "m_Id": "2578b8f9b3fa4b19ac471501136576e4" + }, + { + "m_Id": "538cf5cf053d448e9eda5626daa46d9d" + }, + { + "m_Id": "014708395fd3480aad2b5de738cb4d20" + }, + { + "m_Id": "25f5ad60e93046fdaaf419e16de106ee" + }, + { + "m_Id": "07e7cb6fc0a64d58a86ea20335ce4ef5" + } + ], + "synonyms": [ + "position", + "scale", + "bounds", + "size" + ], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot", + "m_ObjectId": "ce9362a1c92e483fa82bf400f6c55967", + "m_Id": 6, + "m_DisplayName": "Undisplaced_XZ", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Undisplaced_XZ", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.HDLitData", + "m_ObjectId": "cee72db709954dd38e8039e087fe5744", + "m_RayTracing": false, + "m_MaterialType": 4, + "m_RefractionModel": 1, + "m_SSSTransmission": true, + "m_EnergyConservingSpecular": false, + "m_ClearCoat": false +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "d03d9fc3ce7b4a8f939cf6a6a147257e", + "m_Guid": { + "m_GuidSerialized": "0d9af4eb-098c-4bef-b63d-6e6ff46404f4" + }, + "m_Name": "Foam Scale", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", + "m_DefaultReferenceName": "Vector1_89268251", + "m_OverrideReferenceName": "_Crest_FoamScale", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 2, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 5.0, + "m_FloatType": 1, + "m_RangeValues": { + "x": 0.009999999776482582, + "y": 100.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CustomInterpolatorNode", + "m_ObjectId": "d056d4d282b14a5b9a336e5561143c6a", + "m_Group": { + "m_Id": "0b12e9fc0b164611b7fa17e0c6955043" + }, + "m_Name": "Undisplaced_XZ (Custom Interpolator)", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 664.0000610351563, + "y": 267.0000915527344, + "width": 263.0, + "height": 93.99993896484375 + } + }, + "m_Slots": [ + { + "m_Id": "0baa9d94a6294f619b49aa7151c9229a" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "customBlockNodeName": "Undisplaced_XZ", + "serializedType": 2 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "d184a57774014d1b93bf49daab22b439", + "m_Id": 1, + "m_DisplayName": "Sine Time", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Sine Time", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "d22d7fde479b42818d46226e4fdf8fd2", + "m_Group": { + "m_Id": "" + }, + "m_Name": "VertexDescription.Position", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "9872f3ce676b446e97fd8eea59a121e5" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Position" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "d32e3256b70746c094ee8fa4f441ad01", + "m_Id": 0, + "m_DisplayName": "Absorption Distance", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "RefractionDistance", + "m_StageCapability": 2, + "m_Value": 1.0, + "m_DefaultValue": 1.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "d33c23a144f9400888ebc0b17741ceea", + "m_Guid": { + "m_GuidSerialized": "e1a75ef8-fade-46ee-8a16-04fd2500751a" + }, + "m_Name": "Total Internal Reflection Intensity (U)", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Total Internal Reflection Intensity (U)", + "m_DefaultReferenceName": "_Total_Internal_Reflection_Intensity_U", + "m_OverrideReferenceName": "_Crest_TotalInternalReflectionIntensity", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 0.800000011920929, + "m_FloatType": 1, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "d347a12dc40b4875b10257a32f31301c", + "m_Guid": { + "m_GuidSerialized": "5cc04501-f8c3-4b03-9742-5dd6592a9ff9" + }, + "m_Name": "Shadow Caster Threshold", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Shadow Caster Threshold", + "m_DefaultReferenceName": "_Shadow_Caster_Threshold", + "m_OverrideReferenceName": "_Crest_ShadowCasterThreshold", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 0.5, + "m_FloatType": 1, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CustomInterpolatorNode", + "m_ObjectId": "d3778e9c7b9a4c8098a0fba6b826b854", + "m_Group": { + "m_Id": "0b12e9fc0b164611b7fa17e0c6955043" + }, + "m_Name": "Flow (Custom Interpolator)", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 728.0, + "y": 643.0, + "width": 198.5, + "height": 94.0 + } + }, + "m_Slots": [ + { + "m_Id": "4f9c60ee0f3e4c42ac334922e9640127" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "customBlockNodeName": "Flow", + "serializedType": 2 +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "d3e20a560cd246c5966f967e53903833", + "m_Guid": { + "m_GuidSerialized": "398acfbb-f135-4a63-9a46-e8845cf96ebb" + }, + "m_Name": "SSS Pinch Maximum", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "SSS Pinch Maximum", + "m_DefaultReferenceName": "_SSS_Pinch_Maximum", + "m_OverrideReferenceName": "_Crest_SSSPinchMaximum", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 1.6699999570846558, + "m_FloatType": 1, + "m_RangeValues": { + "x": -1.0, + "y": 5.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "d6507a957f404764aa2670d0dc950578", + "m_Group": { + "m_Id": "" + }, + "m_Name": "VertexDescription.CustomInterpolator", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 2662.666748046875, + "y": 498.00006103515627, + "width": 200.0, + "height": 42.66656494140625 + } + }, + "m_Slots": [ + { + "m_Id": "2b33bfcf12bd4deca2a09ca1fa4a583c" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Water_Level_Derivatives#2" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CategoryData", + "m_ObjectId": "d65753c4eac547c5a73c35da6956d9e2", + "m_Name": "Albedo", + "m_ChildObjectList": [ + { + "m_Id": "bb642d517f6040f9b3810d5c14873f37" + }, + { + "m_Id": "b83ed6e75a6f47b785c0fc9a5ee0c00a" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.BooleanShaderProperty", + "m_ObjectId": "d6af4ca8280b4d56b6f2bf1c8b7a0bbd", + "m_Guid": { + "m_GuidSerialized": "0b5b9cdf-4a2b-4bfb-837f-3d4359797443" + }, + "m_Name": "Planar Reflections Enabled", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Planar Reflections Enabled", + "m_DefaultReferenceName": "_Planar_Reflections_Enabled", + "m_OverrideReferenceName": "_Crest_PlanarReflectionsEnabled", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "d741ef18d57845e59b9e6d6ebeb72dec", + "m_Id": 0, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BooleanMaterialSlot", + "m_ObjectId": "d78925eabe5948b98e661f7eeba64a4e", + "m_Id": 14, + "m_DisplayName": "Facing", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Facing", + "m_StageCapability": 3, + "m_Value": false, + "m_DefaultValue": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.ScreenPositionMaterialSlot", + "m_ObjectId": "d89ecf302f85402382c31ff6408de83a", + "m_Id": 0, + "m_DisplayName": "UV", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "UV", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [], + "m_ScreenSpaceType": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "da377bcf5895426f889bf7f43fea086c", + "m_Id": 4, + "m_DisplayName": "Far Plane", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Far Plane", + "m_StageCapability": 3, + "m_Value": 1.0, + "m_DefaultValue": 1.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BooleanMaterialSlot", + "m_ObjectId": "dd2364c2819e440281a8d86cde9bcba5", + "m_Id": 0, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 2, + "m_Value": true, + "m_DefaultValue": true +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "de2797e54cc7464ea2e88533681e7485", + "m_Id": 9, + "m_DisplayName": "Water_Level_Offset", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Water_Level_Offset", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "e1cad9f1cf9b489c9cac9fa804c1b5aa", + "m_Id": 6, + "m_DisplayName": "o_Alpha", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "o_Alpha", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "e207931e020242bba83058a59f3fb07d", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Occlusion", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "91f70aef4b7344fa9bd8a019b1deb03e" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Occlusion" +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "e4a54526c6204b5badd66e158dcf0b1d", + "m_Guid": { + "m_GuidSerialized": "92ccb9e9-19a2-4948-ac31-1ab0371cd06c" + }, + "m_Name": "Foam Scroll Speed", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Foam Scroll Speed", + "m_DefaultReferenceName": "_Foam_Scroll_Speed", + "m_OverrideReferenceName": "_Crest_FoamScrollSpeed", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 1.0, + "m_FloatType": 1, + "m_RangeValues": { + "x": 0.0, + "y": 10.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "e5d7d621e53a44598747bb25ccf0dca5", + "m_Id": 1, + "m_DisplayName": "Direction", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Direction", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "e608dd8f43794f5d8b3995446b21467f", + "m_Guid": { + "m_GuidSerialized": "d83718f9-1ca4-4085-943f-b0ed817ce4ff" + }, + "m_Name": "Normal Map Scroll Speed", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Normal Map Scroll Speed", + "m_DefaultReferenceName": "_Normal_Map_Scroll_Speed", + "m_OverrideReferenceName": "_Crest_NormalMapScrollSpeed", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 1.0, + "m_FloatType": 1, + "m_RangeValues": { + "x": 0.0, + "y": 10.0 + } +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "e632a014145542d8a0f6bad7aac6cb63", + "m_Guid": { + "m_GuidSerialized": "ca2a2ba7-796c-406c-b697-e71a0d46dc01" + }, + "m_Name": "Planar Reflections Roughness", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Planar Reflections Roughness", + "m_DefaultReferenceName": "_Planar_Reflections_Roughness", + "m_OverrideReferenceName": "_Crest_PlanarReflectionsRoughness", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 1.0, + "m_FloatType": 0, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot", + "m_ObjectId": "e9abf5f3e2204dec98991b9ac5698855", + "m_Id": 0, + "m_DisplayName": "Normal (World Space)", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "NormalWS", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 2 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot", + "m_ObjectId": "eba256bd9199402fb1791e8f894b5e8f", + "m_Id": 0, + "m_DisplayName": "Emission", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Emission", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_ColorMode": 1, + "m_DefaultColor": { + "r": 0.0, + "g": 0.0, + "b": 0.0, + "a": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "eda23d92596c4c3e93952a590edf7bfc", + "m_Id": 18, + "m_DisplayName": "Screen_Position_Raw", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Screen_Position_Raw", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.HDLitSubTarget", + "m_ObjectId": "eea8298ecc6944318bd614020316fbf9" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.BooleanShaderProperty", + "m_ObjectId": "f00a6ef3872645488e79e89c6ac1845e", + "m_Guid": { + "m_GuidSerialized": "922f470c-a338-42a7-b4bf-88e3dee67c04" + }, + "m_Name": "Normal Map Enabled", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Normal Map Enabled", + "m_DefaultReferenceName": "_Normal_Map_Enabled", + "m_OverrideReferenceName": "_Crest_NormalMapEnabled", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": true +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SceneDepthNode", + "m_ObjectId": "f1091500a8a244058957bd706b5fd6e7", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Scene Depth", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 1213.0001220703125, + "y": 1157.0, + "width": 144.9998779296875, + "height": 112.0 + } + }, + "m_Slots": [ + { + "m_Id": "62352145719941a3ab393292aab906fd" + }, + { + "m_Id": "0462d8e66f824b829a9cb6ba741ed13e" + } + ], + "synonyms": [ + "zbuffer", + "zdepth" + ], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_DepthSamplingMode": 1 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "f16010780e29425caac8bbcfaae9bde4", + "m_Group": { + "m_Id": "" + }, + "m_Name": "VertexDescription.CustomInterpolator", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 2649.33349609375, + "y": 452.0, + "width": 200.0, + "height": 42.666656494140628 + } + }, + "m_Slots": [ + { + "m_Id": "67f656c3174f49288d9d8b8af7c19143" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Water_Level_Offset#1" +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "f75baf34d9f28a80a10af59ed35841c5", + "m_Guid": { + "m_GuidSerialized": "569ad017-c9ab-4564-96d8-3d3a02906460" + }, + "m_Name": "Caustics Focal Depth", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", + "m_DefaultReferenceName": "Vector1_F5243F4D", + "m_OverrideReferenceName": "_Crest_CausticsFocalDepth", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 2.0, + "m_FloatType": 1, + "m_RangeValues": { + "x": 0.0, + "y": 25.0 + } +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.PositionNode", + "m_ObjectId": "f8a8f45aa5dd42febd6bf935dae62d1c", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Position", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 1152.0001220703125, + "y": 1527.0, + "width": 205.9998779296875, + "height": 131.0001220703125 + } + }, + "m_Slots": [ + { + "m_Id": "fb9b94a343fb4c1e9e370da501e0abba" + } + ], + "synonyms": [ + "location" + ], + "m_Precision": 1, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 2, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Space": 4, + "m_PositionSource": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "fb1302edc1fa4af5b8c45996545e0902", + "m_Id": 12, + "m_DisplayName": "Time", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Time", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "fb9b94a343fb4c1e9e370da501e0abba", + "m_Id": 0, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "fba39aeafd5aed838e2205e938a89b91", + "m_Guid": { + "m_GuidSerialized": "9d7cf72b-e9b8-4542-b782-117a50047aaf" + }, + "m_Name": "Caustics Scale", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", + "m_DefaultReferenceName": "Vector1_80D2C448", + "m_OverrideReferenceName": "_Crest_CausticsTextureScale", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 50.0, + "m_FloatType": 1, + "m_RangeValues": { + "x": 0.009999999776482582, + "y": 100.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "fc68a5e215ec419dab8e51a54c9f195c", + "m_Id": 1, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "ff8bcce5ee09228abb73bf677fa20052", + "m_Guid": { + "m_GuidSerialized": "dc3a022f-46de-44c7-83fd-d2443a2eb0e5" + }, + "m_Name": "Normal Map Scale", + "m_DefaultRefNameVersion": 0, + "m_RefNameGeneratedByDisplayName": "", + "m_DefaultReferenceName": "Vector1_DD234E2B", + "m_OverrideReferenceName": "_Crest_NormalMapScale", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 2, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 3.0, + "m_FloatType": 1, + "m_RangeValues": { + "x": 0.009999999776482582, + "y": 100.0 + } +} + diff --git a/Assets/Obi/Resources/ObiMaterials/Common/Instanced/Compute/ProceduralInstanced.shadergraph.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Water.shadergraph.meta similarity index 86% rename from Assets/Obi/Resources/ObiMaterials/Common/Instanced/Compute/ProceduralInstanced.shadergraph.meta rename to Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Water.shadergraph.meta index 299e52000..80258f717 100644 --- a/Assets/Obi/Resources/ObiMaterials/Common/Instanced/Compute/ProceduralInstanced.shadergraph.meta +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Water.shadergraph.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 4df17ed533d3349a194f3bb8c89dcf5d +guid: 00ffe7d0b7161420897069dc6e12822c ScriptedImporter: internalIDToNameTable: [] externalObjects: {} diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Utility.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Utility.meta new file mode 100644 index 000000000..0de3459db --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Utility.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b707759b729ba4f7fb35c96ddf8a8912 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Utility/Blit.shader b/Packages/com.waveharmonic.crest/Runtime/Shaders/Utility/Blit.shader new file mode 100644 index 000000000..d72425c7d --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Utility/Blit.shader @@ -0,0 +1,154 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// Provides utility passes for rendering like clearing the stencil buffer. + +Shader "Hidden/Crest/Utility/Blit" +{ + HLSLINCLUDE + #pragma vertex Vertex + #pragma fragment Fragment + + #include "UnityCG.cginc" + + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/Core.hlsl" + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/InputsDriven.hlsl" + + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Depth.hlsl" + + struct Attributes + { + uint id : SV_VertexID; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct Varyings + { + float4 positionCS : SV_POSITION; + float2 uv : TEXCOORD0; + UNITY_VERTEX_OUTPUT_STEREO + }; + + Varyings Vertex(Attributes input) + { + // This will work for all pipelines. + Varyings output = (Varyings)0; + UNITY_SETUP_INSTANCE_ID(input); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); + + output.positionCS = GetFullScreenTriangleVertexPosition(input.id); + output.uv = GetFullScreenTriangleTexCoord(input.id); + return output; + } + ENDHLSL + + SubShader + { + Cull Off ZWrite On ZTest Always + + Pass + { + // Copies the color texture. + Name "Copy Color" + + ZWrite Off + ZTest Always + Cull Off + + HLSLPROGRAM + TEXTURE2D_X(_CameraColorTexture); + + float4 Fragment(Varyings input) : SV_Target + { + // We need this when sampling a screenspace texture. + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); + return LOAD_TEXTURE2D_X(_CameraColorTexture, input.positionCS.xy); + } + ENDHLSL + } + + Pass + { + // Copies the depth from the camera depth texture. Clears the stencil for convenience. + Name "Copy Depth / Clear Stencil" + + ZWrite On + ZTest Always + Cull Off + + Stencil + { + Ref 0 + Comp Always + Pass Replace + } + + HLSLPROGRAM + TEXTURE2D_X(_CameraDepthTexture); + float Fragment(Varyings input) : SV_Depth + { + // We need this when sampling a screenspace texture. + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); + return LOAD_DEPTH_TEXTURE_X(_CameraDepthTexture, input.positionCS.xy); + } + ENDHLSL + } + + Pass + { + // Clears the depth buffer without clearing the stencil. + Name "Clear Depth" + + ZWrite On + ZTest Always + Cull Off + + HLSLPROGRAM + float Fragment(Varyings input) : SV_Depth + { + return 0.0; + } + ENDHLSL + } + + Pass + { + // Clears the stencil buffer without clearing depth + Name "Clear Stencil" + + ZWrite Off + ZTest Always + Cull Off + Blend Zero One + + Stencil + { + Ref 0 + Comp Always + Pass Replace + } + + HLSLPROGRAM + float Fragment(Varyings input) : SV_Target + { + return 0.0; + } + ENDHLSL + } + + Pass + { + Name "Copy" + Blend Off + + HLSLPROGRAM + TEXTURE2D(_Utility_MainTexture); + SAMPLER(sampler_Utility_MainTexture); + float4 Fragment(Varyings input) : SV_Target + { + return SAMPLE_TEXTURE2D(_Utility_MainTexture, sampler_Utility_MainTexture, input.uv); + } + ENDHLSL + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Utility/Blit.shader.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Utility/Blit.shader.meta new file mode 100644 index 000000000..5e96bd09d --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Utility/Blit.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b9836aaab4b1f45e4bd4fc4e6bcc7e74 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Utility/Clear.compute b/Packages/com.waveharmonic.crest/Runtime/Shaders/Utility/Clear.compute new file mode 100644 index 000000000..0f2948f03 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Utility/Clear.compute @@ -0,0 +1,55 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// Clear specific components using a mask. + +#pragma kernel CrestClearTarget +#pragma kernel CrestClearTargetBoundaryX d_BoundaryX +#pragma kernel CrestClearTargetBoundaryY d_BoundaryY + +#include "HLSLSupport.cginc" + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Macros.hlsl" + +RWTexture2DArray _Crest_Target; + +CBUFFER_START(CrestPerMaterial) +float4 _Crest_ClearMask; +float4 _Crest_ClearColor; +uint _Crest_Resolution; +uint _Crest_TargetSlice; +CBUFFER_END + +#if d_BoundaryX +#define d_Axis y +#else +#define d_Axis x +#endif + +m_UtilityNameSpace + +void ClearTarget(uint3 id) +{ + _Crest_Target[id] *= 1.0 - _Crest_ClearMask; + _Crest_Target[id] += _Crest_ClearColor; +} + +void ClearTargetBoundary(uint3 id) +{ + id.z = _Crest_TargetSlice; + _Crest_Target[id] = _Crest_ClearColor; + + // Opposite row/column. + id.d_Axis = _Crest_Resolution - 1; + _Crest_Target[id] = _Crest_ClearColor; +} + +m_UtilityNameSpaceEnd + +m_UtilityKernelDefault(ClearTarget) + +[numthreads(8, 1, 1)] +m_UtilityKernelVariant(ClearTargetBoundary, X) + +[numthreads(1, 8, 1)] +m_UtilityKernelVariant(ClearTargetBoundary, Y) diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Utility/Clear.compute.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Utility/Clear.compute.meta new file mode 100644 index 000000000..93f475e3a --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Utility/Clear.compute.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 2641e78378c244c2e8ac89563a8ec9af +ComputeShaderImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Utility/TextureArray.shader b/Packages/com.waveharmonic.crest/Runtime/Shaders/Utility/TextureArray.shader new file mode 100644 index 000000000..3a164ca90 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Utility/TextureArray.shader @@ -0,0 +1,55 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// Renders a specific slice of a 2D Texture Array +// https://docs.unity3d.com/Manual/SL-TextureArrays.html +Shader "Hidden/Crest/Debug/TextureArray" +{ + SubShader + { + Tags { "RenderType"="Opaque" } + Cull Off + ZWrite Off + + Pass + { + CGPROGRAM + #pragma vertex Vert + #pragma fragment Frag + #pragma require 2darray + + #include "UnityCG.cginc" + + struct Attributes + { + float4 positionOS : POSITION; + float2 uv : TEXCOORD0; + }; + + struct Varyings + { + float4 positionCS : SV_POSITION; + float3 uv : TEXCOORD0; + }; + + UNITY_DECLARE_TEX2DARRAY(_MainTex); + uint _Depth; + float _Scale; + float _Bias; + + Varyings Vert(Attributes input) + { + Varyings o; + o.positionCS = UnityObjectToClipPos(input.positionOS); + o.uv = float3(input.uv.xy, _Depth); + return o; + } + + half4 Frag(Varyings input) : SV_TARGET + { + return _Scale * UNITY_SAMPLE_TEX2DARRAY(_MainTex, input.uv) + _Bias; + } + ENDCG + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Utility/TextureArray.shader.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Utility/TextureArray.shader.meta new file mode 100644 index 000000000..2aac99e3c --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Utility/TextureArray.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 9984e3507dd424fd49ce01182989250a +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume.meta new file mode 100644 index 000000000..85869ac49 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6ae196c20022b4f5bbf2863280ee85a6 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Mask.hlsl b/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Mask.hlsl new file mode 100644 index 000000000..16bbf6d5c --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Mask.hlsl @@ -0,0 +1,151 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#ifndef CREST_UNDERWATER_MASK_SHARED_INCLUDED +#define CREST_UNDERWATER_MASK_SHARED_INCLUDED + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Settings.Crest.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Constants.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/InputsDriven.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Helpers.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Cascade.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Geometry.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Depth.hlsl" + +#if (CREST_PORTALS != 0) +#include "Packages/com.waveharmonic.crest.portals/Runtime/Shaders/Library/Portals.hlsl" +#endif + +// Variable mask for when fog is applied before transparent pass and water tile might be culled. +half _Crest_MaskBelowSurface; + +m_CrestNameSpace + +struct Attributes +{ + // The old unity macros require this name and type. + float4 vertex : POSITION; + UNITY_VERTEX_INPUT_INSTANCE_ID +}; + +struct Varyings +{ + float4 positionCS : SV_POSITION; + UNITY_VERTEX_OUTPUT_STEREO +}; + +Varyings Vertex(Attributes v) +{ + // This will work for all pipelines. + Varyings output = (Varyings)0; + UNITY_SETUP_INSTANCE_ID(v); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); + + const Cascade cascade0 = Cascade::Make(_Crest_LodIndex); + const Cascade cascade1 = Cascade::Make(_Crest_LodIndex + 1); + + float3 worldPos = mul(UNITY_MATRIX_M, float4(v.vertex.xyz, 1.0)).xyz; + +#if (SHADEROPTIONS_CAMERA_RELATIVE_RENDERING != 0) + worldPos.xz += _WorldSpaceCameraPos.xz; +#endif + + // Vertex snapping and lod transition + float lodAlpha; + SnapAndTransitionVertLayout(_Crest_ChunkMeshScaleAlpha, cascade0, _Crest_ChunkGeometryGridWidth, worldPos, lodAlpha); + + { + // Scale up by small "epsilon" to solve numerical issues. Expand slightly about tile center. + // :WaterGridPrecisionErrors + float2 tileCenterXZ = UNITY_MATRIX_M._m03_m23; +#if (SHADEROPTIONS_CAMERA_RELATIVE_RENDERING != 0) + tileCenterXZ += _WorldSpaceCameraPos.xz; +#endif + const float2 cameraPositionXZ = abs(_WorldSpaceCameraPos.xz); + // Scale "epsilon" by distance from zero. There is an issue where overlaps can cause SV_IsFrontFace + // to be flipped (needs to be investigated). Gaps look bad from above surface, and overlaps look bad + // from below surface. We want to close gaps without introducing overlaps. A fixed "epsilon" will + // either not solve gaps at large distances or introduce too many overlaps at small distances. Even + // with scaling, there are still unsolvable overlaps underwater (especially at large distances). + // 100,000 (0.00001) is the maximum position before Unity warns the user of precision issues. + worldPos.xz = lerp(tileCenterXZ, worldPos.xz, lerp(1.0, 1.01, max(cameraPositionXZ.x, cameraPositionXZ.y) * 0.00001)); + } + + // Calculate sample weights. params.z allows shape to be faded out (used on last lod to support pop-less scale transitions) + const float wt_smallerLod = (1.0 - lodAlpha) * cascade0._Weight; + const float wt_biggerLod = (1.0 - wt_smallerLod) * cascade1._Weight; + // Sample displacement textures, add results to current world pos / normal / foam + const float2 positionWS_XZ_before = worldPos.xz; + + // Data that needs to be sampled at the undisplaced position + if (wt_smallerLod > m_CrestSampleLodThreshold) + { + Cascade::MakeAnimatedWaves(_Crest_LodIndex).SampleDisplacement(positionWS_XZ_before, wt_smallerLod, worldPos); + } + if (wt_biggerLod > m_CrestSampleLodThreshold) + { + Cascade::MakeAnimatedWaves(_Crest_LodIndex + 1).SampleDisplacement(positionWS_XZ_before, wt_biggerLod, worldPos); + } + +#if (SHADEROPTIONS_CAMERA_RELATIVE_RENDERING != 0) + worldPos.xz -= _WorldSpaceCameraPos.xz; +#endif + + output.positionCS = mul(UNITY_MATRIX_VP, float4(worldPos, 1.0)); + + return output; +} + +half4 Fragment(const Varyings input, const bool i_isFrontFace) +{ + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); + + half4 result = 0.0; + +#if (CREST_PORTALS != 0) +#if !d_Tunnel + bool masked = false; + + if (m_CrestPortal) + { + masked = ApplyVolumeToWaterMask(input.positionCS); + } +#endif +#endif + + if (IsUnderwater(i_isFrontFace, g_Crest_ForceUnderwater)) + { + result = (half4)_Crest_MaskBelowSurface; + } + else + { + result = (half4)CREST_MASK_ABOVE_SURFACE; + } + +#if (CREST_PORTALS != 0) +#if d_Tunnel + const float rawFrontFaceZ = LOAD_DEPTH_TEXTURE_X(_Crest_WaterVolumeFrontFaceTexture, input.positionCS.xy); + const float rawBackFaceZ = LOAD_DEPTH_TEXTURE_X(_Crest_WaterVolumeBackFaceTexture, input.positionCS.xy); + if (rawFrontFaceZ <= 0.0 && rawBackFaceZ > 0.0) + { + result = (half4)CREST_MASK_ABOVE_SURFACE; + } +#else + if (m_CrestPortal) + { + result *= masked ? 2 : 1; + } +#endif +#endif + + return result; +} + +m_CrestNameSpaceEnd + +m_CrestVertex +m_CrestFragmentWithFrontFace(half4) + +#endif // CREST_UNDERWATER_MASK_SHARED_INCLUDED diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Mask.hlsl.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Mask.hlsl.meta new file mode 100644 index 000000000..a0530623f --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Mask.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b891a37e4cd634b03888a64e8965920b +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Mask.shader b/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Mask.shader new file mode 100644 index 000000000..3a3b715fa --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Mask.shader @@ -0,0 +1,253 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +Shader "Hidden/Crest/Underwater/Water Surface Mask" +{ + SubShader + { + PackageRequirements + { + "com.unity.render-pipelines.high-definition" + } + + Tags { "RenderPipeline"="HDRenderPipeline" } + + Pass + { + Name "Water Surface Mask" + // We always disable culling when rendering water mask, as we only + // use it for underwater rendering features. + Cull Off + + Stencil + { + Ref [_StencilRef] + Comp [_Crest_StencilComparison] + } + + HLSLPROGRAM + #pragma vertex Vertex + #pragma fragment Fragment + // for VFACE + #pragma target 3.0 + + #pragma multi_compile_local __ d_Tunnel + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" + #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" + + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Mask.hlsl" + ENDHLSL + } + + Pass + { + Name "Water Surface Mask (Depth Only)" + Cull Off + ColorMask 0 + + HLSLPROGRAM + #pragma vertex Vertex + #pragma fragment Fragment + // for VFACE + #pragma target 3.0 + + #define m_Discard discard + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" + #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" + + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Mask.hlsl" + ENDHLSL + } + + Pass + { + Name "Water Horizon Mask" + Cull Off + ZWrite Off + // Horizon must be rendered first or it will overwrite the mask with incorrect values. ZTest not needed. + ZTest Always + + Stencil + { + Ref [_StencilRef] + Comp [_Crest_StencilComparison] + } + + HLSLPROGRAM + #pragma vertex Vertex + #pragma fragment Fragment + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" + #include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" + + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/MaskHorizon.hlsl" + ENDHLSL + } + } + + SubShader + { + PackageRequirements + { + "com.unity.render-pipelines.universal" + } + + Tags { "RenderPipeline"="UniversalPipeline" } + + Pass + { + Name "Water Surface Mask" + // We always disable culling when rendering water mask, as we only + // use it for underwater rendering features. + Cull Off + + Stencil + { + Ref [_StencilRef] + Comp [_Crest_StencilComparison] + } + + HLSLPROGRAM + #pragma vertex Vertex + #pragma fragment Fragment + // for VFACE + #pragma target 3.0 + + #pragma multi_compile_local __ d_Tunnel + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Mask.hlsl" + ENDHLSL + } + + Pass + { + Name "Water Surface Mask (Depth Only)" + Cull Off + ColorMask 0 + + HLSLPROGRAM + #pragma vertex Vertex + #pragma fragment Fragment + // for VFACE + #pragma target 3.0 + + #define m_Discard discard + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Mask.hlsl" + ENDHLSL + } + + Pass + { + Name "Water Horizon Mask" + Cull Off + ZWrite Off + // Horizon must be rendered first or it will overwrite the mask with incorrect values. ZTest not needed. + ZTest Always + + Stencil + { + Ref [_StencilRef] + Comp [_Crest_StencilComparison] + } + + HLSLPROGRAM + #pragma vertex Vertex + #pragma fragment Fragment + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/MaskHorizon.hlsl" + ENDHLSL + } + } + + SubShader + { + Pass + { + Name "Water Surface Mask" + // We always disable culling when rendering water mask, as we only + // use it for underwater rendering features. + Cull Off + + Stencil + { + Ref [_StencilRef] + Comp [_Crest_StencilComparison] + } + + CGPROGRAM + #pragma vertex Vertex + #pragma fragment Fragment + // for VFACE + #pragma target 3.0 + + #pragma multi_compile_local __ d_Tunnel + + #include "UnityCG.cginc" + + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/Core.hlsl" + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/InputsDriven.hlsl" + + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Mask.hlsl" + ENDCG + } + + Pass + { + Name "Water Surface Mask (Depth Only)" + Cull Off + ColorMask 0 + + CGPROGRAM + #pragma vertex Vertex + #pragma fragment Fragment + // for VFACE + #pragma target 3.0 + + #define m_Discard discard + + #include "UnityCG.cginc" + + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/Core.hlsl" + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/InputsDriven.hlsl" + + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Mask.hlsl" + ENDCG + } + + Pass + { + Name "Water Horizon Mask" + Cull Off + ZWrite Off + // Horizon must be rendered first or it will overwrite the mask with incorrect values. ZTest not needed. + ZTest Always + + Stencil + { + Ref [_StencilRef] + Comp [_Crest_StencilComparison] + } + + CGPROGRAM + #pragma vertex Vertex + #pragma fragment Fragment + + #include "UnityCG.cginc" + + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/Core.hlsl" + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/InputsDriven.hlsl" + + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/MaskHorizon.hlsl" + ENDCG + } + } +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Mask.shader.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Mask.shader.meta new file mode 100644 index 000000000..12bec02da --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Mask.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: edb653e62cc924b99b0a1086ffb39be7 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/MaskArtifacts.compute b/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/MaskArtifacts.compute new file mode 100644 index 000000000..1ba4a4689 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/MaskArtifacts.compute @@ -0,0 +1,61 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// Checks both orthogonal and diagonal pixels to fill artefacts in the mask. If checked pixels are all the same then it +// assumes that the current pixel should also be the same and fixes it. + +#pragma kernel FillMaskArtefacts + +// Built-in will not handle this for us unlike other RPs. +#pragma multi_compile __ STEREO_INSTANCING_ON + +#include "UnityCG.cginc" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/Core.hlsl" + +RW_TEXTURE2D_X(float, _Crest_WaterMaskTexture); + +[numthreads(8, 8, 1)] +void FillMaskArtefacts(const uint3 id : SV_DispatchThreadID) +{ + UNITY_XR_ASSIGN_VIEW_INDEX(id.z); + + const uint3 offset = uint3(1, -1, 0); + + // Check orthogonal pixels. + { + const float4 pixels = float4 + ( + _Crest_WaterMaskTexture[COORD_TEXTURE2D_X(id.xy + offset.xz)], + _Crest_WaterMaskTexture[COORD_TEXTURE2D_X(id.xy + offset.yz)], + _Crest_WaterMaskTexture[COORD_TEXTURE2D_X(id.xy + offset.zy)], + _Crest_WaterMaskTexture[COORD_TEXTURE2D_X(id.xy + offset.zx)] + ); + + // If these pixels are all the same, then it is valid that this pixel also equals them. + if (pixels.x == pixels.y && pixels.y == pixels.z && pixels.z == pixels.w) + { + _Crest_WaterMaskTexture[COORD_TEXTURE2D_X(id.xy)] = pixels.x; + return; + } + } + + // Check diagonal pixels. + { + const float4 pixels = float4 + ( + _Crest_WaterMaskTexture[COORD_TEXTURE2D_X(id.xy + offset.xx)], + _Crest_WaterMaskTexture[COORD_TEXTURE2D_X(id.xy + offset.yy)], + _Crest_WaterMaskTexture[COORD_TEXTURE2D_X(id.xy + offset.xy)], + _Crest_WaterMaskTexture[COORD_TEXTURE2D_X(id.xy + offset.yx)] + ); + + // If these pixels are all the same, then it is valid that this pixel also equals them. + if (pixels.x == pixels.y && pixels.y == pixels.z && pixels.z == pixels.w) + { + _Crest_WaterMaskTexture[COORD_TEXTURE2D_X(id.xy)] = pixels.x; + return; + } + } + + _Crest_WaterMaskTexture[COORD_TEXTURE2D_X(id.xy)] = _Crest_WaterMaskTexture[COORD_TEXTURE2D_X(id.xy)]; +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/MaskArtifacts.compute.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/MaskArtifacts.compute.meta new file mode 100644 index 000000000..3b67a7b58 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/MaskArtifacts.compute.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 08549c36146ad4899a07193754b21ea2 +ComputeShaderImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/MaskHorizon.hlsl b/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/MaskHorizon.hlsl new file mode 100644 index 000000000..b6484c346 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/MaskHorizon.hlsl @@ -0,0 +1,57 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// Renders the water horizon line into the mask. + +#ifndef CREST_UNDERWATER_MASK_HORIZON_SHARED_INCLUDED +#define CREST_UNDERWATER_MASK_HORIZON_SHARED_INCLUDED + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Constants.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Depth.hlsl" + +// Driven by scripting. It is a non-linear converted from a linear 0-1 value. +float _Crest_FarPlaneOffset; + +struct Attributes +{ + uint id : SV_VertexID; + UNITY_VERTEX_INPUT_INSTANCE_ID +}; + +struct Varyings +{ + float4 positionCS : SV_POSITION; + float2 uv : TEXCOORD0; + UNITY_VERTEX_OUTPUT_STEREO +}; + +Varyings Vertex(Attributes input) +{ + // This will work for all pipelines. + Varyings output = (Varyings)0; + UNITY_SETUP_INSTANCE_ID(input); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); + + output.positionCS = GetFullScreenTriangleVertexPosition(input.id, _Crest_FarPlaneOffset); + output.uv = GetFullScreenTriangleTexCoord(input.id); + + return output; +} + +half4 Fragment(Varyings input) : SV_Target +{ + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); + + float3 positionWS = ComputeWorldSpacePosition(input.uv, _Crest_FarPlaneOffset, UNITY_MATRIX_I_VP); + +#if (SHADEROPTIONS_CAMERA_RELATIVE_RENDERING != 0) + positionWS.y += _WorldSpaceCameraPos.y; +#endif + + return (half4) positionWS.y > g_Crest_WaterCenter.y + ? CREST_MASK_ABOVE_SURFACE + : CREST_MASK_BELOW_SURFACE; +} + +#endif // CREST_UNDERWATER_MASK_HORIZON_SHARED_INCLUDED diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/MaskHorizon.hlsl.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/MaskHorizon.hlsl.meta new file mode 100644 index 000000000..0a66f37a4 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/MaskHorizon.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5f5a4cb92ecd4468e84893f8257be090 +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Underwater.hlsl b/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Underwater.hlsl new file mode 100644 index 000000000..b8bc28969 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Underwater.hlsl @@ -0,0 +1,162 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/UnderwaterShared.hlsl" + +#ifndef SUPPORTS_FOVEATED_RENDERING_NON_UNIFORM_RASTER +#define FoveatedRemapLinearToNonUniform(uv) uv +#endif + +m_CrestNameSpace + +struct Attributes +{ +#if CREST_WATER_VOLUME + float3 positionOS : POSITION; +#else + uint id : SV_VertexID; +#endif + UNITY_VERTEX_INPUT_INSTANCE_ID +}; + +struct Varyings +{ + float4 positionCS : SV_POSITION; + UNITY_VERTEX_OUTPUT_STEREO +}; + +Varyings Vertex(Attributes input) +{ + Varyings output; + ZERO_INITIALIZE(Varyings, output); + UNITY_SETUP_INSTANCE_ID(input); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); + +#if CREST_WATER_VOLUME + // Use actual geometry instead of full screen triangle. + output.positionCS = TransformObjectToHClip(input.positionOS); +#else + output.positionCS = GetFullScreenTriangleVertexPosition(input.id, UNITY_RAW_FAR_CLIP_VALUE); +#endif + + return output; +} + +half4 Fragment(Varyings input) +{ + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); + + uint2 positionSS = input.positionCS.xy; + float mask = LOAD_TEXTURE2D_X(_Crest_WaterMaskTexture, positionSS).x; + + const float2 uv = FoveatedRemapLinearToNonUniform(positionSS / _ScreenSize.xy); + +#if !_DEBUG_VISUALIZE_MASK +#if !d_Meniscus + // Preserve alpha channel. + if (mask > CREST_MASK_BELOW_SURFACE) + { + discard; + } +#endif +#endif + + float rawDepth = LoadCameraDepth(positionSS); + half3 sceneColour = LOAD_TEXTURE2D_X(_Crest_CameraColorTexture, positionSS).rgb; + const float rawMaskDepth = LOAD_TEXTURE2D_X(_Crest_WaterMaskDepthTexture, positionSS).x; + +#if _DEBUG_VISUALIZE_STENCIL + return DebugRenderStencil(sceneColour); +#endif + + bool isWaterSurface; bool isUnderwater; bool hasCaustics; bool hasMeniscus; float sceneZ; float meniscusRawDepth; + GetWaterSurfaceAndUnderwaterData(input.positionCS, positionSS, rawMaskDepth, mask, rawDepth, meniscusRawDepth, isWaterSurface, isUnderwater, hasCaustics, hasMeniscus, sceneZ); + + float wt = 1.0; + + if (hasMeniscus) + { + wt = ComputeMeniscusWeight(positionSS, mask, _Crest_HorizonNormal, sceneZ); + } + +#if !_DEBUG_VISUALIZE_MASK +#if d_Meniscus + // Preserve alpha channel. + if (!isUnderwater && wt >= 1.0) + { + discard; + } +#endif +#endif + + float fogDistance = sceneZ; + float meniscusDepth = 0.0; +#if defined(CREST_WATER_VOLUME) || defined(CREST_WATER_VOLUME_FULLSCREEN) + ApplyWaterVolumeToUnderwaterFogAndMeniscus(input.positionCS, meniscusRawDepth, fogDistance, meniscusDepth); +#endif + +#if _DEBUG_VISUALIZE_MASK + return DebugRenderWaterMask(isWaterSurface, isUnderwater, mask, sceneColour); +#endif + + if (isUnderwater) + { + float3 positionWS = ComputeWorldSpacePosition(uv, rawDepth, UNITY_MATRIX_I_VP); + const half3 view = GetWorldSpaceNormalizeViewDir(positionWS); +#if (SHADEROPTIONS_CAMERA_RELATIVE_RENDERING != 0) + positionWS += _WorldSpaceCameraPos; +#endif + sceneColour = ApplyUnderwaterEffect(sceneColour, rawDepth, sceneZ, fogDistance, view, positionSS, positionWS, hasCaustics); + } + + return half4(wt * sceneColour, 1.0); +} + +half4 FragmentPlanarReflections(Varyings input) +{ + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); + + const uint2 positionSS = input.positionCS.xy; + float depth = LoadCameraDepth(positionSS); + + // TODO: Do something nicer. Could zero alpha if scene depth is above threshold. + if (depth == 0.0) + { + return half4(_Crest_Scattering.xyz, 1.0); + } + + half3 color = LOAD_TEXTURE2D_X(_Crest_CameraColorTexture, positionSS).rgb; + + // Calculate position and account for possible NaNs discovered during testing. + float3 positionWS; + { + float4 positionCS = ComputeClipSpacePosition(positionSS / _ScreenSize.xy, depth); + float4 hpositionWS = mul(UNITY_MATRIX_I_VP, positionCS); + + // w is sometimes zero when using oblique projection. + // Zero is better than NaN. + positionWS = hpositionWS.w > 0.0 ? hpositionWS.xyz / hpositionWS.w : 0.0; + } + +#if (SHADEROPTIONS_CAMERA_RELATIVE_RENDERING != 0) + positionWS += _WorldSpaceCameraPos; +#endif + + const half3 view = GetWorldSpaceNormalizeViewDir(positionWS); + const bool hasCaustics = depth > 0.0; + + color = ApplyUnderwaterEffect(color, depth, 0.0, 0.0, view, positionSS, positionWS, hasCaustics); + + return half4(color, 1.0); +} + +m_CrestNameSpaceEnd + +m_CrestVertex +m_CrestFragment(half4) + +half4 FragmentPlanarReflections(m_Crest::Varyings input) : SV_Target +{ + return m_Crest::FragmentPlanarReflections(input); +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Underwater.hlsl.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Underwater.hlsl.meta new file mode 100644 index 000000000..8df1629f8 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Underwater.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 2636ae353ea154204861c022e68003df +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Underwater.shader b/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Underwater.shader new file mode 100644 index 000000000..d711715cc --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Underwater.shader @@ -0,0 +1,735 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +Shader "Crest/Underwater" +{ + Properties + { + _Crest_ExtinctionMultiplier("Density Factor", Range(0, 1)) = 1 + _Crest_SunBoost("Sun Boost", Range(0, 100)) = 2 + + _Crest_OutScatteringFactor("Out-Scattering Factor", Range(0, 1)) = 0.2 + _Crest_OutScatteringExtinctionFactor("Out-Scattering Extinction Factor", Range(0, 1)) = 0.2 + + [Space(10)] + + [Toggle(d_Dithering)] + _Crest_DitheringEnabled("Dithering", Integer) = 1 + _Crest_DitheringIntensity("Dithering Intensity", Range(0, 10)) = 1 + + [Space(10)] + + [Toggle(d_Meniscus)] + _Crest_MeniscusEnabled("Meniscus", Integer) = 1 + + [Header(Advanced)] + [Space(6)] + + // This adds an offset to the cascade index when sampling water data, in effect smoothing/blurring it. Default + // to shifting the maximum amount (shift from lod 0 to penultimate lod - dont use last lod as it cross-fades + // data in/out), as more filtering was better in testing. + [CrestIntegerRange] + _Crest_DataSliceOffset("Filter Water Data", Integer) = 13 + + [HideInInspector] + _Crest_Version("Version", Integer) = 0 + + [Header(Copied From Water Surface)] + [Space(6)] + + [PerRendererData] _Crest_AbsorptionColor("Absorption Color", Color) = (0.3416268, 0.6954546, 0.85, 0.1019608) + [PerRendererData] _Crest_Scattering("Scattering", Color) = (0, 0.09803922, 0.2, 1) + [PerRendererData] _Crest_Anisotropy("Anisotropy", Range(0, 1)) = 0.5 + [PerRendererData] _Crest_DirectTerm("Direct Term", Float) = 1 + [PerRendererData] _Crest_AmbientTerm("Ambient Term", Float) = 1 + [PerRendererData] _Crest_ShadowsAffectsAmbientFactor("Shadows Affects Ambient Factor", Float) = 0.5 + + // Caustics + [PerRendererData] [ToggleUI] _Crest_CausticsEnabled("Caustics Enabled", Float) = 1 + [PerRendererData] [NoScaleOffset] _Crest_CausticsTexture("Caustics Texture", 2D) = "black" {} + [PerRendererData] _Crest_CausticsStrength("Caustics Strength", Range(0, 10)) = 3.2 + [PerRendererData] _Crest_CausticsTextureScale("Caustics Scale", Range(0.01, 100)) = 50 + [PerRendererData] _Crest_CausticsScrollSpeed("Caustics Scroll Speed", Range(0, 10)) = 1 + [PerRendererData] _Crest_CausticsTextureAverage("Caustics Grey Point", Range(0, 1)) = 0.07 + [PerRendererData] _Crest_CausticsFocalDepth("Caustics Focal Depth", Range(0, 25)) = 2 + [PerRendererData] _Crest_CausticsDepthOfField("Caustics Depth of Field", Range(0.01, 10)) = 6 + [PerRendererData] [NoScaleOffset] _Crest_CausticsDistortionTexture("Caustics Distortion Texture", 2D) = "grey" {} + [PerRendererData] _Crest_CausticsDistortionStrength("Caustics Distortion Strength", Range(0, 0.25)) = 0.16 + [PerRendererData] _Crest_CausticsDistortionScale("Caustics Distortion Scale", Range(0.01, 1000)) = 250 + [PerRendererData] _Crest_CausticsMotionBlur("Caustics Motion Blur", Range(0, 10)) = 1 + [PerRendererData] [Toggle] CREST_FLOW("Flow Enabled", Float) = 0 + } + + HLSLINCLUDE + #pragma vertex Vertex + + // #pragma enable_d3d11_debug_symbols + + // Also on the water shader. + #pragma multi_compile_local_fragment __ CREST_FLOW_ON + + #pragma shader_feature_local_fragment __ d_Meniscus + #pragma shader_feature_local_fragment __ d_Dithering + + #pragma multi_compile_local_fragment __ _DEBUG_VISUALIZE_MASK + #pragma multi_compile_local_fragment __ _DEBUG_VISUALIZE_STENCIL + ENDHLSL + + SubShader + { + PackageRequirements + { + "com.unity.render-pipelines.high-definition" + } + + Tags { "RenderPipeline"="HDRenderPipeline" } + + ZWrite Off + Blend Off + + Pass + { + Name "Full Screen" + Cull Off + ZTest Always + + HLSLPROGRAM + #include_with_pragmas "UnderwaterHDRP.hlsl" + + // Both "__" and "_FULL_SCREEN_EFFECT" are fullscreen triangles. The latter only denotes an optimisation of + // whether to skip the horizon calculation. + #pragma multi_compile_local_fragment __ _FULL_SCREEN_EFFECT + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Underwater.hlsl" + + #pragma fragment Fragment + ENDHLSL + } + + Pass + { + Name "Reflection" + Cull Off + ZTest Always + + HLSLPROGRAM + #define CREST_REFLECTION 1 + #include_with_pragmas "UnderwaterHDRP.hlsl" + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Underwater.hlsl" + + #pragma fragment FragmentPlanarReflections + ENDHLSL + } + + Pass + { + PackageRequirements + { + "com.waveharmonic.crest.portals" + } + + // Only adds fog to the front face and in effect anything behind it. + Name "Volume: Front Face (2D)" + Cull Back + ZTest LEqual + + HLSLPROGRAM + #include_with_pragmas "UnderwaterHDRP.hlsl" + + #define CREST_WATER_VOLUME 1 + #define CREST_WATER_VOLUME_FRONT_FACE 1 + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Underwater.hlsl" + + #pragma fragment Fragment + ENDHLSL + } + + Pass + { + PackageRequirements + { + "com.waveharmonic.crest.portals" + } + + // Only adds fog to the front face and in effect anything behind it. + Name "Volume: Front Face (3D)" + Cull Back + ZTest LEqual + + HLSLPROGRAM + #include_with_pragmas "UnderwaterHDRP.hlsl" + + #define CREST_WATER_VOLUME 1 + #define CREST_WATER_VOLUME_HAS_BACKFACE 1 + #define CREST_WATER_VOLUME_FRONT_FACE 1 + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Underwater.hlsl" + + #pragma fragment Fragment + ENDHLSL + } + + Pass + { + PackageRequirements + { + "com.waveharmonic.crest.portals" + } + + // Only adds fog to the front face and in effect anything behind it. + Name "Volume: Front Face (Fly-Through)" + Cull Back + ZTest LEqual + + Stencil + { + // Must match k_StencilValueVolume in: + // Portals.cs + Ref 5 + Comp Always + Pass Replace + ZFail IncrSat + } + + HLSLPROGRAM + #include_with_pragmas "UnderwaterHDRP.hlsl" + + #define CREST_WATER_VOLUME 1 + #define CREST_WATER_VOLUME_HAS_BACKFACE 1 + #define CREST_WATER_VOLUME_FRONT_FACE 1 + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Underwater.hlsl" + + #pragma fragment Fragment + ENDHLSL + } + + Pass + { + // Back face will only render if view is within the volume and there is no scene in front. It will only add + PackageRequirements + { + "com.waveharmonic.crest.portals" + } + + // fog to the back face (and in effect anything behind it). No caustics. + Name "Volume: Back Face" + Cull Front + ZTest LEqual + + Stencil + { + // Must match k_StencilValueVolume in: + // Portals.cs + Ref 5 + Comp NotEqual + Pass Replace + ZFail IncrSat + } + + HLSLPROGRAM + #include_with_pragmas "UnderwaterHDRP.hlsl" + + #define CREST_WATER_VOLUME 1 + #define CREST_WATER_VOLUME_BACK_FACE 1 + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Underwater.hlsl" + + #pragma fragment Fragment + ENDHLSL + } + + Pass + { + PackageRequirements + { + "com.waveharmonic.crest.portals" + } + + // When inside a volume, this pass will render to the scene within the volume. + Name "Volume: Scene (Full Screen)" + Cull Back + ZTest Always + Stencil + { + // We want to render over the scene that's inside the volume, but not over already fogged areas. It will + // handle all of the scene within the geometry once the camera is within the volume. + // 0 = Outside of geometry as neither face passes have touched it. + // 1 = Only back face z failed which means scene is in front of back face but not front face. + // 2 = Both front and back face z failed which means outside geometry. + Ref 1 + Comp Equal + Pass Replace + } + + HLSLPROGRAM + #include_with_pragmas "UnderwaterHDRP.hlsl" + + #define CREST_WATER_VOLUME_FULLSCREEN 1 + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Underwater.hlsl" + + #pragma fragment Fragment + ENDHLSL + } + + Pass + { + PackageRequirements + { + "com.waveharmonic.crest.portals" + } + + Name "Volume: Negative (Full Screen)" + Cull Off + ZTest Always + + HLSLPROGRAM + #include_with_pragmas "UnderwaterHDRP.hlsl" + + #define CREST_WATER_VOLUME_FULLSCREEN 1 + #define CREST_WATER_VOLUME_NEGATIVE 1 + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Underwater.hlsl" + + #pragma fragment Fragment + ENDHLSL + } + } + + Subshader + { + PackageRequirements + { + "com.unity.render-pipelines.universal" + } + + Tags { "RenderPipeline"="UniversalPipeline" } + + ZWrite Off + + Pass + { + Name "Full Screen" + Cull Off + ZTest Always + + HLSLPROGRAM + #include_with_pragmas "UnderwaterURP.hlsl" + #include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl" + + // Both "__" and "_FULL_SCREEN_EFFECT" are fullscreen triangles. The latter only denotes an optimisation of + // whether to skip the horizon calculation. + #pragma multi_compile_local_fragment __ _FULL_SCREEN_EFFECT + + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Underwater.hlsl" + + #pragma fragment Fragment + ENDHLSL + } + + Pass + { + Name "Reflection" + Cull Off + ZTest Always + + HLSLPROGRAM + #define CREST_REFLECTION 1 + #include_with_pragmas "UnderwaterURP.hlsl" + #include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl" + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Underwater.hlsl" + + #pragma fragment FragmentPlanarReflections + ENDHLSL + } + + Pass + { + PackageRequirements + { + "com.waveharmonic.crest.portals" + } + + // Only adds fog to the front face and in effect anything behind it. + Name "Volume: Front Face (2D)" + Cull Back + ZTest LEqual + + HLSLPROGRAM + #include_with_pragmas "UnderwaterURP.hlsl" + #include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl" + + #define CREST_WATER_VOLUME 1 + #define CREST_WATER_VOLUME_FRONT_FACE 1 + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Underwater.hlsl" + + #pragma fragment Fragment + ENDHLSL + } + + Pass + { + PackageRequirements + { + "com.waveharmonic.crest.portals" + } + + // Only adds fog to the front face and in effect anything behind it. + Name "Volume: Front Face (3D)" + Cull Back + ZTest LEqual + + HLSLPROGRAM + #include_with_pragmas "UnderwaterURP.hlsl" + #include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl" + + #define CREST_WATER_VOLUME 1 + #define CREST_WATER_VOLUME_HAS_BACKFACE 1 + #define CREST_WATER_VOLUME_FRONT_FACE 1 + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Underwater.hlsl" + + #pragma fragment Fragment + ENDHLSL + } + + Pass + { + PackageRequirements + { + "com.waveharmonic.crest.portals" + } + + // Only adds fog to the front face and in effect anything behind it. + Name "Volume: Front Face (Fly-Through)" + Cull Back + ZTest LEqual + + Stencil + { + // Must match k_StencilValueVolume in: + // Portals.cs + Ref 5 + Comp Always + Pass Replace + ZFail IncrSat + } + + HLSLPROGRAM + #include_with_pragmas "UnderwaterURP.hlsl" + #include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl" + + #define CREST_WATER_VOLUME 1 + #define CREST_WATER_VOLUME_HAS_BACKFACE 1 + #define CREST_WATER_VOLUME_FRONT_FACE 1 + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Underwater.hlsl" + + #pragma fragment Fragment + ENDHLSL + } + + Pass + { + // Back face will only render if view is within the volume and there is no scene in front. It will only add + PackageRequirements + { + "com.waveharmonic.crest.portals" + } + + // fog to the back face (and in effect anything behind it). No caustics. + Name "Volume: Back Face" + Cull Front + ZTest LEqual + + Stencil + { + // Must match k_StencilValueVolume in: + // Portals.cs + Ref 5 + Comp NotEqual + Pass Replace + ZFail IncrSat + } + + HLSLPROGRAM + #include_with_pragmas "UnderwaterURP.hlsl" + #include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl" + + #define CREST_WATER_VOLUME 1 + #define CREST_WATER_VOLUME_BACK_FACE 1 + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Underwater.hlsl" + + #pragma fragment Fragment + ENDHLSL + } + + Pass + { + PackageRequirements + { + "com.waveharmonic.crest.portals" + } + + // When inside a volume, this pass will render to the scene within the volume. + Name "Volume: Scene (Full Screen)" + Cull Back + ZTest Always + Stencil + { + // We want to render over the scene that's inside the volume, but not over already fogged areas. It will + // handle all of the scene within the geometry once the camera is within the volume. + // 0 = Outside of geometry as neither face passes have touched it. + // 1 = Only back face z failed which means scene is in front of back face but not front face. + // 2 = Both front and back face z failed which means outside geometry. + Ref 1 + Comp Equal + Pass Replace + } + + HLSLPROGRAM + #include_with_pragmas "UnderwaterURP.hlsl" + #include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl" + + #define CREST_WATER_VOLUME_FULLSCREEN 1 + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Underwater.hlsl" + + #pragma fragment Fragment + ENDHLSL + } + + Pass + { + PackageRequirements + { + "com.waveharmonic.crest.portals" + } + + Name "Volume: Negative (Full Screen)" + Cull Off + ZTest Always + + HLSLPROGRAM + #include_with_pragmas "UnderwaterURP.hlsl" + #include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl" + + #define CREST_WATER_VOLUME_FULLSCREEN 1 + #define CREST_WATER_VOLUME_NEGATIVE 1 + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Underwater.hlsl" + + #pragma fragment Fragment + ENDHLSL + } + } + + SubShader + { + ZWrite Off + + Pass + { + Name "Full Screen" + Cull Off + ZTest Always + + HLSLPROGRAM + #include_with_pragmas "UnderwaterBIRP.hlsl" + + // Both "__" and "_FULL_SCREEN_EFFECT" are fullscreen triangles. The latter only denotes an optimisation of + // whether to skip the horizon calculation. + #pragma multi_compile_local_fragment __ _FULL_SCREEN_EFFECT + + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Underwater.hlsl" + + #pragma fragment Fragment + ENDHLSL + } + + Pass + { + Name "Reflection" + Cull Off + ZTest Always + + HLSLPROGRAM + #define CREST_REFLECTION 1 + #include_with_pragmas "UnderwaterBIRP.hlsl" + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Underwater.hlsl" + + #pragma fragment FragmentPlanarReflections + ENDHLSL + } + + Pass + { + PackageRequirements + { + "com.waveharmonic.crest.portals" + } + + // Only adds fog to the front face and in effect anything behind it. + Name "Volume: Front Face (2D)" + Cull Back + ZTest LEqual + + HLSLPROGRAM + #include_with_pragmas "UnderwaterBIRP.hlsl" + + #define CREST_WATER_VOLUME 1 + #define CREST_WATER_VOLUME_FRONT_FACE 1 + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Underwater.hlsl" + + #pragma fragment Fragment + ENDHLSL + } + + Pass + { + PackageRequirements + { + "com.waveharmonic.crest.portals" + } + + // Only adds fog to the front face and in effect anything behind it. + Name "Volume: Front Face (3D)" + Cull Back + ZTest LEqual + + HLSLPROGRAM + #include_with_pragmas "UnderwaterBIRP.hlsl" + + #define CREST_WATER_VOLUME 1 + #define CREST_WATER_VOLUME_HAS_BACKFACE 1 + #define CREST_WATER_VOLUME_FRONT_FACE 1 + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Underwater.hlsl" + + #pragma fragment Fragment + ENDHLSL + } + + Pass + { + PackageRequirements + { + "com.waveharmonic.crest.portals" + } + + // Only adds fog to the front face and in effect anything behind it. + Name "Volume: Front Face (Fly-Through)" + Cull Back + ZTest LEqual + + Stencil + { + // Must match k_StencilValueVolume in: + // Portals.cs + Ref 5 + Comp Always + Pass Replace + ZFail IncrSat + } + + HLSLPROGRAM + #include_with_pragmas "UnderwaterBIRP.hlsl" + + #define CREST_WATER_VOLUME 1 + #define CREST_WATER_VOLUME_HAS_BACKFACE 1 + #define CREST_WATER_VOLUME_FRONT_FACE 1 + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Underwater.hlsl" + + #pragma fragment Fragment + ENDHLSL + } + + Pass + { + // Back face will only render if view is within the volume and there is no scene in front. It will only add + PackageRequirements + { + "com.waveharmonic.crest.portals" + } + + // fog to the back face (and in effect anything behind it). No caustics. + Name "Volume: Back Face" + Cull Front + ZTest LEqual + + Stencil + { + // Must match k_StencilValueVolume in: + // Portals.cs + Ref 5 + Comp NotEqual + Pass Replace + ZFail IncrSat + } + + HLSLPROGRAM + #include_with_pragmas "UnderwaterBIRP.hlsl" + + #define CREST_WATER_VOLUME 1 + #define CREST_WATER_VOLUME_BACK_FACE 1 + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Underwater.hlsl" + + #pragma fragment Fragment + ENDHLSL + } + + Pass + { + PackageRequirements + { + "com.waveharmonic.crest.portals" + } + + // When inside a volume, this pass will render to the scene within the volume. + Name "Volume: Scene (Full Screen)" + Cull Back + ZTest Always + Stencil + { + // We want to render over the scene that's inside the volume, but not over already fogged areas. It will + // handle all of the scene within the geometry once the camera is within the volume. + // 0 = Outside of geometry as neither face passes have touched it. + // 1 = Only back face z failed which means scene is in front of back face but not front face. + // 2 = Both front and back face z failed which means outside geometry. + Ref 1 + Comp Equal + Pass Replace + } + + HLSLPROGRAM + #include_with_pragmas "UnderwaterBIRP.hlsl" + + #define CREST_WATER_VOLUME_FULLSCREEN 1 + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Underwater.hlsl" + + #pragma fragment Fragment + ENDHLSL + } + + Pass + { + PackageRequirements + { + "com.waveharmonic.crest.portals" + } + + Name "Volume: Negative (Full Screen)" + Cull Off + ZTest Always + + HLSLPROGRAM + #include_with_pragmas "UnderwaterBIRP.hlsl" + + #define CREST_WATER_VOLUME_FULLSCREEN 1 + #define CREST_WATER_VOLUME_NEGATIVE 1 + #include "Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Underwater.hlsl" + + #pragma fragment Fragment + ENDHLSL + } + } + CustomEditor "WaveHarmonic.Crest.Editor.CustomShaderGUI" +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Underwater.shader.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Underwater.shader.meta new file mode 100644 index 000000000..1bb6e8c50 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/Underwater.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 034b985bd9c344992af148e26d2cdb24 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/UnderwaterBIRP.hlsl b/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/UnderwaterBIRP.hlsl new file mode 100644 index 000000000..0fb106ed1 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/UnderwaterBIRP.hlsl @@ -0,0 +1,28 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#define BUILTIN_TARGET_API 1 + +#define CREST_BIRP 1 +#define CREST_SHADERGRAPH_CONSTANTS_H + +#include "Packages/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/ShaderLibrary/Shim/Shims.hlsl" +#include "Packages/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/ShaderLibrary/Core.hlsl" +#include "Packages/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/ShaderLibrary/Lighting.hlsl" +#include "Packages/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/Editor/ShaderGraph/Includes/LegacySurfaceVertex.hlsl" +#include "Packages/com.unity.shadergraph/Editor/Generation/Targets/BuiltIn/ShaderLibrary/ShaderGraphFunctions.hlsl" + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/InputsDriven.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Legacy/Common.hlsl" + +TEXTURE2D_X(_CameraDepthTexture); SAMPLER(sampler_CameraDepthTexture); + +m_CrestNameSpace + +float LoadCameraDepth(uint2 pixelCoords) +{ + return LOAD_TEXTURE2D_X(_CameraDepthTexture, pixelCoords).r; +} + +m_CrestNameSpaceEnd diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/UnderwaterBIRP.hlsl.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/UnderwaterBIRP.hlsl.meta new file mode 100644 index 000000000..f5f71a1b3 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/UnderwaterBIRP.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 765d2ceee80af4bd5a637f79488a3433 +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/UnderwaterHDRP.hlsl b/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/UnderwaterHDRP.hlsl new file mode 100644 index 000000000..1ff81d1e7 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/UnderwaterHDRP.hlsl @@ -0,0 +1,18 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#pragma target 4.5 + +// Low appears good enough as it has filtering which is necessary when close to a shadow. +#define SHADOW_LOW +#define AREA_SHADOW_LOW + +// In shared SG code we target the forward pass to avoid shader compilation errors. +#define CREST_HDRP 1 +#define SHADERPASS SHADERPASS_FORWARD +#define CREST_HDRP_FORWARD_PASS 1 +#define CREST_SHADERGRAPH_CONSTANTS_H + +#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" +#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/CommonMaterial.hlsl" +#include "Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl" diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/UnderwaterHDRP.hlsl.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/UnderwaterHDRP.hlsl.meta new file mode 100644 index 000000000..d3191fa45 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/UnderwaterHDRP.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 3b3db686f3a7746698c6193fcdc22ff2 +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/UnderwaterShared.hlsl b/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/UnderwaterShared.hlsl new file mode 100644 index 000000000..81b022d98 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/UnderwaterShared.hlsl @@ -0,0 +1,485 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#ifndef CREST_UNDERWATER_EFFECT_SHARED_INCLUDED +#define CREST_UNDERWATER_EFFECT_SHARED_INCLUDED + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Settings.Crest.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Constants.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/InputsDriven.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Helpers.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Depth.hlsl" + +#if defined(CREST_WATER_VOLUME) || defined(CREST_WATER_VOLUME_FULLSCREEN) +#include "Packages/com.waveharmonic.crest.portals/Runtime/Shaders/Library/Portals.hlsl" +#endif + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Cascade.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Texture.hlsl" + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Utility/Lighting.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/VolumeLighting.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Surface/Caustics.hlsl" + +// These are set via call to CopyPropertiesFromMaterial() and must have the same +// names as the surface material parameters. +CBUFFER_START(CrestPerMaterial) + +// +// Surface Shared +// + +half4 _Crest_Absorption; +half4 _Crest_Scattering; +half _Crest_Anisotropy; + +bool _Crest_CausticsEnabled; +float _Crest_CausticsTextureScale; +float _Crest_CausticsScrollSpeed; +float _Crest_CausticsTextureAverage; +float _Crest_CausticsStrength; +float _Crest_CausticsFocalDepth; +float _Crest_CausticsDepthOfField; +float _Crest_CausticsDistortionStrength; +float _Crest_CausticsDistortionScale; +half _Crest_CausticsMotionBlur; +float4 _Crest_CausticsTexture_TexelSize; +float4 _Crest_CausticsDistortionTexture_TexelSize; + +half _Crest_DirectTerm; +half _Crest_AmbientTerm; +half _Crest_ShadowsAffectsAmbientFactor; + +// +// Volume Only +// + +float2 _Crest_HorizonNormal; + +// Out-scattering. Driven by the Water Renderer and Underwater Environmental Lighting. +float _Crest_VolumeExtinctionLength; +float _Crest_UnderwaterEnvironmentalLightingWeight; + +// Also applied to transparent objects. +half _Crest_ExtinctionMultiplier; +half _Crest_SunBoost; +float _Crest_OutScatteringFactor; +float _Crest_OutScatteringExtinctionFactor; +half3 _Crest_AmbientLighting; +int _Crest_DataSliceOffset; + +half _Crest_DitheringIntensity; +CBUFFER_END + +TEXTURE2D_X(_Crest_WaterMaskTexture); +TEXTURE2D_X(_Crest_WaterMaskDepthTexture); +TEXTURE2D_X(_Crest_CameraColorTexture); + +TEXTURE2D(_Crest_CausticsTexture); +SAMPLER(sampler_Crest_CausticsTexture); +TEXTURE2D(_Crest_CausticsDistortionTexture); +SAMPLER(sampler_Crest_CausticsDistortionTexture); + +// NOTE: Cannot put this in namespace due to compiler bug. Fixed when using DXC. +static const m_Crest::TiledTexture _Crest_CausticsTiledTexture = + m_Crest::TiledTexture::Make(_Crest_CausticsTexture, sampler_Crest_CausticsTexture, _Crest_CausticsTexture_TexelSize, _Crest_CausticsTextureScale, _Crest_CausticsScrollSpeed); +static const m_Crest::TiledTexture _Crest_CausticsDistortionTiledTexture = + m_Crest::TiledTexture::Make(_Crest_CausticsDistortionTexture, sampler_Crest_CausticsDistortionTexture, _Crest_CausticsDistortionTexture_TexelSize, _Crest_CausticsDistortionScale, 1.0); + +m_CrestNameSpace + +float LinearToDeviceDepth(float linearDepth, float4 zBufferParam) +{ + //linear = 1.0 / (zBufferParam.z * device + zBufferParam.w); + float device = (1.0 / linearDepth - zBufferParam.w) / zBufferParam.z; + return device; +} + +#if d_Dithering +// Adapted from: +// https://alex.vlachos.com/graphics/Alex_Vlachos_Advanced_VR_Rendering_GDC2015.pdf +float3 ScreenSpaceDither(const float2 i_ScreenPosition) +{ + // Iestyn's RGB dither (7 asm instructions) from Portal 2 X360, slightly modified for VR. + float3 dither = dot(float2(171.0, 231.0), i_ScreenPosition.xy); + dither.rgb = frac(dither.rgb / float3(103.0, 71.0, 97.0)) - float3(0.5, 0.5, 0.5); + return (dither.rgb / 255.0); +} +#endif + +float4 DebugRenderWaterMask(const bool isWaterSurface, const bool isUnderwater, const float mask, const float3 sceneColour) +{ + // Red: surface front face when above water + // Green: surface back face when below water + // Cyan: background when above water + // Magenta: background when below water + if (isWaterSurface) + { + return float4(sceneColour * float3(mask >= CREST_MASK_ABOVE_SURFACE, mask <= CREST_MASK_BELOW_SURFACE, 0.0), 1.0); + } + else + { + return float4(sceneColour * float3(isUnderwater * 0.5, (1.0 - isUnderwater) * 0.5, 1.0), 1.0); + } +} + +float4 DebugRenderStencil(float3 sceneColour) +{ + float3 stencil = 1.0; +#if CREST_WATER_VOLUME_FRONT_FACE + stencil = float3(1.0, 0.0, 0.0); +#elif CREST_WATER_VOLUME_BACK_FACE + stencil = float3(0.0, 1.0, 0.0); +#elif CREST_WATER_VOLUME_FULLSCREEN + stencil = float3(0.0, 0.0, 1.0); +#endif + return float4(sceneColour * stencil, 1.0); +} + +float MeniscusSampleWaterMask(const float mask, const int2 positionSS, const float2 offset, const float magnitude, const float scale) +{ + float2 uv = positionSS + offset * magnitude +#if defined(CREST_WATER_VOLUME) || defined(CREST_WATER_VOLUME_FULLSCREEN) + * scale +#endif + ; + + float newMask = LOAD_TEXTURE2D_X(_Crest_WaterMaskTexture, uv).r; + +#if CREST_UNDERWATER_BEFORE_TRANSPARENT + // Normalize mask. + newMask = clamp(newMask, -1.0, 1.0); +#endif + +#if CREST_WATER_VOLUME + // No mask means no underwater effect so ignore the value. + return (newMask == CREST_MASK_NONE ? mask : newMask); +#endif + return newMask; +} + +half ComputeMeniscusWeight(const int2 positionSS, float mask, const float2 horizonNormal, const float meniscusDepth) +{ + float weight = 1.0; +#if d_Meniscus +#if !_FULL_SCREEN_EFFECT + +#if CREST_UNDERWATER_BEFORE_TRANSPARENT + // Normalize mask. + mask = clamp(mask, -1.0, 1.0); +#endif + + // Render meniscus by checking the mask along the horizon normal which is flipped using the surface normal from + // mask. Adding the mask value will flip the UV when mask is below surface. + float2 offset = (float2)-mask * horizonNormal; + float multiplier = 0.9; + +#if defined(CREST_WATER_VOLUME) || defined(CREST_WATER_VOLUME_FULLSCREEN) + // The meniscus at the boundary can be at a distance. We need to scale the offset as 1 pixel at a distance is much + // larger than 1 pixel up close. + const float scale = 1.0 - saturate(meniscusDepth / MENISCUS_MAXIMUM_DISTANCE); + + // Exit early. + if (scale == 0.0) + { + return 1.0; + } +#else + // Dummy value. + const float scale = 0.0; +#endif + + // Sample three pixels along the normal. If the sample is different than the current mask, apply meniscus. + // Offset must be added to positionSS as floats. + weight *= (MeniscusSampleWaterMask(mask, positionSS, offset, 1.0, scale) != mask) ? multiplier : 1.0; + weight *= (MeniscusSampleWaterMask(mask, positionSS, offset, 2.0, scale) != mask) ? multiplier : 1.0; + weight *= (MeniscusSampleWaterMask(mask, positionSS, offset, 3.0, scale) != mask) ? multiplier : 1.0; +#endif // _FULL_SCREEN_EFFECT +#endif // d_Meniscus + return weight; +} + +void GetWaterSurfaceAndUnderwaterData +( + const float4 positionCS, + const int2 positionSS, + const float rawMaskDepth, + const float mask, + inout float rawDepth, + inout float rawMeniscusDepth, + inout bool isWaterSurface, + inout bool isUnderwater, + inout bool hasCaustics, + inout bool hasMeniscus, + inout float sceneZ +) +{ + const float rawSceneDepth = rawDepth; + hasCaustics = rawDepth != 0.0; + isWaterSurface = false; + isUnderwater = mask <= CREST_MASK_BELOW_SURFACE; + hasMeniscus = true; + rawMeniscusDepth = positionCS.z; + +#if defined(CREST_WATER_VOLUME_HAS_BACKFACE) || defined(CREST_WATER_VOLUME_BACK_FACE) || defined(CREST_WATER_VOLUME_NEGATIVE) + const float rawGeometryDepth = +#if CREST_WATER_VOLUME_HAS_BACKFACE + // 3D has a back face texture for the depth. + LOAD_DEPTH_TEXTURE_X(_Crest_WaterVolumeBackFaceTexture, positionSS); +#elif CREST_WATER_VOLUME_NEGATIVE + LOAD_DEPTH_TEXTURE_X(_Crest_WaterVolumeFrontFaceTexture, positionSS); +#else + // Volume is rendered using the back face so that is the depth. + positionCS.z; +#endif // CREST_WATER_VOLUME_HAS_BACKFACE + ; + + if ((rawMaskDepth > 0.0 && rawMaskDepth <= rawSceneDepth) || (rawGeometryDepth > 0.0 && rawGeometryDepth <= rawSceneDepth)) + { + hasMeniscus = false; + } + + // Use backface depth if closest. + if (rawDepth < rawGeometryDepth) + { + // Cancels out caustics. + hasCaustics = false; + rawDepth = rawGeometryDepth; + } + +#if CREST_WATER_VOLUME_NEGATIVE + rawMeniscusDepth = rawGeometryDepth; + if (rawGeometryDepth == 0.0) + { + const float rawBackFaceDepth = LOAD_DEPTH_TEXTURE_X(_Crest_WaterVolumeBackFaceTexture, positionSS); + + // We are in the negative volume. Already handled by front face. + if (rawBackFaceDepth > 0.0) + { + if (rawBackFaceDepth <= rawSceneDepth) + { + hasMeniscus = false; + } + + isUnderwater = false; + } + } +#endif // CREST_WATER_VOLUME_NEGATIVE +#endif // CREST_WATER_VOLUME + +#if CREST_WATER_VOLUME_FRONT_FACE + // If negative volume, we keep the mask intact, and just mark it. + if (mask >= CREST_MASK_ABOVE_SURFACE_KEPT) + { + isUnderwater = true; + } + else if (mask <= CREST_MASK_BELOW_SURFACE_KEPT) + { + isUnderwater = false; + } +#endif + + // Merge water depth with scene depth. + if (rawDepth < rawMaskDepth) + { +#if CREST_UNDERWATER_BEFORE_TRANSPARENT + // Apply fog to culled tiles otherwise there will be no fog as water shader can only fog enabled tiles. And + // only apply fog to culled tiles otherwise it will be fogged twice (second by water shader). + isUnderwater = mask <= CREST_MASK_BELOW_SURFACE_CULLED; +#endif + isWaterSurface = true; + hasCaustics = false; + rawDepth = rawMaskDepth; + } + + sceneZ = Utility::CrestLinearEyeDepth(rawDepth); +} + +void ApplyWaterVolumeToUnderwaterFogAndMeniscus(float4 positionCS, const float meniscusRawDepth, inout float fogDistance, inout float meniscusDepth) +{ +#if CREST_WATER_VOLUME_FRONT_FACE + float depth = Utility::CrestLinearEyeDepth(positionCS.z); + // Meniscus is rendered at the boundary so use the geometry z. + meniscusDepth = depth; + fogDistance -= depth; +#else + float depth = Utility::CrestLinearEyeDepth(meniscusRawDepth); + // Meniscus is rendered at the boundary so use the geometry z. + meniscusDepth = depth; +#endif +} + +half3 ApplyUnderwaterEffect( + half3 sceneColour, + const float rawDepth, + const float sceneZ, + const float fogDistance, + const half3 view, + const uint2 i_positionSS, + const float3 i_positionWS, + const bool hasCaustics +) { + const bool isUnderwater = true; + + float3 lightDirection; float3 lightColor; + PrimaryLight(i_positionWS, lightColor, lightDirection); + + // Uniform effect calculated from camera position. + half3 volumeLight = 0.0; + half3 volumeOpacity = 1.0; + { + half3 absorption = _Crest_Absorption.xyz; + half3 scattering = _Crest_Scattering.xyz; + + // We sample shadows at the camera position. Pass a user defined slice offset for smoothing out detail. + // Offset slice so that we dont get high freq detail. But never use last lod as this has crossfading. + int sliceIndex = clamp(_Crest_DataSliceOffset, 0, g_Crest_LodCount - 2); + + if (g_Crest_SampleAbsorptionSimulation) absorption = Cascade::MakeAbsorption(sliceIndex).Sample(_WorldSpaceCameraPos.xz).xyz; + if (g_Crest_SampleScatteringSimulation) scattering = Cascade::MakeScattering(sliceIndex).Sample(_WorldSpaceCameraPos.xz).xyz; + + const float waterLevel = g_Crest_WaterCenter.y + Cascade::MakeAnimatedWaves(sliceIndex).Sample(_WorldSpaceCameraPos.xz).w; + + half shadow = 1.0; + { +// #if CREST_SHADOWS_ON + // Camera should be at center of LOD system so no need for blending (alpha, weights, etc). This might not be + // the case if there is large horizontal displacement, but the _Crest_DataSliceOffset should help by setting a + // large enough slice as minimum. + half2 shadowSoftHard = Cascade::MakeShadow(sliceIndex).SampleShadow(_WorldSpaceCameraPos.xz); + // Soft in red, hard in green. But hard not computed in HDRP. + shadow = 1.0 - shadowSoftHard.x; +// #endif + } + + half3 ambientLighting = _Crest_AmbientLighting; +#if CREST_HDRP + ApplyIndirectLightingMultiplier(ambientLighting); +#endif + + // Out-Scattering Term. + { + float3 positionWS = i_positionWS; + +#if !CREST_REFLECTION + // Project point onto sphere at the extinction length. + float3 toSphere = -view * _Crest_VolumeExtinctionLength * _Crest_OutScatteringExtinctionFactor; + float3 toScene = i_positionWS - _WorldSpaceCameraPos.xyz; + positionWS = _WorldSpaceCameraPos.xyz + toSphere; + + // Get closest position. + positionWS = dot(toScene, toScene) < dot(toSphere, toSphere) ? i_positionWS : positionWS; +#endif + + // Account for average extinction of light as it travels down through volume. Assume flat water as anything + // else would be expensive. + half3 extinction = (absorption + scattering) * _Crest_ExtinctionMultiplier; + float waterDepth = max(0.0, (waterLevel - positionWS.y)); +#if CREST_REFLECTION + waterDepth *= 2.0; + if (rawDepth == 0.0) waterDepth = _Crest_VolumeExtinctionLength; +#else + // Full strength seems too extreme. Third strength seems reasonable. + waterDepth *= _Crest_OutScatteringFactor; +#endif + + float3 outScatteringTerm = exp(-extinction * waterDepth); + + // Transition between the Underwater Environmental Lighting (if present) and this. This will give us the + // benefit of both approaches. + outScatteringTerm = lerp(outScatteringTerm, 1.0, _Crest_UnderwaterEnvironmentalLightingWeight); + + // Darken scene and light. + sceneColour *= outScatteringTerm; +#if !CREST_REFLECTION + lightColor *= outScatteringTerm; + ambientLighting *= outScatteringTerm; +#endif + } + + VolumeLighting + ( + absorption * _Crest_ExtinctionMultiplier, + scattering * _Crest_ExtinctionMultiplier, + _Crest_Anisotropy, + shadow, + view, + ambientLighting, + lightDirection, + lightColor, + half3(0.0, 0.0, 0.0), + _Crest_AmbientTerm, + _Crest_DirectTerm, + fogDistance, + _Crest_SunBoost, + _Crest_ShadowsAffectsAmbientFactor, + volumeLight, + volumeOpacity + ); + } + +#ifndef k_DisableCaustics + if (_Crest_CausticsEnabled && hasCaustics) + { + float3 position = i_positionWS; +#if CREST_BIRP + position = float3(i_positionSS, 0); +#endif + + half lightOcclusion = PrimaryLightShadows(position); + half blur = 0.0; + + const uint slice0 = PositionToSliceIndex(i_positionWS.xz, 0, g_Crest_WaterScale); + +#ifdef CREST_FLOW_ON + half2 flowData = Cascade::MakeFlow(slice0).SampleFlow(i_positionWS.xz); + const Flow flow = Flow::Make(flowData, g_Crest_Time); + blur = _Crest_CausticsMotionBlur; +#endif + + const float4 displacement = Cascade::MakeAnimatedWaves(slice0).Sample(i_positionWS.xz); + const float surfaceHeight = displacement.y + g_Crest_WaterCenter.y + displacement.w; + + sceneColour *= Caustics + ( +#ifdef CREST_FLOW_ON + flow, +#endif + i_positionWS, + surfaceHeight, + lightColor, + lightDirection, + lightOcclusion, + sceneZ, + _Crest_CausticsTiledTexture, + _Crest_CausticsTextureAverage, + _Crest_CausticsStrength, + _Crest_CausticsFocalDepth, + _Crest_CausticsDepthOfField, + _Crest_CausticsDistortionTiledTexture, + _Crest_CausticsDistortionStrength, + blur, + isUnderwater + ); + } +#endif + +#if CREST_HDRP + volumeLight *= GetCurrentExposureMultiplier(); +#endif + +#ifndef k_DisableDithering +#if d_Dithering + // Increasing intensity can be required for HDRP. + volumeLight += ScreenSpaceDither(i_positionSS) * _Crest_DitheringIntensity; +#endif +#endif + + return lerp(sceneColour, volumeLight, volumeOpacity); +} + +m_CrestNameSpaceEnd + +#endif // CREST_UNDERWATER_EFFECT_SHARED_INCLUDED diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/UnderwaterShared.hlsl.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/UnderwaterShared.hlsl.meta new file mode 100644 index 000000000..215e57ae3 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/UnderwaterShared.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: decff59e1280c4df1bd50de3e83a28a6 +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/UnderwaterURP.hlsl b/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/UnderwaterURP.hlsl new file mode 100644 index 000000000..bd4794032 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/UnderwaterURP.hlsl @@ -0,0 +1,26 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#pragma multi_compile_fragment _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN +#pragma multi_compile_fragment _ _SHADOWS_SOFT + +#define CREST_URP 1 +#define CREST_SHADERGRAPH_CONSTANTS_H + +#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" +#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" +#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + +TEXTURE2D_X(_CameraDepthTexture); SAMPLER(sampler_CameraDepthTexture); + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Macros.hlsl" + +m_CrestNameSpace + +// Shim as HDRP uses this. +float LoadCameraDepth(uint2 pixelCoords) +{ + return LOAD_TEXTURE2D_X(_CameraDepthTexture, pixelCoords).r; +} + +m_CrestNameSpaceEnd diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/UnderwaterURP.hlsl.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/UnderwaterURP.hlsl.meta new file mode 100644 index 000000000..eb75f8d3f --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Volume/UnderwaterURP.hlsl.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 40ef61909a559462ab3c6dd2143a77f8 +ShaderIncludeImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Waves.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Waves.meta new file mode 100644 index 000000000..e43df5aba --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Waves.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0ebffa456d12d4ff883a968a851bc9e9 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Waves/FFT.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Waves/FFT.meta new file mode 100644 index 000000000..72488d4c4 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Waves/FFT.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0875fc0c65d1c4fb7aeb19264860f573 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Waves/FFT/FFTCompute.compute b/Packages/com.waveharmonic.crest/Runtime/Shaders/Waves/FFT/FFTCompute.compute new file mode 100644 index 000000000..57124fd6c --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Waves/FFT/FFTCompute.compute @@ -0,0 +1,176 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// Inspired by https://github.com/speps/GX-EncinoWaves + +// First SIZE constant must match FFT_KERNEL_0_RESOLUTION in FFTCompute.cs +#pragma kernel ComputeFFT SIZE=8 PASSES=3 CHANNEL=x TX=8 TY=1 FINAL=0 +#pragma kernel ComputeFFT SIZE=8 PASSES=3 CHANNEL=y TX=1 TY=8 FINAL=1 +#pragma kernel ComputeFFT SIZE=16 PASSES=4 CHANNEL=x TX=16 TY=1 FINAL=0 +#pragma kernel ComputeFFT SIZE=16 PASSES=4 CHANNEL=y TX=1 TY=16 FINAL=1 +#pragma kernel ComputeFFT SIZE=32 PASSES=5 CHANNEL=x TX=32 TY=1 FINAL=0 +#pragma kernel ComputeFFT SIZE=32 PASSES=5 CHANNEL=y TX=1 TY=32 FINAL=1 +#pragma kernel ComputeFFT SIZE=64 PASSES=6 CHANNEL=x TX=64 TY=1 FINAL=0 +#pragma kernel ComputeFFT SIZE=64 PASSES=6 CHANNEL=y TX=1 TY=64 FINAL=1 +#pragma kernel ComputeFFT SIZE=128 PASSES=7 CHANNEL=x TX=128 TY=1 FINAL=0 +#pragma kernel ComputeFFT SIZE=128 PASSES=7 CHANNEL=y TX=1 TY=128 FINAL=1 +#pragma kernel ComputeFFT SIZE=256 PASSES=8 CHANNEL=x TX=256 TY=1 FINAL=0 +#pragma kernel ComputeFFT SIZE=256 PASSES=8 CHANNEL=y TX=1 TY=256 FINAL=1 +#pragma kernel ComputeFFT SIZE=512 PASSES=9 CHANNEL=x TX=512 TY=1 FINAL=0 +#pragma kernel ComputeFFT SIZE=512 PASSES=9 CHANNEL=y TX=1 TY=512 FINAL=1 + +// Must match CASCADE_COUNT in FFTCompute.cs +#define CASCADE_COUNT 16 + +Texture2D _Crest_InputButterfly; +#if !FINAL +RWTexture2DArray _Crest_Output1; +RWTexture2DArray _Crest_Output2; +RWTexture2DArray _Crest_Output3; +#else +Texture2DArray _Crest_InputH; +Texture2DArray _Crest_InputX; +Texture2DArray _Crest_InputZ; +// Write zero to W to clear garbage. +RWTexture2DArray _Crest_Output; +#endif + +groupshared float2 _Crest_IntermediatesH[SIZE]; +groupshared float2 _Crest_ScratchH[SIZE]; +groupshared float2 _Crest_IntermediatesX[SIZE]; +groupshared float2 _Crest_ScratchX[SIZE]; +groupshared float2 _Crest_IntermediatesZ[SIZE]; +groupshared float2 _Crest_ScratchZ[SIZE]; + +// This was required for Intel machines, but not required for Apple Silicon. +#if defined(SHADER_API_METAL) +// reversebits function appears to not make it across to Metal +#if !defined(reversebits) +uint reversebits( uint x ) +{ + x = ((x >> 1) & 0x55555555u) | ((x & 0x55555555u) << 1); + x = ((x >> 2) & 0x33333333u) | ((x & 0x33333333u) << 2); + x = ((x >> 4) & 0x0f0f0f0fu) | ((x & 0x0f0f0f0fu) << 4); + x = ((x >> 8) & 0x00ff00ffu) | ((x & 0x00ff00ffu) << 8); + x = ((x >> 16) & 0xffffu) | ((x & 0xffffu) << 16); + return x; +} +#endif +#endif + +void ButterflyPass(float2 butterfly, uint coord, uint passIndex, uint cascade) +{ + uint indexA, indexB; + + const uint offset = 1 << passIndex; + if ((coord / offset) % 2 == 1) + { + indexA = coord - offset; + indexB = coord; + } + else + { + indexA = coord; + indexB = coord + offset; + } + + if (passIndex == 0) + { + indexA = reversebits(indexA) >> (32 - PASSES); + indexB = reversebits(indexB) >> (32 - PASSES); + } + + const bool pingpong = (passIndex % 2) == 0; + + float2 valueA_H, valueB_H; + float2 valueA_X, valueB_X; + float2 valueA_Z, valueB_Z; + if (pingpong) + { + valueA_H = _Crest_IntermediatesH[indexA]; + valueB_H = _Crest_IntermediatesH[indexB]; + + valueA_X = _Crest_IntermediatesX[indexA]; + valueB_X = _Crest_IntermediatesX[indexB]; + + valueA_Z = _Crest_IntermediatesZ[indexA]; + valueB_Z = _Crest_IntermediatesZ[indexB]; + } + else + { + valueA_H = _Crest_ScratchH[indexA]; + valueB_H = _Crest_ScratchH[indexB]; + + valueA_X = _Crest_ScratchX[indexA]; + valueB_X = _Crest_ScratchX[indexB]; + + valueA_Z = _Crest_ScratchZ[indexA]; + valueB_Z = _Crest_ScratchZ[indexB]; + } + + const float2 weight = butterfly.xy; + const float2 weightedValueH = weight * valueB_H.r + weight.gr * valueB_H.g * float2(-1.0, 1.0); + const float2 weightedValueX = weight * valueB_X.r + weight.gr * valueB_X.g * float2(-1.0, 1.0); + const float2 weightedValueZ = weight * valueB_Z.r + weight.gr * valueB_Z.g * float2(-1.0, 1.0); + const float2 resultH = valueA_H + weightedValueH; + const float2 resultX = valueA_X + weightedValueX; + const float2 resultZ = valueA_Z + weightedValueZ; + + if (pingpong) + { + _Crest_ScratchH[coord] = resultH; + _Crest_ScratchX[coord] = resultX; + _Crest_ScratchZ[coord] = resultZ; + } + else + { + _Crest_IntermediatesH[coord] = resultH; + _Crest_IntermediatesX[coord] = resultX; + _Crest_IntermediatesZ[coord] = resultZ; + } +} + +float2 conj(float2 v) +{ + return float2(v.x, -v.y); +} + +[numthreads(TX,TY,1)] +void ComputeFFT(const uint3 id : SV_DispatchThreadID) +{ + const uint coord = id.CHANNEL; +#if !FINAL + _Crest_IntermediatesH[coord] = conj(_Crest_Output1[id]); + _Crest_IntermediatesX[coord] = conj(_Crest_Output2[id]); + _Crest_IntermediatesZ[coord] = conj(_Crest_Output3[id]); +#else + _Crest_IntermediatesH[coord] = _Crest_InputH[id]; + _Crest_IntermediatesX[coord] = _Crest_InputX[id]; + _Crest_IntermediatesZ[coord] = _Crest_InputZ[id]; +#endif + + [unroll(PASSES)] + for (uint passIndex = 0; passIndex < PASSES; ++passIndex) + { + GroupMemoryBarrierWithGroupSync(); + ButterflyPass(_Crest_InputButterfly[uint2(coord, passIndex)].xy, coord, passIndex, id.z); + } + + GroupMemoryBarrierWithGroupSync(); + + const bool pingpong = (PASSES % 2) == 0; + const float2 resultH = pingpong ? _Crest_IntermediatesH[coord] : _Crest_ScratchH[coord]; + const float2 resultX = pingpong ? _Crest_IntermediatesX[coord] : _Crest_ScratchX[coord]; + const float2 resultZ = pingpong ? _Crest_IntermediatesZ[coord] : _Crest_ScratchZ[coord]; + +#if !FINAL + _Crest_Output1[id] = resultH; + _Crest_Output2[id] = resultX; + _Crest_Output3[id] = resultZ; +#else + const float sign = ((id.x + id.y) % 2) == 1 ? -1.0 : 1.0; + const float3 res = float3(sign * resultX.x, sign * resultH.x, sign * resultZ.x); + // Write zero to W to clear garbage. + _Crest_Output[id] = float4(sign * resultX.x, sign * resultH.x, sign * resultZ.x, 1.0); +#endif +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Waves/FFT/FFTCompute.compute.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Waves/FFT/FFTCompute.compute.meta new file mode 100644 index 000000000..2b939695f --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Waves/FFT/FFTCompute.compute.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a5caa5dfb6d2c4632b41493dc2ba74d0 +ComputeShaderImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Waves/FFT/FFTSpectrum.compute b/Packages/com.waveharmonic.crest/Runtime/Shaders/Waves/FFT/FFTSpectrum.compute new file mode 100644 index 000000000..2857a4232 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Waves/FFT/FFTSpectrum.compute @@ -0,0 +1,263 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// Inspired by https://github.com/speps/GX-EncinoWaves + +#pragma kernel SpectrumInitalize +#pragma kernel SpectrumUpdate + +#define INV2PI 0.15915494309f +#define PI4 0.33661977236f +#define INVPI2 0.63661977236f +#define HPI 1.57079632679f +#define PI 3.14159265358f +#define PI2 6.28318530717f +#define HSQRT2 0.70710678118f + +// These must match corresponding constants in WaveSpectrum.cs +#define SPECTRUM_OCTAVE_COUNT 14.0 +#define SPECTRUM_SMALLEST_WL_POW_2 -4.0 + +uint _Crest_Size; +float _Crest_WindSpeed; +float _Crest_Turbulence; +float _Crest_Gravity; +float _Crest_Period; +float _Crest_Alignment; + +uint WangHash(uint seed) +{ + seed = (seed ^ 61) ^ (seed >> 16); + seed *= 9; + seed = seed ^ (seed >> 4); + seed *= 0x27d4eb2d; + seed = seed ^ (seed >> 15); + return seed; +} + +uint Rand(inout uint rngState) +{ + rngState ^= (rngState << 13); + rngState ^= (rngState >> 17); + rngState ^= (rngState << 5); + return rngState; +} + +float RandFloat(inout uint rngState) +{ + return Rand(rngState) / 4294967296.0f; +} + +float RandGauss(inout uint rngState) +{ + float u1 = RandFloat(rngState); + float u2 = RandFloat(rngState); + if (u1 < 1e-6f) + u1 = 1e-6f; + return sqrt(-2.0f * log(u1)) * cos(PI2 * u2); +} + +void DeepDispersion(float k, out float w, out float dwdk) +{ + w = sqrt(abs(_Crest_Gravity * k)); + + // Allow FFT to loop in time + if( _Crest_Period > 0.0 ) + { + float thisPeriod = PI2 / w; + float loops = _Crest_Period / thisPeriod; + // Make sure loops integral number of times + loops = ceil( loops ); + // Work our way back to frequency + thisPeriod = _Crest_Period / loops; + w = PI2 / thisPeriod; + } + + dwdk = _Crest_Gravity / (2.0f * w); +} + +float AlphaBetaSpectrum(float A, float B, float g, float w, float wm) +{ + return + (A * g * g / pow(w, 5.0f)) * + exp(-B * pow(wm / w, 4.0f)); +} + +float PiersonMoskowitzSpectrum(float w) +{ + float wm = 0.87f * _Crest_Gravity / _Crest_WindSpeed; + return AlphaBetaSpectrum(8.1e-3f, 1.291f, _Crest_Gravity, w, wm); +} + +float PiersonMoskowitzWindTerm( float w ) +{ + float wm = 0.87f * _Crest_Gravity / _Crest_WindSpeed; + return exp( -1.291 * pow( wm / w, 4.0f ) ); +} + +float PosCosSquaredDirectionalSpreading( float cosTheta ) +{ + // Aligned waves. + float alignment; + { + float minWeight = lerp(1.0, 0.1, _Crest_Alignment); + float wt = max(cosTheta, minWeight); + wt *= lerp(0.25, 1.5, _Crest_Alignment); + float power = lerp(1.0, 16.0, _Crest_Alignment); + + // Needs 2 to match current settings. + alignment = wt * INVPI2 * pow(abs(cosTheta), power) * PI; + } + + float turbulence; + { + if (cosTheta > 0.0) + { + turbulence = lerp(INVPI2 * (cosTheta * cosTheta), PI4, _Crest_Turbulence); + } + else + { + turbulence = PI4 * _Crest_Turbulence; + } + } + + // Integrate alignment and turbulence. + return lerp(turbulence, alignment, _Crest_Alignment * (1.0 - _Crest_Turbulence)); +} + +RWTexture2DArray _Crest_ResultInit; +Texture2D _Crest_SpectrumControls; +SamplerState linear_clamp_sampler; +float2 _Crest_WindDir; + +[numthreads(8,8,1)] +void SpectrumInitalize(uint3 id : SV_DispatchThreadID) +{ + const int2 center = _Crest_Size.xx / 2; + const int2 coord = id.xy - center; + + if( coord.x == 0 && coord.y == 0 ) + { + _Crest_ResultInit[id] = 0.0; + return; + } + + uint depth; + { + uint width, height; + _Crest_ResultInit.GetDimensions( width, height, depth ); + } + + uint maxCoord = int( max( abs( coord.x ), abs( coord.y ) ) ); + + // Matches variable with same name in ShapeFFT.cs + uint WAVE_SAMPLE_FACTOR = 8; + + // If not largest cascade which will get all wavelengths, then limit + // so we split range of frequencies with no overlaps. + // The check on maxCoord below looks pretty magic. It is optimised version of: + // uint samplesPerWave = _Crest_Size / WAVE_SAMPLE_FACTOR; + // Too low wavelength (maxCoord < _Crest_Size / (2 * samplesPerWave) || + // Too high wavelength maxCoord >= _Crest_Size / samplesPerWave) + if ( id.z < (depth - 1) && + // Too low wavelength + maxCoord < WAVE_SAMPLE_FACTOR / 2 || + // Too high wavelength + maxCoord >= WAVE_SAMPLE_FACTOR + ) + { + _Crest_ResultInit[id] = 0.0; + return; + } + + const float worldSize = 0.5f * (1 << id.z); + + // Find wave vector and number + const float2 k = PI2 * coord / worldSize; + const float kMag = length(k); + + // Init seed. rngState was _RngState (file level variable), but GameCore platforms does not allow assigning to them. + // See issue #856 for more information: https://github.com/wave-harmonic/crest/issues/856 + uint rngState = WangHash(id.z * _Crest_Size * _Crest_Size + id.y * _Crest_Size + id.x); + + // Dispersion + float w; float dwdk; + DeepDispersion(kMag, w, dwdk); + + // Spectrum - use power values from users spectrum, but borrow wind term from PM + const float wavelength = PI2 / kMag; + const float octaveIndex = log2( wavelength ) - SPECTRUM_SMALLEST_WL_POW_2; + const float2 spectrumUV = float2((octaveIndex + 0.5) / SPECTRUM_OCTAVE_COUNT, 0.5); + const float spectrum = _Crest_SpectrumControls.SampleLevel( linear_clamp_sampler, spectrumUV, 0.0 ) * + PiersonMoskowitzWindTerm( w ); + + float deltaSPos = spectrum; + float deltaSNeg = spectrum; + + // Directional spreading + const float cosTheta = dot( k, _Crest_WindDir ) / kMag; + deltaSPos *= PosCosSquaredDirectionalSpreading( cosTheta ); + deltaSNeg *= PosCosSquaredDirectionalSpreading( -cosTheta ); + const float dK = PI2 / worldSize; + deltaSPos *= (dK * dK) * dwdk / kMag; + deltaSNeg *= (dK * dK) * dwdk / kMag; + + // Amplitude + const float ampPos = RandGauss(rngState) * sqrt(abs(deltaSPos) * 2.0f); + const float ampNeg = RandGauss(rngState) * sqrt(abs(deltaSNeg) * 2.0f); + + // Output + const float phasePos = RandFloat(rngState) * PI2; + const float phaseNeg = RandFloat(rngState) * PI2; + + ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + const float spiceyMultiplier = 1.5; + _Crest_ResultInit[id] = float4(ampPos * float2(cos(phasePos), -sin(phasePos)), ampNeg * float2(cos(phaseNeg), -sin(phaseNeg))) + * spiceyMultiplier; +} + +float _Crest_Time; +float _Crest_Chop; + +Texture2DArray _Crest_Init0; +RWTexture2DArray _Crest_ResultHeight; +RWTexture2DArray _Crest_ResultDisplaceX; +RWTexture2DArray _Crest_ResultDisplaceZ; + +float2 cmul(float2 lhs, float2 rhs) +{ + return float2( + lhs.x * rhs.x - lhs.y * rhs.y, + lhs.x * rhs.y + lhs.y * rhs.x + ); +} + +[numthreads(8, 8, 1)] +void SpectrumUpdate(uint3 id : SV_DispatchThreadID) +{ + const int2 center = _Crest_Size.xx / 2; + const int2 coord = id.xy - center; + + // Find wave vector and number + const float worldSize = 0.5 * (1 << id.z); + const float2 k = PI2 * coord / worldSize; + const float kMag = length(k); + + // Dispersion + float w; float dwdk; + DeepDispersion(kMag, w, dwdk); + + // Advance time + float sw; float cw; + sincos(w * _Crest_Time, sw, cw); + + const float2 fwd = float2(cw, -sw); + const float2 bkwd = float2(cw, sw); + + const float4 h0 = _Crest_Init0[id]; + const float2 h = cmul(h0.xy, fwd) + cmul(h0.zw, bkwd); + + _Crest_ResultHeight[id] = h; + _Crest_ResultDisplaceX[id] = _Crest_Chop * float2(-h.y * k.x, h.x * k.x) / (kMag + 0.00001f); + _Crest_ResultDisplaceZ[id] = _Crest_Chop * float2(-h.y * k.y, h.x * k.y) / (kMag + 0.00001f); +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Waves/FFT/FFTSpectrum.compute.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Waves/FFT/FFTSpectrum.compute.meta new file mode 100644 index 000000000..69c45e0da --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Waves/FFT/FFTSpectrum.compute.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d493ec731bb6e43dfac22cc5921d31e3 +ComputeShaderImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Waves/Gerstner.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Waves/Gerstner.meta new file mode 100644 index 000000000..b24f4837c --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Waves/Gerstner.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 431e29194508d4bcfaeb17cac204bc08 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Waves/Gerstner/Gerstner.compute b/Packages/com.waveharmonic.crest/Runtime/Shaders/Waves/Gerstner/Gerstner.compute new file mode 100644 index 000000000..a04d62570 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Waves/Gerstner/Gerstner.compute @@ -0,0 +1,114 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// Computes a set of patches of waves, one for each scale. + +#pragma kernel Gerstner + +#include "HLSLSupport.cginc" + +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Globals.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/InputsDriven.hlsl" +#include "Packages/com.waveharmonic.crest/Runtime/Shaders/Library/Helpers.hlsl" + +float _Crest_TextureRes; +uint _Crest_FirstCascadeIndex; + +struct GerstnerCascadeParams +{ + int _StartIndex; +}; +StructuredBuffer _Crest_GerstnerCascadeParams; + +struct GerstnerWaveComponent4 +{ + float4 _TwoPiOverWavelength; + float4 _Amplitude; + float4 _WaveDirectionX; + float4 _WaveDirectionZ; + float4 _Omega; + float4 _Phase; + float4 _ChopAmplitude; + // Waves are generated in pairs, these values are for the second in the pair + float4 _Amplitude2; + float4 _ChopAmplitude2; + float4 _Phase2; +}; +StructuredBuffer _Crest_GerstnerWaveData; + +RWTexture2DArray _Crest_WaveBuffer; + +void ComputeGerstner( float2 worldPosXZ, float worldSize, GerstnerWaveComponent4 data, inout float3 result ) +{ + // direction + half4 Dx = data._WaveDirectionX; + half4 Dz = data._WaveDirectionZ; + + // wave number + half4 k = data._TwoPiOverWavelength; + + half4 kx = k * Dx; + half4 kz = k * Dz; + + // spatial location + float4 x = kx * worldPosXZ.x + kz * worldPosXZ.y; + + // Compute a pair of waves, travelling in opposite directions (see + // sign in front of data._Omega). This matches how FFT wave gen works + // and produces waves that have a time varying amplitude, resulting in + // a more dynamic surface appearance. + half4 resultx, resulty, resultz; + { + half4 angle = x + data._Phase - data._Omega * g_Crest_Time; + + half4 sinangle, cosangle; + sincos( angle, sinangle, cosangle ); + + half4 disp = data._ChopAmplitude * sinangle; + resultx = disp * Dx; + resultz = disp * Dz; + + resulty = data._Amplitude * cosangle; + } + + { + half4 angle = x + data._Phase2 + data._Omega * g_Crest_Time; + + half4 sinangle, cosangle; + sincos( angle, sinangle, cosangle ); + + half4 disp = data._ChopAmplitude2 * sinangle; + resultx += disp * Dx; + resultz += disp * Dz; + + resulty += data._Amplitude2 * cosangle; + } + + // sum the vector results + result.x += dot( resultx, 1.0 ); + result.y += dot( resulty, 1.0 ); + result.z += dot( resultz, 1.0 ); +} + +[numthreads(THREAD_GROUP_SIZE_X, THREAD_GROUP_SIZE_Y, 1)] +void Gerstner(uint3 id : SV_DispatchThreadID) +{ + const uint cascadeIndex = id.z + _Crest_FirstCascadeIndex; + const float worldSize = 0.5f * (1 << cascadeIndex); + + // Each cascade lies on XZ plane and starts from the origin + const float texelWidth = worldSize / _Crest_TextureRes; + const float2 worldPosXZ = (id.xy + 0.5) * texelWidth; + + float3 result = 0.0; + + const int startIndex = _Crest_GerstnerCascadeParams[cascadeIndex]._StartIndex; + const int endIndex = _Crest_GerstnerCascadeParams[cascadeIndex + 1]._StartIndex; + for( int i = startIndex; i < endIndex; i++ ) + { + // Sum up waves from another buffer + ComputeGerstner( worldPosXZ, worldSize, _Crest_GerstnerWaveData[i], result ); + } + + _Crest_WaveBuffer[uint3(id.xy, cascadeIndex)] = float4(result, 1.0); +} diff --git a/Packages/com.waveharmonic.crest/Runtime/Shaders/Waves/Gerstner/Gerstner.compute.meta b/Packages/com.waveharmonic.crest/Runtime/Shaders/Waves/Gerstner/Gerstner.compute.meta new file mode 100644 index 000000000..db427f582 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Shaders/Waves/Gerstner/Gerstner.compute.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c7470afd2715c48b89d1e4a2a557d6d7 +ComputeShaderImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Textures.meta b/Packages/com.waveharmonic.crest/Runtime/Textures.meta new file mode 100644 index 000000000..678e4fe58 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Textures.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 377c1810bc00c49f6ad2d80484cdc91c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Textures/Caustics.meta b/Packages/com.waveharmonic.crest/Runtime/Textures/Caustics.meta new file mode 100644 index 000000000..240f25b28 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Textures/Caustics.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2bca8ea133133417ea9c7d9d7d71354f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Textures/Caustics/Caustics.png b/Packages/com.waveharmonic.crest/Runtime/Textures/Caustics/Caustics.png new file mode 100644 index 000000000..8b13bc9e7 Binary files /dev/null and b/Packages/com.waveharmonic.crest/Runtime/Textures/Caustics/Caustics.png differ diff --git a/Packages/com.waveharmonic.crest/Runtime/Textures/Caustics/Caustics.png.meta b/Packages/com.waveharmonic.crest/Runtime/Textures/Caustics/Caustics.png.meta new file mode 100644 index 000000000..d7a380aad --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Textures/Caustics/Caustics.png.meta @@ -0,0 +1,114 @@ +fileFormatVersion: 2 +guid: 1407209016967410da2ae6fdd4d97fc6 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 2 + aniso: 0 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Textures/Caustics/Source.txt b/Packages/com.waveharmonic.crest/Runtime/Textures/Caustics/Source.txt new file mode 100644 index 000000000..dbf445c5d --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Textures/Caustics/Source.txt @@ -0,0 +1,3 @@ +Source: https://forums.unrealengine.com/t/water-caustics/28155 +Download: http://i2.photobucket.com/albums/y43/8thMan/Caustics_tex_zpsc0xyvivw.png +Modifications: Modified to add separation in colour channels. diff --git a/Packages/com.waveharmonic.crest/Runtime/Textures/Caustics/Source.txt.meta b/Packages/com.waveharmonic.crest/Runtime/Textures/Caustics/Source.txt.meta new file mode 100644 index 000000000..c45882d1d --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Textures/Caustics/Source.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f551a0ace500746d090fbab20f13f39e +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Textures/WaveNormals.meta b/Packages/com.waveharmonic.crest/Runtime/Textures/WaveNormals.meta new file mode 100644 index 000000000..3ec2edd09 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Textures/WaveNormals.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bcb2c0e17ec214469b7462c44150b8db +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Textures/WaveNormals/Source.txt b/Packages/com.waveharmonic.crest/Runtime/Textures/WaveNormals/Source.txt new file mode 100644 index 000000000..e0f3dd736 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Textures/WaveNormals/Source.txt @@ -0,0 +1,14 @@ +Source: https://textures.pixel-furnace.com/texture?name=Animated%20Water + +Terms: +https://textures.pixel-furnace.com/terms + +After downloading digital products from Pixel-Furnace the user is allowed to use them for: +- Distributing and selling 3D models and computer games bundled with modified or unmodified versions of the textures. +- Creating and publishing 2D and 3D graphics, websites, website templates, movies, advertisements, design themes and printed media. + +The user is not allowed to use the products for: +- Selling or distributing them in collections or by themselves. +- Any purpose that violates German or other applicable law or regulation. + +The user is not required provide attribution. diff --git a/Packages/com.waveharmonic.crest/Runtime/Textures/WaveNormals/Source.txt.meta b/Packages/com.waveharmonic.crest/Runtime/Textures/WaveNormals/Source.txt.meta new file mode 100644 index 000000000..f5e07e52a --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Textures/WaveNormals/Source.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d07b67edeff0a48729c796d02cbeacfe +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Textures/WaveNormals/WaveNormals.png b/Packages/com.waveharmonic.crest/Runtime/Textures/WaveNormals/WaveNormals.png new file mode 100644 index 000000000..bf87a02d9 Binary files /dev/null and b/Packages/com.waveharmonic.crest/Runtime/Textures/WaveNormals/WaveNormals.png differ diff --git a/Packages/com.waveharmonic.crest/Runtime/Textures/WaveNormals/WaveNormals.png.meta b/Packages/com.waveharmonic.crest/Runtime/Textures/WaveNormals/WaveNormals.png.meta new file mode 100644 index 000000000..765a2a9c8 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Textures/WaveNormals/WaveNormals.png.meta @@ -0,0 +1,127 @@ +fileFormatVersion: 2 +guid: 7aa3f69cfb40b429a865c45a7271c5f5 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 1 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 1 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Runtime/Textures/foam.png b/Packages/com.waveharmonic.crest/Runtime/Textures/foam.png new file mode 100644 index 000000000..452ab8aea Binary files /dev/null and b/Packages/com.waveharmonic.crest/Runtime/Textures/foam.png differ diff --git a/Packages/com.waveharmonic.crest/Runtime/Textures/foam.png.meta b/Packages/com.waveharmonic.crest/Runtime/Textures/foam.png.meta new file mode 100644 index 000000000..4c572f475 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Runtime/Textures/foam.png.meta @@ -0,0 +1,114 @@ +fileFormatVersion: 2 +guid: 959dd0505e2c54585865f51257daa0e3 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared.meta b/Packages/com.waveharmonic.crest/Shared.meta new file mode 100644 index 000000000..f16c39d0b --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d16297273e79e446498999bf9710b7ae +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Effects.meta b/Packages/com.waveharmonic.crest/Shared/Effects.meta new file mode 100644 index 000000000..1df1d5eb8 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Effects.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f987e705967144f4dbad9b916c682b19 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares.meta b/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares.meta new file mode 100644 index 000000000..cda8989df --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 03fc9fcd0d0e64477a04dbd91bab5810 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/Flares.meta b/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/Flares.meta new file mode 100644 index 000000000..e5306f357 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/Flares.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5042ff6d7612c450d840b5ad085c1a7a +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/Flares/Sun.asset b/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/Flares/Sun.asset new file mode 100644 index 000000000..ffcf1d446 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/Flares/Sun.asset @@ -0,0 +1,981 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 877e1507ae8d81c40bf1b94c1a86036f, type: 3} + m_Name: Sun + m_EditorClassIdentifier: + elements: + - visible: 1 + position: 0 + positionOffset: {x: 0, y: 0} + angularOffset: 0 + translationScale: {x: 1, y: 1} + m_LocalIntensity: 1.32 + lensFlareTexture: {fileID: 0} + uniformScale: 5.87 + sizeXY: {x: 1, y: 1} + allowMultipleElement: 0 + m_Count: 5 + preserveAspectRatio: 0 + rotation: 0 + tint: {r: 1, g: 0.6921896, b: 0.13679248, a: 0.5} + blendMode: 0 + autoRotate: 0 + flareType: 1 + modulateByLightColor: 1 + isFoldOpened: 1 + distribution: 0 + lengthSpread: 1 + positionCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: -1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + scaleCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + seed: 0 + colorGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_ColorSpace: -1 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + m_IntensityVariation: 0.75 + positionVariation: {x: 1, y: 0} + scaleVariation: 1 + rotationVariation: 180 + enableRadialDistortion: 0 + targetSizeDistortion: {x: 1, y: 1} + distortionCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: -1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + distortionRelativeToCenter: 0 + m_FallOff: 0.638 + m_EdgeOffset: 0.94 + m_SideCount: 6 + m_SdfRoundness: 0 + inverseSDF: 0 + uniformAngle: 0 + uniformAngleCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + - visible: 1 + position: 0.4 + positionOffset: {x: 0, y: 0} + angularOffset: 0 + translationScale: {x: 1, y: 1} + m_LocalIntensity: 1 + lensFlareTexture: {fileID: 0} + uniformScale: 3.56 + sizeXY: {x: 1, y: 1} + allowMultipleElement: 1 + m_Count: 10 + preserveAspectRatio: 0 + rotation: 0 + tint: {r: 0.028301895, g: 0.028301895, b: 0.028301895, a: 1} + blendMode: 0 + autoRotate: 0 + flareType: 2 + modulateByLightColor: 1 + isFoldOpened: 1 + distribution: 2 + lengthSpread: 0.5 + positionCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: -1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + scaleCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + seed: 0 + colorGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 0.6600066, b: 0.3537736, a: 1} + key2: {r: 1, g: 0.33182937, b: 0.1462264, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 52043 + ctime2: 65342 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_ColorSpace: -1 + m_NumColorKeys: 3 + m_NumAlphaKeys: 2 + m_IntensityVariation: 0.75 + positionVariation: {x: 1, y: 0} + scaleVariation: 0.9 + rotationVariation: 360 + enableRadialDistortion: 0 + targetSizeDistortion: {x: 1, y: 1} + distortionCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: -1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + distortionRelativeToCenter: 0 + m_FallOff: 0.95 + m_EdgeOffset: 0.462 + m_SideCount: 6 + m_SdfRoundness: 0.503 + inverseSDF: 0 + uniformAngle: 0 + uniformAngleCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + - visible: 1 + position: 0.1 + positionOffset: {x: 0, y: 0} + angularOffset: 0 + translationScale: {x: 1, y: 1} + m_LocalIntensity: 1 + lensFlareTexture: {fileID: 0} + uniformScale: 0.9 + sizeXY: {x: 2, y: 1} + allowMultipleElement: 1 + m_Count: 12 + preserveAspectRatio: 0 + rotation: 0 + tint: {r: 0.0754717, g: 0.0754717, b: 0.0754717, a: 0.5} + blendMode: 0 + autoRotate: 1 + flareType: 1 + modulateByLightColor: 1 + isFoldOpened: 1 + distribution: 2 + lengthSpread: 0.2 + positionCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: -1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + scaleCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + seed: 0 + colorGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 0.6600066, b: 0.3537736, a: 1} + key2: {r: 1, g: 0.33182937, b: 0.1462264, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 52043 + ctime2: 65342 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_ColorSpace: -1 + m_NumColorKeys: 3 + m_NumAlphaKeys: 2 + m_IntensityVariation: 0.75 + positionVariation: {x: 1, y: 0} + scaleVariation: 1 + rotationVariation: 0 + enableRadialDistortion: 0 + targetSizeDistortion: {x: 1, y: 1} + distortionCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: -1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + distortionRelativeToCenter: 0 + m_FallOff: 0.799 + m_EdgeOffset: 0.91 + m_SideCount: 6 + m_SdfRoundness: 0 + inverseSDF: 0 + uniformAngle: 0 + uniformAngleCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + - visible: 1 + position: 0 + positionOffset: {x: 0, y: 0} + angularOffset: 0 + translationScale: {x: 1, y: 1} + m_LocalIntensity: 1.5 + lensFlareTexture: {fileID: 2800000, guid: e0f14938bc8914d51835c7bc2c800d95, type: 3} + uniformScale: 12.33 + sizeXY: {x: 1, y: 1} + allowMultipleElement: 0 + m_Count: 5 + preserveAspectRatio: 0 + rotation: 0 + tint: {r: 1, g: 1, b: 1, a: 0.5} + blendMode: 0 + autoRotate: 0 + flareType: 0 + modulateByLightColor: 1 + isFoldOpened: 1 + distribution: 0 + lengthSpread: 1 + positionCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: -1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + scaleCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + seed: 0 + colorGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_ColorSpace: -1 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + m_IntensityVariation: 0.75 + positionVariation: {x: 1, y: 0} + scaleVariation: 1 + rotationVariation: 180 + enableRadialDistortion: 0 + targetSizeDistortion: {x: 1, y: 1} + distortionCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: -1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + distortionRelativeToCenter: 0 + m_FallOff: 1 + m_EdgeOffset: 0.1 + m_SideCount: 6 + m_SdfRoundness: 0 + inverseSDF: 0 + uniformAngle: 0 + uniformAngleCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + - visible: 1 + position: 0.35 + positionOffset: {x: 0, y: 0} + angularOffset: 0 + translationScale: {x: 1, y: 1} + m_LocalIntensity: 0.44 + lensFlareTexture: {fileID: 2800000, guid: a0b8f3cd4a5414d5a997a8f52ab2945c, type: 3} + uniformScale: 4.2 + sizeXY: {x: 1, y: 1} + allowMultipleElement: 0 + m_Count: 5 + preserveAspectRatio: 0 + rotation: 0 + tint: {r: 1, g: 1, b: 1, a: 0.5} + blendMode: 0 + autoRotate: 0 + flareType: 0 + modulateByLightColor: 0 + isFoldOpened: 1 + distribution: 0 + lengthSpread: 1 + positionCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: -1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + scaleCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + seed: 0 + colorGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_ColorSpace: -1 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + m_IntensityVariation: 0.75 + positionVariation: {x: 1, y: 0} + scaleVariation: 1 + rotationVariation: 180 + enableRadialDistortion: 1 + targetSizeDistortion: {x: 20, y: 20} + distortionCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: -1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + distortionRelativeToCenter: 1 + m_FallOff: 1 + m_EdgeOffset: 0.1 + m_SideCount: 6 + m_SdfRoundness: 0 + inverseSDF: 0 + uniformAngle: 0 + uniformAngleCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + - visible: 1 + position: 0.33 + positionOffset: {x: 0, y: 0} + angularOffset: 0 + translationScale: {x: 1, y: 1} + m_LocalIntensity: 1 + lensFlareTexture: {fileID: 2800000, guid: b625e8f2bcf7a4352be376e723a58db7, type: 3} + uniformScale: 3.93 + sizeXY: {x: 1, y: 1} + allowMultipleElement: 0 + m_Count: 5 + preserveAspectRatio: 0 + rotation: 0.14 + tint: {r: 1, g: 1, b: 1, a: 0.5} + blendMode: 0 + autoRotate: 1 + flareType: 0 + modulateByLightColor: 0 + isFoldOpened: 1 + distribution: 0 + lengthSpread: 1 + positionCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: -1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + scaleCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + seed: 0 + colorGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_ColorSpace: -1 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + m_IntensityVariation: 0.75 + positionVariation: {x: 1, y: 0} + scaleVariation: 1 + rotationVariation: 180 + enableRadialDistortion: 1 + targetSizeDistortion: {x: 1, y: 1} + distortionCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: -1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + distortionRelativeToCenter: 1 + m_FallOff: 1 + m_EdgeOffset: 0.1 + m_SideCount: 6 + m_SdfRoundness: 0 + inverseSDF: 0 + uniformAngle: 0 + uniformAngleCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 diff --git a/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/Flares/Sun.asset.meta b/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/Flares/Sun.asset.meta new file mode 100644 index 000000000..8558d6e3d --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/Flares/Sun.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 01a78af7295034dfbb3e00d6dfec64e3 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/Flares/Sun.flare b/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/Flares/Sun.flare new file mode 100644 index 000000000..4b8262cc3 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/Flares/Sun.flare @@ -0,0 +1,168 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!121 &12100000 +Flare: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Sun + m_FlareTexture: {fileID: 2800000, guid: 5895aae2a9c5f4f75b0628e00c450dbe, type: 3} + m_TextureLayout: 1 + m_Elements: + - m_ImageIndex: 9 + m_Position: 0 + m_Size: 50 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_UseLightColor: 1 + m_Rotate: 0 + m_Zoom: 1 + m_Fade: 1 + - m_ImageIndex: 0 + m_Position: 0 + m_Size: 50 + m_Color: {r: 0.09411765, g: 0.09411765, b: 0.09411765, a: 1} + m_UseLightColor: 1 + m_Rotate: 1 + m_Zoom: 1 + m_Fade: 1 + - m_ImageIndex: 5 + m_Position: 0 + m_Size: 20 + m_Color: {r: 0.03137255, g: 0.019607844, b: 0.019607844, a: 1} + m_UseLightColor: 1 + m_Rotate: 0 + m_Zoom: 0 + m_Fade: 1 + - m_ImageIndex: 5 + m_Position: -0.26999998 + m_Size: 36.39 + m_Color: {r: 0.03137255, g: 0.023529412, b: 0.019607844, a: 1} + m_UseLightColor: 1 + m_Rotate: 0 + m_Zoom: 0 + m_Fade: 1 + - m_ImageIndex: 5 + m_Position: -0.74999994 + m_Size: 28.689999 + m_Color: {r: 0.019607844, g: 0.015686275, b: 0.011764706, a: 1} + m_UseLightColor: 1 + m_Rotate: 0 + m_Zoom: 0 + m_Fade: 1 + - m_ImageIndex: 3 + m_Position: 0 + m_Size: 10.250002 + m_Color: {r: 0.44705883, g: 0, b: 0.007843138, a: 1} + m_UseLightColor: 1 + m_Rotate: 0 + m_Zoom: 0 + m_Fade: 1 + - m_ImageIndex: 5 + m_Position: 0.4359998 + m_Size: 4.014 + m_Color: {r: 0.011764706, g: 0.023529412, b: 0.039215688, a: 1} + m_UseLightColor: 1 + m_Rotate: 0 + m_Zoom: 0 + m_Fade: 1 + - m_ImageIndex: 5 + m_Position: 0.33599988 + m_Size: 2.59 + m_Color: {r: 0.03529412, g: 0.023529412, b: 0.078431375, a: 1} + m_UseLightColor: 1 + m_Rotate: 0 + m_Zoom: 0 + m_Fade: 1 + - m_ImageIndex: 5 + m_Position: 0.3909999 + m_Size: 7.4700007 + m_Color: {r: 0.015686275, g: 0.023529412, b: 0.039215688, a: 1} + m_UseLightColor: 1 + m_Rotate: 0 + m_Zoom: 0 + m_Fade: 1 + - m_ImageIndex: 7 + m_Position: 1.5 + m_Size: 7.4700007 + m_Color: {r: 0.09411765, g: 0.05882353, b: 0, a: 1} + m_UseLightColor: 1 + m_Rotate: 0 + m_Zoom: 0 + m_Fade: 1 + - m_ImageIndex: 5 + m_Position: 1.4530003 + m_Size: 4.4499936 + m_Color: {r: 0.07058824, g: 0.043137256, b: 0, a: 1} + m_UseLightColor: 1 + m_Rotate: 0 + m_Zoom: 0 + m_Fade: 1 + - m_ImageIndex: 4 + m_Position: 1.2820016 + m_Size: 1.5 + m_Color: {r: 0.27058825, g: 0.81960785, b: 0.57254905, a: 1} + m_UseLightColor: 1 + m_Rotate: 0 + m_Zoom: 0 + m_Fade: 1 + - m_ImageIndex: 6 + m_Position: 1.7420015 + m_Size: 2.769993 + m_Color: {r: 0.15686275, g: 0.078431375, b: 0.27058825, a: 1} + m_UseLightColor: 1 + m_Rotate: 0 + m_Zoom: 0 + m_Fade: 1 + - m_ImageIndex: 5 + m_Position: 1.723 + m_Size: 2.7699928 + m_Color: {r: 0.02745098, g: 0.09411765, b: 0.05882353, a: 1} + m_UseLightColor: 1 + m_Rotate: 0 + m_Zoom: 0 + m_Fade: 1 + - m_ImageIndex: 5 + m_Position: 1.5230002 + m_Size: 2.1299937 + m_Color: {r: 0.050980393, g: 0.03137255, b: 0, a: 1} + m_UseLightColor: 1 + m_Rotate: 0 + m_Zoom: 0 + m_Fade: 1 + - m_ImageIndex: 8 + m_Position: -0.23900001 + m_Size: 4.589999 + m_Color: {r: 0.1882353, g: 0.14901961, b: 0.05882353, a: 1} + m_UseLightColor: 1 + m_Rotate: 0 + m_Zoom: 0 + m_Fade: 1 + - m_ImageIndex: 2 + m_Position: 2.4609997 + m_Size: 25.969997 + m_Color: {r: 0.16470589, g: 0.16470589, b: 0.16470589, a: 1} + m_UseLightColor: 1 + m_Rotate: 0 + m_Zoom: 0 + m_Fade: 1 + - m_ImageIndex: 1 + m_Position: 2.1309998 + m_Size: 17.209995 + m_Color: {r: 0.16470589, g: 0.16470589, b: 0.16470589, a: 1} + m_UseLightColor: 1 + m_Rotate: 0 + m_Zoom: 0 + m_Fade: 1 + - m_ImageIndex: 5 + m_Position: 0.82 + m_Size: 2.659996 + m_Color: {r: 0.050980393, g: 0.023529412, b: 0, a: 1} + m_UseLightColor: 1 + m_Rotate: 0 + m_Zoom: 0 + m_Fade: 1 + m_UseFog: 1 +--- !u!1002 &12100001 +EditorExtensionImpl: + serializedVersion: 6 diff --git a/Assets/Obi/Samples/Common/SampleResources/Animations/FanRoot.controller.meta b/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/Flares/Sun.flare.meta similarity index 64% rename from Assets/Obi/Samples/Common/SampleResources/Animations/FanRoot.controller.meta rename to Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/Flares/Sun.flare.meta index 3ec02df0b..71509e486 100644 --- a/Assets/Obi/Samples/Common/SampleResources/Animations/FanRoot.controller.meta +++ b/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/Flares/Sun.flare.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: 07415f30e4149416b920c1da07bdc3b7 +guid: 69f43258575d14c9693eda803607cb00 NativeFormatImporter: externalObjects: {} - mainObjectFileID: 9100000 + mainObjectFileID: 12100000 userData: assetBundleName: assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/License.txt b/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/License.txt new file mode 100644 index 000000000..3859fb0ff --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/License.txt @@ -0,0 +1,2 @@ +Files in this folder are part of the Unity Standard Assets and are subject to the Unity Companion License. +https://unity.com/legal/licenses/unity-companion-license diff --git a/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/License.txt.meta b/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/License.txt.meta new file mode 100644 index 000000000..48962280b --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/License.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ed5612f2aef9940458863cf4e8d892ea +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/Textures.meta b/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/Textures.meta new file mode 100644 index 000000000..a7c0acf31 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/Textures.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 60427c2d96eb0409ea1a88019b5d05b7 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/Textures/Flare50mm.psd b/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/Textures/Flare50mm.psd new file mode 100644 index 000000000..4136f7688 Binary files /dev/null and b/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/Textures/Flare50mm.psd differ diff --git a/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/Textures/Flare50mm.psd.meta b/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/Textures/Flare50mm.psd.meta new file mode 100644 index 000000000..e130c3cc5 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/Textures/Flare50mm.psd.meta @@ -0,0 +1,127 @@ +fileFormatVersion: 2 +guid: 5895aae2a9c5f4f75b0628e00c450dbe +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 2 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.1 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 512 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 1 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 512 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 512 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 512 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/Textures/PartialRing.png b/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/Textures/PartialRing.png new file mode 100644 index 000000000..7164046ca Binary files /dev/null and b/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/Textures/PartialRing.png differ diff --git a/Assets/Obi/Editor/Resources/Icons/ObiFoamGenerator Icon.png.meta b/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/Textures/PartialRing.png.meta similarity index 88% rename from Assets/Obi/Editor/Resources/Icons/ObiFoamGenerator Icon.png.meta rename to Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/Textures/PartialRing.png.meta index 9e9122967..05c0dd160 100644 --- a/Assets/Obi/Editor/Resources/Icons/ObiFoamGenerator Icon.png.meta +++ b/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/Textures/PartialRing.png.meta @@ -1,9 +1,9 @@ fileFormatVersion: 2 -guid: b7cec6e680e3a479ca03a89eccd4e052 +guid: b625e8f2bcf7a4352be376e723a58db7 TextureImporter: internalIDToNameTable: [] externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 1 @@ -20,11 +20,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 vTOnly: 0 - ignoreMasterTextureLimit: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -36,10 +37,10 @@ TextureImporter: filterMode: 1 aniso: 1 mipBias: 0 - wrapU: 1 - wrapV: 1 + wrapU: 0 + wrapV: 0 wrapW: 0 - nPOTScale: 0 + nPOTScale: 1 lightmap: 0 compressionQuality: 50 spriteMode: 0 @@ -51,9 +52,9 @@ TextureImporter: spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteGenerateFallbackPhysicsShape: 1 alphaUsage: 1 - alphaIsTransparency: 1 + alphaIsTransparency: 0 spriteTessellationDetail: -1 - textureType: 2 + textureType: 0 textureShape: 1 singleChannelComponent: 0 flipbookRows: 1 @@ -63,6 +64,8 @@ TextureImporter: textureFormatSet: 0 ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - serializedVersion: 3 buildTarget: DefaultTexturePlatform @@ -74,6 +77,7 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - serializedVersion: 3 @@ -86,6 +90,7 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - serializedVersion: 3 @@ -98,6 +103,7 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: @@ -114,9 +120,8 @@ TextureImporter: weights: [] secondaryTextures: [] nameFileIdTable: {} - spritePackingTag: + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/Textures/Ring.png b/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/Textures/Ring.png new file mode 100644 index 000000000..437c07101 Binary files /dev/null and b/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/Textures/Ring.png differ diff --git a/Assets/Obi/Editor/Resources/Icons/ObiPathSmoother Icon.png.meta b/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/Textures/Ring.png.meta similarity index 88% rename from Assets/Obi/Editor/Resources/Icons/ObiPathSmoother Icon.png.meta rename to Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/Textures/Ring.png.meta index 61b9afb8d..2491f05d2 100644 --- a/Assets/Obi/Editor/Resources/Icons/ObiPathSmoother Icon.png.meta +++ b/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/Textures/Ring.png.meta @@ -1,9 +1,9 @@ fileFormatVersion: 2 -guid: 8791eecf125744cbeadea65319c29d5a +guid: a0b8f3cd4a5414d5a997a8f52ab2945c TextureImporter: internalIDToNameTable: [] externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 1 @@ -20,11 +20,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 vTOnly: 0 - ignoreMasterTextureLimit: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -36,10 +37,10 @@ TextureImporter: filterMode: 1 aniso: 1 mipBias: 0 - wrapU: 1 - wrapV: 1 + wrapU: 0 + wrapV: 0 wrapW: 0 - nPOTScale: 0 + nPOTScale: 1 lightmap: 0 compressionQuality: 50 spriteMode: 0 @@ -51,9 +52,9 @@ TextureImporter: spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteGenerateFallbackPhysicsShape: 1 alphaUsage: 1 - alphaIsTransparency: 1 + alphaIsTransparency: 0 spriteTessellationDetail: -1 - textureType: 2 + textureType: 0 textureShape: 1 singleChannelComponent: 0 flipbookRows: 1 @@ -63,6 +64,8 @@ TextureImporter: textureFormatSet: 0 ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - serializedVersion: 3 buildTarget: DefaultTexturePlatform @@ -74,6 +77,7 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - serializedVersion: 3 @@ -86,6 +90,7 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - serializedVersion: 3 @@ -98,6 +103,7 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: @@ -114,9 +120,8 @@ TextureImporter: weights: [] secondaryTextures: [] nameFileIdTable: {} - spritePackingTag: + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/Textures/Shimmer.png b/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/Textures/Shimmer.png new file mode 100644 index 000000000..9c205acd7 Binary files /dev/null and b/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/Textures/Shimmer.png differ diff --git a/Assets/Obi/Editor/Resources/Icons/ObiPinhole Icon.png.meta b/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/Textures/Shimmer.png.meta similarity index 88% rename from Assets/Obi/Editor/Resources/Icons/ObiPinhole Icon.png.meta rename to Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/Textures/Shimmer.png.meta index 25f78f309..b58d52a77 100644 --- a/Assets/Obi/Editor/Resources/Icons/ObiPinhole Icon.png.meta +++ b/Packages/com.waveharmonic.crest/Shared/Effects/LensFlares/Textures/Shimmer.png.meta @@ -1,9 +1,9 @@ fileFormatVersion: 2 -guid: 214df93f7c2ed4c1094bb6105c050575 +guid: e0f14938bc8914d51835c7bc2c800d95 TextureImporter: internalIDToNameTable: [] externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 1 @@ -20,11 +20,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 vTOnly: 0 - ignoreMasterTextureLimit: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -36,10 +37,10 @@ TextureImporter: filterMode: 1 aniso: 1 mipBias: 0 - wrapU: 1 - wrapV: 1 + wrapU: 0 + wrapV: 0 wrapW: 0 - nPOTScale: 0 + nPOTScale: 1 lightmap: 0 compressionQuality: 50 spriteMode: 0 @@ -51,9 +52,9 @@ TextureImporter: spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteGenerateFallbackPhysicsShape: 1 alphaUsage: 1 - alphaIsTransparency: 1 + alphaIsTransparency: 0 spriteTessellationDetail: -1 - textureType: 2 + textureType: 0 textureShape: 1 singleChannelComponent: 0 flipbookRows: 1 @@ -63,6 +64,8 @@ TextureImporter: textureFormatSet: 0 ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 platformSettings: - serializedVersion: 3 buildTarget: DefaultTexturePlatform @@ -74,6 +77,7 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - serializedVersion: 3 @@ -86,6 +90,7 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - serializedVersion: 3 @@ -98,6 +103,7 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: @@ -114,9 +120,8 @@ TextureImporter: weights: [] secondaryTextures: [] nameFileIdTable: {} - spritePackingTag: + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Materials.meta b/Packages/com.waveharmonic.crest/Shared/Materials.meta new file mode 100644 index 000000000..bd415d608 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Materials.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2b1682c2883fe4400820a76f6577b20c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Materials/Grey.mat b/Packages/com.waveharmonic.crest/Shared/Materials/Grey.mat new file mode 100644 index 000000000..1f2f9b982 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Materials/Grey.mat @@ -0,0 +1,237 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-4129264835413728531 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 639247ca83abc874e893eb93af2b5e44, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 0 +--- !u!114 &-4006929973867857426 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 10 +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Grey + m_Shader: {fileID: -6465566751694194690, guid: 717b077102735454887bdc5c26938762, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: + - _DISABLE_SSR_TRANSPARENT + - _SPECULARHIGHLIGHTS_OFF + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: + MotionVector: User + RenderType: Opaque + disabledShaderPasses: + - TransparentDepthPrepass + - TransparentDepthPostpass + - TransparentBackface + - RayTracingPrepass + - MOTIONVECTORS + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _Albedo: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BaseMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_Lightmaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_LightmapsInd: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_ShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _AddPrecomputedVelocity: 0 + - _AlphaClip: 0 + - _AlphaCutoffEnable: 0 + - _AlphaDstBlend: 0 + - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 + - _AlphaToMaskInspectorValue: 0 + - _Alpha_Cutoff: 0.5 + - _BUILTIN_AlphaClip: 0 + - _BUILTIN_Blend: 0 + - _BUILTIN_CullMode: 2 + - _BUILTIN_DstBlend: 0 + - _BUILTIN_QueueControl: 0 + - _BUILTIN_QueueOffset: 0 + - _BUILTIN_SrcBlend: 1 + - _BUILTIN_Surface: 0 + - _BUILTIN_ZTest: 4 + - _BUILTIN_ZWrite: 1 + - _BUILTIN_ZWriteControl: 0 + - _Blend: 0 + - _BlendMode: 0 + - _BlendModePreserveSpecular: 0 + - _BumpScale: 1 + - _CastShadows: 1 + - _ConservativeDepthOffsetEnable: 0 + - _Cull: 2 + - _CullMode: 2 + - _CullModeForward: 2 + - _Cutoff: 0.5 + - _DepthOffsetEnable: 0 + - _DetailAlbedoMapScale: 0 + - _DetailNormalMapScale: 1 + - _DoubleSidedEnable: 0 + - _DoubleSidedGIMode: 0 + - _DoubleSidedNormalMode: 2 + - _DstBlend: 0 + - _EnableBlendModePreserveSpecularLighting: 1 + - _EnableFogOnTransparent: 1 + - _EnvironmentReflections: 1 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _Normal_Flip_Back_Faces: 1 + - _OcclusionStrength: 1 + - _OpaqueCullMode: 2 + - _Parallax: 0.02 + - _QueueControl: 0 + - _QueueOffset: 0 + - _RayTracing: 0 + - _ReceiveShadows: 1 + - _ReceivesSSR: 1 + - _ReceivesSSRTransparent: 0 + - _RefractionModel: 0 + - _RenderQueueType: 1 + - _RequireSplitLighting: 0 + - _SPECULARHIGHLIGHTS_OFF: 1 + - _Smoothness: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _StencilRef: 0 + - _StencilRefDepth: 8 + - _StencilRefDistortionVec: 4 + - _StencilRefGBuffer: 10 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 + - _StencilWriteMaskDistortionVec: 4 + - _StencilWriteMaskGBuffer: 14 + - _StencilWriteMaskMV: 40 + - _SupportDecals: 1 + - _Surface: 0 + - _SurfaceType: 0 + - _TransparentBackfaceEnable: 0 + - _TransparentCullMode: 2 + - _TransparentDepthPostpassEnable: 0 + - _TransparentDepthPrepassEnable: 0 + - _TransparentSortPriority: 0 + - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 + - _UVSec: 0 + - _UseShadowThreshold: 0 + - _WorkflowMode: 1 + - _ZTest: 4 + - _ZTestDepthEqualForOpaque: 3 + - _ZTestGBuffer: 4 + - _ZTestTransparent: 4 + - _ZWrite: 1 + - _ZWriteControl: 0 + m_Colors: + - _BaseColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _Color: {r: 0.5, g: 0.5, b: 0.5, a: 1} + - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} + - _EmissiveColor: {r: 0, g: 0, b: 0, a: 0} + - _SpecularColor: {r: 0.19999987, g: 0.19999987, b: 0.19999987, a: 0} + m_BuildTextureStacks: [] + m_AllowLocking: 1 +--- !u!114 &3579710415365486419 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: da692e001514ec24dbc4cca1949ff7e8, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 13 + hdPluginSubTargetMaterialVersions: + m_Keys: [] + m_Values: diff --git a/Packages/com.waveharmonic.crest/Shared/Materials/Grey.mat.meta b/Packages/com.waveharmonic.crest/Shared/Materials/Grey.mat.meta new file mode 100644 index 000000000..19f32dda1 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Materials/Grey.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8a46562f9ff954d159455b01470f91ad +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Resources/ObiMaterials/Common/Instanced/Compute/ProceduralInstanced.mat b/Packages/com.waveharmonic.crest/Shared/Materials/Skybox.mat similarity index 74% rename from Assets/Obi/Resources/ObiMaterials/Common/Instanced/Compute/ProceduralInstanced.mat rename to Packages/com.waveharmonic.crest/Shared/Materials/Skybox.mat index 90b8b6e2b..db58c3fe2 100644 --- a/Assets/Obi/Resources/ObiMaterials/Common/Instanced/Compute/ProceduralInstanced.mat +++ b/Packages/com.waveharmonic.crest/Shared/Materials/Skybox.mat @@ -1,18 +1,5 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: ---- !u!114 &-2963227855003104821 -MonoBehaviour: - m_ObjectHideFlags: 11 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 639247ca83abc874e893eb93af2b5e44, type: 3} - m_Name: - m_EditorClassIdentifier: - version: 0 --- !u!21 &2100000 Material: serializedVersion: 8 @@ -20,14 +7,14 @@ Material: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: ProceduralInstanced - m_Shader: {fileID: -6465566751694194690, guid: 4df17ed533d3349a194f3bb8c89dcf5d, type: 3} + m_Name: Skybox + m_Shader: {fileID: 103, guid: 0000000000000000f000000000000000, type: 0} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 m_ValidKeywords: [] m_InvalidKeywords: [] m_LightmapFlags: 4 - m_EnableInstancingVariants: 1 + m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} @@ -57,7 +44,7 @@ Material: m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _MainTex: - m_Texture: {fileID: 2800000, guid: 8fbd9c5f957b8434883cdfce9d6a3c27, type: 3} + m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _MetallicGlossMap: @@ -72,14 +59,17 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _Tex: + m_Texture: {fileID: 8900000, guid: b04e3fd8ac149468c93ae5deec99b0d7, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} m_Ints: [] m_Floats: - - _BUILTIN_QueueControl: 0 - - _BUILTIN_QueueOffset: 0 - _BumpScale: 1 - _Cutoff: 0.5 - _DetailNormalMapScale: 1 - _DstBlend: 0 + - _Exposure: 1 - _GlossMapScale: 1 - _Glossiness: 0.5 - _GlossyReflections: 1 @@ -87,6 +77,7 @@ Material: - _Mode: 0 - _OcclusionStrength: 1 - _Parallax: 0.02 + - _Rotation: 296 - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 - _SrcBlend: 1 @@ -95,5 +86,5 @@ Material: m_Colors: - _Color: {r: 1, g: 1, b: 1, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _Tint: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} m_BuildTextureStacks: [] - m_AllowLocking: 1 diff --git a/Packages/com.waveharmonic.crest/Shared/Materials/Skybox.mat.meta b/Packages/com.waveharmonic.crest/Shared/Materials/Skybox.mat.meta new file mode 100644 index 000000000..ece63e6a5 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Materials/Skybox.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9dbeaf053c6fb4c2f93b45a9995c408e +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Resources/ObiMaterials/Common/Particles.mat b/Packages/com.waveharmonic.crest/Shared/Materials/White.mat similarity index 75% rename from Assets/Obi/Resources/ObiMaterials/Common/Particles.mat rename to Packages/com.waveharmonic.crest/Shared/Materials/White.mat index 36fbed748..35f70daca 100644 --- a/Assets/Obi/Resources/ObiMaterials/Common/Particles.mat +++ b/Packages/com.waveharmonic.crest/Shared/Materials/White.mat @@ -1,47 +1,5 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: ---- !u!114 &-5466045192948715276 -MonoBehaviour: - m_ObjectHideFlags: 11 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 639247ca83abc874e893eb93af2b5e44, type: 3} - m_Name: - m_EditorClassIdentifier: - version: 0 ---- !u!114 &-5150015107491739568 -MonoBehaviour: - m_ObjectHideFlags: 11 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: da692e001514ec24dbc4cca1949ff7e8, type: 3} - m_Name: - m_EditorClassIdentifier: Unity.RenderPipelines.HighDefinition.Editor::UnityEditor.Rendering.HighDefinition.AssetVersion - version: 13 - hdPluginSubTargetMaterialVersions: - m_Keys: [] - m_Values: ---- !u!114 &-4382110247035737841 -MonoBehaviour: - m_ObjectHideFlags: 11 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} - m_Name: - m_EditorClassIdentifier: - version: 10 --- !u!21 &2100000 Material: serializedVersion: 8 @@ -49,32 +7,35 @@ Material: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: Particles - m_Shader: {fileID: -6465566751694194690, guid: 99a2f8857960c44ca980d85023572447, type: 3} + m_Name: White + m_Shader: {fileID: -6465566751694194690, guid: 717b077102735454887bdc5c26938762, type: 3} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 m_ValidKeywords: - - _DEPTHOFFSET_ON - - _DISABLE_DECALS - _DISABLE_SSR_TRANSPARENT - m_InvalidKeywords: - - _EMISSION - m_LightmapFlags: 3 + - _SPECULARHIGHLIGHTS_OFF + m_InvalidKeywords: [] + m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 m_CustomRenderQueue: 2000 stringTagMap: MotionVector: User + RenderType: Opaque disabledShaderPasses: - - MOTIONVECTORS - TransparentDepthPrepass - TransparentDepthPostpass - TransparentBackface - RayTracingPrepass + - MOTIONVECTORS m_LockedProperties: m_SavedProperties: serializedVersion: 3 m_TexEnvs: + - _Albedo: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - _BumpMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} @@ -96,7 +57,7 @@ Material: m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _MainTex: - m_Texture: {fileID: 10300, guid: 0000000000000000f000000000000000, type: 0} + m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _MetallicGlossMap: @@ -126,47 +87,65 @@ Material: m_Ints: [] m_Floats: - _AddPrecomputedVelocity: 0 + - _AlphaClip: 0 - _AlphaCutoffEnable: 0 - _AlphaDstBlend: 0 - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 + - _AlphaToMaskInspectorValue: 0 + - _Alpha_Cutoff: 0.5 + - _BUILTIN_AlphaClip: 0 + - _BUILTIN_Blend: 0 + - _BUILTIN_CullMode: 2 + - _BUILTIN_DstBlend: 0 - _BUILTIN_QueueControl: 0 - _BUILTIN_QueueOffset: 0 + - _BUILTIN_SrcBlend: 1 + - _BUILTIN_Surface: 0 + - _BUILTIN_ZTest: 4 + - _BUILTIN_ZWrite: 1 + - _BUILTIN_ZWriteControl: 0 + - _Blend: 0 - _BlendMode: 0 + - _BlendModePreserveSpecular: 0 - _BumpScale: 1 + - _CastShadows: 1 - _ConservativeDepthOffsetEnable: 0 + - _Cull: 2 - _CullMode: 2 - _CullModeForward: 2 - _Cutoff: 0.5 - - _DepthOffsetEnable: 1 + - _DepthOffsetEnable: 0 + - _DetailAlbedoMapScale: 0 - _DetailNormalMapScale: 1 - _DoubleSidedEnable: 0 - _DoubleSidedGIMode: 0 - _DoubleSidedNormalMode: 2 - _DstBlend: 0 - - _DstBlend2: 0 - _EnableBlendModePreserveSpecularLighting: 1 - _EnableFogOnTransparent: 1 - - _ExcludeFromTUAndAA: 0 + - _GlossMapScale: 1 - _Glossiness: 0.5 - - _InvFade: 1 - - _MaterialID: 1 - - _MaterialTypeMask: 2 + - _GlossyReflections: 1 - _Metallic: 0 - _Mode: 0 + - _Normal_Flip_Back_Faces: 1 - _OcclusionStrength: 1 - _OpaqueCullMode: 2 - _Parallax: 0.02 - - _PerPixelSorting: 0 - _QueueControl: 0 - _QueueOffset: 0 - - _RadiusScale: 1 - _RayTracing: 0 + - _ReceiveShadows: 1 - _ReceivesSSR: 1 - _ReceivesSSRTransparent: 0 - _RefractionModel: 0 - _RenderQueueType: 1 - _RequireSplitLighting: 0 - - _Smoothness: 0.6 + - _SPECULARHIGHLIGHTS_OFF: 1 + - _Smoothness: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 - _SrcBlend: 1 - _StencilRef: 0 - _StencilRefDepth: 8 @@ -174,13 +153,13 @@ Material: - _StencilRefGBuffer: 10 - _StencilRefMV: 40 - _StencilWriteMask: 6 - - _StencilWriteMaskDepth: 9 + - _StencilWriteMaskDepth: 8 - _StencilWriteMaskDistortionVec: 4 - - _StencilWriteMaskGBuffer: 15 - - _StencilWriteMaskMV: 41 - - _SupportDecals: 0 + - _StencilWriteMaskGBuffer: 14 + - _StencilWriteMaskMV: 40 + - _SupportDecals: 1 + - _Surface: 0 - _SurfaceType: 0 - - _TransmissionEnable: 1 - _TransparentBackfaceEnable: 0 - _TransparentCullMode: 2 - _TransparentDepthPostpassEnable: 0 @@ -190,15 +169,59 @@ Material: - _TransparentZWrite: 0 - _UVSec: 0 - _UseShadowThreshold: 0 + - _WorkflowMode: 1 + - _ZTest: 4 - _ZTestDepthEqualForOpaque: 3 - _ZTestGBuffer: 4 - _ZTestTransparent: 4 - _ZWrite: 1 + - _ZWriteControl: 0 m_Colors: - _Color: {r: 1, g: 1, b: 1, a: 1} - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} - - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} - - _ParticleColor: {r: 1, g: 1, b: 1, a: 0} - - _TintColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} + - _EmissiveColor: {r: 0, g: 0, b: 0, a: 0} + - _SpecularColor: {r: 0.19999987, g: 0.19999987, b: 0.19999987, a: 0} m_BuildTextureStacks: [] m_AllowLocking: 1 +--- !u!114 &64603560720380681 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 639247ca83abc874e893eb93af2b5e44, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 0 +--- !u!114 &3999515451107788836 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: da692e001514ec24dbc4cca1949ff7e8, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 13 + hdPluginSubTargetMaterialVersions: + m_Keys: [] + m_Values: +--- !u!114 &6681470257461779220 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 10 diff --git a/Packages/com.waveharmonic.crest/Shared/Materials/White.mat.meta b/Packages/com.waveharmonic.crest/Shared/Materials/White.mat.meta new file mode 100644 index 000000000..6a69c9135 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Materials/White.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 35af310c2690e42a6a9d2ca36256e92c +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Prefabs.meta b/Packages/com.waveharmonic.crest/Shared/Prefabs.meta new file mode 100644 index 000000000..b9b0327a1 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Prefabs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bf040e9acd289488a9f66148e017cf76 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Prefabs/Atmosphere.prefab b/Packages/com.waveharmonic.crest/Shared/Prefabs/Atmosphere.prefab new file mode 100644 index 000000000..ffb751cf6 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Prefabs/Atmosphere.prefab @@ -0,0 +1,84 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &2942909709672342223 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2272289698115174340} + - component: {fileID: 2016193150076743249} + - component: {fileID: 2054049920268771810} + - component: {fileID: 8705736009777882428} + m_Layer: 0 + m_Name: Atmosphere + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2272289698115174340 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2942909709672342223} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &2016193150076743249 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2942909709672342223} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IsGlobal: 1 + priority: 0 + blendDistance: 0 + weight: 1 + sharedProfile: {fileID: 11400000, guid: ec2b869d521934af4a38390f24190cbc, type: 2} +--- !u!114 &2054049920268771810 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2942909709672342223} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IsGlobal: 1 + priority: 1 + blendDistance: 0 + weight: 1 + sharedProfile: {fileID: 0} +--- !u!114 &8705736009777882428 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2942909709672342223} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8911488f4e1ce40e1b2766334def268b, type: 3} + m_Name: + m_EditorClassIdentifier: + _Version: 0 + _SkyBox: {fileID: 2100000, guid: 9dbeaf053c6fb4c2f93b45a9995c408e, type: 2} diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Prefabs/TanglePegSlot.prefab.meta b/Packages/com.waveharmonic.crest/Shared/Prefabs/Atmosphere.prefab.meta similarity index 74% rename from Assets/Obi/Samples/RopeAndRod/SampleResources/Prefabs/TanglePegSlot.prefab.meta rename to Packages/com.waveharmonic.crest/Shared/Prefabs/Atmosphere.prefab.meta index ca1021a20..afd3617a9 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Prefabs/TanglePegSlot.prefab.meta +++ b/Packages/com.waveharmonic.crest/Shared/Prefabs/Atmosphere.prefab.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: aa6b142bbb2bb4887bebe33010c84c6c +guid: 63a4b7e65d06948649ac3e10077d8c2e PrefabImporter: externalObjects: {} userData: diff --git a/Packages/com.waveharmonic.crest/Shared/Prefabs/Camera.prefab b/Packages/com.waveharmonic.crest/Shared/Prefabs/Camera.prefab new file mode 100644 index 000000000..e4c844be0 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Prefabs/Camera.prefab @@ -0,0 +1,423 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &2452750316707852747 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2452750316707852748} + - component: {fileID: 6389200137749898762} + - component: {fileID: 4316267833568120809} + - component: {fileID: 5808830097548158429} + - component: {fileID: 8371988589787276463} + - component: {fileID: 4404543170510296217} + - component: {fileID: 7690153919105444442} + - component: {fileID: 8458686438976561129} + - component: {fileID: 2330733195991194197} + - component: {fileID: 6493171654625517130} + - component: {fileID: 4625463845267562382} + - component: {fileID: 3696783435737642390} + m_Layer: 0 + m_Name: Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2452750316707852748 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2452750316707852747} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &6389200137749898762 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2452750316707852747} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.22794116, g: 0.22794116, b: 0.22794116, a: 1} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_Iso: 200 + m_ShutterSpeed: 0.005 + m_Aperture: 16 + m_FocusDistance: 10 + m_FocalLength: 50 + m_BladeCount: 5 + m_Curvature: {x: 2, y: 11} + m_BarrelClipping: 0.25 + m_Anamorphism: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 1 + far clip plane: 10000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 1 + m_OcclusionCulling: 0 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!114 &4316267833568120809 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2452750316707852747} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 23c1ce4fb46143f46bc5cb5224c934f6, type: 3} + m_Name: + m_EditorClassIdentifier: + clearColorMode: 0 + backgroundColorHDR: {r: 0.025, g: 0.07, b: 0.19, a: 0} + clearDepth: 1 + volumeLayerMask: + serializedVersion: 2 + m_Bits: 257 + volumeAnchorOverride: {fileID: 0} + antialiasing: 0 + SMAAQuality: 2 + dithering: 0 + stopNaNs: 0 + taaSharpenStrength: 0.5 + TAAQuality: 1 + taaHistorySharpening: 0.35 + taaAntiFlicker: 0.5 + taaMotionVectorRejection: 0 + taaAntiHistoryRinging: 0 + taaBaseBlendFactor: 0.875 + taaJitterScale: 1 + physicalParameters: + m_Iso: 200 + m_ShutterSpeed: 0.005 + m_Aperture: 16 + m_FocusDistance: 10 + m_BladeCount: 5 + m_Curvature: {x: 2, y: 11} + m_BarrelClipping: 0.25 + m_Anamorphism: 0 + flipYMode: 0 + xrRendering: 1 + fullscreenPassthrough: 0 + allowDynamicResolution: 0 + customRenderingSettings: 0 + invertFaceCulling: 0 + probeLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + hasPersistentHistory: 0 + screenSizeOverride: {x: 0, y: 0, z: 0, w: 0} + screenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0} + allowDeepLearningSuperSampling: 1 + deepLearningSuperSamplingUseCustomQualitySettings: 0 + deepLearningSuperSamplingQuality: 0 + deepLearningSuperSamplingUseCustomAttributes: 0 + deepLearningSuperSamplingUseOptimalSettings: 1 + deepLearningSuperSamplingSharpening: 0 + fsrOverrideSharpness: 0 + fsrSharpness: 0.92 + exposureTarget: {fileID: 0} + materialMipBias: 0 + m_RenderingPathCustomFrameSettings: + bitDatas: + data1: 140666587840333 + data2: 13763000512783810584 + lodBias: 1 + lodBiasMode: 0 + lodBiasQualityLevel: 0 + maximumLODLevel: 0 + maximumLODLevelMode: 0 + maximumLODLevelQualityLevel: 0 + sssQualityMode: 0 + sssQualityLevel: 0 + sssCustomSampleBudget: 20 + msaaMode: 1 + materialQuality: 0 + renderingPathCustomFrameSettingsOverrideMask: + mask: + data1: 0 + data2: 0 + defaultFrameSettings: 0 + m_Version: 9 + m_ObsoleteRenderingPath: 0 + m_ObsoleteFrameSettings: + overrides: 0 + enableShadow: 0 + enableContactShadows: 0 + enableShadowMask: 0 + enableSSR: 0 + enableSSAO: 0 + enableSubsurfaceScattering: 0 + enableTransmission: 0 + enableAtmosphericScattering: 0 + enableVolumetrics: 0 + enableReprojectionForVolumetrics: 0 + enableLightLayers: 0 + enableExposureControl: 1 + diffuseGlobalDimmer: 0 + specularGlobalDimmer: 0 + shaderLitMode: 0 + enableDepthPrepassWithDeferredRendering: 0 + enableTransparentPrepass: 0 + enableMotionVectors: 0 + enableObjectMotionVectors: 0 + enableDecals: 0 + enableRoughRefraction: 0 + enableTransparentPostpass: 0 + enableDistortion: 0 + enablePostprocess: 0 + enableOpaqueObjects: 0 + enableTransparentObjects: 0 + enableRealtimePlanarReflection: 0 + enableMSAA: 0 + enableAsyncCompute: 0 + runLightListAsync: 0 + runSSRAsync: 0 + runSSAOAsync: 0 + runContactShadowsAsync: 0 + runVolumeVoxelizationAsync: 0 + lightLoopSettings: + overrides: 0 + enableDeferredTileAndCluster: 0 + enableComputeLightEvaluation: 0 + enableComputeLightVariants: 0 + enableComputeMaterialVariants: 0 + enableFptlForForwardOpaque: 0 + enableBigTilePrepass: 0 + isFptlEnabled: 0 +--- !u!114 &5808830097548158429 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2452750316707852747} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_RenderShadows: 1 + m_RequiresDepthTextureOption: 2 + m_RequiresOpaqueTextureOption: 2 + m_CameraType: 0 + m_Cameras: [] + m_RendererIndex: -1 + m_VolumeLayerMask: + serializedVersion: 2 + m_Bits: 257 + m_VolumeTrigger: {fileID: 0} + m_VolumeFrameworkUpdateModeOption: 2 + m_RenderPostProcessing: 1 + m_Antialiasing: 0 + m_AntialiasingQuality: 2 + m_StopNaN: 0 + m_Dithering: 1 + m_ClearDepth: 1 + m_AllowXRRendering: 1 + m_AllowHDROutput: 1 + m_UseScreenCoordOverride: 0 + m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0} + m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0} + m_RequiresDepthTexture: 0 + m_RequiresColorTexture: 0 + m_Version: 2 + m_TaaSettings: + m_Quality: 3 + m_FrameInfluence: 0.1 + m_JitterScale: 1 + m_MipBias: 0 + m_VarianceClampScale: 0.9 + m_ContrastAdaptiveSharpening: 0 +--- !u!114 &8371988589787276463 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2452750316707852747} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8ee84b2ccf836471c94ceaafe58b392e, type: 3} + m_Name: + m_EditorClassIdentifier: + _Version: 0 +--- !u!114 &4404543170510296217 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2452750316707852747} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2b740d83895ff4657b903a39cce9286c, type: 3} + m_Name: + m_EditorClassIdentifier: + _Version: 0 +--- !u!81 &7690153919105444442 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2452750316707852747} + m_Enabled: 1 +--- !u!124 &8458686438976561129 +Behaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2452750316707852747} + m_Enabled: 1 +--- !u!114 &2330733195991194197 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2452750316707852747} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7c0bccaa30631446891d9da26fb6bfec, type: 3} + m_Name: + m_EditorClassIdentifier: + _Version: 0 + _LerpAlpha: 0.01 + _Target: {fileID: 0} + _LookAt: {fileID: 0} + _LookAtOffset: 5 + _MinimumHeightAboveWater: 0.5 +--- !u!114 &6493171654625517130 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2452750316707852747} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1ffaccddaf6fd4ef0bacf218202412e8, type: 3} + m_Name: + m_EditorClassIdentifier: + _Version: 0 + _LinearSpeed: 10 + _AngularSpeed: 70 + _SimulateForwardInput: 0 + _RequireLeftMouseButtonToMove: 0 + _FixedDeltaTime: 0.01666667 + _Debug: + _EnableCameraRoll: 0 + _DisableOcclusionMesh: 0 + _OcclusionMeshScale: 1 +--- !u!114 &4625463845267562382 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2452750316707852747} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 948f4100a11a5c24981795d21301da5c, type: 3} + m_Name: + m_EditorClassIdentifier: + volumeTrigger: {fileID: 2452750316707852748} + volumeLayer: + serializedVersion: 2 + m_Bits: 256 + stopNaNPropagation: 1 + finalBlitToCameraTarget: 0 + antialiasingMode: 0 + temporalAntialiasing: + jitterSpread: 0.75 + sharpness: 0.25 + stationaryBlending: 0.95 + motionBlending: 0.85 + subpixelMorphologicalAntialiasing: + quality: 2 + fastApproximateAntialiasing: + fastMode: 0 + keepAlpha: 0 + fog: + enabled: 1 + excludeSkybox: 1 + debugLayer: + lightMeter: + width: 512 + height: 256 + showCurves: 1 + histogram: + width: 512 + height: 256 + channel: 3 + waveform: + exposure: 0.12 + height: 256 + vectorscope: + size: 256 + exposure: 0.12 + overlaySettings: + linearDepth: 0 + motionColorIntensity: 4 + motionGridSize: 64 + colorBlindnessType: 0 + colorBlindnessStrength: 1 + m_Resources: {fileID: 11400000, guid: d82512f9c8e5d4a4d938b575d47f88d4, type: 2} + m_ShowToolkit: 0 + m_ShowCustomSorter: 0 + breakBeforeColorGrading: 0 + m_BeforeTransparentBundles: [] + m_BeforeStackBundles: [] + m_AfterStackBundles: [] +--- !u!114 &3696783435737642390 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2452750316707852747} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 37330e43f019941fcb1368f1db1be0ac, type: 3} + m_Name: + m_EditorClassIdentifier: + _Version: 0 diff --git a/Packages/com.waveharmonic.crest/Shared/Prefabs/Camera.prefab.meta b/Packages/com.waveharmonic.crest/Shared/Prefabs/Camera.prefab.meta new file mode 100644 index 000000000..8d2bdf7d7 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Prefabs/Camera.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c26fe2b4fef6c484089497b549dd6b04 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Prefabs/Lighting.prefab b/Packages/com.waveharmonic.crest/Shared/Prefabs/Lighting.prefab new file mode 100644 index 000000000..d7f8bedf5 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Prefabs/Lighting.prefab @@ -0,0 +1,99 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &963553959586484309 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6033288213199496986} + - component: {fileID: 8303751716929612922} + - component: {fileID: 8737282204864156058} + - component: {fileID: 5103662451354464692} + - component: {fileID: 1248158243766869604} + m_Layer: 0 + m_Name: Lighting + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &6033288213199496986 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 963553959586484309} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &8303751716929612922 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 963553959586484309} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IsGlobal: 1 + priority: 0 + blendDistance: 0 + weight: 1 + sharedProfile: {fileID: 11400000, guid: 1b855fdf6e03846cfa67429f60b5c0a8, type: 2} +--- !u!114 &8737282204864156058 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 963553959586484309} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IsGlobal: 1 + priority: 1 + blendDistance: 0 + weight: 1 + sharedProfile: {fileID: 0} +--- !u!114 &5103662451354464692 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 963553959586484309} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fdfa905826925432690154f06e557c79, type: 3} + m_Name: + m_EditorClassIdentifier: + _Version: 0 +--- !u!114 &1248158243766869604 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 963553959586484309} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 41f656df4b8434812870960da35d35b4, type: 3} + m_Name: + m_EditorClassIdentifier: + _Version: 0 + _LightsUseLinearIntensity: 1 + _LightsUseColorTemperature: 1 diff --git a/Packages/com.waveharmonic.crest/Shared/Prefabs/Lighting.prefab.meta b/Packages/com.waveharmonic.crest/Shared/Prefabs/Lighting.prefab.meta new file mode 100644 index 000000000..b53081c9e --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Prefabs/Lighting.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: bece9afbf3ddd49059dd73ba2cc986f6 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Prefabs/PostProcessing.prefab b/Packages/com.waveharmonic.crest/Shared/Prefabs/PostProcessing.prefab new file mode 100644 index 000000000..d96d3de35 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Prefabs/PostProcessing.prefab @@ -0,0 +1,120 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &6079220456006713144 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 9013060131419009103} + - component: {fileID: 6908910288483476123} + - component: {fileID: 1008384038640650285} + - component: {fileID: 5901309481885904616} + - component: {fileID: 23519737791931107} + - component: {fileID: 8797002428012619525} + m_Layer: 0 + m_Name: PostProcessing + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &9013060131419009103 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6079220456006713144} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &6908910288483476123 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6079220456006713144} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IsGlobal: 1 + priority: 0 + blendDistance: 0 + weight: 1 + sharedProfile: {fileID: 11400000, guid: 004d41514688842a38d03fb44d744f31, type: 2} +--- !u!114 &1008384038640650285 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6079220456006713144} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IsGlobal: 1 + priority: 1 + blendDistance: 0 + weight: 1 + sharedProfile: {fileID: 0} +--- !u!114 &5901309481885904616 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6079220456006713144} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8b9a305e18de0c04dbd257a21cd47087, type: 3} + m_Name: + m_EditorClassIdentifier: + sharedProfile: {fileID: 11400000, guid: f9dbc838d620d43c5a1c16e44ac0981a, type: 2} + isGlobal: 1 + blendDistance: 0 + weight: 1 + priority: 0 +--- !u!114 &23519737791931107 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6079220456006713144} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8b9a305e18de0c04dbd257a21cd47087, type: 3} + m_Name: + m_EditorClassIdentifier: + sharedProfile: {fileID: 0} + isGlobal: 1 + blendDistance: 0 + weight: 1 + priority: 1 +--- !u!114 &8797002428012619525 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6079220456006713144} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c1d3923e4ad524d8997140b39308dc69, type: 3} + m_Name: + m_EditorClassIdentifier: + _Version: 0 + _Layer: 8 diff --git a/Packages/com.waveharmonic.crest/Shared/Prefabs/PostProcessing.prefab.meta b/Packages/com.waveharmonic.crest/Shared/Prefabs/PostProcessing.prefab.meta new file mode 100644 index 000000000..f43dfa772 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Prefabs/PostProcessing.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5e01cffb9e8324147affb8e08fd5ed13 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Prefabs/Sun.prefab b/Packages/com.waveharmonic.crest/Shared/Prefabs/Sun.prefab new file mode 100644 index 000000000..269cb8ebb --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Prefabs/Sun.prefab @@ -0,0 +1,546 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &5304508333967466499 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1399345652565587599} + - component: {fileID: 8430430470315967237} + - component: {fileID: 2230416686532317428} + - component: {fileID: 4476332497348187229} + - component: {fileID: 1802176044191304336} + - component: {fileID: 4559410043327184601} + - component: {fileID: 3382831289302390136} + - component: {fileID: 3652315765138964706} + - component: {fileID: 7778653892561422245} + m_Layer: 0 + m_Name: Sun + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1399345652565587599 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5304508333967466499} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!108 &8430430470315967237 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5304508333967466499} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 1 + m_Shape: 0 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Intensity: 8 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 4 + m_LightShadowCasterMode: 2 + m_AreaSize: {x: 0.5, y: 0.5} + m_BounceIntensity: 1 + m_ColorTemperature: 5500 + m_UseColorTemperature: 1 + m_BoundingSphereOverride: {x: 0, y: -4.328533e-10, z: 3e-45, w: 0} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!114 &2230416686532317428 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5304508333967466499} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Intensity: 100000 + m_EnableSpotReflector: 1 + m_LuxAtDistance: 1 + m_InnerSpotPercent: 0 + m_SpotIESCutoffPercent: 100 + m_LightDimmer: 1 + m_VolumetricDimmer: 1 + m_LightUnit: 2 + m_FadeDistance: 10000 + m_VolumetricFadeDistance: 10000 + m_AffectDiffuse: 1 + m_AffectSpecular: 1 + m_NonLightmappedOnly: 0 + m_ShapeWidth: 0.5 + m_ShapeHeight: 0.5 + m_AspectRatio: 1 + m_ShapeRadius: 0.025 + m_SoftnessScale: 1 + m_UseCustomSpotLightShadowCone: 0 + m_CustomSpotLightShadowCone: 30 + m_MaxSmoothness: 0.99 + m_ApplyRangeAttenuation: 1 + m_DisplayAreaLightEmissiveMesh: 0 + m_AreaLightCookie: {fileID: 0} + m_IESPoint: {fileID: 0} + m_IESSpot: {fileID: 0} + m_IncludeForRayTracing: 1 + m_AreaLightShadowCone: 120 + m_UseScreenSpaceShadows: 0 + m_InteractsWithSky: 1 + m_AngularDiameter: 0.5 + m_FlareSize: 2 + m_FlareTint: {r: 1, g: 1, b: 1, a: 1} + m_FlareFalloff: 4 + m_SurfaceTexture: {fileID: 0} + m_SurfaceTint: {r: 1, g: 1, b: 1, a: 1} + m_Distance: 1.5e+11 + m_UseRayTracedShadows: 0 + m_NumRayTracingSamples: 4 + m_FilterTracedShadow: 1 + m_FilterSizeTraced: 16 + m_SunLightConeAngle: 0.5 + m_LightShadowRadius: 0.5 + m_SemiTransparentShadow: 0 + m_ColorShadow: 1 + m_DistanceBasedFiltering: 0 + m_EvsmExponent: 15 + m_EvsmLightLeakBias: 0 + m_EvsmVarianceBias: 0.00001 + m_EvsmBlurPasses: 0 + m_LightlayersMask: 1 + m_LinkShadowLayers: 1 + m_ShadowNearPlane: 0.1 + m_BlockerSampleCount: 24 + m_FilterSampleCount: 16 + m_MinFilterSize: 0.1 + m_KernelSize: 5 + m_LightAngle: 1 + m_MaxDepthBias: 0.001 + m_ShadowResolution: + m_Override: 512 + m_UseOverride: 1 + m_Level: 0 + m_ShadowDimmer: 1 + m_VolumetricShadowDimmer: 1 + m_ShadowFadeDistance: 10000 + m_UseContactShadow: + m_Override: 0 + m_UseOverride: 1 + m_Level: 0 + m_RayTracedContactShadow: 0 + m_ShadowTint: {r: 0, g: 0, b: 0, a: 1} + m_PenumbraTint: 0 + m_NormalBias: 0.75 + m_SlopeBias: 0.5 + m_ShadowUpdateMode: 0 + m_AlwaysDrawDynamicShadows: 0 + m_UpdateShadowOnLightMovement: 0 + m_CachedShadowTranslationThreshold: 0.01 + m_CachedShadowAngularThreshold: 0.5 + m_BarnDoorAngle: 90 + m_BarnDoorLength: 0.05 + m_preserveCachedShadow: 0 + m_OnDemandShadowRenderOnPlacement: 1 + m_ShadowCascadeRatios: + - 0.05 + - 0.2 + - 0.3 + m_ShadowCascadeBorders: + - 0.2 + - 0.2 + - 0.2 + - 0.2 + m_ShadowAlgorithm: 0 + m_ShadowVariant: 0 + m_ShadowPrecision: 0 + useOldInspector: 0 + useVolumetric: 0 + featuresFoldout: 1 + m_AreaLightEmissiveMeshShadowCastingMode: 0 + m_AreaLightEmissiveMeshMotionVectorGenerationMode: 0 + m_AreaLightEmissiveMeshLayer: -1 + m_Version: 11 + m_ObsoleteShadowResolutionTier: 1 + m_ObsoleteUseShadowQualitySettings: 0 + m_ObsoleteCustomShadowResolution: 512 + m_ObsoleteContactShadows: 0 + m_PointlightHDType: 0 + m_SpotLightShape: 0 + m_AreaLightShape: 0 +--- !u!114 &4476332497348187229 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5304508333967466499} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Version: 3 + m_UsePipelineSettings: 1 + m_AdditionalLightsShadowResolutionTier: 2 + m_LightLayerMask: 1 + m_RenderingLayers: 1 + m_CustomShadowLayers: 0 + m_ShadowLayerMask: 1 + m_ShadowRenderingLayers: 1 + m_LightCookieSize: {x: 1, y: 1} + m_LightCookieOffset: {x: 0, y: 0} + m_SoftShadowQuality: 0 +--- !u!114 &1802176044191304336 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5304508333967466499} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: cc4d76f733087744991913c9d19d5274, type: 3} + m_Name: + m_EditorClassIdentifier: + m_LensFlareData: {fileID: 11400000, guid: 01a78af7295034dfbb3e00d6dfec64e3, type: 2} + intensity: 0.2 + maxAttenuationDistance: 100 + maxAttenuationScale: 100 + distanceAttenuationCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + scaleByDistanceCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attenuationByLightShape: 1 + radialScreenAttenuationCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + useOcclusion: 1 + occlusionRadius: 0.5 + useBackgroundCloudOcclusion: 0 + sampleCount: 33 + occlusionOffset: 0.005 + scale: 0.4 + allowOffScreen: 1 + volumetricCloudOcclusion: 0 + occlusionRemapCurve: + k__BackingField: 2 + m_Loop: 0 + m_ZeroValue: 1 + m_Range: 1 + m_Curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 +--- !u!123 &4559410043327184601 +LensFlare: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5304508333967466499} + m_Enabled: 1 + m_Flare: {fileID: 12100000, guid: 69f43258575d14c9693eda803607cb00, type: 2} + m_Color: {r: 1, g: 1, b: 1, a: 0} + m_Brightness: 1 + m_FadeSpeed: 3 + m_IgnoreLayers: + serializedVersion: 2 + m_Bits: 262 + m_Directional: 1 +--- !u!114 &3382831289302390136 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5304508333967466499} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8ee84b2ccf836471c94ceaafe58b392e, type: 3} + m_Name: + m_EditorClassIdentifier: + _Version: 0 +--- !u!114 &3652315765138964706 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5304508333967466499} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3a245210cb0ef4c94aac318662d37252, type: 3} + m_Name: + m_EditorClassIdentifier: + _Version: 0 +--- !u!114 &7778653892561422245 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5304508333967466499} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 555f01a6f203a4b6db9ec558f7451e4c, type: 3} + m_Name: + m_EditorClassIdentifier: + _Version: 0 + _Source: 1 + _Layer: 0 + _MinimumWavelength: 1 + _DistanceFromSurfaceSigned: 0 + _DistanceFromSurfaceMaximum: 100 + _DistanceFromSurfaceUseCurve: 1 + _DistanceFromSurfaceCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + _DistanceFromEdgeSigned: 0 + _DistanceFromEdgeMaximum: 100 + _DistanceFromEdgeUseCurve: 1 + _DistanceFromEdgeCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + _OnBelowWater: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 4559410043327184601} + m_TargetAssemblyTypeName: UnityEngine.Behaviour, UnityEngine + m_MethodName: set_enabled + m_Mode: 6 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + - m_Target: {fileID: 1802176044191304336} + m_TargetAssemblyTypeName: UnityEngine.Behaviour, UnityEngine + m_MethodName: set_enabled + m_Mode: 6 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + _OnAboveWater: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 4559410043327184601} + m_TargetAssemblyTypeName: UnityEngine.Behaviour, UnityEngine + m_MethodName: set_enabled + m_Mode: 6 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 1 + m_CallState: 2 + - m_Target: {fileID: 1802176044191304336} + m_TargetAssemblyTypeName: UnityEngine.Behaviour, UnityEngine + m_MethodName: set_enabled + m_Mode: 6 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 1 + m_CallState: 2 + _DistanceFromSurface: + m_PersistentCalls: + m_Calls: [] + _DistanceFromEdge: + m_PersistentCalls: + m_Calls: [] diff --git a/Packages/com.waveharmonic.crest/Shared/Prefabs/Sun.prefab.meta b/Packages/com.waveharmonic.crest/Shared/Prefabs/Sun.prefab.meta new file mode 100644 index 000000000..66d9f9f6c --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Prefabs/Sun.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 774ab582b39374a7e9d5dac8e31b9a5a +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Scripts.meta b/Packages/com.waveharmonic.crest/Shared/Scripts.meta new file mode 100644 index 000000000..3771bf5c2 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Scripts.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2e7af15f7111f443a9cbc7783dc1fdcd +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Scripts/AlignSceneViewToCamera.cs b/Packages/com.waveharmonic.crest/Shared/Scripts/AlignSceneViewToCamera.cs new file mode 100644 index 000000000..0be8999af --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Scripts/AlignSceneViewToCamera.cs @@ -0,0 +1,73 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEditor; +using UnityEditor.SceneManagement; +using UnityEngine; +using UnityEngine.SceneManagement; + +namespace WaveHarmonic.Crest.Examples +{ +#if !CREST_DEBUG + [AddComponentMenu("")] +#endif + [ExecuteAlways] + [RequireComponent(typeof(Camera))] + sealed class AlignSceneViewToCamera : MonoBehaviour + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + +#if UNITY_EDITOR + static int s_Scene; + static bool s_SceneChanged; + + [InitializeOnLoadMethod] + static void OnLoad() + { + EditorSceneManager.sceneClosed -= OnSceneClosed; + EditorSceneManager.sceneClosed += OnSceneClosed; + s_Scene = SceneManager.GetActiveScene().handle; + } + + static void OnSceneClosed(Scene a) + { + // TODO: Report to Unity + // Does not work if only game view is open. Handles will never update. + if (s_Scene == a.handle) return; + s_SceneChanged = true; + s_Scene = a.handle; + } + + void OnEnable() + { + EditorApplication.update -= EditorUpdate; + EditorApplication.update += EditorUpdate; + } + + void OnDisable() + { + EditorApplication.update -= EditorUpdate; + } + + void EditorUpdate() + { + if (s_SceneChanged && SceneView.lastActiveSceneView != null && WaterRenderer.Instance != null && WaterRenderer.Instance.IsSceneViewActive) + { + TeleportSceneCamera(transform); + s_SceneChanged = false; + } + } + + public static void TeleportSceneCamera(Transform transform) + { + var view = SceneView.lastActiveSceneView; + if (view == null) return; + view.pivot = transform.position + transform.forward * view.cameraDistance; + view.rotation = Quaternion.LookRotation(transform.forward); + } +#endif + } +} diff --git a/Packages/com.waveharmonic.crest/Shared/Scripts/AlignSceneViewToCamera.cs.meta b/Packages/com.waveharmonic.crest/Shared/Scripts/AlignSceneViewToCamera.cs.meta new file mode 100644 index 000000000..76876d767 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Scripts/AlignSceneViewToCamera.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 37330e43f019941fcb1368f1db1be0ac +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Scripts/Assembly.cs b/Packages/com.waveharmonic.crest/Shared/Scripts/Assembly.cs new file mode 100644 index 000000000..ab446653d --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Scripts/Assembly.cs @@ -0,0 +1,11 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Samples.Editor")] + +namespace UnityEditor.SceneManagement { } +namespace UnityEngine.InputSystem { } +namespace UnityEngine.Rendering.HighDefinition { } + diff --git a/Packages/com.waveharmonic.crest/Shared/Scripts/Assembly.cs.meta b/Packages/com.waveharmonic.crest/Shared/Scripts/Assembly.cs.meta new file mode 100644 index 000000000..fc152fead --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Scripts/Assembly.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8d4528094ca3f47b29eaf5cc6056652c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Scripts/CameraController.cs b/Packages/com.waveharmonic.crest/Shared/Scripts/CameraController.cs new file mode 100644 index 000000000..248043346 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Scripts/CameraController.cs @@ -0,0 +1,249 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#if d_UnityInputSystem && ENABLE_INPUT_SYSTEM +#define INPUT_SYSTEM_ENABLED +#endif + +using UnityEngine; +using UnityEngine.InputSystem; +using UnityEngine.XR; + +namespace WaveHarmonic.Crest.Examples +{ + /// + /// A simple and dumb camera script that can be controlled using WASD and the mouse. + /// +#if !CREST_DEBUG + [AddComponentMenu("")] +#endif + sealed class CameraController : MonoBehaviour + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + + [SerializeField] + float _LinearSpeed = 10f; + + [SerializeField] + float _AngularSpeed = 70f; + + [SerializeField] + bool _SimulateForwardInput = false; + + [SerializeField] + bool _RequireLeftMouseButtonToMove = false; + + [SerializeField] + float _FixedDeltaTime = 1 / 60f; + + [UnityEngine.Space(10)] + + [SerializeField] + DebugFields _Debug = new(); + + [System.Serializable] + sealed class DebugFields + { + [Tooltip("Allows the camera to roll (rotating on the z axis).")] + public bool _EnableCameraRoll = false; + + [Tooltip("Disables the XR occlusion mesh for debugging purposes. Only works with legacy XR.")] + public bool _DisableOcclusionMesh = false; + + [Tooltip("Sets the XR occlusion mesh scale. Useful for debugging refractions. Only works with legacy XR."), UnityEngine.Range(1f, 2f)] + public float _OcclusionMeshScale = 1f; + } + + + Vector2 _LastMousePosition = -Vector2.one; + bool _Dragging = false; + Transform _TargetTransform; + Camera _Camera; + + + void Awake() + { + _TargetTransform = transform; + + if (!TryGetComponent(out _Camera)) + { + enabled = false; + return; + } + +#if ENABLE_VR && d_UnityModuleVR + if (XRSettings.enabled) + { + // Seems like the best place to put this for now. Most XR debugging happens using this component. + // @FixMe: useOcclusionMesh doesn't work anymore. Might be a Unity bug. + XRSettings.useOcclusionMesh = !_Debug._DisableOcclusionMesh; + XRSettings.occlusionMaskScale = _Debug._OcclusionMeshScale; + } +#endif + } + + void Update() + { + var dt = Time.deltaTime; + if (_FixedDeltaTime > 0f) + dt = _FixedDeltaTime; + + UpdateMovement(dt); + +#if ENABLE_VR && d_UnityModuleVR + // These aren't useful and can break for XR hardware. + if (!XRSettings.enabled || XRSettings.loadedDeviceName.Contains("MockHMD")) +#endif + { + UpdateDragging(dt); + UpdateKillRoll(); + } + +#if ENABLE_VR && d_UnityModuleVR + if (XRSettings.enabled) + { + // Check if property has changed. + if (XRSettings.useOcclusionMesh == _Debug._DisableOcclusionMesh) + { + // @FixMe: useOcclusionMesh doesn't work anymore. Might be a Unity bug. + XRSettings.useOcclusionMesh = !_Debug._DisableOcclusionMesh; + } + + XRSettings.occlusionMaskScale = _Debug._OcclusionMeshScale; + } +#endif + } + + void UpdateMovement(float dt) + { + // New input system works even when game view is not focused. + if (!Application.isFocused) + { + return; + } + +#if INPUT_SYSTEM_ENABLED + if (!Mouse.current.leftButton.isPressed && _RequireLeftMouseButtonToMove) return; + float forward = (Keyboard.current.wKey.isPressed ? 1 : 0) - (Keyboard.current.sKey.isPressed ? 1 : 0); +#else + if (!Input.GetMouseButton(0) && _RequireLeftMouseButtonToMove) return; + float forward = (Input.GetKey(KeyCode.W) ? 1 : 0) - (Input.GetKey(KeyCode.S) ? 1 : 0); +#endif + if (_SimulateForwardInput) + { + forward = 1f; + } + + _TargetTransform.position += dt * forward * _LinearSpeed * _TargetTransform.forward; + var speed = _LinearSpeed; + +#if INPUT_SYSTEM_ENABLED + if (Keyboard.current.leftShiftKey.isPressed) +#else + if (Input.GetKey(KeyCode.LeftShift)) +#endif + { + speed *= 3f; + } + + _TargetTransform.position += dt * forward * speed * _TargetTransform.forward; + // _TargetTransform.position += _LinearSpeed * _TargetTransform.right * Input.GetAxis( "Horizontal" ) * dt; +#if INPUT_SYSTEM_ENABLED + _TargetTransform.position += (Keyboard.current.eKey.isPressed ? 1 : 0) * dt * _LinearSpeed * _TargetTransform.up; + _TargetTransform.position -= (Keyboard.current.qKey.isPressed ? 1 : 0) * dt * _LinearSpeed * _TargetTransform.up; + _TargetTransform.position -= (Keyboard.current.aKey.isPressed ? 1 : 0) * dt * _LinearSpeed * _TargetTransform.right; + _TargetTransform.position += (Keyboard.current.dKey.isPressed ? 1 : 0) * dt * _LinearSpeed * _TargetTransform.right; + _TargetTransform.position += (Keyboard.current.eKey.isPressed ? 1 : 0) * dt * speed * _TargetTransform.up; + _TargetTransform.position -= (Keyboard.current.qKey.isPressed ? 1 : 0) * dt * speed * _TargetTransform.up; + _TargetTransform.position -= (Keyboard.current.aKey.isPressed ? 1 : 0) * dt * speed * _TargetTransform.right; + _TargetTransform.position += (Keyboard.current.dKey.isPressed ? 1 : 0) * dt * speed * _TargetTransform.right; +#else + _TargetTransform.position += (Input.GetKey(KeyCode.E) ? 1 : 0) * dt * _LinearSpeed * _TargetTransform.up; + _TargetTransform.position -= (Input.GetKey(KeyCode.Q) ? 1 : 0) * dt * _LinearSpeed * _TargetTransform.up; + _TargetTransform.position -= (Input.GetKey(KeyCode.A) ? 1 : 0) * dt * _LinearSpeed * _TargetTransform.right; + _TargetTransform.position += (Input.GetKey(KeyCode.D) ? 1 : 0) * dt * _LinearSpeed * _TargetTransform.right; + _TargetTransform.position += (Input.GetKey(KeyCode.E) ? 1 : 0) * dt * speed * _TargetTransform.up; + _TargetTransform.position -= (Input.GetKey(KeyCode.Q) ? 1 : 0) * dt * speed * _TargetTransform.up; + _TargetTransform.position -= (Input.GetKey(KeyCode.A) ? 1 : 0) * dt * speed * _TargetTransform.right; + _TargetTransform.position += (Input.GetKey(KeyCode.D) ? 1 : 0) * dt * speed * _TargetTransform.right; +#endif + { + var rotate = 0f; +#if INPUT_SYSTEM_ENABLED + rotate += Keyboard.current.rightArrowKey.isPressed ? 1 : 0; + rotate -= Keyboard.current.leftArrowKey.isPressed ? 1 : 0; +#else + rotate += Input.GetKey(KeyCode.RightArrow) ? 1 : 0; + rotate -= Input.GetKey(KeyCode.LeftArrow) ? 1 : 0; +#endif + + rotate *= 5f; + var ea = _TargetTransform.eulerAngles; + ea.y += 0.1f * _AngularSpeed * rotate * dt; + _TargetTransform.eulerAngles = ea; + } + } + + void UpdateDragging(float dt) + { + // New input system works even when game view is not focused. + if (!Application.isFocused) + { + return; + } + + var mousePos = +#if INPUT_SYSTEM_ENABLED + Mouse.current.position.ReadValue(); +#else + new Vector2(Input.mousePosition.x, Input.mousePosition.y); +#endif + + var wasLeftMouseButtonPressed = +#if INPUT_SYSTEM_ENABLED + Mouse.current.leftButton.wasPressedThisFrame; +#else + Input.GetMouseButtonDown(0); +#endif + + if (!_Dragging && wasLeftMouseButtonPressed && _Camera.rect.Contains(_Camera.ScreenToViewportPoint(mousePos)) && + !DebugGUI.OverGUI(mousePos)) + { + _Dragging = true; + _LastMousePosition = mousePos; + } +#if INPUT_SYSTEM_ENABLED + if (_Dragging && Mouse.current.leftButton.wasReleasedThisFrame) +#else + if (_Dragging && Input.GetMouseButtonUp(0)) +#endif + { + _Dragging = false; + _LastMousePosition = -Vector2.one; + } + + if (_Dragging) + { + var delta = mousePos - _LastMousePosition; + + var ea = _TargetTransform.eulerAngles; + ea.x += -0.1f * _AngularSpeed * delta.y * dt; + ea.y += 0.1f * _AngularSpeed * delta.x * dt; + _TargetTransform.eulerAngles = ea; + + _LastMousePosition = mousePos; + } + } + + void UpdateKillRoll() + { + if (_Debug._EnableCameraRoll) return; + var ea = _TargetTransform.eulerAngles; + ea.z = 0f; + transform.eulerAngles = ea; + } + } +} diff --git a/Packages/com.waveharmonic.crest/Shared/Scripts/CameraController.cs.meta b/Packages/com.waveharmonic.crest/Shared/Scripts/CameraController.cs.meta new file mode 100644 index 000000000..4d4a100c0 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Scripts/CameraController.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1ffaccddaf6fd4ef0bacf218202412e8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Scripts/LerpCamera.cs b/Packages/com.waveharmonic.crest/Shared/Scripts/LerpCamera.cs new file mode 100644 index 000000000..53b78d611 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Scripts/LerpCamera.cs @@ -0,0 +1,60 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using WaveHarmonic.Crest.Internal; + +namespace WaveHarmonic.Crest.Examples +{ +#if !CREST_DEBUG + [AddComponentMenu("")] +#endif + sealed class LerpCamera : ManagedBehaviour + { +#pragma warning disable IDE0032 // Use auto property + + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + + [SerializeField] + float _LerpAlpha = 0.1f; + + [SerializeField] + Transform _Target = null; + + [SerializeField] + Transform _LookAt = null; + + [SerializeField] + float _LookAtOffset = 5f; + + [SerializeField] + float _MinimumHeightAboveWater = 0.5f; + +#pragma warning restore IDE0032 // Use auto property + + public Transform Target { get => _Target; set => _Target = value; } + public Transform LookAt { get => _LookAt; set => _LookAt = value; } + + readonly SampleCollisionHelper _SampleHeightHelper = new(); + + private protected override System.Action OnUpdateMethod => OnUpdate; + void OnUpdate(WaterRenderer water) + { + if (_Target == null) + { + return; + } + + _SampleHeightHelper.SampleHeight(transform.position, out var h); + + var targetPos = _Target.position; + targetPos.y = Mathf.Max(targetPos.y, h + _MinimumHeightAboveWater); + + transform.position = Vector3.Lerp(transform.position, targetPos, _LerpAlpha * water.DeltaTime * 60f); + transform.LookAt(_LookAt.position + _LookAtOffset * Vector3.up); + } + } +} diff --git a/Packages/com.waveharmonic.crest/Shared/Scripts/LerpCamera.cs.meta b/Packages/com.waveharmonic.crest/Shared/Scripts/LerpCamera.cs.meta new file mode 100644 index 000000000..9732980e2 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Scripts/LerpCamera.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7c0bccaa30631446891d9da26fb6bfec +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Scripts/PrefabSpawner.cs b/Packages/com.waveharmonic.crest/Shared/Scripts/PrefabSpawner.cs new file mode 100644 index 000000000..070f7b490 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Scripts/PrefabSpawner.cs @@ -0,0 +1,73 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using System.Collections.Generic; + +namespace WaveHarmonic.Crest.Examples +{ +#if !CREST_DEBUG + [AddComponentMenu("")] +#endif + sealed class PrefabSpawner : MonoBehaviour + { + enum Mode + { + OnStart, + OnDemand, + } + + + [SerializeField] + GameObject _Prefab; + + [SerializeField] + Mode _Mode; + + [SerializeField] + bool _DestroyInstances = true; + + [SerializeField] + bool _SpawnAsChild = true; + + [SerializeField] + bool _RandomizePosition; + + [SerializeField] + float _RandomizePositionSphericalSize = 1f; + + + readonly List _Instances = new(); + + + // Start is called before the first frame update + void Start() + { + if (_Mode is Mode.OnDemand) return; + Execute(); + } + + void OnDestroy() + { + if (!_DestroyInstances) + { + return; + } + + foreach (var instance in _Instances) + { + Destroy(instance); + } + } + + public void Execute() + { + var prefab = Instantiate(_Prefab); + prefab.transform.SetPositionAndRotation(transform.position + + (_RandomizePosition ? Random.insideUnitSphere * _RandomizePositionSphericalSize : Vector3.zero), transform.rotation); + prefab.transform.localScale = transform.localScale; + if (_SpawnAsChild) prefab.transform.SetParent(transform, worldPositionStays: true); + _Instances.Add(prefab); + } + } +} diff --git a/Packages/com.waveharmonic.crest/Shared/Scripts/PrefabSpawner.cs.meta b/Packages/com.waveharmonic.crest/Shared/Scripts/PrefabSpawner.cs.meta new file mode 100644 index 000000000..313d42bc3 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Scripts/PrefabSpawner.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fd850100d148b4b8b8ce7855c080de37 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Queries.meta b/Packages/com.waveharmonic.crest/Shared/Scripts/Queries.meta similarity index 77% rename from Assets/Obi/Scripts/Common/Backends/Compute/Queries.meta rename to Packages/com.waveharmonic.crest/Shared/Scripts/Queries.meta index ae5d9ccff..ec9fd4e7f 100644 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Queries.meta +++ b/Packages/com.waveharmonic.crest/Shared/Scripts/Queries.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 720d0f7e26a9d46039d564d1d98f08c9 +guid: f031f6d9a813d46f78118d5291310b2c folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Packages/com.waveharmonic.crest/Shared/Scripts/Queries/SampleDisplacementDemo.cs b/Packages/com.waveharmonic.crest/Shared/Scripts/Queries/SampleDisplacementDemo.cs new file mode 100644 index 000000000..9a2bb7656 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Scripts/Queries/SampleDisplacementDemo.cs @@ -0,0 +1,92 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using System; +using UnityEngine; +using WaveHarmonic.Crest.Internal; + +namespace WaveHarmonic.Crest.Examples +{ + /// + /// Attach this script to any GameObject and it will create three collision probes in front of the camera + /// + [AddComponentMenu(Constants.k_MenuPrefixSample + "Sample Displacement Demo")] + sealed class SampleDisplacementDemo : ManagedBehaviour + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + + [Tooltip(ICollisionProvider.k_LayerTooltip)] + [SerializeField] + CollisionLayer _Layer; + + [SerializeField] + bool _TrackCamera = true; + + [UnityEngine.Range(0f, 32f)] + [SerializeField] + float _MinimumGridSize = 0f; + + + readonly GameObject[] _MarkerObjects = new GameObject[3]; + readonly Vector3[] _MarkerPosition = new Vector3[3]; + readonly Vector3[] _ResultDisplacement = new Vector3[3]; + readonly Vector3[] _ResultNormal = new Vector3[3]; + readonly Vector3[] _ResultVelocity = new Vector3[3]; + readonly float _SamplesRadius = 5f; + + private protected override Action OnUpdateMethod => OnUpdate; + void OnUpdate(WaterRenderer water) + { + if (_TrackCamera) + { + var height = Mathf.Abs(Camera.main.transform.position.y - water.SeaLevel); + var lookAngle = Mathf.Max(Mathf.Abs(Camera.main.transform.forward.y), 0.001f); + var offset = height / lookAngle; + _MarkerPosition[0] = Camera.main.transform.position + Camera.main.transform.forward * offset; + _MarkerPosition[1] = Camera.main.transform.position + Camera.main.transform.forward * offset + _SamplesRadius * Vector3.right; + _MarkerPosition[2] = Camera.main.transform.position + Camera.main.transform.forward * offset + _SamplesRadius * Vector3.forward; + } + + var collProvider = water.AnimatedWavesLod.Provider; + + var status = collProvider.Query(GetHashCode(), _MinimumGridSize, _MarkerPosition, _ResultDisplacement, _ResultNormal, _ResultVelocity, _Layer); + + if (collProvider.RetrieveSucceeded(status)) + { + for (var i = 0; i < _ResultDisplacement.Length; i++) + { + if (_MarkerObjects[i] == null) + { + _MarkerObjects[i] = GameObject.CreatePrimitive(PrimitiveType.Cube); + Helpers.Destroy(_MarkerObjects[i].GetComponent()); + _MarkerObjects[i].transform.localScale = Vector3.one * 0.5f; + } + + var query = _MarkerPosition[i]; + query.y = water.SeaLevel; + + var disp = _ResultDisplacement[i]; + + var pos = query; + pos.y = disp.y; + Debug.DrawLine(pos, pos - disp); + + _MarkerObjects[i].transform.SetPositionAndRotation(pos, Quaternion.FromToRotation(Vector3.up, _ResultNormal[i])); + } + + for (var i = 0; i < _ResultNormal.Length; i++) + { + Debug.DrawLine(_MarkerObjects[i].transform.position, _MarkerObjects[i].transform.position + _ResultNormal[i], Color.blue); + } + + for (var i = 0; i < _ResultVelocity.Length; i++) + { + Debug.DrawLine(_MarkerObjects[i].transform.position, _MarkerObjects[i].transform.position + _ResultVelocity[i], Color.green); + } + } + } + } +} diff --git a/Packages/com.waveharmonic.crest/Shared/Scripts/Queries/SampleDisplacementDemo.cs.meta b/Packages/com.waveharmonic.crest/Shared/Scripts/Queries/SampleDisplacementDemo.cs.meta new file mode 100644 index 000000000..f7cedfdce --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Scripts/Queries/SampleDisplacementDemo.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fb222be11f47b450c873a21b733311c1 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Scripts/Queries/SampleHeightDemo.cs b/Packages/com.waveharmonic.crest/Shared/Scripts/Queries/SampleHeightDemo.cs new file mode 100644 index 000000000..b432adb1c --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Scripts/Queries/SampleHeightDemo.cs @@ -0,0 +1,40 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using WaveHarmonic.Crest.Internal; + +namespace WaveHarmonic.Crest.Examples +{ + /// + /// Places the game object on the water surface by moving it vertically. + /// + [AddComponentMenu(Constants.k_MenuPrefixSample + "Sample Height Demo")] + sealed class SampleHeightDemo : ManagedBehaviour + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + + [Tooltip(ICollisionProvider.k_LayerTooltip)] + [SerializeField] + CollisionLayer _Layer; + + readonly SampleCollisionHelper _SampleHeightHelper = new(); + + private protected override System.Action OnUpdateMethod => OnUpdate; + void OnUpdate(WaterRenderer water) + { + // Assume a primitive like a sphere or box. + var r = transform.lossyScale.magnitude; + + if (_SampleHeightHelper.SampleHeight(transform.position, out var height, minimumLength: 2f * r, _Layer)) + { + var pos = transform.position; + pos.y = height; + transform.position = pos; + } + } + } +} diff --git a/Packages/com.waveharmonic.crest/Shared/Scripts/Queries/SampleHeightDemo.cs.meta b/Packages/com.waveharmonic.crest/Shared/Scripts/Queries/SampleHeightDemo.cs.meta new file mode 100644 index 000000000..71a4e2141 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Scripts/Queries/SampleHeightDemo.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e958915a82f294814bc369b4962ed05c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Scripts/RandomMotion.cs b/Packages/com.waveharmonic.crest/Shared/Scripts/RandomMotion.cs new file mode 100644 index 000000000..6f10041b4 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Scripts/RandomMotion.cs @@ -0,0 +1,85 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; + +namespace WaveHarmonic.Crest.Examples +{ + /// + /// Shoves the gameobject around random amounts, occasionally useful for debugging where some motion is required to reproduce an issue. + /// +#if !CREST_DEBUG + [AddComponentMenu("")] +#endif + sealed class RandomMotion : MonoBehaviour + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + + [Header("Translation")] + + [SerializeField] + Vector3 _Axis = Vector3.up; + + [@Range(0, 15)] + [SerializeField] + float _Amplitude = 1f; + + [@Range(0, 5)] + [SerializeField] + float _Frequency = 1f; + + [@Range(0, 1)] + [SerializeField] + float _OrthogonalMotion = 0f; + + + [Header("Rotation")] + + [@Range(0, 5)] + [SerializeField] + float _RotationFrequency = 1f; + + [SerializeField] + float _RotationVelocity = 0f; + + + Vector3 _Origin; + Vector3 _OrthogonalAxis; + + + void Start() + { + _Origin = transform.position; + + _OrthogonalAxis = Quaternion.AngleAxis(90f, Vector3.up) * _Axis; + } + + void Update() + { + // Translation + { + // Do circles in perlin noise + var rnd = 2f * (Mathf.PerlinNoise(0.5f + 0.5f * Mathf.Cos(_Frequency * Time.time), 0.5f + 0.5f * Mathf.Sin(_Frequency * Time.time)) - 0.5f); + + var orthoPhaseOff = Mathf.PI / 2f; + var rndOrtho = 2f * (Mathf.PerlinNoise(0.5f + 0.5f * Mathf.Cos(_Frequency * Time.time + orthoPhaseOff), 0.5f + 0.5f * Mathf.Sin(_Frequency * Time.time + orthoPhaseOff)) - 0.5f); + + transform.position = _Origin + (_Axis * rnd + _OrthogonalMotion * rndOrtho * _OrthogonalAxis) * _Amplitude; + } + + // Rotation + { + var f1 = Mathf.Sin(Time.time * _RotationFrequency * 1.0f); + var f2 = Mathf.Sin(Time.time * _RotationFrequency * 0.83f); + var f3 = Mathf.Sin(Time.time * _RotationFrequency * 1.14f); + transform.rotation *= Quaternion.Euler( + f1 * _RotationVelocity * Time.deltaTime, + f2 * _RotationVelocity * Time.deltaTime, + f3 * _RotationVelocity * Time.deltaTime); + } + } + } +} diff --git a/Packages/com.waveharmonic.crest/Shared/Scripts/RandomMotion.cs.meta b/Packages/com.waveharmonic.crest/Shared/Scripts/RandomMotion.cs.meta new file mode 100644 index 000000000..5f2dc8a1a --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Scripts/RandomMotion.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e67c8b7e3e4e04c46b61963b7c204049 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Obi/Scripts/Common/Backends/Compute/Rendering.meta b/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering.meta similarity index 77% rename from Assets/Obi/Scripts/Common/Backends/Compute/Rendering.meta rename to Packages/com.waveharmonic.crest/Shared/Scripts/Rendering.meta index a6090f8a3..d385f00ce 100644 --- a/Assets/Obi/Scripts/Common/Backends/Compute/Rendering.meta +++ b/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 452c2c7555bce40d1bff65cc65686668 +guid: 90acd0fc619264df3bbb62a37697e17e folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/AmbientLightPatcher.cs b/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/AmbientLightPatcher.cs new file mode 100644 index 000000000..822f5ca8c --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/AmbientLightPatcher.cs @@ -0,0 +1,94 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using UnityEngine.Rendering; + +namespace WaveHarmonic.Crest.Editor +{ +#if !CREST_DEBUG + [AddComponentMenu("")] +#endif + [ExecuteAlways] + sealed class AmbientLightPatcher : MonoBehaviour + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + +#if UNITY_EDITOR + void OnEnable() => InitializeAmbientLighting(); + void Update() => InitializeAmbientLighting(); + + bool _Baked; + + void InitializeAmbientLighting() + { + if (_Baked) + { + return; + } + + if (UnityEditor.Lightmapping.isRunning) + { + return; + } + + if (Application.isPlaying) + { + return; + } + + // Throws a warning. + if (UnityEditor.ShaderUtil.anythingCompiling) + { + return; + } + + // Only do skyboxes for now. + if (RenderSettings.ambientMode != AmbientMode.Skybox) + { + return; + } + + // NOTE: Cannot use as API introduced in 6000.0.22f1 which cannot be targeted by defines. + // if (UnityEditor.Lightmapping.bakeOnSceneLoad == UnityEditor.Lightmapping.BakeOnSceneLoadMode.IfMissingLightingData) + // { + // return; + // } + + var bake = true; + var probe = RenderSettings.ambientProbe; + + // Check if the ambient probe is effectively empty. + for (var i = 0; i < 9; i++) + { + if (probe[0, i] != 0 || probe[1, i] != 0 || probe[2, i] != 0) + { + bake = false; + break; + } + } + + if (bake) + { +#if !UNITY_6000_0_OR_NEWER + var oldWorkflow = UnityEditor.Lightmapping.giWorkflowMode; + UnityEditor.Lightmapping.giWorkflowMode = UnityEditor.Lightmapping.GIWorkflowMode.OnDemand; +#endif + // Only attempt to bake once per scene load. + _Baked = UnityEditor.Lightmapping.BakeAsync(); +#if !UNITY_6000_0_OR_NEWER + UnityEditor.Lightmapping.giWorkflowMode = oldWorkflow; +#endif + + if (!_Baked) + { + Debug.LogWarning($"Crest: Could not generate scene lighting. Lighting will look incorrect."); + } + } + } +#endif + } +} diff --git a/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/AmbientLightPatcher.cs.meta b/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/AmbientLightPatcher.cs.meta new file mode 100644 index 000000000..2d13ba159 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/AmbientLightPatcher.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fdfa905826925432690154f06e557c79 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/LegacyPostProcessingVolume.cs b/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/LegacyPostProcessingVolume.cs new file mode 100644 index 000000000..b59a44e81 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/LegacyPostProcessingVolume.cs @@ -0,0 +1,120 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +#if d_UnityPostProcessing + +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Rendering.PostProcessing; + +namespace WaveHarmonic.Crest.Examples +{ + // ExecuteDuringEditMode does not work with scene camera. +#if !CREST_DEBUG + [AddComponentMenu("")] +#endif + [ExecuteAlways, RequireComponent(typeof(PostProcessVolume))] + sealed class LegacyPostProcessingVolume : MonoBehaviour + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + + [@Layer] + [SerializeField] + int _Layer; + + readonly List _QuickVolumes = new(); + + void OnEnable() + { + if (!RenderPipelineHelper.IsLegacy) + { + return; + } + + _QuickVolumes.Clear(); + + foreach (var volume in GetComponents()) + { + if (volume.sharedProfile == null) continue; + _QuickVolumes.Add(PostProcessManager.instance.QuickVolume(_Layer, volume.priority, volume.sharedProfile.settings.ToArray())); + } + } + + void OnDisable() + { + foreach (var volume in _QuickVolumes) + { + if (volume == null) continue; + Helpers.Destroy(volume.profile); + var gameObject = volume.gameObject; + Helpers.Destroy(volume); + Helpers.Destroy(gameObject); + } + } + } +} + +#else + +using UnityEditor; +using UnityEngine; +using UnityEngine.SceneManagement; +using WaveHarmonic.Crest.Editor; + +namespace WaveHarmonic.Crest.Examples +{ +#if !CREST_DEBUG + [AddComponentMenu("")] +#endif + [ExecuteAlways] + sealed class LegacyPostProcessingVolume : MonoBehaviour + { + [@Layer] + [SerializeField] + int _Layer; + + static string s_SceneName; + + void Awake() + { + // Ask only once per scene load. + var scene = SceneManager.GetActiveScene(); + if (!RenderPipelineHelper.IsLegacy || s_SceneName == scene.name) + { + return; + } + + s_SceneName = scene.name; + +#if UNITY_EDITOR + var install = EditorUtility.DisplayDialog + ( + "Missing Package", + "This sample scene requires the post-processing package when using the built-in renderer. Without it the scene will be overexposed. Would you like to install it?", + "Install", + "Ignore" + ); + + if (install) + { + PackageManagerHelpers.AddMissingPackage("com.unity.postprocessing"); + } +#endif + } + + void OnEnable() + { + if (!RenderPipelineHelper.IsLegacy) + { + return; + } + + Debug.LogWarning("Crest: This scene requires the post-processing package. Without it the scene will be overexposed."); + } + } +} + +#endif diff --git a/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/LegacyPostProcessingVolume.cs.meta b/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/LegacyPostProcessingVolume.cs.meta new file mode 100644 index 000000000..97ed8489d --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/LegacyPostProcessingVolume.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c1d3923e4ad524d8997140b39308dc69 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/LightingPatcher.cs b/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/LightingPatcher.cs new file mode 100644 index 000000000..4a2b72aa0 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/LightingPatcher.cs @@ -0,0 +1,114 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Rendering; + +#if UNITY_EDITOR +using MonoBehaviour = WaveHarmonic.Crest.Internal.EditorBehaviour; +#endif + +namespace WaveHarmonic.Crest.Editor +{ +#if !CREST_DEBUG + [AddComponentMenu("")] +#endif + [DefaultExecutionOrder(-1000)] + [ExecuteAlways] + sealed class LightingPatcher : MonoBehaviour + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + +#if !CREST_DEBUG + [HideInInspector] +#endif + [@DecoratedField, SerializeField] + bool _LightsUseLinearIntensity; + +#if !CREST_DEBUG + [HideInInspector] +#endif + [@DecoratedField, SerializeField] + bool _LightsUseColorTemperature; + + bool _CurrentLightsUseLinearIntensity; + bool _CurrentLightsUseColorTemperature; + + void OnEnable() + { + // SRP is always linear with temperature. + if (RenderPipelineHelper.IsLegacy) + { + Camera.onPreCull -= OnBeginRendering; + Camera.onPreCull += OnBeginRendering; + Camera.onPostRender -= OnEndRendering; + Camera.onPostRender += OnEndRendering; + } + else + { + RenderPipelineManager.beginContextRendering -= OnBeginContextRendering; + RenderPipelineManager.beginContextRendering += OnBeginContextRendering; + RenderPipelineManager.endContextRendering -= OnEndContextRendering; + RenderPipelineManager.endContextRendering += OnEndContextRendering; + } + + _CurrentLightsUseLinearIntensity = GraphicsSettings.lightsUseLinearIntensity; + _CurrentLightsUseColorTemperature = GraphicsSettings.lightsUseColorTemperature; + } + + void OnDisable() + { + if (RenderPipelineHelper.IsLegacy) + { + Camera.onPreCull -= OnBeginRendering; + Camera.onPostRender -= OnEndRendering; + } + else + { + RenderPipelineManager.beginContextRendering -= OnBeginContextRendering; + RenderPipelineManager.endContextRendering -= OnEndContextRendering; + } + } + + void OnBeginContextRendering(ScriptableRenderContext context, List cameras) => ChangeLighting(); + void OnEndContextRendering(ScriptableRenderContext context, List cameras) => RestoreLighting(); + + void OnBeginRendering(Camera camera) => ChangeLighting(); + void OnEndRendering(Camera camera) => RestoreLighting(); + + void ChangeLighting() + { + _CurrentLightsUseLinearIntensity = GraphicsSettings.lightsUseLinearIntensity; + _CurrentLightsUseColorTemperature = GraphicsSettings.lightsUseColorTemperature; + GraphicsSettings.lightsUseLinearIntensity = true; + GraphicsSettings.lightsUseColorTemperature = true; + } + + void RestoreLighting() + { + GraphicsSettings.lightsUseLinearIntensity = _CurrentLightsUseLinearIntensity; + GraphicsSettings.lightsUseColorTemperature = _CurrentLightsUseColorTemperature; + } + +#if UNITY_EDITOR + private protected override void Reset() + { + _LightsUseLinearIntensity = GraphicsSettings.lightsUseLinearIntensity; + _LightsUseColorTemperature = GraphicsSettings.lightsUseColorTemperature; + + base.Reset(); + } + + [@OnChange] + void OnChange(string propertyPath, object previousValue) + { + GraphicsSettings.lightsUseLinearIntensity = _LightsUseLinearIntensity; + GraphicsSettings.lightsUseColorTemperature = _LightsUseColorTemperature; + } +#endif + } +} diff --git a/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/LightingPatcher.cs.meta b/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/LightingPatcher.cs.meta new file mode 100644 index 000000000..3ce0bada1 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/LightingPatcher.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 41f656df4b8434812870960da35d35b4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 30 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/RenderPipelineCameraPatcher.cs b/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/RenderPipelineCameraPatcher.cs new file mode 100644 index 000000000..b0903db3a --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/RenderPipelineCameraPatcher.cs @@ -0,0 +1,47 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEditor.SceneManagement; +using UnityEngine; +using UnityEngine.Rendering.HighDefinition; + +namespace WaveHarmonic.Crest.Editor +{ +#if !CREST_DEBUG + [AddComponentMenu("")] +#endif + [RequireComponent(typeof(Camera))] + sealed class RenderPipelineCameraPatcher : RenderPipelinePatcher + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + +#if UNITY_EDITOR + protected override void OnActiveRenderPipelineTypeChanged() + { + if (PrefabStageUtility.GetCurrentPrefabStage() != null) + { + return; + } + + if (!isActiveAndEnabled) + { + return; + } + +#if d_UnityHDRP + if (RenderPipelineHelper.IsHighDefinition) + { + if (TryGetComponent(out var data)) + { + // This component will try to modify serialized HDR & MSAA properties every frame. Disgusting. + data.enabled = true; + } + } +#endif + } +#endif + } +} diff --git a/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/RenderPipelineCameraPatcher.cs.meta b/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/RenderPipelineCameraPatcher.cs.meta new file mode 100644 index 000000000..a59e364cf --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/RenderPipelineCameraPatcher.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2b740d83895ff4657b903a39cce9286c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/RenderPipelineLightPatcher.cs b/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/RenderPipelineLightPatcher.cs new file mode 100644 index 000000000..7ab2c0a37 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/RenderPipelineLightPatcher.cs @@ -0,0 +1,79 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using System.Reflection; +using UnityEditor; +using UnityEditor.SceneManagement; +using UnityEngine; +using UnityEngine.Rendering.HighDefinition; + +namespace WaveHarmonic.Crest.Editor +{ +#if !CREST_DEBUG + [AddComponentMenu("")] +#endif + [RequireComponent(typeof(Light))] + [DefaultExecutionOrder(10)] + sealed class RenderPipelineLightPatcher : RenderPipelinePatcher + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + +#if d_UnityHDRP + // For 2023.3 onwards, HDAdditionalLightData.intensity is obsolete and returns Light.intensity. + // It still serializes the old value so grab it via reflection. + static readonly FieldInfo s_Intensity = typeof(HDAdditionalLightData) + .GetField("m_Intensity", BindingFlags.Instance | BindingFlags.NonPublic); +#endif + +#if UNITY_EDITOR + private protected override void Awake() + { + base.Awake(); + if (!Application.isPlaying) OnActiveRenderPipelineTypeChanged(); + } + + protected override void OnActiveRenderPipelineTypeChanged() + { + EditorApplication.update -= OnActiveRenderPipelineTypeChanged; + + if (PrefabStageUtility.GetCurrentPrefabStage() != null) + { + return; + } + + // Can happen. + if (this == null) + { + return; + } + + if (!isActiveAndEnabled) + { + return; + } + +#if d_UnityHDRP + if (RenderPipelineHelper.IsHighDefinition) + { + if (TryGetComponent(out var light) && TryGetComponent(out var data)) + { + var intensity = (float)s_Intensity.GetValue(data); + + if (light.intensity == intensity) return; + + // HDRP will not restore the correct intensity. + light.intensity = intensity; + + // Execute next frame as revert prefab interferes despite executing afterwards. + EditorApplication.update -= OnActiveRenderPipelineTypeChanged; + EditorApplication.update += OnActiveRenderPipelineTypeChanged; + } + } +#endif + } +#endif + } +} diff --git a/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/RenderPipelineLightPatcher.cs.meta b/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/RenderPipelineLightPatcher.cs.meta new file mode 100644 index 000000000..efb8c3e7d --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/RenderPipelineLightPatcher.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3a245210cb0ef4c94aac318662d37252 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/RenderPipelinePatcher.cs b/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/RenderPipelinePatcher.cs new file mode 100644 index 000000000..944a3c1a5 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/RenderPipelinePatcher.cs @@ -0,0 +1,31 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using UnityEngine.Rendering; + +#if UNITY_EDITOR +using MonoBehaviour = WaveHarmonic.Crest.Internal.EditorBehaviour; +#endif + +namespace WaveHarmonic.Crest.Editor +{ + [ExecuteAlways] + abstract class RenderPipelinePatcher : MonoBehaviour + { +#if UNITY_EDITOR + protected virtual void OnEnable() + { + RenderPipelineManager.activeRenderPipelineTypeChanged -= OnActiveRenderPipelineTypeChanged; + RenderPipelineManager.activeRenderPipelineTypeChanged += OnActiveRenderPipelineTypeChanged; + } + + protected virtual void OnDisable() + { + RenderPipelineManager.activeRenderPipelineTypeChanged -= OnActiveRenderPipelineTypeChanged; + } + + protected abstract void OnActiveRenderPipelineTypeChanged(); +#endif + } +} diff --git a/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/RenderPipelinePatcher.cs.meta b/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/RenderPipelinePatcher.cs.meta new file mode 100644 index 000000000..c3fa474b8 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/RenderPipelinePatcher.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5c5e6eb7e2ef841d38e15a82c8b83964 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/RenderPipelineSettingsPatcher.cs b/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/RenderPipelineSettingsPatcher.cs new file mode 100644 index 000000000..c3d12f7cd --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/RenderPipelineSettingsPatcher.cs @@ -0,0 +1,53 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +// Restores "Lighting > Environment" settings after switching from HDRP. "Lighting > Other Settings" do not need +// restoring. We only need to restore the skybox as we use the default values for everything else. + +using UnityEngine; + +namespace WaveHarmonic.Crest.Editor +{ +#if !CREST_DEBUG + [AddComponentMenu("")] +#endif + sealed class RenderPipelineSettingsPatcher : RenderPipelinePatcher + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + + [@AttachMaterialEditor] + [@DecoratedField, SerializeField] + Material _SkyBox; + +#if UNITY_EDITOR + private protected override void Reset() + { + _SkyBox = RenderSettings.skybox; + + base.Reset(); + } + + protected override void OnEnable() + { + base.OnEnable(); + OnActiveRenderPipelineTypeChanged(); + } + + protected override void OnActiveRenderPipelineTypeChanged() + { + if (!isActiveAndEnabled) + { + return; + } + + if (RenderPipelineHelper.IsLegacy || RenderPipelineHelper.IsUniversal) + { + RenderSettings.skybox = _SkyBox; + } + } +#endif + } +} diff --git a/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/RenderPipelineSettingsPatcher.cs.meta b/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/RenderPipelineSettingsPatcher.cs.meta new file mode 100644 index 000000000..c8afbcbf8 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/RenderPipelineSettingsPatcher.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8911488f4e1ce40e1b2766334def268b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/RenderPipelineTerrainPatcher.cs b/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/RenderPipelineTerrainPatcher.cs new file mode 100644 index 000000000..c31298888 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/RenderPipelineTerrainPatcher.cs @@ -0,0 +1,60 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEditor.SceneManagement; +using UnityEngine; + +namespace WaveHarmonic.Crest.Editor +{ +#if !CREST_DEBUG + [AddComponentMenu("")] +#endif + sealed class RenderPipelineTerrainPatcher : RenderPipelinePatcher + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + + [SerializeField] + Material _Material; + + [SerializeField] + Material _MaterialHDRP; + + [SerializeField] + Material _MaterialURP; + +#if UNITY_EDITOR + protected override void OnEnable() + { + base.OnEnable(); + OnActiveRenderPipelineTypeChanged(); + } + + protected override void OnActiveRenderPipelineTypeChanged() + { + if (PrefabStageUtility.GetCurrentPrefabStage() != null) + { + return; + } + + if (!isActiveAndEnabled) + { + return; + } + + foreach (var terrain in GetComponentsInChildren()) + { + terrain.materialTemplate = RenderPipelineHelper.RenderPipeline switch + { + RenderPipeline.Legacy => _Material, + RenderPipeline.Universal => _MaterialURP, + RenderPipeline.HighDefinition => _MaterialHDRP, + _ => throw new System.NotImplementedException(), + }; + } + } +#endif + } +} diff --git a/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/RenderPipelineTerrainPatcher.cs.meta b/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/RenderPipelineTerrainPatcher.cs.meta new file mode 100644 index 000000000..404c26857 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/RenderPipelineTerrainPatcher.cs.meta @@ -0,0 +1,14 @@ +fileFormatVersion: 2 +guid: e49c7e9e3297f44b3a07573b45ec815d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: + - _Material: {fileID: 10650, guid: 0000000000000000f000000000000000, type: 0} + - _MaterialHDRP: {fileID: 2100000, guid: 22ff8771d87ef27429e670136399094b, type: 2} + - _MaterialURP: {fileID: 2100000, guid: 594ea882c5a793440b60ff72d896021e, type: 2} + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/RevertPrefabOnRenderPipelineChange.cs b/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/RevertPrefabOnRenderPipelineChange.cs new file mode 100644 index 000000000..b5259dc4a --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/RevertPrefabOnRenderPipelineChange.cs @@ -0,0 +1,49 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEditor; +using UnityEditor.SceneManagement; +using UnityEngine; + +namespace WaveHarmonic.Crest.Editor +{ +#if !CREST_DEBUG + [AddComponentMenu("")] +#endif + sealed class RevertPrefabOnRenderPipelineChange : RenderPipelinePatcher + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + +#if UNITY_EDITOR + private protected override void Awake() + { + base.Awake(); + if (!Application.isPlaying) OnActiveRenderPipelineTypeChanged(); + } + + protected override void OnActiveRenderPipelineTypeChanged() + { + if (PrefabStageUtility.GetCurrentPrefabStage() != null) + { + return; + } + + if (!isActiveAndEnabled) + { + return; + } + + foreach (var item in gameObject.GetComponents()) + { + if (item is Transform) continue; + if (item == null) continue; // Can happen if missing packages/scripts. + if (!PrefabUtility.IsPartOfPrefabInstance(item)) continue; + PrefabUtility.RevertObjectOverride(item, InteractionMode.AutomatedAction); + } + } +#endif + } +} diff --git a/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/RevertPrefabOnRenderPipelineChange.cs.meta b/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/RevertPrefabOnRenderPipelineChange.cs.meta new file mode 100644 index 000000000..d39c59ff4 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Scripts/Rendering/RevertPrefabOnRenderPipelineChange.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8ee84b2ccf836471c94ceaafe58b392e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Scripts/SendUnityEvent.cs b/Packages/com.waveharmonic.crest/Shared/Scripts/SendUnityEvent.cs new file mode 100644 index 000000000..8e3dbd9ea --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Scripts/SendUnityEvent.cs @@ -0,0 +1,91 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; +using UnityEngine.Events; + +namespace WaveHarmonic.Crest.Examples +{ +#if !CREST_DEBUG + [AddComponentMenu("")] +#endif + [ExecuteAlways] + sealed class SendUnityEvent : MonoBehaviour + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + + [SerializeField] + float _ExecuteUpdateEvery; + + [SerializeField] + float _StopExecutingUpdateAfter = Mathf.Infinity; + + [SerializeField] + UnityEvent _OnEnable = new(); + + [SerializeField] + UnityEvent _OnDisable = new(); + + [SerializeField] + UnityEvent _OnUpdate = new(); + + [SerializeField] + UnityEvent _OnLegacyRenderPipeline = new(); + + [SerializeField] + UnityEvent _OnHighDefinitionPipeline = new(); + + [SerializeField] + UnityEvent _OnUniversalRenderPipeline = new(); + + float _TimeSinceEnabled; + float _LastUpdateTime; + + void OnEnable() + { + _TimeSinceEnabled = 0f; + _OnEnable.Invoke(); + + if (RenderPipelineHelper.IsHighDefinition) + { + _OnHighDefinitionPipeline?.Invoke(); + } + else if (RenderPipelineHelper.IsUniversal) + { + _OnUniversalRenderPipeline?.Invoke(); + } + else + { + _OnLegacyRenderPipeline?.Invoke(); + } + } + + void OnDisable() + { + _OnDisable.Invoke(); + } + + void Update() + { + _TimeSinceEnabled += Time.deltaTime; + _LastUpdateTime += Time.deltaTime; + + if (_LastUpdateTime < _ExecuteUpdateEvery) + { + return; + } + + _LastUpdateTime = 0; + + if (_TimeSinceEnabled > _StopExecutingUpdateAfter) + { + return; + } + + _OnUpdate.Invoke(_TimeSinceEnabled); + } + } +} diff --git a/Packages/com.waveharmonic.crest/Shared/Scripts/SendUnityEvent.cs.meta b/Packages/com.waveharmonic.crest/Shared/Scripts/SendUnityEvent.cs.meta new file mode 100644 index 000000000..d0498a325 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Scripts/SendUnityEvent.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a8eca7a783ef84759a4e965c9d6d8827 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Scripts/SimpleMotion.cs b/Packages/com.waveharmonic.crest/Shared/Scripts/SimpleMotion.cs new file mode 100644 index 000000000..a7a1d6183 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Scripts/SimpleMotion.cs @@ -0,0 +1,65 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; + +namespace WaveHarmonic.Crest.Examples +{ + /// + /// Moves this transform. + /// +#if !CREST_DEBUG + [AddComponentMenu("")] +#endif + sealed class SimpleMotion : MonoBehaviour + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + + [SerializeField] + bool _ResetOnDisable; + + [SerializeField] + bool _IsLocal; + + [Header("Translation")] + [SerializeField] + Vector3 _Velocity; + + [Header("Rotation")] + [SerializeField] + Vector3 _AngularVelocity; + + Vector3 _OldPosition; + Quaternion _OldRotation; + + void OnEnable() + { + _OldPosition = transform.position; + _OldRotation = transform.rotation; + } + + void OnDisable() + { + if (_ResetOnDisable) + { + transform.SetPositionAndRotation(_OldPosition, _OldRotation); + } + } + + void Update() + { + // Translation + { + transform.position += (_IsLocal ? transform.TransformDirection(_Velocity) : _Velocity) * Time.deltaTime; + } + + // Rotation + { + transform.rotation *= Quaternion.Euler(_AngularVelocity * Time.deltaTime); + } + } + } +} diff --git a/Packages/com.waveharmonic.crest/Shared/Scripts/SimpleMotion.cs.meta b/Packages/com.waveharmonic.crest/Shared/Scripts/SimpleMotion.cs.meta new file mode 100644 index 000000000..fa8f79754 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Scripts/SimpleMotion.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f069d1ec9fe154d3ba75ff75ed08e5b9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Scripts/TimedDestroy.cs b/Packages/com.waveharmonic.crest/Shared/Scripts/TimedDestroy.cs new file mode 100644 index 000000000..5f96218dc --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Scripts/TimedDestroy.cs @@ -0,0 +1,62 @@ +// Crest Water System +// Copyright © 2024 Wave Harmonic. All rights reserved. + +using UnityEngine; + +namespace WaveHarmonic.Crest.Examples +{ + /// + /// Simple utility script to destroy the gameobject after a set time. + /// +#if !CREST_DEBUG + [AddComponentMenu("")] +#endif + sealed class TimedDestroy : MonoBehaviour + { + [SerializeField, HideInInspector] +#pragma warning disable 414 + int _Version = 0; +#pragma warning restore 414 + + [SerializeField] + float _LifeTime = 2.0f; + + // this seems to make motion stutter? + // [SerializeField] + // float _ScaleToOneDuration = 0.1f; + + [SerializeField] + float _ScaleToZeroDuration = 0.0f; + + Vector3 _Scale; + float _BirthTime; + + void Start() + { + _BirthTime = Time.time; + _Scale = transform.localScale; + } + + void Update() + { + var age = Time.time - _BirthTime; + + if (age >= _LifeTime) + { + Helpers.Destroy(gameObject); + } + else if (age > _LifeTime - _ScaleToZeroDuration) + { + transform.localScale = _Scale * (1.0f - (age - (_LifeTime - _ScaleToZeroDuration)) / _ScaleToZeroDuration); + } + /*else if (age < _ScaleToOneDuration && _ScaleToOneDuration > 0.0f) + { + transform.localScale = _Scale * age / _ScaleToOneDuration; + }*/ + else + { + transform.localScale = _Scale; + } + } + } +} diff --git a/Packages/com.waveharmonic.crest/Shared/Scripts/TimedDestroy.cs.meta b/Packages/com.waveharmonic.crest/Shared/Scripts/TimedDestroy.cs.meta new file mode 100644 index 000000000..00b4b0323 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Scripts/TimedDestroy.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e3080de53ec3d224eba7fe59e0309668 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Scripts/WaveHarmonic.Crest.Samples.asmdef b/Packages/com.waveharmonic.crest/Shared/Scripts/WaveHarmonic.Crest.Samples.asmdef new file mode 100644 index 000000000..eeced06e4 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Scripts/WaveHarmonic.Crest.Samples.asmdef @@ -0,0 +1,50 @@ +{ + "name": "WaveHarmonic.Crest.Samples", + "rootNamespace": "", + "references": [ + "GUID:75469ad4d38634e559750d17036d5f7c", + "GUID:d60799ab2a985554ea1a39cd38695018", + "GUID:df380645f10b7bc4b97d4f5eb6303d95", + "GUID:457756d89b35d2941b3e7b37b4ece6f1", + "GUID:7c347618730f5467f86a58f333ce21df", + "GUID:056ff2a5b2f124d468c6655552acdca5", + "GUID:1ab2a6c2a51cd4b43867788dbaee1a55" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": false, + "defineConstraints": [ + "UNITY_2022_3_OR_NEWER" + ], + "versionDefines": [ + { + "name": "com.unity.modules.vr", + "expression": "", + "define": "d_UnityModuleVR" + }, + { + "name": "com.unity.inputsystem", + "expression": "", + "define": "d_UnityInputSystem" + }, + { + "name": "com.unity.postprocessing", + "expression": "", + "define": "d_UnityPostProcessing" + }, + { + "name": "com.unity.render-pipelines.high-definition", + "expression": "", + "define": "d_UnityHDRP" + }, + { + "name": "com.unity.render-pipelines.universal", + "expression": "", + "define": "d_UnityURP" + } + ], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Packages/com.waveharmonic.crest/Shared/Scripts/WaveHarmonic.Crest.Samples.asmdef.meta b/Packages/com.waveharmonic.crest/Shared/Scripts/WaveHarmonic.Crest.Samples.asmdef.meta new file mode 100644 index 000000000..3a7ec8633 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Scripts/WaveHarmonic.Crest.Samples.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 3a6ae266c63a146c6876ee98745a14fa +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Settings.meta b/Packages/com.waveharmonic.crest/Shared/Settings.meta new file mode 100644 index 000000000..39f692151 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Settings.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 042620ef65bd84cf1a42418416f92608 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Settings/Atmosphere.asset b/Packages/com.waveharmonic.crest/Shared/Settings/Atmosphere.asset new file mode 100644 index 000000000..6838938a7 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Settings/Atmosphere.asset @@ -0,0 +1,588 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-8129522367056695605 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d877ec3e844f2ca46830012e8e79319b, type: 3} + m_Name: PhysicallyBasedSky + m_EditorClassIdentifier: + active: 1 + rotation: + m_OverrideState: 0 + m_Value: 0 + skyIntensityMode: + m_OverrideState: 0 + m_Value: 0 + exposure: + m_OverrideState: 0 + m_Value: 0 + multiplier: + m_OverrideState: 0 + m_Value: 1 + upperHemisphereLuxValue: + m_OverrideState: 0 + m_Value: 1 + upperHemisphereLuxColor: + m_OverrideState: 0 + m_Value: {x: 0, y: 0, z: 0} + desiredLuxValue: + m_OverrideState: 0 + m_Value: 20000 + updateMode: + m_OverrideState: 0 + m_Value: 0 + updatePeriod: + m_OverrideState: 0 + m_Value: 0 + includeSunInBaking: + m_OverrideState: 0 + m_Value: 0 + type: + m_OverrideState: 0 + m_Value: 1 + atmosphericScattering: + m_OverrideState: 0 + m_Value: 1 + renderingMode: + m_OverrideState: 0 + m_Value: 0 + material: + m_OverrideState: 0 + m_Value: {fileID: 0} + airDensityR: + m_OverrideState: 0 + m_Value: 0.04534 + airDensityG: + m_OverrideState: 0 + m_Value: 0.10237241 + airDensityB: + m_OverrideState: 0 + m_Value: 0.23264056 + airTint: + m_OverrideState: 0 + m_Value: {r: 1, g: 1, b: 1, a: 1} + airMaximumAltitude: + m_OverrideState: 0 + m_Value: 55261.973 + aerosolDensity: + m_OverrideState: 0 + m_Value: 0.01192826 + aerosolTint: + m_OverrideState: 0 + m_Value: {r: 0.9, g: 0.9, b: 0.9, a: 1} + aerosolMaximumAltitude: + m_OverrideState: 0 + m_Value: 8289.296 + aerosolAnisotropy: + m_OverrideState: 0 + m_Value: 0 + ozoneDensityDimmer: + m_OverrideState: 0 + m_Value: 1 + ozoneMinimumAltitude: + m_OverrideState: 0 + m_Value: 20000 + ozoneLayerWidth: + m_OverrideState: 0 + m_Value: 20000 + groundTint: + m_OverrideState: 0 + m_Value: {r: 0.4, g: 0.25, b: 0.15, a: 1} + groundColorTexture: + m_OverrideState: 0 + m_Value: {fileID: 0} + groundEmissionTexture: + m_OverrideState: 0 + m_Value: {fileID: 0} + groundEmissionMultiplier: + m_OverrideState: 0 + m_Value: 1 + planetRotation: + m_OverrideState: 0 + m_Value: {x: 0, y: 0, z: 0} + spaceEmissionTexture: + m_OverrideState: 0 + m_Value: {fileID: 0} + spaceEmissionMultiplier: + m_OverrideState: 0 + m_Value: 1 + spaceRotation: + m_OverrideState: 0 + m_Value: {x: 0, y: 0, z: 0} + colorSaturation: + m_OverrideState: 0 + m_Value: 1 + alphaSaturation: + m_OverrideState: 0 + m_Value: 1 + alphaMultiplier: + m_OverrideState: 0 + m_Value: 1 + horizonTint: + m_OverrideState: 0 + m_Value: {r: 1, g: 1, b: 1, a: 1} + zenithTint: + m_OverrideState: 0 + m_Value: {r: 1, g: 1, b: 1, a: 1} + horizonZenithShift: + m_OverrideState: 0 + m_Value: 0 + m_SkyVersion: 2 + m_ObsoleteEarthPreset: + m_OverrideState: 0 + m_Value: 1 + planetaryRadius: + m_OverrideState: 0 + m_Value: 6378100 + planetCenterPosition: + m_OverrideState: 0 + m_Value: {x: 0, y: -6378100, z: 0} +--- !u!114 &-3053135762479981819 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e88178bb13f64a54f90d6cd6ef7aa9a1, type: 3} + m_Name: CloudLayer + m_EditorClassIdentifier: + active: 1 + opacity: + m_OverrideState: 1 + m_Value: 1 + upperHemisphereOnly: + m_OverrideState: 0 + m_Value: 1 + layers: + m_OverrideState: 1 + m_Value: 0 + resolution: + m_OverrideState: 0 + m_Value: 1024 + shadowMultiplier: + m_OverrideState: 0 + m_Value: 1 + shadowTint: + m_OverrideState: 0 + m_Value: {r: 0, g: 0, b: 0, a: 1} + shadowResolution: + m_OverrideState: 0 + m_Value: 256 + shadowSize: + m_OverrideState: 0 + m_Value: 500 + layerA: + cloudMap: + m_OverrideState: 0 + m_Value: {fileID: 2800000, guid: 57a33fc2476a01644865bfde5f06e2f4, type: 3} + opacityR: + m_OverrideState: 0 + m_Value: 1 + opacityG: + m_OverrideState: 0 + m_Value: 0 + opacityB: + m_OverrideState: 0 + m_Value: 0.145 + opacityA: + m_OverrideState: 0 + m_Value: 0 + altitude: + m_OverrideState: 1 + m_Value: 1000 + rotation: + m_OverrideState: 0 + m_Value: 0 + tint: + m_OverrideState: 0 + m_Value: {r: 1, g: 1, b: 1, a: 1} + exposure: + m_OverrideState: 1 + m_Value: 2 + distortionMode: + m_OverrideState: 0 + m_Value: 0 + scrollOrientation: + m_OverrideState: 0 + m_Value: + mode: 1 + customValue: 0 + additiveValue: 0 + multiplyValue: 1 + scrollSpeed: + m_OverrideState: 0 + m_Value: + mode: 1 + customValue: 100 + additiveValue: 0 + multiplyValue: 1 + flowmap: + m_OverrideState: 0 + m_Value: {fileID: 0} + lighting: + m_OverrideState: 0 + m_Value: 1 + steps: + m_OverrideState: 0 + m_Value: 6 + thickness: + m_OverrideState: 0 + m_Value: 0.5 + ambientProbeDimmer: + m_OverrideState: 0 + m_Value: 1 + castShadows: + m_OverrideState: 0 + m_Value: 0 + layerB: + cloudMap: + m_OverrideState: 0 + m_Value: {fileID: 2800000, guid: 57a33fc2476a01644865bfde5f06e2f4, type: 3} + opacityR: + m_OverrideState: 0 + m_Value: 1 + opacityG: + m_OverrideState: 0 + m_Value: 0 + opacityB: + m_OverrideState: 0 + m_Value: 0 + opacityA: + m_OverrideState: 0 + m_Value: 0 + altitude: + m_OverrideState: 0 + m_Value: 2000 + rotation: + m_OverrideState: 0 + m_Value: 0 + tint: + m_OverrideState: 0 + m_Value: {r: 1, g: 1, b: 1, a: 1} + exposure: + m_OverrideState: 0 + m_Value: 0 + distortionMode: + m_OverrideState: 0 + m_Value: 0 + scrollOrientation: + m_OverrideState: 0 + m_Value: + mode: 1 + customValue: 0 + additiveValue: 0 + multiplyValue: 1 + scrollSpeed: + m_OverrideState: 0 + m_Value: + mode: 1 + customValue: 100 + additiveValue: 0 + multiplyValue: 1 + flowmap: + m_OverrideState: 0 + m_Value: {fileID: 0} + lighting: + m_OverrideState: 0 + m_Value: 1 + steps: + m_OverrideState: 0 + m_Value: 6 + thickness: + m_OverrideState: 0 + m_Value: 0.5 + ambientProbeDimmer: + m_OverrideState: 0 + m_Value: 1 + castShadows: + m_OverrideState: 0 + m_Value: 0 +--- !u!114 &-1658960478407648048 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 59b6606ef2548734bb6d11b9d160bc7e, type: 3} + m_Name: HDRISky + m_EditorClassIdentifier: + active: 1 + rotation: + m_OverrideState: 1 + m_Value: 296 + skyIntensityMode: + m_OverrideState: 1 + m_Value: 0 + exposure: + m_OverrideState: 1 + m_Value: 14 + multiplier: + m_OverrideState: 0 + m_Value: 1 + upperHemisphereLuxValue: + m_OverrideState: 1 + m_Value: 4.738129 + upperHemisphereLuxColor: + m_OverrideState: 1 + m_Value: {x: 0.4377769, y: 0.45977402, z: 0.5} + desiredLuxValue: + m_OverrideState: 0 + m_Value: 20000 + updateMode: + m_OverrideState: 0 + m_Value: 0 + updatePeriod: + m_OverrideState: 0 + m_Value: 0 + includeSunInBaking: + m_OverrideState: 0 + m_Value: 0 + hdriSky: + m_OverrideState: 1 + m_Value: {fileID: 8900000, guid: b04e3fd8ac149468c93ae5deec99b0d7, type: 3} + distortionMode: + m_OverrideState: 0 + m_Value: 0 + flowmap: + m_OverrideState: 0 + m_Value: {fileID: 0} + upperHemisphereOnly: + m_OverrideState: 0 + m_Value: 1 + scrollOrientation: + m_OverrideState: 0 + m_Value: + mode: 1 + customValue: 0 + additiveValue: 0 + multiplyValue: 1 + scrollSpeed: + m_OverrideState: 0 + m_Value: + mode: 1 + customValue: 100 + additiveValue: 0 + multiplyValue: 1 + sunInitialRotation: + m_OverrideState: 0 + m_Value: -Infinity + lockSun: + m_OverrideState: 0 + m_Value: 0 + enableBackplate: + m_OverrideState: 0 + m_Value: 0 + backplateType: + m_OverrideState: 0 + m_Value: 0 + groundLevel: + m_OverrideState: 0 + m_Value: 0 + scale: + m_OverrideState: 0 + m_Value: {x: 32, y: 32} + projectionDistance: + m_OverrideState: 0 + m_Value: 16 + plateRotation: + m_OverrideState: 0 + m_Value: 0 + plateTexRotation: + m_OverrideState: 0 + m_Value: 0 + plateTexOffset: + m_OverrideState: 0 + m_Value: {x: 0, y: 0} + blendAmount: + m_OverrideState: 0 + m_Value: 0 + shadowTint: + m_OverrideState: 0 + m_Value: {r: 0.5, g: 0.5, b: 0.5, a: 1} + pointLightShadow: + m_OverrideState: 0 + m_Value: 0 + dirLightShadow: + m_OverrideState: 0 + m_Value: 0 + rectLightShadow: + m_OverrideState: 0 + m_Value: 0 + m_SkyVersion: 1 + enableDistortion: + m_OverrideState: 0 + m_Value: 0 + procedural: + m_OverrideState: 0 + m_Value: 1 + scrollDirection: + m_OverrideState: 0 + m_Value: 0 + m_ObsoleteScrollSpeed: + m_OverrideState: 0 + m_Value: 1 +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d7fd9488000d3734a9e00ee676215985, type: 3} + m_Name: Atmosphere + m_EditorClassIdentifier: + components: + - {fileID: 3912485203739470195} + - {fileID: -1658960478407648048} + - {fileID: -8129522367056695605} + - {fileID: 5321722785694334585} + - {fileID: -3053135762479981819} +--- !u!114 &3912485203739470195 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0d7593b3a9277ac4696b20006c21dde2, type: 3} + m_Name: + m_EditorClassIdentifier: + active: 1 + skyType: + m_OverrideState: 1 + m_Value: 1 + cloudType: + m_OverrideState: 1 + m_Value: 0 + skyAmbientMode: + m_OverrideState: 1 + m_Value: 1 + planetRadius: + m_OverrideState: 0 + m_Value: 6378.1 + renderingSpace: + m_OverrideState: 0 + m_Value: 1 + centerMode: + m_OverrideState: 0 + m_Value: 0 + planetCenter: + m_OverrideState: 0 + m_Value: {x: 0, y: -6378.1, z: 0} + windOrientation: + m_OverrideState: 0 + m_Value: 0 + windSpeed: + m_OverrideState: 0 + m_Value: 100 + fogType: + m_OverrideState: 1 + m_Value: 3 + m_Version: 1 +--- !u!114 &5321722785694334585 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 953beb541740ddc499d005ee80c9ff29, type: 3} + m_Name: Fog + m_EditorClassIdentifier: + active: 1 + quality: + m_OverrideState: 0 + m_Value: 1 + enabled: + m_OverrideState: 1 + m_Value: 1 + colorMode: + m_OverrideState: 0 + m_Value: 1 + color: + m_OverrideState: 0 + m_Value: {r: 0.5, g: 0.5, b: 0.5, a: 1} + tint: + m_OverrideState: 0 + m_Value: {r: 1, g: 1, b: 1, a: 1} + maxFogDistance: + m_OverrideState: 0 + m_Value: 5000 + mipFogMaxMip: + m_OverrideState: 0 + m_Value: 0.5 + mipFogNear: + m_OverrideState: 0 + m_Value: 0 + mipFogFar: + m_OverrideState: 0 + m_Value: 1000 + baseHeight: + m_OverrideState: 0 + m_Value: 0 + maximumHeight: + m_OverrideState: 0 + m_Value: 50 + meanFreePath: + m_OverrideState: 1 + m_Value: 10000 + enableVolumetricFog: + m_OverrideState: 1 + m_Value: 0 + albedo: + m_OverrideState: 0 + m_Value: {r: 1, g: 1, b: 1, a: 1} + globalLightProbeDimmer: + m_OverrideState: 0 + m_Value: 1 + depthExtent: + m_OverrideState: 0 + m_Value: 64 + denoisingMode: + m_OverrideState: 0 + m_Value: 2 + anisotropy: + m_OverrideState: 0 + m_Value: 0.6 + sliceDistributionUniformity: + m_OverrideState: 0 + m_Value: 0.75 + multipleScatteringIntensity: + m_OverrideState: 0 + m_Value: 0 + m_FogControlMode: + m_OverrideState: 0 + m_Value: 0 + screenResolutionPercentage: + m_OverrideState: 0 + m_Value: 12.5 + volumeSliceCount: + m_OverrideState: 0 + m_Value: 64 + m_VolumetricFogBudget: + m_OverrideState: 0 + m_Value: 0.33 + m_ResolutionDepthRatio: + m_OverrideState: 0 + m_Value: 0.666 + directionalLightsOnly: + m_OverrideState: 0 + m_Value: 0 diff --git a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/RatchetCable.asset.meta b/Packages/com.waveharmonic.crest/Shared/Settings/Atmosphere.asset.meta similarity index 78% rename from Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/RatchetCable.asset.meta rename to Packages/com.waveharmonic.crest/Shared/Settings/Atmosphere.asset.meta index b507136b6..94af0d814 100644 --- a/Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/RatchetCable.asset.meta +++ b/Packages/com.waveharmonic.crest/Shared/Settings/Atmosphere.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 558d68cba3927468abede77a3852186b +guid: ec2b869d521934af4a38390f24190cbc NativeFormatImporter: externalObjects: {} mainObjectFileID: 0 diff --git a/Packages/com.waveharmonic.crest/Shared/Settings/Lighting.asset b/Packages/com.waveharmonic.crest/Shared/Settings/Lighting.asset new file mode 100644 index 000000000..fd0a30cdb --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Settings/Lighting.asset @@ -0,0 +1,133 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-6490523387845513046 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 384c4d03a551c44448145f4093304119, type: 3} + m_Name: ScreenSpaceReflection + m_EditorClassIdentifier: + active: 1 + quality: + m_OverrideState: 0 + m_Value: 1 + enabled: + m_OverrideState: 1 + m_Value: 1 + enabledTransparent: + m_OverrideState: 1 + m_Value: 1 + tracing: + m_OverrideState: 0 + m_Value: 1 + m_MinSmoothness: + m_OverrideState: 1 + m_Value: 0.8 + m_SmoothnessFadeStart: + m_OverrideState: 0 + m_Value: 0.9 + reflectSky: + m_OverrideState: 1 + m_Value: 1 + usedAlgorithm: + m_OverrideState: 0 + m_Value: 0 + depthBufferThickness: + m_OverrideState: 0 + m_Value: 0.1 + screenFadeDistance: + m_OverrideState: 0 + m_Value: 0.1 + accumulationFactor: + m_OverrideState: 0 + m_Value: 0.75 + biasFactor: + m_OverrideState: 0 + m_Value: 0.5 + speedRejectionParam: + m_OverrideState: 0 + m_Value: 0.5 + speedRejectionScalerFactor: + m_OverrideState: 0 + m_Value: 0.2 + speedSmoothReject: + m_OverrideState: 0 + m_Value: 0 + speedSurfaceOnly: + m_OverrideState: 0 + m_Value: 1 + speedTargetOnly: + m_OverrideState: 0 + m_Value: 1 + enableWorldSpeedRejection: + m_OverrideState: 0 + m_Value: 0 + m_RayMaxIterations: + m_OverrideState: 0 + m_Value: 32 + rayMiss: + m_OverrideState: 0 + m_Value: 3 + lastBounceFallbackHierarchy: + m_OverrideState: 0 + m_Value: 3 + ambientProbeDimmer: + m_OverrideState: 0 + m_Value: 1 + layerMask: + m_OverrideState: 0 + m_Value: + serializedVersion: 2 + m_Bits: 4294967295 + textureLodBias: + m_OverrideState: 0 + m_Value: 1 + m_RayLength: + m_OverrideState: 0 + m_Value: 50 + m_ClampValue: + m_OverrideState: 0 + m_Value: 1 + m_Denoise: + m_OverrideState: 0 + m_Value: 1 + m_DenoiserRadius: + m_OverrideState: 0 + m_Value: 8 + m_AffectSmoothSurfaces: + m_OverrideState: 0 + m_Value: 0 + mode: + m_OverrideState: 0 + m_Value: 2 + m_FullResolution: + m_OverrideState: 0 + m_Value: 0 + sampleCount: + m_OverrideState: 0 + m_Value: 1 + bounceCount: + m_OverrideState: 0 + m_Value: 1 + m_RayMaxIterationsRT: + m_OverrideState: 0 + m_Value: 48 +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d7fd9488000d3734a9e00ee676215985, type: 3} + m_Name: Lighting + m_EditorClassIdentifier: + components: + - {fileID: -6490523387845513046} diff --git a/Packages/com.waveharmonic.crest/Shared/Settings/Lighting.asset.meta b/Packages/com.waveharmonic.crest/Shared/Settings/Lighting.asset.meta new file mode 100644 index 000000000..a356abb95 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Settings/Lighting.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1b855fdf6e03846cfa67429f60b5c0a8 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Settings/Lighting.lighting b/Packages/com.waveharmonic.crest/Shared/Settings/Lighting.lighting new file mode 100644 index 000000000..c92f9fd3f --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Settings/Lighting.lighting @@ -0,0 +1,66 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!850595691 &4890085278179872738 +LightingSettings: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Lighting + serializedVersion: 6 + m_GIWorkflowMode: 0 + m_EnableBakedLightmaps: 0 + m_EnableRealtimeLightmaps: 0 + m_RealtimeEnvironmentLighting: 1 + m_BounceScale: 1 + m_AlbedoBoost: 1 + m_IndirectOutputScale: 1 + m_UsingShadowmask: 1 + m_BakeBackend: 2 + m_LightmapMaxSize: 1024 + m_BakeResolution: 40 + m_Padding: 2 + m_LightmapCompression: 2 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAO: 0 + m_MixedBakeMode: 2 + m_LightmapsBakeMode: 1 + m_FilterMode: 1 + m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_RealtimeResolution: 2 + m_ForceWhiteAlbedo: 0 + m_ForceUpdates: 0 + m_FinalGather: 0 + m_FinalGatherRayCount: 256 + m_FinalGatherFiltering: 1 + m_PVRCulling: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVREnvironmentSampleCount: 256 + m_PVREnvironmentReferencePointCount: 2048 + m_LightProbeSampleCountMultiplier: 4 + m_PVRBounces: 2 + m_PVRMinBounces: 2 + m_PVREnvironmentImportanceSampling: 1 + m_PVRFilteringMode: 1 + m_PVRDenoiserTypeDirect: 1 + m_PVRDenoiserTypeIndirect: 1 + m_PVRDenoiserTypeAO: 1 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_PVRTiledBaking: 0 + m_NumRaysToShootPerTexel: -1 + m_RespectSceneVisibilityWhenBakingGI: 0 diff --git a/Packages/com.waveharmonic.crest/Shared/Settings/Lighting.lighting.meta b/Packages/com.waveharmonic.crest/Shared/Settings/Lighting.lighting.meta new file mode 100644 index 000000000..0213e53c2 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Settings/Lighting.lighting.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6e72aca972f324f7886200f86939d735 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 4890085278179872738 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Settings/PostProcessing.asset b/Packages/com.waveharmonic.crest/Shared/Settings/PostProcessing.asset new file mode 100644 index 000000000..55d71aed0 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Settings/PostProcessing.asset @@ -0,0 +1,518 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-6684861221409925966 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0b2db86121404754db890f4c8dfe81b2, type: 3} + m_Name: Bloom + m_EditorClassIdentifier: + active: 1 + skipIterations: + m_OverrideState: 0 + m_Value: 1 + threshold: + m_OverrideState: 1 + m_Value: 1 + intensity: + m_OverrideState: 1 + m_Value: 0.2 + scatter: + m_OverrideState: 0 + m_Value: 0.7 + clamp: + m_OverrideState: 0 + m_Value: 65472 + tint: + m_OverrideState: 0 + m_Value: {r: 1, g: 1, b: 1, a: 1} + highQualityFiltering: + m_OverrideState: 0 + m_Value: 0 + downscale: + m_OverrideState: 0 + m_Value: 0 + maxIterations: + m_OverrideState: 0 + m_Value: 6 + dirtTexture: + m_OverrideState: 0 + m_Value: {fileID: 0} + dimension: 1 + dirtIntensity: + m_OverrideState: 0 + m_Value: 0 +--- !u!114 &-2109818796249167647 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 598e2d32e2c7b0c418e030c3236d663a, type: 3} + m_Name: ChromaticAberration + m_EditorClassIdentifier: + active: 1 + quality: + m_OverrideState: 0 + m_Value: 1 + spectralLut: + m_OverrideState: 0 + m_Value: {fileID: 0} + intensity: + m_OverrideState: 1 + m_Value: 0.05 + m_MaxSamples: + m_OverrideState: 0 + m_Value: 6 +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d7fd9488000d3734a9e00ee676215985, type: 3} + m_Name: PostProcessing + m_EditorClassIdentifier: + components: + - {fileID: 5230380330664722816} + - {fileID: 8711377374188185572} + - {fileID: 6640133647794636954} + - {fileID: 396278178000043239} + - {fileID: -2109818796249167647} + - {fileID: -6684861221409925966} + - {fileID: 2718417390662674063} + - {fileID: 1692474355597373712} + - {fileID: 89624805562497374} + - {fileID: 7577113519358791614} + - {fileID: 4527986752527755293} +--- !u!114 &89624805562497374 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f086a068d4c5889438831b3ae9afc11c, type: 3} + m_Name: Tonemapping + m_EditorClassIdentifier: + active: 1 + mode: + m_OverrideState: 1 + m_Value: 2 + useFullACES: + m_OverrideState: 0 + m_Value: 0 + toeStrength: + m_OverrideState: 0 + m_Value: 0 + toeLength: + m_OverrideState: 0 + m_Value: 0.5 + shoulderStrength: + m_OverrideState: 0 + m_Value: 0 + shoulderLength: + m_OverrideState: 0 + m_Value: 0.5 + shoulderAngle: + m_OverrideState: 0 + m_Value: 0 + gamma: + m_OverrideState: 0 + m_Value: 1 + lutTexture: + m_OverrideState: 0 + m_Value: {fileID: 0} + lutContribution: + m_OverrideState: 0 + m_Value: 1 + neutralHDRRangeReductionMode: + m_OverrideState: 0 + m_Value: 2 + acesPreset: + m_OverrideState: 0 + m_Value: 3 + fallbackMode: + m_OverrideState: 0 + m_Value: 1 + hueShiftAmount: + m_OverrideState: 0 + m_Value: 0 + detectPaperWhite: + m_OverrideState: 0 + m_Value: 0 + paperWhite: + m_OverrideState: 0 + m_Value: 300 + detectBrightnessLimits: + m_OverrideState: 0 + m_Value: 1 + minNits: + m_OverrideState: 0 + m_Value: 0.005 + maxNits: + m_OverrideState: 0 + m_Value: 1000 +--- !u!114 &396278178000043239 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b51a78e223a2e504bb88a059b55229ea, type: 3} + m_Name: WhiteBalance + m_EditorClassIdentifier: + active: 0 + temperature: + m_OverrideState: 0 + m_Value: 0 + tint: + m_OverrideState: 0 + m_Value: 0 +--- !u!114 &1692474355597373712 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 66f335fb1ffd8684294ad653bf1c7564, type: 3} + m_Name: ColorAdjustments + m_EditorClassIdentifier: + active: 1 + postExposure: + m_OverrideState: 0 + m_Value: 0 + contrast: + m_OverrideState: 1 + m_Value: 10 + colorFilter: + m_OverrideState: 0 + m_Value: {r: 1, g: 1, b: 1, a: 1} + hueShift: + m_OverrideState: 0 + m_Value: 0 + saturation: + m_OverrideState: 1 + m_Value: 10 +--- !u!114 &2718417390662674063 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 97c23e3b12dc18c42a140437e53d3951, type: 3} + m_Name: Tonemapping + m_EditorClassIdentifier: + active: 1 + mode: + m_OverrideState: 1 + m_Value: 2 + neutralHDRRangeReductionMode: + m_OverrideState: 0 + m_Value: 2 + acesPreset: + m_OverrideState: 0 + m_Value: 3 + hueShiftAmount: + m_OverrideState: 0 + m_Value: 0 + detectPaperWhite: + m_OverrideState: 0 + m_Value: 0 + paperWhite: + m_OverrideState: 0 + m_Value: 300 + detectBrightnessLimits: + m_OverrideState: 0 + m_Value: 1 + minNits: + m_OverrideState: 0 + m_Value: 0.005 + maxNits: + m_OverrideState: 0 + m_Value: 1000 +--- !u!114 &4527986752527755293 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 81180773991d8724ab7f2d216912b564, type: 3} + m_Name: ChromaticAberration + m_EditorClassIdentifier: + active: 1 + intensity: + m_OverrideState: 1 + m_Value: 0.05 +--- !u!114 &5230380330664722816 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 899c54efeace73346a0a16faa3afe726, type: 3} + m_Name: Vignette + m_EditorClassIdentifier: + active: 1 + color: + m_OverrideState: 0 + m_Value: {r: 0, g: 0, b: 0, a: 1} + center: + m_OverrideState: 0 + m_Value: {x: 0.5, y: 0.5} + intensity: + m_OverrideState: 1 + m_Value: 0.3 + smoothness: + m_OverrideState: 0 + m_Value: 0.2 + rounded: + m_OverrideState: 0 + m_Value: 0 +--- !u!114 &6640133647794636954 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2d08ce26990eb1a4a9177b860541e702, type: 3} + m_Name: Exposure + m_EditorClassIdentifier: + active: 1 + mode: + m_OverrideState: 1 + m_Value: 1 + meteringMode: + m_OverrideState: 0 + m_Value: 2 + luminanceSource: + m_OverrideState: 0 + m_Value: 1 + fixedExposure: + m_OverrideState: 1 + m_Value: 8.5 + compensation: + m_OverrideState: 0 + m_Value: 0 + limitMin: + m_OverrideState: 0 + m_Value: -5 + limitMax: + m_OverrideState: 1 + m_Value: 13 + curveMap: + m_OverrideState: 0 + m_Value: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: -10 + value: -10 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 20 + value: 20 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + limitMinCurveMap: + m_OverrideState: 0 + m_Value: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: -10 + value: -12 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 20 + value: 18 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + limitMaxCurveMap: + m_OverrideState: 0 + m_Value: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: -10 + value: -8 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 20 + value: 22 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + adaptationMode: + m_OverrideState: 0 + m_Value: 1 + adaptationSpeedDarkToLight: + m_OverrideState: 0 + m_Value: 3 + adaptationSpeedLightToDark: + m_OverrideState: 0 + m_Value: 1 + weightTextureMask: + m_OverrideState: 0 + m_Value: {fileID: 0} + histogramPercentages: + m_OverrideState: 0 + m_Value: {x: 40, y: 90} + histogramUseCurveRemapping: + m_OverrideState: 0 + m_Value: 0 + targetMidGray: + m_OverrideState: 0 + m_Value: 0 + centerAroundExposureTarget: + m_OverrideState: 0 + m_Value: 0 + proceduralCenter: + m_OverrideState: 0 + m_Value: {x: 0.5, y: 0.5} + proceduralRadii: + m_OverrideState: 0 + m_Value: {x: 0.3, y: 0.3} + maskMinIntensity: + m_OverrideState: 0 + m_Value: -30 + maskMaxIntensity: + m_OverrideState: 0 + m_Value: 30 + proceduralSoftness: + m_OverrideState: 0 + m_Value: 0.5 +--- !u!114 &7577113519358791614 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4b8bcdf71d7fafa419fca1ed162f5fc9, type: 3} + m_Name: ColorAdjustments + m_EditorClassIdentifier: + active: 1 + postExposure: + m_OverrideState: 0 + m_Value: 0 + contrast: + m_OverrideState: 1 + m_Value: 10 + colorFilter: + m_OverrideState: 0 + m_Value: {r: 1, g: 1, b: 1, a: 1} + hueShift: + m_OverrideState: 0 + m_Value: 0 + saturation: + m_OverrideState: 1 + m_Value: 40 +--- !u!114 &8711377374188185572 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2c1be1b6c95cd2e41b27903b9270817f, type: 3} + m_Name: Vignette + m_EditorClassIdentifier: + active: 1 + mode: + m_OverrideState: 0 + m_Value: 0 + color: + m_OverrideState: 0 + m_Value: {r: 0, g: 0, b: 0, a: 1} + center: + m_OverrideState: 0 + m_Value: {x: 0.5, y: 0.5} + intensity: + m_OverrideState: 1 + m_Value: 0.25 + smoothness: + m_OverrideState: 0 + m_Value: 0.2 + roundness: + m_OverrideState: 0 + m_Value: 1 + rounded: + m_OverrideState: 0 + m_Value: 0 + mask: + m_OverrideState: 0 + m_Value: {fileID: 0} + opacity: + m_OverrideState: 0 + m_Value: 1 diff --git a/Packages/com.waveharmonic.crest/Shared/Settings/PostProcessing.asset.meta b/Packages/com.waveharmonic.crest/Shared/Settings/PostProcessing.asset.meta new file mode 100644 index 000000000..a7d899303 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Settings/PostProcessing.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 004d41514688842a38d03fb44d744f31 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Settings/PostProcessingV2.asset b/Packages/com.waveharmonic.crest/Shared/Settings/PostProcessingV2.asset new file mode 100644 index 000000000..b8f748b81 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Settings/PostProcessingV2.asset @@ -0,0 +1,1500 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-7257162781466735012 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 48a79b01ea5641d4aa6daa2e23605641, type: 3} + m_Name: Bloom + m_EditorClassIdentifier: + active: 1 + enabled: + overrideState: 1 + value: 1 + intensity: + overrideState: 1 + value: 0.3 + threshold: + overrideState: 1 + value: 1 + softKnee: + overrideState: 0 + value: 0.5 + clamp: + overrideState: 0 + value: 65472 + diffusion: + overrideState: 0 + value: 7 + anamorphicRatio: + overrideState: 0 + value: 0 + color: + overrideState: 0 + value: {r: 1, g: 1, b: 1, a: 1} + fastMode: + overrideState: 0 + value: 0 + dirtTexture: + overrideState: 0 + value: {fileID: 0} + defaultState: 1 + dirtIntensity: + overrideState: 0 + value: 0 +--- !u!114 &-6986014162803398553 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 40b924e2dad56384a8df2a1e111bb675, type: 3} + m_Name: Vignette + m_EditorClassIdentifier: + active: 1 + enabled: + overrideState: 1 + value: 1 + mode: + overrideState: 1 + value: 0 + color: + overrideState: 0 + value: {r: 0, g: 0, b: 0, a: 1} + center: + overrideState: 0 + value: {x: 0.5, y: 0.5} + intensity: + overrideState: 1 + value: 0.3 + smoothness: + overrideState: 0 + value: 0.2 + roundness: + overrideState: 0 + value: 1 + rounded: + overrideState: 0 + value: 0 + mask: + overrideState: 0 + value: {fileID: 0} + defaultState: 1 + opacity: + overrideState: 0 + value: 1 +--- !u!114 &-6610383233836386135 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6050e2d5de785ce4d931e4dbdbf2d755, type: 3} + m_Name: ChromaticAberration + m_EditorClassIdentifier: + active: 1 + enabled: + overrideState: 1 + value: 1 + spectralLut: + overrideState: 0 + value: {fileID: 0} + defaultState: 1 + intensity: + overrideState: 1 + value: 0.05 + fastMode: + overrideState: 0 + value: 0 +--- !u!114 &-3725662966176326820 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c1cb7e9e120078f43bce4f0b1be547a7, type: 3} + m_Name: AmbientOcclusion + m_EditorClassIdentifier: + active: 1 + enabled: + overrideState: 1 + value: 1 + mode: + overrideState: 1 + value: 1 + intensity: + overrideState: 1 + value: 0.25 + color: + overrideState: 0 + value: {r: 0, g: 0, b: 0, a: 1} + ambientOnly: + overrideState: 0 + value: 1 + noiseFilterTolerance: + overrideState: 0 + value: 0 + blurTolerance: + overrideState: 0 + value: -4.6 + upsampleTolerance: + overrideState: 0 + value: -12 + thicknessModifier: + overrideState: 0 + value: 1 + zBias: + overrideState: 0 + value: 0.0001 + directLightingStrength: + overrideState: 0 + value: 0 + radius: + overrideState: 0 + value: 0.25 + quality: + overrideState: 0 + value: 2 +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8e6292b2c06870d4495f009f912b9600, type: 3} + m_Name: PostProcessingV2 + m_EditorClassIdentifier: + settings: + - {fileID: -6986014162803398553} + - {fileID: -7257162781466735012} + - {fileID: -3725662966176326820} + - {fileID: 652007791346231872} + - {fileID: -6610383233836386135} +--- !u!114 &652007791346231872 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: adb84e30e02715445aeb9959894e3b4d, type: 3} + m_Name: ColorGrading + m_EditorClassIdentifier: + active: 1 + enabled: + overrideState: 1 + value: 1 + gradingMode: + overrideState: 1 + value: 1 + externalLut: + overrideState: 0 + value: {fileID: 0} + defaultState: 1 + tonemapper: + overrideState: 1 + value: 2 + toneCurveToeStrength: + overrideState: 0 + value: 0 + toneCurveToeLength: + overrideState: 0 + value: 0.5 + toneCurveShoulderStrength: + overrideState: 0 + value: 0 + toneCurveShoulderLength: + overrideState: 0 + value: 0.5 + toneCurveShoulderAngle: + overrideState: 0 + value: 0 + toneCurveGamma: + overrideState: 0 + value: 1 + ldrLut: + overrideState: 0 + value: {fileID: 0} + defaultState: 4 + ldrLutContribution: + overrideState: 0 + value: 1 + temperature: + overrideState: 0 + value: 24.8 + tint: + overrideState: 0 + value: 0 + colorFilter: + overrideState: 0 + value: {r: 1, g: 1, b: 1, a: 1} + hueShift: + overrideState: 0 + value: 0 + saturation: + overrideState: 1 + value: 10 + brightness: + overrideState: 0 + value: 0 + postExposure: + overrideState: 0 + value: 0 + contrast: + overrideState: 1 + value: 10 + mixerRedOutRedIn: + overrideState: 0 + value: 100 + mixerRedOutGreenIn: + overrideState: 0 + value: 0 + mixerRedOutBlueIn: + overrideState: 0 + value: 0 + mixerGreenOutRedIn: + overrideState: 0 + value: 0 + mixerGreenOutGreenIn: + overrideState: 0 + value: 100 + mixerGreenOutBlueIn: + overrideState: 0 + value: 0 + mixerBlueOutRedIn: + overrideState: 0 + value: 0 + mixerBlueOutGreenIn: + overrideState: 0 + value: 0 + mixerBlueOutBlueIn: + overrideState: 0 + value: 100 + lift: + overrideState: 0 + value: {x: 1, y: 1, z: 1, w: 0} + gamma: + overrideState: 0 + value: {x: 1, y: 1, z: 1, w: 0} + gain: + overrideState: 0 + value: {x: 1, y: 1, z: 1, w: 0} + masterCurve: + overrideState: 0 + value: + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + m_Loop: 0 + m_ZeroValue: 0 + m_Range: 1 + cachedData: + - 0 + - 0.0078125 + - 0.015625 + - 0.0234375 + - 0.03125 + - 0.0390625 + - 0.046875 + - 0.0546875 + - 0.0625 + - 0.0703125 + - 0.078125 + - 0.0859375 + - 0.09375 + - 0.1015625 + - 0.109375 + - 0.1171875 + - 0.125 + - 0.1328125 + - 0.140625 + - 0.1484375 + - 0.15625 + - 0.1640625 + - 0.171875 + - 0.1796875 + - 0.1875 + - 0.1953125 + - 0.203125 + - 0.2109375 + - 0.21875 + - 0.2265625 + - 0.234375 + - 0.2421875 + - 0.25 + - 0.2578125 + - 0.265625 + - 0.2734375 + - 0.28125 + - 0.2890625 + - 0.296875 + - 0.3046875 + - 0.3125 + - 0.3203125 + - 0.328125 + - 0.3359375 + - 0.34375 + - 0.3515625 + - 0.359375 + - 0.3671875 + - 0.375 + - 0.3828125 + - 0.390625 + - 0.3984375 + - 0.40625 + - 0.4140625 + - 0.421875 + - 0.4296875 + - 0.4375 + - 0.4453125 + - 0.453125 + - 0.4609375 + - 0.46875 + - 0.4765625 + - 0.484375 + - 0.4921875 + - 0.5 + - 0.5078125 + - 0.515625 + - 0.5234375 + - 0.53125 + - 0.5390625 + - 0.546875 + - 0.5546875 + - 0.5625 + - 0.5703125 + - 0.578125 + - 0.5859375 + - 0.59375 + - 0.6015625 + - 0.609375 + - 0.6171875 + - 0.625 + - 0.6328125 + - 0.640625 + - 0.6484375 + - 0.65625 + - 0.6640625 + - 0.671875 + - 0.6796875 + - 0.6875 + - 0.6953125 + - 0.703125 + - 0.7109375 + - 0.71875 + - 0.7265625 + - 0.734375 + - 0.7421875 + - 0.75 + - 0.7578125 + - 0.765625 + - 0.7734375 + - 0.78125 + - 0.7890625 + - 0.796875 + - 0.8046875 + - 0.8125 + - 0.8203125 + - 0.828125 + - 0.8359375 + - 0.84375 + - 0.8515625 + - 0.859375 + - 0.8671875 + - 0.875 + - 0.8828125 + - 0.890625 + - 0.8984375 + - 0.90625 + - 0.9140625 + - 0.921875 + - 0.9296875 + - 0.9375 + - 0.9453125 + - 0.953125 + - 0.9609375 + - 0.96875 + - 0.9765625 + - 0.984375 + - 0.9921875 + redCurve: + overrideState: 0 + value: + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + m_Loop: 0 + m_ZeroValue: 0 + m_Range: 1 + cachedData: + - 0 + - 0.0078125 + - 0.015625 + - 0.0234375 + - 0.03125 + - 0.0390625 + - 0.046875 + - 0.0546875 + - 0.0625 + - 0.0703125 + - 0.078125 + - 0.0859375 + - 0.09375 + - 0.1015625 + - 0.109375 + - 0.1171875 + - 0.125 + - 0.1328125 + - 0.140625 + - 0.1484375 + - 0.15625 + - 0.1640625 + - 0.171875 + - 0.1796875 + - 0.1875 + - 0.1953125 + - 0.203125 + - 0.2109375 + - 0.21875 + - 0.2265625 + - 0.234375 + - 0.2421875 + - 0.25 + - 0.2578125 + - 0.265625 + - 0.2734375 + - 0.28125 + - 0.2890625 + - 0.296875 + - 0.3046875 + - 0.3125 + - 0.3203125 + - 0.328125 + - 0.3359375 + - 0.34375 + - 0.3515625 + - 0.359375 + - 0.3671875 + - 0.375 + - 0.3828125 + - 0.390625 + - 0.3984375 + - 0.40625 + - 0.4140625 + - 0.421875 + - 0.4296875 + - 0.4375 + - 0.4453125 + - 0.453125 + - 0.4609375 + - 0.46875 + - 0.4765625 + - 0.484375 + - 0.4921875 + - 0.5 + - 0.5078125 + - 0.515625 + - 0.5234375 + - 0.53125 + - 0.5390625 + - 0.546875 + - 0.5546875 + - 0.5625 + - 0.5703125 + - 0.578125 + - 0.5859375 + - 0.59375 + - 0.6015625 + - 0.609375 + - 0.6171875 + - 0.625 + - 0.6328125 + - 0.640625 + - 0.6484375 + - 0.65625 + - 0.6640625 + - 0.671875 + - 0.6796875 + - 0.6875 + - 0.6953125 + - 0.703125 + - 0.7109375 + - 0.71875 + - 0.7265625 + - 0.734375 + - 0.7421875 + - 0.75 + - 0.7578125 + - 0.765625 + - 0.7734375 + - 0.78125 + - 0.7890625 + - 0.796875 + - 0.8046875 + - 0.8125 + - 0.8203125 + - 0.828125 + - 0.8359375 + - 0.84375 + - 0.8515625 + - 0.859375 + - 0.8671875 + - 0.875 + - 0.8828125 + - 0.890625 + - 0.8984375 + - 0.90625 + - 0.9140625 + - 0.921875 + - 0.9296875 + - 0.9375 + - 0.9453125 + - 0.953125 + - 0.9609375 + - 0.96875 + - 0.9765625 + - 0.984375 + - 0.9921875 + greenCurve: + overrideState: 0 + value: + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + m_Loop: 0 + m_ZeroValue: 0 + m_Range: 1 + cachedData: + - 0 + - 0.0078125 + - 0.015625 + - 0.0234375 + - 0.03125 + - 0.0390625 + - 0.046875 + - 0.0546875 + - 0.0625 + - 0.0703125 + - 0.078125 + - 0.0859375 + - 0.09375 + - 0.1015625 + - 0.109375 + - 0.1171875 + - 0.125 + - 0.1328125 + - 0.140625 + - 0.1484375 + - 0.15625 + - 0.1640625 + - 0.171875 + - 0.1796875 + - 0.1875 + - 0.1953125 + - 0.203125 + - 0.2109375 + - 0.21875 + - 0.2265625 + - 0.234375 + - 0.2421875 + - 0.25 + - 0.2578125 + - 0.265625 + - 0.2734375 + - 0.28125 + - 0.2890625 + - 0.296875 + - 0.3046875 + - 0.3125 + - 0.3203125 + - 0.328125 + - 0.3359375 + - 0.34375 + - 0.3515625 + - 0.359375 + - 0.3671875 + - 0.375 + - 0.3828125 + - 0.390625 + - 0.3984375 + - 0.40625 + - 0.4140625 + - 0.421875 + - 0.4296875 + - 0.4375 + - 0.4453125 + - 0.453125 + - 0.4609375 + - 0.46875 + - 0.4765625 + - 0.484375 + - 0.4921875 + - 0.5 + - 0.5078125 + - 0.515625 + - 0.5234375 + - 0.53125 + - 0.5390625 + - 0.546875 + - 0.5546875 + - 0.5625 + - 0.5703125 + - 0.578125 + - 0.5859375 + - 0.59375 + - 0.6015625 + - 0.609375 + - 0.6171875 + - 0.625 + - 0.6328125 + - 0.640625 + - 0.6484375 + - 0.65625 + - 0.6640625 + - 0.671875 + - 0.6796875 + - 0.6875 + - 0.6953125 + - 0.703125 + - 0.7109375 + - 0.71875 + - 0.7265625 + - 0.734375 + - 0.7421875 + - 0.75 + - 0.7578125 + - 0.765625 + - 0.7734375 + - 0.78125 + - 0.7890625 + - 0.796875 + - 0.8046875 + - 0.8125 + - 0.8203125 + - 0.828125 + - 0.8359375 + - 0.84375 + - 0.8515625 + - 0.859375 + - 0.8671875 + - 0.875 + - 0.8828125 + - 0.890625 + - 0.8984375 + - 0.90625 + - 0.9140625 + - 0.921875 + - 0.9296875 + - 0.9375 + - 0.9453125 + - 0.953125 + - 0.9609375 + - 0.96875 + - 0.9765625 + - 0.984375 + - 0.9921875 + blueCurve: + overrideState: 0 + value: + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + m_Loop: 0 + m_ZeroValue: 0 + m_Range: 1 + cachedData: + - 0 + - 0.0078125 + - 0.015625 + - 0.0234375 + - 0.03125 + - 0.0390625 + - 0.046875 + - 0.0546875 + - 0.0625 + - 0.0703125 + - 0.078125 + - 0.0859375 + - 0.09375 + - 0.1015625 + - 0.109375 + - 0.1171875 + - 0.125 + - 0.1328125 + - 0.140625 + - 0.1484375 + - 0.15625 + - 0.1640625 + - 0.171875 + - 0.1796875 + - 0.1875 + - 0.1953125 + - 0.203125 + - 0.2109375 + - 0.21875 + - 0.2265625 + - 0.234375 + - 0.2421875 + - 0.25 + - 0.2578125 + - 0.265625 + - 0.2734375 + - 0.28125 + - 0.2890625 + - 0.296875 + - 0.3046875 + - 0.3125 + - 0.3203125 + - 0.328125 + - 0.3359375 + - 0.34375 + - 0.3515625 + - 0.359375 + - 0.3671875 + - 0.375 + - 0.3828125 + - 0.390625 + - 0.3984375 + - 0.40625 + - 0.4140625 + - 0.421875 + - 0.4296875 + - 0.4375 + - 0.4453125 + - 0.453125 + - 0.4609375 + - 0.46875 + - 0.4765625 + - 0.484375 + - 0.4921875 + - 0.5 + - 0.5078125 + - 0.515625 + - 0.5234375 + - 0.53125 + - 0.5390625 + - 0.546875 + - 0.5546875 + - 0.5625 + - 0.5703125 + - 0.578125 + - 0.5859375 + - 0.59375 + - 0.6015625 + - 0.609375 + - 0.6171875 + - 0.625 + - 0.6328125 + - 0.640625 + - 0.6484375 + - 0.65625 + - 0.6640625 + - 0.671875 + - 0.6796875 + - 0.6875 + - 0.6953125 + - 0.703125 + - 0.7109375 + - 0.71875 + - 0.7265625 + - 0.734375 + - 0.7421875 + - 0.75 + - 0.7578125 + - 0.765625 + - 0.7734375 + - 0.78125 + - 0.7890625 + - 0.796875 + - 0.8046875 + - 0.8125 + - 0.8203125 + - 0.828125 + - 0.8359375 + - 0.84375 + - 0.8515625 + - 0.859375 + - 0.8671875 + - 0.875 + - 0.8828125 + - 0.890625 + - 0.8984375 + - 0.90625 + - 0.9140625 + - 0.921875 + - 0.9296875 + - 0.9375 + - 0.9453125 + - 0.953125 + - 0.9609375 + - 0.96875 + - 0.9765625 + - 0.984375 + - 0.9921875 + hueVsHueCurve: + overrideState: 0 + value: + curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + m_Loop: 1 + m_ZeroValue: 0.5 + m_Range: 1 + cachedData: + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + hueVsSatCurve: + overrideState: 0 + value: + curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + m_Loop: 1 + m_ZeroValue: 0.5 + m_Range: 1 + cachedData: + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + satVsSatCurve: + overrideState: 0 + value: + curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + m_Loop: 0 + m_ZeroValue: 0.5 + m_Range: 1 + cachedData: + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + lumVsSatCurve: + overrideState: 0 + value: + curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + m_Loop: 0 + m_ZeroValue: 0.5 + m_Range: 1 + cachedData: + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 + - 0.5 diff --git a/Packages/com.waveharmonic.crest/Shared/Settings/PostProcessingV2.asset.meta b/Packages/com.waveharmonic.crest/Shared/Settings/PostProcessingV2.asset.meta new file mode 100644 index 000000000..41b6e121b --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Settings/PostProcessingV2.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f9dbc838d620d43c5a1c16e44ac0981a +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Settings/UnderwaterLighting.asset b/Packages/com.waveharmonic.crest/Shared/Settings/UnderwaterLighting.asset new file mode 100644 index 000000000..7ef8f56e2 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Settings/UnderwaterLighting.asset @@ -0,0 +1,166 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-2074244729520876864 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f034cba68ab55e046ae1445a42f18c0e, type: 3} + m_Name: IndirectLightingController + m_EditorClassIdentifier: + active: 1 + indirectDiffuseLightingMultiplier: + m_OverrideState: 1 + m_Value: 0 + indirectDiffuseLightingLayers: + m_OverrideState: 0 + m_Value: 255 + reflectionLightingMultiplier: + m_OverrideState: 0 + m_Value: 1 + reflectionLightingLayers: + m_OverrideState: 0 + m_Value: 255 + reflectionProbeIntensityMultiplier: + m_OverrideState: 1 + m_Value: 0 +--- !u!114 &-2037576497745832785 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 59b6606ef2548734bb6d11b9d160bc7e, type: 3} + m_Name: HDRISky + m_EditorClassIdentifier: + active: 1 + rotation: + m_OverrideState: 0 + m_Value: 0 + skyIntensityMode: + m_OverrideState: 0 + m_Value: 0 + exposure: + m_OverrideState: 1 + m_Value: 0 + multiplier: + m_OverrideState: 0 + m_Value: 1 + upperHemisphereLuxValue: + m_OverrideState: 0 + m_Value: 1 + upperHemisphereLuxColor: + m_OverrideState: 0 + m_Value: {x: 0, y: 0, z: 0} + desiredLuxValue: + m_OverrideState: 0 + m_Value: 20000 + updateMode: + m_OverrideState: 0 + m_Value: 0 + updatePeriod: + m_OverrideState: 0 + m_Value: 0 + includeSunInBaking: + m_OverrideState: 0 + m_Value: 0 + hdriSky: + m_OverrideState: 0 + m_Value: {fileID: 0} + distortionMode: + m_OverrideState: 0 + m_Value: 0 + flowmap: + m_OverrideState: 0 + m_Value: {fileID: 0} + upperHemisphereOnly: + m_OverrideState: 0 + m_Value: 1 + scrollOrientation: + m_OverrideState: 0 + m_Value: + mode: 1 + customValue: 0 + additiveValue: 0 + multiplyValue: 1 + scrollSpeed: + m_OverrideState: 0 + m_Value: + mode: 1 + customValue: 100 + additiveValue: 0 + multiplyValue: 1 + enableBackplate: + m_OverrideState: 0 + m_Value: 0 + backplateType: + m_OverrideState: 0 + m_Value: 0 + groundLevel: + m_OverrideState: 0 + m_Value: 0 + scale: + m_OverrideState: 0 + m_Value: {x: 32, y: 32} + projectionDistance: + m_OverrideState: 0 + m_Value: 16 + plateRotation: + m_OverrideState: 0 + m_Value: 0 + plateTexRotation: + m_OverrideState: 0 + m_Value: 0 + plateTexOffset: + m_OverrideState: 0 + m_Value: {x: 0, y: 0} + blendAmount: + m_OverrideState: 0 + m_Value: 0 + shadowTint: + m_OverrideState: 0 + m_Value: {r: 0.5, g: 0.5, b: 0.5, a: 1} + pointLightShadow: + m_OverrideState: 0 + m_Value: 0 + dirLightShadow: + m_OverrideState: 0 + m_Value: 0 + rectLightShadow: + m_OverrideState: 0 + m_Value: 0 + m_SkyVersion: 1 + enableDistortion: + m_OverrideState: 0 + m_Value: 0 + procedural: + m_OverrideState: 0 + m_Value: 1 + scrollDirection: + m_OverrideState: 0 + m_Value: 0 + m_ObsoleteScrollSpeed: + m_OverrideState: 0 + m_Value: 2 +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d7fd9488000d3734a9e00ee676215985, type: 3} + m_Name: UnderwaterLighting + m_EditorClassIdentifier: + components: + - {fileID: -2074244729520876864} + - {fileID: -2037576497745832785} diff --git a/Assets/Obi/Samples/Common/SampleResources/Animations/FanHorizontal.anim.meta b/Packages/com.waveharmonic.crest/Shared/Settings/UnderwaterLighting.asset.meta similarity index 64% rename from Assets/Obi/Samples/Common/SampleResources/Animations/FanHorizontal.anim.meta rename to Packages/com.waveharmonic.crest/Shared/Settings/UnderwaterLighting.asset.meta index af40a9d24..b8563b578 100644 --- a/Assets/Obi/Samples/Common/SampleResources/Animations/FanHorizontal.anim.meta +++ b/Packages/com.waveharmonic.crest/Shared/Settings/UnderwaterLighting.asset.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: 8e33f749f1d024f159aa5cae7a502d72 +guid: 900f04ab6f87d474eaf8c86396dec455 NativeFormatImporter: externalObjects: {} - mainObjectFileID: 7400000 + mainObjectFileID: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Shaders.meta b/Packages/com.waveharmonic.crest/Shared/Shaders.meta new file mode 100644 index 000000000..9c49455d1 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Shaders.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 701d1737e6143426c9c1555af9b8ffb2 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Shaders/Lit.shadergraph b/Packages/com.waveharmonic.crest/Shared/Shaders/Lit.shadergraph new file mode 100644 index 000000000..36400493f --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Shaders/Lit.shadergraph @@ -0,0 +1,9534 @@ +{ + "m_SGVersion": 3, + "m_Type": "UnityEditor.ShaderGraph.GraphData", + "m_ObjectId": "37bfac943f684b8aabe8321d76e9336d", + "m_Properties": [ + { + "m_Id": "f9d39431664f4db282bf85cda7330e04" + }, + { + "m_Id": "073fbba2726346708a435d231acd7994" + }, + { + "m_Id": "b20ecbb6b51842189aa09a748f852aac" + }, + { + "m_Id": "226dd52085fd4c5f96cbd5b5ce8c1932" + }, + { + "m_Id": "e1260fde245f4582a46223b43a512871" + }, + { + "m_Id": "fd2e5f1ae08c4f45b0c795fb9673845c" + }, + { + "m_Id": "a9ae7d9f9bb342668379f294b997a024" + }, + { + "m_Id": "6653a111fd9e437d8669bdd9670b0bcd" + }, + { + "m_Id": "a6514c562dcf45fb942466fd9b4581a0" + }, + { + "m_Id": "5fbe70a88c3441e88ae8d195aba3b134" + }, + { + "m_Id": "a45878eacd044a68aae28771783def4f" + }, + { + "m_Id": "d9463d7b8c064ec89cf8a937bd5a27c5" + }, + { + "m_Id": "d29cc0a358fe4e11adf98951bf90803e" + }, + { + "m_Id": "89b8f3104f6f45b7a09de6483d127676" + }, + { + "m_Id": "9dcbe1b467374735bd6902ef8a4b5fea" + }, + { + "m_Id": "d26edc375b4c4243938ad5141a4772f2" + }, + { + "m_Id": "f03ed8b9043f469381375a4ce7291134" + }, + { + "m_Id": "512fb8b4826e48fab65b83b8744dcc78" + }, + { + "m_Id": "9783263798cc4b25a7a122df318a57f8" + }, + { + "m_Id": "988d3fda4b75435b9f2630355731fbc7" + } + ], + "m_Keywords": [ + { + "m_Id": "65d8361074904a08ba28f1116b517849" + } + ], + "m_Dropdowns": [], + "m_CategoryData": [ + { + "m_Id": "e8dc3ed688a74734819643d0041f5e84" + }, + { + "m_Id": "2a1de778e8714e0d8a9787d48f97fe83" + }, + { + "m_Id": "6b44a145175a4c7f9c7dd719960259ce" + }, + { + "m_Id": "2af241d837ff4983940c6e30937b72d2" + }, + { + "m_Id": "1acddea35a31457fbd706aeedbfa4397" + }, + { + "m_Id": "1b1b8217eb194876b9ccd3127f15a0fd" + }, + { + "m_Id": "ccbb3780be7a4f95a0e4097ce1deb474" + }, + { + "m_Id": "74a97f54e8d44a3b9a020081d1e1768d" + }, + { + "m_Id": "0164e72437a64b44bc7ad519bd8c99c1" + } + ], + "m_Nodes": [ + { + "m_Id": "c76502e563064684b6843ddfd14da25a" + }, + { + "m_Id": "8f60dac23b7b4dc19e74482e8ab0d940" + }, + { + "m_Id": "f31b7daaa9204711a7fed011b26dbc8a" + }, + { + "m_Id": "bc13f29ae89348fd880b7361cff27f24" + }, + { + "m_Id": "d0d2e0ffa03f4e34b9eaf8227f527aea" + }, + { + "m_Id": "eb207ee80e7a43fb9485b15792cc0b42" + }, + { + "m_Id": "99aea177043447d3adf16a8476eb38aa" + }, + { + "m_Id": "fca2a686d3fd4b588cde3b54823bb062" + }, + { + "m_Id": "d4a644e38a094910857c3832321b616e" + }, + { + "m_Id": "1e5bfaa51ee04aa08e0a5fcbb07dc1d2" + }, + { + "m_Id": "8d46109eb9204186933dd03b62aa5318" + }, + { + "m_Id": "95f3657663484b8e990cd7400d169b39" + }, + { + "m_Id": "06b5b1cd124a48188ddff4bf4e9a6a8c" + }, + { + "m_Id": "028c98d7289e4310893c5258d08b62d2" + }, + { + "m_Id": "e3238989e2c24727be4ff3a509e22b32" + }, + { + "m_Id": "5aebdfb77ba14f6b9eff2c32e7f13938" + }, + { + "m_Id": "135c5e5185144e63bd354959291045f1" + }, + { + "m_Id": "2855e36325bd4d128bb40b4a941d5646" + }, + { + "m_Id": "2a1bd03ce9264ee8bc0450364d67cba6" + }, + { + "m_Id": "b2b8b9f6255d4b348f0a6e893e918aa2" + }, + { + "m_Id": "2df48290175b491e81b863b3c0855b09" + }, + { + "m_Id": "c14a8937cbd94b5abf1ab7c367caddcb" + }, + { + "m_Id": "4a6047b5bead4985b4f7322eecad7419" + }, + { + "m_Id": "9375c82739f44b6bbdb78d0a74151a34" + }, + { + "m_Id": "c470a679d8084e2d98f9f97fb350661b" + }, + { + "m_Id": "7ba8fdf5005249f6bba8c396995899ae" + }, + { + "m_Id": "c0db1c57607b4218b9fe4a494acc32bd" + }, + { + "m_Id": "d5e45089bcab4d2d822fb10275983e32" + }, + { + "m_Id": "9c9ba87b32ad441dba6e9b9f11388d9b" + }, + { + "m_Id": "c493086a18fd4d91af06067576d3b393" + }, + { + "m_Id": "5b364a3b3f674212ba3399f19a28ee98" + }, + { + "m_Id": "b774027047014045a64b4163e87330c9" + }, + { + "m_Id": "520ecbe721e34ff8b1a210ba99e4c012" + }, + { + "m_Id": "c0309b0ff34244ea97160fe5fc583e46" + }, + { + "m_Id": "05b98fd02a7f47d3826c3e2b99f5aec4" + }, + { + "m_Id": "221d8b24b13946f5a02c7668f63ea433" + }, + { + "m_Id": "4a5d841c6a6d4b6881c9e62fc22ab114" + }, + { + "m_Id": "fa01c85ba84f46ad8526a72cf40096aa" + }, + { + "m_Id": "f5d0d252a08b45c68d2737a801473424" + }, + { + "m_Id": "a4dd0c6239aa478ba424219e8584a2ec" + }, + { + "m_Id": "63df3fd85f3b42ef91149243e4228a47" + }, + { + "m_Id": "7958ddaf74f84d10b4c52d980f7a2caf" + }, + { + "m_Id": "e556d99ab36040ee8da300db433d398a" + }, + { + "m_Id": "cd0e1f20815e4e1684051141b3f87a4c" + }, + { + "m_Id": "9ddc490d58d443a699694376870e4007" + }, + { + "m_Id": "0eb29ed7a83441a089f8ce611fc807eb" + }, + { + "m_Id": "4b94de380ed84deb9b55e5ce8d3aa365" + }, + { + "m_Id": "c8586dfffdde4291b53fea53da86f2fb" + }, + { + "m_Id": "5fc3fb4427364d89ba464df7069757af" + }, + { + "m_Id": "59dadd2dd4fa403db2d437e0ca9a0d93" + }, + { + "m_Id": "0ff01f6d26a846d290181ba4d0e326f3" + }, + { + "m_Id": "43fc89e0f03a4fdd9b3bad3de5fa67c0" + }, + { + "m_Id": "a331dade344845c389375e2828f69a68" + }, + { + "m_Id": "077be58326b74a9794cb912d914b699b" + }, + { + "m_Id": "48ee8e67ce3e4e548f03ee2ccdc0ccb5" + }, + { + "m_Id": "624c99e5cf554cc09377549b72c10ed7" + }, + { + "m_Id": "ca2a1fd237384498b16fa84ee5965ae0" + }, + { + "m_Id": "d717b908373c4a72854e9002cf1e059c" + }, + { + "m_Id": "2cded22ab3774ad290d22b02d024533c" + }, + { + "m_Id": "1d13ebcfecc64e93b7ae542b9d5bd4bb" + }, + { + "m_Id": "81e8f861d3854a619d550942dd0b2ae2" + }, + { + "m_Id": "67f62854fb9746aea59b8e9362b02e59" + }, + { + "m_Id": "713229f0e40a4ffea70185df0f86d91a" + }, + { + "m_Id": "c4963951ce554480911fd26643c8049d" + }, + { + "m_Id": "b4f0174124dc498db636372a66063897" + }, + { + "m_Id": "6f4036ddae1d4369b66ae1ecf209815d" + }, + { + "m_Id": "ab6a9bc49dfd4a0190d46c6ab2cc20fe" + }, + { + "m_Id": "10ad0652e2254860b4b38187fd4a10ca" + }, + { + "m_Id": "9417f7fcc072407fa41ae71034a5f4c3" + }, + { + "m_Id": "406fe111bf714ef3b757aa5772e5d7e7" + }, + { + "m_Id": "36890c4ddfba47ed8fa68bc64fa88f89" + }, + { + "m_Id": "3dc06e3c9ccb4bc8b1479d4d78855705" + } + ], + "m_GroupDatas": [ + { + "m_Id": "75ae407f7549455383d1c32d8989f303" + }, + { + "m_Id": "cebae50b11e94e838b6e7a5a61d4f2e8" + }, + { + "m_Id": "8dbd81486d314bc690d94dc6281fe289" + }, + { + "m_Id": "40a7b9274eb447a48d0f1e31def6ba52" + }, + { + "m_Id": "8c0e1cebdf4b4a90ae93ed60f9876e72" + }, + { + "m_Id": "f0446934f1f84b8480c20f72122e30f3" + }, + { + "m_Id": "5a905965f0d64818bbfb2d4f869e738b" + }, + { + "m_Id": "7844c309071b4f42b7329805070ce54e" + }, + { + "m_Id": "cd446e3cb81b417a8bd2dc2ccafcd42e" + }, + { + "m_Id": "adb53098703d462f9d82c495cfcb09e9" + }, + { + "m_Id": "b8b5e48f3c87435c8fe78bddf85831ee" + } + ], + "m_StickyNoteDatas": [ + { + "m_Id": "137c4a5054b249e98aa4a62c625d4053" + }, + { + "m_Id": "34d2897ff99d4577b2f11cf3213bf669" + } + ], + "m_Edges": [ + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "028c98d7289e4310893c5258d08b62d2" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "43fc89e0f03a4fdd9b3bad3de5fa67c0" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "028c98d7289e4310893c5258d08b62d2" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "b2b8b9f6255d4b348f0a6e893e918aa2" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "05b98fd02a7f47d3826c3e2b99f5aec4" + }, + "m_SlotId": 3 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "d4a644e38a094910857c3832321b616e" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "06b5b1cd124a48188ddff4bf4e9a6a8c" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "028c98d7289e4310893c5258d08b62d2" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "06b5b1cd124a48188ddff4bf4e9a6a8c" + }, + "m_SlotId": 7 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "7ba8fdf5005249f6bba8c396995899ae" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "077be58326b74a9794cb912d914b699b" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "48ee8e67ce3e4e548f03ee2ccdc0ccb5" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "0eb29ed7a83441a089f8ce611fc807eb" + }, + "m_SlotId": 1 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "9ddc490d58d443a699694376870e4007" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "0ff01f6d26a846d290181ba4d0e326f3" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "59dadd2dd4fa403db2d437e0ca9a0d93" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "10ad0652e2254860b4b38187fd4a10ca" + }, + "m_SlotId": 3 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "d0d2e0ffa03f4e34b9eaf8227f527aea" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "135c5e5185144e63bd354959291045f1" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "c470a679d8084e2d98f9f97fb350661b" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "1d13ebcfecc64e93b7ae542b9d5bd4bb" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "67f62854fb9746aea59b8e9362b02e59" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "221d8b24b13946f5a02c7668f63ea433" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "1e5bfaa51ee04aa08e0a5fcbb07dc1d2" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "2855e36325bd4d128bb40b4a941d5646" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "4a5d841c6a6d4b6881c9e62fc22ab114" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "2a1bd03ce9264ee8bc0450364d67cba6" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "a4dd0c6239aa478ba424219e8584a2ec" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "2cded22ab3774ad290d22b02d024533c" + }, + "m_SlotId": 1 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "1d13ebcfecc64e93b7ae542b9d5bd4bb" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "2df48290175b491e81b863b3c0855b09" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "95f3657663484b8e990cd7400d169b39" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "36890c4ddfba47ed8fa68bc64fa88f89" + }, + "m_SlotId": 1 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "406fe111bf714ef3b757aa5772e5d7e7" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "3dc06e3c9ccb4bc8b1479d4d78855705" + }, + "m_SlotId": 1 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "10ad0652e2254860b4b38187fd4a10ca" + }, + "m_SlotId": 2 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "3dc06e3c9ccb4bc8b1479d4d78855705" + }, + "m_SlotId": 1 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "6f4036ddae1d4369b66ae1ecf209815d" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "406fe111bf714ef3b757aa5772e5d7e7" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "10ad0652e2254860b4b38187fd4a10ca" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "43fc89e0f03a4fdd9b3bad3de5fa67c0" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "bc13f29ae89348fd880b7361cff27f24" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "48ee8e67ce3e4e548f03ee2ccdc0ccb5" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "43fc89e0f03a4fdd9b3bad3de5fa67c0" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "4a5d841c6a6d4b6881c9e62fc22ab114" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "eb207ee80e7a43fb9485b15792cc0b42" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "4a6047b5bead4985b4f7322eecad7419" + }, + "m_SlotId": 4 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "4a5d841c6a6d4b6881c9e62fc22ab114" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "4a6047b5bead4985b4f7322eecad7419" + }, + "m_SlotId": 7 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "7ba8fdf5005249f6bba8c396995899ae" + }, + "m_SlotId": 2 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "4b94de380ed84deb9b55e5ce8d3aa365" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "c8586dfffdde4291b53fea53da86f2fb" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "520ecbe721e34ff8b1a210ba99e4c012" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "b774027047014045a64b4163e87330c9" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "59dadd2dd4fa403db2d437e0ca9a0d93" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "5fc3fb4427364d89ba464df7069757af" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "5aebdfb77ba14f6b9eff2c32e7f13938" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "028c98d7289e4310893c5258d08b62d2" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "5b364a3b3f674212ba3399f19a28ee98" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "c493086a18fd4d91af06067576d3b393" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "5fc3fb4427364d89ba464df7069757af" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "077be58326b74a9794cb912d914b699b" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "624c99e5cf554cc09377549b72c10ed7" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "5fc3fb4427364d89ba464df7069757af" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "63df3fd85f3b42ef91149243e4228a47" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "0eb29ed7a83441a089f8ce611fc807eb" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "67f62854fb9746aea59b8e9362b02e59" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "c4963951ce554480911fd26643c8049d" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "6f4036ddae1d4369b66ae1ecf209815d" + }, + "m_SlotId": 1 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "10ad0652e2254860b4b38187fd4a10ca" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "713229f0e40a4ffea70185df0f86d91a" + }, + "m_SlotId": 1 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "67f62854fb9746aea59b8e9362b02e59" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "713229f0e40a4ffea70185df0f86d91a" + }, + "m_SlotId": 1 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "b4f0174124dc498db636372a66063897" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "7958ddaf74f84d10b4c52d980f7a2caf" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "63df3fd85f3b42ef91149243e4228a47" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "7ba8fdf5005249f6bba8c396995899ae" + }, + "m_SlotId": 3 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "c470a679d8084e2d98f9f97fb350661b" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "81e8f861d3854a619d550942dd0b2ae2" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "1d13ebcfecc64e93b7ae542b9d5bd4bb" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "9375c82739f44b6bbdb78d0a74151a34" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "4a6047b5bead4985b4f7322eecad7419" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "9417f7fcc072407fa41ae71034a5f4c3" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "406fe111bf714ef3b757aa5772e5d7e7" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "9c9ba87b32ad441dba6e9b9f11388d9b" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "d5e45089bcab4d2d822fb10275983e32" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "9ddc490d58d443a699694376870e4007" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "59dadd2dd4fa403db2d437e0ca9a0d93" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "a331dade344845c389375e2828f69a68" + }, + "m_SlotId": 1 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "48ee8e67ce3e4e548f03ee2ccdc0ccb5" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "a4dd0c6239aa478ba424219e8584a2ec" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "fca2a686d3fd4b588cde3b54823bb062" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "ab6a9bc49dfd4a0190d46c6ab2cc20fe" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "36890c4ddfba47ed8fa68bc64fa88f89" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "b2b8b9f6255d4b348f0a6e893e918aa2" + }, + "m_SlotId": 4 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "8d46109eb9204186933dd03b62aa5318" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "b4f0174124dc498db636372a66063897" + }, + "m_SlotId": 1 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "c4963951ce554480911fd26643c8049d" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "b774027047014045a64b4163e87330c9" + }, + "m_SlotId": 4 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "05b98fd02a7f47d3826c3e2b99f5aec4" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "c0309b0ff34244ea97160fe5fc583e46" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "05b98fd02a7f47d3826c3e2b99f5aec4" + }, + "m_SlotId": 2 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "c0db1c57607b4218b9fe4a494acc32bd" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "7ba8fdf5005249f6bba8c396995899ae" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "c470a679d8084e2d98f9f97fb350661b" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "99aea177043447d3adf16a8476eb38aa" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "c493086a18fd4d91af06067576d3b393" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "713229f0e40a4ffea70185df0f86d91a" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "c4963951ce554480911fd26643c8049d" + }, + "m_SlotId": 3 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "3dc06e3c9ccb4bc8b1479d4d78855705" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "c8586dfffdde4291b53fea53da86f2fb" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "9ddc490d58d443a699694376870e4007" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "ca2a1fd237384498b16fa84ee5965ae0" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "2cded22ab3774ad290d22b02d024533c" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "cd0e1f20815e4e1684051141b3f87a4c" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "e556d99ab36040ee8da300db433d398a" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "d5e45089bcab4d2d822fb10275983e32" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "c493086a18fd4d91af06067576d3b393" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "d717b908373c4a72854e9002cf1e059c" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "ca2a1fd237384498b16fa84ee5965ae0" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "e3238989e2c24727be4ff3a509e22b32" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "06b5b1cd124a48188ddff4bf4e9a6a8c" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "e556d99ab36040ee8da300db433d398a" + }, + "m_SlotId": 7 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "077be58326b74a9794cb912d914b699b" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "e556d99ab36040ee8da300db433d398a" + }, + "m_SlotId": 7 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "a331dade344845c389375e2828f69a68" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "e556d99ab36040ee8da300db433d398a" + }, + "m_SlotId": 7 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "c4963951ce554480911fd26643c8049d" + }, + "m_SlotId": 2 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "f5d0d252a08b45c68d2737a801473424" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "fa01c85ba84f46ad8526a72cf40096aa" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "fa01c85ba84f46ad8526a72cf40096aa" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "a4dd0c6239aa478ba424219e8584a2ec" + }, + "m_SlotId": 0 + } + } + ], + "m_VertexContext": { + "m_Position": { + "x": 0.0, + "y": 0.0 + }, + "m_Blocks": [ + { + "m_Id": "c76502e563064684b6843ddfd14da25a" + }, + { + "m_Id": "8f60dac23b7b4dc19e74482e8ab0d940" + }, + { + "m_Id": "f31b7daaa9204711a7fed011b26dbc8a" + } + ] + }, + "m_FragmentContext": { + "m_Position": { + "x": 0.0, + "y": 200.0 + }, + "m_Blocks": [ + { + "m_Id": "bc13f29ae89348fd880b7361cff27f24" + }, + { + "m_Id": "8d46109eb9204186933dd03b62aa5318" + }, + { + "m_Id": "d0d2e0ffa03f4e34b9eaf8227f527aea" + }, + { + "m_Id": "eb207ee80e7a43fb9485b15792cc0b42" + }, + { + "m_Id": "99aea177043447d3adf16a8476eb38aa" + }, + { + "m_Id": "fca2a686d3fd4b588cde3b54823bb062" + }, + { + "m_Id": "d4a644e38a094910857c3832321b616e" + }, + { + "m_Id": "1e5bfaa51ee04aa08e0a5fcbb07dc1d2" + }, + { + "m_Id": "95f3657663484b8e990cd7400d169b39" + }, + { + "m_Id": "c14a8937cbd94b5abf1ab7c367caddcb" + } + ] + }, + "m_PreviewData": { + "serializedMesh": { + "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", + "m_Guid": "" + }, + "preventRotation": false + }, + "m_Path": "Hidden/Crest/Samples/Scenes", + "m_GraphPrecision": 1, + "m_PreviewMode": 2, + "m_OutputNode": { + "m_Id": "" + }, + "m_SubDatas": [], + "m_ActiveTargets": [ + { + "m_Id": "840c4b73cabf4489982965630032a419" + }, + { + "m_Id": "88f2fa4395e14c27b2c4cd4c39f4a557" + }, + { + "m_Id": "e2ddf66d492a4aa19a63c60af0009914" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CategoryData", + "m_ObjectId": "0164e72437a64b44bc7ad519bd8c99c1", + "m_Name": "Advanced", + "m_ChildObjectList": [ + { + "m_Id": "65d8361074904a08ba28f1116b517849" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "017ecd6b90fc4939b6cf764a39f8ccfd", + "m_Id": 0, + "m_DisplayName": "Emission", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "02617dfed10a46669baf63b3ac51be54", + "m_Id": 0, + "m_DisplayName": "In", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "In", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.MultiplyNode", + "m_ObjectId": "028c98d7289e4310893c5258d08b62d2", + "m_Group": { + "m_Id": "75ae407f7549455383d1c32d8989f303" + }, + "m_Name": "Multiply", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1883.0003662109375, + "y": -267.99993896484377, + "width": 130.0, + "height": 117.99990844726563 + } + }, + "m_Slots": [ + { + "m_Id": "6fb2c59bbe084f8586f527e73fef9585" + }, + { + "m_Id": "2661a5abd4004602a688696757e15740" + }, + { + "m_Id": "6be3d0264cbc448db4b71e04e054dfcb" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DMaterialSlot", + "m_ObjectId": "030b46cbb68048eeba105ae309540d9f", + "m_Id": 0, + "m_DisplayName": "Metallic Map", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "04c95fb063ef48ea9e818b21c24d9ab5", + "m_Id": 1, + "m_DisplayName": "B", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 3, + "m_Value": { + "x": 1.0, + "y": 1.0, + "z": 1.0, + "w": 1.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.UVMaterialSlot", + "m_ObjectId": "05b1adbcae5d43cbb632e7116698acf6", + "m_Id": 2, + "m_DisplayName": "UV", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "UV", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [], + "m_Channel": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.LerpNode", + "m_ObjectId": "05b98fd02a7f47d3826c3e2b99f5aec4", + "m_Group": { + "m_Id": "8c0e1cebdf4b4a90ae93ed60f9876e72" + }, + "m_Name": "Lerp", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -408.0000305175781, + "y": 1387.0001220703125, + "width": 126.0, + "height": 141.9998779296875 + } + }, + "m_Slots": [ + { + "m_Id": "4fb2c48006f446c68ff80767c6e74072" + }, + { + "m_Id": "04c95fb063ef48ea9e818b21c24d9ab5" + }, + { + "m_Id": "ed53035c29c048458068300e1fd0cd27" + }, + { + "m_Id": "bd5fb7d289e643638297678200aa9587" + } + ], + "synonyms": [ + "mix", + "blend", + "linear interpolate" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SampleTexture2DNode", + "m_ObjectId": "06b5b1cd124a48188ddff4bf4e9a6a8c", + "m_Group": { + "m_Id": "75ae407f7549455383d1c32d8989f303" + }, + "m_Name": "Sample Texture 2D", + "m_DrawState": { + "m_Expanded": false, + "m_Position": { + "serializedVersion": "2", + "x": -2085.000244140625, + "y": -267.99993896484377, + "width": 180.0001220703125, + "height": 178.99993896484376 + } + }, + "m_Slots": [ + { + "m_Id": "ed64aea815874cefa9b56f70b2aa8f21" + }, + { + "m_Id": "10b69e37e43d433da17048418160eeef" + }, + { + "m_Id": "f21103cd07f74ccea687ed97d7b20650" + }, + { + "m_Id": "67a38caa544c45b889e45d23aaab060f" + }, + { + "m_Id": "6bc6b9e0a2624ed396e3442317be8715" + }, + { + "m_Id": "67a402877e3a477c82a85c2a2a073d1a" + }, + { + "m_Id": "e87e64d077ad46dc9db7a2ae96d5f6c9" + }, + { + "m_Id": "d0cec5fd4f9545178c523d7bf5de5a5c" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_TextureType": 0, + "m_NormalMapSpace": 0, + "m_EnableGlobalMipBias": true, + "m_MipSamplingMode": 0 +} + +{ + "m_SGVersion": 3, + "m_Type": "UnityEditor.ShaderGraph.Internal.ColorShaderProperty", + "m_ObjectId": "073fbba2726346708a435d231acd7994", + "m_Guid": { + "m_GuidSerialized": "1196b676-8872-4b32-bac8-78de5154945c" + }, + "m_Name": "Color", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Color", + "m_DefaultReferenceName": "_Color", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "r": 1.0, + "g": 1.0, + "b": 1.0, + "a": 1.0 + }, + "isMainColor": false, + "m_ColorMode": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.MultiplyNode", + "m_ObjectId": "077be58326b74a9794cb912d914b699b", + "m_Group": { + "m_Id": "7844c309071b4f42b7329805070ce54e" + }, + "m_Name": "Multiply", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1397.0003662109375, + "y": -754.0, + "width": 130.0001220703125, + "height": 117.99993896484375 + } + }, + "m_Slots": [ + { + "m_Id": "7b7da8cb8bb7489c97677230e8c1461c" + }, + { + "m_Id": "202915ebf35c4046ba7e0ab14237fd1c" + }, + { + "m_Id": "cede2400ec2c454d8b3f440251012d0a" + } + ], + "synonyms": [ + "multiplication", + "times", + "x" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "09330e46b8a7473c93eca4e14fb9ac28", + "m_Id": 2, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "09999c95de154f74ba5d0dbdf45712ff", + "m_Id": 0, + "m_DisplayName": "Detail Albedo Map Scale", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "0e139607c05b4bb8935e59a8ddfc2a34", + "m_Id": 1, + "m_DisplayName": "B", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 3, + "m_Value": { + "x": 1.0, + "y": 1.0, + "z": 1.0, + "w": 1.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.SwizzleNode", + "m_ObjectId": "0eb29ed7a83441a089f8ce611fc807eb", + "m_Group": { + "m_Id": "7844c309071b4f42b7329805070ce54e" + }, + "m_Name": "Swizzle", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -2062.000244140625, + "y": -754.0, + "width": 132.0, + "height": 121.99993896484375 + } + }, + "m_Slots": [ + { + "m_Id": "c9d5678677584ccb8b641247cc2366ab" + }, + { + "m_Id": "5c98ba512ccb4391a3899ff1c57b71be" + } + ], + "synonyms": [ + "swap", + "reorder", + "component mask" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "_maskInput": "xyz", + "convertedMask": "xyz" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "0f1f525eddfa43a5a87310c4243524be", + "m_Id": 7, + "m_DisplayName": "A", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "0ff01f6d26a846d290181ba4d0e326f3", + "m_Group": { + "m_Id": "7844c309071b4f42b7329805070ce54e" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1930.000244140625, + "y": -636.0000610351563, + "width": 202.0, + "height": 34.0 + } + }, + "m_Slots": [ + { + "m_Id": "09999c95de154f74ba5d0dbdf45712ff" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "f03ed8b9043f469381375a4ce7291134" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BranchNode", + "m_ObjectId": "10ad0652e2254860b4b38187fd4a10ca", + "m_Group": { + "m_Id": "b8b5e48f3c87435c8fe78bddf85831ee" + }, + "m_Name": "Branch", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1103.9998779296875, + "y": -52.99998474121094, + "width": 172.00006103515626, + "height": 142.0000762939453 + } + }, + "m_Slots": [ + { + "m_Id": "361e5d3ec4f44c40941c32ef7c5f3801" + }, + { + "m_Id": "90287b4a7df746ada6dfe95f76af25de" + }, + { + "m_Id": "5f635683c91e4d76ad13402d7c1a1d30" + }, + { + "m_Id": "b0524f4fe77047f0816faf49fc8f18bb" + } + ], + "synonyms": [ + "switch", + "if", + "else" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "10b69e37e43d433da17048418160eeef", + "m_Id": 4, + "m_DisplayName": "R", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "R", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "115cd36f048046628951d753480b5287", + "m_Id": 0, + "m_DisplayName": "In", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "In", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "12099210038e4184bdf161275f73e17e", + "m_Id": 0, + "m_DisplayName": "A", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 3, + "m_Value": { + "e00": 0.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 0.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 0.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 0.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "135c5e5185144e63bd354959291045f1", + "m_Group": { + "m_Id": "8dbd81486d314bc690d94dc6281fe289" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -864.0, + "y": 792.0000610351563, + "width": 139.99993896484376, + "height": 34.0 + } + }, + "m_Slots": [ + { + "m_Id": "7cff47f9096a42979f5ad71205d49755" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "226dd52085fd4c5f96cbd5b5ce8c1932" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.StickyNoteData", + "m_ObjectId": "137c4a5054b249e98aa4a62c625d4053", + "m_Title": "Important", + "m_Content": "Metallic should be one if Metallic Map is set.", + "m_TextSize": 0, + "m_Theme": 0, + "m_Position": { + "serializedVersion": "2", + "x": -1628.0, + "y": 618.0, + "width": 200.0, + "height": 100.0 + }, + "m_Group": { + "m_Id": "cebae50b11e94e838b6e7a5a61d4f2e8" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "137d12cbd4304d52b1cf0d95ca5c5410", + "m_Id": 6, + "m_DisplayName": "B", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "15149423a05142f6ae480acabae805fa", + "m_Id": 4, + "m_DisplayName": "A", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "16bec3f0eed24305afcdbdf9549fbd2c", + "m_Id": 0, + "m_DisplayName": "A", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 3, + "m_Value": { + "e00": 0.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 0.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 0.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 0.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "178daa7b355442e19e7d9f8ae47d73ff", + "m_Id": 7, + "m_DisplayName": "A", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BooleanMaterialSlot", + "m_ObjectId": "19c29931a233417b925b12021ce1f258", + "m_Id": 2, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": false, + "m_DefaultValue": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "1a4ab993ade94a9a8667c4f54451441b", + "m_Id": 0, + "m_DisplayName": "RGBA", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "RGBA", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CategoryData", + "m_ObjectId": "1acddea35a31457fbd706aeedbfa4397", + "m_Name": "Normal", + "m_ChildObjectList": [ + { + "m_Id": "5fbe70a88c3441e88ae8d195aba3b134" + }, + { + "m_Id": "988d3fda4b75435b9f2630355731fbc7" + }, + { + "m_Id": "a6514c562dcf45fb942466fd9b4581a0" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CategoryData", + "m_ObjectId": "1b1b8217eb194876b9ccd3127f15a0fd", + "m_Name": "Emission", + "m_ChildObjectList": [ + { + "m_Id": "e1260fde245f4582a46223b43a512871" + }, + { + "m_Id": "89b8f3104f6f45b7a09de6483d127676" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.NormalStrengthNode", + "m_ObjectId": "1d13ebcfecc64e93b7ae542b9d5bd4bb", + "m_Group": { + "m_Id": "adb53098703d462f9d82c495cfcb09e9" + }, + "m_Name": "Normal Strength", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -2362.000244140625, + "y": 112.99996948242188, + "width": 166.0, + "height": 118.00006103515625 + } + }, + "m_Slots": [ + { + "m_Id": "a0d211ee5b864f99bafe73484c82b392" + }, + { + "m_Id": "3b0af83765444a7c8750e1aa7883c726" + }, + { + "m_Id": "732c9009a78c4960993614ab33c3f88a" + } + ], + "synonyms": [ + "intensity" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "1e09e77599594ad1a7b6189f70f9dd97", + "m_Id": 7, + "m_DisplayName": "A", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "1e5bfaa51ee04aa08e0a5fcbb07dc1d2", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Specular", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "ba7ce452f5af4d5d83da6be19e04ab1b" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Specular" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "202915ebf35c4046ba7e0ab14237fd1c", + "m_Id": 1, + "m_DisplayName": "B", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 3, + "m_Value": { + "e00": 2.0, + "e01": 2.0, + "e02": 2.0, + "e03": 2.0, + "e10": 2.0, + "e11": 2.0, + "e12": 2.0, + "e13": 2.0, + "e20": 2.0, + "e21": 2.0, + "e22": 2.0, + "e23": 2.0, + "e30": 2.0, + "e31": 2.0, + "e32": 2.0, + "e33": 2.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SamplerStateMaterialSlot", + "m_ObjectId": "2135c3468ed047baa13605f17d4d9f4e", + "m_Id": 3, + "m_DisplayName": "Sampler", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Sampler", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "2209a6af91524b00bee1b03dcd2a8e7c", + "m_Id": 1, + "m_DisplayName": "R", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "R", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "221d8b24b13946f5a02c7668f63ea433", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -155.00006103515626, + "y": 519.0, + "width": 123.0000228881836, + "height": 34.0 + } + }, + "m_Slots": [ + { + "m_Id": "28f64bd01e294763a8c44f50182c5c2b" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "d29cc0a358fe4e11adf98951bf90803e" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "225aa4516d5e48a0ae38c04d68387ac4", + "m_Id": 0, + "m_DisplayName": "A", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "226dd52085fd4c5f96cbd5b5ce8c1932", + "m_Guid": { + "m_GuidSerialized": "ab572b4a-5ce7-4501-be77-20fd7dc66b6f" + }, + "m_Name": "Smoothness", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Smoothness", + "m_DefaultReferenceName": "_Smoothness", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 0.5, + "m_FloatType": 1, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "22b0b0a6f9cf42c2ac76aaea991d86c5", + "m_Id": 4, + "m_DisplayName": "R", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "R", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "2661a5abd4004602a688696757e15740", + "m_Id": 1, + "m_DisplayName": "B", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 3, + "m_Value": { + "e00": 2.0, + "e01": 2.0, + "e02": 2.0, + "e03": 2.0, + "e10": 2.0, + "e11": 2.0, + "e12": 2.0, + "e13": 2.0, + "e20": 2.0, + "e21": 2.0, + "e22": 2.0, + "e23": 2.0, + "e30": 2.0, + "e31": 2.0, + "e32": 2.0, + "e33": 2.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "2855e36325bd4d128bb40b4a941d5646", + "m_Group": { + "m_Id": "cebae50b11e94e838b6e7a5a61d4f2e8" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1797.000244140625, + "y": 670.0000610351563, + "width": 116.0, + "height": 34.00006103515625 + } + }, + "m_Slots": [ + { + "m_Id": "3d88d8fc234847f3a61159b25596dcbd" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "b20ecbb6b51842189aa09a748f852aac" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "28b00750ef0c4d0eb57e6933cc57f2ec", + "m_Id": 2, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "28f64bd01e294763a8c44f50182c5c2b", + "m_Id": 0, + "m_DisplayName": "Specular", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "2a1bd03ce9264ee8bc0450364d67cba6", + "m_Group": { + "m_Id": "5a905965f0d64818bbfb2d4f869e738b" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -808.0000610351563, + "y": 1186.0001220703125, + "width": 122.99993896484375, + "height": 34.0 + } + }, + "m_Slots": [ + { + "m_Id": "017ecd6b90fc4939b6cf764a39f8ccfd" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "e1260fde245f4582a46223b43a512871" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot", + "m_ObjectId": "2a1c3313d7c347198330c12bb12e3699", + "m_Id": 0, + "m_DisplayName": "Normal (Tangent Space)", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "NormalTS", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 3 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CategoryData", + "m_ObjectId": "2a1de778e8714e0d8a9787d48f97fe83", + "m_Name": "Color", + "m_ChildObjectList": [ + { + "m_Id": "073fbba2726346708a435d231acd7994" + }, + { + "m_Id": "f9d39431664f4db282bf85cda7330e04" + }, + { + "m_Id": "fd2e5f1ae08c4f45b0c795fb9673845c" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CategoryData", + "m_ObjectId": "2af241d837ff4983940c6e30937b72d2", + "m_Name": "Smoothness", + "m_ChildObjectList": [ + { + "m_Id": "226dd52085fd4c5f96cbd5b5ce8c1932" + }, + { + "m_Id": "6653a111fd9e437d8669bdd9670b0bcd" + } + ] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.SwizzleNode", + "m_ObjectId": "2cded22ab3774ad290d22b02d024533c", + "m_Group": { + "m_Id": "adb53098703d462f9d82c495cfcb09e9" + }, + "m_Name": "Swizzle", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -2507.000244140625, + "y": 112.99996948242188, + "width": 132.0, + "height": 122.00006103515625 + } + }, + "m_Slots": [ + { + "m_Id": "eb715a1cbee24abca45f0b829d21fb57" + }, + { + "m_Id": "4337a79f17b245959a8873f7d984f824" + } + ], + "synonyms": [ + "swap", + "reorder", + "component mask" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "_maskInput": "xyz", + "convertedMask": "xyz" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BooleanMaterialSlot", + "m_ObjectId": "2de504e01c2245718e40baa6acc1b5f8", + "m_Id": 1, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": false, + "m_DefaultValue": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "2df48290175b491e81b863b3c0855b09", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -157.00001525878907, + "y": 565.0, + "width": 140.9999542236328, + "height": 33.99993896484375 + } + }, + "m_Slots": [ + { + "m_Id": "cc02227c38dd474882ab79ab5e96c1b8" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "fd2e5f1ae08c4f45b0c795fb9673845c" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.BuiltIn.ShaderGraph.BuiltInLitSubTarget", + "m_ObjectId": "300cf1de2b6f4a5a8d350ea32a6575dc", + "m_WorkflowMode": 1, + "m_NormalDropOffSpace": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "30ea8aa1acd74238908b99818ba782cc", + "m_Id": 5, + "m_DisplayName": "G", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "G", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "32eaf090c3674c5ebb4292090b0c710b", + "m_Id": 1, + "m_DisplayName": "B", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 3, + "m_Value": { + "e00": 2.0, + "e01": 2.0, + "e02": 2.0, + "e03": 2.0, + "e10": 2.0, + "e11": 2.0, + "e12": 2.0, + "e13": 2.0, + "e20": 2.0, + "e21": 2.0, + "e22": 2.0, + "e23": 2.0, + "e30": 2.0, + "e31": 2.0, + "e32": 2.0, + "e33": 2.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.StickyNoteData", + "m_ObjectId": "34d2897ff99d4577b2f11cf3213bf669", + "m_Title": "Important", + "m_Content": "Normal Strength should be one if Normal Map is not set.", + "m_TextSize": 0, + "m_Theme": 0, + "m_Position": { + "serializedVersion": "2", + "x": -2503.0, + "y": 536.0, + "width": 200.0, + "height": 100.0 + }, + "m_Group": { + "m_Id": "40a7b9274eb447a48d0f1e31def6ba52" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BooleanMaterialSlot", + "m_ObjectId": "361e5d3ec4f44c40941c32ef7c5f3801", + "m_Id": 0, + "m_DisplayName": "Predicate", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Predicate", + "m_StageCapability": 3, + "m_Value": false, + "m_DefaultValue": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.NotNode", + "m_ObjectId": "36890c4ddfba47ed8fa68bc64fa88f89", + "m_Group": { + "m_Id": "b8b5e48f3c87435c8fe78bddf85831ee" + }, + "m_Name": "Not", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1386.9998779296875, + "y": -52.99998474121094, + "width": 132.0, + "height": 77.00003814697266 + } + }, + "m_Slots": [ + { + "m_Id": "3da033f1c9de4b20ac82e863c704bb72" + }, + { + "m_Id": "2de504e01c2245718e40baa6acc1b5f8" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DMaterialSlot", + "m_ObjectId": "37f12b97fedb4b4b96703b7ffcf30030", + "m_Id": 0, + "m_DisplayName": "Occlusion Map", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "3a602edeb2024d569404597b3371b727", + "m_Id": 0, + "m_DisplayName": "Alpha", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Alpha", + "m_StageCapability": 2, + "m_Value": 1.0, + "m_DefaultValue": 1.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "3a80fdaf15c049d7b2d48df8a631ce75", + "m_Id": 7, + "m_DisplayName": "A", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DMaterialSlot", + "m_ObjectId": "3aa232cc599b4f2d880a83ab15707fed", + "m_Id": 0, + "m_DisplayName": "Detail Albedo Map", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "3b0af83765444a7c8750e1aa7883c726", + "m_Id": 1, + "m_DisplayName": "Strength", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Strength", + "m_StageCapability": 3, + "m_Value": 1.0, + "m_DefaultValue": 1.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "3b1a4698236b4d14af95e76b8054c1fe", + "m_Id": 2, + "m_DisplayName": "T", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "T", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.UVMaterialSlot", + "m_ObjectId": "3c4a010407374c46a20b6f57f475bb4f", + "m_Id": 2, + "m_DisplayName": "UV", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "UV", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [], + "m_Channel": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "3c7221ca62a346f9935cfcff7e86c508", + "m_Id": 1, + "m_DisplayName": "", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "3c81612868394518bb14dfc968f36746", + "m_Id": 1, + "m_DisplayName": "B", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 3, + "m_Value": { + "e00": 2.0, + "e01": 2.0, + "e02": 2.0, + "e03": 2.0, + "e10": 2.0, + "e11": 2.0, + "e12": 2.0, + "e13": 2.0, + "e20": 2.0, + "e21": 2.0, + "e22": 2.0, + "e23": 2.0, + "e30": 2.0, + "e31": 2.0, + "e32": 2.0, + "e33": 2.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "3d88d8fc234847f3a61159b25596dcbd", + "m_Id": 0, + "m_DisplayName": "Metallic", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BooleanMaterialSlot", + "m_ObjectId": "3da033f1c9de4b20ac82e863c704bb72", + "m_Id": 0, + "m_DisplayName": "In", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "In", + "m_StageCapability": 3, + "m_Value": false, + "m_DefaultValue": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.RedirectNodeData", + "m_ObjectId": "3dc06e3c9ccb4bc8b1479d4d78855705", + "m_Group": { + "m_Id": "b8b5e48f3c87435c8fe78bddf85831ee" + }, + "m_Name": "Redirect Node", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1453.9998779296875, + "y": 58.00003433227539, + "width": 56.0, + "height": 23.999996185302736 + } + }, + "m_Slots": [ + { + "m_Id": "f3d07d2931b6413b94adab5997472567" + }, + { + "m_Id": "3c7221ca62a346f9935cfcff7e86c508" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "3f4fb2c225ed4bf99bdf6d980fc57b07", + "m_Id": 0, + "m_DisplayName": "A", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 3, + "m_Value": { + "e00": 0.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 0.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 0.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 0.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.AndNode", + "m_ObjectId": "406fe111bf714ef3b757aa5772e5d7e7", + "m_Group": { + "m_Id": "b8b5e48f3c87435c8fe78bddf85831ee" + }, + "m_Name": "And", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1254.9998779296875, + "y": -52.99998474121094, + "width": 130.0, + "height": 101.00003051757813 + } + }, + "m_Slots": [ + { + "m_Id": "7aa785b3d31148ffa058660ef34f791f" + }, + { + "m_Id": "c37bf412fa78488b83b00b597bea9648" + }, + { + "m_Id": "19c29931a233417b925b12021ce1f258" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.GroupData", + "m_ObjectId": "40a7b9274eb447a48d0f1e31def6ba52", + "m_Title": "Normal", + "m_Position": { + "x": -2894.000244140625, + "y": 348.1286315917969 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "41aec16a03e94dd4932f5b7b7ca29ad0", + "m_Id": 7, + "m_DisplayName": "A", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SamplerStateMaterialSlot", + "m_ObjectId": "41d15aa932134f9181a3541493113dd4", + "m_Id": 3, + "m_DisplayName": "Sampler", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Sampler", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "424c46a55e2b42f0a62ef916f70379fa", + "m_Id": 1, + "m_DisplayName": "", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "4337a79f17b245959a8873f7d984f824", + "m_Id": 1, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "43cc4527815f4d1599563c230ac464b7", + "m_Id": 5, + "m_DisplayName": "G", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "G", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.MultiplyNode", + "m_ObjectId": "43fc89e0f03a4fdd9b3bad3de5fa67c0", + "m_Group": { + "m_Id": "7844c309071b4f42b7329805070ce54e" + }, + "m_Name": "Multiply", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1137.000244140625, + "y": -752.0000610351563, + "width": 130.00006103515626, + "height": 118.00006103515625 + } + }, + "m_Slots": [ + { + "m_Id": "60b4c10b2bf34a32bf7124621a59aa0d" + }, + { + "m_Id": "f889217dee1146989a34f29e5a436a20" + }, + { + "m_Id": "a4e6f6f87e714c15927b5a73283680bf" + } + ], + "synonyms": [ + "multiplication", + "times", + "x" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "465c5643e0c347719108034ea60221ec", + "m_Id": 0, + "m_DisplayName": "RGBA", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "RGBA", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DInputMaterialSlot", + "m_ObjectId": "46f3e25e0a2b43ed82ae5839c10bc783", + "m_Id": 1, + "m_DisplayName": "Texture", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Texture", + "m_StageCapability": 3, + "m_BareResource": false, + "m_Texture": { + "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}", + "m_Guid": "" + }, + "m_DefaultType": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.AddNode", + "m_ObjectId": "48ee8e67ce3e4e548f03ee2ccdc0ccb5", + "m_Group": { + "m_Id": "7844c309071b4f42b7329805070ce54e" + }, + "m_Name": "Add", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1267.000244140625, + "y": -752.0000610351563, + "width": 130.0, + "height": 118.00006103515625 + } + }, + "m_Slots": [ + { + "m_Id": "c078413bcc9c4a009c89c0d60c650582" + }, + { + "m_Id": "cfe41b26d48e41ccb8ada17b080239e2" + }, + { + "m_Id": "4abac64486b54345921d846167adedff" + } + ], + "synonyms": [ + "addition", + "sum", + "plus" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "492fc3b3185e4b428e30268d4fc0db7e", + "m_Id": 4, + "m_DisplayName": "R", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "R", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.MultiplyNode", + "m_ObjectId": "4a5d841c6a6d4b6881c9e62fc22ab114", + "m_Group": { + "m_Id": "cebae50b11e94e838b6e7a5a61d4f2e8" + }, + "m_Name": "Multiply", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1634.000244140625, + "y": 491.0, + "width": 126.0, + "height": 118.00006103515625 + } + }, + "m_Slots": [ + { + "m_Id": "3f4fb2c225ed4bf99bdf6d980fc57b07" + }, + { + "m_Id": "3c81612868394518bb14dfc968f36746" + }, + { + "m_Id": "55d7efbd09744e6191353110dcd86a9d" + } + ], + "synonyms": [ + "multiplication", + "times", + "x" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SampleTexture2DNode", + "m_ObjectId": "4a6047b5bead4985b4f7322eecad7419", + "m_Group": { + "m_Id": "cebae50b11e94e838b6e7a5a61d4f2e8" + }, + "m_Name": "Sample Texture 2D", + "m_DrawState": { + "m_Expanded": false, + "m_Position": { + "serializedVersion": "2", + "x": -1837.0001220703125, + "y": 491.0, + "width": 155.9998779296875, + "height": 179.00006103515626 + } + }, + "m_Slots": [ + { + "m_Id": "79c084fe5532421b886da16371380922" + }, + { + "m_Id": "bc38cd4f0b6b4002aeb9d47ea7359bf4" + }, + { + "m_Id": "be8214b41a724c1b97fdc6315992cdea" + }, + { + "m_Id": "137d12cbd4304d52b1cf0d95ca5c5410" + }, + { + "m_Id": "3a80fdaf15c049d7b2d48df8a631ce75" + }, + { + "m_Id": "68acdb187f3a47ba93cdb9ed83d1e455" + }, + { + "m_Id": "05b1adbcae5d43cbb632e7116698acf6" + }, + { + "m_Id": "41d15aa932134f9181a3541493113dd4" + } + ], + "synonyms": [ + "tex2d" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_TextureType": 0, + "m_NormalMapSpace": 0, + "m_EnableGlobalMipBias": true, + "m_MipSamplingMode": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "4abac64486b54345921d846167adedff", + "m_Id": 2, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "4b94de380ed84deb9b55e5ce8d3aa365", + "m_Group": { + "m_Id": "7844c309071b4f42b7329805070ce54e" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -2264.000244140625, + "y": -599.0, + "width": 202.0, + "height": 34.0 + } + }, + "m_Slots": [ + { + "m_Id": "f165143c0ab24ffaa8ae35cb701930cd" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "f03ed8b9043f469381375a4ce7291134" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.HDLitData", + "m_ObjectId": "4c3410a856f64b1891067d0733654e57", + "m_RayTracing": false, + "m_MaterialType": 0, + "m_RefractionModel": 0, + "m_SSSTransmission": true, + "m_EnergyConservingSpecular": true, + "m_ClearCoat": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "4d122725ff954eaca698dd559a56fbad", + "m_Id": 2, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "e00": 0.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 0.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 0.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 0.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "4df7031916b8431180ed5ee67882c193", + "m_Id": 3, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "4fb2c48006f446c68ff80767c6e74072", + "m_Id": 0, + "m_DisplayName": "A", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 3, + "m_Value": { + "x": 1.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty", + "m_ObjectId": "512fb8b4826e48fab65b83b8744dcc78", + "m_Guid": { + "m_GuidSerialized": "57654b9c-894c-4f32-b130-660037d21826" + }, + "m_Name": "Detail Normal Map", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Detail Normal Map", + "m_DefaultReferenceName": "_Detail_Normal_Map", + "m_OverrideReferenceName": "_DetailNormalMap", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}", + "m_Guid": "" + }, + "isMainTexture": false, + "useTilingAndOffset": true, + "m_Modifiable": true, + "m_DefaultType": 3 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BooleanMaterialSlot", + "m_ObjectId": "519093d5818a40cb80eb9afd313dabb2", + "m_Id": 0, + "m_DisplayName": "Normal Flip Back Faces", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": false, + "m_DefaultValue": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "520ecbe721e34ff8b1a210ba99e4c012", + "m_Group": { + "m_Id": "8c0e1cebdf4b4a90ae93ed60f9876e72" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -851.0000610351563, + "y": 1427.0, + "width": 161.0, + "height": 34.0001220703125 + } + }, + "m_Slots": [ + { + "m_Id": "37f12b97fedb4b4b96703b7ffcf30030" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "a45878eacd044a68aae28771783def4f" + } +} + +{ + "m_SGVersion": 2, + "m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalLitSubTarget", + "m_ObjectId": "53055d2fa81b42c99a7a251de6391a7d", + "m_WorkflowMode": 1, + "m_NormalDropOffSpace": 0, + "m_ClearCoat": false, + "m_BlendModePreserveSpecular": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.UVMaterialSlot", + "m_ObjectId": "539bceae6166422cb427aa13ed735a70", + "m_Id": 2, + "m_DisplayName": "UV", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "UV", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [], + "m_Channel": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "54306c72430547cbace417b315aee172", + "m_Id": 5, + "m_DisplayName": "G", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "G", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "54a56818e1fc4bf7a9a9eb2ab9f2eef2", + "m_Id": 5, + "m_DisplayName": "G", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "G", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "55d7efbd09744e6191353110dcd86a9d", + "m_Id": 2, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "e00": 0.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 0.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 0.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 0.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "579cfd2ccc024a8ca575e17769040c93", + "m_Id": 6, + "m_DisplayName": "B", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "581de728483f49beb19182b2da1a957d", + "m_Id": 0, + "m_DisplayName": "Normal", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "5972e9a9acc849b3a192e51466f53583", + "m_Id": 0, + "m_DisplayName": "Occlusion", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SubtractNode", + "m_ObjectId": "59dadd2dd4fa403db2d437e0ca9a0d93", + "m_Group": { + "m_Id": "7844c309071b4f42b7329805070ce54e" + }, + "m_Name": "Subtract", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1700.0001220703125, + "y": -754.0, + "width": 129.999755859375, + "height": 117.99993896484375 + } + }, + "m_Slots": [ + { + "m_Id": "74303bd9fc384474ab44ed2c3900cae3" + }, + { + "m_Id": "b9c856725396493d9bdb07bfabb1bf4f" + }, + { + "m_Id": "6e946e24be054ed1916271e424f8490a" + } + ], + "synonyms": [ + "subtraction", + "remove", + "minus", + "take away" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "59ed337330594b83a0cb18509a2103c4", + "m_Id": 1, + "m_DisplayName": "True", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "True", + "m_StageCapability": 3, + "m_Value": { + "x": 1.0, + "y": 1.0, + "z": 1.0, + "w": 1.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "5a8a475ff31e41249e61d6d446f7045d", + "m_Id": 0, + "m_DisplayName": "RGBA", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "RGBA", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.GroupData", + "m_ObjectId": "5a905965f0d64818bbfb2d4f869e738b", + "m_Title": "Emission", + "m_Position": { + "x": -1076.6800537109375, + "y": 971.6621704101563 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "5aebdfb77ba14f6b9eff2c32e7f13938", + "m_Group": { + "m_Id": "75ae407f7549455383d1c32d8989f303" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -2011.000244140625, + "y": -88.99999237060547, + "width": 105.0, + "height": 34.00002670288086 + } + }, + "m_Slots": [ + { + "m_Id": "92e728130d914968ba764a679cfeb1e7" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "073fbba2726346708a435d231acd7994" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "5b364a3b3f674212ba3399f19a28ee98", + "m_Group": { + "m_Id": "40a7b9274eb447a48d0f1e31def6ba52" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -2642.000244140625, + "y": 562.0000610351563, + "width": 113.0, + "height": 33.99993896484375 + } + }, + "m_Slots": [ + { + "m_Id": "581de728483f49beb19182b2da1a957d" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "5fbe70a88c3441e88ae8d195aba3b134" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "5c98ba512ccb4391a3899ff1c57b71be", + "m_Id": 1, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BooleanMaterialSlot", + "m_ObjectId": "5d7640497f27495a9d3b18f11d1a8331", + "m_Id": 0, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 2, + "m_Value": true, + "m_DefaultValue": true +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DMaterialSlot", + "m_ObjectId": "5d992a286f434f3bbc7331596e782159", + "m_Id": 0, + "m_DisplayName": "Normal Map", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "5f36a9459b9e4861ad3a4ae75d144e06", + "m_Id": 2, + "m_DisplayName": "G", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "G", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "5f5bab486feb4d5ab13dcf73e7176262", + "m_Id": 3, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "5f635683c91e4d76ad13402d7c1a1d30", + "m_Id": 2, + "m_DisplayName": "False", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "False", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "5fbe70a88c3441e88ae8d195aba3b134", + "m_Guid": { + "m_GuidSerialized": "c0ce0039-faef-4069-b561-aa8b956a5604" + }, + "m_Name": "Normal", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Normal", + "m_DefaultReferenceName": "_Normal", + "m_OverrideReferenceName": "_BumpScale", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 1.0, + "m_FloatType": 0, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.SystemData", + "m_ObjectId": "5fc050c17ffe49f6ba85bbda45c46f59", + "m_MaterialNeedsUpdateHash": 279841, + "m_SurfaceType": 0, + "m_RenderingPass": 1, + "m_BlendMode": 0, + "m_ZTest": 4, + "m_ZWrite": false, + "m_TransparentCullMode": 2, + "m_OpaqueCullMode": 2, + "m_SortPriority": 0, + "m_AlphaTest": true, + "m_ExcludeFromTUAndAA": false, + "m_TransparentDepthPrepass": false, + "m_TransparentDepthPostpass": false, + "m_SupportLodCrossFade": false, + "m_DoubleSidedMode": 0, + "m_DOTSInstancing": false, + "m_CustomVelocity": false, + "m_Tessellation": false, + "m_TessellationMode": 0, + "m_TessellationFactorMinDistance": 20.0, + "m_TessellationFactorMaxDistance": 50.0, + "m_TessellationFactorTriangleSize": 100.0, + "m_TessellationShapeFactor": 0.75, + "m_TessellationBackFaceCullEpsilon": -0.25, + "m_TessellationMaxDisplacement": 0.009999999776482582, + "m_Version": 1, + "inspectorFoldoutMask": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.AddNode", + "m_ObjectId": "5fc3fb4427364d89ba464df7069757af", + "m_Group": { + "m_Id": "7844c309071b4f42b7329805070ce54e" + }, + "m_Name": "Add", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1527.0001220703125, + "y": -754.0, + "width": 129.999755859375, + "height": 117.99993896484375 + } + }, + "m_Slots": [ + { + "m_Id": "225aa4516d5e48a0ae38c04d68387ac4" + }, + { + "m_Id": "ca182aad34fe4f0799d1c040f65d652f" + }, + { + "m_Id": "c8d114c11ddd4984849c196a2e265810" + } + ], + "synonyms": [ + "addition", + "sum", + "plus" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "60b4c10b2bf34a32bf7124621a59aa0d", + "m_Id": 0, + "m_DisplayName": "A", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 3, + "m_Value": { + "e00": 0.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 0.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 0.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 0.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1Node", + "m_ObjectId": "624c99e5cf554cc09377549b72c10ed7", + "m_Group": { + "m_Id": "7844c309071b4f42b7329805070ce54e" + }, + "m_Name": "Float", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1700.0001220703125, + "y": -636.0000610351563, + "width": 125.9998779296875, + "height": 77.0 + } + }, + "m_Slots": [ + { + "m_Id": "d632b87ac84b4359856a748b3cce4dfd" + }, + { + "m_Id": "888af6a388dc476c8685ccf44bff5596" + } + ], + "synonyms": [ + "Vector 1", + "1", + "v1", + "vec1", + "scalar" + ], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Value": 0.0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SampleTexture2DNode", + "m_ObjectId": "63df3fd85f3b42ef91149243e4228a47", + "m_Group": { + "m_Id": "7844c309071b4f42b7329805070ce54e" + }, + "m_Name": "Sample Texture 2D", + "m_DrawState": { + "m_Expanded": false, + "m_Position": { + "serializedVersion": "2", + "x": -2242.000244140625, + "y": -754.0, + "width": 180.0, + "height": 155.0 + } + }, + "m_Slots": [ + { + "m_Id": "1a4ab993ade94a9a8667c4f54451441b" + }, + { + "m_Id": "492fc3b3185e4b428e30268d4fc0db7e" + }, + { + "m_Id": "54a56818e1fc4bf7a9a9eb2ab9f2eef2" + }, + { + "m_Id": "eca3ea913291477491bbedf7be0f7cf0" + }, + { + "m_Id": "aa15bd26d8304da9b70db7e98b3c0e19" + }, + { + "m_Id": "9f5fdd1cfbc148498541990fb2973dc1" + }, + { + "m_Id": "539bceae6166422cb427aa13ed735a70" + }, + { + "m_Id": "a0895cb3da544fd8a9fd0c98afed3d53" + } + ], + "synonyms": [ + "tex2d" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_TextureType": 0, + "m_NormalMapSpace": 0, + "m_EnableGlobalMipBias": true, + "m_MipSamplingMode": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "65c83f57096f481d9cd93d6f769b332b", + "m_Id": 0, + "m_DisplayName": "A", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.ShaderKeyword", + "m_ObjectId": "65d8361074904a08ba28f1116b517849", + "m_Guid": { + "m_GuidSerialized": "f157d3e4-dc1d-4f88-a68e-8aa8e974d09c" + }, + "m_Name": "Disable Specular Highlights", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Disable Specular Highlights", + "m_DefaultReferenceName": "_DISABLE_SPECULAR_HIGHLIGHTS", + "m_OverrideReferenceName": "_SPECULARHIGHLIGHTS_OFF", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_KeywordType": 0, + "m_KeywordDefinition": 0, + "m_KeywordScope": 0, + "m_KeywordStages": 2, + "m_Entries": [], + "m_Value": 1, + "m_IsEditable": true +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.BooleanShaderProperty", + "m_ObjectId": "6653a111fd9e437d8669bdd9670b0bcd", + "m_Guid": { + "m_GuidSerialized": "294b879c-cbd2-43ca-9572-1611fb715020" + }, + "m_Name": "Smoothness From Albedo", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Smoothness From Albedo", + "m_DefaultReferenceName": "_Smoothness_From_Albedo", + "m_OverrideReferenceName": "_SmoothnessTextureChannel", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "67a38caa544c45b889e45d23aaab060f", + "m_Id": 6, + "m_DisplayName": "B", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DInputMaterialSlot", + "m_ObjectId": "67a402877e3a477c82a85c2a2a073d1a", + "m_Id": 1, + "m_DisplayName": "Texture", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Texture", + "m_StageCapability": 3, + "m_BareResource": false, + "m_Texture": { + "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}", + "m_Guid": "" + }, + "m_DefaultType": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.NormalBlendNode", + "m_ObjectId": "67f62854fb9746aea59b8e9362b02e59", + "m_Group": { + "m_Id": "adb53098703d462f9d82c495cfcb09e9" + }, + "m_Name": "Normal Blend", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -2143.000244140625, + "y": 111.00003814697266, + "width": 145.0, + "height": 152.99993896484376 + } + }, + "m_Slots": [ + { + "m_Id": "65c83f57096f481d9cd93d6f769b332b" + }, + { + "m_Id": "aa6972e57da74f35acd5277428223e4f" + }, + { + "m_Id": "28b00750ef0c4d0eb57e6933cc57f2ec" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_BlendMode": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DInputMaterialSlot", + "m_ObjectId": "68acdb187f3a47ba93cdb9ed83d1e455", + "m_Id": 1, + "m_DisplayName": "Texture", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Texture", + "m_StageCapability": 3, + "m_BareResource": false, + "m_Texture": { + "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}", + "m_Guid": "" + }, + "m_DefaultType": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "69589060132b47bc906b6b537466b085", + "m_Id": 6, + "m_DisplayName": "B", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "6a3b470a319e4621b9d39ed2dde90105", + "m_Id": 6, + "m_DisplayName": "B", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CategoryData", + "m_ObjectId": "6b44a145175a4c7f9c7dd719960259ce", + "m_Name": "Specular/Metallic", + "m_ChildObjectList": [ + { + "m_Id": "d29cc0a358fe4e11adf98951bf90803e" + }, + { + "m_Id": "b20ecbb6b51842189aa09a748f852aac" + }, + { + "m_Id": "a9ae7d9f9bb342668379f294b997a024" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "6b68d6d0d36541818ea5cc8c6aa6d27c", + "m_Id": 0, + "m_DisplayName": "Smoothness", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Smoothness", + "m_StageCapability": 2, + "m_Value": 0.5, + "m_DefaultValue": 0.5, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "6bc6b9e0a2624ed396e3442317be8715", + "m_Id": 7, + "m_DisplayName": "A", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "6be3d0264cbc448db4b71e04e054dfcb", + "m_Id": 2, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "e00": 0.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 0.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 0.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 0.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "6d3fe6dc716a4ba3b25f865ccc312268", + "m_Id": 1, + "m_DisplayName": "", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "6e946e24be054ed1916271e424f8490a", + "m_Id": 2, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DMaterialSlot", + "m_ObjectId": "6f3b61224b9442079ae7397ab5ac3a3b", + "m_Id": 0, + "m_DisplayName": "Emission Map", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.FlipNode", + "m_ObjectId": "6f4036ddae1d4369b66ae1ecf209815d", + "m_Group": { + "m_Id": "b8b5e48f3c87435c8fe78bddf85831ee" + }, + "m_Name": "Flip", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1308.9998779296875, + "y": 89.00009155273438, + "width": 160.0, + "height": 206.99990844726563 + } + }, + "m_Slots": [ + { + "m_Id": "115cd36f048046628951d753480b5287" + }, + { + "m_Id": "ed9c10e3f10d4fa5bcdbef8bb8023ffb" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_RedChannel": false, + "m_GreenChannel": false, + "m_BlueChannel": true, + "m_AlphaChannel": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "6fb2c59bbe084f8586f527e73fef9585", + "m_Id": 0, + "m_DisplayName": "A", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 3, + "m_Value": { + "e00": 0.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 0.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 0.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 0.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.RedirectNodeData", + "m_ObjectId": "713229f0e40a4ffea70185df0f86d91a", + "m_Group": { + "m_Id": "adb53098703d462f9d82c495cfcb09e9" + }, + "m_Name": "Redirect Node", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -2252.000244140625, + "y": 231.00003051757813, + "width": 56.0, + "height": 23.999969482421876 + } + }, + "m_Slots": [ + { + "m_Id": "842d765c848140099b05b29b58cf3fe7" + }, + { + "m_Id": "424c46a55e2b42f0a62ef916f70379fa" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "7224ddffb24f4e5ea31957e3a09bdc45", + "m_Id": 1, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "732c9009a78c4960993614ab33c3f88a", + "m_Id": 2, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "74303bd9fc384474ab44ed2c3900cae3", + "m_Id": 0, + "m_DisplayName": "A", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 3, + "m_Value": { + "x": 1.0, + "y": 1.0, + "z": 1.0, + "w": 1.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CategoryData", + "m_ObjectId": "74a97f54e8d44a3b9a020081d1e1768d", + "m_Name": "Detail", + "m_ChildObjectList": [ + { + "m_Id": "d26edc375b4c4243938ad5141a4772f2" + }, + { + "m_Id": "9dcbe1b467374735bd6902ef8a4b5fea" + }, + { + "m_Id": "f03ed8b9043f469381375a4ce7291134" + }, + { + "m_Id": "512fb8b4826e48fab65b83b8744dcc78" + }, + { + "m_Id": "9783263798cc4b25a7a122df318a57f8" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.GroupData", + "m_ObjectId": "75ae407f7549455383d1c32d8989f303", + "m_Title": "Albedo", + "m_Position": { + "x": -2232.414306640625, + "y": -327.3903503417969 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.GroupData", + "m_ObjectId": "7844c309071b4f42b7329805070ce54e", + "m_Title": "Apply Albedo Detail", + "m_Position": { + "x": -2462.000244140625, + "y": -812.8714599609375 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot", + "m_ObjectId": "78dec7a33602431b8db670856518614e", + "m_Id": 0, + "m_DisplayName": "Emission", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Emission", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_ColorMode": 1, + "m_DefaultColor": { + "r": 0.0, + "g": 0.0, + "b": 0.0, + "a": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "7958ddaf74f84d10b4c52d980f7a2caf", + "m_Group": { + "m_Id": "7844c309071b4f42b7329805070ce54e" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -2437.000244140625, + "y": -715.0, + "width": 179.0, + "height": 33.9998779296875 + } + }, + "m_Slots": [ + { + "m_Id": "3aa232cc599b4f2d880a83ab15707fed" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "9dcbe1b467374735bd6902ef8a4b5fea" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "79bc26ac5b6c4941a175a5f220ac954d", + "m_Id": 5, + "m_DisplayName": "G", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "G", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "79c084fe5532421b886da16371380922", + "m_Id": 0, + "m_DisplayName": "RGBA", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "RGBA", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BooleanMaterialSlot", + "m_ObjectId": "7aa785b3d31148ffa058660ef34f791f", + "m_Id": 0, + "m_DisplayName": "A", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 3, + "m_Value": false, + "m_DefaultValue": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DInputMaterialSlot", + "m_ObjectId": "7abb9cd41a5547868cdd6e7f4ca18168", + "m_Id": 1, + "m_DisplayName": "Texture", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Texture", + "m_StageCapability": 3, + "m_BareResource": false, + "m_Texture": { + "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}", + "m_Guid": "" + }, + "m_DefaultType": 3 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "7b7da8cb8bb7489c97677230e8c1461c", + "m_Id": 0, + "m_DisplayName": "A", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 3, + "m_Value": { + "e00": 0.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 0.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 0.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 0.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BranchNode", + "m_ObjectId": "7ba8fdf5005249f6bba8c396995899ae", + "m_Group": { + "m_Id": "8dbd81486d314bc690d94dc6281fe289" + }, + "m_Name": "Branch", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -894.0000610351563, + "y": 650.0000610351563, + "width": 170.0, + "height": 142.0 + } + }, + "m_Slots": [ + { + "m_Id": "c59ca170ab6a447395283b3d809130c7" + }, + { + "m_Id": "59ed337330594b83a0cb18509a2103c4" + }, + { + "m_Id": "b43a641d3cae4fbba6c9139f6343e467" + }, + { + "m_Id": "5f5bab486feb4d5ab13dcf73e7176262" + } + ], + "synonyms": [ + "switch", + "if", + "else" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "7cff47f9096a42979f5ad71205d49755", + "m_Id": 0, + "m_DisplayName": "Smoothness", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "80c8e146a8eb4ac9a8b2b1d35cc5c629", + "m_Id": 1, + "m_DisplayName": "Strength", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Strength", + "m_StageCapability": 3, + "m_Value": 1.0, + "m_DefaultValue": 1.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "81e8f861d3854a619d550942dd0b2ae2", + "m_Group": { + "m_Id": "adb53098703d462f9d82c495cfcb09e9" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -2578.000244140625, + "y": 267.99993896484377, + "width": 203.0, + "height": 34.000030517578128 + } + }, + "m_Slots": [ + { + "m_Id": "82d2d8bce5af41ad85bbbac46fbd5860" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "9783263798cc4b25a7a122df318a57f8" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.UVMaterialSlot", + "m_ObjectId": "824610f03ea3492a9d4b6a52f9e36a28", + "m_Id": 2, + "m_DisplayName": "UV", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "UV", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [], + "m_Channel": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "82d2d8bce5af41ad85bbbac46fbd5860", + "m_Id": 0, + "m_DisplayName": "Detail Normal Map Scale", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 2, + "m_Type": "UnityEditor.Rendering.BuiltIn.ShaderGraph.BuiltInTarget", + "m_ObjectId": "840c4b73cabf4489982965630032a419", + "m_ActiveSubTarget": { + "m_Id": "300cf1de2b6f4a5a8d350ea32a6575dc" + }, + "m_AllowMaterialOverride": true, + "m_SurfaceType": 0, + "m_ZWriteControl": 0, + "m_ZTestMode": 4, + "m_AlphaMode": 0, + "m_RenderFace": 2, + "m_AlphaClip": false, + "m_CustomEditorGUI": "" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "842d765c848140099b05b29b58cf3fe7", + "m_Id": 0, + "m_DisplayName": "", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "857db9a72e0843eda0356895111ba521", + "m_Id": 6, + "m_DisplayName": "B", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "888af6a388dc476c8685ccf44bff5596", + "m_Id": 0, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.HDTarget", + "m_ObjectId": "88f2fa4395e14c27b2c4cd4c39f4a557", + "m_ActiveSubTarget": { + "m_Id": "db66042a72e84f748d977f37482b94da" + }, + "m_Datas": [ + { + "m_Id": "4c3410a856f64b1891067d0733654e57" + }, + { + "m_Id": "a6c8f4439ed748e28b75ed4abb646670" + }, + { + "m_Id": "e4ab9c6a4dc244088f8d38f2fdfd371d" + }, + { + "m_Id": "5fc050c17ffe49f6ba85bbda45c46f59" + } + ], + "m_CustomEditorGUI": "", + "m_SupportVFX": false, + "m_SupportComputeForVertexSetup": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty", + "m_ObjectId": "89b8f3104f6f45b7a09de6483d127676", + "m_Guid": { + "m_GuidSerialized": "4e9d075f-76cf-4d21-a25f-8b252bfb9697" + }, + "m_Name": "Emission Map", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Emission Map", + "m_DefaultReferenceName": "_Emission_Map", + "m_OverrideReferenceName": "_EmissionMap", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}", + "m_Guid": "" + }, + "isMainTexture": false, + "useTilingAndOffset": true, + "m_Modifiable": true, + "m_DefaultType": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.GroupData", + "m_ObjectId": "8c0e1cebdf4b4a90ae93ed60f9876e72", + "m_Title": "Occlusion", + "m_Position": { + "x": -876.0001220703125, + "y": 1328.0001220703125 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "8d46109eb9204186933dd03b62aa5318", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Alpha", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 12.000020027160645, + "y": 272.0, + "width": 199.99998474121095, + "height": 41.0 + } + }, + "m_Slots": [ + { + "m_Id": "3a602edeb2024d569404597b3371b727" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Alpha" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.GroupData", + "m_ObjectId": "8dbd81486d314bc690d94dc6281fe289", + "m_Title": "Smoothness", + "m_Position": { + "x": -1159.0020751953125, + "y": 590.990234375 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "8edf9697a6d142868b9d0920b81bc661", + "m_Id": 1, + "m_DisplayName": "B", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 3, + "m_Value": { + "e00": 2.0, + "e01": 2.0, + "e02": 2.0, + "e03": 2.0, + "e10": 2.0, + "e11": 2.0, + "e12": 2.0, + "e13": 2.0, + "e20": 2.0, + "e21": 2.0, + "e22": 2.0, + "e23": 2.0, + "e30": 2.0, + "e31": 2.0, + "e32": 2.0, + "e33": 2.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "8f60dac23b7b4dc19e74482e8ab0d940", + "m_Group": { + "m_Id": "" + }, + "m_Name": "VertexDescription.Normal", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "ca853667bae249479c020428e08b741e" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Normal" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "90287b4a7df746ada6dfe95f76af25de", + "m_Id": 1, + "m_DisplayName": "True", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "True", + "m_StageCapability": 3, + "m_Value": { + "x": 1.0, + "y": 1.0, + "z": 1.0, + "w": 1.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "92e728130d914968ba764a679cfeb1e7", + "m_Id": 0, + "m_DisplayName": "Color", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "9375c82739f44b6bbdb78d0a74151a34", + "m_Group": { + "m_Id": "cebae50b11e94e838b6e7a5a61d4f2e8" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -2005.000244140625, + "y": 531.0000610351563, + "width": 150.0, + "height": 33.9998779296875 + } + }, + "m_Slots": [ + { + "m_Id": "030b46cbb68048eeba105ae309540d9f" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "a9ae7d9f9bb342668379f294b997a024" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "9417f7fcc072407fa41ae71034a5f4c3", + "m_Group": { + "m_Id": "b8b5e48f3c87435c8fe78bddf85831ee" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1453.9998779296875, + "y": 24.000051498413087, + "width": 199.0, + "height": 33.99998474121094 + } + }, + "m_Slots": [ + { + "m_Id": "519093d5818a40cb80eb9afd313dabb2" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "988d3fda4b75435b9f2630355731fbc7" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "946f784fadc0474db2247d51607a62e5", + "m_Id": 4, + "m_DisplayName": "R", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "R", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "95f3657663484b8e990cd7400d169b39", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.AlphaClipThreshold", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "c2a367ea37dd46e6a9432b098707f847" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.AlphaClipThreshold" +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "9783263798cc4b25a7a122df318a57f8", + "m_Guid": { + "m_GuidSerialized": "05535f00-ba18-4a28-96e8-e5d6e974b753" + }, + "m_Name": "Detail Normal Map Scale", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Detail Normal Map Scale", + "m_DefaultReferenceName": "_Detail_Normal_Map_Scale", + "m_OverrideReferenceName": "_DetailNormalMapScale", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 1.0, + "m_FloatType": 1, + "m_RangeValues": { + "x": 0.0, + "y": 2.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.BooleanShaderProperty", + "m_ObjectId": "988d3fda4b75435b9f2630355731fbc7", + "m_Guid": { + "m_GuidSerialized": "918837a0-42bc-444d-806b-abd320b50a07" + }, + "m_Name": "Normal Flip Back Faces", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Normal Flip Back Faces", + "m_DefaultReferenceName": "_Normal_Flip_Back_Faces", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": true +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BooleanMaterialSlot", + "m_ObjectId": "99ac011d37c84d85aedf16ed6c010acb", + "m_Id": 0, + "m_DisplayName": "Smoothness From Albedo", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": false, + "m_DefaultValue": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "99aea177043447d3adf16a8476eb38aa", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Smoothness", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "6b68d6d0d36541818ea5cc8c6aa6d27c" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Smoothness" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot", + "m_ObjectId": "99bbd3725e40426a810b5a8087433abe", + "m_Id": 0, + "m_DisplayName": "Bent Normal", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "BentNormal", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 3 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.UVMaterialSlot", + "m_ObjectId": "9b426de8795444ab806ff53a0526bdba", + "m_Id": 2, + "m_DisplayName": "UV", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "UV", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [], + "m_Channel": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "9b7a84a37f604649918c5d605f50bfcb", + "m_Id": 0, + "m_DisplayName": "", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "9b994b58b2c445d38d601439bc7bfec2", + "m_Id": 0, + "m_DisplayName": "RGBA", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "RGBA", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DMaterialSlot", + "m_ObjectId": "9bb08656de9a41bbac558c1aa2b01540", + "m_Id": 0, + "m_DisplayName": "Detail Normal Map", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "9c9ba87b32ad441dba6e9b9f11388d9b", + "m_Group": { + "m_Id": "40a7b9274eb447a48d0f1e31def6ba52" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -2869.000244140625, + "y": 446.0000915527344, + "width": 147.0, + "height": 33.9998779296875 + } + }, + "m_Slots": [ + { + "m_Id": "5d992a286f434f3bbc7331596e782159" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "a6514c562dcf45fb942466fd9b4581a0" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "9d00fbf2976e40adb8d8be2e67781d7b", + "m_Id": 0, + "m_DisplayName": "In", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "In", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty", + "m_ObjectId": "9dcbe1b467374735bd6902ef8a4b5fea", + "m_Guid": { + "m_GuidSerialized": "b4fef325-83c4-42aa-aa65-98d4472bcce3" + }, + "m_Name": "Detail Albedo Map", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Detail Albedo Map", + "m_DefaultReferenceName": "_Detail_Albedo_Map", + "m_OverrideReferenceName": "_DetailAlbedoMap", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}", + "m_Guid": "" + }, + "isMainTexture": false, + "useTilingAndOffset": true, + "m_Modifiable": true, + "m_DefaultType": 4 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.MultiplyNode", + "m_ObjectId": "9ddc490d58d443a699694376870e4007", + "m_Group": { + "m_Id": "7844c309071b4f42b7329805070ce54e" + }, + "m_Name": "Multiply", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1858.000244140625, + "y": -754.0, + "width": 130.0, + "height": 117.99993896484375 + } + }, + "m_Slots": [ + { + "m_Id": "12099210038e4184bdf161275f73e17e" + }, + { + "m_Id": "8edf9697a6d142868b9d0920b81bc661" + }, + { + "m_Id": "ce2504f5970a4304b7030dd6c14d2981" + } + ], + "synonyms": [ + "multiplication", + "times", + "x" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DInputMaterialSlot", + "m_ObjectId": "9f5fdd1cfbc148498541990fb2973dc1", + "m_Id": 1, + "m_DisplayName": "Texture", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Texture", + "m_StageCapability": 3, + "m_BareResource": false, + "m_Texture": { + "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}", + "m_Guid": "" + }, + "m_DefaultType": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SamplerStateMaterialSlot", + "m_ObjectId": "a0895cb3da544fd8a9fd0c98afed3d53", + "m_Id": 3, + "m_DisplayName": "Sampler", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Sampler", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "a0d211ee5b864f99bafe73484c82b392", + "m_Id": 0, + "m_DisplayName": "In", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "In", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DInputMaterialSlot", + "m_ObjectId": "a1ad125b194f4e8aba9bf4c859d9d3fd", + "m_Id": 1, + "m_DisplayName": "Texture", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Texture", + "m_StageCapability": 3, + "m_BareResource": false, + "m_Texture": { + "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}", + "m_Guid": "" + }, + "m_DefaultType": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.OneMinusNode", + "m_ObjectId": "a331dade344845c389375e2828f69a68", + "m_Group": { + "m_Id": "cd446e3cb81b417a8bd2dc2ccafcd42e" + }, + "m_Name": "One Minus", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -2480.000244140625, + "y": -292.00006103515627, + "width": 128.0, + "height": 94.00009155273438 + } + }, + "m_Slots": [ + { + "m_Id": "ec6b6e488bcf422cb3bef77bf3645cd8" + }, + { + "m_Id": "7224ddffb24f4e5ea31957e3a09bdc45" + } + ], + "synonyms": [ + "complement", + "invert", + "opposite" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty", + "m_ObjectId": "a45878eacd044a68aae28771783def4f", + "m_Guid": { + "m_GuidSerialized": "abea17b7-9c12-4d45-b46e-46ecca387bb5" + }, + "m_Name": "Occlusion Map", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Occlusion Map", + "m_DefaultReferenceName": "_Occlusion_Map", + "m_OverrideReferenceName": "_OcclusionMap", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}", + "m_Guid": "" + }, + "isMainTexture": false, + "useTilingAndOffset": true, + "m_Modifiable": true, + "m_DefaultType": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.MultiplyNode", + "m_ObjectId": "a4dd0c6239aa478ba424219e8584a2ec", + "m_Group": { + "m_Id": "5a905965f0d64818bbfb2d4f869e738b" + }, + "m_Name": "Multiply", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -663.0000610351563, + "y": 1031.0001220703125, + "width": 130.0, + "height": 118.0 + } + }, + "m_Slots": [ + { + "m_Id": "c3238e33047441e2ba186d03e7820e09" + }, + { + "m_Id": "32eaf090c3674c5ebb4292090b0c710b" + }, + { + "m_Id": "bef11b50009a4bac8221b0a22e26289a" + } + ], + "synonyms": [ + "multiplication", + "times", + "x" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "a4e6f6f87e714c15927b5a73283680bf", + "m_Id": 2, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "e00": 0.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 0.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 0.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 0.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty", + "m_ObjectId": "a6514c562dcf45fb942466fd9b4581a0", + "m_Guid": { + "m_GuidSerialized": "dc25cb40-caa0-4462-844e-470a34ea682f" + }, + "m_Name": "Normal Map", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Normal Map", + "m_DefaultReferenceName": "_Normal_Map", + "m_OverrideReferenceName": "_BumpMap", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}", + "m_Guid": "" + }, + "isMainTexture": false, + "useTilingAndOffset": true, + "m_Modifiable": true, + "m_DefaultType": 3 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.BuiltinData", + "m_ObjectId": "a6c8f4439ed748e28b75ed4abb646670", + "m_Distortion": false, + "m_DistortionMode": 0, + "m_DistortionDepthTest": true, + "m_AddPrecomputedVelocity": false, + "m_TransparentWritesMotionVec": false, + "m_DepthOffset": false, + "m_ConservativeDepthOffset": false, + "m_TransparencyFog": true, + "m_AlphaTestShadow": false, + "m_BackThenFrontRendering": false, + "m_TransparentDepthPrepass": false, + "m_TransparentDepthPostpass": false, + "m_SupportLodCrossFade": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DMaterialSlot", + "m_ObjectId": "a6f52d99a14d4561b749eaa8034b8dee", + "m_Id": 0, + "m_DisplayName": "Detail Mask", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty", + "m_ObjectId": "a9ae7d9f9bb342668379f294b997a024", + "m_Guid": { + "m_GuidSerialized": "f9ba635a-eee1-4036-8914-6c540b5c8dce" + }, + "m_Name": "Metallic Map", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Metallic Map", + "m_DefaultReferenceName": "_Metallic_Map", + "m_OverrideReferenceName": "_MetallicGlossMap", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 2, + "m_Hidden": false, + "m_Value": { + "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}", + "m_Guid": "" + }, + "isMainTexture": false, + "useTilingAndOffset": true, + "m_Modifiable": true, + "m_DefaultType": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "aa15bd26d8304da9b70db7e98b3c0e19", + "m_Id": 7, + "m_DisplayName": "A", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot", + "m_ObjectId": "aa6972e57da74f35acd5277428223e4f", + "m_Id": 1, + "m_DisplayName": "B", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 1.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.IsFrontFaceNode", + "m_ObjectId": "ab6a9bc49dfd4a0190d46c6ab2cc20fe", + "m_Group": { + "m_Id": "b8b5e48f3c87435c8fe78bddf85831ee" + }, + "m_Name": "Is Front Face", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1506.9998779296875, + "y": -52.99998474121094, + "width": 120.0, + "height": 77.00003814697266 + } + }, + "m_Slots": [ + { + "m_Id": "5d7640497f27495a9d3b18f11d1a8331" + } + ], + "synonyms": [ + "face", + "side" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "abb0d78c509d4e99b94f76bc161cbfbf", + "m_Id": 1, + "m_DisplayName": "B", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 3, + "m_Value": { + "e00": 2.0, + "e01": 2.0, + "e02": 2.0, + "e03": 2.0, + "e10": 2.0, + "e11": 2.0, + "e12": 2.0, + "e13": 2.0, + "e20": 2.0, + "e21": 2.0, + "e22": 2.0, + "e23": 2.0, + "e30": 2.0, + "e31": 2.0, + "e32": 2.0, + "e33": 2.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "ad135feac44b4a9092c1bc6a399986ad", + "m_Id": 0, + "m_DisplayName": "RGBA", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "RGBA", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "ad18512df63043deb798f7e281e57691", + "m_Id": 3, + "m_DisplayName": "B", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.GroupData", + "m_ObjectId": "adb53098703d462f9d82c495cfcb09e9", + "m_Title": "Apply Normal Detail", + "m_Position": { + "x": -2892.000244140625, + "y": 52.12871551513672 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DInputMaterialSlot", + "m_ObjectId": "af5686ba559143aaa6a6d1411da15050", + "m_Id": 1, + "m_DisplayName": "Texture", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Texture", + "m_StageCapability": 3, + "m_BareResource": false, + "m_Texture": { + "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}", + "m_Guid": "" + }, + "m_DefaultType": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "b0524f4fe77047f0816faf49fc8f18bb", + "m_Id": 3, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "b07e5f27fa6f45438a017da790f26d52", + "m_Id": 1, + "m_DisplayName": "B", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 3, + "m_Value": { + "e00": 2.0, + "e01": 2.0, + "e02": 2.0, + "e03": 2.0, + "e10": 2.0, + "e11": 2.0, + "e12": 2.0, + "e13": 2.0, + "e20": 2.0, + "e21": 2.0, + "e22": 2.0, + "e23": 2.0, + "e30": 2.0, + "e31": 2.0, + "e32": 2.0, + "e33": 2.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "b1247c6500664956afd5a04f39369d7f", + "m_Id": 4, + "m_DisplayName": "R", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "R", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "b20ecbb6b51842189aa09a748f852aac", + "m_Guid": { + "m_GuidSerialized": "8178a468-7c5b-4177-9ef1-c5048926332c" + }, + "m_Name": "Metallic", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Metallic", + "m_DefaultReferenceName": "_Metallic", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 0.0, + "m_FloatType": 1, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SplitNode", + "m_ObjectId": "b2b8b9f6255d4b348f0a6e893e918aa2", + "m_Group": { + "m_Id": "f0446934f1f84b8480c20f72122e30f3" + }, + "m_Name": "Split", + "m_DrawState": { + "m_Expanded": false, + "m_Position": { + "serializedVersion": "2", + "x": -1139.9998779296875, + "y": -402.0, + "width": 119.0, + "height": 77.0 + } + }, + "m_Slots": [ + { + "m_Id": "02617dfed10a46669baf63b3ac51be54" + }, + { + "m_Id": "2209a6af91524b00bee1b03dcd2a8e7c" + }, + { + "m_Id": "5f36a9459b9e4861ad3a4ae75d144e06" + }, + { + "m_Id": "ad18512df63043deb798f7e281e57691" + }, + { + "m_Id": "15149423a05142f6ae480acabae805fa" + } + ], + "synonyms": [ + "separate" + ], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "b2e183de88cd4dc3a4cfb3f6f22a122c", + "m_Id": 0, + "m_DisplayName": "Ambient Occlusion", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Occlusion", + "m_StageCapability": 2, + "m_Value": 1.0, + "m_DefaultValue": 1.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.UVMaterialSlot", + "m_ObjectId": "b42e2178393d4f398283d13201a86a3b", + "m_Id": 2, + "m_DisplayName": "UV", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "UV", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [], + "m_Channel": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "b43a641d3cae4fbba6c9139f6343e467", + "m_Id": 2, + "m_DisplayName": "False", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "False", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.RedirectNodeData", + "m_ObjectId": "b4f0174124dc498db636372a66063897", + "m_Group": { + "m_Id": "adb53098703d462f9d82c495cfcb09e9" + }, + "m_Name": "Redirect Node", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -2054.000244140625, + "y": 263.9999694824219, + "width": 56.0, + "height": 24.000091552734376 + } + }, + "m_Slots": [ + { + "m_Id": "9b7a84a37f604649918c5d605f50bfcb" + }, + { + "m_Id": "6d3fe6dc716a4ba3b25f865ccc312268" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PositionMaterialSlot", + "m_ObjectId": "b6fb41ea27c64fb79b77d4cecf118640", + "m_Id": 0, + "m_DisplayName": "Position", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Position", + "m_StageCapability": 1, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SampleTexture2DNode", + "m_ObjectId": "b774027047014045a64b4163e87330c9", + "m_Group": { + "m_Id": "8c0e1cebdf4b4a90ae93ed60f9876e72" + }, + "m_Name": "Sample Texture 2D", + "m_DrawState": { + "m_Expanded": false, + "m_Position": { + "serializedVersion": "2", + "x": -666.0000610351563, + "y": 1387.0001220703125, + "width": 156.00003051757813, + "height": 155.0 + } + }, + "m_Slots": [ + { + "m_Id": "d718ce0dfe504a9d8517339ac0f8ff45" + }, + { + "m_Id": "b1247c6500664956afd5a04f39369d7f" + }, + { + "m_Id": "e2d4e47a62cd4e5d9c0299785a6a9a4c" + }, + { + "m_Id": "857db9a72e0843eda0356895111ba521" + }, + { + "m_Id": "41aec16a03e94dd4932f5b7b7ca29ad0" + }, + { + "m_Id": "a1ad125b194f4e8aba9bf4c859d9d3fd" + }, + { + "m_Id": "3c4a010407374c46a20b6f57f475bb4f" + }, + { + "m_Id": "b93b8d143ae54e96b285a52a0ab11192" + } + ], + "synonyms": [ + "tex2d" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_TextureType": 0, + "m_NormalMapSpace": 0, + "m_EnableGlobalMipBias": true, + "m_MipSamplingMode": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "b792fa00cc2943f988eef88091fc962f", + "m_Id": 4, + "m_DisplayName": "R", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "R", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.GroupData", + "m_ObjectId": "b8b5e48f3c87435c8fe78bddf85831ee", + "m_Title": "Flip Normal", + "m_Position": { + "x": -1531.8348388671875, + "y": -112.36843872070313 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SamplerStateMaterialSlot", + "m_ObjectId": "b93b8d143ae54e96b285a52a0ab11192", + "m_Id": 3, + "m_DisplayName": "Sampler", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Sampler", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "b9c856725396493d9bdb07bfabb1bf4f", + "m_Id": 1, + "m_DisplayName": "B", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 3, + "m_Value": { + "x": 1.0, + "y": 1.0, + "z": 1.0, + "w": 1.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot", + "m_ObjectId": "ba7ce452f5af4d5d83da6be19e04ab1b", + "m_Id": 0, + "m_DisplayName": "Specular Color", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Specular", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_ColorMode": 0, + "m_DefaultColor": { + "r": 0.5, + "g": 0.5, + "b": 0.5, + "a": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "bc13f29ae89348fd880b7361cff27f24", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.BaseColor", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "c736625d58fc43b9b19c035fe6f37dcd" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.BaseColor" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "bc38cd4f0b6b4002aeb9d47ea7359bf4", + "m_Id": 4, + "m_DisplayName": "R", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "R", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "bd5fb7d289e643638297678200aa9587", + "m_Id": 3, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "be8214b41a724c1b97fdc6315992cdea", + "m_Id": 5, + "m_DisplayName": "G", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "G", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "bef11b50009a4bac8221b0a22e26289a", + "m_Id": 2, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "e00": 0.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 0.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 0.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 0.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "c0309b0ff34244ea97160fe5fc583e46", + "m_Group": { + "m_Id": "8c0e1cebdf4b4a90ae93ed60f9876e72" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -711.0, + "y": 1542.0001220703125, + "width": 126.99993896484375, + "height": 34.0 + } + }, + "m_Slots": [ + { + "m_Id": "5972e9a9acc849b3a192e51466f53583" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "d9463d7b8c064ec89cf8a937bd5a27c5" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "c078413bcc9c4a009c89c0d60c650582", + "m_Id": 0, + "m_DisplayName": "A", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "c0db1c57607b4218b9fe4a494acc32bd", + "m_Group": { + "m_Id": "8dbd81486d314bc690d94dc6281fe289" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1134.0, + "y": 690.0, + "width": 211.99993896484376, + "height": 34.0 + } + }, + "m_Slots": [ + { + "m_Id": "99ac011d37c84d85aedf16ed6c010acb" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "6653a111fd9e437d8669bdd9670b0bcd" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "c14a8937cbd94b5abf1ab7c367caddcb", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.BentNormal", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "99bbd3725e40426a810b5a8087433abe" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.BentNormal" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "c2a367ea37dd46e6a9432b098707f847", + "m_Id": 0, + "m_DisplayName": "Alpha Clip Threshold", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "AlphaClipThreshold", + "m_StageCapability": 2, + "m_Value": 0.5, + "m_DefaultValue": 0.5, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "c30d61a20c864d8fbebf20c9a6285982", + "m_Id": 6, + "m_DisplayName": "B", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "c3238e33047441e2ba186d03e7820e09", + "m_Id": 0, + "m_DisplayName": "A", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 3, + "m_Value": { + "e00": 0.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 0.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 0.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 0.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BooleanMaterialSlot", + "m_ObjectId": "c37bf412fa78488b83b00b597bea9648", + "m_Id": 1, + "m_DisplayName": "B", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 3, + "m_Value": false, + "m_DefaultValue": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.MultiplyNode", + "m_ObjectId": "c470a679d8084e2d98f9f97fb350661b", + "m_Group": { + "m_Id": "8dbd81486d314bc690d94dc6281fe289" + }, + "m_Name": "Multiply", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -700.0, + "y": 650.0000610351563, + "width": 126.0, + "height": 117.99993896484375 + } + }, + "m_Slots": [ + { + "m_Id": "e53736c8a02a4bbf916e9fdb2518a12f" + }, + { + "m_Id": "b07e5f27fa6f45438a017da790f26d52" + }, + { + "m_Id": "d4fb460b6cbc4637bad16e493bdf03fb" + } + ], + "synonyms": [ + "multiplication", + "times", + "x" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.NormalStrengthNode", + "m_ObjectId": "c493086a18fd4d91af06067576d3b393", + "m_Group": { + "m_Id": "40a7b9274eb447a48d0f1e31def6ba52" + }, + "m_Name": "Normal Strength", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -2508.000244140625, + "y": 406.9999694824219, + "width": 166.0, + "height": 118.00021362304688 + } + }, + "m_Slots": [ + { + "m_Id": "9d00fbf2976e40adb8d8be2e67781d7b" + }, + { + "m_Id": "80c8e146a8eb4ac9a8b2b1d35cc5c629" + }, + { + "m_Id": "09330e46b8a7473c93eca4e14fb9ac28" + } + ], + "synonyms": [ + "intensity" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.LerpNode", + "m_ObjectId": "c4963951ce554480911fd26643c8049d", + "m_Group": { + "m_Id": "adb53098703d462f9d82c495cfcb09e9" + }, + "m_Name": "Lerp", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1969.0003662109375, + "y": 112.99996948242188, + "width": 130.0001220703125, + "height": 142.00003051757813 + } + }, + "m_Slots": [ + { + "m_Id": "eb5b6b79fcb9472ea3a520becab5351a" + }, + { + "m_Id": "0e139607c05b4bb8935e59a8ddfc2a34" + }, + { + "m_Id": "3b1a4698236b4d14af95e76b8054c1fe" + }, + { + "m_Id": "4df7031916b8431180ed5ee67882c193" + } + ], + "synonyms": [ + "mix", + "blend", + "linear interpolate" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BooleanMaterialSlot", + "m_ObjectId": "c59ca170ab6a447395283b3d809130c7", + "m_Id": 0, + "m_DisplayName": "Predicate", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Predicate", + "m_StageCapability": 3, + "m_Value": false, + "m_DefaultValue": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SamplerStateMaterialSlot", + "m_ObjectId": "c6551ed58a3341e9b9c79a2546ef66f2", + "m_Id": 3, + "m_DisplayName": "Sampler", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Sampler", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot", + "m_ObjectId": "c736625d58fc43b9b19c035fe6f37dcd", + "m_Id": 0, + "m_DisplayName": "Base Color", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "BaseColor", + "m_StageCapability": 2, + "m_Value": { + "x": 0.5, + "y": 0.5, + "z": 0.5 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_ColorMode": 0, + "m_DefaultColor": { + "r": 0.5, + "g": 0.5, + "b": 0.5, + "a": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "c76502e563064684b6843ddfd14da25a", + "m_Group": { + "m_Id": "" + }, + "m_Name": "VertexDescription.Position", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "b6fb41ea27c64fb79b77d4cecf118640" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Position" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.MultiplyNode", + "m_ObjectId": "c8586dfffdde4291b53fea53da86f2fb", + "m_Group": { + "m_Id": "7844c309071b4f42b7329805070ce54e" + }, + "m_Name": "Multiply", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -2056.00048828125, + "y": -632.0000610351563, + "width": 126.000244140625, + "height": 118.00006103515625 + } + }, + "m_Slots": [ + { + "m_Id": "16bec3f0eed24305afcdbdf9549fbd2c" + }, + { + "m_Id": "abb0d78c509d4e99b94f76bc161cbfbf" + }, + { + "m_Id": "4d122725ff954eaca698dd559a56fbad" + } + ], + "synonyms": [ + "multiplication", + "times", + "x" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "c8d114c11ddd4984849c196a2e265810", + "m_Id": 2, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "c9d5678677584ccb8b641247cc2366ab", + "m_Id": 0, + "m_DisplayName": "In", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "In", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "ca182aad34fe4f0799d1c040f65d652f", + "m_Id": 1, + "m_DisplayName": "B", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 3, + "m_Value": { + "x": 1.0, + "y": 1.0, + "z": 1.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SampleTexture2DNode", + "m_ObjectId": "ca2a1fd237384498b16fa84ee5965ae0", + "m_Group": { + "m_Id": "adb53098703d462f9d82c495cfcb09e9" + }, + "m_Name": "Sample Texture 2D", + "m_DrawState": { + "m_Expanded": false, + "m_Position": { + "serializedVersion": "2", + "x": -2687.00048828125, + "y": 112.99996948242188, + "width": 180.000244140625, + "height": 154.99996948242188 + } + }, + "m_Slots": [ + { + "m_Id": "5a8a475ff31e41249e61d6d446f7045d" + }, + { + "m_Id": "946f784fadc0474db2247d51607a62e5" + }, + { + "m_Id": "43cc4527815f4d1599563c230ac464b7" + }, + { + "m_Id": "6a3b470a319e4621b9d39ed2dde90105" + }, + { + "m_Id": "178daa7b355442e19e7d9f8ae47d73ff" + }, + { + "m_Id": "7abb9cd41a5547868cdd6e7f4ca18168" + }, + { + "m_Id": "9b426de8795444ab806ff53a0526bdba" + }, + { + "m_Id": "d2c603d505484d34a8cb1d68e0b5cf12" + } + ], + "synonyms": [ + "tex2d" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_TextureType": 1, + "m_NormalMapSpace": 0, + "m_EnableGlobalMipBias": true, + "m_MipSamplingMode": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "ca4cc91850cf490387cae299ff400e85", + "m_Id": 0, + "m_DisplayName": "Metallic", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Metallic", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot", + "m_ObjectId": "ca853667bae249479c020428e08b741e", + "m_Id": 0, + "m_DisplayName": "Normal", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Normal", + "m_StageCapability": 1, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "cc02227c38dd474882ab79ab5e96c1b8", + "m_Id": 0, + "m_DisplayName": "Alpha Cutoff", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CategoryData", + "m_ObjectId": "ccbb3780be7a4f95a0e4097ce1deb474", + "m_Name": "Occlusion", + "m_ChildObjectList": [ + { + "m_Id": "d9463d7b8c064ec89cf8a937bd5a27c5" + }, + { + "m_Id": "a45878eacd044a68aae28771783def4f" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "cd0e1f20815e4e1684051141b3f87a4c", + "m_Group": { + "m_Id": "cd446e3cb81b417a8bd2dc2ccafcd42e" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -2865.000244140625, + "y": -251.99996948242188, + "width": 145.0, + "height": 33.99989318847656 + } + }, + "m_Slots": [ + { + "m_Id": "a6f52d99a14d4561b749eaa8034b8dee" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "d26edc375b4c4243938ad5141a4772f2" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.GroupData", + "m_ObjectId": "cd446e3cb81b417a8bd2dc2ccafcd42e", + "m_Title": "Detail Mask", + "m_Position": { + "x": -2890.3525390625, + "y": -351.2122802734375 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "ce2504f5970a4304b7030dd6c14d2981", + "m_Id": 2, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "e00": 0.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 0.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 0.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 0.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.GroupData", + "m_ObjectId": "cebae50b11e94e838b6e7a5a61d4f2e8", + "m_Title": "Metallic", + "m_Position": { + "x": -2030.0767822265625, + "y": 432.3829345703125 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "cede2400ec2c454d8b3f440251012d0a", + "m_Id": 2, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "e00": 0.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 0.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 0.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 0.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "cfe41b26d48e41ccb8ada17b080239e2", + "m_Id": 1, + "m_DisplayName": "B", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "d00e7c0a86c84976bfe67bc5d7e65c3a", + "m_Id": 7, + "m_DisplayName": "A", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SamplerStateMaterialSlot", + "m_ObjectId": "d0cec5fd4f9545178c523d7bf5de5a5c", + "m_Id": 3, + "m_DisplayName": "Sampler", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Sampler", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "d0d2e0ffa03f4e34b9eaf8227f527aea", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.NormalTS", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "2a1c3313d7c347198330c12bb12e3699" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.NormalTS" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty", + "m_ObjectId": "d26edc375b4c4243938ad5141a4772f2", + "m_Guid": { + "m_GuidSerialized": "2bad0a19-a55c-4c54-ad62-b79f3130bc03" + }, + "m_Name": "Detail Mask", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Detail Mask", + "m_DefaultReferenceName": "_Detail_Mask", + "m_OverrideReferenceName": "_DetailMask", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}", + "m_Guid": "" + }, + "isMainTexture": false, + "useTilingAndOffset": true, + "m_Modifiable": true, + "m_DefaultType": 0 +} + +{ + "m_SGVersion": 3, + "m_Type": "UnityEditor.ShaderGraph.Internal.ColorShaderProperty", + "m_ObjectId": "d29cc0a358fe4e11adf98951bf90803e", + "m_Guid": { + "m_GuidSerialized": "47e18621-9ab3-4434-bbd1-22efa52e1da8" + }, + "m_Name": "Specular", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Specular", + "m_DefaultReferenceName": "_Specular", + "m_OverrideReferenceName": "_SpecularColor", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "r": 0.19999989867210389, + "g": 0.19999989867210389, + "b": 0.19999989867210389, + "a": 0.0 + }, + "isMainColor": false, + "m_ColorMode": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SamplerStateMaterialSlot", + "m_ObjectId": "d2c603d505484d34a8cb1d68e0b5cf12", + "m_Id": 3, + "m_DisplayName": "Sampler", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Sampler", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "d4a644e38a094910857c3832321b616e", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Occlusion", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "b2e183de88cd4dc3a4cfb3f6f22a122c" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Occlusion" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "d4fb460b6cbc4637bad16e493bdf03fb", + "m_Id": 2, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "e00": 0.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 0.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 0.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 0.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SampleTexture2DNode", + "m_ObjectId": "d5e45089bcab4d2d822fb10275983e32", + "m_Group": { + "m_Id": "40a7b9274eb447a48d0f1e31def6ba52" + }, + "m_Name": "Sample Texture 2D", + "m_DrawState": { + "m_Expanded": false, + "m_Position": { + "serializedVersion": "2", + "x": -2709.000244140625, + "y": 406.9999694824219, + "width": 180.0, + "height": 155.00009155273438 + } + }, + "m_Slots": [ + { + "m_Id": "9b994b58b2c445d38d601439bc7bfec2" + }, + { + "m_Id": "b792fa00cc2943f988eef88091fc962f" + }, + { + "m_Id": "79bc26ac5b6c4941a175a5f220ac954d" + }, + { + "m_Id": "c30d61a20c864d8fbebf20c9a6285982" + }, + { + "m_Id": "0f1f525eddfa43a5a87310c4243524be" + }, + { + "m_Id": "f9b3f03a2edc4eef9a2e7cd7a3ecfb52" + }, + { + "m_Id": "b42e2178393d4f398283d13201a86a3b" + }, + { + "m_Id": "e851a24e24e840be9399463cc00aff83" + } + ], + "synonyms": [ + "tex2d" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_TextureType": 1, + "m_NormalMapSpace": 0, + "m_EnableGlobalMipBias": true, + "m_MipSamplingMode": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "d632b87ac84b4359856a748b3cce4dfd", + "m_Id": 1, + "m_DisplayName": "X", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "X", + "m_StageCapability": 3, + "m_Value": 1.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "d717b908373c4a72854e9002cf1e059c", + "m_Group": { + "m_Id": "adb53098703d462f9d82c495cfcb09e9" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -2867.000244140625, + "y": 153.00006103515626, + "width": 179.999755859375, + "height": 33.99989318847656 + } + }, + "m_Slots": [ + { + "m_Id": "9bb08656de9a41bbac558c1aa2b01540" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "512fb8b4826e48fab65b83b8744dcc78" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "d718ce0dfe504a9d8517339ac0f8ff45", + "m_Id": 0, + "m_DisplayName": "RGBA", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "RGBA", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "d9463d7b8c064ec89cf8a937bd5a27c5", + "m_Guid": { + "m_GuidSerialized": "4a077f11-71c3-4f7e-9abf-ca71239f33c8" + }, + "m_Name": "Occlusion", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Occlusion", + "m_DefaultReferenceName": "_Occlusion", + "m_OverrideReferenceName": "_OcclusionStrength", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 1.0, + "m_FloatType": 1, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.HDLitSubTarget", + "m_ObjectId": "db66042a72e84f748d977f37482b94da" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DMaterialSlot", + "m_ObjectId": "dca5f61b8f7345768c56decca584a2d3", + "m_Id": 0, + "m_DisplayName": "Color Map", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "dd87e9b0a4f1465281871a4fbe972488", + "m_Id": 4, + "m_DisplayName": "R", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "R", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 3, + "m_Type": "UnityEditor.ShaderGraph.Internal.ColorShaderProperty", + "m_ObjectId": "e1260fde245f4582a46223b43a512871", + "m_Guid": { + "m_GuidSerialized": "63ba6aa1-c8e7-47a0-84aa-2187571f561a" + }, + "m_Name": "Emission", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Emission", + "m_DefaultReferenceName": "_Emission", + "m_OverrideReferenceName": "_EmissiveColor", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 1, + "m_Hidden": false, + "m_Value": { + "r": 0.0, + "g": 0.0, + "b": 0.0, + "a": 0.0 + }, + "isMainColor": false, + "m_ColorMode": 1 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "e2d4e47a62cd4e5d9c0299785a6a9a4c", + "m_Id": 5, + "m_DisplayName": "G", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "G", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalTarget", + "m_ObjectId": "e2ddf66d492a4aa19a63c60af0009914", + "m_Datas": [], + "m_ActiveSubTarget": { + "m_Id": "53055d2fa81b42c99a7a251de6391a7d" + }, + "m_AllowMaterialOverride": true, + "m_SurfaceType": 0, + "m_ZTestMode": 4, + "m_ZWriteControl": 0, + "m_AlphaMode": 0, + "m_RenderFace": 2, + "m_AlphaClip": false, + "m_CastShadows": true, + "m_ReceiveShadows": true, + "m_SupportsLODCrossFade": false, + "m_CustomEditorGUI": "", + "m_SupportVFX": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "e3238989e2c24727be4ff3a509e22b32", + "m_Group": { + "m_Id": "75ae407f7549455383d1c32d8989f303" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -2207.000244140625, + "y": -228.0, + "width": 138.0, + "height": 34.000030517578128 + } + }, + "m_Slots": [ + { + "m_Id": "dca5f61b8f7345768c56decca584a2d3" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "f9d39431664f4db282bf85cda7330e04" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.HighDefinition.ShaderGraph.LightingData", + "m_ObjectId": "e4ab9c6a4dc244088f8d38f2fdfd371d", + "m_NormalDropOffSpace": 0, + "m_BlendPreserveSpecular": true, + "m_ReceiveDecals": true, + "m_ReceiveSSR": true, + "m_ReceiveSSRTransparent": false, + "m_SpecularAA": false, + "m_SpecularOcclusionMode": 1, + "m_OverrideBakedGI": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "e53736c8a02a4bbf916e9fdb2518a12f", + "m_Id": 0, + "m_DisplayName": "A", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 3, + "m_Value": { + "e00": 0.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 0.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 0.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 0.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SampleTexture2DNode", + "m_ObjectId": "e556d99ab36040ee8da300db433d398a", + "m_Group": { + "m_Id": "cd446e3cb81b417a8bd2dc2ccafcd42e" + }, + "m_Name": "Sample Texture 2D", + "m_DrawState": { + "m_Expanded": false, + "m_Position": { + "serializedVersion": "2", + "x": -2706.00048828125, + "y": -292.00006103515627, + "width": 156.000244140625, + "height": 154.99998474121095 + } + }, + "m_Slots": [ + { + "m_Id": "465c5643e0c347719108034ea60221ec" + }, + { + "m_Id": "22b0b0a6f9cf42c2ac76aaea991d86c5" + }, + { + "m_Id": "54306c72430547cbace417b315aee172" + }, + { + "m_Id": "69589060132b47bc906b6b537466b085" + }, + { + "m_Id": "d00e7c0a86c84976bfe67bc5d7e65c3a" + }, + { + "m_Id": "af5686ba559143aaa6a6d1411da15050" + }, + { + "m_Id": "824610f03ea3492a9d4b6a52f9e36a28" + }, + { + "m_Id": "c6551ed58a3341e9b9c79a2546ef66f2" + } + ], + "synonyms": [ + "tex2d" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_TextureType": 0, + "m_NormalMapSpace": 0, + "m_EnableGlobalMipBias": true, + "m_MipSamplingMode": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SamplerStateMaterialSlot", + "m_ObjectId": "e851a24e24e840be9399463cc00aff83", + "m_Id": 3, + "m_DisplayName": "Sampler", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Sampler", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.UVMaterialSlot", + "m_ObjectId": "e87e64d077ad46dc9db7a2ae96d5f6c9", + "m_Id": 2, + "m_DisplayName": "UV", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "UV", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [], + "m_Channel": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CategoryData", + "m_ObjectId": "e8dc3ed688a74734819643d0041f5e84", + "m_Name": "", + "m_ChildObjectList": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "eb207ee80e7a43fb9485b15792cc0b42", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Metallic", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "ca4cc91850cf490387cae299ff400e85" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Metallic" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "eb5b6b79fcb9472ea3a520becab5351a", + "m_Id": 0, + "m_DisplayName": "A", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "eb715a1cbee24abca45f0b829d21fb57", + "m_Id": 0, + "m_DisplayName": "In", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "In", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.TangentMaterialSlot", + "m_ObjectId": "ec59d9fdb4e049e4954372bf22e1da8d", + "m_Id": 0, + "m_DisplayName": "Tangent", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Tangent", + "m_StageCapability": 1, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "ec6b6e488bcf422cb3bef77bf3645cd8", + "m_Id": 0, + "m_DisplayName": "In", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "In", + "m_StageCapability": 3, + "m_Value": { + "x": 1.0, + "y": 1.0, + "z": 1.0, + "w": 1.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "eca3ea913291477491bbedf7be0f7cf0", + "m_Id": 6, + "m_DisplayName": "B", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "ed53035c29c048458068300e1fd0cd27", + "m_Id": 2, + "m_DisplayName": "T", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "T", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "ed64aea815874cefa9b56f70b2aa8f21", + "m_Id": 0, + "m_DisplayName": "RGBA", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "RGBA", + "m_StageCapability": 2, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "ed9c10e3f10d4fa5bcdbef8bb8023ffb", + "m_Id": 1, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.UVMaterialSlot", + "m_ObjectId": "edb318cc9df14d5dbdc71f78dbaac9b3", + "m_Id": 2, + "m_DisplayName": "UV", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "UV", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0 + }, + "m_Labels": [], + "m_Channel": 0 +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "f03ed8b9043f469381375a4ce7291134", + "m_Guid": { + "m_GuidSerialized": "4f93283b-e2b1-422c-8873-a57874500dad" + }, + "m_Name": "Detail Albedo Map Scale", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Detail Albedo Map Scale", + "m_DefaultReferenceName": "_Detail_Albedo_Map_Scale", + "m_OverrideReferenceName": "_DetailAlbedoMapScale", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 0.0, + "m_FloatType": 0, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.GroupData", + "m_ObjectId": "f0446934f1f84b8480c20f72122e30f3", + "m_Title": "Alpha", + "m_Position": { + "x": -1165.30859375, + "y": -460.5617370605469 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "f165143c0ab24ffaa8ae35cb701930cd", + "m_Id": 0, + "m_DisplayName": "Detail Albedo Map Scale", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "f21103cd07f74ccea687ed97d7b20650", + "m_Id": 5, + "m_DisplayName": "G", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "G", + "m_StageCapability": 2, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "f31b7daaa9204711a7fed011b26dbc8a", + "m_Group": { + "m_Id": "" + }, + "m_Name": "VertexDescription.Tangent", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "ec59d9fdb4e049e4954372bf22e1da8d" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Tangent" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "f3d07d2931b6413b94adab5997472567", + "m_Id": 0, + "m_DisplayName": "", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "f5d0d252a08b45c68d2737a801473424", + "m_Group": { + "m_Id": "5a905965f0d64818bbfb2d4f869e738b" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1052.0, + "y": 1070.0, + "width": 155.99993896484376, + "height": 34.0001220703125 + } + }, + "m_Slots": [ + { + "m_Id": "6f3b61224b9442079ae7397ab5ac3a3b" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "89b8f3104f6f45b7a09de6483d127676" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "f889217dee1146989a34f29e5a436a20", + "m_Id": 1, + "m_DisplayName": "B", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 3, + "m_Value": { + "e00": 2.0, + "e01": 2.0, + "e02": 2.0, + "e03": 2.0, + "e10": 2.0, + "e11": 2.0, + "e12": 2.0, + "e13": 2.0, + "e20": 2.0, + "e21": 2.0, + "e22": 2.0, + "e23": 2.0, + "e30": 2.0, + "e31": 2.0, + "e32": 2.0, + "e33": 2.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DInputMaterialSlot", + "m_ObjectId": "f9b3f03a2edc4eef9a2e7cd7a3ecfb52", + "m_Id": 1, + "m_DisplayName": "Texture", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Texture", + "m_StageCapability": 3, + "m_BareResource": false, + "m_Texture": { + "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}", + "m_Guid": "" + }, + "m_DefaultType": 3 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty", + "m_ObjectId": "f9d39431664f4db282bf85cda7330e04", + "m_Guid": { + "m_GuidSerialized": "5a4a57c8-ebcb-4526-b253-a7ff1b3fa66e" + }, + "m_Name": "Color Map", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Color Map", + "m_DefaultReferenceName": "_Color_Map", + "m_OverrideReferenceName": "_MainTex", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}", + "m_Guid": "" + }, + "isMainTexture": false, + "useTilingAndOffset": true, + "m_Modifiable": true, + "m_DefaultType": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SampleTexture2DNode", + "m_ObjectId": "fa01c85ba84f46ad8526a72cf40096aa", + "m_Group": { + "m_Id": "5a905965f0d64818bbfb2d4f869e738b" + }, + "m_Name": "Sample Texture 2D", + "m_DrawState": { + "m_Expanded": false, + "m_Position": { + "serializedVersion": "2", + "x": -865.0000610351563, + "y": 1031.0001220703125, + "width": 179.99993896484376, + "height": 155.0 + } + }, + "m_Slots": [ + { + "m_Id": "ad135feac44b4a9092c1bc6a399986ad" + }, + { + "m_Id": "dd87e9b0a4f1465281871a4fbe972488" + }, + { + "m_Id": "30ea8aa1acd74238908b99818ba782cc" + }, + { + "m_Id": "579cfd2ccc024a8ca575e17769040c93" + }, + { + "m_Id": "1e09e77599594ad1a7b6189f70f9dd97" + }, + { + "m_Id": "46f3e25e0a2b43ed82ae5839c10bc783" + }, + { + "m_Id": "edb318cc9df14d5dbdc71f78dbaac9b3" + }, + { + "m_Id": "2135c3468ed047baa13605f17d4d9f4e" + } + ], + "synonyms": [ + "tex2d" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_TextureType": 0, + "m_NormalMapSpace": 0, + "m_EnableGlobalMipBias": true, + "m_MipSamplingMode": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "fca2a686d3fd4b588cde3b54823bb062", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Emission", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "78dec7a33602431b8db670856518614e" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Emission" +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "fd2e5f1ae08c4f45b0c795fb9673845c", + "m_Guid": { + "m_GuidSerialized": "b31689b2-87ce-478c-a252-517feeea1f75" + }, + "m_Name": "Alpha Cutoff", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Alpha Cutoff", + "m_DefaultReferenceName": "_Alpha_Cutoff", + "m_OverrideReferenceName": "_Cutoff", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 2, + "m_Hidden": false, + "m_Value": 0.5, + "m_FloatType": 1, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + diff --git a/Assets/Obi/Resources/ObiMaterials/Common/ParticleShader.shadergraph.meta b/Packages/com.waveharmonic.crest/Shared/Shaders/Lit.shadergraph.meta similarity index 86% rename from Assets/Obi/Resources/ObiMaterials/Common/ParticleShader.shadergraph.meta rename to Packages/com.waveharmonic.crest/Shared/Shaders/Lit.shadergraph.meta index 59a0a5bc9..52c59f472 100644 --- a/Assets/Obi/Resources/ObiMaterials/Common/ParticleShader.shadergraph.meta +++ b/Packages/com.waveharmonic.crest/Shared/Shaders/Lit.shadergraph.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 99a2f8857960c44ca980d85023572447 +guid: 717b077102735454887bdc5c26938762 ScriptedImporter: internalIDToNameTable: [] externalObjects: {} diff --git a/Packages/com.waveharmonic.crest/Shared/Textures.meta b/Packages/com.waveharmonic.crest/Shared/Textures.meta new file mode 100644 index 000000000..89cf33c27 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Textures.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 345057e2fcf864bb3aaf2d8e106a6da5 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Textures/Red.png b/Packages/com.waveharmonic.crest/Shared/Textures/Red.png new file mode 100644 index 000000000..54bb92eb7 Binary files /dev/null and b/Packages/com.waveharmonic.crest/Shared/Textures/Red.png differ diff --git a/Packages/com.waveharmonic.crest/Shared/Textures/Red.png.meta b/Packages/com.waveharmonic.crest/Shared/Textures/Red.png.meta new file mode 100644 index 000000000..a367c1a52 --- /dev/null +++ b/Packages/com.waveharmonic.crest/Shared/Textures/Red.png.meta @@ -0,0 +1,127 @@ +fileFormatVersion: 2 +guid: b922f588948724e039eadd46288af89d +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 1 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/Shared/Textures/Skybox.hdr b/Packages/com.waveharmonic.crest/Shared/Textures/Skybox.hdr new file mode 100644 index 000000000..31843fc6a Binary files /dev/null and b/Packages/com.waveharmonic.crest/Shared/Textures/Skybox.hdr differ diff --git a/Assets/Obi/Editor/Resources/Icons/ObiVoidZone Icon.png.meta b/Packages/com.waveharmonic.crest/Shared/Textures/Skybox.hdr.meta similarity index 87% rename from Assets/Obi/Editor/Resources/Icons/ObiVoidZone Icon.png.meta rename to Packages/com.waveharmonic.crest/Shared/Textures/Skybox.hdr.meta index 083fee0f9..45a821ff4 100644 --- a/Assets/Obi/Editor/Resources/Icons/ObiVoidZone Icon.png.meta +++ b/Packages/com.waveharmonic.crest/Shared/Textures/Skybox.hdr.meta @@ -1,9 +1,9 @@ fileFormatVersion: 2 -guid: eac6271e2e50d4b2dbf2dfeff9b65604 +guid: b04e3fd8ac149468c93ae5deec99b0d7 TextureImporter: internalIDToNameTable: [] externalObjects: {} - serializedVersion: 11 + serializedVersion: 13 mipmaps: mipMapMode: 0 enableMipMap: 1 @@ -20,11 +20,12 @@ TextureImporter: externalNormalMap: 0 heightScale: 0.25 normalMapFilter: 0 + flipGreenChannel: 0 isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 vTOnly: 0 - ignoreMasterTextureLimit: 0 + ignoreMipmapLimit: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -36,10 +37,10 @@ TextureImporter: filterMode: 1 aniso: 1 mipBias: 0 - wrapU: 1 - wrapV: 1 + wrapU: 0 + wrapV: 0 wrapW: 0 - nPOTScale: 0 + nPOTScale: 1 lightmap: 0 compressionQuality: 50 spriteMode: 0 @@ -51,10 +52,10 @@ TextureImporter: spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteGenerateFallbackPhysicsShape: 1 alphaUsage: 1 - alphaIsTransparency: 1 + alphaIsTransparency: 0 spriteTessellationDetail: -1 - textureType: 2 - textureShape: 1 + textureType: 0 + textureShape: 2 singleChannelComponent: 0 flipbookRows: 1 flipbookColumns: 1 @@ -63,6 +64,8 @@ TextureImporter: textureFormatSet: 0 ignorePngGamma: 0 applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 platformSettings: - serializedVersion: 3 buildTarget: DefaultTexturePlatform @@ -74,6 +77,7 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - serializedVersion: 3 @@ -86,6 +90,7 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 - serializedVersion: 3 @@ -98,6 +103,7 @@ TextureImporter: crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 + ignorePlatformSupport: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: @@ -114,9 +120,8 @@ TextureImporter: weights: [] secondaryTextures: [] nameFileIdTable: {} - spritePackingTag: + mipmapLimitGroupName: pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 userData: assetBundleName: assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/ThirdPartyNotices.md b/Packages/com.waveharmonic.crest/ThirdPartyNotices.md new file mode 100644 index 000000000..c236f5d3d --- /dev/null +++ b/Packages/com.waveharmonic.crest/ThirdPartyNotices.md @@ -0,0 +1,18 @@ +# THIRD PARTY NOTICES +This Third Party Notices file provides notices and information about the third party code or other materials listed below ("Third Party Software") which are included with the Software. Wave Harmonic reserves all other rights to the Third Party Software not expressly granted by Wave Harmonic, whether by implication, estoppel or otherwise. The notices and licenses below are provided for informational purposes only. + +For more information please refer to: + +https://support.unity3d.com/hc/en-us/articles/360013314071-Am-I-allowed-to-use-content-that-has-a-license-which-states-I-am-allowed-to-resell-or-distribute-it- + +++++++++++++++++++++++++++++++ + +Crest Ocean System (for built-in render pipeline) | MIT License +Copyright (c) 2019 Wave Harmonic and contributors + +++++++++++++++++++++++++++++++ + +Quality hashes collection | MIT License +Copyright (c) 2018 nimitz (twitter: @stormoid) + +++++++++++++++++++++++++++++++ diff --git a/Packages/com.waveharmonic.crest/ThirdPartyNotices.md.meta b/Packages/com.waveharmonic.crest/ThirdPartyNotices.md.meta new file mode 100644 index 000000000..2a06434ac --- /dev/null +++ b/Packages/com.waveharmonic.crest/ThirdPartyNotices.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 09672d425b0494ba580cadc6191f0904 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.waveharmonic.crest/package.json b/Packages/com.waveharmonic.crest/package.json new file mode 100644 index 000000000..5a809aa60 --- /dev/null +++ b/Packages/com.waveharmonic.crest/package.json @@ -0,0 +1,48 @@ +{ + "name": "com.waveharmonic.crest", + "version": "5.4.2", + "displayName": "Crest", + "description": "An advanced water system for Unity.", + "unity": "2022.3", + "unityRelease": "21f1", + "hideInEditor": false, + "documentationUrl": "https://docs.crest.waveharmonic.com/About/Introduction.html", + "changelogUrl": "https://docs.crest.waveharmonic.com/About/History.html", + "author": { + "name": "Wave Harmonic", + "email": "support@waveharmonic.com", + "url": "https://waveharmonic.com/" + }, + "keywords": [], + "samples": [ + { + "displayName": "Main", + "description": "A simple sample scene", + "path": "Samples~/Main" + }, + { + "displayName": "Examples", + "description": "Contains several examples of less common use cases in one scene. Highly recommended.", + "path": "Samples~/Examples" + }, + { + "displayName": "Ripples", + "description": "An example of manipulating inputs to generate dynamic ripples.", + "path": "Samples~/Ripples" + }, + { + "displayName": "Wakes", + "description": "Demonstrates wakes using the Sphere Water Interaction.", + "path": "Samples~/Wakes" + }, + { + "displayName": "Boats", + "description": "Simple examples using boats.", + "path": "Samples~/Boats" + } + ], + "dependencies": { + "com.unity.render-pipelines.core": "14.0.11", + "com.unity.shadergraph": "14.0.11" + } +} \ No newline at end of file diff --git a/Packages/com.waveharmonic.crest/package.json.meta b/Packages/com.waveharmonic.crest/package.json.meta new file mode 100644 index 000000000..3dbbee057 --- /dev/null +++ b/Packages/com.waveharmonic.crest/package.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5c7f630660b354476a83c9e4962b34b1 +PackageManifestImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index 5be0943c1..2e11b2b4b 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -511,6 +511,15 @@ }, "url": "https://packages.unity.com" }, + "com.waveharmonic.crest": { + "version": "file:com.waveharmonic.crest", + "depth": 0, + "source": "embedded", + "dependencies": { + "com.unity.render-pipelines.core": "14.0.11", + "com.unity.shadergraph": "14.0.11" + } + }, "com.unity.modules.accessibility": { "version": "1.0.0", "depth": 0, diff --git a/ProjectSettings/QualitySettings.asset b/ProjectSettings/QualitySettings.asset index ffa4e242b..920c9d7e1 100644 --- a/ProjectSettings/QualitySettings.asset +++ b/ProjectSettings/QualitySettings.asset @@ -4,7 +4,7 @@ QualitySettings: m_ObjectHideFlags: 0 serializedVersion: 5 - m_CurrentQuality: 2 + m_CurrentQuality: 1 m_QualitySettings: - serializedVersion: 5 name: Low diff --git a/ProjectSettings/TimeManager.asset b/ProjectSettings/TimeManager.asset index 4833f5b32..c194187af 100644 --- a/ProjectSettings/TimeManager.asset +++ b/ProjectSettings/TimeManager.asset @@ -5,7 +5,7 @@ TimeManager: m_ObjectHideFlags: 0 serializedVersion: 2 Fixed Timestep: - m_Count: 705599 + m_Count: 1411199 m_Rate: m_Denominator: 1 m_Numerator: 141120000 diff --git a/UserSettings/EditorUserSettings.asset b/UserSettings/EditorUserSettings.asset index 1bcd2b8dc..3d3e16179 100644 --- a/UserSettings/EditorUserSettings.asset +++ b/UserSettings/EditorUserSettings.asset @@ -6,7 +6,7 @@ EditorUserSettings: serializedVersion: 4 m_ConfigSettings: GraphicsSettingsInspector_UserSettings: - value: 18134705175a055722080a3115371d4a0d55006876786860616b0471b8b07a68ffab74f9ee2a3a30300cea1a11320d0beb1a0c25f7060f494b4cc80018eb09361fc211cb1f862d19c51d19dcc413d6ade0d8ddfcddf9f4d9d29195fcfde6ebeae6f0a9c9afa6f8c5b89ff7a1aacececac4eba4d7c9d28bda + value: 18134705175a055722080a3115371d4a0d55006876786860616b0471b8b3666cacb72ba5a52a362c3c0ee63201181433fe3e101bf3250b06144ca74c24f1190708e016c213c61a52f91c12cac80fd8edd298e1e4d1fde2cacddeacbcc1fee7eef0e3b6faa69af9ceaeaaec81a6d2c2c8c8c4b2e5dfd5ccd3f8cf flags: 0 RecentlyUsedSceneGuid-0: value: 5702075052030b0e5458087142770745104f4a7d747d72667e2d4d36b2b8676f @@ -21,19 +21,19 @@ EditorUserSettings: value: 02550255060d590c0c0b097016770b12444f1e2b7e2a2534797f4b60b6e46c60 flags: 0 RecentlyUsedSceneGuid-4: - value: 0157575457015e0e545658764226084417151b7e28717e327c2b4e37b0b36669 + value: 5b520400060d5a5a5b5b557641770b43424f1c28787d25612b2d196ab0b66068 flags: 0 RecentlyUsedSceneGuid-5: - value: 000951510602590f095609274674594417164b7f787b76322e2d1f63b5b16c61 + value: 52530c5601535f020f565a2043770d1612154d2f747975692c7b4e66b5e3303b flags: 0 RecentlyUsedSceneGuid-6: - value: 5309035757065a0a54575f7216265c4444151d28792e72627d2f1935bbb8673a + value: 5303020755510a0f5e085c2744775a40454e1a2f282b72632f284d61e1e5673d flags: 0 RecentlyUsedSceneGuid-7: - value: 00080c0255035c02550b55271670094440154a7e7d7f256079794830b4b6646e + value: 565700055d51590c0f56557545710744124f492b2a2976662828456ae6b03269 flags: 0 RecentlyUsedSceneGuid-8: - value: 07060c5454040c0a545b547240700a441216417e7f2e7268752c4966b4b0663d + value: 5309035757065a0a54575f7216265c4444151d28792e72627d2f1935bbb8673a flags: 0 RecentlyUsedSceneGuid-9: value: 5505015f5c515a085f5b092149760f441716407a787d7564287b1b36e7e1366e